@code.store/arcxp-sdk-ts 4.29.0 → 4.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { ArcAbstractAPI, ArcAPIOptions } from '../abstract-api';
|
|
2
|
-
import { CreateTaskPayload, CreateTaskResponse, GetPublicationsResponse, ReportStatusChangePayload,
|
|
2
|
+
import { CreateTaskPayload, CreateTaskResponse, GetPublicationsResponse, ReportStatusChangePayload, SectionEdition, WebskedPublication } from './types';
|
|
3
3
|
export declare class ArcWebsked extends ArcAbstractAPI {
|
|
4
4
|
constructor(options: ArcAPIOptions);
|
|
5
5
|
reportStatusChange(payload: ReportStatusChangePayload): Promise<void>;
|
|
6
6
|
createTask(payload: CreateTaskPayload): Promise<CreateTaskResponse>;
|
|
7
|
-
getSectionStories(publicationId: string, sectionId: string, timestamp: number, includeStories?: boolean): Promise<
|
|
7
|
+
getSectionStories(publicationId: string, sectionId: string, timestamp: number, includeStories?: boolean): Promise<SectionEdition>;
|
|
8
|
+
getSectionEditions(publicationId: string, sectionId: string, startDate: number, numEditions?: number): Promise<SectionEdition[]>;
|
|
8
9
|
getPublications(nameRegex: string): Promise<GetPublicationsResponse>;
|
|
10
|
+
getPublicationById(publicationId: string): Promise<WebskedPublication>;
|
|
9
11
|
}
|
|
@@ -18,10 +18,20 @@ class ArcWebsked extends abstract_api_1.ArcAbstractAPI {
|
|
|
18
18
|
const { data } = await this.client.get(`/publications/${publicationId}/sections/${sectionId}/editions/${timestamp}`, { params: { includeStories } });
|
|
19
19
|
return data;
|
|
20
20
|
}
|
|
21
|
+
async getSectionEditions(publicationId, sectionId, startDate, numEditions = 100) {
|
|
22
|
+
const { data } = await this.client.get(`/publications/${publicationId}/sections/${sectionId}/editions`, {
|
|
23
|
+
params: { startDate, numEditions },
|
|
24
|
+
});
|
|
25
|
+
return data;
|
|
26
|
+
}
|
|
21
27
|
async getPublications(nameRegex) {
|
|
22
28
|
const { data } = await this.client.get(`/publications`, { params: { nameRegex } });
|
|
23
29
|
return data;
|
|
24
30
|
}
|
|
31
|
+
async getPublicationById(publicationId) {
|
|
32
|
+
const { data } = await this.client.get(`/publications/${publicationId}`);
|
|
33
|
+
return data;
|
|
34
|
+
}
|
|
25
35
|
}
|
|
26
36
|
exports.ArcWebsked = ArcWebsked;
|
|
27
37
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/websked/index.ts"],"names":[],"mappings":";;;AAAA,kDAAgE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/websked/index.ts"],"names":[],"mappings":";;;AAAA,kDAAgE;AAUhE,MAAa,UAAW,SAAQ,6BAAc;IAC5C,YAAY,OAAsB;QAChC,KAAK,CAAC,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC;IAC5C,CAAC;IAED,KAAK,CAAC,kBAAkB,CAAC,OAAkC;QACzD,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAO,6BAA6B,EAAE,OAAO,CAAC,CAAC;QACtF,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,OAA0B;QACzC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC3D,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,iBAAiB,CACrB,aAAqB,EACrB,SAAiB,EACjB,SAAiB,EACjB,cAAc,GAAG,IAAI;QAErB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CACpC,iBAAiB,aAAa,aAAa,SAAS,aAAa,SAAS,EAAE,EAC5E,EAAE,MAAM,EAAE,EAAE,cAAc,EAAE,EAAE,CAC/B,CAAC;QACF,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,kBAAkB,CACtB,aAAqB,EACrB,SAAiB,EACjB,SAAiB,EACjB,WAAW,GAAG,GAAG;QAEjB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,iBAAiB,aAAa,aAAa,SAAS,WAAW,EAAE;YACtG,MAAM,EAAE,EAAE,SAAS,EAAE,WAAW,EAAE;SACnC,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,SAAiB;QACrC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,eAAe,EAAE,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC;QACnF,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,kBAAkB,CAAC,aAAqB;QAC5C,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,iBAAiB,aAAa,EAAE,CAAC,CAAC;QACzE,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAjDD,gCAiDC"}
|
|
@@ -177,7 +177,7 @@ export interface WebskedStoryImage {
|
|
|
177
177
|
width: number;
|
|
178
178
|
location: (string | null)[];
|
|
179
179
|
}
|
|
180
|
-
export type
|
|
180
|
+
export type SectionEdition = {
|
|
181
181
|
id: string;
|
|
182
182
|
publicationId: string;
|
|
183
183
|
sectionId: string;
|
|
@@ -190,6 +190,7 @@ export type SectionStoriesPayload = {
|
|
|
190
190
|
storyIds: string[];
|
|
191
191
|
stories?: WebskedStory[];
|
|
192
192
|
};
|
|
193
|
+
export type SectionStoriesPayload = SectionEdition;
|
|
193
194
|
export interface WebskedPublication {
|
|
194
195
|
createdDate: number;
|
|
195
196
|
createdBy: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code.store/arcxp-sdk-ts",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.30.0",
|
|
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",
|