@wix/multilingual 1.0.27 → 1.0.28

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.27",
3
+ "version": "1.0.28",
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.2",
22
- "@wix/multilingual_machine-translation": "1.0.22",
23
- "@wix/multilingual_site-translator": "1.0.9",
24
- "@wix/multilingual_translation-contents": "1.0.11",
25
- "@wix/multilingual_translation-published-contents": "1.0.0",
26
- "@wix/multilingual_translation-schemas": "1.0.10"
21
+ "@wix/multilingual_entity-mapper": "1.0.3",
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": "f581a7e16662ba95442f9c432883446d00819884f507ecb24f40e97f"
51
+ "falconPackageHash": "892e8420b797e2d661c85802b99e96af98744575d09b71e2168e6614"
52
52
  }
@@ -460,7 +460,13 @@ interface SyncEditorDataOptions {
460
460
  syncFilter?: SyncFilter;
461
461
  }
462
462
 
463
- declare function syncEditorData$1(httpClient: HttpClient): (options?: SyncEditorDataOptions) => Promise<void>;
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
 
@@ -2362,7 +2368,13 @@ interface PublishedContentQueryBuilder {
2362
2368
  find: () => Promise<PublishedContentQueryResult>;
2363
2369
  }
2364
2370
 
2365
- declare function queryPublishedContent$1(httpClient: HttpClient): () => PublishedContentQueryBuilder;
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): (sourceLanguage: SupportedLanguage, options: MachineTranslateOptions) => Promise<MachineTranslateResponse & MachineTranslateResponseNonNullableFields>;
4287
- declare function bulkMachineTranslate$1(httpClient: HttpClient): (sourceLanguage: SupportedLanguage, options?: BulkMachineTranslateOptions) => Promise<BulkMachineTranslateResponse & BulkMachineTranslateResponseNonNullableFields>;
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): (mainLanguage: Locale, options: TranslateSiteOptions) => Promise<void>;
4644
- declare function getSiteTranslatablesProperties$1(httpClient: HttpClient): (mainLanguage: Locale, options?: GetSiteTranslatablesPropertiesOptions) => Promise<GetSiteTranslatablesPropertiesResponse & GetSiteTranslatablesPropertiesResponseNonNullableFields>;
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 the response. */
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): (content: Content) => Promise<Content & ContentNonNullableFields>;
7354
- declare function getContent$1(httpClient: HttpClient): (contentId: string) => Promise<Content & ContentNonNullableFields>;
7355
- declare function updateContent$1(httpClient: HttpClient): (_id: string | null, content: UpdateContent) => Promise<Content & ContentNonNullableFields>;
7356
- declare function updateContentByKey$1(httpClient: HttpClient): (content: Content) => Promise<UpdateContentByKeyResponse & UpdateContentByKeyResponseNonNullableFields>;
7357
- declare function deleteContent$1(httpClient: HttpClient): (contentId: string) => Promise<void>;
7358
- declare function queryContents$1(httpClient: HttpClient): (options?: QueryContentsOptions) => ContentsQueryBuilder;
7359
- declare function searchContents$1(httpClient: HttpClient): (options?: SearchContentsOptions) => Promise<SearchContentsResponse & SearchContentsResponseNonNullableFields>;
7360
- declare function bulkCreateContent$1(httpClient: HttpClient): (contents: Content[], options?: BulkCreateContentOptions) => Promise<BulkCreateContentResponse & BulkCreateContentResponseNonNullableFields>;
7361
- declare function bulkUpdateContent$1(httpClient: HttpClient): (contents: BulkUpdateContentRequestMaskedContent[], options?: BulkUpdateContentOptions) => Promise<BulkUpdateContentResponse & BulkUpdateContentResponseNonNullableFields>;
7362
- declare function bulkUpdateContentByKey$1(httpClient: HttpClient): (contents: MaskedContent[], options?: BulkUpdateContentByKeyOptions) => Promise<BulkUpdateContentByKeyResponse & BulkUpdateContentByKeyResponseNonNullableFields>;
7363
- declare function bulkDeleteContent$1(httpClient: HttpClient): (contentIds: string[]) => Promise<BulkDeleteContentResponse & BulkDeleteContentResponseNonNullableFields>;
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): (schemaId: string) => Promise<Schema & SchemaNonNullableFields>;
8443
- declare function getSchemaByKey$1(httpClient: HttpClient): (identifiers: GetSchemaByKeyIdentifiers, key: GetSchemaByKey) => Promise<GetSchemaByKeyResponse & GetSchemaByKeyResponseNonNullableFields>;
8444
- declare function querySchemas$1(httpClient: HttpClient): (options?: QuerySchemasOptions) => SchemasQueryBuilder;
8445
- declare function listSiteSchemas$1(httpClient: HttpClient): (options?: ListSiteSchemasOptions) => Promise<ListSiteSchemasResponse & ListSiteSchemasResponseNonNullableFields>;
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;
@@ -460,7 +460,13 @@ interface SyncEditorDataOptions {
460
460
  syncFilter?: SyncFilter;
461
461
  }
462
462
 
463
- declare function syncEditorData$1(httpClient: HttpClient): (options?: SyncEditorDataOptions) => Promise<void>;
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
 
@@ -2362,7 +2368,13 @@ interface PublishedContentQueryBuilder {
2362
2368
  find: () => Promise<PublishedContentQueryResult>;
2363
2369
  }
2364
2370
 
2365
- declare function queryPublishedContent$1(httpClient: HttpClient): () => PublishedContentQueryBuilder;
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): (sourceLanguage: SupportedLanguage, options: MachineTranslateOptions) => Promise<MachineTranslateResponse & MachineTranslateResponseNonNullableFields>;
4287
- declare function bulkMachineTranslate$1(httpClient: HttpClient): (sourceLanguage: SupportedLanguage, options?: BulkMachineTranslateOptions) => Promise<BulkMachineTranslateResponse & BulkMachineTranslateResponseNonNullableFields>;
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): (mainLanguage: Locale, options: TranslateSiteOptions) => Promise<void>;
4644
- declare function getSiteTranslatablesProperties$1(httpClient: HttpClient): (mainLanguage: Locale, options?: GetSiteTranslatablesPropertiesOptions) => Promise<GetSiteTranslatablesPropertiesResponse & GetSiteTranslatablesPropertiesResponseNonNullableFields>;
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 the response. */
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): (content: Content) => Promise<Content & ContentNonNullableFields>;
7354
- declare function getContent$1(httpClient: HttpClient): (contentId: string) => Promise<Content & ContentNonNullableFields>;
7355
- declare function updateContent$1(httpClient: HttpClient): (_id: string | null, content: UpdateContent) => Promise<Content & ContentNonNullableFields>;
7356
- declare function updateContentByKey$1(httpClient: HttpClient): (content: Content) => Promise<UpdateContentByKeyResponse & UpdateContentByKeyResponseNonNullableFields>;
7357
- declare function deleteContent$1(httpClient: HttpClient): (contentId: string) => Promise<void>;
7358
- declare function queryContents$1(httpClient: HttpClient): (options?: QueryContentsOptions) => ContentsQueryBuilder;
7359
- declare function searchContents$1(httpClient: HttpClient): (options?: SearchContentsOptions) => Promise<SearchContentsResponse & SearchContentsResponseNonNullableFields>;
7360
- declare function bulkCreateContent$1(httpClient: HttpClient): (contents: Content[], options?: BulkCreateContentOptions) => Promise<BulkCreateContentResponse & BulkCreateContentResponseNonNullableFields>;
7361
- declare function bulkUpdateContent$1(httpClient: HttpClient): (contents: BulkUpdateContentRequestMaskedContent[], options?: BulkUpdateContentOptions) => Promise<BulkUpdateContentResponse & BulkUpdateContentResponseNonNullableFields>;
7362
- declare function bulkUpdateContentByKey$1(httpClient: HttpClient): (contents: MaskedContent[], options?: BulkUpdateContentByKeyOptions) => Promise<BulkUpdateContentByKeyResponse & BulkUpdateContentByKeyResponseNonNullableFields>;
7363
- declare function bulkDeleteContent$1(httpClient: HttpClient): (contentIds: string[]) => Promise<BulkDeleteContentResponse & BulkDeleteContentResponseNonNullableFields>;
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): (schemaId: string) => Promise<Schema & SchemaNonNullableFields>;
8443
- declare function getSchemaByKey$1(httpClient: HttpClient): (identifiers: GetSchemaByKeyIdentifiers, key: GetSchemaByKey) => Promise<GetSchemaByKeyResponse & GetSchemaByKeyResponseNonNullableFields>;
8444
- declare function querySchemas$1(httpClient: HttpClient): (options?: QuerySchemasOptions) => SchemasQueryBuilder;
8445
- declare function listSiteSchemas$1(httpClient: HttpClient): (options?: ListSiteSchemasOptions) => Promise<ListSiteSchemasResponse & ListSiteSchemasResponseNonNullableFields>;
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 the response. */
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 the response. */
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 {