contentful-management 12.6.0-dev.2 → 12.6.0-dev.4

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.
Files changed (66) hide show
  1. package/dist/browser/index.js +2257 -1316
  2. package/dist/browser/index.js.map +1 -1
  3. package/dist/browser/index.min.js +1 -1
  4. package/dist/browser/index.min.js.map +1 -1
  5. package/dist/cjs/index.cjs +145 -72
  6. package/dist/cjs/index.cjs.map +1 -1
  7. package/dist/esm/adapters/REST/endpoints/asset.mjs +12 -1
  8. package/dist/esm/adapters/REST/endpoints/asset.mjs.map +1 -1
  9. package/dist/esm/adapters/REST/endpoints/comment.mjs +10 -2
  10. package/dist/esm/adapters/REST/endpoints/comment.mjs.map +1 -1
  11. package/dist/esm/adapters/REST/endpoints/content-type.mjs +9 -1
  12. package/dist/esm/adapters/REST/endpoints/content-type.mjs.map +1 -1
  13. package/dist/esm/adapters/REST/endpoints/entry.mjs +12 -1
  14. package/dist/esm/adapters/REST/endpoints/entry.mjs.map +1 -1
  15. package/dist/esm/adapters/REST/endpoints/fragment.mjs +2 -2
  16. package/dist/esm/adapters/REST/endpoints/task.mjs +28 -1
  17. package/dist/esm/adapters/REST/endpoints/task.mjs.map +1 -1
  18. package/dist/esm/common-types.mjs.map +1 -1
  19. package/dist/esm/entities/ai-action-invocation.mjs.map +1 -1
  20. package/dist/esm/entities/ai-action.mjs.map +1 -1
  21. package/dist/esm/entities/comment.mjs +10 -6
  22. package/dist/esm/entities/comment.mjs.map +1 -1
  23. package/dist/esm/entities/task.mjs +10 -6
  24. package/dist/esm/entities/task.mjs.map +1 -1
  25. package/dist/esm/plain/plain-client.mjs +1 -1
  26. package/dist/types/adapters/REST/endpoints/asset.d.ts +1 -0
  27. package/dist/types/adapters/REST/endpoints/asset.js +12 -1
  28. package/dist/types/adapters/REST/endpoints/asset.js.map +1 -1
  29. package/dist/types/adapters/REST/endpoints/comment.js +10 -2
  30. package/dist/types/adapters/REST/endpoints/comment.js.map +1 -1
  31. package/dist/types/adapters/REST/endpoints/content-type.d.ts +1 -0
  32. package/dist/types/adapters/REST/endpoints/content-type.js +9 -1
  33. package/dist/types/adapters/REST/endpoints/content-type.js.map +1 -1
  34. package/dist/types/adapters/REST/endpoints/entry.d.ts +1 -0
  35. package/dist/types/adapters/REST/endpoints/entry.js +12 -1
  36. package/dist/types/adapters/REST/endpoints/entry.js.map +1 -1
  37. package/dist/types/adapters/REST/endpoints/fragment.d.ts +1 -1
  38. package/dist/types/adapters/REST/endpoints/fragment.js +2 -2
  39. package/dist/types/adapters/REST/endpoints/task.js +28 -1
  40. package/dist/types/adapters/REST/endpoints/task.js.map +1 -1
  41. package/dist/types/common-types.d.ts +25 -8
  42. package/dist/types/common-types.js.map +1 -1
  43. package/dist/types/constants/editor-interface-defaults/controls-defaults.d.ts +1 -1
  44. package/dist/types/entities/ai-action-invocation.d.ts +37 -18
  45. package/dist/types/entities/ai-action-invocation.js.map +1 -1
  46. package/dist/types/entities/ai-action.d.ts +4 -1
  47. package/dist/types/entities/ai-action.js.map +1 -1
  48. package/dist/types/entities/comment.d.ts +4 -6
  49. package/dist/types/entities/comment.js +10 -6
  50. package/dist/types/entities/comment.js.map +1 -1
  51. package/dist/types/entities/component-type.d.ts +2 -5
  52. package/dist/types/entities/data-assembly.d.ts +15 -13
  53. package/dist/types/entities/experience.d.ts +0 -6
  54. package/dist/types/entities/fragment.d.ts +3 -4
  55. package/dist/types/entities/task.d.ts +5 -3
  56. package/dist/types/entities/task.js +10 -6
  57. package/dist/types/entities/task.js.map +1 -1
  58. package/dist/types/entities/template.d.ts +1 -2
  59. package/dist/types/export-types.d.ts +7 -7
  60. package/dist/types/plain/entities/component-type.d.ts +0 -1
  61. package/dist/types/plain/entities/experience.d.ts +0 -1
  62. package/dist/types/plain/entities/fragment.d.ts +6 -7
  63. package/dist/types/plain/entities/task.d.ts +77 -8
  64. package/dist/types/plain/entities/template.d.ts +0 -1
  65. package/dist/types/plain/plain-client.js +1 -1
  66. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"entry.js","sources":["../../../../../lib/adapters/REST/endpoints/entry.ts"],"sourcesContent":[null],"names":["releaseEntry.get","raw.get","releaseEntry.getMany","releaseEntry.patch","raw.patch","releaseEntry.update","raw.put","raw.del","releaseEntry.create","raw.post","releaseEntry.createWithId"],"mappings":";;;;;AAuBO,MAAM,GAAG,GAAiC,CAC/C,IAAmB,EACnB,MAAyF,EACzF,OAAiB,EACjB,OAAgC,KAC9B;AACF,IAAA,IAAI,MAAM,CAAC,SAAS,EAAE;QACpB,OAAOA,KAAgB,CAAC,IAAI,EAAE,MAA+B,CAAC;IAChE;AAEA,IAAA,OAAOC,KAAO,CACZ,IAAI,EACJ,WAAW,MAAM,CAAC,OAAO,CAAA,cAAA,EAAiB,MAAM,CAAC,aAAa,CAAA,SAAA,EAAY,MAAM,CAAC,OAAO,EAAE,EAC1F;AACE,QAAA,MAAM,EAAE,eAAe,CAAC,MAAM,CAAC,KAAK,CAAC;AACrC,QAAA,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE;AACxB,KAAA,CACF;AACH;AAEO,MAAM,YAAY,GAA0C,CAGjE,IAAmB,EACnB,MAA+C,EAC/C,OAAiB,EACjB,OAAgC,KAC9B;AACF,IAAA,OAAOA,KAAO,CACZ,IAAI,EACJ,CAAA,QAAA,EAAW,MAAM,CAAC,OAAO,CAAA,cAAA,EAAiB,MAAM,CAAC,aAAa,iBAAiB,EAC/E;AACE,QAAA,MAAM,EAAE,eAAe,CAAC,MAAM,CAAC,KAAK,CAAC;AACrC,QAAA,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE;AACxB,KAAA,CACF;AACH;AAEO,MAAM,OAAO,GAAqC,CACvD,IAAmB,EACnB,MAAwE,EACxE,OAAiB,EACjB,OAAgC,KAC9B;AACF,IAAA,IAAI,MAAM,CAAC,SAAS,EAAE;QACpB,OAAOC,SAAoB,CAAC,IAAI,EAAE,MAAmC,CAAC;IACxE;AA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E,QAAA,OAAO,EAAE;YACP,2BAA2B,EAAE,MAAM,CAAC,aAAa;AAClD,SAAA;AACF,KAAA,CACF;AACH;AAEO,MAAM,YAAY,GAA0C,CAGjE,IAAmB,EACnB,MAIC,EACD,OAA4B,KAC1B;AACF,IAAA,IAAI,MAAM,CAAC,SAAS,EAAE;AACpB,QAAA,OAAOC,cAAyB,CAAC,IAAI,EAAE,MAAwC,EAAE,OAAO,EAAE,EAAE,CAAC;IAC/F;AACA,IAAA,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC;IAE1B,OAAOJ,GAAO,CACZ,IAAI,EACJ,CAAA,QAAA,EAAW,MAAM,CAAC,OAAO,iBAAiB,MAAM,CAAC,aAAa,CAAA,SAAA,EAAY,MAAM,CAAC,OAAO,CAAA,CAAE,EAC1F,IAAI,EACJ;AACE,QAAA,OAAO,EAAE;YACP,2BAA2B,EAAE,MAAM,CAAC,aAAa;AAClD,SAAA;AACF,KAAA,CACF;AACH;MAEa,UAAU,GAAwC,CAC7D,IAAmB,EACnB,MAGC,KAC+B;IAChC,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,MAAM;AAE3D,IAAA,MAAM,KAAK,GAAG,OAAO,IAAI,CAAC;AAE1B,IAAA,OAAOL,KAAO,CACZ,IAAI,EACJ,CAAA,QAAA,EAAW,OAAO,CAAA,cAAA,EAAiB,aAAa,YAAY,OAAO,CAAA,oBAAA,EAAuB,KAAK,CAAA,CAAE,CAClG;AACH;;;;"}
1
+ {"version":3,"file":"entry.js","sources":["../../../../../lib/adapters/REST/endpoints/entry.ts"],"sourcesContent":[null],"names":["releaseEntry.get","raw.get","releaseEntry.getMany","raw\n .get","releaseEntry.patch","raw.patch","releaseEntry.update","raw.put","raw.del","releaseEntry.create","raw.post","releaseEntry.createWithId"],"mappings":";;;;;;AA0BO,MAAM,GAAG,GAAiC,CAC/C,IAAmB,EACnB,MAAyF,EACzF,OAAiB,EACjB,OAAg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ment', 'getMany'>;
3
3
  export declare const get: RestEndpoint<'Fragment', 'get'>;
4
4
  export declare const create: RestEndpoint<'Fragment', 'create'>;
5
- export declare const update: RestEndpoint<'Fragment', 'update'>;
5
+ export declare const upsert: RestEndpoint<'Fragment', 'upsert'>;
6
6
  export declare const del: RestEndpoint<'Fragment', 'delete'>;
7
7
  export declare const publish: RestEndpoint<'Fragment', 'publish'>;
8
8
  export declare const unpublish: RestEndpoint<'Fragment', 'unpublish'>;
@@ -15,7 +15,7 @@ const create = (http, params, rawData, headers) => {
15
15
  const data = copy(rawData);
16
16
  return post(http, getBaseUrl(params), data, { headers });
17
17
  };
18
- const update = (http, params, rawData, headers) => {
18
+ const upsert = (http, params, rawData, headers) => {
19
19
  const { sys, ...body } = copy(rawData);
20
20
  return put(http, getBaseUrl(params) + `/${params.fragmentId}`, body, {
21
21
  headers: {
@@ -46,5 +46,5 @@ const unpublish = (http, params, headers) => {
46
46
  });
47
47
  };
48
48
 
49
- export { create, del, get, getMany, publish, unpublish, update };
49
+ export { create, del, get, getMany, publish, unpublish, upsert };
50
50
  //# sourceMappingURL=fragment.js.map
@@ -2,7 +2,34 @@ import copy from 'fast-copy';
2
2
  import { post, del as del$1, get as get$1, put } from './raw.js';
3
3
  import { normalizeSelect } from './utils.js';
4
4
 
5
- const getBaseUrl = (params) => `/spaces/${params.spaceId}/environments/${params.environmentId}/entries/${params.entryId}/tasks`;
5
+ const getSpaceEnvBaseUrl = (params) => `/spaces/${params.spaceId}/environments/${params.environmentId}`;
6
+ function getParentPlural(parentEntityType) {
7
+ switch (parentEntityType) {
8
+ case 'Entry':
9
+ return 'entries';
10
+ case 'Experience':
11
+ return 'experiences';
12
+ case 'Fragment':
13
+ return 'fragments';
14
+ case 'Template':
15
+ return 'templates';
16
+ case 'ComponentType':
17
+ return 'component_types';
18
+ }
19
+ }
20
+ const normalizeTaskParentParams = (paramsOrg) => 'entryId' in paramsOrg
21
+ ? {
22
+ spaceId: paramsOrg.spaceId,
23
+ environmentId: paramsOrg.environmentId,
24
+ parentEntityType: 'Entry',
25
+ parentEntityId: paramsOrg.entryId,
26
+ }
27
+ : paramsOrg;
28
+ const getBaseUrl = (paramsOrg) => {
29
+ const params = normalizeTaskParentParams(paramsOrg);
30
+ const parentPlural = getParentPlural(params.parentEntityType);
31
+ return `${getSpaceEnvBaseUrl(params)}/${parentPlural}/${params.parentEntityId}/tasks`;
32
+ };
6
33
  const getTaskUrl = (params) => `${getBaseUrl(params)}/${params.taskId}`;
7
34
  const get = (http, params) => get$1(http, getTaskUrl(params));
8
35
  const getMany = (http, params) => get$1(http, getBaseUrl(params), {
@@ -1 +1 @@
1
- {"version":3,"file":"task.js","sources":["../../../../../lib/adapters/REST/endpoints/task.ts"],"sourcesContent":[null],"names":["raw.get","raw.post","raw.put","raw.del"],"mappings":";;;;AAqBA,MAAM,UAAU,GAAG,CAAC,MAAsB,KACxC,WAAW,MAAM,CAAC,OAAO,CAAA,cAAA,EAAiB,MAAM,CAAC,aAAa,CAAA,SAAA,EAAY,MAAM,CAAC,OAAO,QAAQ;AAClG,MAAM,UAAU,GAAG,CAAC,MAAqB,KAAK,CAAA,EAAG,UAAU,CAAC,MAAM,CAAC,CAAA,CAAA,EAAI,MAAM,CAAC,MAAM,EAAE;MAEzE,GAAG,GAAgC,CAAC,IAAmB,EAAE,MAAqB,KACzFA,KAAO,CAAY,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC;MAEhC,OAAO,GAAoC,CACtD,IAAmB,EACnB,MAA6D,KAE7DA,KAAO,CAA4B,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,EAAE;AAC3D,IAAA,MAAM,EAAE,eAAe,CAAC,MAAM,CAAC,KAAK,CAAC;AACtC,CAAA;AAEH;;AAEG;AACI,MAAM,MAAM,GAAmC;AAE/C,MAAM,MAAM,GAAmC,CACpD,IAAmB,EACnB,MAAwB,EACxB,OAAwB,KACtB;AACF,IAAA,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC;AAC1B,IAAA,OAAOC,IAAQ,CAAY,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC;AAC5D;AAEO,MAAM,MAAM,GAAmC,CACpD,IAAmB,EACnB,MAAqB,EACrB,OAAwB,EACxB,OAAgC,KAC9B;AACF,IAAA,MAAM,IAAI,GAAuC,IAAI,CAAC,OAAO,CAAC;IAC9D,OAAO,IAAI,CAAC,GAAG;AAEf,IAAA,OAAOC,GAAO,CAAY,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE;AACxD,QAAA,OAAO,EAAE;AACP,YAAA,sBAAsB,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,CAAC;AAChD,YAAA,GAAG,OAAO;AACX,SAAA;AACF,KAAA,CAAC;AACJ;AAEO,MAAM,GAAG,GAAmC,CACjD,IAAmB,EACnB,EAAE,OAAO,EAAE,GAAG,MAAM,EAAoB,KACtC;IACF,OAAOC,KAAO,CAAC,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE,sBAAsB,EAAE,OAAO,EAAE,EAAE,CAAC;AAC5F;;;;"}
1
+ {"version":3,"file":"task.js","sources":["../../../../../lib/adapters/REST/endpoints/task.ts"],"sourcesContent":[null],"names":["raw.get","raw.post","raw.put","raw.del"],"mappings":";;;;AAyBA,MAAM,kBAAkB,GAAG,CAAC,MAAiC,KAC3D,CAAA,QAAA,EAAW,MAAM,CAAC,OAAO,CAAA,cAAA,EAAiB,MAAM,CAAC,aAAa,EAAE;AAElE,SAAS,eAAe,CAAC,gBAAsC,EAAA;IAC7D,QAAQ,gBAAgB;AACtB,QAAA,KAAK,OAAO;AACV,YAAA,OAAO,SAAS;AAClB,QAAA,KAAK,YAAY;AACf,YAAA,OAAO,aAAa;AACtB,QAAA,KAAK,UAAU;AACb,YAAA,OAAO,WAAW;AACpB,QAAA,KAAK,UAAU;AACb,YAAA,OAAO,WAAW;AACpB,QAAA,KAA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I,CAAC;AAC5D;AAEO,MAAM,MAAM,GAAmC,CACpD,IAAmB,EACnB,MAAqB,EACrB,OAAwB,EACxB,OAAgC,KAC9B;AACF,IAAA,MAAM,IAAI,GAAuC,IAAI,CAAC,OAAO,CAAC;IAC9D,OAAO,IAAI,CAAC,GAAG;AAEf,IAAA,OAAOC,GAAO,CAAY,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE;AACxD,QAAA,OAAO,EAAE;AACP,YAAA,sBAAsB,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,CAAC;AAChD,YAAA,GAAG,OAAO;AACX,SAAA;AACF,KAAA,CAAC;AACJ;AAEO,MAAM,GAAG,GAAmC,CACjD,IAAmB,EACnB,EAAE,OAAO,EAAE,GAAG,MAAM,EAAoB,KACtC;IACF,OAAOC,KAAO,CAAC,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE,sBAAsB,EAAE,OAAO,EAAE,EAAE,CAAC;AAC5F;;;;"}
@@ -17,7 +17,7 @@ import type { AvailableLicenseProps } from './entities/available-license';
17
17
  import type { BulkActionProps, BulkActionPublishPayload, BulkActionUnpublishPayload, BulkActionV2Payload, BulkActionValidatePayload, PublishBulkActionV2Payload, UnpublishBulkActionV2Payload, ValidateBulkActionV2Payload } from './entities/bulk-action';
18
18
  import type { CommentProps, CreateCommentParams, CreateCommentProps, DeleteCommentParams, GetCommentParentEntityParams, GetManyCommentsParams, PlainTextBodyFormat, RichTextBodyFormat, RichTextCommentBodyPayload, RichTextCommentProps, UpdateCommentParams, UpdateCommentProps } from './entities/comment';
19
19
  import type { ComponentTypeProps, ComponentTypeQueryOptions, CreateComponentTypeProps, UpsertComponentTypeProps } from './entities/component-type';
20
- import type { CreateFragmentProps, FragmentProps, FragmentQueryOptions, UpdateFragmentProps } from './entities/fragment';
20
+ import type { CreateFragmentProps, FragmentProps, FragmentQueryOptions, UpsertFragmentProps } from './entities/fragment';
21
21
  import type { CreateTemplateProps, TemplateProps, TemplateQueryOptions, UpsertTemplateProps } from './entities/template';
22
22
  import type { CreateExperienceProps, UpsertExperienceProps, ExperienceLocalePublishPayload, ExperienceProps, ExperienceQueryOptions } from './entities/experience';
23
23
  import type { ContentTypeProps, CreateContentTypeProps } from './entities/content-type';
@@ -49,7 +49,7 @@ import type { CreateTeamSpaceMembershipProps, TeamSpaceMembershipProps } from '.
49
49
  import type { UsageProps } from './entities/usage';
50
50
  import type { UserProps } from './entities/user';
51
51
  import type { CreateWebhooksProps, UpsertWebhookSigningSecretPayload, WebhookCallDetailsProps, WebhookCallOverviewProps, WebhookHealthProps, WebhookProps, WebhookRetryPolicyPayload, WebhookRetryPolicyProps, WebhookSigningSecretProps } from './entities/webhook';
52
- import type { CreateTaskParams, CreateTaskProps, DeleteTaskParams, TaskProps, UpdateTaskParams, UpdateTaskProps } from './entities/task';
52
+ import type { CreateTaskParams, CreateTaskProps, DeleteTaskParams, TaskParentEntityType, TaskProps, UpdateTaskParams, UpdateTaskProps } from './entities/task';
53
53
  import type { AppAccessTokenProps, CreateAppAccessTokenProps } from './entities/app-access-token';
54
54
  import type { AppEventSubscriptionProps, CreateAppEventSubscriptionProps } from './entities/app-event-subscription';
55
55
  import type { AppKeyProps, CreateAppKeyProps } from './entities/app-key';
@@ -142,7 +142,19 @@ export type DiscriminatedUnionDataTypeDefinition = BaseDataTypeDefinition & {
142
142
  };
143
143
  export type DataTypeDefinition = PrimitiveDataTypeDefinition | RichTextDataTypeDefinition | ArrayDataTypeDefinition | RecordDataTypeDefinition | TypeRefDataTypeDefinition | LiteralDataTypeDefinition | DiscriminatedUnionDataTypeDefinition;
144
144
  export type PointerExpressionValue = string | {
145
+ $from: string | {
146
+ source: string;
147
+ select?: PointerExpressionValue;
148
+ };
149
+ } | {
145
150
  $literal: JsonValue;
151
+ } | {
152
+ $object: Record<string, PointerExpressionValue>;
153
+ } | {
154
+ $on: {
155
+ type: Record<string, PointerExpressionValue>;
156
+ default?: PointerExpressionValue;
157
+ };
146
158
  } | {
147
159
  [key: string]: PointerExpressionValue;
148
160
  };
@@ -712,7 +724,7 @@ type MRInternal<UA extends boolean> = {
712
724
  (opts: MROpts<'Fragment', 'getMany', UA>): MRReturn<'Fragment', 'getMany'>;
713
725
  (opts: MROpts<'Fragment', 'get', UA>): MRReturn<'Fragment', 'get'>;
714
726
  (opts: MROpts<'Fragment', 'create', UA>): MRReturn<'Fragment', 'create'>;
715
- (opts: MROpts<'Fragment', 'update', UA>): MRReturn<'Fragment', 'update'>;
727
+ (opts: MROpts<'Fragment', 'upsert', UA>): MRReturn<'Fragment', 'upsert'>;
716
728
  (opts: MROpts<'Fragment', 'delete', UA>): MRReturn<'Fragment', 'delete'>;
717
729
  (opts: MROpts<'Fragment', 'publish', UA>): MRReturn<'Fragment', 'publish'>;
718
730
  (opts: MROpts<'Fragment', 'unpublish', UA>): MRReturn<'Fragment', 'unpublish'>;
@@ -2805,11 +2817,11 @@ export type MRActions = {
2805
2817
  return: TaskProps;
2806
2818
  };
2807
2819
  getMany: {
2808
- params: GetEntryParams & QueryParams;
2820
+ params: (GetEntryParams | GetTaskParentEntityParams) & QueryParams;
2809
2821
  return: CollectionProp<TaskProps>;
2810
2822
  };
2811
2823
  getAll: {
2812
- params: GetEntryParams & QueryParams;
2824
+ params: (GetEntryParams | GetTaskParentEntityParams) & QueryParams;
2813
2825
  return: CollectionProp<TaskProps>;
2814
2826
  };
2815
2827
  create: {
@@ -2944,9 +2956,9 @@ export type MRActions = {
2944
2956
  payload: CreateFragmentProps;
2945
2957
  return: FragmentProps;
2946
2958
  };
2947
- update: {
2959
+ upsert: {
2948
2960
  params: GetFragmentParams;
2949
- payload: UpdateFragmentProps;
2961
+ payload: UpsertFragmentProps;
2950
2962
  return: FragmentProps;
2951
2963
  };
2952
2964
  delete: {
@@ -3544,7 +3556,12 @@ export type GetTagParams = GetSpaceEnvironmentParams & {
3544
3556
  tagId: string;
3545
3557
  };
3546
3558
  /** @internal */
3547
- export type GetTaskParams = GetEntryParams & {
3559
+ export type GetTaskParentEntityParams = GetSpaceEnvironmentParams & {
3560
+ parentEntityType: TaskParentEntityType;
3561
+ parentEntityId: string;
3562
+ };
3563
+ /** @internal */
3564
+ export type GetTaskParams = (GetEntryParams | GetTaskParentEntityParams) & {
3548
3565
  taskId: string;
3549
3566
  };
3550
3567
  /** @internal */
@@ -1 +1 @@
1
- {"version":3,"file":"common-types.js","sources":["../../lib/common-types.ts"],"sourcesContent":[null],"names":[],"mappings":"AA80GA;IACY;AAAZ,CAAA,UAAY,+BAA+B,EAAA;AACzC,IAAA,+BAAA,CAAA,4BAAA,CAAA,GAAA,uDAAoF;AACtF,CAAC,EAFW,+BAA+B,KAA/B,+BAA+B,GAAA,EAAA,CAAA,CAAA;;;;"}
1
+ {"version":3,"file":"common-types.js","sources":["../../lib/common-types.ts"],"sourcesContent":[null],"names":[],"mappings":"AA61GA;IACY;AAAZ,CAAA,UAAY,+BAA+B,EAAA;AACzC,IAAA,+BAAA,CAAA,4BAAA,CAAA,GAAA,uDAAoF;AACtF,CAAC,EAFW,+BAA+B,KAA/B,+BAA+B,GAAA,EAAA,CAAA,CAAA;;;;"}
@@ -91,7 +91,7 @@ export declare const FIELD_TYPES: Array<keyof typeof INTERNAL_TO_API>;
91
91
  * - Assets
92
92
  * - File
93
93
  */
94
- export declare function toInternalFieldType(api: Partial<ContentFields>): "Asset" | "Entry" | "Boolean" | "Symbol" | "Number" | "Resource" | "Text" | "RichText" | "Integer" | "Date" | "Object" | "Location" | "File" | "Symbols" | "Entries" | "Assets" | "Resources" | undefined;
94
+ export declare function toInternalFieldType(api: Partial<ContentFields>): "Location" | "Asset" | "Entry" | "Boolean" | "Symbol" | "Number" | "Resource" | "Text" | "RichText" | "Integer" | "Date" | "Object" | "File" | "Symbols" | "Entries" | "Assets" | "Resources" | undefined;
95
95
  export declare const DEFAULTS_WIDGET: {
96
96
  Text: {
97
97
  widgetId: string;
@@ -37,26 +37,45 @@ export type AiActionInvocationProps = {
37
37
  };
38
38
  result?: InvocationResult;
39
39
  };
40
+ export type AiActionTextVariable = {
41
+ id: string;
42
+ value: string;
43
+ };
44
+ export type AiActionEntityLinkVariable = {
45
+ id: string;
46
+ value: {
47
+ sys: {
48
+ type: 'Link';
49
+ linkType: 'Entry' | 'Asset' | 'ResourceLink';
50
+ id: string;
51
+ release?: SysLink;
52
+ /** JSON Pointers to entity fields, e.g. `"/fields/title/en-US"` */
53
+ entityPaths?: Array<string>;
54
+ };
55
+ };
56
+ };
57
+ /** @deprecated Use `AiActionEntityLinkVariable` with the sys-nested format instead. */
58
+ export type AiActionLegacyEntityPathVariable = {
59
+ id: string;
60
+ value: {
61
+ entityPath: string;
62
+ entityType: 'Entry' | 'Asset' | 'ResourceLink';
63
+ entityId: string;
64
+ };
65
+ };
66
+ /** @deprecated Use `AiActionEntityLinkVariable` with the sys-nested format instead. */
67
+ export type AiActionLegacyEntityPathsVariable = {
68
+ id: string;
69
+ value: {
70
+ entityPaths: Array<string>;
71
+ entityType: 'Entry';
72
+ entityId: string;
73
+ };
74
+ };
75
+ export type AiActionInvocationVariable = AiActionTextVariable | AiActionEntityLinkVariable | AiActionLegacyEntityPathVariable | AiActionLegacyEntityPathsVariable;
40
76
  export type AiActionInvocationType = {
41
77
  outputFormat?: 'RichText' | 'Markdown' | 'PlainText';
42
- variables?: Array<{
43
- value: string;
44
- id: string;
45
- } | {
46
- value: {
47
- entityPath: string;
48
- entityType: 'Entry' | 'Asset' | 'ResourceLink';
49
- entityId: string;
50
- };
51
- id: string;
52
- } | {
53
- value: {
54
- entityPaths: Array<string>;
55
- entityType: 'Entry';
56
- entityId: string;
57
- };
58
- id: string;
59
- }>;
78
+ variables?: Array<AiActionInvocationVariable>;
60
79
  };
61
80
  /**
62
81
  * The AI Action Invocation entity.
@@ -1 +1 @@
1
- {"version":3,"file":"ai-action-invocation.js","sources":["../../../lib/entities/ai-action-invocation.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAqFA;;;;;;AAMG;AACG,SAAU,sBAAsB,CACpC,WAAwB,EACxB,IAA6B,EAAA;IAE7B,MAAM,UAAU,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC5C,IAAA,OAAO,SAAS,CAAC,UAAU,CAAC;AAC9B;;;;"}
1
+ {"version":3,"file":"ai-action-invocation.js","sources":["../../../lib/entities/ai-action-invocation.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AA6GA;;;;;;AAMG;AACG,SAAU,sBAAsB,CACpC,WAAwB,EACxB,IAA6B,EAAA;IAE7B,MAAM,UAAU,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC5C,IAAA,OAAO,SAAS,CAAC,UAAU,CAAC;AAC9B;;;;"}
@@ -4,10 +4,13 @@ export type VariableType = 'ResourceLink' | 'Text' | 'StandardInput' | 'Locale'
4
4
  export type ReferenceVariableConfiguration = {
5
5
  allowedEntities: Array<'Entry'>;
6
6
  };
7
+ export type LocaleVariableConfiguration = {
8
+ localeType: 'Target' | 'Source';
9
+ };
7
10
  export type VariableConfiguration = {
8
11
  strict: boolean;
9
12
  in: Array<string>;
10
- } | ReferenceVariableConfiguration;
13
+ } | ReferenceVariableConfiguration | LocaleVariableConfiguration;
11
14
  export type Variable = {
12
15
  configuration?: VariableConfiguration;
13
16
  description?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ai-action.js","sources":["../../../lib/entities/ai-action.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;AAuGA,SAAS,iBAAiB,CAAC,WAAwB,EAAA;AACjD,IAAA,MAAM,SAAS,GAAG,CAAC,IAAmB,MAAM;QAC1C,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;AAC9B,QAAA,UAAU,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE;AACxB,KAAA,CAAC;IAEF,OAAO;QACL,MAAM,EAAE,SAAS,MAAM,GAAA;YACrB,MAAM,IAAI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BAAA,MAAM,EAAE,WAAW;AACnB,gBAAA,MAAM,EAAE,SAAS,CAAC,IAAI,CAAC;AACxB,aAAA,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,YAAY,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;QACpD,CAAC;AAED,QAAA,MAAM,EAAE,SAAS,MAAM,CAAC,aAAqB,EAAE,OAA+B,EAAA;YAC5E,MAAM,IAAI,GAAG,IAAqB;AAClC,YAAA,OAAO,WAAW,CAAC;AACjB,gBAAA,UAAU,EAAE,UAAU;AACtB,gBAAA,MAAM,EAAE,QAAQ;AAChB,gBAAA,MAAM,EAAE;oBACN,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;oBAC9B,aAAa;AACb,oBAAA,UAAU,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE;AACxB,iBAAA;gBACD,OAAO;AACR,aAAA,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,sBAAsB,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;QAC9D,CAAC;KACF;AACH;AAEM,SAAU,YAAY,CAAC,WAAwB,EAAE,IAAmB,EAAA;IACxE,MAAM,QAAQ,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1C,MAAM,mBAAmB,GAAG,kBAAkB,CAAC,QAAQ,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAC;AACxF,IAAA,OAAO,SAAS,CAAC,mBAAmB,CAAC;AACvC;MAEa,sBAAsB,GAAG,cAAc,CAAC,YAAY;;;;"}
@@ -5,11 +5,13 @@ interface LinkWithReference<T extends string> extends Link<T> {
5
5
  ref: string;
6
6
  };
7
7
  }
8
+ export type CommentParentEntityType = 'ContentType' | 'Entry' | 'Workflow' | 'Experience' | 'Fragment' | 'ComponentType' | 'Template';
9
+ type NonWorkflowCommentParentEntityType = Exclude<CommentParentEntityType, 'Workflow'>;
8
10
  export type CommentSysProps = Pick<BasicMetaSysProps, 'id' | 'version' | 'createdAt' | 'createdBy' | 'updatedAt' | 'updatedBy'> & {
9
11
  type: 'Comment';
10
12
  space: SysLink;
11
13
  environment: SysLink;
12
- parentEntity: Link<'ContentType'> | LinkWithReference<'ContentType'> | Link<'Entry'> | LinkWithReference<'Entry'> | VersionedLink<'Workflow'>;
14
+ parentEntity: Link<NonWorkflowCommentParentEntityType> | LinkWithReference<NonWorkflowCommentParentEntityType> | VersionedLink<'Workflow'>;
13
15
  parent: Link<'Comment'> | null;
14
16
  };
15
17
  export type PlainTextBodyProperty = 'plain-text';
@@ -57,11 +59,7 @@ export type RichTextCommentBodyPayload = {
57
59
  };
58
60
  export type RichTextCommentProps = Omit<CommentProps, 'body'> & RichTextCommentBodyPayload;
59
61
  export type GetCommentParentEntityParams = GetSpaceEnvironmentParams & ({
60
- parentEntityType: 'ContentType';
61
- parentEntityId: string;
62
- parentEntityReference?: string;
63
- } | {
64
- parentEntityType: 'Entry';
62
+ parentEntityType: NonWorkflowCommentParentEntityType;
65
63
  parentEntityId: string;
66
64
  parentEntityReference?: string;
67
65
  } | {
@@ -14,12 +14,16 @@ var CommentNode;
14
14
  * @internal
15
15
  */
16
16
  function createCommentApi(makeRequest) {
17
- const getParams = (comment) => ({
18
- spaceId: comment.sys.space.sys.id,
19
- environmentId: comment.sys.environment.sys.id,
20
- entryId: comment.sys.parentEntity.sys.id,
21
- commentId: comment.sys.id,
22
- });
17
+ const getParams = (comment) => {
18
+ const parentEntity = comment.sys.parentEntity;
19
+ return {
20
+ spaceId: comment.sys.space.sys.id,
21
+ environmentId: comment.sys.environment.sys.id,
22
+ commentId: comment.sys.id,
23
+ parentEntityType: parentEntity.sys.linkType,
24
+ parentEntityId: parentEntity.sys.id,
25
+ };
26
+ };
23
27
  return {
24
28
  update: async function () {
25
29
  const raw = this.toPlainObject();
@@ -1 +1 @@
1
- {"version":3,"file":"comment.js","sources":["../../../lib/entities/comment.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;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C3C,YAAA,cAAc,EAAE,YAAY,CAAC,GAAG,CAAC,EAAE;SACpC;AACH,IAAA,CAAC;IAED,OAAO;AACL,QAAA,MAAM,EAAE,kBAAK;AACX,YAAA,MAAM,GAAG,GAAG,IAAI,CAAC,aAAa,EAAkB;AAEhD,YAAA,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;AAC7B,gBAAA,UAAU,EAAE,SAAS;AACrB,gBAAA,MAAM,EAAE,QAAQ;AAChB,gBAAA,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC;AACtB,gBAAA,OAAO,EAAE,GAAG;AACb,aAAA,CAAC;AACF,YAAA,OAAO,WAAW,CAAC,WAAW,EAAE,IAAI,CAAC;QACvC,CAAC;AAED,QAAA,MAAM,EAAE,kBAAK;AACX,YAAA,MAAM,GAAG,GAAG,IAAI,CAAC,aAAa,EAAkB;AAEhD,YAAA,MAAM,WAAW,CAAC;AAChB,gBAAA,UAAU,EAAE,SAAS;AACrB,gBAAA,MAAM,EAAE,QAAQ;AAChB,gBAAA,MAAM,EAAE;oBACN,GAAG,SAAS,CAAC,GAAG,CAAC;AACjB,oBAAA,OAAO,EAAE,GAAG,CAAC,GAAG,CAAC,OAAO;AACzB,iBAAA;AACF,aAAA,CAAC;QACJ,CAAC;KACF;AACH;AAEA;;AAEG;AACG,SAAU,WAAW,CACzB,WAAwB,EACxB,IAAyC,EAAA;IAEzC,MAAM,OAAO,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzC,MAAM,kBAAkB,GAAG,kBAAkB,CAAC,OAAO,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;AACrF,IAAA,OAAO,SAAS,CAAC,kBAAkB,CAA8B;AACnE;AAEA;;AAEG;MACU,qBAAqB,GAAG,cAAc,CAAC,WAAW;;;;"}
@@ -52,9 +52,6 @@ export type TokenBackedDesignProperty = DesignPropertyCommonFields & {
52
52
  allowedResources?: DesignTokenAllowedResource[];
53
53
  };
54
54
  export type ComponentTypeDesignProperty = StringDesignProperty | BooleanDesignProperty | TokenBackedDesignProperty;
55
- export type ComponentTypeDimensionKeyMap = {
56
- designProperties: Record<string, Record<string, string>>;
57
- };
58
55
  export type ContentPropertyPointerValue = `$contentProperties/${string}`;
59
56
  export type DesignPropertyPointerValue = `$designProperties/${string}`;
60
57
  export type ManualDesignValue = {
@@ -91,6 +88,7 @@ export type SlotNode = {
91
88
  };
92
89
  export type TreeNode = ComponentNode | FragmentNode | SlotNode;
93
90
  export type DataAssemblyLink = ResourceLink<'Contentful:DataAssembly'>;
91
+ export declare const COMPONENT_TYPE_ALLOWED_RESOURCE_SOURCE: "crn:contentful:::experience:spaces/$self/environments/$self";
94
92
  export type ComponentTypeSlotDefinition = {
95
93
  id: string;
96
94
  name: string;
@@ -103,7 +101,7 @@ export type ComponentTypeSlotDefinition = {
103
101
  }>;
104
102
  allowedResources?: Array<{
105
103
  type: 'Contentful:ComponentType';
106
- source: string;
104
+ source: typeof COMPONENT_TYPE_ALLOWED_RESOURCE_SOURCE;
107
105
  allowedTypes: string[];
108
106
  }>;
109
107
  };
@@ -134,7 +132,6 @@ export type ComponentTypeProps = {
134
132
  viewports: ComponentTypeViewport[];
135
133
  contentProperties: ComponentTypeContentProperty[];
136
134
  designProperties: ComponentTypeDesignProperty[];
137
- dimensionKeyMap: ComponentTypeDimensionKeyMap;
138
135
  componentTree?: TreeNode[];
139
136
  slots?: ComponentTypeSlotDefinition[];
140
137
  metadata?: ExoMetadataProps;
@@ -1,28 +1,30 @@
1
1
  import type { CursorPaginationParams, DataTypeDefinition, ExoCursorPaginatedCollectionProp, Link, MetadataProps, PointerExpressionValue, ResourceLink } from '../common-types';
2
- export type DataAssemblyDataTypeField = DataTypeDefinition & {
2
+ export declare const SAME_SPACE_CONTENT_SOURCE: "crn:contentful:::content:spaces/$self/environments/$self";
3
+ export type CanonicalDataAssemblyDataTypeField = DataTypeDefinition & {
3
4
  id: string;
4
5
  name: string;
5
- source?: string;
6
6
  };
7
- export type DataAssemblyLinkParameter = {
8
- name?: string;
9
- description?: string;
10
- type: 'Link';
11
- linkType: string;
12
- allowedContentTypes: string[];
7
+ export type LegacyDataAssemblyDataTypeField = {
8
+ id: string;
9
+ name: string;
10
+ type: string;
11
+ required?: boolean;
12
+ source?: string;
13
+ ref?: unknown;
13
14
  };
15
+ export type DataAssemblyDataTypeField = CanonicalDataAssemblyDataTypeField | LegacyDataAssemblyDataTypeField;
14
16
  export type DataAssemblyResourceLinkParameter = {
15
17
  name?: string;
16
18
  description?: string;
17
19
  type: 'ResourceLink';
18
- linkType: string;
20
+ linkType: 'Contentful:Entry';
19
21
  allowedResources: Array<{
20
- type: string;
21
- source: string;
22
+ type: 'Contentful:Entry';
23
+ source: typeof SAME_SPACE_CONTENT_SOURCE;
22
24
  allowedTypes: string[];
23
25
  }>;
24
26
  };
25
- export type DataAssemblyParameterConfig = Record<string, DataAssemblyLinkParameter | DataAssemblyResourceLinkParameter>;
27
+ export type DataAssemblyParameterConfig = Record<string, DataAssemblyResourceLinkParameter>;
26
28
  export type DataAssemblyGraphQLResolver = {
27
29
  source: 'Contentful:GraphQL';
28
30
  query: string;
@@ -35,7 +37,7 @@ export type DataAssemblyNestedResolver = {
35
37
  };
36
38
  export type DataAssemblyResolverDefinition = DataAssemblyGraphQLResolver | DataAssemblyNestedResolver;
37
39
  export type DataAssemblyResolverConfig = Record<string, DataAssemblyResolverDefinition>;
38
- export type DataAssemblyReturnMappingConfig = Record<string, PointerExpressionValue>;
40
+ export type DataAssemblyReturnMappingConfig = PointerExpressionValue;
39
41
  export type DataAssemblySys = {
40
42
  id: string;
41
43
  type: 'DataAssembly';
@@ -1,10 +1,5 @@
1
1
  import type { CursorPaginationParams, ExoCursorPaginatedCollectionProp, ExperienceMetadataProps, ExoQueryFilters, Link, ResourceLink } from '../common-types';
2
2
  import type { ComponentTypeViewport, DimensionedDesignPropertyValue, FragmentNode } from './component-type';
3
- export type ExperienceDimensionKeyMap = {
4
- designProperties: Record<string, {
5
- breakpoint: string;
6
- }>;
7
- };
8
3
  export type ExperienceContentBindings = {
9
4
  sys: ResourceLink<'Contentful:DataAssembly'>['sys'];
10
5
  parameters: Record<string, ResourceLink<string>>;
@@ -38,7 +33,6 @@ type ExperienceCommonProps = {
38
33
  description: string;
39
34
  viewports: ComponentTypeViewport[];
40
35
  designProperties: Record<string, DimensionedDesignPropertyValue>;
41
- dimensionKeyMap: ExperienceDimensionKeyMap;
42
36
  contentBindings?: ExperienceContentBindings;
43
37
  metadata?: ExperienceMetadataProps;
44
38
  slots?: Record<string, Array<FragmentNode | InlineFragmentNode>>;
@@ -1,7 +1,7 @@
1
1
  import type { Except } from 'type-fest';
2
2
  import type { CursorPaginationParams, ExoCursorPaginatedCollectionProp, ExoQueryFilters, ExperienceMetadataProps, Link, ResourceLink } from '../common-types';
3
3
  import type { ComponentTypeViewport, DimensionedDesignPropertyValue, FragmentNode } from './component-type';
4
- import type { ExperienceContentBindings, ExperienceDimensionKeyMap, InlineFragmentNode } from './experience';
4
+ import type { ExperienceContentBindings, InlineFragmentNode } from './experience';
5
5
  export type FragmentSys = {
6
6
  id: string;
7
7
  type: 'Fragment';
@@ -31,7 +31,6 @@ export type FragmentProps = {
31
31
  description: string;
32
32
  viewports: ComponentTypeViewport[];
33
33
  designProperties: Record<string, DimensionedDesignPropertyValue>;
34
- dimensionKeyMap: ExperienceDimensionKeyMap;
35
34
  contentBindings?: ExperienceContentBindings;
36
35
  metadata?: ExperienceMetadataProps;
37
36
  slots?: Record<string, Array<FragmentNode | InlineFragmentNode>>;
@@ -39,11 +38,11 @@ export type FragmentProps = {
39
38
  export type CreateFragmentProps = Except<FragmentProps, 'sys'> & {
40
39
  componentType: ResourceLink<'Contentful:ComponentType'>;
41
40
  };
42
- export type UpdateFragmentProps = Omit<FragmentProps, 'sys'> & {
41
+ export type UpsertFragmentProps = Omit<FragmentProps, 'sys'> & {
43
42
  sys: {
44
43
  id: string;
45
44
  type: 'Fragment';
46
- version: number;
45
+ version?: number;
47
46
  };
48
47
  componentType?: ResourceLink<'Contentful:ComponentType'>;
49
48
  };
@@ -1,10 +1,12 @@
1
- import type { BasicMetaSysProps, DefaultElements, GetEntryParams, GetTaskParams, Link, MakeRequest, SysLink } from '../common-types';
1
+ import type { BasicMetaSysProps, DefaultElements, GetEntryParams, GetTaskParentEntityParams, GetTaskParams, Link, MakeRequest, SysLink } from '../common-types';
2
2
  export type TaskStatus = 'active' | 'resolved';
3
+ export type TaskParentEntityType = 'Entry' | 'Experience' | 'Fragment' | 'Template' | 'ComponentType';
4
+ export type TaskParentEntityPath = 'entries' | 'experiences' | 'fragments' | 'templates' | 'component_types';
3
5
  export type TaskSysProps = Pick<BasicMetaSysProps, 'id' | 'version' | 'createdAt' | 'createdBy' | 'updatedAt' | 'updatedBy'> & {
4
6
  type: 'Task';
5
7
  space: SysLink;
6
8
  environment: SysLink;
7
- parentEntity: Link<'Entry'>;
9
+ parentEntity: Link<TaskParentEntityType>;
8
10
  };
9
11
  export type TaskProps = {
10
12
  sys: TaskSysProps;
@@ -17,7 +19,7 @@ export type CreateTaskProps = Omit<TaskProps, 'sys'>;
17
19
  export type UpdateTaskProps = Omit<TaskProps, 'sys'> & {
18
20
  sys: Pick<TaskSysProps, 'version'>;
19
21
  };
20
- export type CreateTaskParams = GetEntryParams;
22
+ export type CreateTaskParams = GetEntryParams | GetTaskParentEntityParams;
21
23
  export type UpdateTaskParams = GetTaskParams;
22
24
  export type DeleteTaskParams = GetTaskParams & {
23
25
  version: number;
@@ -7,12 +7,16 @@ import enhanceWithMethods from '../enhance-with-methods.js';
7
7
  * @internal
8
8
  */
9
9
  function createTaskApi(makeRequest) {
10
- const getParams = (task) => ({
11
- spaceId: task.sys.space.sys.id,
12
- environmentId: task.sys.environment.sys.id,
13
- entryId: task.sys.parentEntity.sys.id,
14
- taskId: task.sys.id,
15
- });
10
+ const getParams = (task) => {
11
+ const parentEntity = task.sys.parentEntity;
12
+ return {
13
+ spaceId: task.sys.space.sys.id,
14
+ environmentId: task.sys.environment.sys.id,
15
+ parentEntityType: parentEntity.sys.linkType,
16
+ parentEntityId: parentEntity.sys.id,
17
+ taskId: task.sys.id,
18
+ };
19
+ };
16
20
  return {
17
21
  update: function () {
18
22
  const raw = this.toPlainObject();
@@ -1 +1 @@
1
- {"version":3,"file":"task.js","sources":["../../../lib/entities/task.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAgDA;;AAEG;AACW,SAAU,aAAa,CAAC,WAAwB,EAAA;AAC5D,IAAA,MAAM,SAAS,GAAG,CAAC,IAAe,MAAqB;QACrD,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;QAC9B,aAAa,EAAE,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE;QAC1C,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE;AACrC,QAAA,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE;AACpB,KAAA,CAAC;IAEF,OAAO;AACL,QAAA,MAAM,EAAE,YAAA;AACN,YAAA,MAAM,GAAG,GAAG,IAAI,CAAC,aAAa,EAAe;AAE7C,YAAA,OAAO,WAAW,CAAC;AACjB,gBAAA,UAAU,EAAE,MAAM;AAClB,gBAAA,MAAM,EAAE,QAAQ;AAChB,gBAAA,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC;AACtB,gBAAA,OAAO,EAAE,GAAG;AACb,aAAA,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;QAChD,CAAC;AAED,QAAA,MAAM,EAAE,YAAA;AACN,YAAA,MAAM,GAAG,GAAG,IAAI,CAAC,aAAa,EAAe;AAE7C,YAAA,OAAO,WAAW,CAAC;AACjB,gBAAA,UAAU,EAAE,MAAM;AAClB,gBAAA,MAAM,EAAE,QAAQ;AAChB,gBAAA,MAAM,EAAE;oBACN,GAAG,SAAS,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;AAClB,gBAAA,MAAM,EAAE,QAAQ;AAChB,gBAAA,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC;AACtB,gBAAA,OAAO,EAAE,GAAG;AACb,aAAA,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;QAChD,CAAC;AAED,QAAA,MAAM,EAAE,YAAA;AACN,YAAA,MAAM,GAAG,GAAG,IAAI,CAAC,aAAa,EAAe;AAE7C,YAAA,OAAO,WAAW,CAAC;AACjB,gBAAA,UAAU,EAAE,MAAM;AAClB,gBAAA,MAAM,EAAE,QAAQ;AAChB,gBAAA,MAAM,EAAE;oBACN,GAAG,SAAS,CAAC,GAAG,CAAC;AACjB,oBAAA,OAAO,EAAE,GAAG,CAAC,GAAG,CAAC,OAAO;AACzB,iBAAA;AACF,aAAA,CAAC,CAAC,IAAI,CAAC,MAAK;;AAEb,YAAA,CAAC,CAAC;QACJ,CAAC;KACF;AACH;AAEA;;AAEG;AACG,SAAU,QAAQ,CAAC,WAAwB,EAAE,IAAe,EAAA;IAChE,MAAM,IAAI,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtC,MAAM,eAAe,GAAG,kBAAkB,CAAC,IAAI,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;AAC5E,IAAA,OAAO,SAAS,CAAC,eAAe,CAAC;AACnC;AAEA;;AAEG;MACU,kBAAkB,GAAG,cAAc,CAAC,QAAQ;;;;"}
@@ -1,6 +1,6 @@
1
1
  import type { Except } from 'type-fest';
2
2
  import type { CursorPaginationParams, ExoCursorPaginatedCollectionProp, ExoMetadataProps, ExoQueryFilters, Link } from '../common-types';
3
- import type { ComponentTypeContentProperty, ComponentTypeDesignProperty, ComponentTypeDimensionKeyMap, ComponentTypeSlotDefinition, ComponentTypeViewport, DataAssemblyLink, TreeNode } from './component-type';
3
+ import type { ComponentTypeContentProperty, ComponentTypeDesignProperty, ComponentTypeSlotDefinition, ComponentTypeViewport, DataAssemblyLink, TreeNode } from './component-type';
4
4
  export type TemplateSys = {
5
5
  id: string;
6
6
  type: 'Template';
@@ -28,7 +28,6 @@ export type TemplateProps = {
28
28
  viewports: ComponentTypeViewport[];
29
29
  contentProperties: ComponentTypeContentProperty[];
30
30
  designProperties: ComponentTypeDesignProperty[];
31
- dimensionKeyMap: ComponentTypeDimensionKeyMap;
32
31
  componentTree?: TreeNode[];
33
32
  slots?: ComponentTypeSlotDefinition[];
34
33
  metadata?: ExoMetadataProps;
@@ -7,7 +7,7 @@ CreatePersonalAccessTokenProps as CreatePATProps, } from './entities/access-toke
7
7
  export type { ApiKey, ApiKeyProps, CreateApiKeyProps } from './entities/api-key';
8
8
  export type { AppAccessToken, AppAccessTokenProps, CreateAppAccessTokenProps, } from './entities/app-access-token';
9
9
  export type { AiAction, AiActionProps, CreateAiActionProps } from './entities/ai-action';
10
- export type { AiActionInvocation, AiActionInvocationProps } from './entities/ai-action-invocation';
10
+ export type { AiActionInvocation, AiActionInvocationProps, AiActionInvocationVariable, } from './entities/ai-action-invocation';
11
11
  export type { Agent, AgentGeneratePayload, AgentProps, AgentToolLink } from './entities/agent';
12
12
  export type { AgentGenerateResponse, AgentResumeRunPayload, AgentRun, AgentRunMessage, AgentRunMessagePart, AgentRunMessageRole, AgentRunMessageTextPart, AgentRunMessageToolCallPart, AgentRunProps, AgentRunQueryOptions, AgentRunStatus, } from './entities/agent-run';
13
13
  export type { AppAction, AppActionCategoryProps, AppActionCategoryType, AppActionParameterDefinition, AppActionProps, AppActionType, CreateAppActionProps, } from './entities/app-action';
@@ -59,7 +59,7 @@ export type { SpaceAddOn, SpaceAddOnProps, SpaceAddOnType, UpdateSpaceAddOnAlloc
59
59
  export type { SpaceMember, SpaceMemberProps } from './entities/space-member';
60
60
  export type { CreateSpaceMembershipProps, SpaceMembership, SpaceMembershipProps, } from './entities/space-membership';
61
61
  export type { CreateTagProps, Tag, TagProps, TagSysProps, TagVisibility } from './entities/tag';
62
- export type { CreateTaskProps, Task, TaskProps, UpdateTaskProps } from './entities/task';
62
+ export type { CreateTaskProps, Task, TaskParentEntityPath, TaskParentEntityType, TaskProps, UpdateTaskProps, } from './entities/task';
63
63
  export type { CreateTeamProps, Team, TeamProps } from './entities/team';
64
64
  export type { CreateTeamMembershipProps, TeamMembership, TeamMembershipProps, } from './entities/team-membership';
65
65
  export type { CreateTeamSpaceMembershipProps, TeamSpaceMembership, TeamSpaceMembershipProps, } from './entities/team-space-membership';
@@ -85,8 +85,8 @@ export type { SemanticSearchProps, SemanticSearch } from './entities/semantic-se
85
85
  export type { DefinedParameters, FreeFormParameters, InstallationParameterType, ParameterDefinition, ParameterOption, ParameterType, } from './entities/widget-parameters';
86
86
  export type { CreateWorkflowProps, DeleteWorkflowParams, UpdateWorkflowProps, Workflow, WorkflowProps, WorkflowQueryOptions, } from './entities/workflow';
87
87
  export type { WorkflowsChangelogEntry, WorkflowsChangelogEntryProps, WorkflowsChangelogQueryOptions, } from './entities/workflows-changelog-entry';
88
- export type { ComponentTypeCollection } from './entities/component-type';
89
- export type { TemplateCollection } from './entities/template';
90
- export type { ExperienceCollection, ReleaseExperience, ReleaseExperienceCollection, ReleaseExperienceSys, } from './entities/experience';
91
- export type { FragmentCollection } from './entities/fragment';
92
- export type { DataAssemblyCollection, DataAssemblyResourceLinkParameter, } from './entities/data-assembly';
88
+ export type { ComponentTypeCollection, ComponentTypeProps, CreateComponentTypeProps, UpsertComponentTypeProps, } from './entities/component-type';
89
+ export type { TemplateCollection, TemplateProps, CreateTemplateProps, UpsertTemplateProps, } from './entities/template';
90
+ export type { ExperienceCollection, ExperienceProps, CreateExperienceProps, UpsertExperienceProps, ReleaseExperience, ReleaseExperienceCollection, ReleaseExperienceSys, } from './entities/experience';
91
+ export type { FragmentCollection, FragmentProps, CreateFragmentProps, UpsertFragmentProps, } from './entities/fragment';
92
+ export type { DataAssemblyCollection, DataAssemblyProps, DataAssemblyResourceLinkParameter, CreateDataAssemblyProps, UpdateDataAssemblyProps, } from './entities/data-assembly';