@code.store/arcxp-sdk-ts 4.27.1 → 4.29.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.
- package/dist/api/draft/index.d.ts +1 -0
- package/dist/api/draft/index.js +4 -0
- package/dist/api/draft/index.js.map +1 -1
- package/dist/api/error.d.ts +1 -1
- package/dist/api/error.js +2 -0
- package/dist/api/error.js.map +1 -1
- package/dist/content-elements/index.d.ts +7 -12
- package/dist/content-elements/index.js +4 -14
- package/dist/content-elements/index.js.map +1 -1
- package/dist/tests/api/basic.test.js +6 -1
- package/dist/tests/api/basic.test.js.map +1 -1
- package/dist/types/author.d.ts +139 -10
- package/dist/types/gallery.d.ts +1 -1
- package/dist/types/story.d.ts +142 -13
- package/package.json +1 -1
|
@@ -3,6 +3,7 @@ import type { CreateDocumentRedirectPayload, CreateExternalRedirectPayload, Crea
|
|
|
3
3
|
export declare class ArcDraft extends ArcAbstractAPI {
|
|
4
4
|
constructor(options: ArcAPIOptions);
|
|
5
5
|
generateId(id: string): Promise<string>;
|
|
6
|
+
publishDocument(id: string, type?: string): Promise<Revision>;
|
|
6
7
|
unpublishDocument(id: string, type?: string): Promise<Revision>;
|
|
7
8
|
deleteDocument(id: string, type?: string): Promise<Document>;
|
|
8
9
|
getPublishedRevision(id: string, type?: string): Promise<Revision>;
|
package/dist/api/draft/index.js
CHANGED
|
@@ -10,6 +10,10 @@ class ArcDraft extends abstract_api_1.ArcAbstractAPI {
|
|
|
10
10
|
const { data } = await this.client.get('/arcuuid', { params: { id } });
|
|
11
11
|
return data.id;
|
|
12
12
|
}
|
|
13
|
+
async publishDocument(id, type = 'story') {
|
|
14
|
+
const { data } = await this.client.post(`/${type}/${id}/revision/published`);
|
|
15
|
+
return data;
|
|
16
|
+
}
|
|
13
17
|
async unpublishDocument(id, type = 'story') {
|
|
14
18
|
const { data } = await this.client.delete(`/${type}/${id}/revision/published`);
|
|
15
19
|
return data;
|
|
@@ -1 +1 @@
|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AI,CAAC,MAAM,CAAC,IAAI,CAAI,aAAa,OAAO,IAAI,UAAU,EAAE,EAAE,OAAO,CAAC,CAAC;QAC1F,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,OAAe,EAAE,UAAkB;QACnD,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAsC,aAAa,OAAO,IAAI,UAAU,EAAE,CAAC,CAAC;QAClH,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,mBAAmB,CAAC,EAAU,EAAE,OAAmC,EAAE,IAAI,GAAG,OAAO;QACvF,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAW,IAAI,IAAI,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,CAAC;QAC3F,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAxDD,4BAwDC"}
|
package/dist/api/error.d.ts
CHANGED
package/dist/api/error.js
CHANGED
|
@@ -8,6 +8,7 @@ class ArcError extends Error {
|
|
|
8
8
|
const ratelimitReset = e.response?.headers['arcpub-ratelimit-reset'];
|
|
9
9
|
const data = {
|
|
10
10
|
name: `${service}Error`,
|
|
11
|
+
message: e.message,
|
|
11
12
|
responseData: e.response?.data,
|
|
12
13
|
responseStatus: e.response?.status,
|
|
13
14
|
responseConfig: e.response?.config,
|
|
@@ -18,6 +19,7 @@ class ArcError extends Error {
|
|
|
18
19
|
const message = (0, utils_1.safeJSONStringify)(data);
|
|
19
20
|
super(message);
|
|
20
21
|
Object.assign(this, data);
|
|
22
|
+
this.stack = e.stack;
|
|
21
23
|
}
|
|
22
24
|
}
|
|
23
25
|
exports.ArcError = ArcError;
|
package/dist/api/error.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../src/api/error.ts"],"names":[],"mappings":";;;AACA,oCAA6C;AAE7C,MAAa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O;SACR,CAAC;QACF,MAAM,OAAO,GAAG,IAAA,yBAAiB,EAAC,IAAI,CAAC,CAAC;QAExC,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC1B,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC;IACvB,CAAC;CACF;AA5BD,4BA4BC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Alignment, AnImage } from '../types/story';
|
|
1
|
+
import type { Alignment, AnImage, AnElementThatCanBeListedAsPartOfContentElements } from '../types/story';
|
|
2
|
+
export type CElement = AnElementThatCanBeListedAsPartOfContentElements;
|
|
2
3
|
export type ContentElementType<T extends keyof typeof ContentElement> = ReturnType<(typeof ContentElement)[T]>;
|
|
3
4
|
export declare const ContentElement: {
|
|
4
5
|
divider: () => {
|
|
@@ -9,17 +10,14 @@ export declare const ContentElement: {
|
|
|
9
10
|
content: string;
|
|
10
11
|
alignment: Alignment;
|
|
11
12
|
};
|
|
12
|
-
quote: (
|
|
13
|
+
quote: (items: CElement[], citation?: string, subtype?: 'blockquote' | 'pullquote') => {
|
|
13
14
|
type: "quote";
|
|
14
15
|
subtype: "blockquote" | "pullquote";
|
|
15
16
|
citation: {
|
|
16
17
|
type: "text";
|
|
17
18
|
content: string;
|
|
18
19
|
};
|
|
19
|
-
content_elements:
|
|
20
|
-
content: string;
|
|
21
|
-
type: "text";
|
|
22
|
-
}[];
|
|
20
|
+
content_elements: AnElementThatCanBeListedAsPartOfContentElements[];
|
|
23
21
|
};
|
|
24
22
|
interstitial_link: (url: string, content: string) => {
|
|
25
23
|
type: "interstitial_link";
|
|
@@ -42,13 +40,10 @@ export declare const ContentElement: {
|
|
|
42
40
|
id: string;
|
|
43
41
|
};
|
|
44
42
|
};
|
|
45
|
-
list: (type: 'ordered' | 'unordered', items:
|
|
43
|
+
list: (type: 'ordered' | 'unordered', items: CElement[]) => {
|
|
46
44
|
type: "list";
|
|
47
45
|
list_type: "ordered" | "unordered";
|
|
48
|
-
items:
|
|
49
|
-
type: "text";
|
|
50
|
-
content: string;
|
|
51
|
-
}[];
|
|
46
|
+
items: AnElementThatCanBeListedAsPartOfContentElements[];
|
|
52
47
|
};
|
|
53
48
|
link_list: (title: string, links: {
|
|
54
49
|
content: string;
|
|
@@ -69,7 +64,7 @@ export declare const ContentElement: {
|
|
|
69
64
|
referent_properties: {
|
|
70
65
|
type: "image";
|
|
71
66
|
_id: string;
|
|
72
|
-
version?: "0.10.
|
|
67
|
+
version?: "0.10.10" | undefined;
|
|
73
68
|
subtype?: string | undefined;
|
|
74
69
|
channels?: import("../types/story").ChannelTrait | undefined;
|
|
75
70
|
alignment?: Alignment | undefined;
|
|
@@ -14,20 +14,15 @@ exports.ContentElement = {
|
|
|
14
14
|
alignment,
|
|
15
15
|
};
|
|
16
16
|
},
|
|
17
|
-
quote: (
|
|
17
|
+
quote: (items, citation = '', subtype = 'pullquote') => {
|
|
18
18
|
return {
|
|
19
19
|
type: 'quote',
|
|
20
20
|
subtype,
|
|
21
21
|
citation: {
|
|
22
22
|
type: 'text',
|
|
23
|
-
content:
|
|
23
|
+
content: citation,
|
|
24
24
|
},
|
|
25
|
-
content_elements:
|
|
26
|
-
{
|
|
27
|
-
content,
|
|
28
|
-
type: 'text',
|
|
29
|
-
},
|
|
30
|
-
],
|
|
25
|
+
content_elements: items,
|
|
31
26
|
};
|
|
32
27
|
},
|
|
33
28
|
interstitial_link: (url, content) => {
|
|
@@ -63,12 +58,7 @@ exports.ContentElement = {
|
|
|
63
58
|
return {
|
|
64
59
|
type: 'list',
|
|
65
60
|
list_type: type,
|
|
66
|
-
items
|
|
67
|
-
return {
|
|
68
|
-
type: 'text',
|
|
69
|
-
content,
|
|
70
|
-
};
|
|
71
|
-
}),
|
|
61
|
+
items,
|
|
72
62
|
};
|
|
73
63
|
},
|
|
74
64
|
link_list: (title, links) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/content-elements/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/content-elements/index.ts"],"names":[],"mappings":";;;AAMa,QAAA,cAAc,GAAG;IAC5B,OAAO,EAAE,GAAG,EAAE;QACZ,OAAO;YACL,IAAI,EAAE,SAAkB;SACzB,CAAC;IACJ,CAAC;IACD,IAAI,EAAE,CAAC,OAAe,EAAE,YAAuB,MAAM,EAAE,EAAE;QACvD,OAAO;YACL,IAAI,EAAE,MAAe;YACrB,OAAO;YACP,SAAS;SACV,CAAC;IACJ,CAAC;IACD,KAAK,EAAE,CAAC,KAAiB,EAAE,QAAQ,GAAG,EAAE,EAAE,UAAsC,WAAW,EAAE,EAAE;QAC7F,OAAO;YACL,IAAI,EAAE,OAAgB;YACtB,OAAO;YACP,QAAQ,EAAE;gBACR,IAAI,EAAE,MAAe;gBACrB,OAAO,EAAE,QAAQ;aAClB;YACD,gBAAgB,EAAE,KAAK;SACxB,CAAC;IACJ,CAAC;IACD,iBAAiB,EAAE,CAAC,GAAW,EAAE,OAAe,EAAE,EAAE;QAClD,OAAO;YACL,IAAI,EAAE,mBAA4B;YAClC,GAAG;YACH,OAAO;SACR,CAAC;IACJ,CAAC;IACD,MAAM,EAAE,CAAC,OAAe,EAAE,KAAa,EAAE,EAAE;QACzC,OAAO;YACL,IAAI,EAAE,QAAiB;YACvB,OAAO;YACP,KAAK;SACN,CAAC;IACJ,CAAC;IACD,QAAQ,EAAE,CAAC,OAAe,EAAE,EAAE;QAC5B,OAAO;YACL,IAAI,EAAE,UAAmB;YACzB,OAAO;SACR,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,CAAC,EAAU,EAAE,EAAE;QACtB,OAAO;YACL,IAAI,EAAE,WAAoB;YAC1B,QAAQ,EAAE;gBACR,IAAI,EAAE,SAAkB;gBACxB,EAAE;aACH;SACF,CAAC;IACJ,CAAC;IACD,IAAI,EAAE,CA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gBACjB,IAAI,EAAE,WAAW;aAClB;YACD,IAAI,EAAE,WAAoB;SAC3B,CAAC;IACJ,CAAC;IACD,WAAW,EAAE,CAAC,EAAU,EAAE,QAAQ,GAAG,kDAAkD,EAAE,EAAE;QACzF,OAAO;YACL,QAAQ,EAAE;gBACR,EAAE;gBACF,QAAQ;gBACR,OAAO,EAAE,QAAQ;gBACjB,IAAI,EAAE,aAAa;aACpB;YACD,IAAI,EAAE,WAAoB;SAC3B,CAAC;IACJ,CAAC;IACD,MAAM,EAAE,CAAC,EAAU,EAAE,QAAQ,GAAG,oCAAoC,EAAE,EAAE;QACtE,OAAO;YACL,QAAQ,EAAE;gBACR,EAAE;gBACF,QAAQ;gBACR,OAAO,EAAE,QAAQ;gBACjB,IAAI,EAAE,QAAQ;aACf;YACD,IAAI,EAAE,WAAoB;SAC3B,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -9,7 +9,12 @@ const api_1 = require("../../api");
|
|
|
9
9
|
});
|
|
10
10
|
(0, vitest_1.test)('Should throw authorization error (Invalid token)', async () => {
|
|
11
11
|
const API = (0, api_1.ArcAPI)({ credentials: { organizationName: 'codestore', accessToken: Date.now().toString() } });
|
|
12
|
-
await (0, vitest_1.expect)(API.Draft.generateId(Date.now().toString())).rejects.
|
|
12
|
+
await (0, vitest_1.expect)(API.Draft.generateId(Date.now().toString())).rejects.toMatchObject({
|
|
13
|
+
name: 'ArcDraftError',
|
|
14
|
+
message: 'Request failed with status code 401',
|
|
15
|
+
service: 'ArcDraft',
|
|
16
|
+
responseStatus: 401,
|
|
17
|
+
});
|
|
13
18
|
});
|
|
14
19
|
});
|
|
15
20
|
//# sourceMappingURL=basic.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basic.test.js","sourceRoot":"","sources":["../../../src/tests/api/basic.test.ts"],"names":[],"mappings":";;AAAA,mCAAgE;AAChE,mCAAmC;AAEnC,IAAA,iBAAQ,EAAC,SAAS,EAAE,GAAG,EAA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AqC;YAC9C,OAAO,EAAE,UAAU;YACnB,cAAc,EAAE,GAAG;SACpB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/types/author.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export type GloballyUniqueIDTrait = string;
|
|
|
10
10
|
/**
|
|
11
11
|
* The version of ANS that this object was serialized as, in major.minor.patch format. For top-level content objects, this is a required trait.
|
|
12
12
|
*/
|
|
13
|
-
export type DescribesTheANSVersionOfThisObject = '0.10.
|
|
13
|
+
export type DescribesTheANSVersionOfThisObject = '0.10.10';
|
|
14
14
|
/**
|
|
15
15
|
* The full human name of contributor. See also byline, first_name, last_name, middle_name, suffix.
|
|
16
16
|
*/
|
|
@@ -699,7 +699,27 @@ export interface Taxonomy {
|
|
|
699
699
|
auxiliaries?: Auxiliary[];
|
|
700
700
|
tags?: Tag[];
|
|
701
701
|
/**
|
|
702
|
-
*
|
|
702
|
+
* A list of categories. Categories are overall, high-level classification of what the content is about.
|
|
703
|
+
*/
|
|
704
|
+
categories?: Category[];
|
|
705
|
+
/**
|
|
706
|
+
* A list of topics. Topics are the subjects that the content is about.
|
|
707
|
+
*/
|
|
708
|
+
content_topics?: ContentTopic[];
|
|
709
|
+
/**
|
|
710
|
+
* A list of entities. Entities are proper nouns, like people, places, and organizations.
|
|
711
|
+
*/
|
|
712
|
+
entities?: Entity[];
|
|
713
|
+
/**
|
|
714
|
+
* A list of custom categories. Categories are overall, high-level classification of what the content is about.
|
|
715
|
+
*/
|
|
716
|
+
custom_categories?: CustomCategory[];
|
|
717
|
+
/**
|
|
718
|
+
* A list of custom entities. Entities are proper nouns, like people, places, and organizations.
|
|
719
|
+
*/
|
|
720
|
+
custom_entities?: CustomEntity[];
|
|
721
|
+
/**
|
|
722
|
+
* Deprecated in 0.10.10. (See `primary_section` instead.) A primary site object or reference to one. In the Arc ecosystem, a reference here is denormalized into a site from the arc-site-service.
|
|
703
723
|
*/
|
|
704
724
|
primary_site?: Site | (RepresentationOfANormalizedElement & {
|
|
705
725
|
referent?: {
|
|
@@ -719,7 +739,7 @@ export interface Taxonomy {
|
|
|
719
739
|
[k: string]: unknown;
|
|
720
740
|
});
|
|
721
741
|
/**
|
|
722
|
-
* Deprecated in 0.10.
|
|
742
|
+
* Deprecated in 0.10.10. (See `sections` instead.) A list of site objects or references to them. In the Arc ecosystem, references in this list are denormalized into sites from the arc-site-service. In a multi-site context, sites will be denormalized against an organization's default website only.
|
|
723
743
|
*/
|
|
724
744
|
sites?: (Site | (RepresentationOfANormalizedElement & {
|
|
725
745
|
referent?: {
|
|
@@ -849,6 +869,115 @@ export interface Tag {
|
|
|
849
869
|
additional_properties?: HasAdditionalProperties;
|
|
850
870
|
slug?: Slug;
|
|
851
871
|
}
|
|
872
|
+
/**
|
|
873
|
+
* Models a category used in classifying a piece of content.
|
|
874
|
+
*/
|
|
875
|
+
export interface Category {
|
|
876
|
+
/**
|
|
877
|
+
* The unique ID for this category within its classifier.
|
|
878
|
+
*/
|
|
879
|
+
_id: string;
|
|
880
|
+
/**
|
|
881
|
+
* The unique identifier for the classifier that matched this category.
|
|
882
|
+
*/
|
|
883
|
+
classifier: string;
|
|
884
|
+
/**
|
|
885
|
+
* The human readable label for this category.
|
|
886
|
+
*/
|
|
887
|
+
name: string;
|
|
888
|
+
/**
|
|
889
|
+
* The score assigned to this category between 0 and 1, where 1 is an exact match.
|
|
890
|
+
*/
|
|
891
|
+
score?: number;
|
|
892
|
+
}
|
|
893
|
+
/**
|
|
894
|
+
* Models a keyword used in describing a piece of content.
|
|
895
|
+
*/
|
|
896
|
+
export interface ContentTopic {
|
|
897
|
+
/**
|
|
898
|
+
* The unique Wikidata ID for this topic.
|
|
899
|
+
*/
|
|
900
|
+
_id: string;
|
|
901
|
+
/**
|
|
902
|
+
* A topic this piece of content is about.
|
|
903
|
+
*/
|
|
904
|
+
label: string;
|
|
905
|
+
/**
|
|
906
|
+
* The score assigned to this topic between 0 and 1, where 1 is an exact match.
|
|
907
|
+
*/
|
|
908
|
+
score: number;
|
|
909
|
+
}
|
|
910
|
+
/**
|
|
911
|
+
* Models a named entity (i.e. name of a person, place, or organization) used in a piece of content.
|
|
912
|
+
*/
|
|
913
|
+
export interface Entity {
|
|
914
|
+
/**
|
|
915
|
+
* The unique Wikidata ID for this entity.
|
|
916
|
+
*/
|
|
917
|
+
_id?: string;
|
|
918
|
+
/**
|
|
919
|
+
* A unique identifier for a custom-defined entity.
|
|
920
|
+
*/
|
|
921
|
+
custom_id?: string;
|
|
922
|
+
/**
|
|
923
|
+
* The actual string of text that was identified as a named entity.
|
|
924
|
+
*/
|
|
925
|
+
label: string;
|
|
926
|
+
/**
|
|
927
|
+
* A description of what the named entity is. E.g. 'organization', 'person', or 'location'.
|
|
928
|
+
*/
|
|
929
|
+
type?: string;
|
|
930
|
+
/**
|
|
931
|
+
* The score assigned to this entity between 0 and 1, where 1 is an exact match.
|
|
932
|
+
*/
|
|
933
|
+
score?: number;
|
|
934
|
+
}
|
|
935
|
+
/**
|
|
936
|
+
* Models a category used in classifying a piece of content.
|
|
937
|
+
*/
|
|
938
|
+
export interface CustomCategory {
|
|
939
|
+
/**
|
|
940
|
+
* The unique ID for this category within its classifier.
|
|
941
|
+
*/
|
|
942
|
+
_id: string;
|
|
943
|
+
/**
|
|
944
|
+
* The unique identifier for the classifier that matched this category.
|
|
945
|
+
*/
|
|
946
|
+
classifier: string;
|
|
947
|
+
/**
|
|
948
|
+
* The human readable label for this category.
|
|
949
|
+
*/
|
|
950
|
+
name: string;
|
|
951
|
+
/**
|
|
952
|
+
* The score assigned to this category between 0 and 1, where 1 is an exact match.
|
|
953
|
+
*/
|
|
954
|
+
score?: number;
|
|
955
|
+
}
|
|
956
|
+
/**
|
|
957
|
+
* Models a named custom entity (i.e. name of a person, place, or organization) used in a piece of content.
|
|
958
|
+
*/
|
|
959
|
+
export interface CustomEntity {
|
|
960
|
+
/**
|
|
961
|
+
* The unique ID for this entity.
|
|
962
|
+
*/
|
|
963
|
+
_id?: string;
|
|
964
|
+
/**
|
|
965
|
+
* A unique identifier for a custom-defined entity.
|
|
966
|
+
*/
|
|
967
|
+
custom_id?: string;
|
|
968
|
+
/**
|
|
969
|
+
* The actual string of text that was identified as a named entity.
|
|
970
|
+
*/
|
|
971
|
+
label: string;
|
|
972
|
+
/**
|
|
973
|
+
* A description of what the named entity is. E.g. 'organization', 'person', or 'location'.
|
|
974
|
+
*/
|
|
975
|
+
type?: string;
|
|
976
|
+
/**
|
|
977
|
+
* The score assigned to this entity between 0 and 1, where 1 is an exact match.
|
|
978
|
+
*/
|
|
979
|
+
score?: number;
|
|
980
|
+
}
|
|
852
981
|
/**
|
|
853
982
|
* A hierarchical section or 'site' in a taxonomy. In the Arc ecosystem, these are stored in the arc-site-service.
|
|
854
983
|
*/
|
|
@@ -919,12 +1048,12 @@ export interface Section {
|
|
|
919
1048
|
* Lists of promotional content to use when highlighting the story. In the Arc ecosystem, references in these lists will be denormalized.
|
|
920
1049
|
*/
|
|
921
1050
|
export interface PromoItems {
|
|
922
|
-
basic?: AContentObject | RepresentationOfANormalizedElement |
|
|
1051
|
+
basic?: AContentObject | RepresentationOfANormalizedElement | HttpsRawGithubusercontentComWashingtonpostAnsSchemaMasterSrcMainResourcesSchemaAns01010StoryElementsRawHtmlJson | CustomEmbed;
|
|
923
1052
|
/**
|
|
924
1053
|
* This interface was referenced by `PromoItems`'s JSON-Schema definition
|
|
925
1054
|
* via the `patternProperty` ".*".
|
|
926
1055
|
*/
|
|
927
|
-
[k: string]: AContentObject | RepresentationOfANormalizedElement |
|
|
1056
|
+
[k: string]: AContentObject | RepresentationOfANormalizedElement | HttpsRawGithubusercontentComWashingtonpostAnsSchemaMasterSrcMainResourcesSchemaAns01010StoryElementsRawHtmlJson | CustomEmbed | undefined;
|
|
928
1057
|
}
|
|
929
1058
|
/**
|
|
930
1059
|
* Holds common attributes of ANS Content objects.
|
|
@@ -990,7 +1119,7 @@ export interface Related_Content {
|
|
|
990
1119
|
* This interface was referenced by `Related_Content`'s JSON-Schema definition
|
|
991
1120
|
* via the `patternProperty` ".*".
|
|
992
1121
|
*/
|
|
993
|
-
[k: string]:
|
|
1122
|
+
[k: string]: [ARedirectObject] | (AContentObject | RepresentationOfANormalizedElement | CustomEmbed)[] | undefined;
|
|
994
1123
|
}
|
|
995
1124
|
/**
|
|
996
1125
|
* A redirect to another story.
|
|
@@ -1013,7 +1142,7 @@ export interface OwnerInformation {
|
|
|
1013
1142
|
*/
|
|
1014
1143
|
id?: string;
|
|
1015
1144
|
/**
|
|
1016
|
-
* Deprecated in 0.10.
|
|
1145
|
+
* Deprecated in 0.10.10. See `distributor.name`. (Formerly: The human-readable name of original producer of content. Distinguishes between Wires, Staff and other sources.)
|
|
1017
1146
|
*/
|
|
1018
1147
|
name?: string;
|
|
1019
1148
|
/**
|
|
@@ -1308,11 +1437,11 @@ export interface Source {
|
|
|
1308
1437
|
*/
|
|
1309
1438
|
source_id?: string;
|
|
1310
1439
|
/**
|
|
1311
|
-
* Deprecated in 0.10.
|
|
1440
|
+
* Deprecated in 0.10.10. See `distributor.category` and `distributor.subcategory`. (Formerly: The method used to enter this content. E.g. 'staff', 'wires'.)
|
|
1312
1441
|
*/
|
|
1313
1442
|
source_type?: string;
|
|
1314
1443
|
/**
|
|
1315
|
-
* Deprecated in 0.10.
|
|
1444
|
+
* Deprecated in 0.10.10. See `distributor.name`. (Formerly: The human-readable name of the organization who first produced this content. E.g., 'Reuters'.)
|
|
1316
1445
|
*/
|
|
1317
1446
|
name?: string;
|
|
1318
1447
|
/**
|
|
@@ -1466,7 +1595,7 @@ export interface Contributors {
|
|
|
1466
1595
|
/**
|
|
1467
1596
|
* An html content element
|
|
1468
1597
|
*/
|
|
1469
|
-
export interface
|
|
1598
|
+
export interface HttpsRawGithubusercontentComWashingtonpostAnsSchemaMasterSrcMainResourcesSchemaAns01010StoryElementsRawHtmlJson {
|
|
1470
1599
|
type: 'raw_html';
|
|
1471
1600
|
_id?: GloballyUniqueIDTrait;
|
|
1472
1601
|
subtype?: SubtypeOrTemplate;
|
package/dist/types/gallery.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GloballyUniqueIDTrait, DescribesTheANSVersionOfThisObject, SubtypeOrTemplate, ChannelTrait, Alignment, Locale, CopyrightInformation, CanonicalURL, CanonicalWebsite, Website, WebsiteURL, Short_Url, CreatedDate, LastUpdatedDate, Publish_Date, FirstPublishDate, Display_Date, LocationRelatedTrait, Geo, Address, Editor_Note, Status, Headlines, SubHeadlines, Description, CreditTrait, VanityCreditsTrait, Taxonomy, PromoItems, Related_Content, OwnerInformation, SchedulingInformation, WorkflowInformation, Pitches, Revision, Syndication, Source, Distributor, Tracking, Comments, Label, Slug, ContentRestrictions, HasAdditionalProperties, AliasesTrait, ACollectionOfContent, WebsitesInput, Contributors } from './story';
|
|
1
|
+
import type { GloballyUniqueIDTrait, DescribesTheANSVersionOfThisObject, SubtypeOrTemplate, ChannelTrait, Alignment, Locale, CopyrightInformation, CanonicalURL, CanonicalWebsite, Website, WebsiteURL, Short_Url, CreatedDate, LastUpdatedDate, Publish_Date, FirstPublishDate, Display_Date, LocationRelatedTrait, Geo, Address, Editor_Note, Status, Headlines, SubHeadlines, Description, CreditTrait, VanityCreditsTrait, Taxonomy, PromoItems, Related_Content, OwnerInformation, SchedulingInformation, WorkflowInformation, Pitches, Revision, Syndication, Source, Distributor, Tracking, Comments, Label, Slug, ContentRestrictions, HasAdditionalProperties, AliasesTrait, ACollectionOfContent, WebsitesInput, Contributors } from './story';
|
|
2
2
|
export interface AGallery {
|
|
3
3
|
type: 'gallery';
|
|
4
4
|
_id?: GloballyUniqueIDTrait;
|
package/dist/types/story.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export type GloballyUniqueIDTrait = string;
|
|
|
10
10
|
/**
|
|
11
11
|
* The version of ANS that this object was serialized as, in major.minor.patch format. For top-level content objects, this is a required trait.
|
|
12
12
|
*/
|
|
13
|
-
export type DescribesTheANSVersionOfThisObject = '0.10.
|
|
13
|
+
export type DescribesTheANSVersionOfThisObject = '0.10.10';
|
|
14
14
|
/**
|
|
15
15
|
* A user-defined categorization method to supplement type. In Arc, this field is reserved for organization-defined purposes, such as selecting the PageBuilder template that should be used to render a document.
|
|
16
16
|
*/
|
|
@@ -350,7 +350,7 @@ export type VoiceTranscriptSConfigurationAndOutput = [
|
|
|
350
350
|
subtype?: SubtypeOrTemplate;
|
|
351
351
|
options: OptionsRequested;
|
|
352
352
|
options_used?: OptionsUsed;
|
|
353
|
-
output?:
|
|
353
|
+
output?: HttpsRawGithubusercontentComWashingtonpostAnsSchemaMasterSrcMainResourcesSchemaAns01010AudioJson;
|
|
354
354
|
[k: string]: unknown;
|
|
355
355
|
},
|
|
356
356
|
...{
|
|
@@ -359,7 +359,7 @@ export type VoiceTranscriptSConfigurationAndOutput = [
|
|
|
359
359
|
subtype?: SubtypeOrTemplate;
|
|
360
360
|
options: OptionsRequested;
|
|
361
361
|
options_used?: OptionsUsed;
|
|
362
|
-
output?:
|
|
362
|
+
output?: HttpsRawGithubusercontentComWashingtonpostAnsSchemaMasterSrcMainResourcesSchemaAns01010AudioJson;
|
|
363
363
|
[k: string]: unknown;
|
|
364
364
|
}[]
|
|
365
365
|
];
|
|
@@ -382,7 +382,7 @@ export type VoiceID1 = string;
|
|
|
382
382
|
/**
|
|
383
383
|
* Audio Content
|
|
384
384
|
*/
|
|
385
|
-
export type
|
|
385
|
+
export type HttpsRawGithubusercontentComWashingtonpostAnsSchemaMasterSrcMainResourcesSchemaAns01010AudioJson = {
|
|
386
386
|
type: 'audio';
|
|
387
387
|
_id?: GloballyUniqueIDTrait;
|
|
388
388
|
version: DescribesTheANSVersionOfThisObject;
|
|
@@ -820,7 +820,27 @@ export interface Taxonomy {
|
|
|
820
820
|
auxiliaries?: Auxiliary[];
|
|
821
821
|
tags?: Tag[];
|
|
822
822
|
/**
|
|
823
|
-
*
|
|
823
|
+
* A list of categories. Categories are overall, high-level classification of what the content is about.
|
|
824
|
+
*/
|
|
825
|
+
categories?: Category[];
|
|
826
|
+
/**
|
|
827
|
+
* A list of topics. Topics are the subjects that the content is about.
|
|
828
|
+
*/
|
|
829
|
+
content_topics?: ContentTopic[];
|
|
830
|
+
/**
|
|
831
|
+
* A list of entities. Entities are proper nouns, like people, places, and organizations.
|
|
832
|
+
*/
|
|
833
|
+
entities?: Entity[];
|
|
834
|
+
/**
|
|
835
|
+
* A list of custom categories. Categories are overall, high-level classification of what the content is about.
|
|
836
|
+
*/
|
|
837
|
+
custom_categories?: CustomCategory[];
|
|
838
|
+
/**
|
|
839
|
+
* A list of custom entities. Entities are proper nouns, like people, places, and organizations.
|
|
840
|
+
*/
|
|
841
|
+
custom_entities?: CustomEntity[];
|
|
842
|
+
/**
|
|
843
|
+
* Deprecated in 0.10.10. (See `primary_section` instead.) A primary site object or reference to one. In the Arc ecosystem, a reference here is denormalized into a site from the arc-site-service.
|
|
824
844
|
*/
|
|
825
845
|
primary_site?: Site | (RepresentationOfANormalizedElement & {
|
|
826
846
|
referent?: {
|
|
@@ -840,7 +860,7 @@ export interface Taxonomy {
|
|
|
840
860
|
[k: string]: unknown;
|
|
841
861
|
});
|
|
842
862
|
/**
|
|
843
|
-
* Deprecated in 0.10.
|
|
863
|
+
* Deprecated in 0.10.10. (See `sections` instead.) A list of site objects or references to them. In the Arc ecosystem, references in this list are denormalized into sites from the arc-site-service. In a multi-site context, sites will be denormalized against an organization's default website only.
|
|
844
864
|
*/
|
|
845
865
|
sites?: (Site | (RepresentationOfANormalizedElement & {
|
|
846
866
|
referent?: {
|
|
@@ -970,6 +990,115 @@ export interface Tag {
|
|
|
970
990
|
additional_properties?: HasAdditionalProperties;
|
|
971
991
|
slug?: Slug;
|
|
972
992
|
}
|
|
993
|
+
/**
|
|
994
|
+
* Models a category used in classifying a piece of content.
|
|
995
|
+
*/
|
|
996
|
+
export interface Category {
|
|
997
|
+
/**
|
|
998
|
+
* The unique ID for this category within its classifier.
|
|
999
|
+
*/
|
|
1000
|
+
_id: string;
|
|
1001
|
+
/**
|
|
1002
|
+
* The unique identifier for the classifier that matched this category.
|
|
1003
|
+
*/
|
|
1004
|
+
classifier: string;
|
|
1005
|
+
/**
|
|
1006
|
+
* The human readable label for this category.
|
|
1007
|
+
*/
|
|
1008
|
+
name: string;
|
|
1009
|
+
/**
|
|
1010
|
+
* The score assigned to this category between 0 and 1, where 1 is an exact match.
|
|
1011
|
+
*/
|
|
1012
|
+
score?: number;
|
|
1013
|
+
}
|
|
1014
|
+
/**
|
|
1015
|
+
* Models a keyword used in describing a piece of content.
|
|
1016
|
+
*/
|
|
1017
|
+
export interface ContentTopic {
|
|
1018
|
+
/**
|
|
1019
|
+
* The unique Wikidata ID for this topic.
|
|
1020
|
+
*/
|
|
1021
|
+
_id: string;
|
|
1022
|
+
/**
|
|
1023
|
+
* A topic this piece of content is about.
|
|
1024
|
+
*/
|
|
1025
|
+
label: string;
|
|
1026
|
+
/**
|
|
1027
|
+
* The score assigned to this topic between 0 and 1, where 1 is an exact match.
|
|
1028
|
+
*/
|
|
1029
|
+
score: number;
|
|
1030
|
+
}
|
|
1031
|
+
/**
|
|
1032
|
+
* Models a named entity (i.e. name of a person, place, or organization) used in a piece of content.
|
|
1033
|
+
*/
|
|
1034
|
+
export interface Entity {
|
|
1035
|
+
/**
|
|
1036
|
+
* The unique Wikidata ID for this entity.
|
|
1037
|
+
*/
|
|
1038
|
+
_id?: string;
|
|
1039
|
+
/**
|
|
1040
|
+
* A unique identifier for a custom-defined entity.
|
|
1041
|
+
*/
|
|
1042
|
+
custom_id?: string;
|
|
1043
|
+
/**
|
|
1044
|
+
* The actual string of text that was identified as a named entity.
|
|
1045
|
+
*/
|
|
1046
|
+
label: string;
|
|
1047
|
+
/**
|
|
1048
|
+
* A description of what the named entity is. E.g. 'organization', 'person', or 'location'.
|
|
1049
|
+
*/
|
|
1050
|
+
type?: string;
|
|
1051
|
+
/**
|
|
1052
|
+
* The score assigned to this entity between 0 and 1, where 1 is an exact match.
|
|
1053
|
+
*/
|
|
1054
|
+
score?: number;
|
|
1055
|
+
}
|
|
1056
|
+
/**
|
|
1057
|
+
* Models a category used in classifying a piece of content.
|
|
1058
|
+
*/
|
|
1059
|
+
export interface CustomCategory {
|
|
1060
|
+
/**
|
|
1061
|
+
* The unique ID for this category within its classifier.
|
|
1062
|
+
*/
|
|
1063
|
+
_id: string;
|
|
1064
|
+
/**
|
|
1065
|
+
* The unique identifier for the classifier that matched this category.
|
|
1066
|
+
*/
|
|
1067
|
+
classifier: string;
|
|
1068
|
+
/**
|
|
1069
|
+
* The human readable label for this category.
|
|
1070
|
+
*/
|
|
1071
|
+
name: string;
|
|
1072
|
+
/**
|
|
1073
|
+
* The score assigned to this category between 0 and 1, where 1 is an exact match.
|
|
1074
|
+
*/
|
|
1075
|
+
score?: number;
|
|
1076
|
+
}
|
|
1077
|
+
/**
|
|
1078
|
+
* Models a named custom entity (i.e. name of a person, place, or organization) used in a piece of content.
|
|
1079
|
+
*/
|
|
1080
|
+
export interface CustomEntity {
|
|
1081
|
+
/**
|
|
1082
|
+
* The unique ID for this entity.
|
|
1083
|
+
*/
|
|
1084
|
+
_id?: string;
|
|
1085
|
+
/**
|
|
1086
|
+
* A unique identifier for a custom-defined entity.
|
|
1087
|
+
*/
|
|
1088
|
+
custom_id?: string;
|
|
1089
|
+
/**
|
|
1090
|
+
* The actual string of text that was identified as a named entity.
|
|
1091
|
+
*/
|
|
1092
|
+
label: string;
|
|
1093
|
+
/**
|
|
1094
|
+
* A description of what the named entity is. E.g. 'organization', 'person', or 'location'.
|
|
1095
|
+
*/
|
|
1096
|
+
type?: string;
|
|
1097
|
+
/**
|
|
1098
|
+
* The score assigned to this entity between 0 and 1, where 1 is an exact match.
|
|
1099
|
+
*/
|
|
1100
|
+
score?: number;
|
|
1101
|
+
}
|
|
973
1102
|
/**
|
|
974
1103
|
* A hierarchical section or 'site' in a taxonomy. In the Arc ecosystem, these are stored in the arc-site-service.
|
|
975
1104
|
*/
|
|
@@ -1040,12 +1169,12 @@ export interface Section {
|
|
|
1040
1169
|
* Lists of promotional content to use when highlighting the story. In the Arc ecosystem, references in these lists will be denormalized.
|
|
1041
1170
|
*/
|
|
1042
1171
|
export interface PromoItems {
|
|
1043
|
-
basic?: AContentObject | RepresentationOfANormalizedElement |
|
|
1172
|
+
basic?: AContentObject | RepresentationOfANormalizedElement | HttpsRawGithubusercontentComWashingtonpostAnsSchemaMasterSrcMainResourcesSchemaAns01010StoryElementsRawHtmlJson | CustomEmbed;
|
|
1044
1173
|
/**
|
|
1045
1174
|
* This interface was referenced by `PromoItems`'s JSON-Schema definition
|
|
1046
1175
|
* via the `patternProperty` ".*".
|
|
1047
1176
|
*/
|
|
1048
|
-
[k: string]: AContentObject | RepresentationOfANormalizedElement |
|
|
1177
|
+
[k: string]: AContentObject | RepresentationOfANormalizedElement | HttpsRawGithubusercontentComWashingtonpostAnsSchemaMasterSrcMainResourcesSchemaAns01010StoryElementsRawHtmlJson | CustomEmbed | undefined;
|
|
1049
1178
|
}
|
|
1050
1179
|
/**
|
|
1051
1180
|
* Holds common attributes of ANS Content objects.
|
|
@@ -1111,7 +1240,7 @@ export interface Related_Content {
|
|
|
1111
1240
|
* This interface was referenced by `Related_Content`'s JSON-Schema definition
|
|
1112
1241
|
* via the `patternProperty` ".*".
|
|
1113
1242
|
*/
|
|
1114
|
-
[k: string]:
|
|
1243
|
+
[k: string]: (AContentObject | RepresentationOfANormalizedElement | CustomEmbed)[] | [ARedirectObject] | undefined;
|
|
1115
1244
|
}
|
|
1116
1245
|
/**
|
|
1117
1246
|
* A redirect to another story.
|
|
@@ -1134,7 +1263,7 @@ export interface OwnerInformation {
|
|
|
1134
1263
|
*/
|
|
1135
1264
|
id?: string;
|
|
1136
1265
|
/**
|
|
1137
|
-
* Deprecated in 0.10.
|
|
1266
|
+
* Deprecated in 0.10.10. See `distributor.name`. (Formerly: The human-readable name of original producer of content. Distinguishes between Wires, Staff and other sources.)
|
|
1138
1267
|
*/
|
|
1139
1268
|
name?: string;
|
|
1140
1269
|
/**
|
|
@@ -1429,11 +1558,11 @@ export interface Source {
|
|
|
1429
1558
|
*/
|
|
1430
1559
|
source_id?: string;
|
|
1431
1560
|
/**
|
|
1432
|
-
* Deprecated in 0.10.
|
|
1561
|
+
* Deprecated in 0.10.10. See `distributor.category` and `distributor.subcategory`. (Formerly: The method used to enter this content. E.g. 'staff', 'wires'.)
|
|
1433
1562
|
*/
|
|
1434
1563
|
source_type?: string;
|
|
1435
1564
|
/**
|
|
1436
|
-
* Deprecated in 0.10.
|
|
1565
|
+
* Deprecated in 0.10.10. See `distributor.name`. (Formerly: The human-readable name of the organization who first produced this content. E.g., 'Reuters'.)
|
|
1437
1566
|
*/
|
|
1438
1567
|
name?: string;
|
|
1439
1568
|
/**
|
|
@@ -1587,7 +1716,7 @@ export interface Contributors {
|
|
|
1587
1716
|
/**
|
|
1588
1717
|
* An html content element
|
|
1589
1718
|
*/
|
|
1590
|
-
export interface
|
|
1719
|
+
export interface HttpsRawGithubusercontentComWashingtonpostAnsSchemaMasterSrcMainResourcesSchemaAns01010StoryElementsRawHtmlJson {
|
|
1591
1720
|
type: 'raw_html';
|
|
1592
1721
|
_id?: GloballyUniqueIDTrait;
|
|
1593
1722
|
subtype?: SubtypeOrTemplate;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code.store/arcxp-sdk-ts",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.29.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",
|