text:
package javax.faces.flow;

import java.util.List;
import java.util.Map;
import javax.faces.application.NavigationCase;
import javax.faces.lifecycle.ClientWindow;

/**
 *
 * @since 2.2
 */
public abstract class Flow
{

    public abstract String getClientWindowFlowId(ClientWindow curWindow);

    public abstract String getDefiningDocumentId();

    public abstract String getId();

    public abstract Map<String,Parameter> getInboundParameters();

    public abstract javax.el.MethodExpression getInitializer();

    public abstract javax.el.MethodExpression getFinalizer();

    public abstract FlowCallNode getFlowCall(Flow targetFlow);

    public abstract Map<String,FlowCallNode> getFlowCalls();

    public abstract List<MethodCallNode> getMethodCalls();

    public abstract FlowNode getNode(String nodeId);

    public abstract Map<String,ReturnNode> getReturns();

    public abstract Map<String,SwitchNode> getSwitches();

    public abstract List<ViewNode> getViews();

    public abstract String getStartNodeId();

    public abstract java.util.Map<java.lang.String,java.util.Set<NavigationCase>> getNavigationCases();

}


text:
module Zafu
  module Experimental

    # part caching
    def r_cache
      kpath   = @params[:kpath]   || Page.kpath
      out "<% #{cache} = Cache.with(visitor.id, visitor.group_ids, #{kpath.inspect}, #{helper.send(:lang).inspect}, #{template_url.inspect}) do capture do %>"
      out expand_with
      out "<% end; end %><%= #{cache} %>"
    end

    def cache
      return @cache if @cache
      if @context[:cache] =~ /^cache(\d+)$/
        @cache = "cache#{$1.to_i + 1}"
      else
        @cache = "cache1"
      end
    end

    def r_flash_messages
      type = @params[:show] || 'both'
      "
" +
      if (type == 'notice' || type == 'both')
        "<% if flash[:notice] -%>
<%= flash[:notice] %>
<% end -%>"
      else
        ''
      end +
      if (type == 'error'  || type == 'both')
        "<% if flash[:error] -%>
<%= flash[:error] %>
<% end -%>"
      else
        ''
      end +
      "
"
    end

    # Prepare stylesheet and xml content for xsl-fo post-processor
    def r_fop
      return parser_error("missing 'stylesheet' argument") unless @params[:stylesheet]
      # get stylesheet text
      xsl_content, absolute_url, doc = self.class.get_template_text(@params[:stylesheet], @options[:helper], @options[:current_dir])
      return parser_error("stylesheet #{@params[:stylesheet].inspect} not found") unless doc

      template_url = (self.template_url.split('/')[0..-2] + ['_main.xsl']).join('/')
      helper.save_erb_to_url(xsl_content, template_url)
      out "<?xml version='1.0' encoding='utf-8'?>\n"
      out "\n" if doc
      out expand_with
    end

    # Prepare content for LateX post-processor
    def r_latex
      out "% latex\n"
      # all content inside this will be informed to render for Latex output
      out expand_with(:output_format => 'latex')
    end

    def r_inspect
      out ["params: #{@params.inspect}",
      "name:   #{@context[:name]}",
      "node:   #{node}",
      "list:   #{list}"].join("
")
    end

  end # Experimental
end # Zafu

redpajama_set_name: RedPajamaGithub


text:
package com.sagalasan.eveapi;

/**
 * Created by sagalasan on 2/5/16.
 */
public class ArgPair<E>
{
  private final String key;
  private final E argument;

  public ArgPair(final String key, final E argument)
  {
    this.key = key;
    this.argument = argument;
  }

  public String getUriArg()
  {
    return key + "=" + argument.toString();
  }

  public static void main(String[] args)
  {
    ArgPair<Integer> argPair = new ArgPair<>("Hello", 12434);
    System.out.println(argPair.getUriArg());
  }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:util="http://www.springframework.org/schema/util"
       xmlns="http://www.springframework.org/schema/beans"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans.xsd
       http://www.springframework.org/schema/context
       http://www.springframework.org/schema/context/spring-context.xsd
       http://www.springframework.org/schema/util
        http://www.springframework.org/schema/util/spring-util.xsd">

    <context:annotation-config />

    <util:list id="filtersToMap">
        <value>BootstrapFilter</value>
        <value>UserLoginFilter</value>
        <value>UserPreferencesFilter</value>
    </util:list>

    <bean id="kcProposalDevelopmentConfigurer" class="org.kuali.coeus.sys.framework.config.KcConfigurer">
        <property name="moduleName" value="kc.pd"/>
        <property name="moduleTitle" value="KC Proposal Development"/>
        <property name="dispatchServletName" value="kc-pd-krad"/>
        <property name="filtersToMap" ref="filtersToMap"/>
        <property name="bootstrapSpringFile" value="classpath:org/kuali/coeus/propdev/impl/PropDevComponentSpringBeans.xml"/>
    </bean>

</beans>


text:
layout: article
title: "English Parts of Speech Overview"
date: 2006-08-28 14:19
cats: [english]
permalink: /2006/08/28/english-parts-of-speech-overview/
---
Got grammar? See Everything You Need to Improve Your English Grammar.

The parts of speech determine how words interact with each other, organizing words based on their uses and meanings. For a detailed overview, see the entry for Lexical Category on Wikipedia.

I remember learning the basics in school, but I can't remember every detail. For example, what exactly is a preposition (as opposed to a conjunction)? What part of speech does "therefore" belong to? So, without getting too much into linguistics (that's for another post), I'm going to review the eight traditional parts of speech: nouns, pronouns, verbs, adjectives, adverbs, prepositions, conjunctions, and interjections.

Posts In This Series:

English Parts of Speech: Nouns and Pronouns

English Parts of Speech: Verbs

English Parts of Speech: Adjectives, Determiners, and Adverbs

English Parts of Speech: Prepositions, Conjunctions, and Interjections


text:
The first and only "Unicycle Games" games for the Commodore 64 compatible with UniJoystiCle™.

## Version v0.4

![Title Screen](https://lh3.googleusercontent.com/DGYpbpzcSPE_4_kDfWi8_IoNdqwQNdI2cjBjxG_XHJsPkubiWrqjENliPjD8s1t3xZuE8trRVv480w=w384-h272-no)
![RoadRace](https://lh3.googleusercontent.com/-8hNjbAZFeQQ/V5ZT_lzJWEI/AAAAAAABe28/Vi5UdHVHvscV4jwW92_ne154eXWHQcatgCCo/s800/capture2.png)
![CycloCross](https://lh3.googleusercontent.com/-ce3uigCabI8/V5ZT_odzEcI/AAAAAAABe20/TXyhvXMrqZQb110Lb9xY76Ff5k1WFqHVwCCo/s800/capture3.png)
![CrossCountry](https://lh3.googleusercontent.com/-qYOFLfHu_Ac/V5ZU1lnd5-I/AAAAAAABe3A/LBW-xfCv_30HZhN5hlLnk1pRhRgafaBFQCCo/s800/capture5.png)

The game is not finished yet. However, if you want to see the progress of the game, feel free to clone it, report bugs, submit pull requests, etc.

## How to play it

Best if played with a [UniJoystiCle](https://retro.moe/unijoysticle).
If you don't have one, go and get one. In the meantime you can try it with a regular joystick.

There are three events:

* Road Race:
   * Joystick: Left + Right to speed
   * UniJoystiCle: Idle or pedal to speed
* Cyclo Cross
   * Joystick: Fire to jump
   * UniJoystiCle: Hop to jump
* Cross Country:
   * Joystick: Left + Right to speed; fire to jump
   * UniJoystiCle: Idle or pedal to speed; hop to jump

Try to beat the computer in all three events. Or play face-to-face with a friend.

## Download

Download latest version from here: [unigames.d64](https://github.com/ricardoquesada/c64-the-uni-games/raw/master/bin/unigames.d64)

## Video

[![The Uni Games v0.4](https://img.youtube.com/vi/ZLAgooXx4bo/0.jpg)](https://www.youtube.com/watch?v=ZLAgooXx4bo)

## How to compile it

- Install [cc65](http://cc65.github.io/cc65/) and put it in the path. Requires cc65 v2.15 or newer (Don't install it using `brew` since it is an old version)
- Install [Vice](http://vice-emu.sourceforge.net/) and make sure `c1541` and `x64` are in the path.
    - On Mac: `$ brew install vice`
    - On Linux: `$ apt-get install vice` and follow [these instructions](http://iseborn.eu/wiki/index.php?title=Ubuntu/Install_and_set_up_VICE)
- Install [exomizer](http://hem.bredband.net/magli143/exo/) to generate compressed .prg files.
- Clone this project and `make bin`:

```
$ git clone https://github.com/ricardoquesada/c64-the-uni-games.git
$ cd c64-uni-games
$ make bin
```

## License

(c) 2015, 2016 Ricardo Quesada
[Apache License v2.0](LICENSE)


text:
/**
 * Contentful Space API. Contains methods to access any operations at a space
 * level, such as creating and reading entities contained in a space.
 */

import { createRequestConfig } from 'contentful-sdk-core'
import { MakeRequest, PaginationQueryOptions, QueryOptions } from './common-types'
import entities from './entities'
import { CreateApiKeyProps } from './entities/api-key'
import { CreateEnvironmentProps } from './entities/environment'
import { CreateEnvironmentAliasProps } from './entities/environment-alias'
import { CreateRoleProps, RoleProps } from './entities/role'
import { ScheduledActionProps, ScheduledActionQueryOptions } from './entities/scheduled-action'
import { SpaceProps } from './entities/space'
import { CreateSpaceMembershipProps } from './entities/space-membership'
import { CreateTeamSpaceMembershipProps } from './entities/team-space-membership'
import { CreateWebhooksProps } from './entities/webhook'

/**
 * @private
 */
export type ContentfulSpaceAPI = ReturnType<typeof createSpaceApi>

/**
 * Creates API object with methods to access the Space API
 * @param {MakeRequest} makeRequest - function to make requests via an adapter
 * @return {ContentfulSpaceAPI}
 * @private
 */
export default function createSpaceApi(makeRequest: MakeRequest) {
  const { wrapSpace } = entities.space
  const { wrapEnvironment, wrapEnvironmentCollection } = entities.environment
  const { wrapWebhook, wrapWebhookCollection } = entities.webhook
  const { wrapRole, wrapRoleCollection } = entities.role
  const { wrapUser, wrapUserCollection } = entities.user
  const { wrapSpaceMember, wrapSpaceMemberCollection } = entities.spaceMember
  const { wrapSpaceMembership, wrapSpaceMembershipCollection } = entities.spaceMembership
  const { wrapTeamSpaceMembership, wrapTeamSpaceMembershipCollection } =
    entities.teamSpaceMembership
  const { wrapTeamCollection } = entities.team
  const { wrapApiKey, wrapApiKeyCollection } = entities.apiKey
  const { wrapEnvironmentAlias, wrapEnvironmentAliasCollection } = entities.environmentAlias
  const { wrapPreviewApiKey, wrapPreviewApiKeyCollection } = entities.previewApiKey
  const { wrapScheduledAction, wrapScheduledActionCollection } = entities.scheduledAction

  return {
    /**
     * Deletes the space
     * @return Promise for the deletion. It contains no data, but the Promise error case should be handled.
     * @example ```javascript
     * const contentful = require('contentful-management')
     *
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     *
     * client.getSpace('<space_id>')
     *   .then((space) => space.delete())
     *   .then(() => console.log('Space deleted.'))
     *   .catch(console.error)
     * ```
     */
    delete: function deleteSpace() {
      const raw = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'Space',
        action: 'delete',
        params: { spaceId: raw.sys.id },
      })
    },
    /**
     * Updates the space
     * @return Promise for the updated space.
     * @example ```javascript
     * const contentful = require('contentful-management')
     *
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     *
     * client.getSpace('<space_id>')
     * .then((space) => {
     *   space.name = 'New name'
     *   return space.update()
     * })
     * .then((space) => console.log(`Space ${space.sys.id} renamed.`)
     * .catch(console.error)
     * ```
     */
    update: function updateSpace() {
      const raw = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'Space',
        action: 'update',
        params: { spaceId: raw.sys.id },
        payload: raw,
        headers: {},
      }).then((data) => wrapSpace(makeRequest, data))
    },
    /**
     * Gets an environment
     * @param id - Environment ID
     * @return Promise for an Environment
     * @example ```javascript
     * const contentful = require('contentful-management')
     *
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     *
     * client.getSpace('<space_id>')
     * .then((space) => space.getEnvironment('<environement_id>'))
     * .then((environment) => console.log(environment))
     * .catch(console.error)
     * ```
     */
    getEnvironment(environmentId: string) {
      const raw = this.toPlainObject() as SpaceProps

      return makeRequest({
        entityType: 'Environment',
        action: 'get',
        params: { spaceId: raw.sys.id, environmentId },
      }).then((data) => wrapEnvironment(makeRequest, data))
    },

    /**
     * Gets a collection of Environments
     * @return Promise for a collection of Environment
     * @example ```javascript
     * const contentful = require('contentful-management')
     *
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     *
     * client.getSpace('<space_id>')
     * .then((space) => space.getEnvironments())
     * .then((response) => console.log(response.items))
     * .catch(console.error)
     * ```
     */
    getEnvironments(query: PaginationQueryOptions = {}) {
      const raw = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'Environment',
        action: 'getMany',
        params: { spaceId: raw.sys.id, query },
      }).then((data) => wrapEnvironmentCollection(makeRequest, data))
    },

    /**
     * Creates an Environement
     * @param data - Object representation of the Environment to be created
     * @return Promise for the newly created Environment
     * @example ```javascript
     * const contentful = require('contentful-management')
     *
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     *
     * client.getSpace('<space_id>')
     * .then((space) => space.createEnvironment({ name: 'Staging' }))
     * .then((environment) => console.log(environment))
     * .catch(console.error)
     * ```
     */
    createEnvironment(data: CreateEnvironmentProps = {}) {
      const raw = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'Environment',
        action: 'create',
        params: {
          spaceId: raw.sys.id,
        },
        payload: data,
      }).then((response) => wrapEnvironment(makeRequest, response))
    },

    /**
     * Creates an Environment with a custom ID
     * @param id - Environment ID
     * @param data - Object representation of the Environment to be created
     * @param sourceEnvironmentId - ID of the source environment that will be copied to create the new environment. Default is "master"
     * @return Promise for the newly created Environment
     * @example ```javascript
     * const contentful = require('contentful-management')
     *
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     *
     * client.getSpace('<space_id>')
     * .then((space) => space.createEnvironmentWithId('<environment-id>', { name: 'Staging'}, 'master'))
     * .then((environment) => console.log(environment))
     * .catch(console.error)
     * ```
     */
    createEnvironmentWithId(
      id: string,
      data: CreateEnvironmentProps,
      sourceEnvironmentId?: string
    ) {
      const raw = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'Environment',
        action: 'createWithId',
        params: {
          spaceId: raw.sys.id,
          environmentId: id,
          sourceEnvironmentId,
        },
        payload: data,
      }).then((response) => wrapEnvironment(makeRequest, response))
    },

    /**
     * Gets a Webhook
     * @param id - Webhook ID
     * @return Promise for a Webhook
     * @example ```javascript
     * const contentful = require('contentful-management')
     *
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     *
     * client.getSpace('<space_id>')
     * .then((space) => space.getWebhook('<webhook_id>'))
     * .then((webhook) => console.log(webhook))
     * .catch(console.error)
     * ```
     */
    getWebhook(id: string) {
      const raw = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'Webhook',
        action: 'get',
        params: { spaceId: raw.sys.id, webhookDefinitionId: id },
      }).then((data) => wrapWebhook(makeRequest, data))
    },

    /**
     * Gets a collection of Webhooks
     * @return Promise for a collection of Webhooks
     * @example ```javascript
     * const contentful = require('contentful-management')
     *
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     *
     * client.getSpace('<space_id>')
     * .then((space) => space.getWebhooks())
     * .then((response) => console.log(response.items))
     * .catch(console.error)
     * ```
     */
    getWebhooks() {
      const raw = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'Webhook',
        action: 'getMany',
        params: { spaceId: raw.sys.id },
      }).then((data) => wrapWebhookCollection(makeRequest, data))
    },

    /**
     * Creates a Webhook
     * @param data - Object representation of the Webhook to be created
     * @return Promise for the newly created Webhook
     * @example ```javascript
     * const contentful = require('contentful-management')
     *
     * client.getSpace('<space_id>')
     * .then((space) => space.createWebhook({
     *   'name': 'My webhook',
     *   'url': 'https://www.example.com/test',
     *   'topics': [
     *     'Entry.create',
     *     'ContentType.create',
     *     '*.publish',
     *     'Asset.*'
     *   ]
     * }))
     * .then((webhook) => console.log(webhook))
     * .catch(console.error)
     * ```
     */
    createWebhook(data: CreateWebhooksProps) {
      const raw = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'Webhook',
        action: 'create',
        params: { spaceId: raw.sys.id },
        payload: data,
      }).then((data) => wrapWebhook(makeRequest, data))
    },

    /**
     * Creates a Webhook with a custom ID
     * @param id - Webhook ID
     * @param  data - Object representation of the Webhook to be created
     * @return Promise for the newly created Webhook
     * @example ```javascript
     * const contentful = require('contentful-management')
     *
     * client.getSpace('<space_id>')
     * .then((space) => space.createWebhookWithId('<webhook_id>', {
     *   'name': 'My webhook',
     *   'url': 'https://www.example.com/test',
     *   'topics': [
     *     'Entry.create',
     *     'ContentType.create',
     *     '*.publish',
     *     'Asset.*'
     *   ]
     * }))
     * .then((webhook) => console.log(webhook))
     * .catch(console.error)
     * ```
     */
    createWebhookWithId(id: string, data: CreateWebhooksProps) {
      const raw = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'Webhook',
        action: 'createWithId',
        params: { spaceId: raw.sys.id, webhookDefinitionId: id },
        payload: data,
      }).then((data) => wrapWebhook(makeRequest, data))
    },
    /**
     * Gets a Role
     * @param id - Role ID
     * @return Promise for a Role
     * @example ```javascript
     * const contentful = require('contentful-management')
     *
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     *
     * client.getSpace('<space_id>')
     * .then((space) => space.createRole({
     *   fields: {
     *     title: {
     *       'en-US': 'Role title'
     *     }
     *   }
     * }))
     * .then((role) => console.log(role))
     * .catch(console.error)
     * ```
     */
    getRole(id: string) {
      const raw = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'Role',
        action: 'get',
        params: { spaceId: raw.sys.id, roleId: id },
      }).then((data) => wrapRole(makeRequest, data))
    },
    /**
     * Gets a collection of Roles
     * @return Promise for a collection of Roles
     * @example ```javascript
     * const contentful = require('contentful-management')
     *
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     *
     * client.getSpace('<space_id>')
     * .then((space) => space.getRoles())
     * .then((response) => console.log(response.items))
     * .catch(console.error)
     * ```
     */
    getRoles(query: QueryOptions = {}) {
      const raw = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'Role',
        action: 'getMany',
        params: { spaceId: raw.sys.id, query: createRequestConfig({ query }).params },
      }).then((data) => wrapRoleCollection(makeRequest, data))
    },

    /**
     * Creates a Role
     * @param data - Object representation of the Role to be created
     * @return  Promise for the newly created Role
     * @example ```javascript
     * const contentful = require('contentful-management')
     *
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     * client.getSpace('<space_id>')
     * .then((space) => space.createRole({
     *   name: 'My Role',
     *   description: 'foobar role',
     *   permissions: {
     *     ContentDelivery: 'all',
     *     ContentModel: ['read'],
     *     Settings: []
     *   },
     *   policies: [
     *     {
     *       effect: 'allow',
     *       actions: 'all',
     *       constraint: {
     *         and: [
     *           {
     *             equals: [
     *               { doc: 'sys.type' },
     *               'Entry'
     *             ]
     *           },
     *           {
     *             equals: [
     *               { doc: 'sys.type' },
     *               'Asset'
     *             ]
     *           }
     *         ]
     *       }
     *     }
     *   ]
     * }))
     * .then((role) => console.log(role))
     * .catch(console.error)
     * ```
     */
    createRole(data: CreateRoleProps) {
      const raw = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'Role',
        action: 'create',
        params: { spaceId: raw.sys.id },
        payload: data,
      }).then((data) => wrapRole(makeRequest, data))
    },
    /**
     * Creates a Role with a custom ID
     * @param id - Role ID
     * @param data - Object representation of the Role to be created
     * @return Promise for the newly created Role
     * @example ```javascript
     * const contentful = require('contentful-management')
     *
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     * client.getSpace('<space_id>')
     * .then((space) => space.createRoleWithId('<role-id>', {
     *   name: 'My Role',
     *   description: 'foobar role',
     *   permissions: {
     *     ContentDelivery: 'all',
     *     ContentModel: ['read'],
     *     Settings: []
     *   },
     *   policies: [
     *     {
     *       effect: 'allow',
     *       actions: 'all',
     *       constraint: {
     *         and: [
     *           {
     *             equals: [
     *               { doc: 'sys.type' },
     *               'Entry'
     *             ]
     *           },
     *           {
     *             equals: [
     *               { doc: 'sys.type' },
     *               'Asset'
     *             ]
     *           }
     *         ]
     *       }
     *     }
     *   ]
     * }))
     * .then((role) => console.log(role))
     * .catch(console.error)
     * ```
     */
    createRoleWithId(id: string, roleData: Omit<RoleProps, 'sys'>) {
      const raw = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'Role',
        action: 'createWithId',
        params: { spaceId: raw.sys.id, roleId: id },
        payload: roleData,
      }).then((data) => wrapRole(makeRequest, data))
    },
    /**
     * Gets a User
     * @param userId - User ID
     * @return Promise for a User
     * @example ```javascript
     * const contentful = require('contentful-management')
     *
     * client.getSpace('<space_id>')
     * .then((space) => space.getSpaceUser('id'))
     * .then((user) => console.log(user))
     * .catch(console.error)
     * ```
     */
    getSpaceUser(userId: string) {
      const raw = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'User',
        action: 'getForSpace',
        params: {
          spaceId: raw.sys.id,
          userId,
        },
      }).then((data) => wrapUser(makeRequest, data))
    },
    /**
     * Gets a collection of Users in a space
     * @param query - Object with search parameters. Check the JS SDK tutorial and the REST API reference for more details.
     * @return Promise a collection of Users in a space
     * @example ```javascript
     * const contentful = require('contentful-management')
     *
     * client.getSpace('<space_id>')
     * .then((space) => space.getSpaceUsers(query))
     * .then((data) => console.log(data))
     * .catch(console.error)
     * ```
     */
    getSpaceUsers(query: QueryOptions = {}) {
      const raw = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'User',
        action: 'getManyForSpace',
        params: {
          spaceId: raw.sys.id,
          query: createRequestConfig({ query }).params,
        },
      }).then((data) => wrapUserCollection(makeRequest, data))
    },

    /**
     * Gets a collection of teams for a space
     * @param query
     * @return Promise for a collection of teams for a space
     * @example ```javascript
     * const contentful = require('contentful-management')
     *
     * client.getSpace('<space_id>')
     * .then((space) => space.getTeams())
     * .then((teamsCollection) => console.log(teamsCollection))
     * .catch(console.error)
     * ```
     */
    getTeams(query: QueryOptions = { limit: 100 }) {
      const raw = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'Team',
        action: 'getManyForSpace',
        params: {
          spaceId: raw.sys.id,
          query: createRequestConfig({ query }).params,
        },
      }).then((data) => wrapTeamCollection(makeRequest, data))
    },
    /**
     * Gets a Space Member
     * @param id Get Space Member by user_id
     * @return Promise for a Space Member
     * @example ```javascript
     * const contentful = require('contentful-management')
     *
     * client.getSpace('<space_id>')
     * .then((space) => space.getSpaceMember(id))
     * .then((spaceMember) => console.log(spaceMember))
     * .catch(console.error)
     * ```
     */
    getSpaceMember(id: string) {
      const raw = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'SpaceMember',
        action: 'get',
        params: { spaceId: raw.sys.id, spaceMemberId: id },
      }).then((data) => wrapSpaceMember(makeRequest, data))
    },
    /**
     * Gets a collection of Space Members
     * @param query
     * @return Promise for a collection of Space Members
     * @example ```javascript
     * const contentful = require('contentful-management')
     *
     * client.getSpace('<space_id>')
     * .then((space) => space.getSpaceMembers({'limit': 100}))
     * .then((spaceMemberCollection) => console.log(spaceMemberCollection))
     * .catch(console.error)
     * ```
     */
    getSpaceMembers(query: QueryOptions = {}) {
      const raw = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'SpaceMember',
        action: 'getMany',
        params: {
          spaceId: raw.sys.id,
          query: createRequestConfig({ query }).params,
        },
      }).then((data) => wrapSpaceMemberCollection(makeRequest, data))
    },
    /**
     * Gets a Space Membership
     * Warning: the user attribute in the space membership root is deprecated. The attribute has been moved inside the sys  object (i.e. sys.user).
     * @param id - Space Membership ID
     * @return Promise for a Space Membership
     * @example ```javascript
     * const contentful = require('contentful-management')
     *
     * client.getSpace('<space_id>')
     * .then((space) => space.getSpaceMembership('id'))
     * .then((spaceMembership) => console.log(spaceMembership))
     * .catch(console.error)
     * ```
     */
    getSpaceMembership(id: string) {
      const raw = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'SpaceMembership',
        action: 'get',
        params: { spaceId: raw.sys.id, spaceMembershipId: id },
      }).then((data) => wrapSpaceMembership(makeRequest, data))
    },
    /**
     * Gets a collection of Space Memberships
     * Warning: the user attribute in the space membership root is deprecated. The attribute has been moved inside the sys  object (i.e. sys.user).
     * @param query - Object with search parameters. Check the JS SDK tutorial and the REST API reference for more details.
     * @return Promise for a collection of Space Memberships
     * @example ```javascript
     * const contentful = require('contentful-management')
     *
     * client.getSpace('<space_id>')
     * .then((space) => space.getSpaceMemberships({'limit': 100})) // you can add more queries as 'key': 'value'
     * .then((response) => console.log(response.items))
     * .catch(console.error)
     * ```
     */
    getSpaceMemberships(query: QueryOptions = {}) {
      const raw = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'SpaceMembership',
        action: 'getMany',
        params: {
          spaceId: raw.sys.id,
          query: createRequestConfig({ query }).params,
        },
      }).then((data) => wrapSpaceMembershipCollection(makeRequest, data))
    },

    /**
     * Creates a Space Membership
     * Warning: the user attribute in the space membership root is deprecated. The attribute has been moved inside the sys  object (i.e. sys.user).
     * @param  data - Object representation of the Space Membership to be created
     * @return Promise for the newly created Space Membership
     * @example ```javascript
     * const contentful = require('contentful-management')
     *
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     *
     * client.getSpace('<space_id>')
     * .then((space) => space.createSpaceMembership({
     *   admin: false,
     *   roles: [
     *     {
     *       type: 'Link',
     *       linkType: 'Role',
     *       id: '<role_id>'
     *     }
     *   ],
     *   email: 'foo@example.com'
     * }))
     * .then((spaceMembership) => console.log(spaceMembership))
     * .catch(console.error)
     * ```
     */
    createSpaceMembership(data: CreateSpaceMembershipProps) {
      const raw = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'SpaceMembership',
        action: 'create',
        params: {
          spaceId: raw.sys.id,
        },
        payload: data,
      }).then((response) => wrapSpaceMembership(makeRequest, response))
    },
    /**
     * Creates a Space Membership with a custom ID
     * Warning: the user attribute in the space membership root is deprecated. The attribute has been moved inside the sys  object (i.e. sys.user).
     * @param id - Space Membership ID
     * @param data - Object representation of the Space Membership to be created
     * @return Promise for the newly created Space Membership
     * @example ```javascript
     * const contentful = require('contentful-management')
     *
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     *
     * client.getSpace('<space_id>')
     * .then((space) => space.createSpaceMembershipWithId('<space-membership-id>', {
     *   admin: false,
     *   roles: [
     *     {
     *       type: 'Link',
     *       linkType: 'Role',
     *       id: '<role_id>'
     *     }
     *   ],
     *   email: 'foo@example.com'
     * }))
     * .then((spaceMembership) => console.log(spaceMembership))
     * .catch(console.error)
     * ```
     */
    createSpaceMembershipWithId(id: string, data: CreateSpaceMembershipProps) {
      const raw = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'SpaceMembership',
        action: 'createWithId',
        params: {
          spaceId: raw.sys.id,
          spaceMembershipId: id,
        },
        payload: data,
      }).then((response) => wrapSpaceMembership(makeRequest, response))
    },

    /**
     * Gets a Team Space Membership
     * @param id - Team Space Membership ID
     * @return Promise for a Team Space Membership
     * @example ```javascript
     * const contentful = require('contentful-management')
     *
     * client.getSpace('<space_id>')
     * .then((space) => space.getTeamSpaceMembership('team_space_membership_id'))
     * .then((teamSpaceMembership) => console.log(teamSpaceMembership))
     * .catch(console.error)
     * ```
     */
    getTeamSpaceMembership(teamSpaceMembershipId: string) {
      const raw = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'TeamSpaceMembership',
        action: 'get',
        params: {
          spaceId: raw.sys.id,
          teamSpaceMembershipId,
        },
      }).then((data) => wrapTeamSpaceMembership(makeRequest, data))
    },

    /**
     * Gets a collection of Team Space Memberships
     * @param query - Object with search parameters. Check the JS SDK tutorial and the REST API reference for more details.
     * @return Promise for a collection of Team Space Memberships
     * @example ```javascript
     * const contentful = require('contentful-management')
     *
     * client.getSpace('<space_id>')
     * .then((space) => space.getTeamSpaceMemberships())
     * .then((response) => console.log(response.items))
     * .catch(console.error)
     * ```
     */
    getTeamSpaceMemberships(query: QueryOptions = {}) {
      const raw = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'TeamSpaceMembership',
        action: 'getMany',
        params: {
          spaceId: raw.sys.id,
          query: createRequestConfig({ query: query }).params,
        },
      }).then((data) => wrapTeamSpaceMembershipCollection(makeRequest, data))
    },
    /**
   * Creates a Team Space Membership
   * @param id - Team ID
   * @param data - Object representation of the Team Space Membership to be created
   * @return Promise for the newly created Team Space Membership
   * @example ```javascript
   * const contentful = require('contentful-management')
   *
   * const client = contentful.createClient({
   *   accessToken: '<content_management_api_key>'
   * })
   *
   * client.getSpace('<space_id>')
   * .then((space) => space.createTeamSpaceMembership('team_id', {
   *   admin: false,
   *   roles: [
   *    {
          sys: {
   *       type: 'Link',
   *       linkType: 'Role',
   *       id: '<role_id>'
   *      }
   *    }
   *   ],
   * }))
   * .then((teamSpaceMembership) => console.log(teamSpaceMembership))
   * .catch(console.error)
   * ```
   */
    createTeamSpaceMembership(teamId: string, data: CreateTeamSpaceMembershipProps) {
      const raw = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'TeamSpaceMembership',
        action: 'create',
        params: {
          spaceId: raw.sys.id,
          teamId,
        },
        payload: data,
      }).then((response) => wrapTeamSpaceMembership(makeRequest, response))
    },
    /**
     * Gets a Api Key
     * @param id - API Key ID
     * @return  Promise for a Api Key
     * @example ```javascript
     * const contentful = require('contentful-management')
     *
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     *
     * client.getSpace('<space_id>')
     * .then((space) => space.getApiKey('<apikey-id>'))
     * .then((apikey) => console.log(apikey))
     * .catch(console.error)
     * ```
     */
    getApiKey(id: string) {
      const raw = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'ApiKey',
        action: 'get',
        params: {
          spaceId: raw.sys.id,
          apiKeyId: id,
        },
      }).then((data) => wrapApiKey(makeRequest, data))
    },
    /**
     * Gets a collection of Api Keys
     * @return Promise for a collection of Api Keys
     * @example ```javascript
     * const contentful = require('contentful-management')
     *
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     *
     * client.getSpace('<space_id>')
     * .then((space) => space.getApiKeys())
     * .then((response) => console.log(response.items))
     * .catch(console.error)
     * ```
     */
    getApiKeys() {
      const raw = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'ApiKey',
        action: 'getMany',
        params: {
          spaceId: raw.sys.id,
        },
      }).then((data) => wrapApiKeyCollection(makeRequest, data))
    },
    /**
     * Gets a collection of preview Api Keys
     * @return Promise for a collection of Preview Api Keys
     * @example ```javascript
     * const contentful = require('contentful-management')
     *
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     *
     * client.getSpace('<space_id>')
     * .then((space) => space.getPreviewApiKeys())
     * .then((response) => console.log(response.items))
     * .catch(console.error)
     * ```
     */
    getPreviewApiKeys() {
      const raw = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'PreviewApiKey',
        action: 'getMany',
        params: {
          spaceId: raw.sys.id,
        },
      }).then((data) => wrapPreviewApiKeyCollection(makeRequest, data))
    },
    /**
     * Gets a preview Api Key
     * @param id - Preview API Key ID
     * @return  Promise for a Preview Api Key
     * @example ```javascript
     * const contentful = require('contentful-management')
     *
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     *
     * client.getSpace('<space_id>')
     * .then((space) => space.getPreviewApiKey('<preview-apikey-id>'))
     * .then((previewApikey) => console.log(previewApikey))
     * .catch(console.error)
     * ```
     */
    getPreviewApiKey(id: string) {
      const raw = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'PreviewApiKey',
        action: 'get',
        params: {
          spaceId: raw.sys.id,
          previewApiKeyId: id,
        },
      }).then((data) => wrapPreviewApiKey(makeRequest, data))
    },
    /**
     * Creates a Api Key
     * @param payload - Object representation of the Api Key to be created
     * @return Promise for the newly created Api Key
     * @example ```javascript
     * const contentful = require('contentful-management')
     *
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     *
     * client.getSpace('<space_id>')
     * .then((space) => space.createApiKey({
     *   name: 'API Key name',
     *   environments:[
     *    {
     *     sys: {
     *      type: 'Link'
     *      linkType: 'Environment',
     *      id:'<environment_id>'
     *     }
     *    }
     *   ]
     *   }
     * }))
     * .then((apiKey) => console.log(apiKey))
     * .catch(console.error)
     * ```
     */
    createApiKey: function createApiKey(payload: CreateApiKeyProps) {
      const raw = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'ApiKey',
        action: 'create',
        params: { spaceId: raw.sys.id },
        payload,
      }).then((data) => wrapApiKey(makeRequest, data))
    },
    /**
     * Creates a Api Key with a custom ID
     * @param id - Api Key ID
     * @param payload - Object representation of the Api Key to be created
     * @return Promise for the newly created Api Key
     * @example ```javascript
     * const contentful = require('contentful-management')
     *
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     *
     * client.getSpace('<space_id>')
     * .then((space) => space.createApiKeyWithId('<api-key-id>', {
     *   name: 'API Key name'
     *   environments:[
     *    {
     *     sys: {
     *      type: 'Link'
     *      linkType: 'Environment',
     *      id:'<environment_id>'
     *     }
     *    }
     *   ]
     *   }
     * }))
     * .then((apiKey) => console.log(apiKey))
     * .catch(console.error)
     * ```
     */
    createApiKeyWithId(id: string, payload: CreateApiKeyProps) {
      const raw = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'ApiKey',
        action: 'createWithId',
        params: { spaceId: raw.sys.id, apiKeyId: id },
        payload,
      }).then((data) => wrapApiKey(makeRequest, data))
    },

    /**
     * Creates an EnvironmentAlias with a custom ID
     * @param environmentAliasId - EnvironmentAlias ID
     * @param data - Object representation of the EnvironmentAlias to be created
     * @return Promise for the newly created EnvironmentAlias
     * @example ```javascript
     * const contentful = require('contentful-management')
     *
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     *
     * client.getSpace('<space_id>')
     * .then((space) => space.createEnvironmentAliasWithId('<environment-alias-id>', {
     *   environment: {
     *     sys: { type: 'Link', linkType: 'Environment', id: 'targetEnvironment' }
     *   }
     * }))
     * .then((environmentAlias) => console.log(environmentAlias))
     * .catch(console.error)
     * ```
     */
    createEnvironmentAliasWithId(environmentAliasId: string, data: CreateEnvironmentAliasProps) {
      const raw = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'EnvironmentAlias',
        action: 'createWithId',
        params: { spaceId: raw.sys.id, environmentAliasId },
        payload: data,
      }).then((response) => wrapEnvironmentAlias(makeRequest, response))
    },

    /**
     * Gets an Environment Alias
     * @param Environment Alias ID
     * @return Promise for an Environment Alias
     * @example ```javascript
     * const contentful = require('contentful-management')
     *
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     *
     * client.getSpace('<space_id>')
     * .then((space) => space.getEnvironmentAlias('<alias-id>'))
     * .then((alias) => console.log(alias))
     * .catch(console.error)
     * ```
     */
    getEnvironmentAlias(environmentAliasId: string) {
      const raw = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'EnvironmentAlias',
        action: 'get',
        params: { spaceId: raw.sys.id, environmentAliasId },
      }).then((data) => wrapEnvironmentAlias(makeRequest, data))
    },
    /**
     * Gets a collection of Environment Aliases
     * @return Promise for a collection of Environment Aliases
     * @example ```javascript
     * const contentful = require('contentful-management')
     *
     * const client = contentful.createClient({
     *   accessToken: '<content_management_api_key>'
     * })
     *
     * client.getSpace('<space_id>')
     * .then((space) => space.getEnvironmentAliases()
     * .then((response) => console.log(response.items))
     * .catch(console.error)
     * ```
     */
    getEnvironmentAliases() {
      const raw = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'EnvironmentAlias',
        action: 'getMany',
        params: {
          spaceId: raw.sys.id,
        },
      }).then((data) => wrapEnvironmentAliasCollection(makeRequest, data))
    },
    /**
     * Query for scheduled actions in space.
     * @param query - Object with search parameters. The enviroment id field is mandatory. Check the REST API reference for more details.
     * @return Promise for the scheduled actions query
     *
     * @example ```javascript
     *  const contentful = require('contentful-management');
     *
     *  const client = contentful.createClient({
     *    accessToken: '<content_management_api_key>'
     *  })
     *
     *  client.getSpace('<space_id>')
     *    .then((space) => space.getScheduledActions({
     *      'environment.sys.id': '<environment_id>',
     *      'sys.status': 'scheduled'
     *    }))
     *    .then((scheduledActionCollection) => console.log(scheduledActionCollection.items))
     *    .catch(console.error)
     * ```
     */
    getScheduledActions(query: ScheduledActionQueryOptions) {
      const raw = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'ScheduledAction',
        action: 'getMany',
        params: { spaceId: raw.sys.id, query },
      }).then((response) => wrapScheduledActionCollection(makeRequest, response))
    },
    /**
     * Get a Scheduled Action in the current space by environment and ID.
     *
     * @throws if the Scheduled Action cannot be found or the user doesn't have permission to read schedules from the entity of the scheduled action itself.
     * @returns Promise with the Scheduled Action
     * @example ```javascript
     *  const contentful = require('contentful-management');
     *
     *  const client = contentful.createClient({
     *    accessToken: '<content_management_api_key>'
     *  })
     *
     *  client.getSpace('<space_id>')
     *    .then((space) => space.getScheduledAction({
     *      scheduledActionId: '<scheduled-action-id>',
     *      environmentId: '<environmentId>'
     *    }))
     *    .then((scheduledAction) => console.log(scheduledAction))
     *    .catch(console.error)
     * ```
     */
    getScheduledAction({
      scheduledActionId,
      environmentId,
    }: {
      scheduledActionId: string
      environmentId: string
    }) {
      const space = this.toPlainObject() as SpaceProps

      return makeRequest({
        entityType: 'ScheduledAction',
        action: 'get',
        params: {
          spaceId: space.sys.id,
          environmentId,
          scheduledActionId,
        },
      }).then((scheduledAction) => wrapScheduledAction(makeRequest, scheduledAction))
    },

    /**
     * Creates a scheduled action
     * @param data - Object representation of the scheduled action to be created
     * @return Promise for the newly created scheduled actions
     * @example ```javascript
     *  const contentful = require('contentful-management');
     *
     *  const client = contentful.createClient({
     *    accessToken: '<content_management_api_key>'
     *  })
     *
     *  client.getSpace('<space_id>')
     *    .then((space) => space.createScheduledAction({
     *      entity: {
     *        sys: {
     *          type: 'Link',
     *          linkType: 'Entry',
     *          id: '<entry_id>'
     *        }
     *      },
     *      environment: {
     *        sys: {
     *          type: 'Link',
     *          linkType: 'Environment',
     *          id: '<environment_id>'
     *        }
     *      },
     *      action: 'publish',
     *      scheduledFor: {
     *        datetime: <ISO_date_string>,
     *        timezone: 'Europe/Berlin'
     *      }
     *    }))
     *    .then((scheduledAction) => console.log(scheduledAction))
     *    .catch(console.error)
     * ```
     */
    createScheduledAction(data: Omit<ScheduledActionProps, 'sys'>) {
      const raw = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'ScheduledAction',
        action: 'create',
        params: { spaceId: raw.sys.id },
        payload: data,
      }).then((response) => wrapScheduledAction(makeRequest, response))
    },
    /**
     * Update a scheduled action
     * @param {object} options
     * @param options.scheduledActionId the id of the scheduled action to update
     * @param options.version the sys.version of the scheduled action to be updated
     * @param payload the scheduled actions object with updates, omitting sys object
     * @returns Promise containing a wrapped scheduled action with helper methods
     * @example ```javascript
     *  const contentful = require('contentful-management');
     *
     *  const client = contentful.createClient({
     *    accessToken: '<content_management_api_key>'
     *  })
     *
     *  client.getSpace('<space_id>')
     *    .then((space) => {
     *      return space.createScheduledAction({
     *        entity: {
     *          sys: {
     *            type: 'Link',
     *            linkType: 'Entry',
     *            id: '<entry_id>'
     *          }
     *        },
     *        environment: {
     *          sys: {
     *            type: 'Link',
     *            linkType: 'Environment',
     *            id: '<environment_id>'
     *          }
     *        },
     *        action: 'publish',
     *        scheduledFor: {
     *          datetime: <ISO_date_string>,
     *          timezone: 'Europe/Berlin'
     *        }
     *      })
     *      .then((scheduledAction) => {
     *        const { _sys, ...payload } = scheduledAction;
     *        return space.updateScheduledAction({
     *          ...payload,
     *          scheduledFor: {
     *            ...payload.scheduledFor,
     *            timezone: 'Europe/Paris'
     *          }
     *        })
     *      })
     *    .then((scheduledAction) => console.log(scheduledAction))
     *    .catch(console.error);
     * ```
     */
    updateScheduledAction({
      scheduledActionId,
      payload,
      version,
    }: {
      scheduledActionId: string
      payload: Omit<ScheduledActionProps, 'sys'>
      version: number
    }) {
      const spaceProps = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'ScheduledAction',
        action: 'update',
        params: {
          spaceId: spaceProps.sys.id,
          version,
          scheduledActionId,
        },
        payload,
      }).then((response) => wrapScheduledAction(makeRequest, response))
    },
    /**
     * Cancels a Scheduled Action.
     * Only cancels actions that have not yet executed.
     *
     * @param {object} options
     * @param options.scheduledActionId the id of the scheduled action to be canceled
     * @param options.environmentId the environment ID of the scheduled action to be canceled
     * @throws if the Scheduled Action cannot be found or the user doesn't have permissions in the entity in the action.
     * @returns Promise containing a wrapped Scheduled Action with helper methods
     * @example ```javascript
     *  const contentful = require('contentful-management');
     *
     *  const client = contentful.createClient({
     *    accessToken: '<content_management_api_key>'
     *  })
     *
     *  // Given that an Scheduled Action is scheduled
     *  client.getSpace('<space_id>')
     *    .then((space) => space.deleteScheduledAction({
     *        environmentId: '<environment-id>',
     *        scheduledActionId: '<scheduled-action-id>'
     *     }))
     *     // The scheduled Action sys.status is now 'canceled'
     *    .then((scheduledAction) => console.log(scheduledAction))
     *    .catch(console.error);
     * ```
     */
    deleteScheduledAction({
      scheduledActionId,
      environmentId,
    }: {
      scheduledActionId: string
      environmentId: string
    }) {
      const spaceProps = this.toPlainObject() as SpaceProps
      return makeRequest({
        entityType: 'ScheduledAction',
        action: 'delete',
        params: {
          spaceId: spaceProps.sys.id,
          environmentId,
          scheduledActionId,
        },
      }).then((response) => wrapScheduledAction(makeRequest, response))
    },
  }
}