contentful-management 11.55.0 → 11.57.0

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.
@@ -55,6 +55,8 @@
55
55
 
56
56
  /** Base interface for all Payload interfaces. Used as part of the MakeRequestOptions to simplify payload definitions. */
57
57
 
58
+ // Retry options used by createWithResponse and createWithResult. Kept separate for clarity.
59
+
58
60
  // New route params for fetching structured call or raw response
59
61
 
60
62
  export let ScheduledActionReferenceFilters = /*#__PURE__*/function (ScheduledActionReferenceFilters) {
@@ -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.55.0"}`, params.application, params.integration, params.feature);
50
+ `${sdkMain}/${"11.57.0"}`, params.application, params.integration, params.feature);
51
51
  const adapter = createAdapter(_objectSpread(_objectSpread({}, params), {}, {
52
52
  userAgent
53
53
  }));
@@ -800,12 +800,12 @@ export type MRActions = {
800
800
  return: AppActionCallResponse;
801
801
  };
802
802
  createWithResponse: {
803
- params: GetAppActionCallParams;
803
+ params: CreateWithResponseParams;
804
804
  payload: CreateAppActionCallProps;
805
805
  return: AppActionCallResponse;
806
806
  };
807
807
  createWithResult: {
808
- params: CreateWithResponseParams;
808
+ params: CreateWithResultParams;
809
809
  payload: CreateAppActionCallProps;
810
810
  return: AppActionCallProps;
811
811
  };
@@ -2508,10 +2508,12 @@ export type GetAppActionsForEnvParams = GetSpaceParams & {
2508
2508
  export type GetAppActionCallParams = GetAppInstallationParams & {
2509
2509
  appActionId: string;
2510
2510
  };
2511
- export type CreateWithResponseParams = GetAppActionCallParams & {
2511
+ export type AppActionCallRetryOptions = {
2512
2512
  retries?: number;
2513
2513
  retryInterval?: number;
2514
2514
  };
2515
+ export type CreateWithResponseParams = GetAppActionCallParams & AppActionCallRetryOptions;
2516
+ export type CreateWithResultParams = GetAppActionCallParams & AppActionCallRetryOptions;
2515
2517
  export type GetAppActionCallDetailsParams = GetSpaceEnvironmentParams & {
2516
2518
  appActionId: string;
2517
2519
  callId: string;
@@ -679,6 +679,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest): {
679
679
  };
680
680
  name: string;
681
681
  description?: string;
682
+ parametersSchema?: Record<string, unknown>;
683
+ resultSchema?: Record<string, unknown>;
682
684
  } & Record<string, unknown> & {
683
685
  type: "function";
684
686
  } & import("./common-types").DefaultElements<import("./entities/app-action").AppActionProps> & {
@@ -699,6 +701,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest): {
699
701
  };
700
702
  name: string;
701
703
  description?: string;
704
+ parametersSchema?: Record<string, unknown>;
705
+ resultSchema?: Record<string, unknown>;
702
706
  } & {
703
707
  type: "endpoint";
704
708
  url: string;
@@ -720,6 +724,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest): {
720
724
  };
721
725
  name: string;
722
726
  description?: string;
727
+ parametersSchema?: Record<string, unknown>;
728
+ resultSchema?: Record<string, unknown>;
723
729
  } & {
724
730
  type: "function-invocation";
725
731
  function: import("./common-types").Link<"Function">;
@@ -742,6 +748,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest): {
742
748
  };
743
749
  name: string;
744
750
  description?: string;
751
+ parametersSchema?: Record<string, unknown>;
752
+ resultSchema?: Record<string, unknown>;
745
753
  } & Record<string, unknown> & {
746
754
  type: "function";
747
755
  } & import("./common-types").DefaultElements<import("./entities/app-action").AppActionProps> & {
@@ -763,6 +771,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest): {
763
771
  };
764
772
  name: string;
765
773
  description?: string;
774
+ parametersSchema?: Record<string, unknown>;
775
+ resultSchema?: Record<string, unknown>;
766
776
  } & {
767
777
  type: "endpoint";
768
778
  url: string;
@@ -785,6 +795,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest): {
785
795
  };
786
796
  name: string;
787
797
  description?: string;
798
+ parametersSchema?: Record<string, unknown>;
799
+ resultSchema?: Record<string, unknown>;
788
800
  } & {
789
801
  type: "function-invocation";
790
802
  function: import("./common-types").Link<"Function">;
@@ -826,6 +838,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest): {
826
838
  };
827
839
  name: string;
828
840
  description?: string;
841
+ parametersSchema?: Record<string, unknown>;
842
+ resultSchema?: Record<string, unknown>;
829
843
  } & Record<string, unknown> & {
830
844
  type: "function";
831
845
  } & import("./common-types").DefaultElements<import("./entities/app-action").AppActionProps> & {
@@ -846,6 +860,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest): {
846
860
  };
847
861
  name: string;
848
862
  description?: string;
863
+ parametersSchema?: Record<string, unknown>;
864
+ resultSchema?: Record<string, unknown>;
849
865
  } & {
850
866
  type: "endpoint";
851
867
  url: string;
@@ -867,6 +883,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest): {
867
883
  };
868
884
  name: string;
869
885
  description?: string;
886
+ parametersSchema?: Record<string, unknown>;
887
+ resultSchema?: Record<string, unknown>;
870
888
  } & {
871
889
  type: "function-invocation";
872
890
  function: import("./common-types").Link<"Function">;
@@ -889,6 +907,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest): {
889
907
  };
890
908
  name: string;
891
909
  description?: string;
910
+ parametersSchema?: Record<string, unknown>;
911
+ resultSchema?: Record<string, unknown>;
892
912
  } & Record<string, unknown> & {
893
913
  type: "function";
894
914
  } & import("./common-types").DefaultElements<import("./entities/app-action").AppActionProps> & {
@@ -910,6 +930,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest): {
910
930
  };
911
931
  name: string;
912
932
  description?: string;
933
+ parametersSchema?: Record<string, unknown>;
934
+ resultSchema?: Record<string, unknown>;
913
935
  } & {
914
936
  type: "endpoint";
915
937
  url: string;
@@ -932,6 +954,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest): {
932
954
  };
933
955
  name: string;
934
956
  description?: string;
957
+ parametersSchema?: Record<string, unknown>;
958
+ resultSchema?: Record<string, unknown>;
935
959
  } & {
936
960
  type: "function-invocation";
937
961
  function: import("./common-types").Link<"Function">;
@@ -985,6 +1009,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest): {
985
1009
  };
986
1010
  name: string;
987
1011
  description?: string;
1012
+ parametersSchema?: Record<string, unknown>;
1013
+ resultSchema?: Record<string, unknown>;
988
1014
  } & Record<string, unknown> & {
989
1015
  type: "function";
990
1016
  } & import("./common-types").DefaultElements<import("./entities/app-action").AppActionProps> & {
@@ -1005,6 +1031,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest): {
1005
1031
  };
1006
1032
  name: string;
1007
1033
  description?: string;
1034
+ parametersSchema?: Record<string, unknown>;
1035
+ resultSchema?: Record<string, unknown>;
1008
1036
  } & {
1009
1037
  type: "endpoint";
1010
1038
  url: string;
@@ -1026,6 +1054,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest): {
1026
1054
  };
1027
1055
  name: string;
1028
1056
  description?: string;
1057
+ parametersSchema?: Record<string, unknown>;
1058
+ resultSchema?: Record<string, unknown>;
1029
1059
  } & {
1030
1060
  type: "function-invocation";
1031
1061
  function: import("./common-types").Link<"Function">;
@@ -1048,6 +1078,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest): {
1048
1078
  };
1049
1079
  name: string;
1050
1080
  description?: string;
1081
+ parametersSchema?: Record<string, unknown>;
1082
+ resultSchema?: Record<string, unknown>;
1051
1083
  } & Record<string, unknown> & {
1052
1084
  type: "function";
1053
1085
  } & import("./common-types").DefaultElements<import("./entities/app-action").AppActionProps> & {
@@ -1069,6 +1101,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest): {
1069
1101
  };
1070
1102
  name: string;
1071
1103
  description?: string;
1104
+ parametersSchema?: Record<string, unknown>;
1105
+ resultSchema?: Record<string, unknown>;
1072
1106
  } & {
1073
1107
  type: "endpoint";
1074
1108
  url: string;
@@ -1091,6 +1125,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest): {
1091
1125
  };
1092
1126
  name: string;
1093
1127
  description?: string;
1128
+ parametersSchema?: Record<string, unknown>;
1129
+ resultSchema?: Record<string, unknown>;
1094
1130
  } & {
1095
1131
  type: "function-invocation";
1096
1132
  function: import("./common-types").Link<"Function">;
@@ -1,5 +1,5 @@
1
1
  import type { Except } from 'type-fest';
2
- import type { BasicMetaSysProps, CreateWithResponseParams, DefaultElements, MakeRequest, SysLink } from '../common-types';
2
+ import type { BasicMetaSysProps, AppActionCallRetryOptions, DefaultElements, MakeRequest, SysLink } from '../common-types';
3
3
  import type { WebhookCallDetailsProps } from './webhook';
4
4
  type AppActionCallSys = Except<BasicMetaSysProps, 'version'> & {
5
5
  appDefinition: SysLink;
@@ -8,7 +8,7 @@ type AppActionCallSys = Except<BasicMetaSysProps, 'version'> & {
8
8
  action: SysLink;
9
9
  appActionCallResponse?: SysLink;
10
10
  };
11
- type RetryOptions = Pick<CreateWithResponseParams, 'retries' | 'retryInterval'>;
11
+ type RetryOptions = AppActionCallRetryOptions;
12
12
  export type AppActionCallStatus = 'processing' | 'succeeded' | 'failed';
13
13
  export interface AppActionCallErrorProps {
14
14
  sys: {
@@ -48,6 +48,14 @@ type BaseAppActionProps = AppActionCategory & {
48
48
  * Human readable description of the action
49
49
  */
50
50
  description?: string;
51
+ /**
52
+ * Optional JSON Schema describing the request payload shape
53
+ */
54
+ parametersSchema?: Record<string, unknown>;
55
+ /**
56
+ * Optional JSON Schema describing the result shape
57
+ */
58
+ resultSchema?: Record<string, unknown>;
51
59
  };
52
60
  type CreateEndpointAppActionProps = {
53
61
  /**
@@ -106,6 +114,14 @@ type LegacyFunctionAppActionProps = Record<string, unknown> & {
106
114
  export type CreateAppActionProps = AppActionCategory & {
107
115
  name: string;
108
116
  description?: string;
117
+ /**
118
+ * Optional JSON Schema describing the request payload shape
119
+ */
120
+ parametersSchema?: Record<string, unknown>;
121
+ /**
122
+ * Optional JSON Schema describing the result shape
123
+ */
124
+ resultSchema?: Record<string, unknown>;
109
125
  } & (CreateEndpointAppActionProps | CreateFunctionAppActionProps | LegacyFunctionAppActionProps);
110
126
  export type AppActionProps = BaseAppActionProps & (EndpointAppActionProps | FunctionAppActionProps | LegacyFunctionAppActionProps);
111
127
  export type AppAction = AppActionProps & DefaultElements<AppActionProps> & {
@@ -7,7 +7,7 @@ export type UIConfigProps = {
7
7
  assetListViews: ViewFolder[];
8
8
  entryListViews: ViewFolder[];
9
9
  homeViews: HomeView[];
10
- previewMode?: {
10
+ livePreview?: {
11
11
  previewMode: 'livePreview' | 'legacyPreview';
12
12
  };
13
13
  publish?: {
@@ -1,4 +1,4 @@
1
- import type { GetAppActionCallDetailsParams, GetAppActionCallParams, GetAppActionCallParamsWithId } from '../../common-types';
1
+ import type { GetAppActionCallDetailsParams, GetAppActionCallParams, GetAppActionCallParamsWithId, CreateWithResponseParams, CreateWithResultParams } from '../../common-types';
2
2
  import type { AppActionCallProps, AppActionCallResponse, AppActionCallRawResponseProps, CreateAppActionCallProps } from '../../entities/app-action-call';
3
3
  import type { OptionalDefaults } from '../wrappers/wrap';
4
4
  export type AppActionCallPlainClientAPI = {
@@ -61,7 +61,7 @@ export type AppActionCallPlainClientAPI = {
61
61
  * );
62
62
  * ```
63
63
  */
64
- createWithResponse(params: OptionalDefaults<GetAppActionCallParams>, payload: CreateAppActionCallProps): Promise<AppActionCallResponse>;
64
+ createWithResponse(params: OptionalDefaults<CreateWithResponseParams>, payload: CreateAppActionCallProps): Promise<AppActionCallResponse>;
65
65
  /**
66
66
  * Fetches a structured App Action Call by id.
67
67
  *
@@ -121,7 +121,7 @@ export type AppActionCallPlainClientAPI = {
121
121
  * }
122
122
  * ```
123
123
  */
124
- createWithResult(params: OptionalDefaults<GetAppActionCallParams>, payload: CreateAppActionCallProps): Promise<AppActionCallProps>;
124
+ createWithResult(params: OptionalDefaults<CreateWithResultParams>, payload: CreateAppActionCallProps): Promise<AppActionCallProps>;
125
125
  /**
126
126
  * Fetches the raw response (headers/body) for a completed App Action Call.
127
127
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentful-management",
3
- "version": "11.55.0",
3
+ "version": "11.57.0",
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",