Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@prezly/sdk",
"version": "26.3.1",
"version": "26.4.0",
"description": "Prezly API SDK",
"type": "module",
"main": "dist/index.cjs",
Expand Down
3 changes: 2 additions & 1 deletion src/endpoints/Stories/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ export function createClient(api: DeferredJobsApiClient) {
payload: TranslateRequest = {},
options?: Exactly<Options, IncludeOptions & { formats?: Formats }>,
): Promise<ExtendedStory & InferExtraFields<Options>> {
const { culture, auto = false } = payload ?? {};
const { culture, auto = false, newsroom } = payload ?? {};
const { include, formats } = options ?? {};

const url = `${routing.storiesUrl}/${id}/translate`;
Expand All @@ -241,6 +241,7 @@ export function createClient(api: DeferredJobsApiClient) {
payload: {
culture,
auto,
newsroom,
},
});

Expand Down
2 changes: 2 additions & 0 deletions src/endpoints/Stories/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ export type UnscheduleRequest = UnpublishRequest;
export interface TranslateRequest {
culture?: CultureRef['code'];
auto?: boolean;
newsroom?: Newsroom['uuid'] | Newsroom['id'];
}

export interface MoveRequest {
Expand Down Expand Up @@ -361,6 +362,7 @@ const ALL_EXTRA_FIELDS_SHAPE = {
'campaigns.count': true,
'pitches.count': true,
'coverage.count': true,
cross_site_translations: true,
} satisfies Record<keyof Story.ExtraFields, boolean>;

export const ALL_EXTRA_FIELDS = Object.keys(
Expand Down
5 changes: 5 additions & 0 deletions src/types/Story.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,11 @@ export namespace Story {
* Number of coverage entries linked to this story.
*/
'coverage.count': number;

/**
* Translations of this story that exist in other newsrooms (cross-site translations).
*/
cross_site_translations: StoryRef[];
}

/*
Expand Down
Loading