@code.store/arcxp-sdk-ts 4.49.0 → 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.
Files changed (192) hide show
  1. package/dist/api/abstract-api.d.ts +2 -2
  2. package/dist/api/author/index.d.ts +2 -2
  3. package/dist/api/author/types.d.ts +32 -1
  4. package/dist/api/content/index.d.ts +4 -4
  5. package/dist/api/content/types.d.ts +11 -7
  6. package/dist/api/content-ops/index.d.ts +2 -2
  7. package/dist/api/custom/index.d.ts +1 -1
  8. package/dist/api/draft/index.d.ts +4 -4
  9. package/dist/api/draft/types.d.ts +4 -4
  10. package/dist/api/global-settings/index.d.ts +2 -2
  11. package/dist/api/identity/index.d.ts +2 -2
  12. package/dist/api/ifx/index.d.ts +2 -2
  13. package/dist/api/index.d.ts +19 -20
  14. package/dist/api/migration-center/index.d.ts +2 -2
  15. package/dist/api/migration-center/types.d.ts +4 -38
  16. package/dist/api/photo-center/index.d.ts +8 -9
  17. package/dist/api/photo-center/types.d.ts +3 -4
  18. package/dist/api/redirect/index.d.ts +2 -2
  19. package/dist/api/retail-events/index.d.ts +2 -2
  20. package/dist/api/sales/index.d.ts +2 -2
  21. package/dist/api/signing-service/index.d.ts +2 -2
  22. package/dist/api/site/index.d.ts +3 -4
  23. package/dist/api/site/types.d.ts +88 -1
  24. package/dist/api/tags/index.d.ts +2 -2
  25. package/dist/api/websked/index.d.ts +2 -2
  26. package/dist/api/ws.client.d.ts +1 -1
  27. package/dist/content-elements/content-elements.d.ts +54 -54
  28. package/dist/content-elements/html/html.processor.d.ts +7 -7
  29. package/dist/content-elements/html/html.utils.d.ts +2 -2
  30. package/dist/content-elements/html/index.d.ts +3 -3
  31. package/dist/content-elements/index.d.ts +2 -2
  32. package/dist/content-elements/types.d.ts +4 -0
  33. package/dist/index.cjs +1905 -0
  34. package/dist/index.cjs.map +1 -0
  35. package/dist/index.d.ts +9 -20
  36. package/dist/index.js +1872 -62
  37. package/dist/index.js.map +1 -1
  38. package/dist/lib/axios-rate-limiter.d.ts +2 -0
  39. package/dist/lib/platform/index.d.ts +6 -0
  40. package/dist/lib/platform/node.d.ts +6 -0
  41. package/dist/mapper/doc.d.ts +26 -25
  42. package/dist/mapper/index.d.ts +2 -2
  43. package/dist/mapper/story.d.ts +4 -4
  44. package/dist/types/ans-types.d.ts +2287 -0
  45. package/dist/types/gallery.d.ts +1 -1
  46. package/dist/types/index.d.ts +15 -7
  47. package/dist/types/section.d.ts +1 -1
  48. package/dist/utils/arc/ans.d.ts +2 -2
  49. package/dist/utils/arc/content.d.ts +1 -1
  50. package/dist/utils/arc/index.d.ts +3 -3
  51. package/dist/utils/decorator.d.ts +1 -1
  52. package/package.json +28 -18
  53. package/dist/api/abstract-api.js +0 -61
  54. package/dist/api/abstract-api.js.map +0 -1
  55. package/dist/api/author/index.js +0 -19
  56. package/dist/api/author/index.js.map +0 -1
  57. package/dist/api/author/types.js +0 -3
  58. package/dist/api/author/types.js.map +0 -1
  59. package/dist/api/content/index.js +0 -29
  60. package/dist/api/content/index.js.map +0 -1
  61. package/dist/api/content/types.js +0 -3
  62. package/dist/api/content/types.js.map +0 -1
  63. package/dist/api/content-ops/index.js +0 -27
  64. package/dist/api/content-ops/index.js.map +0 -1
  65. package/dist/api/content-ops/types.js +0 -3
  66. package/dist/api/content-ops/types.js.map +0 -1
  67. package/dist/api/custom/index.js +0 -18
  68. package/dist/api/custom/index.js.map +0 -1
  69. package/dist/api/draft/index.js +0 -63
  70. package/dist/api/draft/index.js.map +0 -1
  71. package/dist/api/draft/types.js +0 -3
  72. package/dist/api/draft/types.js.map +0 -1
  73. package/dist/api/error.js +0 -26
  74. package/dist/api/error.js.map +0 -1
  75. package/dist/api/global-settings/index.js +0 -19
  76. package/dist/api/global-settings/index.js.map +0 -1
  77. package/dist/api/global-settings/types.js +0 -3
  78. package/dist/api/global-settings/types.js.map +0 -1
  79. package/dist/api/identity/index.js +0 -35
  80. package/dist/api/identity/index.js.map +0 -1
  81. package/dist/api/identity/types.js +0 -3
  82. package/dist/api/identity/types.js.map +0 -1
  83. package/dist/api/ifx/index.js +0 -94
  84. package/dist/api/ifx/index.js.map +0 -1
  85. package/dist/api/ifx/types.js +0 -3
  86. package/dist/api/ifx/types.js.map +0 -1
  87. package/dist/api/index.js +0 -49
  88. package/dist/api/index.js.map +0 -1
  89. package/dist/api/migration-center/index.js +0 -45
  90. package/dist/api/migration-center/index.js.map +0 -1
  91. package/dist/api/migration-center/types.js +0 -41
  92. package/dist/api/migration-center/types.js.map +0 -1
  93. package/dist/api/photo-center/index.js +0 -64
  94. package/dist/api/photo-center/index.js.map +0 -1
  95. package/dist/api/photo-center/types.js +0 -3
  96. package/dist/api/photo-center/types.js.map +0 -1
  97. package/dist/api/redirect/index.js +0 -23
  98. package/dist/api/redirect/index.js.map +0 -1
  99. package/dist/api/redirect/types.js +0 -3
  100. package/dist/api/redirect/types.js.map +0 -1
  101. package/dist/api/retail-events/index.js +0 -18
  102. package/dist/api/retail-events/index.js.map +0 -1
  103. package/dist/api/sales/index.js +0 -25
  104. package/dist/api/sales/index.js.map +0 -1
  105. package/dist/api/sales/types.js +0 -3
  106. package/dist/api/sales/types.js.map +0 -1
  107. package/dist/api/signing-service/index.js +0 -15
  108. package/dist/api/signing-service/index.js.map +0 -1
  109. package/dist/api/signing-service/types.js +0 -3
  110. package/dist/api/signing-service/types.js.map +0 -1
  111. package/dist/api/site/index.js +0 -44
  112. package/dist/api/site/index.js.map +0 -1
  113. package/dist/api/site/types.js +0 -3
  114. package/dist/api/site/types.js.map +0 -1
  115. package/dist/api/tags/index.js +0 -36
  116. package/dist/api/tags/index.js.map +0 -1
  117. package/dist/api/tags/types.js +0 -3
  118. package/dist/api/tags/types.js.map +0 -1
  119. package/dist/api/websked/index.js +0 -47
  120. package/dist/api/websked/index.js.map +0 -1
  121. package/dist/api/websked/types.js +0 -3
  122. package/dist/api/websked/types.js.map +0 -1
  123. package/dist/api/ws.client.js +0 -68
  124. package/dist/api/ws.client.js.map +0 -1
  125. package/dist/content-elements/content-elements.js +0 -235
  126. package/dist/content-elements/content-elements.js.map +0 -1
  127. package/dist/content-elements/html/html.constants.js +0 -40
  128. package/dist/content-elements/html/html.constants.js.map +0 -1
  129. package/dist/content-elements/html/html.processor.js +0 -370
  130. package/dist/content-elements/html/html.processor.js.map +0 -1
  131. package/dist/content-elements/html/html.utils.js +0 -79
  132. package/dist/content-elements/html/html.utils.js.map +0 -1
  133. package/dist/content-elements/html/index.js +0 -41
  134. package/dist/content-elements/html/index.js.map +0 -1
  135. package/dist/content-elements/index.js +0 -42
  136. package/dist/content-elements/index.js.map +0 -1
  137. package/dist/mapper/doc.js +0 -146
  138. package/dist/mapper/doc.js.map +0 -1
  139. package/dist/mapper/index.js +0 -8
  140. package/dist/mapper/index.js.map +0 -1
  141. package/dist/mapper/story.js +0 -111
  142. package/dist/mapper/story.js.map +0 -1
  143. package/dist/scripts/json-schema-to-ts.js +0 -8
  144. package/dist/scripts/json-schema-to-ts.js.map +0 -1
  145. package/dist/tests/ans/mapper.test.d.ts +0 -1
  146. package/dist/tests/ans/mapper.test.js +0 -93
  147. package/dist/tests/ans/mapper.test.js.map +0 -1
  148. package/dist/tests/api/basic.test.d.ts +0 -1
  149. package/dist/tests/api/basic.test.js +0 -20
  150. package/dist/tests/api/basic.test.js.map +0 -1
  151. package/dist/tests/api/retry.test.d.ts +0 -1
  152. package/dist/tests/api/retry.test.js +0 -51
  153. package/dist/tests/api/retry.test.js.map +0 -1
  154. package/dist/tests/api/utils.test.d.ts +0 -1
  155. package/dist/tests/api/utils.test.js +0 -255
  156. package/dist/tests/api/utils.test.js.map +0 -1
  157. package/dist/tests/content-elements/html.processor.test.d.ts +0 -1
  158. package/dist/tests/content-elements/html.processor.test.js +0 -35
  159. package/dist/tests/content-elements/html.processor.test.js.map +0 -1
  160. package/dist/types/author.js +0 -8
  161. package/dist/types/author.js.map +0 -1
  162. package/dist/types/content-elements.d.ts +0 -4
  163. package/dist/types/content-elements.js +0 -3
  164. package/dist/types/content-elements.js.map +0 -1
  165. package/dist/types/gallery.js +0 -3
  166. package/dist/types/gallery.js.map +0 -1
  167. package/dist/types/index.js +0 -44
  168. package/dist/types/index.js.map +0 -1
  169. package/dist/types/section.js +0 -3
  170. package/dist/types/section.js.map +0 -1
  171. package/dist/types/story.js +0 -8
  172. package/dist/types/story.js.map +0 -1
  173. package/dist/types/utils.js +0 -3
  174. package/dist/types/utils.js.map +0 -1
  175. package/dist/types/video.js +0 -8
  176. package/dist/types/video.js.map +0 -1
  177. package/dist/utils/arc/ans.js +0 -14
  178. package/dist/utils/arc/ans.js.map +0 -1
  179. package/dist/utils/arc/content.js +0 -79
  180. package/dist/utils/arc/content.js.map +0 -1
  181. package/dist/utils/arc/id.js +0 -40
  182. package/dist/utils/arc/id.js.map +0 -1
  183. package/dist/utils/arc/index.js +0 -45
  184. package/dist/utils/arc/index.js.map +0 -1
  185. package/dist/utils/cache.js +0 -63
  186. package/dist/utils/cache.js.map +0 -1
  187. package/dist/utils/decorator.js +0 -20
  188. package/dist/utils/decorator.js.map +0 -1
  189. package/dist/utils/duration.js +0 -21
  190. package/dist/utils/duration.js.map +0 -1
  191. package/dist/utils/index.js +0 -52
  192. package/dist/utils/index.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { type AxiosError } from 'axios';
2
- import { type RateLimitedAxiosInstance } from 'axios-rate-limit';
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 { AStory } from '../../types/story';
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,10 +1,14 @@
1
- import type { AGallery } from '../../types/gallery';
2
- import type { ARedirectObject, AStory } from '../../types/story';
1
+ import type { ANS } from '../../types/index.js';
3
2
  export type GetStoryParams = {
4
- _id: string;
5
- published: boolean;
3
+ /** Specifies the ID of the website making the request. Required. */
6
4
  website: string;
7
- website_url: string;
5
+ /** Specifies the Arc ID of the target document. Either _id or website_url must be provided. */
6
+ _id?: string;
7
+ /** The relative URL path of the document on the specified website. Either _id or website_url must be provided. */
8
+ website_url?: string;
9
+ /** Determines whether to return published or draft documents. Defaults to true. */
10
+ published?: boolean;
11
+ /** A comma-separated list of fields to include in the response. Improves performance when specified. */
8
12
  included_fields?: string;
9
13
  };
10
14
  export type GetStoriesByIdsParams = {
@@ -38,14 +42,14 @@ export type ScanParams = {
38
42
  };
39
43
  export type SearchResponse = {
40
44
  type: 'results';
41
- content_elements: (AStory | AGallery | ARedirectObject)[];
45
+ content_elements: (ANS.AStory | ANS.AGallery | ANS.ARedirectObject)[];
42
46
  count: number;
43
47
  next?: number;
44
48
  previous?: number;
45
49
  };
46
50
  export type ScanResponse = {
47
51
  type: 'results';
48
- content_elements: (AStory | AGallery | ARedirectObject)[];
52
+ content_elements: (ANS.AStory | ANS.AGallery | ANS.ARedirectObject)[];
49
53
  count: number;
50
54
  next: string;
51
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 { AStory } from '../../types/story';
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 { AStory } from '../../types/story';
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>;
@@ -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>;
@@ -1,24 +1,22 @@
1
- import type { ArcAPIOptions } from './abstract-api';
2
- import { ArcAuthor } from './author';
3
- import { ArcContent } from './content';
4
- import { ArcContentOps } from './content-ops';
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 { AGallery } from '../../types/gallery';
2
- import type { SectionReference } from '../../types/section';
3
- import type { AStory, AnImage, Tag } from '../../types/story';
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 { AGallery } from '../../types/gallery';
3
- import type { AnImage } from '../../types/story';
4
- import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api';
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 { AGallery } from '../../types/gallery';
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>;
@@ -1,12 +1,11 @@
1
- import type { Section, SetSection } from '../../types/section';
2
- import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api';
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: SetSection): Promise<any>;
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>;
@@ -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
+ };
@@ -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>;
@@ -1,4 +1,4 @@
1
- import ws from 'ws';
1
+ import * as ws from 'ws';
2
2
  export type PromiseOr<T> = Promise<T> | T;
3
3
  export type Callback<Args extends any[] = any[]> = (...args: Args) => PromiseOr<void>;
4
4
  export declare class WsClient {