@salesforce/lds-adapters-cms-type 0.1.0-dev1

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 (138) hide show
  1. package/LICENSE.txt +82 -0
  2. package/dist/es/es2018/cms-type.js +368 -0
  3. package/dist/es/es2018/types/src/generated/adapters/adapter-utils.d.ts +62 -0
  4. package/dist/es/es2018/types/src/generated/adapters/getContentType.d.ts +30 -0
  5. package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +1 -0
  6. package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +3 -0
  7. package/dist/es/es2018/types/src/generated/resources/deleteCmsDeploymentsByDeploymentId.d.ts +9 -0
  8. package/dist/es/es2018/types/src/generated/resources/deleteCmsSiteAuthorContentByContentKey.d.ts +14 -0
  9. package/dist/es/es2018/types/src/generated/resources/deleteConnectCmsContentJobsByJobId.d.ts +11 -0
  10. package/dist/es/es2018/types/src/generated/resources/deleteConnectCmsFoldersByFolderId.d.ts +11 -0
  11. package/dist/es/es2018/types/src/generated/resources/deleteConnectManagedContentContentSpacesContentsByContentSpaceIdAndManagedContentId.d.ts +10 -0
  12. package/dist/es/es2018/types/src/generated/resources/deleteConnectManagedContentContentSpacesMembersByContentSpaceIdAndMemberIdOrMe.d.ts +10 -0
  13. package/dist/es/es2018/types/src/generated/resources/getCmsContentsByContentKeyOrId.d.ts +18 -0
  14. package/dist/es/es2018/types/src/generated/resources/getCmsDeliveryCollectionByCollectionNameOrContentKeyAndTargetId.d.ts +21 -0
  15. package/dist/es/es2018/types/src/generated/resources/getCmsDeliveryCollectionMetadataByCollectionNameOrContentKeyAndTargetId.d.ts +19 -0
  16. package/dist/es/es2018/types/src/generated/resources/getCmsDeployments.d.ts +21 -0
  17. package/dist/es/es2018/types/src/generated/resources/getCmsSiteAuthorContentByContentKey.d.ts +18 -0
  18. package/dist/es/es2018/types/src/generated/resources/getCmsSiteAuthorContentContentKeys.d.ts +17 -0
  19. package/dist/es/es2018/types/src/generated/resources/getCmsSiteAuthorContentNodeByContentKeyAndContentNode.d.ts +16 -0
  20. package/dist/es/es2018/types/src/generated/resources/getCmsSiteAuthorContentNodesByContentKey.d.ts +18 -0
  21. package/dist/es/es2018/types/src/generated/resources/getCmsSpacesByContentSpaceId.d.ts +15 -0
  22. package/dist/es/es2018/types/src/generated/resources/getConnectCmsChannelsSearchableContentTypesByChannelId.d.ts +19 -0
  23. package/dist/es/es2018/types/src/generated/resources/getConnectCmsContent.d.ts +16 -0
  24. package/dist/es/es2018/types/src/generated/resources/getConnectCmsContentJobsByJobId.d.ts +15 -0
  25. package/dist/es/es2018/types/src/generated/resources/getConnectCmsContentTypesByContentTypeFQN.d.ts +20 -0
  26. package/dist/es/es2018/types/src/generated/resources/getConnectCmsContentVersionByManagedContentVersionId.d.ts +19 -0
  27. package/dist/es/es2018/types/src/generated/resources/getConnectCmsContentsVariantsByVariantId.d.ts +15 -0
  28. package/dist/es/es2018/types/src/generated/resources/getConnectCmsFoldersByFolderId.d.ts +15 -0
  29. package/dist/es/es2018/types/src/generated/resources/getConnectCmsFoldersItemsByFolderId.d.ts +25 -0
  30. package/dist/es/es2018/types/src/generated/resources/getConnectCommunitiesManagedContentDeliveryByCommunityId.d.ts +25 -0
  31. package/dist/es/es2018/types/src/generated/resources/getConnectCommunitiesManagedContentDeliveryContentsByCommunityId.d.ts +27 -0
  32. package/dist/es/es2018/types/src/generated/resources/getConnectCommunitiesManagedContentDeliveryContentsSearchByCommunityId.d.ts +21 -0
  33. package/dist/es/es2018/types/src/generated/resources/getConnectManagedContentContentSpacesContentVersionsByContentSpaceIdAndManagedContentVersionId.d.ts +19 -0
  34. package/dist/es/es2018/types/src/generated/resources/getConnectManagedContentContentSpacesMembersByContentSpaceId.d.ts +15 -0
  35. package/dist/es/es2018/types/src/generated/resources/getConnectManagedContentContentSpacesMembersPermissionsByContentSpaceIdAndMemberIdOrMe.d.ts +16 -0
  36. package/dist/es/es2018/types/src/generated/resources/getConnectManagedContentRoles.d.ts +15 -0
  37. package/dist/es/es2018/types/src/generated/resources/patchConnectCmsChannelsSearchableContentTypesByChannelId.d.ts +13 -0
  38. package/dist/es/es2018/types/src/generated/resources/patchConnectCmsFoldersItemsByFolderId.d.ts +13 -0
  39. package/dist/es/es2018/types/src/generated/resources/patchConnectManagedContentContentSpacesContentsByContentSpaceIdAndManagedContentId.d.ts +14 -0
  40. package/dist/es/es2018/types/src/generated/resources/putConnectCmsContentsVariantsByVariantId.d.ts +16 -0
  41. package/dist/es/es2018/types/src/generated/types/AbstractMCSFolderRepresentation.d.ts +34 -0
  42. package/dist/es/es2018/types/src/generated/types/AbstractMContentRepresentation.d.ts +49 -0
  43. package/dist/es/es2018/types/src/generated/types/MCDeliveryV2VariantCollectionRepresentation.d.ts +29 -0
  44. package/dist/es/es2018/types/src/generated/types/MCDeliveryV2VariantInputRepresentation.d.ts +31 -0
  45. package/dist/es/es2018/types/src/generated/types/MCDeliveryV2VariantRepresentation.d.ts +52 -0
  46. package/dist/es/es2018/types/src/generated/types/MCSiteContentCollectionRepresentation.d.ts +29 -0
  47. package/dist/es/es2018/types/src/generated/types/MCSiteContentRepresentation.d.ts +45 -0
  48. package/dist/es/es2018/types/src/generated/types/MCSiteDeliveryByContentKeysInputRepresentation.d.ts +31 -0
  49. package/dist/es/es2018/types/src/generated/types/MCSiteDeliveryByContentTypesInputRepresentation.d.ts +28 -0
  50. package/dist/es/es2018/types/src/generated/types/MCSiteDeliveryByNodesInputRepresentation.d.ts +31 -0
  51. package/dist/es/es2018/types/src/generated/types/MCSiteNodeCollectionRepresentation.d.ts +29 -0
  52. package/dist/es/es2018/types/src/generated/types/MCSiteNodeRepresentation.d.ts +44 -0
  53. package/dist/es/es2018/types/src/generated/types/MCSiteVariantRepresentation.d.ts +46 -0
  54. package/dist/es/es2018/types/src/generated/types/MContentBodyRepresentation.d.ts +32 -0
  55. package/dist/es/es2018/types/src/generated/types/MContentCollectionMetadataRepresentation.d.ts +38 -0
  56. package/dist/es/es2018/types/src/generated/types/MContentCollectionRepresentation.d.ts +50 -0
  57. package/dist/es/es2018/types/src/generated/types/MContentDetailRepresentation.d.ts +30 -0
  58. package/dist/es/es2018/types/src/generated/types/MContentSummaryRepresentation.d.ts +26 -0
  59. package/dist/es/es2018/types/src/generated/types/ManagedContentAssociationsInputRep.d.ts +32 -0
  60. package/dist/es/es2018/types/src/generated/types/ManagedContentAssociationsRepresentation.d.ts +29 -0
  61. package/dist/es/es2018/types/src/generated/types/ManagedContentBodyInputRep.d.ts +32 -0
  62. package/dist/es/es2018/types/src/generated/types/ManagedContentChildRepresentation.d.ts +34 -0
  63. package/dist/es/es2018/types/src/generated/types/ManagedContentCollectionRepresentation.d.ts +29 -0
  64. package/dist/es/es2018/types/src/generated/types/ManagedContentDateAndTimeNodeValueRepresentation.d.ts +33 -0
  65. package/dist/es/es2018/types/src/generated/types/ManagedContentDateNodeValueRepresentation.d.ts +29 -0
  66. package/dist/es/es2018/types/src/generated/types/ManagedContentDeploymentCollectionRepresentation.d.ts +38 -0
  67. package/dist/es/es2018/types/src/generated/types/ManagedContentDeploymentInputRepresentation.d.ts +43 -0
  68. package/dist/es/es2018/types/src/generated/types/ManagedContentDeploymentItemRepresentation.d.ts +40 -0
  69. package/dist/es/es2018/types/src/generated/types/ManagedContentDeploymentRepresentation.d.ts +50 -0
  70. package/dist/es/es2018/types/src/generated/types/ManagedContentDetailCollectionRepresentation.d.ts +32 -0
  71. package/dist/es/es2018/types/src/generated/types/ManagedContentDetailRepresentation.d.ts +37 -0
  72. package/dist/es/es2018/types/src/generated/types/ManagedContentDocumentRepresentation.d.ts +76 -0
  73. package/dist/es/es2018/types/src/generated/types/ManagedContentExportContentJobRequestInputRepresentation.d.ts +43 -0
  74. package/dist/es/es2018/types/src/generated/types/ManagedContentExportJobItemIdsInputList.d.ts +28 -0
  75. package/dist/es/es2018/types/src/generated/types/ManagedContentFolderSummaryRepresentation.d.ts +31 -0
  76. package/dist/es/es2018/types/src/generated/types/ManagedContentInputRep.d.ts +31 -0
  77. package/dist/es/es2018/types/src/generated/types/ManagedContentInputRepresentation.d.ts +44 -0
  78. package/dist/es/es2018/types/src/generated/types/ManagedContentJobRepresentation.d.ts +64 -0
  79. package/dist/es/es2018/types/src/generated/types/ManagedContentJobRequestInputRepresentation.d.ts +40 -0
  80. package/dist/es/es2018/types/src/generated/types/ManagedContentMediaNodeValueRepresentation.d.ts +56 -0
  81. package/dist/es/es2018/types/src/generated/types/ManagedContentMediaSourceNodeValueRepresentation.d.ts +50 -0
  82. package/dist/es/es2018/types/src/generated/types/ManagedContentNodeTypeRepresentation.d.ts +34 -0
  83. package/dist/es/es2018/types/src/generated/types/ManagedContentNodeValueRepresentation.d.ts +33 -0
  84. package/dist/es/es2018/types/src/generated/types/ManagedContentRepresentation.d.ts +31 -0
  85. package/dist/es/es2018/types/src/generated/types/ManagedContentScheduleInputRepresentation.d.ts +46 -0
  86. package/dist/es/es2018/types/src/generated/types/ManagedContentSearchResultCollectionRepresentation.d.ts +38 -0
  87. package/dist/es/es2018/types/src/generated/types/ManagedContentSearchResultContentTypeRepresentation.d.ts +31 -0
  88. package/dist/es/es2018/types/src/generated/types/ManagedContentSearchResultRepresentation.d.ts +44 -0
  89. package/dist/es/es2018/types/src/generated/types/ManagedContentSpaceFolderDetailRepresentation.d.ts +42 -0
  90. package/dist/es/es2018/types/src/generated/types/ManagedContentSpaceFolderInputRep.d.ts +31 -0
  91. package/dist/es/es2018/types/src/generated/types/ManagedContentSpaceFolderItemCollectionInputRep.d.ts +31 -0
  92. package/dist/es/es2018/types/src/generated/types/ManagedContentSpaceFolderItemCollectionRepresentation.d.ts +35 -0
  93. package/dist/es/es2018/types/src/generated/types/ManagedContentSpaceFolderItemRepresentation.d.ts +64 -0
  94. package/dist/es/es2018/types/src/generated/types/ManagedContentSpaceFolderRepresentation.d.ts +26 -0
  95. package/dist/es/es2018/types/src/generated/types/ManagedContentSpaceMemberCollectionRepresentation.d.ts +29 -0
  96. package/dist/es/es2018/types/src/generated/types/ManagedContentSpaceMemberInputRepresentation.d.ts +31 -0
  97. package/dist/es/es2018/types/src/generated/types/ManagedContentSpaceMemberPermissionsRepresentation.d.ts +37 -0
  98. package/dist/es/es2018/types/src/generated/types/ManagedContentSpaceMemberRepresentation.d.ts +34 -0
  99. package/dist/es/es2018/types/src/generated/types/ManagedContentSpacePermissionRepresentation.d.ts +49 -0
  100. package/dist/es/es2018/types/src/generated/types/ManagedContentSpaceRepresentation.d.ts +55 -0
  101. package/dist/es/es2018/types/src/generated/types/ManagedContentSpaceRoleCollectionRepresentation.d.ts +29 -0
  102. package/dist/es/es2018/types/src/generated/types/ManagedContentSpaceRoleRepresentation.d.ts +34 -0
  103. package/dist/es/es2018/types/src/generated/types/ManagedContentSpaceSummaryRepresentation.d.ts +31 -0
  104. package/dist/es/es2018/types/src/generated/types/ManagedContentTextNodeValueRepresentation.d.ts +29 -0
  105. package/dist/es/es2018/types/src/generated/types/ManagedContentTranslationRepresentation.d.ts +64 -0
  106. package/dist/es/es2018/types/src/generated/types/ManagedContentTranslationRequestInputRep.d.ts +37 -0
  107. package/dist/es/es2018/types/src/generated/types/ManagedContentTypeRepresentation.d.ts +39 -0
  108. package/dist/es/es2018/types/src/generated/types/ManagedContentTypeSchemaRepresentation.d.ts +49 -0
  109. package/dist/es/es2018/types/src/generated/types/ManagedContentTypeSearchableCollectionRepresentation.d.ts +38 -0
  110. package/dist/es/es2018/types/src/generated/types/ManagedContentTypeSearchableInputRepresentation.d.ts +31 -0
  111. package/dist/es/es2018/types/src/generated/types/ManagedContentTypeSearchableRepresentation.d.ts +37 -0
  112. package/dist/es/es2018/types/src/generated/types/ManagedContentTypeSummaryRepresentation.d.ts +31 -0
  113. package/dist/es/es2018/types/src/generated/types/ManagedContentTypeViewRepresentation.d.ts +38 -0
  114. package/dist/es/es2018/types/src/generated/types/ManagedContentUserSummaryRepresentation.d.ts +31 -0
  115. package/dist/es/es2018/types/src/generated/types/ManagedContentVariantRepresentation.d.ts +78 -0
  116. package/dist/es/es2018/types/src/generated/types/ManagedContentVariantUpdateInputRepresentation.d.ts +38 -0
  117. package/dist/es/es2018/types/src/generated/types/ManagedContentVariantV1InputRep.d.ts +46 -0
  118. package/dist/es/es2018/types/src/generated/types/ManagedContentVariantV1Representation.d.ts +49 -0
  119. package/dist/es/es2018/types/src/generated/types/ManagedContentVersionCollectionRepresentation.d.ts +49 -0
  120. package/dist/es/es2018/types/src/generated/types/ManagedContentVersionInputRep.d.ts +50 -0
  121. package/dist/es/es2018/types/src/generated/types/ManagedContentVersionInternalCollectionRepresentation.d.ts +32 -0
  122. package/dist/es/es2018/types/src/generated/types/ManagedContentVersionInternalRepresentation.d.ts +80 -0
  123. package/dist/es/es2018/types/src/generated/types/ManagedContentVersionRepresentation.d.ts +65 -0
  124. package/dist/es/es2018/types/src/generated/types/ManagedContentVersionSiteNodeCollectionRepresentation.d.ts +29 -0
  125. package/dist/es/es2018/types/src/generated/types/ManagedContentVersionSiteNodeRepresentation.d.ts +40 -0
  126. package/dist/es/es2018/types/src/generated/types/ManagedContentVersionV2CollectionInputRepresentation.d.ts +28 -0
  127. package/dist/es/es2018/types/src/generated/types/ManagedContentVersionV2CollectionRepresentation.d.ts +32 -0
  128. package/dist/es/es2018/types/src/generated/types/ManagedContentVersionV2InputRepresentation.d.ts +53 -0
  129. package/dist/es/es2018/types/src/generated/types/ManagedContentVersionV2Representation.d.ts +74 -0
  130. package/dist/es/es2018/types/src/generated/types/ReferenceRepresentation.d.ts +31 -0
  131. package/dist/es/es2018/types/src/generated/types/StreamedRepresentation.d.ts +25 -0
  132. package/dist/es/es2018/types/src/generated/types/TopicSummaryRepresentation.d.ts +31 -0
  133. package/dist/es/es2018/types/src/generated/types/type-utils.d.ts +32 -0
  134. package/package.json +75 -0
  135. package/sfdc/index.d.ts +1 -0
  136. package/sfdc/index.js +399 -0
  137. package/src/raml/api.raml +2924 -0
  138. package/src/raml/luvio.raml +17 -0
@@ -0,0 +1,25 @@
1
+ import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
2
+ export declare const VERSION = "8d2f375c4002acd98c8e4d4f8f83107b";
3
+ export declare function validate(obj: any, path?: string): TypeError | null;
4
+ export declare const RepresentationType: string;
5
+ export declare function normalize(input: StreamedRepresentation, existing: StreamedRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): StreamedRepresentationNormalized;
6
+ export declare const select: () => $64$luvio_engine_FragmentSelection;
7
+ export declare function equals(existing: StreamedRepresentationNormalized, incoming: StreamedRepresentationNormalized): boolean;
8
+ export declare const ingest: $64$luvio_engine_ResourceIngest;
9
+ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: StreamedRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
10
+ /**
11
+ * streamed representation.
12
+ *
13
+ * Keys:
14
+ * (none)
15
+ */
16
+ export interface StreamedRepresentationNormalized {
17
+ }
18
+ /**
19
+ * streamed representation.
20
+ *
21
+ * Keys:
22
+ * (none)
23
+ */
24
+ export interface StreamedRepresentation {
25
+ }
@@ -0,0 +1,31 @@
1
+ import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
2
+ export declare const VERSION = "9ec7dc6b69b4ea316becaf644cccef0c";
3
+ export declare function validate(obj: any, path?: string): TypeError | null;
4
+ export declare const RepresentationType: string;
5
+ export declare function normalize(input: TopicSummaryRepresentation, existing: TopicSummaryRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): TopicSummaryRepresentationNormalized;
6
+ export declare const select: () => $64$luvio_engine_FragmentSelection;
7
+ export declare function equals(existing: TopicSummaryRepresentationNormalized, incoming: TopicSummaryRepresentationNormalized): boolean;
8
+ export declare const ingest: $64$luvio_engine_ResourceIngest;
9
+ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: TopicSummaryRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
10
+ /**
11
+ * A summary of a topic
12
+ *
13
+ * Keys:
14
+ * (none)
15
+ */
16
+ export interface TopicSummaryRepresentationNormalized {
17
+ /** The ID of the topic */
18
+ id: string;
19
+ /** The name of the topic */
20
+ name: string;
21
+ }
22
+ /**
23
+ * A summary of a topic
24
+ *
25
+ * Keys:
26
+ * (none)
27
+ */
28
+ export interface TopicSummaryRepresentation {
29
+ id: string;
30
+ name: string;
31
+ }
@@ -0,0 +1,32 @@
1
+ import { NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
2
+ export declare const ObjectKeys: {
3
+ (o: object): string[];
4
+ (o: {}): string[];
5
+ }, ObjectCreate: {
6
+ (o: object | null): any;
7
+ (o: object | null, properties: PropertyDescriptorMap & ThisType<any>): any;
8
+ }, ObjectAssign: {
9
+ <T extends {}, U>(target: T, source: U): T & U;
10
+ <T_1 extends {}, U_1, V>(target: T_1, source1: U_1, source2: V): T_1 & U_1 & V;
11
+ <T_2 extends {}, U_2, V_1, W>(target: T_2, source1: U_2, source2: V_1, source3: W): T_2 & U_2 & V_1 & W;
12
+ (target: object, ...sources: any[]): any;
13
+ };
14
+ export declare const ArrayIsArray: (arg: any) => arg is any[];
15
+ export declare const JSONStringify: {
16
+ (value: any, replacer?: ((this: any, key: string, value: any) => any) | undefined, space?: string | number | undefined): string;
17
+ (value: any, replacer?: (string | number)[] | null | undefined, space?: string | number | undefined): string;
18
+ };
19
+ type AllowedPrimitives = boolean | string | number | Date | null;
20
+ type Value<T> = T extends AllowedPrimitives ? T : RecursivePartial<T>;
21
+ export type RecursivePartial<T> = null | {
22
+ [P in keyof T]?: T[P] extends Array<infer U> ? Array<Value<U>> | null : Value<T[P]> | null;
23
+ };
24
+ export declare function equalsArray<U, V extends U[]>(a: V, b: V, equalsItem: (itemA: U, itemB: U) => boolean | void): boolean;
25
+ export declare function equalsObject<U, V extends {
26
+ [key: string]: U;
27
+ }>(a: V, b: V, equalsProp: (propA: U, propB: U) => boolean | void): boolean;
28
+ export declare function createLink(ref: string | $64$luvio_engine_NormalizedKeyMetadata): {
29
+ __ref: string;
30
+ };
31
+ export declare function assignMetadataLink(entry: any, metadataKey: string | $64$luvio_engine_NormalizedKeyMetadata): void;
32
+ export {};
package/package.json ADDED
@@ -0,0 +1,75 @@
1
+ {
2
+ "name": "@salesforce/lds-adapters-cms-type",
3
+ "version": "0.1.0-dev1",
4
+ "license": "SEE LICENSE IN LICENSE.txt",
5
+ "description": "Wire adapters for cms content type",
6
+ "main": "dist/es/es2018/cms-type.js",
7
+ "module": "dist/es/es2018/cms-type.js",
8
+ "types": "dist/es/es2018/types/src/generated/artifacts/main.d.ts",
9
+ "files": [
10
+ "dist",
11
+ "sfdc",
12
+ "src/raml/*"
13
+ ],
14
+ "exports": {
15
+ ".": {
16
+ "types": "./dist/es/es2018/types/src/generated/artifacts/main.d.ts",
17
+ "import": "./dist/es/es2018/cms-type.js",
18
+ "require": "./dist/es/es2018/cms-type.js"
19
+ },
20
+ "./sfdc": {
21
+ "types": "./sfdc/index.d.ts",
22
+ "import": "./sfdc/index.js",
23
+ "default": "./sfdc/index.js"
24
+ }
25
+ },
26
+ "contributors": [
27
+ "psaraswathi@salesforce.com"
28
+ ],
29
+ "sfdc": {
30
+ "path": "forcelds/ldsAdaptersCmsType/",
31
+ "namespace": "lightning",
32
+ "module": "cmsTypeApi"
33
+ },
34
+ "scripts": {
35
+ "build": "yarn build:services",
36
+ "build:karma": "rollup --bundleConfigAsCjs --config rollup.config.karma.js",
37
+ "build:raml": "luvio generate src/raml/luvio.raml src/generated -p '../lds-compiler-plugins'",
38
+ "build:services": "rollup --bundleConfigAsCjs --config rollup.config.js",
39
+ "clean": "rm -rf dist sfdc src/generated karma/dist",
40
+ "release:core": "../../scripts/release/core.js --adapter=lds-adapters-cms-type",
41
+ "start": "nx build:karma && karma start",
42
+ "test": "nx build:karma && karma start --single-run",
43
+ "test:unit": "jest"
44
+ },
45
+ "dependencies": {
46
+ "@salesforce/lds-bindings": "^0.1.0-dev1"
47
+ },
48
+ "devDependencies": {
49
+ "@salesforce/lds-compiler-plugins": "^0.1.0-dev1",
50
+ "@salesforce/lds-karma": "^0.1.0-dev1"
51
+ },
52
+ "nx": {
53
+ "targets": {
54
+ "build": {
55
+ "outputs": [
56
+ "{projectRoot}/dist",
57
+ "{projectRoot}/sfdc"
58
+ ]
59
+ },
60
+ "build:raml": {
61
+ "outputs": [
62
+ "{projectRoot}/src/generated"
63
+ ]
64
+ },
65
+ "build:karma": {
66
+ "outputs": [
67
+ "{projectRoot}/karma/dist"
68
+ ]
69
+ }
70
+ }
71
+ },
72
+ "volta": {
73
+ "extends": "../../package.json"
74
+ }
75
+ }
@@ -0,0 +1 @@
1
+ export * from '../dist/es/es2018/types/src/generated/artifacts/sfdc';
package/sfdc/index.js ADDED
@@ -0,0 +1,399 @@
1
+ /**
2
+ * Copyright (c) 2022, Salesforce, Inc.,
3
+ * All rights reserved.
4
+ * For full license text, see the LICENSE.txt file
5
+ */
6
+
7
+ /*
8
+ * ATTENTION!
9
+ * THIS IS A GENERATED FILE FROM https://github.com/salesforce-experience-platform-emu/lds-lightning-platform
10
+ * If you would like to contribute to LDS, please follow the steps outlined in the git repo.
11
+ * Any changes made to this file in p4 will be automatically overwritten.
12
+ * *******************************************************************************************
13
+ */
14
+ /* proxy-compat-disable */
15
+ import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
16
+ import { withDefaultLuvio } from 'force/ldsEngine';
17
+ import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1, typeCheckConfig as typeCheckConfig$1, StoreKeyMap, createResourceParams as createResourceParams$1 } from 'force/luvioEngine';
18
+
19
+ const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
20
+ const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
21
+ const { isArray: ArrayIsArray$1 } = Array;
22
+ /**
23
+ * Validates an adapter config is well-formed.
24
+ * @param config The config to validate.
25
+ * @param adapter The adapter validation configuration.
26
+ * @param oneOf The keys the config must contain at least one of.
27
+ * @throws A TypeError if config doesn't satisfy the adapter's config validation.
28
+ */
29
+ function validateConfig(config, adapter, oneOf) {
30
+ const { displayName } = adapter;
31
+ const { required, optional, unsupported } = adapter.parameters;
32
+ if (config === undefined ||
33
+ required.every(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
34
+ throw new TypeError(`adapter ${displayName} configuration must specify ${required.sort().join(', ')}`);
35
+ }
36
+ if (oneOf && oneOf.some(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
37
+ throw new TypeError(`adapter ${displayName} configuration must specify one of ${oneOf.sort().join(', ')}`);
38
+ }
39
+ if (unsupported !== undefined &&
40
+ unsupported.some(req => ObjectPrototypeHasOwnProperty.call(config, req))) {
41
+ throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
42
+ }
43
+ const supported = required.concat(optional);
44
+ if (ObjectKeys$1(config).some(key => !supported.includes(key))) {
45
+ throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
46
+ }
47
+ }
48
+ function untrustedIsObject(untrusted) {
49
+ return typeof untrusted === 'object' && untrusted !== null && ArrayIsArray$1(untrusted) === false;
50
+ }
51
+ function areRequiredParametersPresent(config, configPropertyNames) {
52
+ return configPropertyNames.parameters.required.every(req => req in config);
53
+ }
54
+ const snapshotRefreshOptions = {
55
+ overrides: {
56
+ headers: {
57
+ 'Cache-Control': 'no-cache',
58
+ },
59
+ }
60
+ };
61
+ function generateParamConfigMetadata(name, required, resourceType, typeCheckShape, isArrayShape = false, coerceFn) {
62
+ return {
63
+ name,
64
+ required,
65
+ resourceType,
66
+ typeCheckShape,
67
+ isArrayShape,
68
+ coerceFn,
69
+ };
70
+ }
71
+ function buildAdapterValidationConfig(displayName, paramsMeta) {
72
+ const required = paramsMeta.filter(p => p.required).map(p => p.name);
73
+ const optional = paramsMeta.filter(p => !p.required).map(p => p.name);
74
+ return {
75
+ displayName,
76
+ parameters: {
77
+ required,
78
+ optional,
79
+ }
80
+ };
81
+ }
82
+ const keyPrefix = 'CMSType';
83
+
84
+ const { keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
85
+ const { isArray: ArrayIsArray } = Array;
86
+ const { stringify: JSONStringify } = JSON;
87
+ function createLink(ref) {
88
+ return {
89
+ __ref: serializeStructuredKey(ref),
90
+ };
91
+ }
92
+
93
+ function validate$1(obj, path = 'ManagedContentTypeViewRepresentation') {
94
+ const v_error = (() => {
95
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
96
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
97
+ }
98
+ const obj_view = obj.view;
99
+ const path_view = path + '.view';
100
+ if (typeof obj_view !== 'object' || ArrayIsArray(obj_view) || obj_view === null) {
101
+ return new TypeError('Expected "object" but received "' + typeof obj_view + '" (at "' + path_view + '")');
102
+ }
103
+ const obj_view_keys = ObjectKeys(obj_view);
104
+ for (let i = 0; i < obj_view_keys.length; i++) {
105
+ const key = obj_view_keys[i];
106
+ const obj_view_prop = obj_view[key];
107
+ const path_view_prop = path_view + '["' + key + '"]';
108
+ if (obj_view_prop === undefined) {
109
+ return new TypeError('Expected "defined" but received "' + typeof obj_view_prop + '" (at "' + path_view_prop + '")');
110
+ }
111
+ }
112
+ const obj_viewMode = obj.viewMode;
113
+ const path_viewMode = path + '.viewMode';
114
+ if (typeof obj_viewMode !== 'string') {
115
+ return new TypeError('Expected "string" but received "' + typeof obj_viewMode + '" (at "' + path_viewMode + '")');
116
+ }
117
+ const obj_viewType = obj.viewType;
118
+ const path_viewType = path + '.viewType';
119
+ if (typeof obj_viewType !== 'string') {
120
+ return new TypeError('Expected "string" but received "' + typeof obj_viewType + '" (at "' + path_viewType + '")');
121
+ }
122
+ })();
123
+ return v_error === undefined ? null : v_error;
124
+ }
125
+
126
+ const TTL = 3600000;
127
+ const VERSION = "3c4a15dba742b4df9662b670ac97d9ce";
128
+ function validate(obj, path = 'ManagedContentTypeSchemaRepresentation') {
129
+ const v_error = (() => {
130
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
131
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
132
+ }
133
+ if (obj.description !== undefined) {
134
+ const obj_description = obj.description;
135
+ const path_description = path + '.description';
136
+ if (typeof obj_description !== 'string') {
137
+ return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
138
+ }
139
+ }
140
+ if (obj.developerName !== undefined) {
141
+ const obj_developerName = obj.developerName;
142
+ const path_developerName = path + '.developerName';
143
+ if (typeof obj_developerName !== 'string') {
144
+ return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
145
+ }
146
+ }
147
+ if (obj.label !== undefined) {
148
+ const obj_label = obj.label;
149
+ const path_label = path + '.label';
150
+ if (typeof obj_label !== 'string') {
151
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
152
+ }
153
+ }
154
+ if (obj.namespacePrefix !== undefined) {
155
+ const obj_namespacePrefix = obj.namespacePrefix;
156
+ const path_namespacePrefix = path + '.namespacePrefix';
157
+ if (typeof obj_namespacePrefix !== 'string') {
158
+ return new TypeError('Expected "string" but received "' + typeof obj_namespacePrefix + '" (at "' + path_namespacePrefix + '")');
159
+ }
160
+ }
161
+ if (obj.schema !== undefined) {
162
+ const obj_schema = obj.schema;
163
+ const path_schema = path + '.schema';
164
+ if (typeof obj_schema !== 'object' || ArrayIsArray(obj_schema) || obj_schema === null) {
165
+ return new TypeError('Expected "object" but received "' + typeof obj_schema + '" (at "' + path_schema + '")');
166
+ }
167
+ const obj_schema_keys = ObjectKeys(obj_schema);
168
+ for (let i = 0; i < obj_schema_keys.length; i++) {
169
+ const key = obj_schema_keys[i];
170
+ const obj_schema_prop = obj_schema[key];
171
+ const path_schema_prop = path_schema + '["' + key + '"]';
172
+ if (obj_schema_prop === undefined) {
173
+ return new TypeError('Expected "defined" but received "' + typeof obj_schema_prop + '" (at "' + path_schema_prop + '")');
174
+ }
175
+ }
176
+ }
177
+ if (obj.views !== undefined) {
178
+ const obj_views = obj.views;
179
+ const path_views = path + '.views';
180
+ if (!ArrayIsArray(obj_views)) {
181
+ return new TypeError('Expected "array" but received "' + typeof obj_views + '" (at "' + path_views + '")');
182
+ }
183
+ for (let i = 0; i < obj_views.length; i++) {
184
+ const obj_views_item = obj_views[i];
185
+ const path_views_item = path_views + '[' + i + ']';
186
+ const referencepath_views_itemValidationError = validate$1(obj_views_item, path_views_item);
187
+ if (referencepath_views_itemValidationError !== null) {
188
+ let message = 'Object doesn\'t match ManagedContentTypeViewRepresentation (at "' + path_views_item + '")\n';
189
+ message += referencepath_views_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
190
+ return new TypeError(message);
191
+ }
192
+ }
193
+ }
194
+ })();
195
+ return v_error === undefined ? null : v_error;
196
+ }
197
+ const RepresentationType = 'ManagedContentTypeSchemaRepresentation';
198
+ function normalize(input, existing, path, luvio, store, timestamp) {
199
+ return input;
200
+ }
201
+ const select$1 = function ManagedContentTypeSchemaRepresentationSelect() {
202
+ return {
203
+ kind: 'Fragment',
204
+ version: VERSION,
205
+ private: [],
206
+ opaque: true
207
+ };
208
+ };
209
+ function equals(existing, incoming) {
210
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
211
+ return false;
212
+ }
213
+ return true;
214
+ }
215
+ const ingest = function ManagedContentTypeSchemaRepresentationIngest(input, path, luvio, store, timestamp) {
216
+ if (process.env.NODE_ENV !== 'production') {
217
+ const validateError = validate(input);
218
+ if (validateError !== null) {
219
+ throw validateError;
220
+ }
221
+ }
222
+ const key = path.fullPath;
223
+ const ttlToUse = TTL;
224
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "CMSType", VERSION, RepresentationType, equals);
225
+ return createLink(key);
226
+ };
227
+ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
228
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
229
+ const rootKey = fullPathFactory();
230
+ rootKeySet.set(rootKey, {
231
+ namespace: keyPrefix,
232
+ representationName: RepresentationType,
233
+ mergeable: false
234
+ });
235
+ }
236
+
237
+ function select(luvio, params) {
238
+ return select$1();
239
+ }
240
+ function keyBuilder$1(luvio, params) {
241
+ return keyPrefix + '::ManagedContentTypeSchemaRepresentation:(' + 'includeSchemaDefinitions:' + params.queryParams.includeSchemaDefinitions + ',' + 'language:' + params.queryParams.language + ',' + 'viewMode:' + params.queryParams.viewMode + ',' + 'contentTypeFQN:' + params.urlParams.contentTypeFQN + ')';
242
+ }
243
+ function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
244
+ getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
245
+ }
246
+ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
247
+ const { body } = response;
248
+ const key = keyBuilder$1(luvio, resourceParams);
249
+ luvio.storeIngest(key, ingest, body);
250
+ const snapshot = luvio.storeLookup({
251
+ recordId: key,
252
+ node: select(),
253
+ variables: {},
254
+ }, snapshotRefresh);
255
+ if (process.env.NODE_ENV !== 'production') {
256
+ if (snapshot.state !== 'Fulfilled') {
257
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
258
+ }
259
+ }
260
+ deepFreeze(snapshot.data);
261
+ return snapshot;
262
+ }
263
+ function ingestError(luvio, params, error, snapshotRefresh) {
264
+ const key = keyBuilder$1(luvio, params);
265
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
266
+ const storeMetadataParams = {
267
+ ttl: TTL,
268
+ namespace: keyPrefix,
269
+ version: VERSION,
270
+ representationName: RepresentationType
271
+ };
272
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
273
+ return errorSnapshot;
274
+ }
275
+ function createResourceRequest(config) {
276
+ const headers = {};
277
+ return {
278
+ baseUri: '/services/data/v66.0',
279
+ basePath: '/connect/cms/content-types/' + config.urlParams.contentTypeFQN + '',
280
+ method: 'get',
281
+ body: null,
282
+ urlParams: config.urlParams,
283
+ queryParams: config.queryParams,
284
+ headers,
285
+ priority: 'normal',
286
+ };
287
+ }
288
+
289
+ const adapterName = 'getContentType';
290
+ const getContentType_ConfigPropertyMetadata = [
291
+ generateParamConfigMetadata('contentTypeFQN', true, 0 /* UrlParameter */, 0 /* String */),
292
+ generateParamConfigMetadata('includeSchemaDefinitions', false, 1 /* QueryParameter */, 1 /* Boolean */),
293
+ generateParamConfigMetadata('language', false, 1 /* QueryParameter */, 0 /* String */),
294
+ generateParamConfigMetadata('viewMode', false, 1 /* QueryParameter */, 0 /* String */, true),
295
+ ];
296
+ const getContentType_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getContentType_ConfigPropertyMetadata);
297
+ const createResourceParams = /*#__PURE__*/ createResourceParams$1(getContentType_ConfigPropertyMetadata);
298
+ function keyBuilder(luvio, config) {
299
+ const resourceParams = createResourceParams(config);
300
+ return keyBuilder$1(luvio, resourceParams);
301
+ }
302
+ function typeCheckConfig(untrustedConfig) {
303
+ const config = {};
304
+ typeCheckConfig$1(untrustedConfig, config, getContentType_ConfigPropertyMetadata);
305
+ return config;
306
+ }
307
+ function validateAdapterConfig(untrustedConfig, configPropertyNames) {
308
+ if (!untrustedIsObject(untrustedConfig)) {
309
+ return null;
310
+ }
311
+ if (process.env.NODE_ENV !== 'production') {
312
+ validateConfig(untrustedConfig, configPropertyNames);
313
+ }
314
+ const config = typeCheckConfig(untrustedConfig);
315
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
316
+ return null;
317
+ }
318
+ return config;
319
+ }
320
+ function adapterFragment(luvio, config) {
321
+ createResourceParams(config);
322
+ return select();
323
+ }
324
+ function onFetchResponseSuccess(luvio, config, resourceParams, response) {
325
+ const snapshot = ingestSuccess(luvio, resourceParams, response, {
326
+ config,
327
+ resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
328
+ });
329
+ return luvio.storeBroadcast().then(() => snapshot);
330
+ }
331
+ function onFetchResponseError(luvio, config, resourceParams, response) {
332
+ const snapshot = ingestError(luvio, resourceParams, response, {
333
+ config,
334
+ resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
335
+ });
336
+ return luvio.storeBroadcast().then(() => snapshot);
337
+ }
338
+ function buildNetworkSnapshot(luvio, config, options) {
339
+ const resourceParams = createResourceParams(config);
340
+ const request = createResourceRequest(resourceParams);
341
+ return luvio.dispatchResourceRequest(request, options)
342
+ .then((response) => {
343
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
344
+ const cache = new StoreKeyMap();
345
+ getResponseCacheKeys(cache, luvio, resourceParams, response.body);
346
+ return cache;
347
+ });
348
+ }, (response) => {
349
+ return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
350
+ });
351
+ }
352
+ function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
353
+ return buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
354
+ }
355
+ function buildCachedSnapshotCachePolicy(context, storeLookup) {
356
+ const { luvio, config } = context;
357
+ const selector = {
358
+ recordId: keyBuilder(luvio, config),
359
+ node: adapterFragment(luvio, config),
360
+ variables: {},
361
+ };
362
+ const cacheSnapshot = storeLookup(selector, {
363
+ config,
364
+ resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
365
+ });
366
+ return cacheSnapshot;
367
+ }
368
+ const getContentTypeAdapterFactory = (luvio) => function CMSType__getContentType(untrustedConfig, requestContext) {
369
+ const config = validateAdapterConfig(untrustedConfig, getContentType_ConfigPropertyNames);
370
+ // Invalid or incomplete config
371
+ if (config === null) {
372
+ return null;
373
+ }
374
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
375
+ buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
376
+ };
377
+
378
+ let getContentType;
379
+ // Imperative GET Adapters
380
+ let getContentType_imperative;
381
+ // Adapter Metadata
382
+ const getContentTypeMetadata = { apiFamily: 'CMSType', name: 'getContentType', ttl: 3600000 };
383
+ // Notify Update Available
384
+ function bindExportsTo(luvio) {
385
+ // LDS Adapters
386
+ const getContentType_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getContentType', getContentTypeAdapterFactory), getContentTypeMetadata);
387
+ return {
388
+ getContentType: createWireAdapterConstructor(luvio, getContentType_ldsAdapter, getContentTypeMetadata),
389
+ // Imperative GET Adapters
390
+ getContentType_imperative: createImperativeAdapter(luvio, getContentType_ldsAdapter, getContentTypeMetadata),
391
+ // Notify Update Availables
392
+ };
393
+ }
394
+ withDefaultLuvio((luvio) => {
395
+ ({ getContentType, getContentType_imperative } = bindExportsTo(luvio));
396
+ });
397
+
398
+ export { getContentType, getContentType_imperative };
399
+ // version: 0.1.0-dev1-c978a7b010