@wix/multilingual 1.0.38 → 1.0.40

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.
@@ -4831,22 +4831,27 @@ declare namespace index_d$2 {
4831
4831
 
4832
4832
  interface Content {
4833
4833
  /**
4834
- * Content ID.
4834
+ * Translation content ID.
4835
4835
  * @readonly
4836
4836
  */
4837
4837
  _id?: string | null;
4838
- /** Schema unique identifier */
4838
+ /** Translation schema ID. */
4839
4839
  schemaId?: string;
4840
- /** Unique identifier that represents a specific entity in the app */
4840
+ /** A unique identifier defined by the app developer to differentiate translation content for various entities within the site. For example, if an app developer is creating translation content for blog posts, the `entityId` can be `'blog-posts-1'`. */
4841
4841
  entityId?: string;
4842
- /** Indicates the locale of this content */
4842
+ /** Translation content locale. */
4843
4843
  locale?: string;
4844
- /** List of fields localized in the given language */
4844
+ /** List of fields for the translation content. This property uses a string to map to a `ContentField` (`Map<string, ContentField>`). The string serves as a key, which you'll need to access each field in the content and when referencing a translation schema. */
4845
4845
  fields?: Record<string, ContentField>;
4846
- /** Optional field that will group in the UI contents with the same group name */
4846
+ /** A reference to the parent content defined by the app developer. For example, if the content is a menu item, this property would link to the content with the `entityId` of the menu it belongs to. */
4847
4847
  parentEntityId?: string | null;
4848
4848
  /**
4849
- * The aggregated published status across all content fields
4849
+ * The aggregated published status across all content fields.
4850
+ *
4851
+ * Supported values:
4852
+ * + `UNPUBLISHED`: None of the fields have been published to the live site.
4853
+ * + `PUBLISHED`: All of the fields have been published to the live site and are visible to site visitors.
4854
+ * + `PARTIALLY_PUBLISHED`: Some of the fields have been published to the live site and are visible to site visitors.
4850
4855
  * @readonly
4851
4856
  */
4852
4857
  publishStatus?: PublishStatus;
@@ -4855,53 +4860,65 @@ interface Content {
4855
4860
  * @readonly
4856
4861
  */
4857
4862
  previewField?: string | null;
4858
- /** @readonly */
4863
+ /**
4864
+ * Date and time the translation content was created.
4865
+ * @readonly
4866
+ */
4859
4867
  _createdDate?: Date;
4860
- /** @readonly */
4868
+ /**
4869
+ * Date and time the translation content was updated.
4870
+ * @readonly
4871
+ */
4861
4872
  _updatedDate?: Date;
4862
4873
  }
4863
4874
  interface ContentField extends ContentFieldValueOneOf {
4864
- /** Field actual localized content as simple text type */
4875
+ /** Translated plain text. Use this field if the corresponding schema `fields.type` is `SHORT_TEXT`, `LONG_TEXT`, `HTML`, or `IMAGE_LINK`. */
4865
4876
  textValue?: string;
4866
- /** Use this field to send rich content. */
4877
+ /** Translated rich content. */
4867
4878
  richContent?: RichContent;
4868
- /** Image media item */
4879
+ /** Wix Media Manager image. */
4869
4880
  image?: string;
4870
- /** Video media item */
4881
+ /** Wix Media Manager video. */
4871
4882
  video?: string;
4872
- /** Document media item */
4883
+ /** Wix Media Manager document. */
4873
4884
  document?: string;
4874
4885
  /**
4875
- * Field unique identifier.
4886
+ * Field unique identifier. Validated according to Regex `^[A-Za-z0-9-_)(]+$`. Field IDs may contain parenthesis to reference repeated items, such as images. These parenthesis can't be nested and each open one must have a closed one. For example, `title()()` is valid, while `title)(` and `title(())` aren't valid. The value inside the parenthesis is validated according to Regex `^[^)(\\]\\[\\.]+$`.
4876
4887
  * @readonly
4877
4888
  */
4878
4889
  _id?: string;
4879
- /** Is content published to live site or not */
4890
+ /** Whether to publish the translation content to the live site, making it visible to site visitors. */
4880
4891
  published?: boolean;
4881
- /** Describes the updater identity (site owner / app / auto translator) */
4892
+ /**
4893
+ * The source that updated the translation content.
4894
+ * Supported values:
4895
+ * + `USER`: The site owner.
4896
+ * + `EXTERNAL_APP`: An external translation app. For example, Smartling.
4897
+ * + `Machine`: Auto translaton service. For example, Google Translate.
4898
+ */
4882
4899
  updatedBy?: UpdaterIdentity;
4883
4900
  /**
4884
- * The corresponding field key in the schema in a clean format (nothing between the parenthesis), must have a matching schema field key.
4901
+ * Unique string identifier that links a specific content field to its corresponding field in the schema.
4885
4902
  * @readonly
4886
4903
  */
4887
4904
  schemaFieldKey?: string;
4888
4905
  /**
4889
- * Index is populated according to index of schema field (if exists), and grouping repeated fields.
4906
+ * Field index. Used for cases where the order of the fields are relevant.
4890
4907
  * @readonly
4891
4908
  */
4892
4909
  index?: number;
4893
4910
  }
4894
4911
  /** @oneof */
4895
4912
  interface ContentFieldValueOneOf {
4896
- /** Field actual localized content as simple text type */
4913
+ /** Translated plain text. Use this field if the corresponding schema `fields.type` is `SHORT_TEXT`, `LONG_TEXT`, `HTML`, or `IMAGE_LINK`. */
4897
4914
  textValue?: string;
4898
- /** Use this field to send rich content. */
4915
+ /** Translated rich content. */
4899
4916
  richContent?: RichContent;
4900
- /** Image media item */
4917
+ /** Wix Media Manager image. */
4901
4918
  image?: string;
4902
- /** Video media item */
4919
+ /** Wix Media Manager video. */
4903
4920
  video?: string;
4904
- /** Document media item */
4921
+ /** Wix Media Manager document. */
4905
4922
  document?: string;
4906
4923
  }
4907
4924
  interface RichContent {
@@ -6162,27 +6179,27 @@ declare enum PublishStatus {
6162
6179
  PUBLISHED = "PUBLISHED"
6163
6180
  }
6164
6181
  interface CreateContentRequest {
6165
- /** Content to be created. */
6182
+ /** Translation content to create. */
6166
6183
  content: Content;
6167
6184
  }
6168
6185
  interface CreateContentResponse {
6169
- /** The created Content. */
6186
+ /** Newly created translation content. */
6170
6187
  content?: Content;
6171
6188
  }
6172
6189
  interface GetContentRequest {
6173
- /** ID of the Content to retrieve. */
6190
+ /** ID of the translation content to retrieve. */
6174
6191
  contentId: string;
6175
6192
  }
6176
6193
  interface GetContentResponse {
6177
- /** The requested Content. */
6194
+ /** The requested translation content. */
6178
6195
  content?: Content;
6179
6196
  }
6180
6197
  interface UpdateContentRequest {
6181
- /** Content to be updated, may be partial. */
6198
+ /** Translation content to update. */
6182
6199
  content: Content;
6183
6200
  }
6184
6201
  interface UpdateContentResponse {
6185
- /** Updated Content. */
6202
+ /** Updated translation content. */
6186
6203
  content?: Content;
6187
6204
  }
6188
6205
  interface UpdateContentByKeyRequest {
@@ -6194,13 +6211,13 @@ interface UpdateContentByKeyResponse {
6194
6211
  content?: Content;
6195
6212
  }
6196
6213
  interface DeleteContentRequest {
6197
- /** Id of the Content to delete. */
6214
+ /** ID of the translation content to delete. */
6198
6215
  contentId: string;
6199
6216
  }
6200
6217
  interface DeleteContentResponse {
6201
6218
  }
6202
6219
  interface QueryContentsRequest {
6203
- /** WQL expression. */
6220
+ /** Query options. */
6204
6221
  query?: CursorQuery$1;
6205
6222
  }
6206
6223
  interface CursorQuery$1 extends CursorQueryPagingMethodOneOf$1 {
@@ -6254,9 +6271,9 @@ interface CursorPaging$1 {
6254
6271
  cursor?: string | null;
6255
6272
  }
6256
6273
  interface QueryContentsResponse {
6257
- /** List of Contents. */
6274
+ /** List of translation content. */
6258
6275
  contents?: Content[];
6259
- /** Paging metadata */
6276
+ /** Details on the paged set of results returned. */
6260
6277
  pagingMetadata?: CursorPagingMetadata$1;
6261
6278
  }
6262
6279
  interface CursorPagingMetadata$1 {
@@ -6318,9 +6335,9 @@ interface Paging {
6318
6335
  offset?: number | null;
6319
6336
  }
6320
6337
  interface QueryContentsLegacyResponse {
6321
- /** List of Contents. */
6338
+ /** List of translation content. */
6322
6339
  contents?: Content[];
6323
- /** Paging metadata */
6340
+ /** Paging metadata. */
6324
6341
  pagingMetadata?: PagingMetadataV2;
6325
6342
  }
6326
6343
  interface PagingMetadataV2 {
@@ -6593,11 +6610,11 @@ declare enum Mode {
6593
6610
  AND = "AND"
6594
6611
  }
6595
6612
  interface SearchContentsResponse {
6596
- /** List of Contents. */
6613
+ /** List of translation content. */
6597
6614
  contents?: Content[];
6598
- /** Paging metadata */
6615
+ /** Details on the paged set of results returned. */
6599
6616
  pagingMetadata?: CursorPagingMetadata$1;
6600
- /** Aggregation data */
6617
+ /** Aggregation data. */
6601
6618
  aggregationData?: AggregationData;
6602
6619
  }
6603
6620
  interface AggregationData {
@@ -6762,15 +6779,15 @@ interface AggregationResultsResultOneOf {
6762
6779
  nested?: NestedResults;
6763
6780
  }
6764
6781
  interface BulkCreateContentRequest {
6765
- /** List of Contents to be created TODO: think again if we want to increase maxSize */
6782
+ /** List of translation content. */
6766
6783
  contents: Content[];
6767
- /** set to `true` if you wish to receive back the created contents in the response */
6784
+ /** Whether to include the created translation content in the response. Set to `true` to receive the translation content in the response. */
6768
6785
  returnEntity?: boolean;
6769
6786
  }
6770
6787
  interface BulkCreateContentResponse {
6771
- /** List of results */
6788
+ /** Items created by bulk action. */
6772
6789
  results?: BulkContentResult[];
6773
- /** metadata */
6790
+ /** Bulk action metadata. */
6774
6791
  bulkActionMetadata?: BulkActionMetadata;
6775
6792
  }
6776
6793
  interface ItemMetadata {
@@ -6792,9 +6809,9 @@ interface ApplicationError {
6792
6809
  data?: Record<string, any> | null;
6793
6810
  }
6794
6811
  interface BulkContentResult {
6795
- /** Defined in wix.commons */
6812
+ /** Item metadata. */
6796
6813
  itemMetadata?: ItemMetadata;
6797
- /** Only exists if `returnEntity` was set to true in the request */
6814
+ /** Translation Content. This field is only returned if the operation was successful and `returnEntity` was set to true in the request. */
6798
6815
  item?: Content;
6799
6816
  }
6800
6817
  interface BulkActionMetadata {
@@ -6808,23 +6825,23 @@ interface BulkActionMetadata {
6808
6825
  interface BulkUpdateContentRequest {
6809
6826
  /** Contents to be updated. TODO: think again if we want to increase maxSize */
6810
6827
  contents: BulkUpdateContentRequestMaskedContent[];
6811
- /** set to `true` if you wish to receive back the created contents in the response */
6828
+ /** Whether to include the updated translation content in the response. Set to `true` to receive the translation content in the response. */
6812
6829
  returnEntity?: boolean;
6813
6830
  }
6814
6831
  interface BulkUpdateContentRequestMaskedContent {
6815
- /** Content to be updated, may be partial */
6832
+ /** Translation content to update. */
6816
6833
  content?: Content;
6817
6834
  }
6818
6835
  interface BulkUpdateContentResponse {
6819
- /** List of results */
6836
+ /** Items created by bulk action. */
6820
6837
  results?: BulkUpdateContentResponseBulkContentResult[];
6821
- /** metadata */
6838
+ /** Bulk action metadata. */
6822
6839
  bulkActionMetadata?: BulkActionMetadata;
6823
6840
  }
6824
6841
  interface BulkUpdateContentResponseBulkContentResult {
6825
- /** metadata */
6842
+ /** Item metadata. */
6826
6843
  itemMetadata?: ItemMetadata;
6827
- /** Only exists if `returnEntity` was set to true in the request */
6844
+ /** Translation Content. This field is only returned if the operation was successful and `returnEntity` was set to true in the request. */
6828
6845
  item?: Content;
6829
6846
  }
6830
6847
  interface BulkUpdateContentByKeyRequest {
@@ -6876,13 +6893,13 @@ interface BulkDeleteContentRequest {
6876
6893
  contentIds: string[];
6877
6894
  }
6878
6895
  interface BulkDeleteContentResponse {
6879
- /** List of results */
6896
+ /** Items created by bulk action. */
6880
6897
  results?: BulkDeleteContentResponseBulkContentResult[];
6881
- /** metadata */
6898
+ /** Bulk action metadata. */
6882
6899
  bulkActionMetadata?: BulkActionMetadata;
6883
6900
  }
6884
6901
  interface BulkDeleteContentResponseBulkContentResult {
6885
- /** metadata */
6902
+ /** Item metadata. */
6886
6903
  itemMetadata?: ItemMetadata;
6887
6904
  }
6888
6905
  interface MetaSiteSpecialEvent$1 extends MetaSiteSpecialEventPayloadOneOf$1 {
@@ -7464,22 +7481,27 @@ interface ContentDeletedEnvelope {
7464
7481
  }
7465
7482
  interface UpdateContent {
7466
7483
  /**
7467
- * Content ID.
7484
+ * Translation content ID.
7468
7485
  * @readonly
7469
7486
  */
7470
7487
  _id?: string | null;
7471
- /** Schema unique identifier */
7488
+ /** Translation schema ID. */
7472
7489
  schemaId?: string;
7473
- /** Unique identifier that represents a specific entity in the app */
7490
+ /** A unique identifier defined by the app developer to differentiate translation content for various entities within the site. For example, if an app developer is creating translation content for blog posts, the `entityId` can be `'blog-posts-1'`. */
7474
7491
  entityId?: string;
7475
- /** Indicates the locale of this content */
7492
+ /** Translation content locale. */
7476
7493
  locale?: string;
7477
- /** List of fields localized in the given language */
7494
+ /** List of fields for the translation content. This property uses a string to map to a `ContentField` (`Map<string, ContentField>`). The string serves as a key, which you'll need to access each field in the content and when referencing a translation schema. */
7478
7495
  fields?: Record<string, ContentField>;
7479
- /** Optional field that will group in the UI contents with the same group name */
7496
+ /** A reference to the parent content defined by the app developer. For example, if the content is a menu item, this property would link to the content with the `entityId` of the menu it belongs to. */
7480
7497
  parentEntityId?: string | null;
7481
7498
  /**
7482
- * The aggregated published status across all content fields
7499
+ * The aggregated published status across all content fields.
7500
+ *
7501
+ * Supported values:
7502
+ * + `UNPUBLISHED`: None of the fields have been published to the live site.
7503
+ * + `PUBLISHED`: All of the fields have been published to the live site and are visible to site visitors.
7504
+ * + `PARTIALLY_PUBLISHED`: Some of the fields have been published to the live site and are visible to site visitors.
7483
7505
  * @readonly
7484
7506
  */
7485
7507
  publishStatus?: PublishStatus;
@@ -7488,9 +7510,15 @@ interface UpdateContent {
7488
7510
  * @readonly
7489
7511
  */
7490
7512
  previewField?: string | null;
7491
- /** @readonly */
7513
+ /**
7514
+ * Date and time the translation content was created.
7515
+ * @readonly
7516
+ */
7492
7517
  _createdDate?: Date;
7493
- /** @readonly */
7518
+ /**
7519
+ * Date and time the translation content was updated.
7520
+ * @readonly
7521
+ */
7494
7522
  _updatedDate?: Date;
7495
7523
  }
7496
7524
  interface QueryContentsOptions {
@@ -7557,11 +7585,11 @@ interface SearchContentsOptions {
7557
7585
  search?: CursorSearch;
7558
7586
  }
7559
7587
  interface BulkCreateContentOptions {
7560
- /** set to `true` if you wish to receive back the created contents in the response */
7588
+ /** Whether to include the created translation content in the response. Set to `true` to receive the translation content in the response. */
7561
7589
  returnEntity?: boolean;
7562
7590
  }
7563
7591
  interface BulkUpdateContentOptions {
7564
- /** set to `true` if you wish to receive back the created contents in the response */
7592
+ /** Whether to include the updated translation content in the response. Set to `true` to receive the translation content in the response. */
7565
7593
  returnEntity?: boolean;
7566
7594
  }
7567
7595
  interface BulkUpdateContentByKeyOptions {
@@ -7572,36 +7600,52 @@ interface BulkUpdateContentByKeyOptions {
7572
7600
  declare function createContent$1(httpClient: HttpClient): CreateContentSignature;
7573
7601
  interface CreateContentSignature {
7574
7602
  /**
7575
- * Creates a Content.
7603
+ * Creates a translation content item.
7576
7604
  *
7577
- * The request body must include schema-id, entity-id and locale.
7578
- * @param - Content to be created.
7579
- * @returns The created Content.
7605
+ * The content is validated based on the constraints defined in the corresponding schema.
7606
+ * @param - Translation content to create.
7607
+ * @returns Newly created translation content.
7580
7608
  */
7581
7609
  (content: Content): Promise<Content & ContentNonNullableFields>;
7582
7610
  }
7583
7611
  declare function getContent$1(httpClient: HttpClient): GetContentSignature;
7584
7612
  interface GetContentSignature {
7585
7613
  /**
7586
- * Retrieves a Content.
7587
- * @param - ID of the Content to retrieve.
7588
- * @returns The requested Content.
7614
+ * Retrieves a translation content item.
7615
+ * @param - ID of the translation content to retrieve.
7616
+ * @returns The requested translation content.
7589
7617
  */
7590
7618
  (contentId: string): Promise<Content & ContentNonNullableFields>;
7591
7619
  }
7592
7620
  declare function updateContent$1(httpClient: HttpClient): UpdateContentSignature;
7593
7621
  interface UpdateContentSignature {
7594
7622
  /**
7595
- * Updates a Content.
7596
- * @param - Content ID.
7597
- * @returns Updated Content.
7623
+ * Updates a translation content item.
7624
+ *
7625
+ * To remove a field, pass the field key with an empty object as the value. For example:
7626
+ *
7627
+ * ```json
7628
+ * "fields": {
7629
+ * "title": {}
7630
+ * }
7631
+ * ```
7632
+ * @param - Translation content ID.
7633
+ * @returns Updated translation content.
7598
7634
  */
7599
7635
  (_id: string | null, content: UpdateContent): Promise<Content & ContentNonNullableFields>;
7600
7636
  }
7601
7637
  declare function updateContentByKey$1(httpClient: HttpClient): UpdateContentByKeySignature;
7602
7638
  interface UpdateContentByKeySignature {
7603
7639
  /**
7604
- * Updates a Content. A content is identified by a unique key, a combination of (schemaId, entityId, locale)
7640
+ * Updates a translation content item by key.
7641
+ *
7642
+ * To remove a field, pass the field key with an empty object as the value. For example:
7643
+ *
7644
+ * ```js
7645
+ * "fields": {
7646
+ * "title": {}
7647
+ * }
7648
+ * ```
7605
7649
  * @param - Content to be updated, may be partial.
7606
7650
  */
7607
7651
  (content: Content): Promise<UpdateContentByKeyResponse & UpdateContentByKeyResponseNonNullableFields>;
@@ -7609,37 +7653,53 @@ interface UpdateContentByKeySignature {
7609
7653
  declare function deleteContent$1(httpClient: HttpClient): DeleteContentSignature;
7610
7654
  interface DeleteContentSignature {
7611
7655
  /**
7612
- * Deletes a Content.
7613
- * @param - Id of the Content to delete.
7656
+ * Deletes a translation content item.
7657
+ * @param - ID of the translation content to delete.
7614
7658
  */
7615
7659
  (contentId: string): Promise<void>;
7616
7660
  }
7617
7661
  declare function queryContents$1(httpClient: HttpClient): QueryContentsSignature;
7618
7662
  interface QueryContentsSignature {
7619
7663
  /**
7620
- * Retrieves a list of Contents, given the provided [paging, filtering, and sorting][1].
7664
+ * Retrieves a list of translation content given the provided paging, filtering, and sorting. Up to 100 translation content items can be returned per request.
7665
+ *
7666
+ * The default `sort` is `id` in `ASC`.
7667
+ *
7668
+ * For field support for filters and sorting, see [Translation Content: Supported Filters, Sorting, and Search](https://dev.wix.com/docs/rest/business-management/multilingual/translation/translation-content/translation-content-supported-filters-sorting-and-search).
7669
+ *
7670
+ * To learn how to query translation consent items, see [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language).
7621
7671
  */
7622
7672
  (options?: QueryContentsOptions | undefined): ContentsQueryBuilder;
7623
7673
  }
7624
7674
  declare function searchContents$1(httpClient: HttpClient): SearchContentsSignature;
7625
7675
  interface SearchContentsSignature {
7626
7676
  /**
7627
- * Retrieves a list of Contents, given the provided CursorSearch.
7677
+ * Retrieves a list of all translation content associated with a site that matches the search query, with optional data aggregation.
7678
+ *
7679
+ * Note that this method retrieves translation content created by you or others.
7680
+ *
7681
+ * Use this method to search translation content fields on a site for a given expression, and/or to perform data aggregations on a site's translation content fields.
7682
+ *
7683
+ * For field support for filters, sorting, and free-text searching see [Translation Content: Supported Filters, Sorting, and Search](https://dev.wix.com/docs/rest/business-management/multilingual/translation/translation-content/translation-content-supported-filters-sorting-and-search).
7684
+ *
7685
+ * To learn more about working with the search query, see [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language) and [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging).
7628
7686
  */
7629
7687
  (options?: SearchContentsOptions | undefined): Promise<SearchContentsResponse & SearchContentsResponseNonNullableFields>;
7630
7688
  }
7631
7689
  declare function bulkCreateContent$1(httpClient: HttpClient): BulkCreateContentSignature;
7632
7690
  interface BulkCreateContentSignature {
7633
7691
  /**
7634
- * create multiple Contents in a single request. Works synchronously.
7635
- * @param - List of Contents to be created TODO: think again if we want to increase maxSize
7692
+ * Creates multiple translation content items.
7693
+ *
7694
+ * The content items are validated based on the constraints defined in the corresponding schema.
7695
+ * @param - List of translation content.
7636
7696
  */
7637
7697
  (contents: Content[], options?: BulkCreateContentOptions | undefined): Promise<BulkCreateContentResponse & BulkCreateContentResponseNonNullableFields>;
7638
7698
  }
7639
7699
  declare function bulkUpdateContent$1(httpClient: HttpClient): BulkUpdateContentSignature;
7640
7700
  interface BulkUpdateContentSignature {
7641
7701
  /**
7642
- * update multiple Contents in a single request. Works synchronously.
7702
+ * Updates multiple translation content items.
7643
7703
  * @param - Contents to be updated. TODO: think again if we want to increase maxSize
7644
7704
  */
7645
7705
  (contents: BulkUpdateContentRequestMaskedContent[], options?: BulkUpdateContentOptions | undefined): Promise<BulkUpdateContentResponse & BulkUpdateContentResponseNonNullableFields>;
@@ -7655,7 +7715,7 @@ interface BulkUpdateContentByKeySignature {
7655
7715
  declare function bulkDeleteContent$1(httpClient: HttpClient): BulkDeleteContentSignature;
7656
7716
  interface BulkDeleteContentSignature {
7657
7717
  /**
7658
- * deletes multiple Contents in a single request. Works synchronously.
7718
+ * Deletes multiple translation content items.
7659
7719
  * @param - Content ids to be deleted. TODO: think again if we want to increase maxSize
7660
7720
  */
7661
7721
  (contentIds: string[]): Promise<BulkDeleteContentResponse & BulkDeleteContentResponseNonNullableFields>;
@@ -7986,29 +8046,35 @@ declare namespace index_d$1 {
7986
8046
 
7987
8047
  interface Schema {
7988
8048
  /**
7989
- * Schema ID.
8049
+ * Translation schema ID.
7990
8050
  * @readonly
7991
8051
  */
7992
8052
  _id?: string | null;
7993
- /** (compound key) Schema key. */
8053
+ /** Translation schema unique key identifier. */
7994
8054
  key?: SchemaKey;
7995
- /** A list of unique fields on the entity in the specific language */
8055
+ /** List of fields for the translation schema. This property uses a string to map to a `SchemaField` (`Map<string, SchemaField>`). The string serves as a key, which you'll need to access each field in the schema and when adding translation content. */
7996
8056
  fields?: Record<string, SchemaField>;
7997
- /** Fields that will be displayed in content previews (e.g., product name for products). */
8057
+ /** Fields displayed in content previews. For example, a product name for a product translation schema. */
7998
8058
  previewFields?: PreviewFields;
7999
- /** Whether the schema is hidden from the site. */
8059
+ /** Whether the translation schema is hidden from the site. */
8000
8060
  hidden?: boolean | null;
8001
- /** The name of the schema */
8061
+ /** Translation schema name. */
8002
8062
  displayName?: string | null;
8003
- /** Higher level schema, group_by_name will point to an entity of this schema. */
8063
+ /** A reference to the parent schema defined by the app developer. For example, if the schema is for a menu item, this property would link to the schema of the menu it belongs to. */
8004
8064
  parentId?: string | null;
8005
8065
  /** @readonly */
8006
8066
  revision?: string | null;
8007
- /** @readonly */
8067
+ /**
8068
+ * Date and time the translation schema was created.
8069
+ * @readonly
8070
+ */
8008
8071
  _createdDate?: Date;
8009
- /** @readonly */
8072
+ /**
8073
+ * Date and time the translation schema was updated.
8074
+ * @readonly
8075
+ */
8010
8076
  _updatedDate?: Date;
8011
- /** indicate if the content should be duplicated when the site is cloned */
8077
+ /** Whether to duplicate the translated content in the schema when a site containing the translation schema and content is duplicated. */
8012
8078
  duplicateContent?: boolean | null;
8013
8079
  }
8014
8080
  interface SchemaKey {
@@ -8017,9 +8083,14 @@ interface SchemaKey {
8017
8083
  * @readonly
8018
8084
  */
8019
8085
  appId?: string;
8020
- /** Unique name defined by the creator app, used to distinguish between different entities in the the app domain. */
8086
+ /** A unique name defined by the app developer to differentiate translation schemas for various entities within their app. For example, if an app developer is creating a translation schema for blog posts, the `entityType` can be `'blog-posts'`. */
8021
8087
  entityType?: string;
8022
- /** Scope schema is defined in (Global/Site) */
8088
+ /**
8089
+ * Scope of the translation schema.
8090
+ * Supported values:
8091
+ * + `GLOBAL`: A global schema for all sites.
8092
+ * + `SITE`: A custom schema for a specific site.
8093
+ */
8023
8094
  scope?: SchemaScope;
8024
8095
  }
8025
8096
  declare enum SchemaScope {
@@ -8031,27 +8102,38 @@ declare enum SchemaScope {
8031
8102
  }
8032
8103
  interface SchemaField {
8033
8104
  /**
8034
- * Field ID.
8105
+ * Field ID. Validated according to Regex `^[A-Za-z0-9-_)(]+$`. Field IDs may contain parenthesis to reference repeated items, such as images. These parenthesis can't be nested and each open one must have a closed one. For example, `title()()` is valid, while `title)(` and `title(())` aren't valid. The value inside the parenthesis is validated according to Regex `^[^)(\\]\\[\\.]+$`.
8035
8106
  * @readonly
8036
8107
  */
8037
8108
  _id?: string;
8038
- /** Field type. */
8109
+ /**
8110
+ * Field type.
8111
+ * Supported values:
8112
+ * + `SHORT_TEXT`: Short plain text.
8113
+ * + `LONG_TEXT`: Long plain text.
8114
+ * + `HTML`: Long text including styles, images, and links.
8115
+ * + `RICH_CONTENT`: Rich-Content using the [Wix Ricos.js](https://dev.wix.com/docs/go-headless/tutorials-templates/other-tutorials/working-with-rich-content) format.
8116
+ * + `IMAGE`: Wix Media Manager image.
8117
+ * + `IMAGE_LINK`: Image URL without metadata.
8118
+ * + `VIDEO`: Wix Media Manager video.
8119
+ * + `DOCUMENT`: Wix Media Manager document.
8120
+ */
8039
8121
  type?: FieldType;
8040
- /** Field descriptive name. */
8122
+ /** Field name. */
8041
8123
  displayName?: string | null;
8042
- /** Field semantic grouping */
8124
+ /** Field group name. */
8043
8125
  groupName?: string | null;
8044
- /** Field minimum length (in case of text field) */
8126
+ /** Field minimum text length. */
8045
8127
  minLength?: number | null;
8046
- /** Field maximum length (in case text field) */
8128
+ /** Field maximum text length. */
8047
8129
  maxLength?: number | null;
8048
- /** Field format. If set - must be one of the values of wix.api.format as string (case insensitive) */
8130
+ /** Field format. The content will be validated based on the format set here in the field schema. For example, if the format is `EMAIL`, then the content for this field must be a valid email address. */
8049
8131
  format?: string | null;
8050
- /** Whether the field is hidden from the site. Hidden field constraints (type, min/max length) are still active! */
8132
+ /** Whether the field is hidden from the site. Hidden fields are still validated. */
8051
8133
  hidden?: boolean;
8052
- /** Whether the field is for display only and should not allowed to be translated */
8134
+ /** Whether the field is read-only, and is not meant to be translated. For example, an image. Use this field as a way to provide more context for the field in the Multilingual Dashboard. */
8053
8135
  displayOnly?: boolean;
8054
- /** In cases where the order of the fields holds meaning, use this index */
8136
+ /** Field index. Use for cases where the order of the fields are relevant. */
8055
8137
  index?: number | null;
8056
8138
  }
8057
8139
  declare enum FieldType {
@@ -8083,31 +8165,31 @@ interface PreviewFields {
8083
8165
  imageFieldId?: string | null;
8084
8166
  }
8085
8167
  interface CreateSchemaRequest {
8086
- /** Schema to be created. */
8168
+ /** Translation schema to create. */
8087
8169
  schema?: Schema;
8088
8170
  }
8089
8171
  interface CreateSchemaResponse {
8090
- /** The created Schema. */
8172
+ /** Newly created translation schema. */
8091
8173
  schema?: Schema;
8092
8174
  }
8093
8175
  interface GetSchemaRequest {
8094
- /** ID of the Schema to retrieve. */
8176
+ /** ID of the translation schema to retrieve. */
8095
8177
  schemaId: string;
8096
8178
  }
8097
8179
  interface GetSchemaResponse {
8098
- /** The requested Schema. */
8180
+ /** The requested translation schema. */
8099
8181
  schema?: Schema;
8100
8182
  }
8101
8183
  interface GetSchemaByKeyRequest {
8102
- /** ID of the Schema to retrieve. */
8184
+ /** ID of the translation schema to retrieve. */
8103
8185
  key: SchemaKey;
8104
8186
  }
8105
8187
  interface GetSchemaByKeyResponse {
8106
- /** The requested Schema. */
8188
+ /** The requested translation schema. */
8107
8189
  schema?: Schema;
8108
8190
  }
8109
8191
  interface UpdateSchemaRequest {
8110
- /** Schema to be updated, may be partial. */
8192
+ /** Translation schema to update. */
8111
8193
  schema?: Schema;
8112
8194
  }
8113
8195
  interface UpdateSchemaResponse {
@@ -8115,36 +8197,42 @@ interface UpdateSchemaResponse {
8115
8197
  schema?: Schema;
8116
8198
  }
8117
8199
  interface DeleteSchemaRequest {
8118
- /** Id of the Schema to delete. */
8200
+ /** ID of the translation schema to delete. */
8119
8201
  schemaId?: string;
8120
8202
  }
8121
8203
  interface DeleteSchemaResponse {
8122
8204
  }
8123
8205
  interface QuerySchemasRequest {
8124
- /** WQL expression. */
8206
+ /** Query options. */
8125
8207
  query?: CursorQuery;
8126
8208
  }
8127
8209
  interface CursorQuery extends CursorQueryPagingMethodOneOf {
8128
- /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
8210
+ /**
8211
+ * Cursor paging options.
8212
+ *
8213
+ * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
8214
+ */
8129
8215
  cursorPaging?: CursorPaging;
8130
8216
  /**
8131
- * Filter object in the following format:
8132
- * `"filter" : {
8133
- * "fieldName1": "value1",
8134
- * "fieldName2":{"$operator":"value2"}
8135
- * }`
8136
- * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
8217
+ * Filter object.
8218
+ *
8219
+ * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
8137
8220
  */
8138
8221
  filter?: Record<string, any> | null;
8139
8222
  /**
8140
- * Sort object in the following format:
8141
- * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
8223
+ * Sort object.
8224
+ *
8225
+ * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
8142
8226
  */
8143
8227
  sort?: Sorting[];
8144
8228
  }
8145
8229
  /** @oneof */
8146
8230
  interface CursorQueryPagingMethodOneOf {
8147
- /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
8231
+ /**
8232
+ * Cursor paging options.
8233
+ *
8234
+ * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
8235
+ */
8148
8236
  cursorPaging?: CursorPaging;
8149
8237
  }
8150
8238
  interface Sorting {
@@ -8169,13 +8257,13 @@ interface CursorPaging {
8169
8257
  cursor?: string | null;
8170
8258
  }
8171
8259
  interface QuerySchemasResponse {
8172
- /** List of Schemas. */
8260
+ /** List of translation schemas. */
8173
8261
  schemas?: Schema[];
8174
- /** Paging metadata */
8262
+ /** Paging metadata for the next page of results. */
8175
8263
  pagingMetadata?: CursorPagingMetadata;
8176
8264
  }
8177
8265
  interface CursorPagingMetadata {
8178
- /** Number of items returned in the response. */
8266
+ /** Number of items returned in current page. */
8179
8267
  count?: number | null;
8180
8268
  /** Cursor strings that point to the next page, previous page, or both. */
8181
8269
  cursors?: Cursors;
@@ -8198,9 +8286,9 @@ interface ListSiteSchemasRequest {
8198
8286
  paging?: CursorPaging;
8199
8287
  }
8200
8288
  interface ListSiteSchemasResponse {
8201
- /** List of Schemas. */
8289
+ /** List of translation schemas. */
8202
8290
  schemas?: Schema[];
8203
- /** Paging metadata */
8291
+ /** Paging metadata for the next page of results. */
8204
8292
  pagingMetadata?: CursorPagingMetadata;
8205
8293
  }
8206
8294
  interface MetaSiteSpecialEvent extends MetaSiteSpecialEventPayloadOneOf {
@@ -8671,9 +8759,14 @@ interface GetSchemaByKeyIdentifiers {
8671
8759
  * @readonly
8672
8760
  */
8673
8761
  keyAppId?: string;
8674
- /** Unique name defined by the creator app, used to distinguish between different entities in the the app domain. */
8762
+ /** A unique name defined by the app developer to differentiate translation schemas for various entities within their app. For example, if an app developer is creating a translation schema for blog posts, the `entityType` can be `'blog-posts'`. */
8675
8763
  keyEntityType?: string;
8676
- /** Scope schema is defined in (Global/Site) */
8764
+ /**
8765
+ * Scope of the translation schema.
8766
+ * Supported values:
8767
+ * + `GLOBAL`: A global schema for all sites.
8768
+ * + `SITE`: A custom schema for a specific site.
8769
+ */
8677
8770
  keyScope?: SchemaScope;
8678
8771
  }
8679
8772
  interface QuerySchemasOptions {
@@ -8743,30 +8836,39 @@ interface ListSiteSchemasOptions {
8743
8836
  declare function getSchema$1(httpClient: HttpClient): GetSchemaSignature;
8744
8837
  interface GetSchemaSignature {
8745
8838
  /**
8746
- * Retrieves a Schema.
8747
- * @param - ID of the Schema to retrieve.
8748
- * @returns The requested Schema.
8839
+ * Retrieves a translation schema.
8840
+ * @param - ID of the translation schema to retrieve.
8841
+ * @returns The requested translation schema.
8749
8842
  */
8750
8843
  (schemaId: string): Promise<Schema & SchemaNonNullableFields>;
8751
8844
  }
8752
8845
  declare function getSchemaByKey$1(httpClient: HttpClient): GetSchemaByKeySignature;
8753
8846
  interface GetSchemaByKeySignature {
8754
8847
  /**
8755
- * Retrieves a Schema by key.
8848
+ * Retrieves a translation schema by key.
8756
8849
  */
8757
8850
  (identifiers: GetSchemaByKeyIdentifiers, key: GetSchemaByKey): Promise<GetSchemaByKeyResponse & GetSchemaByKeyResponseNonNullableFields>;
8758
8851
  }
8759
8852
  declare function querySchemas$1(httpClient: HttpClient): QuerySchemasSignature;
8760
8853
  interface QuerySchemasSignature {
8761
8854
  /**
8762
- * Retrieves a list of Schemas, given the provided [paging, filtering, and sorting][1].
8855
+ * Retrieves a list of schemas, given the provided paging, filtering, and sorting. Up to 100 schemas can be returned per request.
8856
+ *
8857
+ * > **Note:**
8858
+ * >
8859
+ * > This method can retrieve all schemas with a `GLOBAL` scope and `SITE` scope schemas for the site you are authorized for in the current API request.
8860
+ *
8861
+ * The default `sort` is `id` in `ASC`.
8862
+ *
8863
+ * For a detailed list of supported operations, see [Translation Schema: Supported Filters and Sorting](https://dev.wix.com/docs/rest/business-management/multilingual/translation/translation-schema/translation-schema/sort-and-filter).
8864
+ * To learn how to query translation schemas, see [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language).
8763
8865
  */
8764
8866
  (options?: QuerySchemasOptions | undefined): SchemasQueryBuilder;
8765
8867
  }
8766
8868
  declare function listSiteSchemas$1(httpClient: HttpClient): ListSiteSchemasSignature;
8767
8869
  interface ListSiteSchemasSignature {
8768
8870
  /**
8769
- * Retrieves a list of Schemas of app installed on site.
8871
+ * Retrieves a list of all translation schemas associated with a site, including those created by you or other developers.
8770
8872
  */
8771
8873
  (options?: ListSiteSchemasOptions | undefined): Promise<ListSiteSchemasResponse & ListSiteSchemasResponseNonNullableFields>;
8772
8874
  }