@wix/multilingual 1.0.27 → 1.0.29
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/multilingual",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.29",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
"type-bundles"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@wix/multilingual_entity-mapper": "1.0.
|
|
22
|
-
"@wix/multilingual_machine-translation": "1.0.
|
|
23
|
-
"@wix/multilingual_site-translator": "1.0.
|
|
24
|
-
"@wix/multilingual_translation-contents": "1.0.
|
|
25
|
-
"@wix/multilingual_translation-published-contents": "1.0.
|
|
26
|
-
"@wix/multilingual_translation-schemas": "1.0.
|
|
21
|
+
"@wix/multilingual_entity-mapper": "1.0.4",
|
|
22
|
+
"@wix/multilingual_machine-translation": "1.0.23",
|
|
23
|
+
"@wix/multilingual_site-translator": "1.0.10",
|
|
24
|
+
"@wix/multilingual_translation-contents": "1.0.12",
|
|
25
|
+
"@wix/multilingual_translation-published-contents": "1.0.1",
|
|
26
|
+
"@wix/multilingual_translation-schemas": "1.0.11"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"glob": "^10.4.1",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"fqdn": ""
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
|
-
"falconPackageHash": "
|
|
51
|
+
"falconPackageHash": "68b0d0c3b74b4ac8572eadffb0d39850bb5f531afab539f803565d4b"
|
|
52
52
|
}
|
|
@@ -423,11 +423,11 @@ interface PublishSiteTranslationsRequest {
|
|
|
423
423
|
}
|
|
424
424
|
interface PublishSiteTranslationsResponse {
|
|
425
425
|
}
|
|
426
|
-
interface
|
|
426
|
+
interface CreateOrUpdateEditorMapperRequest {
|
|
427
427
|
/** A mapper to create or update if already exist */
|
|
428
428
|
mapper?: Mapper;
|
|
429
429
|
}
|
|
430
|
-
interface
|
|
430
|
+
interface CreateOrUpdateEditorMapperResponse {
|
|
431
431
|
}
|
|
432
432
|
interface GetMapperRequest {
|
|
433
433
|
/** The mapper type requested */
|
|
@@ -460,7 +460,13 @@ interface SyncEditorDataOptions {
|
|
|
460
460
|
syncFilter?: SyncFilter;
|
|
461
461
|
}
|
|
462
462
|
|
|
463
|
-
declare function syncEditorData$1(httpClient: HttpClient):
|
|
463
|
+
declare function syncEditorData$1(httpClient: HttpClient): SyncEditorDataSignature;
|
|
464
|
+
interface SyncEditorDataSignature {
|
|
465
|
+
/**
|
|
466
|
+
* Update localization content with editor data
|
|
467
|
+
*/
|
|
468
|
+
(options?: SyncEditorDataOptions | undefined): Promise<void>;
|
|
469
|
+
}
|
|
464
470
|
|
|
465
471
|
declare function createRESTModule$5<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
466
472
|
|
|
@@ -469,6 +475,8 @@ declare const syncEditorData: ReturnType<typeof createRESTModule$5<_publicSyncEd
|
|
|
469
475
|
|
|
470
476
|
type context$5_ChangedPages = ChangedPages;
|
|
471
477
|
type context$5_CreateOrUpdateAction = CreateOrUpdateAction;
|
|
478
|
+
type context$5_CreateOrUpdateEditorMapperRequest = CreateOrUpdateEditorMapperRequest;
|
|
479
|
+
type context$5_CreateOrUpdateEditorMapperResponse = CreateOrUpdateEditorMapperResponse;
|
|
472
480
|
type context$5_CreateOrUpdateMapperRequest = CreateOrUpdateMapperRequest;
|
|
473
481
|
type context$5_CreateOrUpdateMapperResponse = CreateOrUpdateMapperResponse;
|
|
474
482
|
type context$5_DeleteAction = DeleteAction;
|
|
@@ -508,12 +516,10 @@ type context$5_SyncEditorDataOptions = SyncEditorDataOptions;
|
|
|
508
516
|
type context$5_SyncEditorDataRequest = SyncEditorDataRequest;
|
|
509
517
|
type context$5_SyncEditorDataResponse = SyncEditorDataResponse;
|
|
510
518
|
type context$5_SyncFilter = SyncFilter;
|
|
511
|
-
type context$5_V1CreateOrUpdateMapperRequest = V1CreateOrUpdateMapperRequest;
|
|
512
|
-
type context$5_V1CreateOrUpdateMapperResponse = V1CreateOrUpdateMapperResponse;
|
|
513
519
|
type context$5__publicSyncEditorDataType = _publicSyncEditorDataType;
|
|
514
520
|
declare const context$5_syncEditorData: typeof syncEditorData;
|
|
515
521
|
declare namespace context$5 {
|
|
516
|
-
export { type ActionEvent$3 as ActionEvent, type context$5_ChangedPages as ChangedPages, type context$5_CreateOrUpdateAction as CreateOrUpdateAction, type context$5_CreateOrUpdateMapperRequest as CreateOrUpdateMapperRequest, type context$5_CreateOrUpdateMapperResponse as CreateOrUpdateMapperResponse, type context$5_DeleteAction as DeleteAction, type context$5_DeleteEntityMapperRequest as DeleteEntityMapperRequest, type context$5_DeleteEntityMapperResponse as DeleteEntityMapperResponse, type context$5_DeleteMapperRequest as DeleteMapperRequest, type context$5_DeleteMapperResponse as DeleteMapperResponse, type DomainEvent$3 as DomainEvent, type DomainEventBodyOneOf$3 as DomainEventBodyOneOf, type Empty$2 as Empty, type EntityCreatedEvent$3 as EntityCreatedEvent, type EntityDeletedEvent$3 as EntityDeletedEvent, type EntityUpdatedEvent$3 as EntityUpdatedEvent, type context$5_FieldSequence as FieldSequence, FieldType$1 as FieldType, type context$5_GetEntityMapperRequest as GetEntityMapperRequest, type context$5_GetEntityMapperResponse as GetEntityMapperResponse, type context$5_GetMapperRequest as GetMapperRequest, type context$5_GetMapperResponse as GetMapperResponse, type context$5_GetSubscribedTopicsRequest as GetSubscribedTopicsRequest, type context$5_GetSubscribedTopicsResponse as GetSubscribedTopicsResponse, type context$5_HtmlNewRevisionSavedMessage as HtmlNewRevisionSavedMessage, type IdentificationData$3 as IdentificationData, type IdentificationDataIdOneOf$3 as IdentificationDataIdOneOf, type context$5_ListMappersRequest as ListMappersRequest, type context$5_ListMappersResponse as ListMappersResponse, type context$5_LocalizationPublicAction as LocalizationPublicAction, type context$5_LocalizationPublicActionActionOneOf as LocalizationPublicActionActionOneOf, type context$5_LocalizedContentKey as LocalizedContentKey, type context$5_LocalizedPublishedContent as LocalizedPublishedContent, type context$5_LocalizedPublishedContentField as LocalizedPublishedContentField, type context$5_LocalizedPublishedContentFieldValueOneOf as LocalizedPublishedContentFieldValueOneOf, type context$5_LocalizedPublishedLanguageContentChanged as LocalizedPublishedLanguageContentChanged, type context$5_Mapper as Mapper, type context$5_MapperField as MapperField, type context$5_MediaItem as MediaItem, type context$5_MediaItemMediaOneOf as MediaItemMediaOneOf, type MessageEnvelope$3 as MessageEnvelope, type context$5_Page as Page, type context$5_PublishSiteTranslationsRequest as PublishSiteTranslationsRequest, type context$5_PublishSiteTranslationsResponse as PublishSiteTranslationsResponse, type RestoreInfo$3 as RestoreInfo, type context$5_RevisionInfo as RevisionInfo, type SchemaKey$2 as SchemaKey, SchemaScope$2 as SchemaScope, type context$5_SequencePath as SequencePath, type context$5_StressDMRequest as StressDMRequest, type context$5_StressDMResponse as StressDMResponse, type context$5_SyncEditorDataOptions as SyncEditorDataOptions, type context$5_SyncEditorDataRequest as SyncEditorDataRequest, type context$5_SyncEditorDataResponse as SyncEditorDataResponse, type context$5_SyncFilter as SyncFilter, type
|
|
522
|
+
export { type ActionEvent$3 as ActionEvent, type context$5_ChangedPages as ChangedPages, type context$5_CreateOrUpdateAction as CreateOrUpdateAction, type context$5_CreateOrUpdateEditorMapperRequest as CreateOrUpdateEditorMapperRequest, type context$5_CreateOrUpdateEditorMapperResponse as CreateOrUpdateEditorMapperResponse, type context$5_CreateOrUpdateMapperRequest as CreateOrUpdateMapperRequest, type context$5_CreateOrUpdateMapperResponse as CreateOrUpdateMapperResponse, type context$5_DeleteAction as DeleteAction, type context$5_DeleteEntityMapperRequest as DeleteEntityMapperRequest, type context$5_DeleteEntityMapperResponse as DeleteEntityMapperResponse, type context$5_DeleteMapperRequest as DeleteMapperRequest, type context$5_DeleteMapperResponse as DeleteMapperResponse, type DomainEvent$3 as DomainEvent, type DomainEventBodyOneOf$3 as DomainEventBodyOneOf, type Empty$2 as Empty, type EntityCreatedEvent$3 as EntityCreatedEvent, type EntityDeletedEvent$3 as EntityDeletedEvent, type EntityUpdatedEvent$3 as EntityUpdatedEvent, type context$5_FieldSequence as FieldSequence, FieldType$1 as FieldType, type context$5_GetEntityMapperRequest as GetEntityMapperRequest, type context$5_GetEntityMapperResponse as GetEntityMapperResponse, type context$5_GetMapperRequest as GetMapperRequest, type context$5_GetMapperResponse as GetMapperResponse, type context$5_GetSubscribedTopicsRequest as GetSubscribedTopicsRequest, type context$5_GetSubscribedTopicsResponse as GetSubscribedTopicsResponse, type context$5_HtmlNewRevisionSavedMessage as HtmlNewRevisionSavedMessage, type IdentificationData$3 as IdentificationData, type IdentificationDataIdOneOf$3 as IdentificationDataIdOneOf, type context$5_ListMappersRequest as ListMappersRequest, type context$5_ListMappersResponse as ListMappersResponse, type context$5_LocalizationPublicAction as LocalizationPublicAction, type context$5_LocalizationPublicActionActionOneOf as LocalizationPublicActionActionOneOf, type context$5_LocalizedContentKey as LocalizedContentKey, type context$5_LocalizedPublishedContent as LocalizedPublishedContent, type context$5_LocalizedPublishedContentField as LocalizedPublishedContentField, type context$5_LocalizedPublishedContentFieldValueOneOf as LocalizedPublishedContentFieldValueOneOf, type context$5_LocalizedPublishedLanguageContentChanged as LocalizedPublishedLanguageContentChanged, type context$5_Mapper as Mapper, type context$5_MapperField as MapperField, type context$5_MediaItem as MediaItem, type context$5_MediaItemMediaOneOf as MediaItemMediaOneOf, type MessageEnvelope$3 as MessageEnvelope, type context$5_Page as Page, type context$5_PublishSiteTranslationsRequest as PublishSiteTranslationsRequest, type context$5_PublishSiteTranslationsResponse as PublishSiteTranslationsResponse, type RestoreInfo$3 as RestoreInfo, type context$5_RevisionInfo as RevisionInfo, type SchemaKey$2 as SchemaKey, SchemaScope$2 as SchemaScope, type context$5_SequencePath as SequencePath, type context$5_StressDMRequest as StressDMRequest, type context$5_StressDMResponse as StressDMResponse, type context$5_SyncEditorDataOptions as SyncEditorDataOptions, type context$5_SyncEditorDataRequest as SyncEditorDataRequest, type context$5_SyncEditorDataResponse as SyncEditorDataResponse, type context$5_SyncFilter as SyncFilter, type VideoResolution$2 as VideoResolution, WebhookIdentityType$3 as WebhookIdentityType, type context$5__publicSyncEditorDataType as _publicSyncEditorDataType, context$5_syncEditorData as syncEditorData };
|
|
517
523
|
}
|
|
518
524
|
|
|
519
525
|
/** Represents a content of an entity with its published translations */
|
|
@@ -2362,7 +2368,13 @@ interface PublishedContentQueryBuilder {
|
|
|
2362
2368
|
find: () => Promise<PublishedContentQueryResult>;
|
|
2363
2369
|
}
|
|
2364
2370
|
|
|
2365
|
-
declare function queryPublishedContent$1(httpClient: HttpClient):
|
|
2371
|
+
declare function queryPublishedContent$1(httpClient: HttpClient): QueryPublishedContentSignature;
|
|
2372
|
+
interface QueryPublishedContentSignature {
|
|
2373
|
+
/**
|
|
2374
|
+
* Query the published content of multiple entities using the schema key and optionally other criteria
|
|
2375
|
+
*/
|
|
2376
|
+
(): PublishedContentQueryBuilder;
|
|
2377
|
+
}
|
|
2366
2378
|
|
|
2367
2379
|
declare function createRESTModule$4<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
2368
2380
|
|
|
@@ -4283,8 +4295,62 @@ interface BulkMachineTranslateOptions {
|
|
|
4283
4295
|
contentToTranslate?: TranslatableContent[];
|
|
4284
4296
|
}
|
|
4285
4297
|
|
|
4286
|
-
declare function machineTranslate$1(httpClient: HttpClient):
|
|
4287
|
-
|
|
4298
|
+
declare function machineTranslate$1(httpClient: HttpClient): MachineTranslateSignature;
|
|
4299
|
+
interface MachineTranslateSignature {
|
|
4300
|
+
/**
|
|
4301
|
+
* Translates the text of a translatable unit of content from one supported language to another.
|
|
4302
|
+
*
|
|
4303
|
+
* The `translatedContent` object returns with the same `id` used for `contentToTranslate.id` but the text within the
|
|
4304
|
+
* content fields is replaced with the translated text. Note that Wix does not overwrite the original content object.
|
|
4305
|
+
* To retrieve the translated content later, make sure to store it separately.
|
|
4306
|
+
*
|
|
4307
|
+
* Only text content is translated, even if the content is `htmlContent` or `richContent`. Note that [collapsible text](https://support.wix.com/en/article/adding-and-setting-up-collapsible-text)
|
|
4308
|
+
* cannot be translated using this method.
|
|
4309
|
+
*
|
|
4310
|
+
* The translatable content must not exceed 5,000 characters. If this limit is exceeded, the method returns a `TEXT_TOO_LONG` error.
|
|
4311
|
+
* For `richContent`, the 5,000-character limit applies separately to each node in `richContent.nodes`.
|
|
4312
|
+
* The total translatable content may be more than 5,000 characters as long as no individual node surpasses this limit.
|
|
4313
|
+
* If any node exceeds 5,000 characters, the entire request fails.
|
|
4314
|
+
*
|
|
4315
|
+
* Each site has a [word credit](/machine-translation/introduction#terminology) balance, starting at 3,000 words.
|
|
4316
|
+
* Each successful translation request reduces the word credits by the number of words in `contentToTranslate`.
|
|
4317
|
+
* If the site does not have sufficient word credits to translate all of the text in the request, the request fails
|
|
4318
|
+
* with a `NOT_ENOUGH_CREDITS` error. Additional credits can be [purchased through the Dashboard](https://support.wix.com/en/article/wix-multilingual-auto-translating-your-site?tabs=Dashboard-5#purchasing-translation-packages).
|
|
4319
|
+
*
|
|
4320
|
+
* To translate up to 1,000 `translatableContent` units at once, use [Bulk Machine Translate](/machine-translation/bulk-machine-translate).
|
|
4321
|
+
* @param - Language of the source text to translate.
|
|
4322
|
+
*/
|
|
4323
|
+
(sourceLanguage: SupportedLanguage, options: MachineTranslateOptions): Promise<MachineTranslateResponse & MachineTranslateResponseNonNullableFields>;
|
|
4324
|
+
}
|
|
4325
|
+
declare function bulkMachineTranslate$1(httpClient: HttpClient): BulkMachineTranslateSignature;
|
|
4326
|
+
interface BulkMachineTranslateSignature {
|
|
4327
|
+
/**
|
|
4328
|
+
* Translates the text of multiple units of translatable content from one supported language to another.
|
|
4329
|
+
*
|
|
4330
|
+
* Each translated content item in the `results` array returns with the same `id` as the corresponding `contentToTranslate.id`, but with the text in the
|
|
4331
|
+
* content fields replaced with the translated text. Note that Wix does not overwrite the original content source,
|
|
4332
|
+
* to retrieve the translated content later, make sure to store it separately.
|
|
4333
|
+
*
|
|
4334
|
+
* Only text content is translated, even if the content is `htmlContent` or `richContent`. Note that [collapsible text](https://support.wix.com/en/article/adding-and-setting-up-collapsible-text)
|
|
4335
|
+
* cannot be translated using this method.
|
|
4336
|
+
*
|
|
4337
|
+
* Each unit of translatable content must not exceed 5,000 characters. If this limit is exceeded, the method returns a `TEXT_TOO_LONG` error.
|
|
4338
|
+
* For `richContent`, the 5,000-character limit applies separately to each node in `richContent.nodes`.
|
|
4339
|
+
* The total request may exceed 5,000 characters as long as no individual node surpasses this limit.
|
|
4340
|
+
* If any node exceeds 5,000 characters, then the request fails for that specific `contentToTranslate` item and the error details for that
|
|
4341
|
+
* error are returned in `itemMetadata`. Even if some translations fail due to the character limit,
|
|
4342
|
+
* the machine translation for other items will succeed if they are under the character limit.
|
|
4343
|
+
*
|
|
4344
|
+
* Each site has a [word credit](/machine-translation/introduction#terminology) balance, starting at 3,000 words.
|
|
4345
|
+
* Each successful translation request reduces the word credits by the number of words included in `contentToTranslate`.
|
|
4346
|
+
* If the site does not have sufficient word credits to complete the translation, then the entire request fails
|
|
4347
|
+
* with a `NOT_ENOUGH_CREDITS` error. Additional credits can be [purchased through the Dashboard](https://support.wix.com/en/article/wix-multilingual-auto-translating-your-site?tabs=Dashboard-5#purchasing-translation-packages).
|
|
4348
|
+
*
|
|
4349
|
+
* To translate a single unit of `translatableContent`, use [Machine Translate](/machine-translation/machine-translate).
|
|
4350
|
+
* @param - Language of the source text to translate.
|
|
4351
|
+
*/
|
|
4352
|
+
(sourceLanguage: SupportedLanguage, options?: BulkMachineTranslateOptions | undefined): Promise<BulkMachineTranslateResponse & BulkMachineTranslateResponseNonNullableFields>;
|
|
4353
|
+
}
|
|
4288
4354
|
|
|
4289
4355
|
declare function createRESTModule$3<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
4290
4356
|
|
|
@@ -4640,8 +4706,22 @@ interface GetSiteTranslatablesPropertiesOptions {
|
|
|
4640
4706
|
translatedLanguage?: Locale;
|
|
4641
4707
|
}
|
|
4642
4708
|
|
|
4643
|
-
declare function translateSite$1(httpClient: HttpClient):
|
|
4644
|
-
|
|
4709
|
+
declare function translateSite$1(httpClient: HttpClient): TranslateSiteSignature;
|
|
4710
|
+
interface TranslateSiteSignature {
|
|
4711
|
+
/**
|
|
4712
|
+
* Start a task to auto-translate all site content that hasn't been translated yet
|
|
4713
|
+
* @param - Language from which the site content is translated
|
|
4714
|
+
*/
|
|
4715
|
+
(mainLanguage: Locale, options: TranslateSiteOptions): Promise<void>;
|
|
4716
|
+
}
|
|
4717
|
+
declare function getSiteTranslatablesProperties$1(httpClient: HttpClient): GetSiteTranslatablesPropertiesSignature;
|
|
4718
|
+
interface GetSiteTranslatablesPropertiesSignature {
|
|
4719
|
+
/**
|
|
4720
|
+
* Receive the site's translation status
|
|
4721
|
+
* @param - Number of words included in main_language
|
|
4722
|
+
*/
|
|
4723
|
+
(mainLanguage: Locale, options?: GetSiteTranslatablesPropertiesOptions | undefined): Promise<GetSiteTranslatablesPropertiesResponse & GetSiteTranslatablesPropertiesResponseNonNullableFields>;
|
|
4724
|
+
}
|
|
4645
4725
|
|
|
4646
4726
|
declare function createRESTModule$2<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
4647
4727
|
|
|
@@ -6101,7 +6181,7 @@ interface QueryContentsResponse {
|
|
|
6101
6181
|
pagingMetadata?: CursorPagingMetadata$1;
|
|
6102
6182
|
}
|
|
6103
6183
|
interface CursorPagingMetadata$1 {
|
|
6104
|
-
/** Number of items returned in
|
|
6184
|
+
/** Number of items returned in current page. */
|
|
6105
6185
|
count?: number | null;
|
|
6106
6186
|
/** Cursor strings that point to the next page, previous page, or both. */
|
|
6107
6187
|
cursors?: Cursors$1;
|
|
@@ -6177,6 +6257,7 @@ interface PagingMetadataV2 {
|
|
|
6177
6257
|
cursors?: Cursors$1;
|
|
6178
6258
|
}
|
|
6179
6259
|
interface SearchContentsRequest {
|
|
6260
|
+
/** WQL expression, Aggregation and Search */
|
|
6180
6261
|
search?: CursorSearch;
|
|
6181
6262
|
}
|
|
6182
6263
|
interface CursorSearch extends CursorSearchPagingMethodOneOf {
|
|
@@ -7335,6 +7416,7 @@ interface ContentsQueryBuilder {
|
|
|
7335
7416
|
find: () => Promise<ContentsQueryResult>;
|
|
7336
7417
|
}
|
|
7337
7418
|
interface SearchContentsOptions {
|
|
7419
|
+
/** WQL expression, Aggregation and Search */
|
|
7338
7420
|
search?: CursorSearch;
|
|
7339
7421
|
}
|
|
7340
7422
|
interface BulkCreateContentOptions {
|
|
@@ -7350,17 +7432,97 @@ interface BulkUpdateContentByKeyOptions {
|
|
|
7350
7432
|
returnEntity?: boolean;
|
|
7351
7433
|
}
|
|
7352
7434
|
|
|
7353
|
-
declare function createContent$1(httpClient: HttpClient):
|
|
7354
|
-
|
|
7355
|
-
|
|
7356
|
-
|
|
7357
|
-
|
|
7358
|
-
|
|
7359
|
-
|
|
7360
|
-
|
|
7361
|
-
|
|
7362
|
-
|
|
7363
|
-
|
|
7435
|
+
declare function createContent$1(httpClient: HttpClient): CreateContentSignature;
|
|
7436
|
+
interface CreateContentSignature {
|
|
7437
|
+
/**
|
|
7438
|
+
* Creates a Content.
|
|
7439
|
+
*
|
|
7440
|
+
* The request body must include schema-id, entity-id and locale.
|
|
7441
|
+
* @param - Content to be created.
|
|
7442
|
+
* @returns The created Content.
|
|
7443
|
+
*/
|
|
7444
|
+
(content: Content): Promise<Content & ContentNonNullableFields>;
|
|
7445
|
+
}
|
|
7446
|
+
declare function getContent$1(httpClient: HttpClient): GetContentSignature;
|
|
7447
|
+
interface GetContentSignature {
|
|
7448
|
+
/**
|
|
7449
|
+
* Retrieves a Content.
|
|
7450
|
+
* @param - ID of the Content to retrieve.
|
|
7451
|
+
* @returns The requested Content.
|
|
7452
|
+
*/
|
|
7453
|
+
(contentId: string): Promise<Content & ContentNonNullableFields>;
|
|
7454
|
+
}
|
|
7455
|
+
declare function updateContent$1(httpClient: HttpClient): UpdateContentSignature;
|
|
7456
|
+
interface UpdateContentSignature {
|
|
7457
|
+
/**
|
|
7458
|
+
* Updates a Content.
|
|
7459
|
+
* @param - Content ID.
|
|
7460
|
+
* @returns Updated Content.
|
|
7461
|
+
*/
|
|
7462
|
+
(_id: string | null, content: UpdateContent): Promise<Content & ContentNonNullableFields>;
|
|
7463
|
+
}
|
|
7464
|
+
declare function updateContentByKey$1(httpClient: HttpClient): UpdateContentByKeySignature;
|
|
7465
|
+
interface UpdateContentByKeySignature {
|
|
7466
|
+
/**
|
|
7467
|
+
* Updates a Content. A content is identified by a unique key, a combination of (schemaId, entityId, locale)
|
|
7468
|
+
* @param - Content to be updated, may be partial.
|
|
7469
|
+
*/
|
|
7470
|
+
(content: Content): Promise<UpdateContentByKeyResponse & UpdateContentByKeyResponseNonNullableFields>;
|
|
7471
|
+
}
|
|
7472
|
+
declare function deleteContent$1(httpClient: HttpClient): DeleteContentSignature;
|
|
7473
|
+
interface DeleteContentSignature {
|
|
7474
|
+
/**
|
|
7475
|
+
* Deletes a Content.
|
|
7476
|
+
* @param - Id of the Content to delete.
|
|
7477
|
+
*/
|
|
7478
|
+
(contentId: string): Promise<void>;
|
|
7479
|
+
}
|
|
7480
|
+
declare function queryContents$1(httpClient: HttpClient): QueryContentsSignature;
|
|
7481
|
+
interface QueryContentsSignature {
|
|
7482
|
+
/**
|
|
7483
|
+
* Retrieves a list of Contents, given the provided [paging, filtering, and sorting][1].
|
|
7484
|
+
*/
|
|
7485
|
+
(options?: QueryContentsOptions | undefined): ContentsQueryBuilder;
|
|
7486
|
+
}
|
|
7487
|
+
declare function searchContents$1(httpClient: HttpClient): SearchContentsSignature;
|
|
7488
|
+
interface SearchContentsSignature {
|
|
7489
|
+
/**
|
|
7490
|
+
* Retrieves a list of Contents, given the provided CursorSearch.
|
|
7491
|
+
*/
|
|
7492
|
+
(options?: SearchContentsOptions | undefined): Promise<SearchContentsResponse & SearchContentsResponseNonNullableFields>;
|
|
7493
|
+
}
|
|
7494
|
+
declare function bulkCreateContent$1(httpClient: HttpClient): BulkCreateContentSignature;
|
|
7495
|
+
interface BulkCreateContentSignature {
|
|
7496
|
+
/**
|
|
7497
|
+
* create multiple Contents in a single request. Works synchronously.
|
|
7498
|
+
* @param - List of Contents to be created TODO: think again if we want to increase maxSize
|
|
7499
|
+
*/
|
|
7500
|
+
(contents: Content[], options?: BulkCreateContentOptions | undefined): Promise<BulkCreateContentResponse & BulkCreateContentResponseNonNullableFields>;
|
|
7501
|
+
}
|
|
7502
|
+
declare function bulkUpdateContent$1(httpClient: HttpClient): BulkUpdateContentSignature;
|
|
7503
|
+
interface BulkUpdateContentSignature {
|
|
7504
|
+
/**
|
|
7505
|
+
* update multiple Contents in a single request. Works synchronously.
|
|
7506
|
+
* @param - Contents to be updated. TODO: think again if we want to increase maxSize
|
|
7507
|
+
*/
|
|
7508
|
+
(contents: BulkUpdateContentRequestMaskedContent[], options?: BulkUpdateContentOptions | undefined): Promise<BulkUpdateContentResponse & BulkUpdateContentResponseNonNullableFields>;
|
|
7509
|
+
}
|
|
7510
|
+
declare function bulkUpdateContentByKey$1(httpClient: HttpClient): BulkUpdateContentByKeySignature;
|
|
7511
|
+
interface BulkUpdateContentByKeySignature {
|
|
7512
|
+
/**
|
|
7513
|
+
* update multiple Contents in a single request. Works synchronously. Each content is identified by a unique key, a combination of (schemaId, entityId, locale)
|
|
7514
|
+
* @param - Contents to be updated. TODO: think again if we want to increase maxSize
|
|
7515
|
+
*/
|
|
7516
|
+
(contents: MaskedContent[], options?: BulkUpdateContentByKeyOptions | undefined): Promise<BulkUpdateContentByKeyResponse & BulkUpdateContentByKeyResponseNonNullableFields>;
|
|
7517
|
+
}
|
|
7518
|
+
declare function bulkDeleteContent$1(httpClient: HttpClient): BulkDeleteContentSignature;
|
|
7519
|
+
interface BulkDeleteContentSignature {
|
|
7520
|
+
/**
|
|
7521
|
+
* deletes multiple Contents in a single request. Works synchronously.
|
|
7522
|
+
* @param - Content ids to be deleted. TODO: think again if we want to increase maxSize
|
|
7523
|
+
*/
|
|
7524
|
+
(contentIds: string[]): Promise<BulkDeleteContentResponse & BulkDeleteContentResponseNonNullableFields>;
|
|
7525
|
+
}
|
|
7364
7526
|
|
|
7365
7527
|
declare function createRESTModule$1<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
7366
7528
|
|
|
@@ -8439,10 +8601,36 @@ interface ListSiteSchemasOptions {
|
|
|
8439
8601
|
paging?: CursorPaging;
|
|
8440
8602
|
}
|
|
8441
8603
|
|
|
8442
|
-
declare function getSchema$1(httpClient: HttpClient):
|
|
8443
|
-
|
|
8444
|
-
|
|
8445
|
-
|
|
8604
|
+
declare function getSchema$1(httpClient: HttpClient): GetSchemaSignature;
|
|
8605
|
+
interface GetSchemaSignature {
|
|
8606
|
+
/**
|
|
8607
|
+
* Retrieves a Schema.
|
|
8608
|
+
* @param - ID of the Schema to retrieve.
|
|
8609
|
+
* @returns The requested Schema.
|
|
8610
|
+
*/
|
|
8611
|
+
(schemaId: string): Promise<Schema & SchemaNonNullableFields>;
|
|
8612
|
+
}
|
|
8613
|
+
declare function getSchemaByKey$1(httpClient: HttpClient): GetSchemaByKeySignature;
|
|
8614
|
+
interface GetSchemaByKeySignature {
|
|
8615
|
+
/**
|
|
8616
|
+
* Retrieves a Schema by key.
|
|
8617
|
+
*/
|
|
8618
|
+
(identifiers: GetSchemaByKeyIdentifiers, key: GetSchemaByKey): Promise<GetSchemaByKeyResponse & GetSchemaByKeyResponseNonNullableFields>;
|
|
8619
|
+
}
|
|
8620
|
+
declare function querySchemas$1(httpClient: HttpClient): QuerySchemasSignature;
|
|
8621
|
+
interface QuerySchemasSignature {
|
|
8622
|
+
/**
|
|
8623
|
+
* Retrieves a list of Schemas, given the provided [paging, filtering, and sorting][1].
|
|
8624
|
+
*/
|
|
8625
|
+
(options?: QuerySchemasOptions | undefined): SchemasQueryBuilder;
|
|
8626
|
+
}
|
|
8627
|
+
declare function listSiteSchemas$1(httpClient: HttpClient): ListSiteSchemasSignature;
|
|
8628
|
+
interface ListSiteSchemasSignature {
|
|
8629
|
+
/**
|
|
8630
|
+
* Retrieves a list of Schemas of app installed on site.
|
|
8631
|
+
*/
|
|
8632
|
+
(options?: ListSiteSchemasOptions | undefined): Promise<ListSiteSchemasResponse & ListSiteSchemasResponseNonNullableFields>;
|
|
8633
|
+
}
|
|
8446
8634
|
declare const onSchemaCreated$1: EventDefinition<SchemaCreatedEnvelope, "wix.multilingual.translation.v1.schema_created">;
|
|
8447
8635
|
declare const onSchemaUpdated$1: EventDefinition<SchemaUpdatedEnvelope, "wix.multilingual.translation.v1.schema_updated">;
|
|
8448
8636
|
declare const onSchemaDeleted$1: EventDefinition<SchemaDeletedEnvelope, "wix.multilingual.translation.v1.schema_deleted">;
|
|
@@ -8461,12 +8649,15 @@ type _publicListSiteSchemasType = typeof listSiteSchemas$1;
|
|
|
8461
8649
|
declare const listSiteSchemas: ReturnType<typeof createRESTModule<_publicListSiteSchemasType>>;
|
|
8462
8650
|
|
|
8463
8651
|
type _publicOnSchemaCreatedType = typeof onSchemaCreated$1;
|
|
8652
|
+
/** */
|
|
8464
8653
|
declare const onSchemaCreated: ReturnType<typeof createEventModule<_publicOnSchemaCreatedType>>;
|
|
8465
8654
|
|
|
8466
8655
|
type _publicOnSchemaUpdatedType = typeof onSchemaUpdated$1;
|
|
8656
|
+
/** */
|
|
8467
8657
|
declare const onSchemaUpdated: ReturnType<typeof createEventModule<_publicOnSchemaUpdatedType>>;
|
|
8468
8658
|
|
|
8469
8659
|
type _publicOnSchemaDeletedType = typeof onSchemaDeleted$1;
|
|
8660
|
+
/** */
|
|
8470
8661
|
declare const onSchemaDeleted: ReturnType<typeof createEventModule<_publicOnSchemaDeletedType>>;
|
|
8471
8662
|
|
|
8472
8663
|
type context_ActionEvent = ActionEvent;
|
|
@@ -423,11 +423,11 @@ interface PublishSiteTranslationsRequest {
|
|
|
423
423
|
}
|
|
424
424
|
interface PublishSiteTranslationsResponse {
|
|
425
425
|
}
|
|
426
|
-
interface
|
|
426
|
+
interface CreateOrUpdateEditorMapperRequest {
|
|
427
427
|
/** A mapper to create or update if already exist */
|
|
428
428
|
mapper?: Mapper;
|
|
429
429
|
}
|
|
430
|
-
interface
|
|
430
|
+
interface CreateOrUpdateEditorMapperResponse {
|
|
431
431
|
}
|
|
432
432
|
interface GetMapperRequest {
|
|
433
433
|
/** The mapper type requested */
|
|
@@ -460,7 +460,13 @@ interface SyncEditorDataOptions {
|
|
|
460
460
|
syncFilter?: SyncFilter;
|
|
461
461
|
}
|
|
462
462
|
|
|
463
|
-
declare function syncEditorData$1(httpClient: HttpClient):
|
|
463
|
+
declare function syncEditorData$1(httpClient: HttpClient): SyncEditorDataSignature;
|
|
464
|
+
interface SyncEditorDataSignature {
|
|
465
|
+
/**
|
|
466
|
+
* Update localization content with editor data
|
|
467
|
+
*/
|
|
468
|
+
(options?: SyncEditorDataOptions | undefined): Promise<void>;
|
|
469
|
+
}
|
|
464
470
|
|
|
465
471
|
declare function createRESTModule$5<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
466
472
|
|
|
@@ -469,6 +475,8 @@ declare const syncEditorData: ReturnType<typeof createRESTModule$5<_publicSyncEd
|
|
|
469
475
|
|
|
470
476
|
type index_d$5_ChangedPages = ChangedPages;
|
|
471
477
|
type index_d$5_CreateOrUpdateAction = CreateOrUpdateAction;
|
|
478
|
+
type index_d$5_CreateOrUpdateEditorMapperRequest = CreateOrUpdateEditorMapperRequest;
|
|
479
|
+
type index_d$5_CreateOrUpdateEditorMapperResponse = CreateOrUpdateEditorMapperResponse;
|
|
472
480
|
type index_d$5_CreateOrUpdateMapperRequest = CreateOrUpdateMapperRequest;
|
|
473
481
|
type index_d$5_CreateOrUpdateMapperResponse = CreateOrUpdateMapperResponse;
|
|
474
482
|
type index_d$5_DeleteAction = DeleteAction;
|
|
@@ -508,12 +516,10 @@ type index_d$5_SyncEditorDataOptions = SyncEditorDataOptions;
|
|
|
508
516
|
type index_d$5_SyncEditorDataRequest = SyncEditorDataRequest;
|
|
509
517
|
type index_d$5_SyncEditorDataResponse = SyncEditorDataResponse;
|
|
510
518
|
type index_d$5_SyncFilter = SyncFilter;
|
|
511
|
-
type index_d$5_V1CreateOrUpdateMapperRequest = V1CreateOrUpdateMapperRequest;
|
|
512
|
-
type index_d$5_V1CreateOrUpdateMapperResponse = V1CreateOrUpdateMapperResponse;
|
|
513
519
|
type index_d$5__publicSyncEditorDataType = _publicSyncEditorDataType;
|
|
514
520
|
declare const index_d$5_syncEditorData: typeof syncEditorData;
|
|
515
521
|
declare namespace index_d$5 {
|
|
516
|
-
export { type ActionEvent$3 as ActionEvent, type index_d$5_ChangedPages as ChangedPages, type index_d$5_CreateOrUpdateAction as CreateOrUpdateAction, type index_d$5_CreateOrUpdateMapperRequest as CreateOrUpdateMapperRequest, type index_d$5_CreateOrUpdateMapperResponse as CreateOrUpdateMapperResponse, type index_d$5_DeleteAction as DeleteAction, type index_d$5_DeleteEntityMapperRequest as DeleteEntityMapperRequest, type index_d$5_DeleteEntityMapperResponse as DeleteEntityMapperResponse, type index_d$5_DeleteMapperRequest as DeleteMapperRequest, type index_d$5_DeleteMapperResponse as DeleteMapperResponse, type DomainEvent$3 as DomainEvent, type DomainEventBodyOneOf$3 as DomainEventBodyOneOf, type Empty$2 as Empty, type EntityCreatedEvent$3 as EntityCreatedEvent, type EntityDeletedEvent$3 as EntityDeletedEvent, type EntityUpdatedEvent$3 as EntityUpdatedEvent, type index_d$5_FieldSequence as FieldSequence, FieldType$1 as FieldType, type index_d$5_GetEntityMapperRequest as GetEntityMapperRequest, type index_d$5_GetEntityMapperResponse as GetEntityMapperResponse, type index_d$5_GetMapperRequest as GetMapperRequest, type index_d$5_GetMapperResponse as GetMapperResponse, type index_d$5_GetSubscribedTopicsRequest as GetSubscribedTopicsRequest, type index_d$5_GetSubscribedTopicsResponse as GetSubscribedTopicsResponse, type index_d$5_HtmlNewRevisionSavedMessage as HtmlNewRevisionSavedMessage, type IdentificationData$3 as IdentificationData, type IdentificationDataIdOneOf$3 as IdentificationDataIdOneOf, type index_d$5_ListMappersRequest as ListMappersRequest, type index_d$5_ListMappersResponse as ListMappersResponse, type index_d$5_LocalizationPublicAction as LocalizationPublicAction, type index_d$5_LocalizationPublicActionActionOneOf as LocalizationPublicActionActionOneOf, type index_d$5_LocalizedContentKey as LocalizedContentKey, type index_d$5_LocalizedPublishedContent as LocalizedPublishedContent, type index_d$5_LocalizedPublishedContentField as LocalizedPublishedContentField, type index_d$5_LocalizedPublishedContentFieldValueOneOf as LocalizedPublishedContentFieldValueOneOf, type index_d$5_LocalizedPublishedLanguageContentChanged as LocalizedPublishedLanguageContentChanged, type index_d$5_Mapper as Mapper, type index_d$5_MapperField as MapperField, type index_d$5_MediaItem as MediaItem, type index_d$5_MediaItemMediaOneOf as MediaItemMediaOneOf, type MessageEnvelope$3 as MessageEnvelope, type index_d$5_Page as Page, type index_d$5_PublishSiteTranslationsRequest as PublishSiteTranslationsRequest, type index_d$5_PublishSiteTranslationsResponse as PublishSiteTranslationsResponse, type RestoreInfo$3 as RestoreInfo, type index_d$5_RevisionInfo as RevisionInfo, type SchemaKey$2 as SchemaKey, SchemaScope$2 as SchemaScope, type index_d$5_SequencePath as SequencePath, type index_d$5_StressDMRequest as StressDMRequest, type index_d$5_StressDMResponse as StressDMResponse, type index_d$5_SyncEditorDataOptions as SyncEditorDataOptions, type index_d$5_SyncEditorDataRequest as SyncEditorDataRequest, type index_d$5_SyncEditorDataResponse as SyncEditorDataResponse, type index_d$5_SyncFilter as SyncFilter, type
|
|
522
|
+
export { type ActionEvent$3 as ActionEvent, type index_d$5_ChangedPages as ChangedPages, type index_d$5_CreateOrUpdateAction as CreateOrUpdateAction, type index_d$5_CreateOrUpdateEditorMapperRequest as CreateOrUpdateEditorMapperRequest, type index_d$5_CreateOrUpdateEditorMapperResponse as CreateOrUpdateEditorMapperResponse, type index_d$5_CreateOrUpdateMapperRequest as CreateOrUpdateMapperRequest, type index_d$5_CreateOrUpdateMapperResponse as CreateOrUpdateMapperResponse, type index_d$5_DeleteAction as DeleteAction, type index_d$5_DeleteEntityMapperRequest as DeleteEntityMapperRequest, type index_d$5_DeleteEntityMapperResponse as DeleteEntityMapperResponse, type index_d$5_DeleteMapperRequest as DeleteMapperRequest, type index_d$5_DeleteMapperResponse as DeleteMapperResponse, type DomainEvent$3 as DomainEvent, type DomainEventBodyOneOf$3 as DomainEventBodyOneOf, type Empty$2 as Empty, type EntityCreatedEvent$3 as EntityCreatedEvent, type EntityDeletedEvent$3 as EntityDeletedEvent, type EntityUpdatedEvent$3 as EntityUpdatedEvent, type index_d$5_FieldSequence as FieldSequence, FieldType$1 as FieldType, type index_d$5_GetEntityMapperRequest as GetEntityMapperRequest, type index_d$5_GetEntityMapperResponse as GetEntityMapperResponse, type index_d$5_GetMapperRequest as GetMapperRequest, type index_d$5_GetMapperResponse as GetMapperResponse, type index_d$5_GetSubscribedTopicsRequest as GetSubscribedTopicsRequest, type index_d$5_GetSubscribedTopicsResponse as GetSubscribedTopicsResponse, type index_d$5_HtmlNewRevisionSavedMessage as HtmlNewRevisionSavedMessage, type IdentificationData$3 as IdentificationData, type IdentificationDataIdOneOf$3 as IdentificationDataIdOneOf, type index_d$5_ListMappersRequest as ListMappersRequest, type index_d$5_ListMappersResponse as ListMappersResponse, type index_d$5_LocalizationPublicAction as LocalizationPublicAction, type index_d$5_LocalizationPublicActionActionOneOf as LocalizationPublicActionActionOneOf, type index_d$5_LocalizedContentKey as LocalizedContentKey, type index_d$5_LocalizedPublishedContent as LocalizedPublishedContent, type index_d$5_LocalizedPublishedContentField as LocalizedPublishedContentField, type index_d$5_LocalizedPublishedContentFieldValueOneOf as LocalizedPublishedContentFieldValueOneOf, type index_d$5_LocalizedPublishedLanguageContentChanged as LocalizedPublishedLanguageContentChanged, type index_d$5_Mapper as Mapper, type index_d$5_MapperField as MapperField, type index_d$5_MediaItem as MediaItem, type index_d$5_MediaItemMediaOneOf as MediaItemMediaOneOf, type MessageEnvelope$3 as MessageEnvelope, type index_d$5_Page as Page, type index_d$5_PublishSiteTranslationsRequest as PublishSiteTranslationsRequest, type index_d$5_PublishSiteTranslationsResponse as PublishSiteTranslationsResponse, type RestoreInfo$3 as RestoreInfo, type index_d$5_RevisionInfo as RevisionInfo, type SchemaKey$2 as SchemaKey, SchemaScope$2 as SchemaScope, type index_d$5_SequencePath as SequencePath, type index_d$5_StressDMRequest as StressDMRequest, type index_d$5_StressDMResponse as StressDMResponse, type index_d$5_SyncEditorDataOptions as SyncEditorDataOptions, type index_d$5_SyncEditorDataRequest as SyncEditorDataRequest, type index_d$5_SyncEditorDataResponse as SyncEditorDataResponse, type index_d$5_SyncFilter as SyncFilter, type VideoResolution$2 as VideoResolution, WebhookIdentityType$3 as WebhookIdentityType, type index_d$5__publicSyncEditorDataType as _publicSyncEditorDataType, index_d$5_syncEditorData as syncEditorData };
|
|
517
523
|
}
|
|
518
524
|
|
|
519
525
|
/** Represents a content of an entity with its published translations */
|
|
@@ -2362,7 +2368,13 @@ interface PublishedContentQueryBuilder {
|
|
|
2362
2368
|
find: () => Promise<PublishedContentQueryResult>;
|
|
2363
2369
|
}
|
|
2364
2370
|
|
|
2365
|
-
declare function queryPublishedContent$1(httpClient: HttpClient):
|
|
2371
|
+
declare function queryPublishedContent$1(httpClient: HttpClient): QueryPublishedContentSignature;
|
|
2372
|
+
interface QueryPublishedContentSignature {
|
|
2373
|
+
/**
|
|
2374
|
+
* Query the published content of multiple entities using the schema key and optionally other criteria
|
|
2375
|
+
*/
|
|
2376
|
+
(): PublishedContentQueryBuilder;
|
|
2377
|
+
}
|
|
2366
2378
|
|
|
2367
2379
|
declare function createRESTModule$4<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
2368
2380
|
|
|
@@ -4283,8 +4295,62 @@ interface BulkMachineTranslateOptions {
|
|
|
4283
4295
|
contentToTranslate?: TranslatableContent[];
|
|
4284
4296
|
}
|
|
4285
4297
|
|
|
4286
|
-
declare function machineTranslate$1(httpClient: HttpClient):
|
|
4287
|
-
|
|
4298
|
+
declare function machineTranslate$1(httpClient: HttpClient): MachineTranslateSignature;
|
|
4299
|
+
interface MachineTranslateSignature {
|
|
4300
|
+
/**
|
|
4301
|
+
* Translates the text of a translatable unit of content from one supported language to another.
|
|
4302
|
+
*
|
|
4303
|
+
* The `translatedContent` object returns with the same `id` used for `contentToTranslate.id` but the text within the
|
|
4304
|
+
* content fields is replaced with the translated text. Note that Wix does not overwrite the original content object.
|
|
4305
|
+
* To retrieve the translated content later, make sure to store it separately.
|
|
4306
|
+
*
|
|
4307
|
+
* Only text content is translated, even if the content is `htmlContent` or `richContent`. Note that [collapsible text](https://support.wix.com/en/article/adding-and-setting-up-collapsible-text)
|
|
4308
|
+
* cannot be translated using this method.
|
|
4309
|
+
*
|
|
4310
|
+
* The translatable content must not exceed 5,000 characters. If this limit is exceeded, the method returns a `TEXT_TOO_LONG` error.
|
|
4311
|
+
* For `richContent`, the 5,000-character limit applies separately to each node in `richContent.nodes`.
|
|
4312
|
+
* The total translatable content may be more than 5,000 characters as long as no individual node surpasses this limit.
|
|
4313
|
+
* If any node exceeds 5,000 characters, the entire request fails.
|
|
4314
|
+
*
|
|
4315
|
+
* Each site has a [word credit](/machine-translation/introduction#terminology) balance, starting at 3,000 words.
|
|
4316
|
+
* Each successful translation request reduces the word credits by the number of words in `contentToTranslate`.
|
|
4317
|
+
* If the site does not have sufficient word credits to translate all of the text in the request, the request fails
|
|
4318
|
+
* with a `NOT_ENOUGH_CREDITS` error. Additional credits can be [purchased through the Dashboard](https://support.wix.com/en/article/wix-multilingual-auto-translating-your-site?tabs=Dashboard-5#purchasing-translation-packages).
|
|
4319
|
+
*
|
|
4320
|
+
* To translate up to 1,000 `translatableContent` units at once, use [Bulk Machine Translate](/machine-translation/bulk-machine-translate).
|
|
4321
|
+
* @param - Language of the source text to translate.
|
|
4322
|
+
*/
|
|
4323
|
+
(sourceLanguage: SupportedLanguage, options: MachineTranslateOptions): Promise<MachineTranslateResponse & MachineTranslateResponseNonNullableFields>;
|
|
4324
|
+
}
|
|
4325
|
+
declare function bulkMachineTranslate$1(httpClient: HttpClient): BulkMachineTranslateSignature;
|
|
4326
|
+
interface BulkMachineTranslateSignature {
|
|
4327
|
+
/**
|
|
4328
|
+
* Translates the text of multiple units of translatable content from one supported language to another.
|
|
4329
|
+
*
|
|
4330
|
+
* Each translated content item in the `results` array returns with the same `id` as the corresponding `contentToTranslate.id`, but with the text in the
|
|
4331
|
+
* content fields replaced with the translated text. Note that Wix does not overwrite the original content source,
|
|
4332
|
+
* to retrieve the translated content later, make sure to store it separately.
|
|
4333
|
+
*
|
|
4334
|
+
* Only text content is translated, even if the content is `htmlContent` or `richContent`. Note that [collapsible text](https://support.wix.com/en/article/adding-and-setting-up-collapsible-text)
|
|
4335
|
+
* cannot be translated using this method.
|
|
4336
|
+
*
|
|
4337
|
+
* Each unit of translatable content must not exceed 5,000 characters. If this limit is exceeded, the method returns a `TEXT_TOO_LONG` error.
|
|
4338
|
+
* For `richContent`, the 5,000-character limit applies separately to each node in `richContent.nodes`.
|
|
4339
|
+
* The total request may exceed 5,000 characters as long as no individual node surpasses this limit.
|
|
4340
|
+
* If any node exceeds 5,000 characters, then the request fails for that specific `contentToTranslate` item and the error details for that
|
|
4341
|
+
* error are returned in `itemMetadata`. Even if some translations fail due to the character limit,
|
|
4342
|
+
* the machine translation for other items will succeed if they are under the character limit.
|
|
4343
|
+
*
|
|
4344
|
+
* Each site has a [word credit](/machine-translation/introduction#terminology) balance, starting at 3,000 words.
|
|
4345
|
+
* Each successful translation request reduces the word credits by the number of words included in `contentToTranslate`.
|
|
4346
|
+
* If the site does not have sufficient word credits to complete the translation, then the entire request fails
|
|
4347
|
+
* with a `NOT_ENOUGH_CREDITS` error. Additional credits can be [purchased through the Dashboard](https://support.wix.com/en/article/wix-multilingual-auto-translating-your-site?tabs=Dashboard-5#purchasing-translation-packages).
|
|
4348
|
+
*
|
|
4349
|
+
* To translate a single unit of `translatableContent`, use [Machine Translate](/machine-translation/machine-translate).
|
|
4350
|
+
* @param - Language of the source text to translate.
|
|
4351
|
+
*/
|
|
4352
|
+
(sourceLanguage: SupportedLanguage, options?: BulkMachineTranslateOptions | undefined): Promise<BulkMachineTranslateResponse & BulkMachineTranslateResponseNonNullableFields>;
|
|
4353
|
+
}
|
|
4288
4354
|
|
|
4289
4355
|
declare function createRESTModule$3<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
4290
4356
|
|
|
@@ -4640,8 +4706,22 @@ interface GetSiteTranslatablesPropertiesOptions {
|
|
|
4640
4706
|
translatedLanguage?: Locale;
|
|
4641
4707
|
}
|
|
4642
4708
|
|
|
4643
|
-
declare function translateSite$1(httpClient: HttpClient):
|
|
4644
|
-
|
|
4709
|
+
declare function translateSite$1(httpClient: HttpClient): TranslateSiteSignature;
|
|
4710
|
+
interface TranslateSiteSignature {
|
|
4711
|
+
/**
|
|
4712
|
+
* Start a task to auto-translate all site content that hasn't been translated yet
|
|
4713
|
+
* @param - Language from which the site content is translated
|
|
4714
|
+
*/
|
|
4715
|
+
(mainLanguage: Locale, options: TranslateSiteOptions): Promise<void>;
|
|
4716
|
+
}
|
|
4717
|
+
declare function getSiteTranslatablesProperties$1(httpClient: HttpClient): GetSiteTranslatablesPropertiesSignature;
|
|
4718
|
+
interface GetSiteTranslatablesPropertiesSignature {
|
|
4719
|
+
/**
|
|
4720
|
+
* Receive the site's translation status
|
|
4721
|
+
* @param - Number of words included in main_language
|
|
4722
|
+
*/
|
|
4723
|
+
(mainLanguage: Locale, options?: GetSiteTranslatablesPropertiesOptions | undefined): Promise<GetSiteTranslatablesPropertiesResponse & GetSiteTranslatablesPropertiesResponseNonNullableFields>;
|
|
4724
|
+
}
|
|
4645
4725
|
|
|
4646
4726
|
declare function createRESTModule$2<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
4647
4727
|
|
|
@@ -6101,7 +6181,7 @@ interface QueryContentsResponse {
|
|
|
6101
6181
|
pagingMetadata?: CursorPagingMetadata$1;
|
|
6102
6182
|
}
|
|
6103
6183
|
interface CursorPagingMetadata$1 {
|
|
6104
|
-
/** Number of items returned in
|
|
6184
|
+
/** Number of items returned in current page. */
|
|
6105
6185
|
count?: number | null;
|
|
6106
6186
|
/** Cursor strings that point to the next page, previous page, or both. */
|
|
6107
6187
|
cursors?: Cursors$1;
|
|
@@ -6177,6 +6257,7 @@ interface PagingMetadataV2 {
|
|
|
6177
6257
|
cursors?: Cursors$1;
|
|
6178
6258
|
}
|
|
6179
6259
|
interface SearchContentsRequest {
|
|
6260
|
+
/** WQL expression, Aggregation and Search */
|
|
6180
6261
|
search?: CursorSearch;
|
|
6181
6262
|
}
|
|
6182
6263
|
interface CursorSearch extends CursorSearchPagingMethodOneOf {
|
|
@@ -7335,6 +7416,7 @@ interface ContentsQueryBuilder {
|
|
|
7335
7416
|
find: () => Promise<ContentsQueryResult>;
|
|
7336
7417
|
}
|
|
7337
7418
|
interface SearchContentsOptions {
|
|
7419
|
+
/** WQL expression, Aggregation and Search */
|
|
7338
7420
|
search?: CursorSearch;
|
|
7339
7421
|
}
|
|
7340
7422
|
interface BulkCreateContentOptions {
|
|
@@ -7350,17 +7432,97 @@ interface BulkUpdateContentByKeyOptions {
|
|
|
7350
7432
|
returnEntity?: boolean;
|
|
7351
7433
|
}
|
|
7352
7434
|
|
|
7353
|
-
declare function createContent$1(httpClient: HttpClient):
|
|
7354
|
-
|
|
7355
|
-
|
|
7356
|
-
|
|
7357
|
-
|
|
7358
|
-
|
|
7359
|
-
|
|
7360
|
-
|
|
7361
|
-
|
|
7362
|
-
|
|
7363
|
-
|
|
7435
|
+
declare function createContent$1(httpClient: HttpClient): CreateContentSignature;
|
|
7436
|
+
interface CreateContentSignature {
|
|
7437
|
+
/**
|
|
7438
|
+
* Creates a Content.
|
|
7439
|
+
*
|
|
7440
|
+
* The request body must include schema-id, entity-id and locale.
|
|
7441
|
+
* @param - Content to be created.
|
|
7442
|
+
* @returns The created Content.
|
|
7443
|
+
*/
|
|
7444
|
+
(content: Content): Promise<Content & ContentNonNullableFields>;
|
|
7445
|
+
}
|
|
7446
|
+
declare function getContent$1(httpClient: HttpClient): GetContentSignature;
|
|
7447
|
+
interface GetContentSignature {
|
|
7448
|
+
/**
|
|
7449
|
+
* Retrieves a Content.
|
|
7450
|
+
* @param - ID of the Content to retrieve.
|
|
7451
|
+
* @returns The requested Content.
|
|
7452
|
+
*/
|
|
7453
|
+
(contentId: string): Promise<Content & ContentNonNullableFields>;
|
|
7454
|
+
}
|
|
7455
|
+
declare function updateContent$1(httpClient: HttpClient): UpdateContentSignature;
|
|
7456
|
+
interface UpdateContentSignature {
|
|
7457
|
+
/**
|
|
7458
|
+
* Updates a Content.
|
|
7459
|
+
* @param - Content ID.
|
|
7460
|
+
* @returns Updated Content.
|
|
7461
|
+
*/
|
|
7462
|
+
(_id: string | null, content: UpdateContent): Promise<Content & ContentNonNullableFields>;
|
|
7463
|
+
}
|
|
7464
|
+
declare function updateContentByKey$1(httpClient: HttpClient): UpdateContentByKeySignature;
|
|
7465
|
+
interface UpdateContentByKeySignature {
|
|
7466
|
+
/**
|
|
7467
|
+
* Updates a Content. A content is identified by a unique key, a combination of (schemaId, entityId, locale)
|
|
7468
|
+
* @param - Content to be updated, may be partial.
|
|
7469
|
+
*/
|
|
7470
|
+
(content: Content): Promise<UpdateContentByKeyResponse & UpdateContentByKeyResponseNonNullableFields>;
|
|
7471
|
+
}
|
|
7472
|
+
declare function deleteContent$1(httpClient: HttpClient): DeleteContentSignature;
|
|
7473
|
+
interface DeleteContentSignature {
|
|
7474
|
+
/**
|
|
7475
|
+
* Deletes a Content.
|
|
7476
|
+
* @param - Id of the Content to delete.
|
|
7477
|
+
*/
|
|
7478
|
+
(contentId: string): Promise<void>;
|
|
7479
|
+
}
|
|
7480
|
+
declare function queryContents$1(httpClient: HttpClient): QueryContentsSignature;
|
|
7481
|
+
interface QueryContentsSignature {
|
|
7482
|
+
/**
|
|
7483
|
+
* Retrieves a list of Contents, given the provided [paging, filtering, and sorting][1].
|
|
7484
|
+
*/
|
|
7485
|
+
(options?: QueryContentsOptions | undefined): ContentsQueryBuilder;
|
|
7486
|
+
}
|
|
7487
|
+
declare function searchContents$1(httpClient: HttpClient): SearchContentsSignature;
|
|
7488
|
+
interface SearchContentsSignature {
|
|
7489
|
+
/**
|
|
7490
|
+
* Retrieves a list of Contents, given the provided CursorSearch.
|
|
7491
|
+
*/
|
|
7492
|
+
(options?: SearchContentsOptions | undefined): Promise<SearchContentsResponse & SearchContentsResponseNonNullableFields>;
|
|
7493
|
+
}
|
|
7494
|
+
declare function bulkCreateContent$1(httpClient: HttpClient): BulkCreateContentSignature;
|
|
7495
|
+
interface BulkCreateContentSignature {
|
|
7496
|
+
/**
|
|
7497
|
+
* create multiple Contents in a single request. Works synchronously.
|
|
7498
|
+
* @param - List of Contents to be created TODO: think again if we want to increase maxSize
|
|
7499
|
+
*/
|
|
7500
|
+
(contents: Content[], options?: BulkCreateContentOptions | undefined): Promise<BulkCreateContentResponse & BulkCreateContentResponseNonNullableFields>;
|
|
7501
|
+
}
|
|
7502
|
+
declare function bulkUpdateContent$1(httpClient: HttpClient): BulkUpdateContentSignature;
|
|
7503
|
+
interface BulkUpdateContentSignature {
|
|
7504
|
+
/**
|
|
7505
|
+
* update multiple Contents in a single request. Works synchronously.
|
|
7506
|
+
* @param - Contents to be updated. TODO: think again if we want to increase maxSize
|
|
7507
|
+
*/
|
|
7508
|
+
(contents: BulkUpdateContentRequestMaskedContent[], options?: BulkUpdateContentOptions | undefined): Promise<BulkUpdateContentResponse & BulkUpdateContentResponseNonNullableFields>;
|
|
7509
|
+
}
|
|
7510
|
+
declare function bulkUpdateContentByKey$1(httpClient: HttpClient): BulkUpdateContentByKeySignature;
|
|
7511
|
+
interface BulkUpdateContentByKeySignature {
|
|
7512
|
+
/**
|
|
7513
|
+
* update multiple Contents in a single request. Works synchronously. Each content is identified by a unique key, a combination of (schemaId, entityId, locale)
|
|
7514
|
+
* @param - Contents to be updated. TODO: think again if we want to increase maxSize
|
|
7515
|
+
*/
|
|
7516
|
+
(contents: MaskedContent[], options?: BulkUpdateContentByKeyOptions | undefined): Promise<BulkUpdateContentByKeyResponse & BulkUpdateContentByKeyResponseNonNullableFields>;
|
|
7517
|
+
}
|
|
7518
|
+
declare function bulkDeleteContent$1(httpClient: HttpClient): BulkDeleteContentSignature;
|
|
7519
|
+
interface BulkDeleteContentSignature {
|
|
7520
|
+
/**
|
|
7521
|
+
* deletes multiple Contents in a single request. Works synchronously.
|
|
7522
|
+
* @param - Content ids to be deleted. TODO: think again if we want to increase maxSize
|
|
7523
|
+
*/
|
|
7524
|
+
(contentIds: string[]): Promise<BulkDeleteContentResponse & BulkDeleteContentResponseNonNullableFields>;
|
|
7525
|
+
}
|
|
7364
7526
|
|
|
7365
7527
|
declare function createRESTModule$1<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
7366
7528
|
|
|
@@ -8439,10 +8601,36 @@ interface ListSiteSchemasOptions {
|
|
|
8439
8601
|
paging?: CursorPaging;
|
|
8440
8602
|
}
|
|
8441
8603
|
|
|
8442
|
-
declare function getSchema$1(httpClient: HttpClient):
|
|
8443
|
-
|
|
8444
|
-
|
|
8445
|
-
|
|
8604
|
+
declare function getSchema$1(httpClient: HttpClient): GetSchemaSignature;
|
|
8605
|
+
interface GetSchemaSignature {
|
|
8606
|
+
/**
|
|
8607
|
+
* Retrieves a Schema.
|
|
8608
|
+
* @param - ID of the Schema to retrieve.
|
|
8609
|
+
* @returns The requested Schema.
|
|
8610
|
+
*/
|
|
8611
|
+
(schemaId: string): Promise<Schema & SchemaNonNullableFields>;
|
|
8612
|
+
}
|
|
8613
|
+
declare function getSchemaByKey$1(httpClient: HttpClient): GetSchemaByKeySignature;
|
|
8614
|
+
interface GetSchemaByKeySignature {
|
|
8615
|
+
/**
|
|
8616
|
+
* Retrieves a Schema by key.
|
|
8617
|
+
*/
|
|
8618
|
+
(identifiers: GetSchemaByKeyIdentifiers, key: GetSchemaByKey): Promise<GetSchemaByKeyResponse & GetSchemaByKeyResponseNonNullableFields>;
|
|
8619
|
+
}
|
|
8620
|
+
declare function querySchemas$1(httpClient: HttpClient): QuerySchemasSignature;
|
|
8621
|
+
interface QuerySchemasSignature {
|
|
8622
|
+
/**
|
|
8623
|
+
* Retrieves a list of Schemas, given the provided [paging, filtering, and sorting][1].
|
|
8624
|
+
*/
|
|
8625
|
+
(options?: QuerySchemasOptions | undefined): SchemasQueryBuilder;
|
|
8626
|
+
}
|
|
8627
|
+
declare function listSiteSchemas$1(httpClient: HttpClient): ListSiteSchemasSignature;
|
|
8628
|
+
interface ListSiteSchemasSignature {
|
|
8629
|
+
/**
|
|
8630
|
+
* Retrieves a list of Schemas of app installed on site.
|
|
8631
|
+
*/
|
|
8632
|
+
(options?: ListSiteSchemasOptions | undefined): Promise<ListSiteSchemasResponse & ListSiteSchemasResponseNonNullableFields>;
|
|
8633
|
+
}
|
|
8446
8634
|
declare const onSchemaCreated$1: EventDefinition<SchemaCreatedEnvelope, "wix.multilingual.translation.v1.schema_created">;
|
|
8447
8635
|
declare const onSchemaUpdated$1: EventDefinition<SchemaUpdatedEnvelope, "wix.multilingual.translation.v1.schema_updated">;
|
|
8448
8636
|
declare const onSchemaDeleted$1: EventDefinition<SchemaDeletedEnvelope, "wix.multilingual.translation.v1.schema_deleted">;
|
|
@@ -8461,12 +8649,15 @@ type _publicListSiteSchemasType = typeof listSiteSchemas$1;
|
|
|
8461
8649
|
declare const listSiteSchemas: ReturnType<typeof createRESTModule<_publicListSiteSchemasType>>;
|
|
8462
8650
|
|
|
8463
8651
|
type _publicOnSchemaCreatedType = typeof onSchemaCreated$1;
|
|
8652
|
+
/** */
|
|
8464
8653
|
declare const onSchemaCreated: ReturnType<typeof createEventModule<_publicOnSchemaCreatedType>>;
|
|
8465
8654
|
|
|
8466
8655
|
type _publicOnSchemaUpdatedType = typeof onSchemaUpdated$1;
|
|
8656
|
+
/** */
|
|
8467
8657
|
declare const onSchemaUpdated: ReturnType<typeof createEventModule<_publicOnSchemaUpdatedType>>;
|
|
8468
8658
|
|
|
8469
8659
|
type _publicOnSchemaDeletedType = typeof onSchemaDeleted$1;
|
|
8660
|
+
/** */
|
|
8470
8661
|
declare const onSchemaDeleted: ReturnType<typeof createEventModule<_publicOnSchemaDeletedType>>;
|
|
8471
8662
|
|
|
8472
8663
|
type index_d_ActionEvent = ActionEvent;
|
|
@@ -9245,7 +9245,7 @@ interface QueryContentsResponse$1 {
|
|
|
9245
9245
|
pagingMetadata?: CursorPagingMetadata$3;
|
|
9246
9246
|
}
|
|
9247
9247
|
interface CursorPagingMetadata$3 {
|
|
9248
|
-
/** Number of items returned in
|
|
9248
|
+
/** Number of items returned in current page. */
|
|
9249
9249
|
count?: number | null;
|
|
9250
9250
|
/** Cursor strings that point to the next page, previous page, or both. */
|
|
9251
9251
|
cursors?: Cursors$3;
|
|
@@ -9264,6 +9264,7 @@ interface Cursors$3 {
|
|
|
9264
9264
|
prev?: string | null;
|
|
9265
9265
|
}
|
|
9266
9266
|
interface SearchContentsRequest$1 {
|
|
9267
|
+
/** WQL expression, Aggregation and Search */
|
|
9267
9268
|
search?: CursorSearch$1;
|
|
9268
9269
|
}
|
|
9269
9270
|
interface CursorSearch$1 extends CursorSearchPagingMethodOneOf$1 {
|
|
@@ -11315,7 +11316,7 @@ interface QueryContentsResponse {
|
|
|
11315
11316
|
pagingMetadata?: CursorPagingMetadata$2;
|
|
11316
11317
|
}
|
|
11317
11318
|
interface CursorPagingMetadata$2 {
|
|
11318
|
-
/** Number of items returned in
|
|
11319
|
+
/** Number of items returned in current page. */
|
|
11319
11320
|
count?: number | null;
|
|
11320
11321
|
/** Cursor strings that point to the next page, previous page, or both. */
|
|
11321
11322
|
cursors?: Cursors$2;
|
|
@@ -11334,6 +11335,7 @@ interface Cursors$2 {
|
|
|
11334
11335
|
prev?: string | null;
|
|
11335
11336
|
}
|
|
11336
11337
|
interface SearchContentsRequest {
|
|
11338
|
+
/** WQL expression, Aggregation and Search */
|
|
11337
11339
|
search?: CursorSearch;
|
|
11338
11340
|
}
|
|
11339
11341
|
interface CursorSearch extends CursorSearchPagingMethodOneOf {
|