contentful-management 11.57.2 → 11.57.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -47,7 +47,7 @@ function createClient(params, opts = {}) {
47
47
  const sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
48
48
  const userAgent = getUserAgentHeader(
49
49
  // @ts-expect-error
50
- `${sdkMain}/${"11.57.2"}`, params.application, params.integration, params.feature);
50
+ `${sdkMain}/${"11.57.3"}`, params.application, params.integration, params.feature);
51
51
  const adapter = createAdapter(_objectSpread(_objectSpread({}, params), {}, {
52
52
  userAgent
53
53
  }));
@@ -6,74 +6,38 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
6
6
  import copy from 'fast-copy';
7
7
  import { toPlainObject } from 'contentful-sdk-core';
8
8
  import enhanceWithMethods from '../enhance-with-methods';
9
-
10
- // Raw App Action call response (new endpoint). Not yet wired to runtime behavior.
11
-
12
9
  /**
13
10
  * @private
14
11
  */
15
12
  export default function createAppActionCallApi(makeRequest, retryOptions) {
16
13
  return {
17
- createWithResponse: function () {
18
- const payload = {
19
- parameters: {
20
- recipient: 'Alice <alice@my-company.com>',
21
- message_body: 'Hello from Bob!'
22
- }
23
- };
14
+ createWithResponse: function (params, payload) {
24
15
  return makeRequest({
25
16
  entityType: 'AppActionCall',
26
17
  action: 'createWithResponse',
27
- params: _objectSpread({
28
- spaceId: 'space-id',
29
- environmentId: 'environment-id',
30
- appDefinitionId: 'app-definiton-id',
31
- appActionId: 'app-action-id'
32
- }, retryOptions),
18
+ params: _objectSpread(_objectSpread({}, params), retryOptions),
33
19
  payload: payload
34
20
  }).then(data => wrapAppActionCallResponse(makeRequest, data));
35
21
  },
36
- getCallDetails: function getCallDetails() {
22
+ getCallDetails: function getCallDetails(params) {
37
23
  return makeRequest({
38
24
  entityType: 'AppActionCall',
39
25
  action: 'getCallDetails',
40
- params: {
41
- spaceId: 'space-id',
42
- environmentId: 'environment-id',
43
- callId: 'call-id',
44
- appActionId: 'app-action-id'
45
- }
26
+ params
46
27
  }).then(data => wrapAppActionCallResponse(makeRequest, data));
47
28
  },
48
- get: function get() {
29
+ get: function get(params) {
49
30
  return makeRequest({
50
31
  entityType: 'AppActionCall',
51
32
  action: 'get',
52
- params: {
53
- spaceId: 'space-id',
54
- environmentId: 'environment-id',
55
- appDefinitionId: 'app-definiton-id',
56
- appActionId: 'app-action-id',
57
- callId: 'call-id'
58
- }
33
+ params
59
34
  }).then(data => wrapAppActionCall(makeRequest, data));
60
35
  },
61
- createWithResult: function () {
62
- const payload = {
63
- parameters: {
64
- recipient: 'Alice <alice@my-company.com>',
65
- message_body: 'Hello from Bob!'
66
- }
67
- };
36
+ createWithResult: function (params, payload) {
68
37
  return makeRequest({
69
38
  entityType: 'AppActionCall',
70
39
  action: 'createWithResult',
71
- params: _objectSpread({
72
- spaceId: 'space-id',
73
- environmentId: 'environment-id',
74
- appDefinitionId: 'app-definiton-id',
75
- appActionId: 'app-action-id'
76
- }, retryOptions),
40
+ params: _objectSpread(_objectSpread({}, params), retryOptions),
77
41
  payload: payload
78
42
  }).then(data => wrapAppActionCall(makeRequest, data));
79
43
  }
@@ -1,5 +1,5 @@
1
1
  import type { Except } from 'type-fest';
2
- import type { BasicMetaSysProps, AppActionCallRetryOptions, DefaultElements, MakeRequest, SysLink } from '../common-types';
2
+ import type { BasicMetaSysProps, AppActionCallRetryOptions, DefaultElements, MakeRequest, SysLink, CreateWithResponseParams, CreateWithResultParams, GetAppActionCallDetailsParams, GetAppActionCallParamsWithId } from '../common-types';
3
3
  import type { WebhookCallDetailsProps } from './webhook';
4
4
  type AppActionCallSys = Except<BasicMetaSysProps, 'version'> & {
5
5
  appDefinition: SysLink;
@@ -38,10 +38,10 @@ export type CreateAppActionCallProps = {
38
38
  };
39
39
  };
40
40
  type AppActionCallApi = {
41
- createWithResponse(): Promise<AppActionCallResponse>;
42
- getCallDetails(): Promise<AppActionCallResponse>;
43
- get(): Promise<AppActionCallProps>;
44
- createWithResult(): Promise<AppActionCallProps>;
41
+ createWithResponse(params: CreateWithResponseParams, payload: CreateAppActionCallProps): Promise<AppActionCallResponse>;
42
+ getCallDetails(params: GetAppActionCallDetailsParams): Promise<AppActionCallResponse>;
43
+ get(params: GetAppActionCallParamsWithId): Promise<AppActionCallProps>;
44
+ createWithResult(params: CreateWithResultParams, payload: CreateAppActionCallProps): Promise<AppActionCallProps>;
45
45
  };
46
46
  export type AppActionCallResponse = WebhookCallDetailsProps;
47
47
  export interface AppActionCallRawResponseProps {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentful-management",
3
- "version": "11.57.2",
3
+ "version": "11.57.3",
4
4
  "description": "Client for Contentful's Content Management API",
5
5
  "homepage": "https://www.contentful.com/developers/documentation/content-management-api/",
6
6
  "main": "./dist/contentful-management.node.js",