@wix/auto_sdk_multilingual_translation-schemas 1.0.28 → 1.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +2 -2
- package/build/cjs/{multilingual-translation-v1-schema-translation-schemas.universal-9n5YslSa.d.ts → index.typings.d.ts} +148 -1
- package/build/cjs/index.typings.js +643 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +2 -1
- package/build/es/index.d.mts +2 -2
- package/build/es/{multilingual-translation-v1-schema-translation-schemas.universal-9n5YslSa.d.mts → index.typings.d.mts} +148 -1
- package/build/es/index.typings.mjs +605 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +2 -1
- package/build/internal/cjs/index.d.ts +2 -2
- package/build/internal/cjs/{multilingual-translation-v1-schema-translation-schemas.universal-9n5YslSa.d.ts → index.typings.d.ts} +148 -1
- package/build/internal/cjs/index.typings.js +643 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +2 -1
- package/build/internal/es/index.d.mts +2 -2
- package/build/internal/es/{multilingual-translation-v1-schema-translation-schemas.universal-9n5YslSa.d.mts → index.typings.d.mts} +148 -1
- package/build/internal/es/index.typings.mjs +605 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +2 -1
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
2
|
+
import { Schema, GetSchemaByKeyIdentifiers, GetSchemaByKeyResponse, UpdateSchema, SchemasQueryBuilder, ListSiteSchemasOptions, ListSiteSchemasResponse, SchemaCreatedEnvelope, SchemaDeletedEnvelope, SchemaUpdatedEnvelope } from './index.typings.js';
|
|
3
|
+
export { ActionEvent, Asset, BaseEventMetadata, CreateSchemaRequest, CreateSchemaResponse, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DeleteContext, DeleteSchemaRequest, DeleteSchemaResponse, DeleteStatus, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, FieldType, GetSchemaByKeyRequest, GetSchemaRequest, GetSchemaResponse, IdentificationData, IdentificationDataIdOneOf, ListSiteSchemasRequest, MessageEnvelope, MetaSiteSpecialEvent, MetaSiteSpecialEventPayloadOneOf, Namespace, NamespaceChanged, OdeditorAssigned, OdeditorUnassigned, PicassoAssigned, PicassoUnassigned, PreviewFields, QuerySchemasRequest, QuerySchemasResponse, RestoreInfo, SchemaField, SchemaKey, SchemaScope, SchemasQueryResult, ServiceProvisioned, ServiceRemoved, SiteCreated, SiteCreatedContext, SiteDeleted, SiteHardDeleted, SiteMarkedAsTemplate, SiteMarkedAsWixSite, SitePublished, SitePurgedExternally, SiteRenamed, SiteTransferred, SiteUndeleted, SiteUnpublished, SiteUrlChanged, SortOrder, Sorting, State, StudioAssigned, StudioUnassigned, UpdateSchemaRequest, UpdateSchemaResponse, WebhookIdentityType } from './index.typings.js';
|
|
4
4
|
|
|
5
5
|
declare function createSchema$1(httpClient: HttpClient): CreateSchemaSignature;
|
|
6
6
|
interface CreateSchemaSignature {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
|
+
|
|
1
3
|
interface Schema {
|
|
2
4
|
/**
|
|
3
5
|
* Translation schema ID.
|
|
@@ -970,13 +972,84 @@ interface SchemaCreatedEnvelope {
|
|
|
970
972
|
entity: Schema;
|
|
971
973
|
metadata: EventMetadata;
|
|
972
974
|
}
|
|
975
|
+
/**
|
|
976
|
+
* Triggered when translation schema is created.
|
|
977
|
+
* @permissionScope Wix Multilingual - Translation Schema Read
|
|
978
|
+
* @permissionScopeId SCOPE.DC-MULTILINGUAL.READ_TRANSLATION_SCHEMA
|
|
979
|
+
* @permissionId WIX_MULTILINGUAL.SCHEMA_READ_ORGANIZATION
|
|
980
|
+
* @webhook
|
|
981
|
+
* @eventType wix.multilingual.translation.v1.schema_created
|
|
982
|
+
* @slug created
|
|
983
|
+
*/
|
|
984
|
+
declare function onSchemaCreated(handler: (event: SchemaCreatedEnvelope) => void | Promise<void>): void;
|
|
973
985
|
interface SchemaDeletedEnvelope {
|
|
974
986
|
metadata: EventMetadata;
|
|
975
987
|
}
|
|
988
|
+
/**
|
|
989
|
+
* Triggered when translation schema is deleted.
|
|
990
|
+
* @permissionScope Wix Multilingual - Translation Schema Read
|
|
991
|
+
* @permissionScopeId SCOPE.DC-MULTILINGUAL.READ_TRANSLATION_SCHEMA
|
|
992
|
+
* @permissionId WIX_MULTILINGUAL.SCHEMA_READ_ORGANIZATION
|
|
993
|
+
* @webhook
|
|
994
|
+
* @eventType wix.multilingual.translation.v1.schema_deleted
|
|
995
|
+
* @slug deleted
|
|
996
|
+
*/
|
|
997
|
+
declare function onSchemaDeleted(handler: (event: SchemaDeletedEnvelope) => void | Promise<void>): void;
|
|
976
998
|
interface SchemaUpdatedEnvelope {
|
|
977
999
|
entity: Schema;
|
|
978
1000
|
metadata: EventMetadata;
|
|
979
1001
|
}
|
|
1002
|
+
/**
|
|
1003
|
+
* Triggered when translation schema is updated.
|
|
1004
|
+
* @permissionScope Wix Multilingual - Translation Schema Read
|
|
1005
|
+
* @permissionScopeId SCOPE.DC-MULTILINGUAL.READ_TRANSLATION_SCHEMA
|
|
1006
|
+
* @permissionId WIX_MULTILINGUAL.SCHEMA_READ_ORGANIZATION
|
|
1007
|
+
* @webhook
|
|
1008
|
+
* @eventType wix.multilingual.translation.v1.schema_updated
|
|
1009
|
+
* @slug updated
|
|
1010
|
+
*/
|
|
1011
|
+
declare function onSchemaUpdated(handler: (event: SchemaUpdatedEnvelope) => void | Promise<void>): void;
|
|
1012
|
+
type SchemaNonNullablePaths = `key.appId` | `key.entityType` | `key.scope`;
|
|
1013
|
+
/**
|
|
1014
|
+
* Creates a translation schema.
|
|
1015
|
+
* @param schema - Translation schema to create.
|
|
1016
|
+
* @public
|
|
1017
|
+
* @requiredField schema
|
|
1018
|
+
* @requiredField schema.fields
|
|
1019
|
+
* @requiredField schema.key
|
|
1020
|
+
* @requiredField schema.key.entityType
|
|
1021
|
+
* @permissionId WIX_MULTILINGUAL.SCHEMA_CREATE_ORGANIZATION
|
|
1022
|
+
* @applicableIdentity APP
|
|
1023
|
+
* @returns Newly created translation schema.
|
|
1024
|
+
* @fqn wix.multilingual.translation.schema.v1.TranslationSchema.CreateSchema
|
|
1025
|
+
*/
|
|
1026
|
+
declare function createSchema(schema: NonNullablePaths<Schema, `fields` | `key` | `key.entityType`>): Promise<NonNullablePaths<Schema, SchemaNonNullablePaths>>;
|
|
1027
|
+
/**
|
|
1028
|
+
* Retrieves a translation schema by ID.
|
|
1029
|
+
* @param schemaId - ID of the translation schema to retrieve.
|
|
1030
|
+
* @public
|
|
1031
|
+
* @requiredField schemaId
|
|
1032
|
+
* @permissionId WIX_MULTILINGUAL.SCHEMA_READ_ORGANIZATION
|
|
1033
|
+
* @applicableIdentity APP
|
|
1034
|
+
* @returns The requested translation schema.
|
|
1035
|
+
* @fqn wix.multilingual.translation.schema.v1.TranslationSchema.GetSchema
|
|
1036
|
+
*/
|
|
1037
|
+
declare function getSchema(schemaId: string): Promise<NonNullablePaths<Schema, SchemaNonNullablePaths>>;
|
|
1038
|
+
/**
|
|
1039
|
+
* Retrieves a translation schema by key.
|
|
1040
|
+
* @public
|
|
1041
|
+
* @requiredField identifiers
|
|
1042
|
+
* @requiredField identifiers.keyAppId
|
|
1043
|
+
* @requiredField identifiers.keyEntityType
|
|
1044
|
+
* @requiredField identifiers.keyScope
|
|
1045
|
+
* @requiredField key
|
|
1046
|
+
* @permissionId WIX_MULTILINGUAL.SCHEMA_READ_ORGANIZATION
|
|
1047
|
+
* @applicableIdentity APP
|
|
1048
|
+
* @fqn wix.multilingual.translation.schema.v1.TranslationSchema.GetSchemaByKey
|
|
1049
|
+
*/
|
|
1050
|
+
declare function getSchemaByKey(identifiers: NonNullablePaths<GetSchemaByKeyIdentifiers, `keyAppId` | `keyEntityType` | `keyScope`>): Promise<NonNullablePaths<GetSchemaByKeyResponse, {
|
|
1051
|
+
[P in SchemaNonNullablePaths]: `schema.${P}`;
|
|
1052
|
+
}[SchemaNonNullablePaths]>>;
|
|
980
1053
|
interface GetSchemaByKeyIdentifiers {
|
|
981
1054
|
/**
|
|
982
1055
|
* ID of the app that created the schema.
|
|
@@ -1000,6 +1073,35 @@ interface GetSchemaByKeyIdentifiers {
|
|
|
1000
1073
|
*/
|
|
1001
1074
|
keyScope?: SchemaScopeWithLiterals;
|
|
1002
1075
|
}
|
|
1076
|
+
/**
|
|
1077
|
+
* Updates a translation schema.
|
|
1078
|
+
*
|
|
1079
|
+
* To remove a field, pass the field key with an empty object as the value. For example:
|
|
1080
|
+
*
|
|
1081
|
+
* ```json
|
|
1082
|
+
* {
|
|
1083
|
+
* "fields": {
|
|
1084
|
+
* "title": {}
|
|
1085
|
+
* }
|
|
1086
|
+
* }
|
|
1087
|
+
* ```
|
|
1088
|
+
*
|
|
1089
|
+
* <blockquote class="caution">
|
|
1090
|
+
* <strong>Caution:</strong>
|
|
1091
|
+
*
|
|
1092
|
+
* Removing a schema field makes the corresponding content field unavailable.
|
|
1093
|
+
* </blockquote>
|
|
1094
|
+
* @param _id - Translation schema ID.
|
|
1095
|
+
* @public
|
|
1096
|
+
* @requiredField _id
|
|
1097
|
+
* @requiredField schema
|
|
1098
|
+
* @requiredField schema.revision
|
|
1099
|
+
* @permissionId WIX_MULTILINGUAL.SCHEMA_UPDATE_ORGANIZATION
|
|
1100
|
+
* @applicableIdentity APP
|
|
1101
|
+
* @returns Updated Schema.
|
|
1102
|
+
* @fqn wix.multilingual.translation.schema.v1.TranslationSchema.UpdateSchema
|
|
1103
|
+
*/
|
|
1104
|
+
declare function updateSchema(_id: string, schema: NonNullablePaths<UpdateSchema, `revision`>): Promise<NonNullablePaths<Schema, SchemaNonNullablePaths>>;
|
|
1003
1105
|
interface UpdateSchema {
|
|
1004
1106
|
/**
|
|
1005
1107
|
* Translation schema ID.
|
|
@@ -1055,6 +1157,41 @@ interface UpdateSchema {
|
|
|
1055
1157
|
*/
|
|
1056
1158
|
duplicateContent?: boolean | null;
|
|
1057
1159
|
}
|
|
1160
|
+
/**
|
|
1161
|
+
* Deletes a translation schema.
|
|
1162
|
+
* @param schemaId - ID of the translation schema to delete.
|
|
1163
|
+
* @public
|
|
1164
|
+
* @requiredField schemaId
|
|
1165
|
+
* @permissionId WIX_MULTILINGUAL.SCHEMA_DELETE_ORGANIZATION
|
|
1166
|
+
* @applicableIdentity APP
|
|
1167
|
+
* @fqn wix.multilingual.translation.schema.v1.TranslationSchema.DeleteSchema
|
|
1168
|
+
*/
|
|
1169
|
+
declare function deleteSchema(schemaId: string): Promise<void>;
|
|
1170
|
+
/**
|
|
1171
|
+
* Creates a query to retrieve a list of schemas.
|
|
1172
|
+
*
|
|
1173
|
+
* > **Note:**
|
|
1174
|
+
* >
|
|
1175
|
+
* > This method can retrieve all schemas with a `GLOBAL` scope and schemas with a `SITE` scope for the site the API request is authorized to access.
|
|
1176
|
+
*
|
|
1177
|
+
* The `querySchemas()` function builds a query to retrieve a list of translation schemas and returns a `SchemasQueryBuilder` object.
|
|
1178
|
+
*
|
|
1179
|
+
* The returned object contains the query definition, which is used to run the query using the [`find()`](https://dev.wix.com/docs/sdk/backend-modules/multilingual/translation/translation-schema/schemas-query-builder/find) function.
|
|
1180
|
+
*
|
|
1181
|
+
* You can refine the query by chaining `SchemasQueryBuilder` functions onto the query. `SchemasQueryBuilder` functions enable you to filter, sort, and control the results that `querySchemas()` returns.
|
|
1182
|
+
*
|
|
1183
|
+
* `querySchemas()` runs with the following `SchemasQueryBuilder` defaults which you can override:
|
|
1184
|
+
*
|
|
1185
|
+
* + [`limit(100)`](https://dev.wix.com/docs/sdk/backend-modules/multilingual/translation/translation-schema/schemas-query-builder/limit)
|
|
1186
|
+
* + [`ascending('_id')`](https://dev.wix.com/docs/sdk/backend-modules/multilingual/translation/translation-schema/schemas-query-builder/ascending)
|
|
1187
|
+
*
|
|
1188
|
+
* The following `SchemasQueryBuilder` functions are supported for `querySchemas()`. For a full description of the operations object, see the object returned for the [`items`](https://dev.wix.com/docs/sdk/backend-modules/multilingual/translation/translation-schema/schemas-query-result/items) property in `SchemasQueryResult`.
|
|
1189
|
+
* @public
|
|
1190
|
+
* @permissionId WIX_MULTILINGUAL.SCHEMA_READ_ORGANIZATION
|
|
1191
|
+
* @applicableIdentity APP
|
|
1192
|
+
* @fqn wix.multilingual.translation.schema.v1.TranslationSchema.QuerySchemas
|
|
1193
|
+
*/
|
|
1194
|
+
declare function querySchemas(): SchemasQueryBuilder;
|
|
1058
1195
|
interface QueryCursorResult {
|
|
1059
1196
|
cursors: Cursors;
|
|
1060
1197
|
hasNext: () => boolean;
|
|
@@ -1113,6 +1250,16 @@ interface SchemasQueryBuilder {
|
|
|
1113
1250
|
skipTo: (cursor: string) => SchemasQueryBuilder;
|
|
1114
1251
|
find: () => Promise<SchemasQueryResult>;
|
|
1115
1252
|
}
|
|
1253
|
+
/**
|
|
1254
|
+
* Retrieves a list of all translation schemas associated with a site, regardless of which app created them.
|
|
1255
|
+
* @public
|
|
1256
|
+
* @permissionId WIX_MULTILINGUAL.SCHEMA_READ
|
|
1257
|
+
* @applicableIdentity APP
|
|
1258
|
+
* @fqn wix.multilingual.translation.schema.v1.TranslationSchema.ListSiteSchemas
|
|
1259
|
+
*/
|
|
1260
|
+
declare function listSiteSchemas(options?: ListSiteSchemasOptions): Promise<NonNullablePaths<ListSiteSchemasResponse, {
|
|
1261
|
+
[P in SchemaNonNullablePaths]: `schemas.${number}.${P}`;
|
|
1262
|
+
}[SchemaNonNullablePaths]>>;
|
|
1116
1263
|
interface ListSiteSchemasOptions {
|
|
1117
1264
|
/** 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`. */
|
|
1118
1265
|
paging?: CursorPaging;
|
|
@@ -1136,4 +1283,4 @@ interface ListSiteSchemasOptions {
|
|
|
1136
1283
|
scope?: SchemaScopeWithLiterals;
|
|
1137
1284
|
}
|
|
1138
1285
|
|
|
1139
|
-
export { type
|
|
1286
|
+
export { type ActionEvent, type Asset, type BaseEventMetadata, type CreateSchemaRequest, type CreateSchemaResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeleteContext, type DeleteSchemaRequest, type DeleteSchemaResponse, DeleteStatus, type DeleteStatusWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, FieldType, type FieldTypeWithLiterals, type GetSchemaByKeyIdentifiers, type GetSchemaByKeyRequest, type GetSchemaByKeyResponse, type GetSchemaRequest, type GetSchemaResponse, type IdentificationData, type IdentificationDataIdOneOf, type ListSiteSchemasOptions, type ListSiteSchemasRequest, type ListSiteSchemasResponse, type MessageEnvelope, type MetaSiteSpecialEvent, type MetaSiteSpecialEventPayloadOneOf, Namespace, type NamespaceChanged, type NamespaceWithLiterals, type OdeditorAssigned, type OdeditorUnassigned, type PicassoAssigned, type PicassoUnassigned, type PreviewFields, type QuerySchemasRequest, type QuerySchemasResponse, type RestoreInfo, type Schema, type SchemaCreatedEnvelope, type SchemaDeletedEnvelope, type SchemaField, type SchemaKey, SchemaScope, type SchemaScopeWithLiterals, type SchemaUpdatedEnvelope, type SchemasQueryBuilder, type SchemasQueryResult, type ServiceProvisioned, type ServiceRemoved, type SiteCreated, SiteCreatedContext, type SiteCreatedContextWithLiterals, type SiteDeleted, type SiteHardDeleted, type SiteMarkedAsTemplate, type SiteMarkedAsWixSite, type SitePublished, type SitePurgedExternally, type SiteRenamed, type SiteTransferred, type SiteUndeleted, type SiteUnpublished, type SiteUrlChanged, SortOrder, type SortOrderWithLiterals, type Sorting, State, type StateWithLiterals, type StudioAssigned, type StudioUnassigned, type UpdateSchema, type UpdateSchemaRequest, type UpdateSchemaResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, createSchema, deleteSchema, getSchema, getSchemaByKey, listSiteSchemas, onSchemaCreated, onSchemaDeleted, onSchemaUpdated, querySchemas, updateSchema };
|