@scalemule/news-publication 0.0.69 → 0.0.70
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/{article-presentation-0d1FiDgA.d.cts → article-presentation-BrNCcF-5.d.cts} +1 -1
- package/dist/{article-presentation-0d1FiDgA.d.ts → article-presentation-BrNCcF-5.d.ts} +1 -1
- package/dist/article-workflow-client.cjs +12 -1
- package/dist/article-workflow-client.d.cts +58 -18
- package/dist/article-workflow-client.d.ts +58 -18
- package/dist/article-workflow-client.js +12 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/story-review.d.cts +1 -1
- package/dist/story-review.d.ts +1 -1
- package/package.json +1 -1
|
@@ -18,4 +18,4 @@ declare function articlePresentation(value?: ArticlePresentation | null): Articl
|
|
|
18
18
|
declare function articleHeroRatio(layout: ArticleLayout): number;
|
|
19
19
|
declare function articleFormatLabel(format?: ArticleFormat | null): string | undefined;
|
|
20
20
|
|
|
21
|
-
export { type ArticleFormat as A, type
|
|
21
|
+
export { type ArticleFormat as A, type ArticleLayout as a, type ArticlePresentation as b, articleFormatLabel as c, articleHeroRatio as d, articlePresentation as e };
|
|
@@ -18,4 +18,4 @@ declare function articlePresentation(value?: ArticlePresentation | null): Articl
|
|
|
18
18
|
declare function articleHeroRatio(layout: ArticleLayout): number;
|
|
19
19
|
declare function articleFormatLabel(format?: ArticleFormat | null): string | undefined;
|
|
20
20
|
|
|
21
|
-
export { type ArticleFormat as A, type
|
|
21
|
+
export { type ArticleFormat as A, type ArticleLayout as a, type ArticlePresentation as b, articleFormatLabel as c, articleHeroRatio as d, articlePresentation as e };
|
|
@@ -39,6 +39,7 @@ var PublicationArticleClient = class {
|
|
|
39
39
|
method,
|
|
40
40
|
headers,
|
|
41
41
|
body: body === void 0 ? void 0 : form ? body : JSON.stringify(body),
|
|
42
|
+
signal: AbortSignal.timeout(form ? 9e4 : 3e4),
|
|
42
43
|
cache: "no-store",
|
|
43
44
|
redirect: "error"
|
|
44
45
|
});
|
|
@@ -61,7 +62,17 @@ var PublicationArticleClient = class {
|
|
|
61
62
|
);
|
|
62
63
|
}
|
|
63
64
|
processing(articleId) {
|
|
64
|
-
return this.request(
|
|
65
|
+
return this.request(
|
|
66
|
+
`/articles/${encodeURIComponent(articleId)}/processing`
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
/** Existing private narration path for a saved revision and a before-publication audio policy. */
|
|
70
|
+
narrateRevision(articleId, expectedGeneration) {
|
|
71
|
+
return this.request(
|
|
72
|
+
`/articles/${encodeURIComponent(articleId)}/collaboration/narrate`,
|
|
73
|
+
"POST",
|
|
74
|
+
{ expected_generation: expectedGeneration }
|
|
75
|
+
);
|
|
65
76
|
}
|
|
66
77
|
retryProcessing(articleId, expectedVersion, assetSourceFileId) {
|
|
67
78
|
return this.request(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ArticleFormat } from './article-presentation-
|
|
1
|
+
import { A as ArticleFormat, a as ArticleLayout } from './article-presentation-BrNCcF-5.cjs';
|
|
2
2
|
|
|
3
3
|
type ArticleDocument = {
|
|
4
4
|
title: string;
|
|
@@ -33,6 +33,55 @@ type AssetMetadata = {
|
|
|
33
33
|
rights_confirmed: boolean;
|
|
34
34
|
private_preview_only?: boolean;
|
|
35
35
|
};
|
|
36
|
+
type ArticleProcessing = {
|
|
37
|
+
article_id: string;
|
|
38
|
+
version: number;
|
|
39
|
+
publication_status: string;
|
|
40
|
+
narration: {
|
|
41
|
+
status: string;
|
|
42
|
+
attempts?: number | null;
|
|
43
|
+
error_code?: string | null;
|
|
44
|
+
last_progress_at?: string | null;
|
|
45
|
+
};
|
|
46
|
+
visual: {
|
|
47
|
+
status: string;
|
|
48
|
+
provider: string;
|
|
49
|
+
policy_governed: boolean;
|
|
50
|
+
};
|
|
51
|
+
assets: {
|
|
52
|
+
source_file_id: string;
|
|
53
|
+
public_file_id: string;
|
|
54
|
+
status: string;
|
|
55
|
+
attempts: number;
|
|
56
|
+
error_code?: string | null;
|
|
57
|
+
last_progress_at: string;
|
|
58
|
+
}[];
|
|
59
|
+
};
|
|
60
|
+
type ArticleWorkflowOptions = {
|
|
61
|
+
workflow_version: number;
|
|
62
|
+
formats: ArticleFormat[];
|
|
63
|
+
layouts: {
|
|
64
|
+
definition: ArticleLayout;
|
|
65
|
+
visual_requirements: {
|
|
66
|
+
hero_aspect: string;
|
|
67
|
+
mobile_aspect: string;
|
|
68
|
+
share_aspect: string;
|
|
69
|
+
};
|
|
70
|
+
}[];
|
|
71
|
+
sections: string[];
|
|
72
|
+
language: string;
|
|
73
|
+
narration?: {
|
|
74
|
+
provider: string;
|
|
75
|
+
model: string;
|
|
76
|
+
voice: string;
|
|
77
|
+
required_before_publish: boolean;
|
|
78
|
+
} | null;
|
|
79
|
+
capabilities: {
|
|
80
|
+
managed_private_asset_upload: boolean;
|
|
81
|
+
inline_media_body?: boolean;
|
|
82
|
+
automatic_public_narration?: boolean;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
36
85
|
type ArticleOperation = {
|
|
37
86
|
article_id: string;
|
|
38
87
|
revision_id: string;
|
|
@@ -78,23 +127,14 @@ declare class PublicationArticleClient {
|
|
|
78
127
|
fetch?: typeof fetch;
|
|
79
128
|
});
|
|
80
129
|
private request;
|
|
81
|
-
options(articleId?: string): Promise<
|
|
82
|
-
workflow_version: number;
|
|
83
|
-
formats: string[];
|
|
84
|
-
layouts: unknown[];
|
|
85
|
-
capabilities: {
|
|
86
|
-
managed_private_asset_upload: boolean;
|
|
87
|
-
};
|
|
88
|
-
}>;
|
|
130
|
+
options(articleId?: string): Promise<ArticleWorkflowOptions>;
|
|
89
131
|
get(articleId: string): Promise<Record>;
|
|
90
|
-
processing(articleId: string): Promise<
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
status: string;
|
|
97
|
-
};
|
|
132
|
+
processing(articleId: string): Promise<ArticleProcessing>;
|
|
133
|
+
/** Existing private narration path for a saved revision and a before-publication audio policy. */
|
|
134
|
+
narrateRevision(articleId: string, expectedGeneration: number): Promise<{
|
|
135
|
+
status: string;
|
|
136
|
+
audio_id?: string | null;
|
|
137
|
+
job_id?: string | null;
|
|
98
138
|
}>;
|
|
99
139
|
retryProcessing(articleId: string, expectedVersion: number, assetSourceFileId?: string): Promise<unknown>;
|
|
100
140
|
create(key: string, authorProfileId: string, document: ArticleDocument, reviewPolicy?: string): Promise<ArticleOperation>;
|
|
@@ -128,4 +168,4 @@ declare class PublicationArticleClient {
|
|
|
128
168
|
}): Promise<ArticleOperation>;
|
|
129
169
|
}
|
|
130
170
|
|
|
131
|
-
export { type ArticleDocument, type ArticleMedia, type ArticleOperation, ArticleWorkflowError, type AssetMetadata, PublicationArticleClient };
|
|
171
|
+
export { type ArticleDocument, type ArticleMedia, type ArticleOperation, type ArticleProcessing, ArticleWorkflowError, type ArticleWorkflowOptions, type AssetMetadata, PublicationArticleClient };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ArticleFormat } from './article-presentation-
|
|
1
|
+
import { A as ArticleFormat, a as ArticleLayout } from './article-presentation-BrNCcF-5.js';
|
|
2
2
|
|
|
3
3
|
type ArticleDocument = {
|
|
4
4
|
title: string;
|
|
@@ -33,6 +33,55 @@ type AssetMetadata = {
|
|
|
33
33
|
rights_confirmed: boolean;
|
|
34
34
|
private_preview_only?: boolean;
|
|
35
35
|
};
|
|
36
|
+
type ArticleProcessing = {
|
|
37
|
+
article_id: string;
|
|
38
|
+
version: number;
|
|
39
|
+
publication_status: string;
|
|
40
|
+
narration: {
|
|
41
|
+
status: string;
|
|
42
|
+
attempts?: number | null;
|
|
43
|
+
error_code?: string | null;
|
|
44
|
+
last_progress_at?: string | null;
|
|
45
|
+
};
|
|
46
|
+
visual: {
|
|
47
|
+
status: string;
|
|
48
|
+
provider: string;
|
|
49
|
+
policy_governed: boolean;
|
|
50
|
+
};
|
|
51
|
+
assets: {
|
|
52
|
+
source_file_id: string;
|
|
53
|
+
public_file_id: string;
|
|
54
|
+
status: string;
|
|
55
|
+
attempts: number;
|
|
56
|
+
error_code?: string | null;
|
|
57
|
+
last_progress_at: string;
|
|
58
|
+
}[];
|
|
59
|
+
};
|
|
60
|
+
type ArticleWorkflowOptions = {
|
|
61
|
+
workflow_version: number;
|
|
62
|
+
formats: ArticleFormat[];
|
|
63
|
+
layouts: {
|
|
64
|
+
definition: ArticleLayout;
|
|
65
|
+
visual_requirements: {
|
|
66
|
+
hero_aspect: string;
|
|
67
|
+
mobile_aspect: string;
|
|
68
|
+
share_aspect: string;
|
|
69
|
+
};
|
|
70
|
+
}[];
|
|
71
|
+
sections: string[];
|
|
72
|
+
language: string;
|
|
73
|
+
narration?: {
|
|
74
|
+
provider: string;
|
|
75
|
+
model: string;
|
|
76
|
+
voice: string;
|
|
77
|
+
required_before_publish: boolean;
|
|
78
|
+
} | null;
|
|
79
|
+
capabilities: {
|
|
80
|
+
managed_private_asset_upload: boolean;
|
|
81
|
+
inline_media_body?: boolean;
|
|
82
|
+
automatic_public_narration?: boolean;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
36
85
|
type ArticleOperation = {
|
|
37
86
|
article_id: string;
|
|
38
87
|
revision_id: string;
|
|
@@ -78,23 +127,14 @@ declare class PublicationArticleClient {
|
|
|
78
127
|
fetch?: typeof fetch;
|
|
79
128
|
});
|
|
80
129
|
private request;
|
|
81
|
-
options(articleId?: string): Promise<
|
|
82
|
-
workflow_version: number;
|
|
83
|
-
formats: string[];
|
|
84
|
-
layouts: unknown[];
|
|
85
|
-
capabilities: {
|
|
86
|
-
managed_private_asset_upload: boolean;
|
|
87
|
-
};
|
|
88
|
-
}>;
|
|
130
|
+
options(articleId?: string): Promise<ArticleWorkflowOptions>;
|
|
89
131
|
get(articleId: string): Promise<Record>;
|
|
90
|
-
processing(articleId: string): Promise<
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
status: string;
|
|
97
|
-
};
|
|
132
|
+
processing(articleId: string): Promise<ArticleProcessing>;
|
|
133
|
+
/** Existing private narration path for a saved revision and a before-publication audio policy. */
|
|
134
|
+
narrateRevision(articleId: string, expectedGeneration: number): Promise<{
|
|
135
|
+
status: string;
|
|
136
|
+
audio_id?: string | null;
|
|
137
|
+
job_id?: string | null;
|
|
98
138
|
}>;
|
|
99
139
|
retryProcessing(articleId: string, expectedVersion: number, assetSourceFileId?: string): Promise<unknown>;
|
|
100
140
|
create(key: string, authorProfileId: string, document: ArticleDocument, reviewPolicy?: string): Promise<ArticleOperation>;
|
|
@@ -128,4 +168,4 @@ declare class PublicationArticleClient {
|
|
|
128
168
|
}): Promise<ArticleOperation>;
|
|
129
169
|
}
|
|
130
170
|
|
|
131
|
-
export { type ArticleDocument, type ArticleMedia, type ArticleOperation, ArticleWorkflowError, type AssetMetadata, PublicationArticleClient };
|
|
171
|
+
export { type ArticleDocument, type ArticleMedia, type ArticleOperation, type ArticleProcessing, ArticleWorkflowError, type ArticleWorkflowOptions, type AssetMetadata, PublicationArticleClient };
|
|
@@ -37,6 +37,7 @@ var PublicationArticleClient = class {
|
|
|
37
37
|
method,
|
|
38
38
|
headers,
|
|
39
39
|
body: body === void 0 ? void 0 : form ? body : JSON.stringify(body),
|
|
40
|
+
signal: AbortSignal.timeout(form ? 9e4 : 3e4),
|
|
40
41
|
cache: "no-store",
|
|
41
42
|
redirect: "error"
|
|
42
43
|
});
|
|
@@ -59,7 +60,17 @@ var PublicationArticleClient = class {
|
|
|
59
60
|
);
|
|
60
61
|
}
|
|
61
62
|
processing(articleId) {
|
|
62
|
-
return this.request(
|
|
63
|
+
return this.request(
|
|
64
|
+
`/articles/${encodeURIComponent(articleId)}/processing`
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
/** Existing private narration path for a saved revision and a before-publication audio policy. */
|
|
68
|
+
narrateRevision(articleId, expectedGeneration) {
|
|
69
|
+
return this.request(
|
|
70
|
+
`/articles/${encodeURIComponent(articleId)}/collaboration/narrate`,
|
|
71
|
+
"POST",
|
|
72
|
+
{ expected_generation: expectedGeneration }
|
|
73
|
+
);
|
|
63
74
|
}
|
|
64
75
|
retryProcessing(articleId, expectedVersion, assetSourceFileId) {
|
|
65
76
|
return this.request(
|
package/dist/index.d.cts
CHANGED
|
@@ -17,7 +17,7 @@ export { C as CommunityMapArticleEmbed, c as communityMapEmbeds } from './commun
|
|
|
17
17
|
export { C as ContentBlock, S as StructuredDocument, a as StructuredMedia, f as formatArtworkCaption, p as parseDocumentBlocks, r as renderArticleBlocksToHtml, s as sanitizeInlineMarkdown } from './article-blocks-DsabIDmH.cjs';
|
|
18
18
|
import { M as Measurement } from './sponsorships-CtnBe3S8.cjs';
|
|
19
19
|
export { a as Campaign, b as CampaignStatus, c as CampaignTarget, C as Creative, d as Placement, e as PlacementType, P as PublicAcknowledgment, S as SPONSORSHIP_OFFERINGS, f as SPONSORSHIP_POLICY, g as SponsorParty, p as placementAvailable, s as safeSponsorUrl } from './sponsorships-CtnBe3S8.cjs';
|
|
20
|
-
export { A as ArticleFormat,
|
|
20
|
+
export { A as ArticleFormat, a as ArticleLayout, b as ArticlePresentation, c as articleFormatLabel, d as articleHeroRatio, e as articlePresentation } from './article-presentation-BrNCcF-5.cjs';
|
|
21
21
|
import './pets.cjs';
|
|
22
22
|
|
|
23
23
|
/** Walnut Creek Times broadsheet colors. A paper overrides only what it changes. */
|
package/dist/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export { C as CommunityMapArticleEmbed, c as communityMapEmbeds } from './commun
|
|
|
17
17
|
export { C as ContentBlock, S as StructuredDocument, a as StructuredMedia, f as formatArtworkCaption, p as parseDocumentBlocks, r as renderArticleBlocksToHtml, s as sanitizeInlineMarkdown } from './article-blocks-DsabIDmH.js';
|
|
18
18
|
import { M as Measurement } from './sponsorships-CtnBe3S8.js';
|
|
19
19
|
export { a as Campaign, b as CampaignStatus, c as CampaignTarget, C as Creative, d as Placement, e as PlacementType, P as PublicAcknowledgment, S as SPONSORSHIP_OFFERINGS, f as SPONSORSHIP_POLICY, g as SponsorParty, p as placementAvailable, s as safeSponsorUrl } from './sponsorships-CtnBe3S8.js';
|
|
20
|
-
export { A as ArticleFormat,
|
|
20
|
+
export { A as ArticleFormat, a as ArticleLayout, b as ArticlePresentation, c as articleFormatLabel, d as articleHeroRatio, e as articlePresentation } from './article-presentation-BrNCcF-5.js';
|
|
21
21
|
import './pets.js';
|
|
22
22
|
|
|
23
23
|
/** Walnut Creek Times broadsheet colors. A paper overrides only what it changes. */
|
package/dist/story-review.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ArticleFormat,
|
|
1
|
+
import { A as ArticleFormat, b as ArticlePresentation } from './article-presentation-BrNCcF-5.cjs';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import { C as ContentBlock } from './article-blocks-DsabIDmH.cjs';
|
|
4
4
|
|
package/dist/story-review.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ArticleFormat,
|
|
1
|
+
import { A as ArticleFormat, b as ArticlePresentation } from './article-presentation-BrNCcF-5.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import { C as ContentBlock } from './article-blocks-DsabIDmH.js';
|
|
4
4
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scalemule/news-publication",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.70",
|
|
4
4
|
"description": "Shared server framework for ScaleMule local news publications. Walnut Creek Times is the broadsheet default; each paper supplies its own identity and feature flags.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|