@code.store/arcxp-sdk-ts 4.49.1 → 5.0.0-beta
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.
- package/dist/api/abstract-api.d.ts +2 -2
- package/dist/api/author/index.d.ts +2 -2
- package/dist/api/author/types.d.ts +32 -1
- package/dist/api/content/index.d.ts +4 -4
- package/dist/api/content/types.d.ts +3 -4
- package/dist/api/content-ops/index.d.ts +2 -2
- package/dist/api/custom/index.d.ts +1 -1
- package/dist/api/draft/index.d.ts +4 -4
- package/dist/api/draft/types.d.ts +4 -4
- package/dist/api/global-settings/index.d.ts +2 -2
- package/dist/api/identity/index.d.ts +2 -2
- package/dist/api/ifx/index.d.ts +2 -2
- package/dist/api/index.d.ts +19 -20
- package/dist/api/migration-center/index.d.ts +2 -2
- package/dist/api/migration-center/types.d.ts +4 -38
- package/dist/api/photo-center/index.d.ts +8 -9
- package/dist/api/photo-center/types.d.ts +3 -4
- package/dist/api/redirect/index.d.ts +2 -2
- package/dist/api/retail-events/index.d.ts +2 -2
- package/dist/api/sales/index.d.ts +2 -2
- package/dist/api/signing-service/index.d.ts +2 -2
- package/dist/api/site/index.d.ts +3 -4
- package/dist/api/site/types.d.ts +88 -1
- package/dist/api/tags/index.d.ts +2 -2
- package/dist/api/websked/index.d.ts +2 -2
- package/dist/api/ws.client.d.ts +1 -1
- package/dist/content-elements/content-elements.d.ts +54 -54
- package/dist/content-elements/html/html.processor.d.ts +7 -7
- package/dist/content-elements/html/html.utils.d.ts +2 -2
- package/dist/content-elements/html/index.d.ts +3 -3
- package/dist/content-elements/index.d.ts +2 -2
- package/dist/content-elements/types.d.ts +4 -0
- package/dist/index.cjs +1905 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +9 -20
- package/dist/index.js +1872 -62
- package/dist/index.js.map +1 -1
- package/dist/lib/axios-rate-limiter.d.ts +2 -0
- package/dist/lib/platform/index.d.ts +6 -0
- package/dist/lib/platform/node.d.ts +6 -0
- package/dist/mapper/doc.d.ts +26 -25
- package/dist/mapper/index.d.ts +2 -2
- package/dist/mapper/story.d.ts +4 -4
- package/dist/types/ans-types.d.ts +2287 -0
- package/dist/types/gallery.d.ts +1 -1
- package/dist/types/index.d.ts +15 -7
- package/dist/types/section.d.ts +1 -1
- package/dist/utils/arc/ans.d.ts +2 -2
- package/dist/utils/arc/content.d.ts +1 -1
- package/dist/utils/arc/index.d.ts +3 -3
- package/dist/utils/decorator.d.ts +1 -1
- package/package.json +28 -18
- package/dist/api/abstract-api.js +0 -61
- package/dist/api/abstract-api.js.map +0 -1
- package/dist/api/author/index.js +0 -19
- package/dist/api/author/index.js.map +0 -1
- package/dist/api/author/types.js +0 -3
- package/dist/api/author/types.js.map +0 -1
- package/dist/api/content/index.js +0 -29
- package/dist/api/content/index.js.map +0 -1
- package/dist/api/content/types.js +0 -3
- package/dist/api/content/types.js.map +0 -1
- package/dist/api/content-ops/index.js +0 -27
- package/dist/api/content-ops/index.js.map +0 -1
- package/dist/api/content-ops/types.js +0 -3
- package/dist/api/content-ops/types.js.map +0 -1
- package/dist/api/custom/index.js +0 -18
- package/dist/api/custom/index.js.map +0 -1
- package/dist/api/draft/index.js +0 -63
- package/dist/api/draft/index.js.map +0 -1
- package/dist/api/draft/types.js +0 -3
- package/dist/api/draft/types.js.map +0 -1
- package/dist/api/error.js +0 -26
- package/dist/api/error.js.map +0 -1
- package/dist/api/global-settings/index.js +0 -19
- package/dist/api/global-settings/index.js.map +0 -1
- package/dist/api/global-settings/types.js +0 -3
- package/dist/api/global-settings/types.js.map +0 -1
- package/dist/api/identity/index.js +0 -35
- package/dist/api/identity/index.js.map +0 -1
- package/dist/api/identity/types.js +0 -3
- package/dist/api/identity/types.js.map +0 -1
- package/dist/api/ifx/index.js +0 -94
- package/dist/api/ifx/index.js.map +0 -1
- package/dist/api/ifx/types.js +0 -3
- package/dist/api/ifx/types.js.map +0 -1
- package/dist/api/index.js +0 -49
- package/dist/api/index.js.map +0 -1
- package/dist/api/migration-center/index.js +0 -45
- package/dist/api/migration-center/index.js.map +0 -1
- package/dist/api/migration-center/types.js +0 -41
- package/dist/api/migration-center/types.js.map +0 -1
- package/dist/api/photo-center/index.js +0 -64
- package/dist/api/photo-center/index.js.map +0 -1
- package/dist/api/photo-center/types.js +0 -3
- package/dist/api/photo-center/types.js.map +0 -1
- package/dist/api/redirect/index.js +0 -23
- package/dist/api/redirect/index.js.map +0 -1
- package/dist/api/redirect/types.js +0 -3
- package/dist/api/redirect/types.js.map +0 -1
- package/dist/api/retail-events/index.js +0 -18
- package/dist/api/retail-events/index.js.map +0 -1
- package/dist/api/sales/index.js +0 -25
- package/dist/api/sales/index.js.map +0 -1
- package/dist/api/sales/types.js +0 -3
- package/dist/api/sales/types.js.map +0 -1
- package/dist/api/signing-service/index.js +0 -15
- package/dist/api/signing-service/index.js.map +0 -1
- package/dist/api/signing-service/types.js +0 -3
- package/dist/api/signing-service/types.js.map +0 -1
- package/dist/api/site/index.js +0 -44
- package/dist/api/site/index.js.map +0 -1
- package/dist/api/site/types.js +0 -3
- package/dist/api/site/types.js.map +0 -1
- package/dist/api/tags/index.js +0 -36
- package/dist/api/tags/index.js.map +0 -1
- package/dist/api/tags/types.js +0 -3
- package/dist/api/tags/types.js.map +0 -1
- package/dist/api/websked/index.js +0 -47
- package/dist/api/websked/index.js.map +0 -1
- package/dist/api/websked/types.js +0 -3
- package/dist/api/websked/types.js.map +0 -1
- package/dist/api/ws.client.js +0 -68
- package/dist/api/ws.client.js.map +0 -1
- package/dist/content-elements/content-elements.js +0 -235
- package/dist/content-elements/content-elements.js.map +0 -1
- package/dist/content-elements/html/html.constants.js +0 -40
- package/dist/content-elements/html/html.constants.js.map +0 -1
- package/dist/content-elements/html/html.processor.js +0 -370
- package/dist/content-elements/html/html.processor.js.map +0 -1
- package/dist/content-elements/html/html.utils.js +0 -79
- package/dist/content-elements/html/html.utils.js.map +0 -1
- package/dist/content-elements/html/index.js +0 -41
- package/dist/content-elements/html/index.js.map +0 -1
- package/dist/content-elements/index.js +0 -42
- package/dist/content-elements/index.js.map +0 -1
- package/dist/mapper/doc.js +0 -146
- package/dist/mapper/doc.js.map +0 -1
- package/dist/mapper/index.js +0 -8
- package/dist/mapper/index.js.map +0 -1
- package/dist/mapper/story.js +0 -111
- package/dist/mapper/story.js.map +0 -1
- package/dist/scripts/json-schema-to-ts.js +0 -8
- package/dist/scripts/json-schema-to-ts.js.map +0 -1
- package/dist/tests/ans/mapper.test.d.ts +0 -1
- package/dist/tests/ans/mapper.test.js +0 -93
- package/dist/tests/ans/mapper.test.js.map +0 -1
- package/dist/tests/api/basic.test.d.ts +0 -1
- package/dist/tests/api/basic.test.js +0 -20
- package/dist/tests/api/basic.test.js.map +0 -1
- package/dist/tests/api/retry.test.d.ts +0 -1
- package/dist/tests/api/retry.test.js +0 -51
- package/dist/tests/api/retry.test.js.map +0 -1
- package/dist/tests/api/utils.test.d.ts +0 -1
- package/dist/tests/api/utils.test.js +0 -255
- package/dist/tests/api/utils.test.js.map +0 -1
- package/dist/tests/content-elements/html.processor.test.d.ts +0 -1
- package/dist/tests/content-elements/html.processor.test.js +0 -35
- package/dist/tests/content-elements/html.processor.test.js.map +0 -1
- package/dist/types/author.js +0 -8
- package/dist/types/author.js.map +0 -1
- package/dist/types/content-elements.d.ts +0 -4
- package/dist/types/content-elements.js +0 -3
- package/dist/types/content-elements.js.map +0 -1
- package/dist/types/gallery.js +0 -3
- package/dist/types/gallery.js.map +0 -1
- package/dist/types/index.js +0 -44
- package/dist/types/index.js.map +0 -1
- package/dist/types/section.js +0 -3
- package/dist/types/section.js.map +0 -1
- package/dist/types/story.js +0 -8
- package/dist/types/story.js.map +0 -1
- package/dist/types/utils.js +0 -3
- package/dist/types/utils.js.map +0 -1
- package/dist/types/video.js +0 -8
- package/dist/types/video.js.map +0 -1
- package/dist/utils/arc/ans.js +0 -14
- package/dist/utils/arc/ans.js.map +0 -1
- package/dist/utils/arc/content.js +0 -79
- package/dist/utils/arc/content.js.map +0 -1
- package/dist/utils/arc/id.js +0 -40
- package/dist/utils/arc/id.js.map +0 -1
- package/dist/utils/arc/index.js +0 -45
- package/dist/utils/arc/index.js.map +0 -1
- package/dist/utils/cache.js +0 -63
- package/dist/utils/cache.js.map +0 -1
- package/dist/utils/decorator.js +0 -20
- package/dist/utils/decorator.js.map +0 -1
- package/dist/utils/duration.js +0 -21
- package/dist/utils/duration.js.map +0 -1
- package/dist/utils/index.js +0 -52
- package/dist/utils/index.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type AxiosError } from 'axios';
|
|
2
|
-
import
|
|
2
|
+
import * as rateLimit from 'axios-rate-limit';
|
|
3
3
|
export type ArcAbstractAPIOptions = {
|
|
4
4
|
credentials: {
|
|
5
5
|
organizationName: string;
|
|
@@ -11,7 +11,7 @@ export type ArcAbstractAPIOptions = {
|
|
|
11
11
|
export type ArcAPIOptions = Omit<ArcAbstractAPIOptions, 'apiPath'>;
|
|
12
12
|
export declare abstract class ArcAbstractAPI {
|
|
13
13
|
protected name: string;
|
|
14
|
-
protected client: RateLimitedAxiosInstance;
|
|
14
|
+
protected client: rateLimit.RateLimitedAxiosInstance;
|
|
15
15
|
private token;
|
|
16
16
|
private host;
|
|
17
17
|
private headers;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api';
|
|
2
|
-
import type { ListAuthorsParams, ListAuthorsResponse } from './types';
|
|
1
|
+
import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api.js';
|
|
2
|
+
import type { ListAuthorsParams, ListAuthorsResponse } from './types.js';
|
|
3
3
|
export declare class ArcAuthor extends ArcAbstractAPI {
|
|
4
4
|
constructor(options: ArcAPIOptions);
|
|
5
5
|
listAuthors(params?: ListAuthorsParams): Promise<ListAuthorsResponse>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { AuthorANS } from '../migration-center/types';
|
|
2
1
|
export type ListAuthorsParams = Partial<{
|
|
3
2
|
limit: number;
|
|
4
3
|
last: string;
|
|
@@ -8,3 +7,35 @@ export type ListAuthorsResponse = {
|
|
|
8
7
|
more?: boolean;
|
|
9
8
|
last?: string;
|
|
10
9
|
};
|
|
10
|
+
export type AuthorANS = {
|
|
11
|
+
type: 'author';
|
|
12
|
+
_id: string;
|
|
13
|
+
firstName: string;
|
|
14
|
+
lastName: string;
|
|
15
|
+
byline: string;
|
|
16
|
+
slug: string;
|
|
17
|
+
email: string;
|
|
18
|
+
image?: string;
|
|
19
|
+
affiliations?: string;
|
|
20
|
+
author_type?: string;
|
|
21
|
+
education?: {
|
|
22
|
+
name: string;
|
|
23
|
+
}[];
|
|
24
|
+
awards?: {
|
|
25
|
+
name: string;
|
|
26
|
+
}[];
|
|
27
|
+
bio_page?: string;
|
|
28
|
+
bio?: string;
|
|
29
|
+
longBio?: string;
|
|
30
|
+
native_app_rendering?: boolean;
|
|
31
|
+
fuzzy_match?: boolean;
|
|
32
|
+
contributor?: boolean;
|
|
33
|
+
location?: string;
|
|
34
|
+
role?: string;
|
|
35
|
+
expertise?: string;
|
|
36
|
+
personal_website?: string;
|
|
37
|
+
twitter?: string;
|
|
38
|
+
facebook?: string;
|
|
39
|
+
linkedin?: string;
|
|
40
|
+
status?: boolean;
|
|
41
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api';
|
|
3
|
-
import type { GetStoriesByIdsParams, GetStoryParams, ScanParams, ScanResponse, SearchParams, SearchResponse } from './types';
|
|
1
|
+
import type { ANS } from '../../types/index.js';
|
|
2
|
+
import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api.js';
|
|
3
|
+
import type { GetStoriesByIdsParams, GetStoryParams, ScanParams, ScanResponse, SearchParams, SearchResponse } from './types.js';
|
|
4
4
|
export declare class ArcContent extends ArcAbstractAPI {
|
|
5
5
|
constructor(options: ArcAPIOptions);
|
|
6
|
-
getStory(params: GetStoryParams): Promise<AStory>;
|
|
6
|
+
getStory(params: GetStoryParams): Promise<ANS.AStory>;
|
|
7
7
|
search(params: SearchParams): Promise<SearchResponse>;
|
|
8
8
|
scan(params: ScanParams): Promise<ScanResponse>;
|
|
9
9
|
getStoriesByIds(params: GetStoriesByIdsParams): Promise<SearchResponse>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { ARedirectObject, AStory } from '../../types/story';
|
|
1
|
+
import type { ANS } from '../../types/index.js';
|
|
3
2
|
export type GetStoryParams = {
|
|
4
3
|
/** Specifies the ID of the website making the request. Required. */
|
|
5
4
|
website: string;
|
|
@@ -43,14 +42,14 @@ export type ScanParams = {
|
|
|
43
42
|
};
|
|
44
43
|
export type SearchResponse = {
|
|
45
44
|
type: 'results';
|
|
46
|
-
content_elements: (AStory | AGallery | ARedirectObject)[];
|
|
45
|
+
content_elements: (ANS.AStory | ANS.AGallery | ANS.ARedirectObject)[];
|
|
47
46
|
count: number;
|
|
48
47
|
next?: number;
|
|
49
48
|
previous?: number;
|
|
50
49
|
};
|
|
51
50
|
export type ScanResponse = {
|
|
52
51
|
type: 'results';
|
|
53
|
-
content_elements: (AStory | AGallery | ARedirectObject)[];
|
|
52
|
+
content_elements: (ANS.AStory | ANS.AGallery | ANS.ARedirectObject)[];
|
|
54
53
|
count: number;
|
|
55
54
|
next: string;
|
|
56
55
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api';
|
|
2
|
-
import type { ScheduleOperationPayload, UnscheduleOperationPayload } from './types';
|
|
1
|
+
import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api.js';
|
|
2
|
+
import type { ScheduleOperationPayload, UnscheduleOperationPayload } from './types.js';
|
|
3
3
|
export declare class ArcContentOps extends ArcAbstractAPI {
|
|
4
4
|
constructor(options: ArcAPIOptions);
|
|
5
5
|
schedulePublish(payload: ScheduleOperationPayload): Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
2
|
-
import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api';
|
|
2
|
+
import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api.js';
|
|
3
3
|
export interface RequestConfig extends AxiosRequestConfig {
|
|
4
4
|
}
|
|
5
5
|
export declare class Custom extends ArcAbstractAPI {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api';
|
|
3
|
-
import type { Circulations, CreateDocumentRedirectPayload, CreateExternalRedirectPayload, CreateRedirectPayload, Document, DocumentRedirect, ExternalRedirect, Revision, Revisions, UpdateDraftRevisionPayload } from './types';
|
|
1
|
+
import type { ANS } from '../../types/index.js';
|
|
2
|
+
import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api.js';
|
|
3
|
+
import type { Circulations, CreateDocumentRedirectPayload, CreateExternalRedirectPayload, CreateRedirectPayload, Document, DocumentRedirect, ExternalRedirect, Revision, Revisions, UpdateDraftRevisionPayload } from './types.js';
|
|
4
4
|
export declare class ArcDraft extends ArcAbstractAPI {
|
|
5
5
|
constructor(options: ArcAPIOptions);
|
|
6
6
|
generateId(id: string): Promise<string>;
|
|
7
|
-
createDocument(ans: AStory, type?: string): Promise<Document>;
|
|
7
|
+
createDocument(ans: ANS.AStory, type?: string): Promise<Document>;
|
|
8
8
|
publishDocument(id: string, type?: string): Promise<Revision>;
|
|
9
9
|
unpublishDocument(id: string, type?: string): Promise<Revision>;
|
|
10
10
|
deleteDocument(id: string, type?: string): Promise<Document>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { CirculationReference } from '../migration-center/types';
|
|
1
|
+
import type { ANS } from '../../types/index.js';
|
|
2
|
+
import type { CirculationReference } from '../migration-center/types.js';
|
|
3
3
|
export type CreateExternalRedirectPayload = {
|
|
4
4
|
redirect_to: string;
|
|
5
5
|
document_id?: undefined;
|
|
@@ -27,7 +27,7 @@ export type Revision = {
|
|
|
27
27
|
created_at: string;
|
|
28
28
|
type: string;
|
|
29
29
|
user_id?: string;
|
|
30
|
-
ans: AStory;
|
|
30
|
+
ans: ANS.AStory;
|
|
31
31
|
};
|
|
32
32
|
export type Document = {
|
|
33
33
|
id: string;
|
|
@@ -42,7 +42,7 @@ export type Document = {
|
|
|
42
42
|
};
|
|
43
43
|
export type UpdateDraftRevisionPayload = {
|
|
44
44
|
document_id: string;
|
|
45
|
-
ans: AStory;
|
|
45
|
+
ans: ANS.AStory;
|
|
46
46
|
type: 'DRAFT';
|
|
47
47
|
};
|
|
48
48
|
export type Circulations = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api';
|
|
2
|
-
import type { CreateDistributorPayload, Distributor, GetDistributorsParams, GetDistributorsResponse } from './types';
|
|
1
|
+
import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api.js';
|
|
2
|
+
import type { CreateDistributorPayload, Distributor, GetDistributorsParams, GetDistributorsResponse } from './types.js';
|
|
3
3
|
export declare class GlobalSettings extends ArcAbstractAPI {
|
|
4
4
|
constructor(options: ArcAPIOptions);
|
|
5
5
|
getDistributors(params?: GetDistributorsParams): Promise<GetDistributorsResponse>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api';
|
|
2
|
-
import type { GetUserResponse, MigrateBatchUsersPayload, MigrateBatchUsersResponse, UserProfile } from './types';
|
|
1
|
+
import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api.js';
|
|
2
|
+
import type { GetUserResponse, MigrateBatchUsersPayload, MigrateBatchUsersResponse, UserProfile } from './types.js';
|
|
3
3
|
export declare class ArcIdentity extends ArcAbstractAPI {
|
|
4
4
|
constructor(options: ArcAPIOptions);
|
|
5
5
|
migrateBatch(payload: MigrateBatchUsersPayload): Promise<MigrateBatchUsersResponse>;
|
package/dist/api/ifx/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api';
|
|
2
|
-
import type { AddSecretPayload, Bundle, CreateIntegrationPayload, GenereteDeleteTokenResponse, GetBundlesResponse, GetSubscriptionsResponse, Integration, SubscribePayload, UpdateIntegrationPayload } from './types';
|
|
1
|
+
import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api.js';
|
|
2
|
+
import type { AddSecretPayload, Bundle, CreateIntegrationPayload, GenereteDeleteTokenResponse, GetBundlesResponse, GetSubscriptionsResponse, Integration, SubscribePayload, UpdateIntegrationPayload } from './types.js';
|
|
3
3
|
export declare class ArcIFX extends ArcAbstractAPI {
|
|
4
4
|
constructor(options: ArcAPIOptions);
|
|
5
5
|
createIntegration(payload: CreateIntegrationPayload): Promise<void>;
|
package/dist/api/index.d.ts
CHANGED
|
@@ -1,24 +1,22 @@
|
|
|
1
|
-
import type { ArcAPIOptions } from './abstract-api';
|
|
2
|
-
import { ArcAuthor } from './author';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { Custom } from './custom';
|
|
6
|
-
import { ArcDraft } from './draft';
|
|
7
|
-
import { GlobalSettings } from './global-settings';
|
|
8
|
-
import { ArcIdentity } from './identity';
|
|
9
|
-
import { ArcIFX } from './ifx';
|
|
10
|
-
import { ArcMigrationCenter } from './migration-center';
|
|
11
|
-
import { ArcProtoCenter } from './photo-center';
|
|
12
|
-
import { ArcRedirect } from './redirect';
|
|
13
|
-
import { ArcRetailEvents } from './retail-events';
|
|
14
|
-
import { ArcSales } from './sales';
|
|
15
|
-
import { ArcSigningService } from './signing-service';
|
|
16
|
-
import { ArcSite } from './site';
|
|
17
|
-
import { ArcTags } from './tags';
|
|
18
|
-
import { ArcWebsked } from './websked';
|
|
1
|
+
import type { ArcAPIOptions } from './abstract-api.js';
|
|
2
|
+
import { ArcAuthor } from './author/index.js';
|
|
3
|
+
import { ArcContentOps } from './content-ops/index.js';
|
|
4
|
+
import { ArcContent } from './content/index.js';
|
|
5
|
+
import { Custom } from './custom/index.js';
|
|
6
|
+
import { ArcDraft } from './draft/index.js';
|
|
7
|
+
import { GlobalSettings } from './global-settings/index.js';
|
|
8
|
+
import { ArcIdentity } from './identity/index.js';
|
|
9
|
+
import { ArcIFX } from './ifx/index.js';
|
|
10
|
+
import { ArcMigrationCenter } from './migration-center/index.js';
|
|
11
|
+
import { ArcProtoCenter } from './photo-center/index.js';
|
|
12
|
+
import { ArcRedirect } from './redirect/index.js';
|
|
13
|
+
import { ArcRetailEvents } from './retail-events/index.js';
|
|
14
|
+
import { ArcSales } from './sales/index.js';
|
|
15
|
+
import { ArcSigningService } from './signing-service/index.js';
|
|
16
|
+
import { ArcSite } from './site/index.js';
|
|
17
|
+
import { ArcTags } from './tags/index.js';
|
|
18
|
+
import { ArcWebsked } from './websked/index.js';
|
|
19
19
|
export declare const ArcAPI: (options: ArcAPIOptions) => {
|
|
20
|
-
setMaxRPS: (rps: number) => void;
|
|
21
|
-
RetailEvents: ArcRetailEvents;
|
|
22
20
|
Author: ArcAuthor;
|
|
23
21
|
Draft: ArcDraft;
|
|
24
22
|
Identity: ArcIdentity;
|
|
@@ -34,6 +32,7 @@ export declare const ArcAPI: (options: ArcAPIOptions) => {
|
|
|
34
32
|
GlobalSettings: GlobalSettings;
|
|
35
33
|
Tags: ArcTags;
|
|
36
34
|
ContentOps: ArcContentOps;
|
|
35
|
+
RetailEvents: ArcRetailEvents;
|
|
37
36
|
Custom: Custom;
|
|
38
37
|
};
|
|
39
38
|
export type ArcAPIType = ReturnType<typeof ArcAPI>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api';
|
|
2
|
-
import type { Count, CountRequest, DetailReport, DetailReportRequest, GetANSParams, GetRecentGroupIdsResponse, GetRemainingTimeParams, GetRemainingTimeResponse, PostANSParams, PostANSPayload, Summary, SummaryReportRequest } from './types';
|
|
1
|
+
import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api.js';
|
|
2
|
+
import type { Count, CountRequest, DetailReport, DetailReportRequest, GetANSParams, GetRecentGroupIdsResponse, GetRemainingTimeParams, GetRemainingTimeResponse, PostANSParams, PostANSPayload, Summary, SummaryReportRequest } from './types.js';
|
|
3
3
|
export declare class ArcMigrationCenter extends ArcAbstractAPI {
|
|
4
4
|
constructor(options: ArcAPIOptions);
|
|
5
5
|
summary(params?: SummaryReportRequest): Promise<{
|
|
@@ -1,42 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
import type { VideoContent } from '../../types/video';
|
|
5
|
-
type TagANS = Tag & {
|
|
1
|
+
import type { ANS, SectionReference } from '../../types/index.js';
|
|
2
|
+
import type { AuthorANS } from '../author/types.js';
|
|
3
|
+
type TagANS = ANS.Tag & {
|
|
6
4
|
name: string;
|
|
7
5
|
};
|
|
8
|
-
export type AuthorANS = {
|
|
9
|
-
type: 'author';
|
|
10
|
-
_id: string;
|
|
11
|
-
firstName: string;
|
|
12
|
-
lastName: string;
|
|
13
|
-
byline: string;
|
|
14
|
-
slug: string;
|
|
15
|
-
email: string;
|
|
16
|
-
image?: string;
|
|
17
|
-
affiliations?: string;
|
|
18
|
-
author_type?: string;
|
|
19
|
-
education?: {
|
|
20
|
-
name: string;
|
|
21
|
-
}[];
|
|
22
|
-
awards?: {
|
|
23
|
-
name: string;
|
|
24
|
-
}[];
|
|
25
|
-
bio_page?: string;
|
|
26
|
-
bio?: string;
|
|
27
|
-
longBio?: string;
|
|
28
|
-
native_app_rendering?: boolean;
|
|
29
|
-
fuzzy_match?: boolean;
|
|
30
|
-
contributor?: boolean;
|
|
31
|
-
location?: string;
|
|
32
|
-
role?: string;
|
|
33
|
-
expertise?: string;
|
|
34
|
-
personal_website?: string;
|
|
35
|
-
twitter?: string;
|
|
36
|
-
facebook?: string;
|
|
37
|
-
linkedin?: string;
|
|
38
|
-
status?: boolean;
|
|
39
|
-
};
|
|
40
6
|
export type CirculationReference = {
|
|
41
7
|
document_id: string;
|
|
42
8
|
website_id: string;
|
|
@@ -53,7 +19,7 @@ export type Operation = {
|
|
|
53
19
|
organization_id: string;
|
|
54
20
|
endpoint: string;
|
|
55
21
|
};
|
|
56
|
-
export type ANSContent = AStory | AGallery | AnImage | AuthorANS | TagANS | VideoContent;
|
|
22
|
+
export type ANSContent = ANS.AStory | ANS.AGallery | ANS.AnImage | AuthorANS | TagANS | ANS.VideoContent;
|
|
57
23
|
export type PostANSPayload<ANS extends ANSContent = ANSContent> = {
|
|
58
24
|
sourceId: string;
|
|
59
25
|
sourceType: string;
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import type { ReadStream } from 'node:fs';
|
|
2
|
-
import type {
|
|
3
|
-
import type
|
|
4
|
-
import {
|
|
5
|
-
import type { GetGalleriesParams, GetGalleriesResponse, GetImagesParams, GetImagesResponse } from './types';
|
|
2
|
+
import type { ANS } from '../../types/index.js';
|
|
3
|
+
import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api.js';
|
|
4
|
+
import type { GetGalleriesParams, GetGalleriesResponse, GetImagesParams, GetImagesResponse } from './types.js';
|
|
6
5
|
export declare class ArcProtoCenter extends ArcAbstractAPI {
|
|
7
6
|
constructor(options: ArcAPIOptions);
|
|
8
|
-
getImageDataById(imageId: string): Promise<AnImage>;
|
|
9
|
-
uploadImageANS(image: AnImage): Promise<AnImage>;
|
|
7
|
+
getImageDataById(imageId: string): Promise<ANS.AnImage>;
|
|
8
|
+
uploadImageANS(image: ANS.AnImage): Promise<ANS.AnImage>;
|
|
10
9
|
uploadImageStream(readableStream: ReadStream, options?: {
|
|
11
10
|
contentType?: string;
|
|
12
11
|
filename?: string;
|
|
13
|
-
}): Promise<AnImage>;
|
|
12
|
+
}): Promise<ANS.AnImage>;
|
|
14
13
|
deleteImage(imageId: string): Promise<any>;
|
|
15
14
|
deleteGallery(galleryId: string): Promise<any>;
|
|
16
15
|
getImages(params: GetImagesParams): Promise<GetImagesResponse>;
|
|
17
16
|
getGalleries(params: GetGalleriesParams): Promise<GetGalleriesResponse>;
|
|
18
|
-
getGallery(galleryId: string): Promise<AGallery>;
|
|
19
|
-
updateImage(imageId: string, photoDto: AnImage): Promise<AnImage>;
|
|
17
|
+
getGallery(galleryId: string): Promise<ANS.AGallery>;
|
|
18
|
+
updateImage(imageId: string, photoDto: ANS.AnImage): Promise<ANS.AnImage>;
|
|
20
19
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { AnImage } from '../../types/story';
|
|
1
|
+
import type { ANS } from '../../types/index.js';
|
|
3
2
|
export type GetImagesParams = Partial<{
|
|
4
3
|
primaryWebsite: string;
|
|
5
4
|
offset: number;
|
|
@@ -12,5 +11,5 @@ export type GetGalleriesParams = Partial<{
|
|
|
12
11
|
offset: number;
|
|
13
12
|
limit: number;
|
|
14
13
|
}>;
|
|
15
|
-
export type GetImagesResponse = AnImage[];
|
|
16
|
-
export type GetGalleriesResponse = AGallery[];
|
|
14
|
+
export type GetImagesResponse = ANS.AnImage[];
|
|
15
|
+
export type GetGalleriesResponse = ANS.AGallery[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api';
|
|
2
|
-
import type { ArcRedirectRuleContentType, ArcRedirectRuleType, ArcRedirectRulesResponse } from './types';
|
|
1
|
+
import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api.js';
|
|
2
|
+
import type { ArcRedirectRuleContentType, ArcRedirectRuleType, ArcRedirectRulesResponse } from './types.js';
|
|
3
3
|
export declare class ArcRedirect extends ArcAbstractAPI {
|
|
4
4
|
constructor(options: ArcAPIOptions);
|
|
5
5
|
getRedirects(orgSiteEnv: string): Promise<ArcRedirectRulesResponse>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ArcAPIOptions } from '../abstract-api';
|
|
2
|
-
import { WsClient } from '../ws.client';
|
|
1
|
+
import type { ArcAPIOptions } from '../abstract-api.js';
|
|
2
|
+
import { WsClient } from '../ws.client.js';
|
|
3
3
|
export declare class ArcRetailEvents {
|
|
4
4
|
private readonly options;
|
|
5
5
|
constructor(options: Pick<ArcAPIOptions, 'credentials'>);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api';
|
|
2
|
-
import type { MigrateBatchSubscriptionsPayload, MigrateBatchSubscriptionsResponse } from './types';
|
|
1
|
+
import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api.js';
|
|
2
|
+
import type { MigrateBatchSubscriptionsPayload, MigrateBatchSubscriptionsResponse } from './types.js';
|
|
3
3
|
export declare class ArcSales extends ArcAbstractAPI {
|
|
4
4
|
constructor(options: ArcAPIOptions);
|
|
5
5
|
migrate(payload: MigrateBatchSubscriptionsPayload): Promise<MigrateBatchSubscriptionsResponse>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api';
|
|
2
|
-
import type { SignResponse } from './types';
|
|
1
|
+
import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api.js';
|
|
2
|
+
import type { SignResponse } from './types.js';
|
|
3
3
|
export declare class ArcSigningService extends ArcAbstractAPI {
|
|
4
4
|
constructor(options: ArcAPIOptions);
|
|
5
5
|
sign(service: string, serviceVersion: string, imageId: string): Promise<SignResponse>;
|
package/dist/api/site/index.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import {
|
|
3
|
-
import type { GetLinksParams, GetLinksResponse, GetSectionParams, GetSectionsResponse, Link, Website } from './types';
|
|
1
|
+
import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api.js';
|
|
2
|
+
import type { GetLinksParams, GetLinksResponse, GetSectionParams, GetSectionsResponse, Link, Website, Section, SetSectionPayload } from './types.js';
|
|
4
3
|
export declare class ArcSite extends ArcAbstractAPI {
|
|
5
4
|
constructor(options: ArcAPIOptions);
|
|
6
5
|
getSections(params: GetSectionParams): Promise<GetSectionsResponse>;
|
|
7
6
|
getSection(id: string, website: string): Promise<Section>;
|
|
8
7
|
deleteSection(id: string, website: string): Promise<void>;
|
|
9
|
-
putSection(section:
|
|
8
|
+
putSection(section: SetSectionPayload): Promise<any>;
|
|
10
9
|
getWebsites(): Promise<Website[]>;
|
|
11
10
|
putLink(link: Link): Promise<Link>;
|
|
12
11
|
deleteLink(id: string, website: string): Promise<any>;
|
package/dist/api/site/types.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { Section } from '../../types/section';
|
|
2
1
|
export type Website = {
|
|
3
2
|
_id: string;
|
|
4
3
|
display_name: string;
|
|
@@ -34,3 +33,91 @@ export type GetSectionParams = {
|
|
|
34
33
|
offset?: number;
|
|
35
34
|
include_inactive?: boolean;
|
|
36
35
|
};
|
|
36
|
+
export type SectionReference = {
|
|
37
|
+
type: 'reference';
|
|
38
|
+
referent: {
|
|
39
|
+
id: string;
|
|
40
|
+
website: string;
|
|
41
|
+
type: 'section';
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export type SectionOrder = {
|
|
45
|
+
default?: number;
|
|
46
|
+
footer?: number;
|
|
47
|
+
main_navigation?: number;
|
|
48
|
+
header?: number;
|
|
49
|
+
} & {
|
|
50
|
+
[key: string]: number | undefined;
|
|
51
|
+
};
|
|
52
|
+
export type SectionParent = {
|
|
53
|
+
default?: string;
|
|
54
|
+
footer?: null | string;
|
|
55
|
+
main_navigation?: string;
|
|
56
|
+
header?: string;
|
|
57
|
+
} & {
|
|
58
|
+
[key: string]: string | undefined;
|
|
59
|
+
};
|
|
60
|
+
export type Section = {
|
|
61
|
+
_id: string;
|
|
62
|
+
site?: {
|
|
63
|
+
site_url: null;
|
|
64
|
+
site_keywords: null;
|
|
65
|
+
site_description: string;
|
|
66
|
+
site_tagline: null;
|
|
67
|
+
pagebuilder_path_for_native_apps: null;
|
|
68
|
+
site_about: null;
|
|
69
|
+
site_title: string;
|
|
70
|
+
section_collection: string;
|
|
71
|
+
};
|
|
72
|
+
social?: {
|
|
73
|
+
twitter: null;
|
|
74
|
+
rss: null;
|
|
75
|
+
facebook: null;
|
|
76
|
+
instagram: null;
|
|
77
|
+
};
|
|
78
|
+
navigation?: {
|
|
79
|
+
nav_title: string;
|
|
80
|
+
};
|
|
81
|
+
site_topper?: {
|
|
82
|
+
site_logo_image: null;
|
|
83
|
+
};
|
|
84
|
+
_admin?: {
|
|
85
|
+
alias_ids: string[];
|
|
86
|
+
};
|
|
87
|
+
_website?: string;
|
|
88
|
+
name: string;
|
|
89
|
+
order?: SectionOrder;
|
|
90
|
+
parent?: SectionParent;
|
|
91
|
+
ancestors?: {
|
|
92
|
+
default: [];
|
|
93
|
+
footer: [];
|
|
94
|
+
header: [];
|
|
95
|
+
};
|
|
96
|
+
inactive?: false;
|
|
97
|
+
node_type?: 'section';
|
|
98
|
+
};
|
|
99
|
+
export type SetSectionPayload = {
|
|
100
|
+
_id: string;
|
|
101
|
+
website: string;
|
|
102
|
+
name: string;
|
|
103
|
+
navigation?: {
|
|
104
|
+
nav_title: string;
|
|
105
|
+
};
|
|
106
|
+
_admin?: {
|
|
107
|
+
alias_ids: string[];
|
|
108
|
+
};
|
|
109
|
+
ancestors?: string[];
|
|
110
|
+
order?: SectionOrder;
|
|
111
|
+
parent?: SectionParent;
|
|
112
|
+
inactive?: false;
|
|
113
|
+
site?: Partial<{
|
|
114
|
+
site_url: null;
|
|
115
|
+
site_keywords: null;
|
|
116
|
+
site_description: string;
|
|
117
|
+
site_tagline: null;
|
|
118
|
+
pagebuilder_path_for_native_apps: null;
|
|
119
|
+
site_about: null;
|
|
120
|
+
site_title: string;
|
|
121
|
+
section_collection: string;
|
|
122
|
+
}>;
|
|
123
|
+
};
|
package/dist/api/tags/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api';
|
|
2
|
-
import type { AddTagRequest, AddTagsResponse, DeleteTagRequest, DeleteTagsResponse, GetAllTagsParams, GetTagsResponse, SearchTagsParams, SearchTagsV2Params } from './types';
|
|
1
|
+
import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api.js';
|
|
2
|
+
import type { AddTagRequest, AddTagsResponse, DeleteTagRequest, DeleteTagsResponse, GetAllTagsParams, GetTagsResponse, SearchTagsParams, SearchTagsV2Params } from './types.js';
|
|
3
3
|
export declare class ArcTags extends ArcAbstractAPI {
|
|
4
4
|
constructor(options: ArcAPIOptions);
|
|
5
5
|
getAllTags(params: GetAllTagsParams): Promise<GetTagsResponse>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api';
|
|
2
|
-
import type { CreateTaskPayload, CreateTaskResponse, GetEditionTimesResponse, GetPublicationsResponse, GetStatusesResponse, ReportStatusChangePayload, SectionEdition, WebskedPublication } from './types';
|
|
1
|
+
import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api.js';
|
|
2
|
+
import type { CreateTaskPayload, CreateTaskResponse, GetEditionTimesResponse, GetPublicationsResponse, GetStatusesResponse, ReportStatusChangePayload, SectionEdition, WebskedPublication } from './types.js';
|
|
3
3
|
export declare class ArcWebsked extends ArcAbstractAPI {
|
|
4
4
|
constructor(options: ArcAPIOptions);
|
|
5
5
|
reportStatusChange(payload: ReportStatusChangePayload): Promise<void>;
|
package/dist/api/ws.client.d.ts
CHANGED