@wix/multilingual 1.0.37 → 1.0.39

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.
@@ -525,26 +525,27 @@ declare namespace index_d$5 {
525
525
  /** Represents a content of an entity with its published translations */
526
526
  interface PublishedContent {
527
527
  /**
528
- * Content ID.
528
+ * Pubished content ID.
529
529
  * @readonly
530
530
  */
531
531
  _id?: string | null;
532
- /** Schema key of the content. */
532
+ /** Schema key of the published content. */
533
533
  schemaKey?: SchemaKey$1;
534
534
  /**
535
- * Unique identifier that represents a specific entity under the schema key
535
+ * 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'`.
536
536
  * @readonly
537
537
  */
538
538
  entityId?: string;
539
539
  /**
540
- * Indicates the locale of this content
540
+ * Published content locale.
541
541
  * @readonly
542
542
  */
543
543
  locale?: string;
544
- /** List of fields localized in the given locale */
544
+ /** List of fields that have been translated and published for the given locale. */
545
545
  fields?: PublishedContentField[];
546
- /** Optional field for the ID of the parent of this entity. */
546
+ /** 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 of the menu it belongs to. */
547
547
  parentEntityId?: string | null;
548
+ /** Custom field data for the published content object. */
548
549
  extendedFields?: ExtendedFields;
549
550
  }
550
551
  interface SchemaKey$1 {
@@ -553,9 +554,14 @@ interface SchemaKey$1 {
553
554
  * @readonly
554
555
  */
555
556
  appId?: string;
556
- /** Unique name defined by the creator app, used to distinguish between different entities in the the app domain. */
557
+ /** 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'`. */
557
558
  entityType?: string;
558
- /** Scope schema is defined in (Global/Site) */
559
+ /**
560
+ * Scope of the translation schema.
561
+ * Supported values:
562
+ * + `GLOBAL`: A global schema for all sites.
563
+ * + `SITE`: A custom schema for a specific site.
564
+ */
559
565
  scope?: SchemaScope$1;
560
566
  }
561
567
  declare enum SchemaScope$1 {
@@ -577,11 +583,11 @@ interface PublishedContentField extends PublishedContentFieldValueOneOf {
577
583
  /** Document media item */
578
584
  document?: string;
579
585
  /**
580
- * The corresponding field key in the schema in a clean format (nothing between the parenthesis)
586
+ * Unique string identifier that links a specific content field to its corresponding field in the schema.
581
587
  * @readonly
582
588
  */
583
589
  schemaFieldKey?: string;
584
- /** In case of a repeated field, this will hold the IDs of the messages drilling down to this field. */
590
+ /** For repeated fields. Contains the IDs of the messages linked to this field. */
585
591
  sequenceIds?: string[];
586
592
  }
587
593
  /** @oneof */
@@ -1856,7 +1862,7 @@ interface GetPublishedContentResponse {
1856
1862
  publishedContent?: PublishedContent;
1857
1863
  }
1858
1864
  interface QueryPublishedContentRequest {
1859
- /** The query to filter the published content */
1865
+ /** Query options. Note that some query filters are required. See the API description for a list of required filters. */
1860
1866
  query: CursorQuery$2;
1861
1867
  }
1862
1868
  interface CursorQuery$2 extends CursorQueryPagingMethodOneOf$2 {
@@ -1910,9 +1916,9 @@ interface CursorPaging$2 {
1910
1916
  cursor?: string | null;
1911
1917
  }
1912
1918
  interface QueryPublishedContentResponse {
1913
- /** The published content */
1919
+ /** The published translation content. */
1914
1920
  publishedContent?: PublishedContent[];
1915
- /** Paging information */
1921
+ /** Details on the paged set of results returned. */
1916
1922
  pagingMetadata?: CursorPagingMetadata$2;
1917
1923
  }
1918
1924
  interface CursorPagingMetadata$2 {
@@ -7980,29 +7986,35 @@ declare namespace index_d$1 {
7980
7986
 
7981
7987
  interface Schema {
7982
7988
  /**
7983
- * Schema ID.
7989
+ * Translation schema ID.
7984
7990
  * @readonly
7985
7991
  */
7986
7992
  _id?: string | null;
7987
- /** (compound key) Schema key. */
7993
+ /** Translation schema unique key identifier. */
7988
7994
  key?: SchemaKey;
7989
- /** A list of unique fields on the entity in the specific language */
7995
+ /** 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. */
7990
7996
  fields?: Record<string, SchemaField>;
7991
- /** Fields that will be displayed in content previews (e.g., product name for products). */
7997
+ /** Fields displayed in content previews. For example, a product name for a product translation schema. */
7992
7998
  previewFields?: PreviewFields;
7993
- /** Whether the schema is hidden from the site. */
7999
+ /** Whether the translation schema is hidden from the site. */
7994
8000
  hidden?: boolean | null;
7995
- /** The name of the schema */
8001
+ /** Translation schema name. */
7996
8002
  displayName?: string | null;
7997
- /** Higher level schema, group_by_name will point to an entity of this schema. */
8003
+ /** 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. */
7998
8004
  parentId?: string | null;
7999
8005
  /** @readonly */
8000
8006
  revision?: string | null;
8001
- /** @readonly */
8007
+ /**
8008
+ * Date and time the translation schema was created.
8009
+ * @readonly
8010
+ */
8002
8011
  _createdDate?: Date;
8003
- /** @readonly */
8012
+ /**
8013
+ * Date and time the translation schema was updated.
8014
+ * @readonly
8015
+ */
8004
8016
  _updatedDate?: Date;
8005
- /** indicate if the content should be duplicated when the site is cloned */
8017
+ /** Whether to duplicate the translated content in the schema when a site containing the translation schema and content is duplicated. */
8006
8018
  duplicateContent?: boolean | null;
8007
8019
  }
8008
8020
  interface SchemaKey {
@@ -8011,9 +8023,14 @@ interface SchemaKey {
8011
8023
  * @readonly
8012
8024
  */
8013
8025
  appId?: string;
8014
- /** Unique name defined by the creator app, used to distinguish between different entities in the the app domain. */
8026
+ /** 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'`. */
8015
8027
  entityType?: string;
8016
- /** Scope schema is defined in (Global/Site) */
8028
+ /**
8029
+ * Scope of the translation schema.
8030
+ * Supported values:
8031
+ * + `GLOBAL`: A global schema for all sites.
8032
+ * + `SITE`: A custom schema for a specific site.
8033
+ */
8017
8034
  scope?: SchemaScope;
8018
8035
  }
8019
8036
  declare enum SchemaScope {
@@ -8025,27 +8042,38 @@ declare enum SchemaScope {
8025
8042
  }
8026
8043
  interface SchemaField {
8027
8044
  /**
8028
- * Field ID.
8045
+ * 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 `^[^)(\\]\\[\\.]+$`.
8029
8046
  * @readonly
8030
8047
  */
8031
8048
  _id?: string;
8032
- /** Field type. */
8049
+ /**
8050
+ * Field type.
8051
+ * Supported values:
8052
+ * + `SHORT_TEXT`: Short plain text.
8053
+ * + `LONG_TEXT`: Long plain text.
8054
+ * + `HTML`: Long text including styles, images, and links.
8055
+ * + `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.
8056
+ * + `IMAGE`: Wix Media Manager image.
8057
+ * + `IMAGE_LINK`: Image URL without metadata.
8058
+ * + `VIDEO`: Wix Media Manager video.
8059
+ * + `DOCUMENT`: Wix Media Manager document.
8060
+ */
8033
8061
  type?: FieldType;
8034
- /** Field descriptive name. */
8062
+ /** Field name. */
8035
8063
  displayName?: string | null;
8036
- /** Field semantic grouping */
8064
+ /** Field group name. */
8037
8065
  groupName?: string | null;
8038
- /** Field minimum length (in case of text field) */
8066
+ /** Field minimum text length. */
8039
8067
  minLength?: number | null;
8040
- /** Field maximum length (in case text field) */
8068
+ /** Field maximum text length. */
8041
8069
  maxLength?: number | null;
8042
- /** Field format. If set - must be one of the values of wix.api.format as string (case insensitive) */
8070
+ /** 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. */
8043
8071
  format?: string | null;
8044
- /** Whether the field is hidden from the site. Hidden field constraints (type, min/max length) are still active! */
8072
+ /** Whether the field is hidden from the site. Hidden fields are still validated. */
8045
8073
  hidden?: boolean;
8046
- /** Whether the field is for display only and should not allowed to be translated */
8074
+ /** 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. */
8047
8075
  displayOnly?: boolean;
8048
- /** In cases where the order of the fields holds meaning, use this index */
8076
+ /** Field index. Use for cases where the order of the fields are relevant. */
8049
8077
  index?: number | null;
8050
8078
  }
8051
8079
  declare enum FieldType {
@@ -8077,31 +8105,31 @@ interface PreviewFields {
8077
8105
  imageFieldId?: string | null;
8078
8106
  }
8079
8107
  interface CreateSchemaRequest {
8080
- /** Schema to be created. */
8108
+ /** Translation schema to create. */
8081
8109
  schema?: Schema;
8082
8110
  }
8083
8111
  interface CreateSchemaResponse {
8084
- /** The created Schema. */
8112
+ /** Newly created translation schema. */
8085
8113
  schema?: Schema;
8086
8114
  }
8087
8115
  interface GetSchemaRequest {
8088
- /** ID of the Schema to retrieve. */
8116
+ /** ID of the translation schema to retrieve. */
8089
8117
  schemaId: string;
8090
8118
  }
8091
8119
  interface GetSchemaResponse {
8092
- /** The requested Schema. */
8120
+ /** The requested translation schema. */
8093
8121
  schema?: Schema;
8094
8122
  }
8095
8123
  interface GetSchemaByKeyRequest {
8096
- /** ID of the Schema to retrieve. */
8124
+ /** ID of the translation schema to retrieve. */
8097
8125
  key: SchemaKey;
8098
8126
  }
8099
8127
  interface GetSchemaByKeyResponse {
8100
- /** The requested Schema. */
8128
+ /** The requested translation schema. */
8101
8129
  schema?: Schema;
8102
8130
  }
8103
8131
  interface UpdateSchemaRequest {
8104
- /** Schema to be updated, may be partial. */
8132
+ /** Translation schema to update. */
8105
8133
  schema?: Schema;
8106
8134
  }
8107
8135
  interface UpdateSchemaResponse {
@@ -8109,36 +8137,42 @@ interface UpdateSchemaResponse {
8109
8137
  schema?: Schema;
8110
8138
  }
8111
8139
  interface DeleteSchemaRequest {
8112
- /** Id of the Schema to delete. */
8140
+ /** ID of the translation schema to delete. */
8113
8141
  schemaId?: string;
8114
8142
  }
8115
8143
  interface DeleteSchemaResponse {
8116
8144
  }
8117
8145
  interface QuerySchemasRequest {
8118
- /** WQL expression. */
8146
+ /** Query options. */
8119
8147
  query?: CursorQuery;
8120
8148
  }
8121
8149
  interface CursorQuery extends CursorQueryPagingMethodOneOf {
8122
- /** 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`. */
8150
+ /**
8151
+ * Cursor paging options.
8152
+ *
8153
+ * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
8154
+ */
8123
8155
  cursorPaging?: CursorPaging;
8124
8156
  /**
8125
- * Filter object in the following format:
8126
- * `"filter" : {
8127
- * "fieldName1": "value1",
8128
- * "fieldName2":{"$operator":"value2"}
8129
- * }`
8130
- * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
8157
+ * Filter object.
8158
+ *
8159
+ * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
8131
8160
  */
8132
8161
  filter?: Record<string, any> | null;
8133
8162
  /**
8134
- * Sort object in the following format:
8135
- * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
8163
+ * Sort object.
8164
+ *
8165
+ * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
8136
8166
  */
8137
8167
  sort?: Sorting[];
8138
8168
  }
8139
8169
  /** @oneof */
8140
8170
  interface CursorQueryPagingMethodOneOf {
8141
- /** 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`. */
8171
+ /**
8172
+ * Cursor paging options.
8173
+ *
8174
+ * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
8175
+ */
8142
8176
  cursorPaging?: CursorPaging;
8143
8177
  }
8144
8178
  interface Sorting {
@@ -8163,13 +8197,13 @@ interface CursorPaging {
8163
8197
  cursor?: string | null;
8164
8198
  }
8165
8199
  interface QuerySchemasResponse {
8166
- /** List of Schemas. */
8200
+ /** List of translation schemas. */
8167
8201
  schemas?: Schema[];
8168
- /** Paging metadata */
8202
+ /** Paging metadata for the next page of results. */
8169
8203
  pagingMetadata?: CursorPagingMetadata;
8170
8204
  }
8171
8205
  interface CursorPagingMetadata {
8172
- /** Number of items returned in the response. */
8206
+ /** Number of items returned in current page. */
8173
8207
  count?: number | null;
8174
8208
  /** Cursor strings that point to the next page, previous page, or both. */
8175
8209
  cursors?: Cursors;
@@ -8192,9 +8226,9 @@ interface ListSiteSchemasRequest {
8192
8226
  paging?: CursorPaging;
8193
8227
  }
8194
8228
  interface ListSiteSchemasResponse {
8195
- /** List of Schemas. */
8229
+ /** List of translation schemas. */
8196
8230
  schemas?: Schema[];
8197
- /** Paging metadata */
8231
+ /** Paging metadata for the next page of results. */
8198
8232
  pagingMetadata?: CursorPagingMetadata;
8199
8233
  }
8200
8234
  interface MetaSiteSpecialEvent extends MetaSiteSpecialEventPayloadOneOf {
@@ -8665,9 +8699,14 @@ interface GetSchemaByKeyIdentifiers {
8665
8699
  * @readonly
8666
8700
  */
8667
8701
  keyAppId?: string;
8668
- /** Unique name defined by the creator app, used to distinguish between different entities in the the app domain. */
8702
+ /** 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'`. */
8669
8703
  keyEntityType?: string;
8670
- /** Scope schema is defined in (Global/Site) */
8704
+ /**
8705
+ * Scope of the translation schema.
8706
+ * Supported values:
8707
+ * + `GLOBAL`: A global schema for all sites.
8708
+ * + `SITE`: A custom schema for a specific site.
8709
+ */
8671
8710
  keyScope?: SchemaScope;
8672
8711
  }
8673
8712
  interface QuerySchemasOptions {
@@ -8737,30 +8776,39 @@ interface ListSiteSchemasOptions {
8737
8776
  declare function getSchema$1(httpClient: HttpClient): GetSchemaSignature;
8738
8777
  interface GetSchemaSignature {
8739
8778
  /**
8740
- * Retrieves a Schema.
8741
- * @param - ID of the Schema to retrieve.
8742
- * @returns The requested Schema.
8779
+ * Retrieves a translation schema.
8780
+ * @param - ID of the translation schema to retrieve.
8781
+ * @returns The requested translation schema.
8743
8782
  */
8744
8783
  (schemaId: string): Promise<Schema & SchemaNonNullableFields>;
8745
8784
  }
8746
8785
  declare function getSchemaByKey$1(httpClient: HttpClient): GetSchemaByKeySignature;
8747
8786
  interface GetSchemaByKeySignature {
8748
8787
  /**
8749
- * Retrieves a Schema by key.
8788
+ * Retrieves a translation schema by key.
8750
8789
  */
8751
8790
  (identifiers: GetSchemaByKeyIdentifiers, key: GetSchemaByKey): Promise<GetSchemaByKeyResponse & GetSchemaByKeyResponseNonNullableFields>;
8752
8791
  }
8753
8792
  declare function querySchemas$1(httpClient: HttpClient): QuerySchemasSignature;
8754
8793
  interface QuerySchemasSignature {
8755
8794
  /**
8756
- * Retrieves a list of Schemas, given the provided [paging, filtering, and sorting][1].
8795
+ * Retrieves a list of schemas, given the provided paging, filtering, and sorting. Up to 100 schemas can be returned per request.
8796
+ *
8797
+ * > **Note:**
8798
+ * >
8799
+ * > 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.
8800
+ *
8801
+ * The default `sort` is `id` in `ASC`.
8802
+ *
8803
+ * 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).
8804
+ * To learn how to query translation schemas, see [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language).
8757
8805
  */
8758
8806
  (options?: QuerySchemasOptions | undefined): SchemasQueryBuilder;
8759
8807
  }
8760
8808
  declare function listSiteSchemas$1(httpClient: HttpClient): ListSiteSchemasSignature;
8761
8809
  interface ListSiteSchemasSignature {
8762
8810
  /**
8763
- * Retrieves a list of Schemas of app installed on site.
8811
+ * Retrieves a list of all translation schemas associated with a site, including those created by you or other developers.
8764
8812
  */
8765
8813
  (options?: ListSiteSchemasOptions | undefined): Promise<ListSiteSchemasResponse & ListSiteSchemasResponseNonNullableFields>;
8766
8814
  }