@code.store/arcxp-sdk-ts 4.33.0 → 4.34.1

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.
@@ -34,3 +34,4 @@ export declare const ArcAPI: (options: ArcAPIOptions) => {
34
34
  Tags: ArcTags;
35
35
  ContentOps: ArcContentOps;
36
36
  };
37
+ export type ArcAPIType = ReturnType<typeof ArcAPI>;
@@ -54,10 +54,10 @@ export type Operation = {
54
54
  endpoint: string;
55
55
  };
56
56
  export type ANSContent = AStory | AGallery | AnImage | AuthorANS | TagANS | VideoContent;
57
- export type PostANSPayload = {
57
+ export type PostANSPayload<ANS extends ANSContent = ANSContent> = {
58
58
  sourceId: string;
59
59
  sourceType: string;
60
- ANS: ANSContent;
60
+ ANS: ANS;
61
61
  references?: unknown[];
62
62
  circulations?: CirculationReference[];
63
63
  operations?: Operation[];
@@ -3,5 +3,5 @@ import { WsClient } from '../ws.client';
3
3
  export declare class ArcRetailEvents {
4
4
  private readonly options;
5
5
  constructor(options: Pick<ArcAPIOptions, 'credentials'>);
6
- createWsClient(index?: '0' | '1' | 'string'): WsClient;
6
+ createWsClient(index?: '0' | '1' | string): WsClient;
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/retail-events/index.ts"],"names":[],"mappings":";;;AACA,4CAAwC;AAExC,MAAa,eAAe;IAC1B,YAA6B,OAA2C;QAA3C,YAAO,GAAP,OAAO,CAAoC;IAAG,CAAC;IAE5E,cAAc,CAAC,QAA8B,GAAG;QAC9C,MAAM,OAAO,GAAG,aAAa,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,gBAAgB,iDAAiD,KAAK,EAAE,CAAC;QAC/H,MAAM,OAAO,GAAG;YACd,aAAa,EAAE,UAAU,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,WAAW,EAAE;SAChE,CAAC;QAEF,OAAO,IAAI,oBAAQ,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;IAC5C,CAAC;CACF;AAXD,0CAWC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/retail-events/index.ts"],"names":[],"mappings":";;;AACA,4CAAwC;AAExC,MAAa,eAAe;IAC1B,YAA6B,OAA2C;QAA3C,YAAO,GAAP,OAAO,CAAoC;IAAG,CAAC;IAE5E,cAAc,CAAC,QAA4B,GAAG;QAC5C,MAAM,OAAO,GAAG,aAAa,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,gBAAgB,iDAAiD,KAAK,EAAE,CAAC;QAC/H,MAAM,OAAO,GAAG;YACd,aAAa,EAAE,UAAU,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,WAAW,EAAE;SAChE,CAAC;QAEF,OAAO,IAAI,oBAAQ,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;IAC5C,CAAC;CACF;AAXD,0CAWC"}
package/dist/index.d.ts CHANGED
@@ -1,9 +1,4 @@
1
- import { ArcAPI } from './api';
2
- import { ArcError } from './api/error';
3
- import { WsClient } from './api/ws.client';
4
- import { ContentElement, ContentElementType } from './content-elements';
5
- import * as ArcTypes from './types';
6
- import { ArcUtils } from './utils/arc';
1
+ export * as ArcTypes from './types';
7
2
  export * from './api/identity/types';
8
3
  export * from './api/draft/types';
9
4
  export * from './api/site/types';
@@ -17,4 +12,9 @@ export * from './api/photo-center/types';
17
12
  export * from './api/global-settings/types';
18
13
  export * from './api/tags/types';
19
14
  export * from './api/content-ops/types';
20
- export { ArcAPI, ArcUtils, WsClient, ContentElement, ContentElementType, ArcTypes, ArcError };
15
+ export { ArcAPI, ArcAPIType } from './api';
16
+ export { ArcUtils } from './utils/arc';
17
+ export { ArcError } from './api/error';
18
+ export { WsClient } from './api/ws.client';
19
+ export { ContentElement, ContentElementType } from './content-elements';
20
+ export * as AnsMapper from './mapper';
package/dist/index.js CHANGED
@@ -26,19 +26,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
26
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.ArcError = exports.ArcTypes = exports.ContentElement = exports.WsClient = exports.ArcUtils = exports.ArcAPI = void 0;
30
- const api_1 = require("./api");
31
- Object.defineProperty(exports, "ArcAPI", { enumerable: true, get: function () { return api_1.ArcAPI; } });
32
- const error_1 = require("./api/error");
33
- Object.defineProperty(exports, "ArcError", { enumerable: true, get: function () { return error_1.ArcError; } });
34
- const ws_client_1 = require("./api/ws.client");
35
- Object.defineProperty(exports, "WsClient", { enumerable: true, get: function () { return ws_client_1.WsClient; } });
36
- const content_elements_1 = require("./content-elements");
37
- Object.defineProperty(exports, "ContentElement", { enumerable: true, get: function () { return content_elements_1.ContentElement; } });
38
- const ArcTypes = __importStar(require("./types"));
39
- exports.ArcTypes = ArcTypes;
40
- const arc_1 = require("./utils/arc");
41
- Object.defineProperty(exports, "ArcUtils", { enumerable: true, get: function () { return arc_1.ArcUtils; } });
29
+ exports.AnsMapper = exports.ContentElement = exports.WsClient = exports.ArcError = exports.ArcUtils = exports.ArcAPI = exports.ArcTypes = void 0;
30
+ exports.ArcTypes = __importStar(require("./types"));
42
31
  __exportStar(require("./api/identity/types"), exports);
43
32
  __exportStar(require("./api/draft/types"), exports);
44
33
  __exportStar(require("./api/site/types"), exports);
@@ -52,4 +41,15 @@ __exportStar(require("./api/photo-center/types"), exports);
52
41
  __exportStar(require("./api/global-settings/types"), exports);
53
42
  __exportStar(require("./api/tags/types"), exports);
54
43
  __exportStar(require("./api/content-ops/types"), exports);
44
+ var api_1 = require("./api");
45
+ Object.defineProperty(exports, "ArcAPI", { enumerable: true, get: function () { return api_1.ArcAPI; } });
46
+ var arc_1 = require("./utils/arc");
47
+ Object.defineProperty(exports, "ArcUtils", { enumerable: true, get: function () { return arc_1.ArcUtils; } });
48
+ var error_1 = require("./api/error");
49
+ Object.defineProperty(exports, "ArcError", { enumerable: true, get: function () { return error_1.ArcError; } });
50
+ var ws_client_1 = require("./api/ws.client");
51
+ Object.defineProperty(exports, "WsClient", { enumerable: true, get: function () { return ws_client_1.WsClient; } });
52
+ var content_elements_1 = require("./content-elements");
53
+ Object.defineProperty(exports, "ContentElement", { enumerable: true, get: function () { return content_elements_1.ContentElement; } });
54
+ exports.AnsMapper = __importStar(require("./mapper"));
55
55
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA+B;AAqBtB,uFArBA,YAAM,OAqBA;AApBf,uCAAuC;AAoB4C,yFApB1E,gBAAQ,OAoB0E;AAnB3F,+CAA2C;AAmBhB,yFAnBlB,oBAAQ,OAmBkB;AAlBnC,yDAAwE;AAkBnC,+FAlB5B,iCAAc,OAkB4B;AAjBnD,kDAAoC;AAiBqC,4BAAQ;AAhBjF,qCAAuC;AAgBtB,yFAhBR,cAAQ,OAgBQ;AAdzB,uDAAqC;AACrC,oDAAkC;AAClC,mDAAiC;AACjC,kDAAgC;AAChC,uDAAqC;AACrC,+DAA6C;AAC7C,oDAAkC;AAClC,sDAAoC;AACpC,sDAAoC;AACpC,2DAAyC;AACzC,8DAA4C;AAC5C,mDAAiC;AACjC,0DAAwC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAoC;AACpC,uDAAqC;AACrC,oDAAkC;AAClC,mDAAiC;AACjC,kDAAgC;AAChC,uDAAqC;AACrC,+DAA6C;AAC7C,oDAAkC;AAClC,sDAAoC;AACpC,sDAAoC;AACpC,2DAAyC;AACzC,8DAA4C;AAC5C,mDAAiC;AACjC,0DAAwC;AAExC,6BAA2C;AAAlC,6FAAA,MAAM,OAAA;AACf,mCAAuC;AAA9B,+FAAA,QAAQ,OAAA;AACjB,qCAAuC;AAA9B,iGAAA,QAAQ,OAAA;AACjB,6CAA2C;AAAlC,qGAAA,QAAQ,OAAA;AACjB,uDAAwE;AAA/D,kHAAA,cAAc,OAAA;AACvB,sDAAsC"}
@@ -0,0 +1,55 @@
1
+ import type { ANSContent, CirculationReference, PostANSParams, PostANSPayload } from '../api/migration-center/types';
2
+ import type { ArcTypes, ContentElementType } from '..';
3
+ import type { MaybePromise, Optional } from '../types/utils';
4
+ /**
5
+ * Base class for all arc entities, it provides common methods and properties
6
+ * If you want to create a new entity subtype you should extend this class
7
+ *
8
+ * Use case: You want to migrate stories from BBC
9
+ * You define `class BBCStory extends ArcDocument<ArcTypes.Story.AStory>` and implement all abstract methods
10
+ * Then you can override the specific methods to enrich the story with the data from BBC
11
+ *
12
+ * To migrate it call .migrate() method
13
+ */
14
+ export declare abstract class Document<ANS extends ANSContent> {
15
+ ans: ANS | null;
16
+ circulations: CirculationReference[];
17
+ init(): Promise<void>;
18
+ abstract sourceId(): MaybePromise<string>;
19
+ abstract sourceType(): MaybePromise<string>;
20
+ abstract websiteId(): MaybePromise<string>;
21
+ abstract legacyUrl(): MaybePromise<string>;
22
+ abstract arcId(): MaybePromise<string>;
23
+ abstract type(): MaybePromise<string>;
24
+ abstract groupId(): MaybePromise<string>;
25
+ abstract version(): ArcTypes.Story.DescribesTheANSVersionOfThisObject;
26
+ abstract getAns(): MaybePromise<ANS>;
27
+ prepare(): Promise<{
28
+ params: PostANSParams;
29
+ payload: PostANSPayload<ANS>;
30
+ }>;
31
+ private payload;
32
+ private params;
33
+ protected additionalProperties(): PostANSPayload['arcAdditionalProperties'];
34
+ protected priority(): 'historical' | 'live';
35
+ protected getDistributor(): MaybePromise<Optional<ArcTypes.Story.Distributor>>;
36
+ protected getLanguage(): string;
37
+ protected getComments(): Optional<ArcTypes.Story.Comments>;
38
+ protected getSource(): Promise<Optional<ArcTypes.Story.Source>>;
39
+ protected getSubheadlines(): Optional<ArcTypes.Story.SubHeadlines>;
40
+ protected getDescription(): Optional<ArcTypes.Story.Description>;
41
+ protected formatDate(date?: Date): string | undefined;
42
+ protected getDisplayDate(): Optional<Date>;
43
+ protected getContentElements(): Promise<ContentElementType<any>[]>;
44
+ protected getPublicationDate(): Optional<Date>;
45
+ protected getHeadlines(): Optional<ArcTypes.Story.Headlines>;
46
+ protected getTags(): MaybePromise<Optional<ArcTypes.Story.Tag[]>>;
47
+ protected getSubtype(): MaybePromise<Optional<ArcTypes.Story.SubtypeOrTemplate>>;
48
+ protected getLabel(): MaybePromise<Optional<ArcTypes.Story.Label>>;
49
+ protected getRelatedContent(): MaybePromise<Optional<ArcTypes.Story.Related_Content>>;
50
+ protected getPromoItems(): Promise<Optional<ArcTypes.Story.PromoItems>>;
51
+ protected getWebskedStatusCode(): MaybePromise<ArcTypes.Story.WorkflowInformation['status_code']>;
52
+ protected getCreditsBy(): MaybePromise<ArcTypes.Story.By>;
53
+ protected getCirculations(): MaybePromise<CirculationReference[]>;
54
+ protected getEditorNote(): MaybePromise<Optional<ArcTypes.Story.Editor_Note>>;
55
+ }
@@ -0,0 +1,131 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Document = void 0;
4
+ /**
5
+ * Base class for all arc entities, it provides common methods and properties
6
+ * If you want to create a new entity subtype you should extend this class
7
+ *
8
+ * Use case: You want to migrate stories from BBC
9
+ * You define `class BBCStory extends ArcDocument<ArcTypes.Story.AStory>` and implement all abstract methods
10
+ * Then you can override the specific methods to enrich the story with the data from BBC
11
+ *
12
+ * To migrate it call .migrate() method
13
+ */
14
+ class Document {
15
+ constructor() {
16
+ this.ans = null;
17
+ this.circulations = [];
18
+ }
19
+ async init() {
20
+ // fetch necessary data and validate it here
21
+ }
22
+ async prepare() {
23
+ await this.init();
24
+ const payload = await this.payload();
25
+ const params = await this.params();
26
+ return { payload, params };
27
+ }
28
+ async payload() {
29
+ this.ans = await this.getAns();
30
+ this.circulations = await this.getCirculations();
31
+ return {
32
+ sourceId: await this.sourceId(),
33
+ sourceType: await this.sourceType(),
34
+ ANS: this.ans,
35
+ circulations: this.circulations,
36
+ arcAdditionalProperties: this.additionalProperties(),
37
+ };
38
+ }
39
+ async params() {
40
+ if (!this.websiteId()) {
41
+ throw new Error('Website is not initialized! get params() should be called after payload()!');
42
+ }
43
+ return {
44
+ website: await this.websiteId(),
45
+ groupId: await this.groupId(),
46
+ priority: this.priority(),
47
+ };
48
+ }
49
+ additionalProperties() {
50
+ return {
51
+ story: {
52
+ publish: false,
53
+ },
54
+ };
55
+ }
56
+ priority() {
57
+ return 'historical';
58
+ }
59
+ getDistributor() {
60
+ return;
61
+ }
62
+ getLanguage() {
63
+ return 'en-GB';
64
+ }
65
+ getComments() {
66
+ return;
67
+ }
68
+ async getSource() {
69
+ return {
70
+ name: 'code-store',
71
+ system: 'code-store',
72
+ source_id: await this.sourceId(),
73
+ };
74
+ }
75
+ getSubheadlines() {
76
+ return {
77
+ basic: '',
78
+ };
79
+ }
80
+ getDescription() {
81
+ return this.getSubheadlines();
82
+ }
83
+ formatDate(date) {
84
+ if (!date)
85
+ return;
86
+ return date.toISOString();
87
+ }
88
+ getDisplayDate() {
89
+ return new Date();
90
+ }
91
+ async getContentElements() {
92
+ return [];
93
+ }
94
+ getPublicationDate() {
95
+ return new Date();
96
+ }
97
+ getHeadlines() {
98
+ return {
99
+ basic: '',
100
+ };
101
+ }
102
+ getTags() {
103
+ return [];
104
+ }
105
+ getSubtype() {
106
+ return;
107
+ }
108
+ getLabel() {
109
+ return;
110
+ }
111
+ getRelatedContent() {
112
+ return;
113
+ }
114
+ async getPromoItems() {
115
+ return;
116
+ }
117
+ getWebskedStatusCode() {
118
+ return;
119
+ }
120
+ getCreditsBy() {
121
+ return [];
122
+ }
123
+ getCirculations() {
124
+ return [];
125
+ }
126
+ getEditorNote() {
127
+ return;
128
+ }
129
+ }
130
+ exports.Document = Document;
131
+ //# sourceMappingURL=doc.js.map
@@ -0,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C;IACZ,CAAC;IAES,aAAa;QACrB,OAAO;IACT,CAAC;CACF;AA5JD,4BA4JC"}
@@ -0,0 +1,2 @@
1
+ export { Document } from './doc';
2
+ export { Story } from './story';
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Story = exports.Document = void 0;
4
+ var doc_1 = require("./doc");
5
+ Object.defineProperty(exports, "Document", { enumerable: true, get: function () { return doc_1.Document; } });
6
+ var story_1 = require("./story");
7
+ Object.defineProperty(exports, "Story", { enumerable: true, get: function () { return story_1.Story; } });
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/mapper/index.ts"],"names":[],"mappings":";;;AAAA,6BAAiC;AAAxB,+FAAA,QAAQ,OAAA;AACjB,iCAAgC;AAAvB,8FAAA,KAAK,OAAA"}
@@ -0,0 +1,24 @@
1
+ import type { ANSContent } from '../api/migration-center/types';
2
+ import type * as Types from '../types';
3
+ import { Document } from './doc';
4
+ /**
5
+ * Base class for all arc stories, it provides common methods and properties
6
+ * If you want to create a new story subtype you should extend this class
7
+ *
8
+ * Use case: You want to migrate stories from BBC
9
+ * You define `class BBCStory extends ArcStory` and implement all abstract methods
10
+ * Then you need to override the specific methods to enrich the story with the data from BBC
11
+ *
12
+ * For example:
13
+ * To add tag to BBC stories you need to override
14
+ * protected getTags(): MaybePromise<ArcTypes.Story.Tag[]> {
15
+ * return [{
16
+ * slug: 'bbc',
17
+ * text: 'bbc',
18
+ * }];
19
+ * }
20
+ */
21
+ export declare abstract class Story<ANS extends ANSContent = Types.Story.AStory> extends Document<ANS> {
22
+ type(): "story";
23
+ getAns(): Promise<ANS>;
24
+ }
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Story = void 0;
4
+ const doc_1 = require("./doc");
5
+ /**
6
+ * Base class for all arc stories, it provides common methods and properties
7
+ * If you want to create a new story subtype you should extend this class
8
+ *
9
+ * Use case: You want to migrate stories from BBC
10
+ * You define `class BBCStory extends ArcStory` and implement all abstract methods
11
+ * Then you need to override the specific methods to enrich the story with the data from BBC
12
+ *
13
+ * For example:
14
+ * To add tag to BBC stories you need to override
15
+ * protected getTags(): MaybePromise<ArcTypes.Story.Tag[]> {
16
+ * return [{
17
+ * slug: 'bbc',
18
+ * text: 'bbc',
19
+ * }];
20
+ * }
21
+ */
22
+ class Story extends doc_1.Document {
23
+ type() {
24
+ return 'story';
25
+ }
26
+ async getAns() {
27
+ const id = await this.arcId();
28
+ const version = this.version();
29
+ const type = this.type();
30
+ const publicationDate = this.getPublicationDate();
31
+ const headlines = this.getHeadlines();
32
+ const subheadlines = this.getSubheadlines();
33
+ const description = this.getDescription();
34
+ const language = this.getLanguage();
35
+ const tags = await this.getTags();
36
+ const subtype = await this.getSubtype();
37
+ const label = await this.getLabel();
38
+ const by = await this.getCreditsBy();
39
+ const relatedContent = await this.getRelatedContent();
40
+ const editorNote = await this.getEditorNote();
41
+ const distributor = await this.getDistributor();
42
+ const promoItems = await this.getPromoItems();
43
+ const contentElements = await this.getContentElements();
44
+ const webskedStatusCode = await this.getWebskedStatusCode();
45
+ const websiteId = await this.websiteId();
46
+ const source = await this.getSource();
47
+ const comments = await this.getComments();
48
+ const legacyUrl = await this.legacyUrl();
49
+ return {
50
+ type,
51
+ _id: id,
52
+ version,
53
+ website: websiteId,
54
+ canonical_website: websiteId,
55
+ language,
56
+ subtype,
57
+ label,
58
+ editor_note: editorNote,
59
+ credits: {
60
+ by,
61
+ },
62
+ headlines,
63
+ subheadlines,
64
+ description,
65
+ distributor,
66
+ promo_items: promoItems,
67
+ related_content: relatedContent,
68
+ created_date: this.formatDate(new Date()),
69
+ first_publish_date: this.formatDate(publicationDate),
70
+ publish_date: this.formatDate(publicationDate),
71
+ display_date: this.formatDate(this.getDisplayDate()),
72
+ source,
73
+ comments,
74
+ taxonomy: {
75
+ tags,
76
+ },
77
+ workflow: {
78
+ status_code: webskedStatusCode,
79
+ },
80
+ content_elements: contentElements,
81
+ additional_properties: {
82
+ url: legacyUrl,
83
+ },
84
+ };
85
+ }
86
+ }
87
+ exports.Story = Story;
88
+ //# sourceMappingURL=story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"story.js","sourceRoot":"","sources":["../../src/mapper/story.ts"],"names":[],"mappings":";;;AAEA,+BAAiC;AAEjC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAsB,KAAmD,SAAQ,cAAa;IAC5F,IAAI;QACF,OAAO,OAAgB,CAAC;IAC1B,CAAC;IAED,KAAK,CAAC,MAAM;QACV,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;QAC9B,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;QAC/B,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QACzB,MAAM,eAAe,GAAG,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAClD,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QACtC,MAAM,YAAY,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;QAC5C,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QAC1C,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QACpC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;QAClC,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;QACxC,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;QACpC,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,YAAY,EAAE,CAAC;QACrC,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACtD,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;QAC9C,MAAM,WAAW,GAAG,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lED,sBAkEC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const vitest_1 = require("vitest");
4
+ const content_elements_1 = require("../../content-elements");
5
+ const mapper_1 = require("../../mapper");
6
+ (0, vitest_1.describe)('Mapper', () => {
7
+ const ans = {
8
+ type: 'story',
9
+ _id: 'arc_id',
10
+ version: '1.0.0',
11
+ website: 'website_id',
12
+ canonical_website: 'website_id',
13
+ language: 'en-GB',
14
+ subtype: 'subtype',
15
+ credits: { by: [] },
16
+ headlines: { basic: '' },
17
+ subheadlines: { basic: '' },
18
+ description: { basic: '' },
19
+ created_date: vitest_1.expect.any(String),
20
+ first_publish_date: vitest_1.expect.any(String),
21
+ publish_date: vitest_1.expect.any(String),
22
+ display_date: vitest_1.expect.any(String),
23
+ source: { name: 'code-store', system: 'code-store', source_id: 'source_id' },
24
+ taxonomy: { tags: [] },
25
+ workflow: vitest_1.expect.any(Object),
26
+ content_elements: [{ type: 'text', content: '', alignment: 'left' }],
27
+ additional_properties: { url: 'legacy_url' },
28
+ };
29
+ const mocks = {
30
+ init: vitest_1.vi.fn().mockResolvedValue(undefined),
31
+ getSourceId: vitest_1.vi.fn().mockResolvedValue('source_id'),
32
+ getSourceType: vitest_1.vi.fn().mockResolvedValue('source_type'),
33
+ getWebsiteId: vitest_1.vi.fn().mockResolvedValue('website_id'),
34
+ getLegacyUrl: vitest_1.vi.fn().mockResolvedValue('legacy_url'),
35
+ getArcId: vitest_1.vi.fn().mockResolvedValue('arc_id'),
36
+ getGroupId: vitest_1.vi.fn().mockResolvedValue('group_id'),
37
+ getSubtype: vitest_1.vi.fn().mockResolvedValue('subtype'),
38
+ getContentElements: vitest_1.vi.fn().mockResolvedValue([content_elements_1.ContentElement.text('')]),
39
+ };
40
+ class CodeStory extends mapper_1.Story {
41
+ constructor() {
42
+ super(...arguments);
43
+ this.version = () => '1.0.0';
44
+ this.groupId = mocks.getGroupId;
45
+ this.sourceId = mocks.getSourceId;
46
+ this.sourceType = mocks.getSourceType;
47
+ this.websiteId = mocks.getWebsiteId;
48
+ this.legacyUrl = mocks.getLegacyUrl;
49
+ this.arcId = mocks.getArcId;
50
+ this.init = mocks.init;
51
+ this.getSubtype = mocks.getSubtype;
52
+ this.getContentElements = mocks.getContentElements;
53
+ }
54
+ }
55
+ (0, vitest_1.beforeEach)(() => {
56
+ vitest_1.vi.clearAllMocks();
57
+ });
58
+ (0, vitest_1.test)('Should return valid ANS', async () => {
59
+ const story = new CodeStory();
60
+ const ans = await story.getAns();
61
+ (0, vitest_1.expect)(ans).toBeDefined();
62
+ (0, vitest_1.expect)(ans.type).toBe('story');
63
+ (0, vitest_1.expect)(ans._id).toBe('arc_id');
64
+ (0, vitest_1.expect)(ans.version).toBe('1.0.0');
65
+ });
66
+ (0, vitest_1.test)('prepare() should call params, payload, getAns', async () => {
67
+ const story = new CodeStory();
68
+ const getAns = vitest_1.vi.spyOn(story, 'getAns');
69
+ const payload = vitest_1.vi.spyOn(story, 'payload');
70
+ const params = vitest_1.vi.spyOn(story, 'params');
71
+ const result = await story.prepare();
72
+ (0, vitest_1.expect)(mocks.init).toBeCalledTimes(1);
73
+ (0, vitest_1.expect)(getAns).toBeCalledTimes(1);
74
+ (0, vitest_1.expect)(payload).toBeCalledTimes(1);
75
+ (0, vitest_1.expect)(params).toBeCalledTimes(1);
76
+ (0, vitest_1.expect)(mocks.getContentElements).toBeCalledTimes(1);
77
+ (0, vitest_1.expect)(result.params).toBeDefined();
78
+ (0, vitest_1.expect)(result.params.website).toBe('website_id');
79
+ (0, vitest_1.expect)(result.params.groupId).toBe('group_id');
80
+ (0, vitest_1.expect)(result.params.priority).toBe('historical');
81
+ (0, vitest_1.expect)(result.payload).toBeDefined();
82
+ (0, vitest_1.expect)(result.payload.sourceId).toBe('source_id');
83
+ (0, vitest_1.expect)(result.payload.sourceType).toBe('source_type');
84
+ (0, vitest_1.expect)(result.payload.ANS).toMatchObject(ans);
85
+ });
86
+ });
87
+ //# sourceMappingURL=mapper.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapper.test.js","sourceRoot":"","sources":["../../../src/tests/ans/mapper.test.ts"],"names":[],"mappings":";;AAAA,mCAAgE;AAChE,6DAAwD;AACxD,yCAAqC;AAErC,IAAA,iBAAQ,EAAC,QAAQ,EAAE,GAAG,EAAE;IACtB,MAAM,GAAG,GAAG;QACV,IAAI,EAAE,OAAO;QACb,GAAG,EAAE,QAAQ;QACb,OAAO,EAAE,OAAO;QAChB,OAAO,EAAE,YAAY;QACrB,iBAAiB,EAAE,YAAY;QAC/B,QAAQ,EAAE,OAAO;QACjB,OAAO,EAAE,SAAS;QAClB,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;QACnB,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;QACxB,YAAY,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;QAC3B,WAAW,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;QAC1B,YAAY,EAAE,eAAM,CAAC,GAAG,CAAC,MAAM,CAAC;QAChC,kBAAkB,EAAE,eAAM,CAAC,GAAG,CAAC,MAAM,CAAC;QACtC,YAAY,EAAE,eAAM,CAAC,GAAG,CAAC,MAAM,CAAC;QAChC,YAAY,EAAE,eAAM,CAAC,GAAG,CAAC,MAAM,CAAC;QAChC,MAAM,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE;QAC5E,QAAQ,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;QACtB,QAAQ,EAAE,eAAM,CAAC,GAAG,CAAC,MAAM,CAAC;QAC5B,gBAAgB,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;QACpE,qBAAqB,EAAE,EAAE,GAAG,EAAE,YAAY,EAAE;KAC7C,CAAC;IA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Ae,CAAC,CAAC,CAAC,CAAC;QACnC,IAAA,eAAM,EAAC,MAAM,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;QAClC,IAAA,eAAM,EAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;QAEpD,IAAA,eAAM,EAAC,MAAM,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;QACpC,IAAA,eAAM,EAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACjD,IAAA,eAAM,EAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC/C,IAAA,eAAM,EAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAElD,IAAA,eAAM,EAAC,MAAM,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC;QACrC,IAAA,eAAM,EAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAClD,IAAA,eAAM,EAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACtD,IAAA,eAAM,EAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IAChD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -3,3 +3,4 @@ export * as Story from './story';
3
3
  export * as Section from './section';
4
4
  export * as Gallery from './gallery';
5
5
  export * as Video from './video';
6
+ export * as Utils from './utils';
@@ -23,10 +23,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.Video = exports.Gallery = exports.Section = exports.Story = exports.Author = void 0;
26
+ exports.Utils = exports.Video = exports.Gallery = exports.Section = exports.Story = exports.Author = void 0;
27
27
  exports.Author = __importStar(require("./author"));
28
28
  exports.Story = __importStar(require("./story"));
29
29
  exports.Section = __importStar(require("./section"));
30
30
  exports.Gallery = __importStar(require("./gallery"));
31
31
  exports.Video = __importStar(require("./video"));
32
+ exports.Utils = __importStar(require("./utils"));
32
33
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAmC;AACnC,iDAAiC;AACjC,qDAAqC;AACrC,qDAAqC;AACrC,iDAAiC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAmC;AACnC,iDAAiC;AACjC,qDAAqC;AACrC,qDAAqC;AACrC,iDAAiC;AACjC,iDAAiC"}
@@ -0,0 +1,2 @@
1
+ export type MaybePromise<T> = T | Promise<T>;
2
+ export type Optional<T> = T | undefined;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/types/utils.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code.store/arcxp-sdk-ts",
3
- "version": "4.33.0",
3
+ "version": "4.34.1",
4
4
  "description": "A strongly typed set of ArcXP API's and utilities reduce the amount of work required to develop with ArcXP, starting with reducing the boilerplate code you have to write.",
5
5
  "type": "commonjs",
6
6
  "main": "./dist/index.js",
@@ -13,7 +13,9 @@
13
13
  "url": "https://github.com/code-store-platform/arcxp-sdk-ts"
14
14
  },
15
15
  "homepage": "https://github.com/code-store-platform/arcxp-sdk-ts",
16
- "files": ["dist"],
16
+ "files": [
17
+ "dist"
18
+ ],
17
19
  "scripts": {
18
20
  "build": "tsc",
19
21
  "format": "npx @biomejs/biome format --write .",
@@ -24,7 +26,11 @@
24
26
  "cs": "npx changeset && npx changeset version",
25
27
  "swaggerToTypes": "npx swagger-typescript-api -p ./tmp/swagger.json -o ./tmp -n swaggerTypes.ts"
26
28
  },
27
- "keywords": ["ArcXP", "SDK", "Code.Store"],
29
+ "keywords": [
30
+ "ArcXP",
31
+ "SDK",
32
+ "Code.Store"
33
+ ],
28
34
  "author": "code.store",
29
35
  "license": "MIT",
30
36
  "dependencies": {