@wix/auto_sdk_multilingual_translation-schemas 1.0.12 → 1.0.14
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/index.d.mts +116 -0
- package/build/index.d.ts +116 -0
- package/build/index.js +781 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +740 -0
- package/build/index.mjs.map +1 -0
- package/build/internal/index.d.mts +116 -0
- package/build/internal/index.d.ts +116 -0
- package/build/internal/index.js +781 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +740 -0
- package/build/internal/index.mjs.map +1 -0
- package/build/internal/meta.d.mts +357 -0
- package/build/internal/meta.d.ts +357 -0
- package/build/internal/meta.js +466 -0
- package/build/internal/meta.js.map +1 -0
- package/build/internal/meta.mjs +433 -0
- package/build/internal/meta.mjs.map +1 -0
- package/build/internal/{cjs/src/multilingual-translation-v1-schema-translation-schemas.universal.d.ts → multilingual-translation-v1-schema-translation-schemas.universal-NgJpHCdB.d.mts} +80 -261
- package/build/{cjs/src/multilingual-translation-v1-schema-translation-schemas.universal.d.ts → internal/multilingual-translation-v1-schema-translation-schemas.universal-NgJpHCdB.d.ts} +80 -261
- package/build/meta.d.mts +357 -0
- package/build/meta.d.ts +357 -0
- package/build/meta.js +466 -0
- package/build/meta.js.map +1 -0
- package/build/meta.mjs +433 -0
- package/build/meta.mjs.map +1 -0
- package/build/{es/src/multilingual-translation-v1-schema-translation-schemas.universal.d.ts → multilingual-translation-v1-schema-translation-schemas.universal-NgJpHCdB.d.mts} +80 -261
- package/build/{internal/es/src/multilingual-translation-v1-schema-translation-schemas.universal.d.ts → multilingual-translation-v1-schema-translation-schemas.universal-NgJpHCdB.d.ts} +80 -261
- package/package.json +13 -12
- package/build/cjs/index.d.ts +0 -1
- package/build/cjs/index.js +0 -18
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/index.typings.d.ts +0 -1
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/meta.d.ts +0 -1
- package/build/cjs/meta.js +0 -18
- package/build/cjs/meta.js.map +0 -1
- package/build/cjs/src/multilingual-translation-v1-schema-translation-schemas.context.d.ts +0 -27
- package/build/cjs/src/multilingual-translation-v1-schema-translation-schemas.context.js +0 -38
- package/build/cjs/src/multilingual-translation-v1-schema-translation-schemas.context.js.map +0 -1
- package/build/cjs/src/multilingual-translation-v1-schema-translation-schemas.http.d.ts +0 -52
- package/build/cjs/src/multilingual-translation-v1-schema-translation-schemas.http.js +0 -339
- package/build/cjs/src/multilingual-translation-v1-schema-translation-schemas.http.js.map +0 -1
- package/build/cjs/src/multilingual-translation-v1-schema-translation-schemas.meta.d.ts +0 -29
- package/build/cjs/src/multilingual-translation-v1-schema-translation-schemas.meta.js +0 -171
- package/build/cjs/src/multilingual-translation-v1-schema-translation-schemas.meta.js.map +0 -1
- package/build/cjs/src/multilingual-translation-v1-schema-translation-schemas.public.d.ts +0 -98
- package/build/cjs/src/multilingual-translation-v1-schema-translation-schemas.public.js +0 -104
- package/build/cjs/src/multilingual-translation-v1-schema-translation-schemas.public.js.map +0 -1
- package/build/cjs/src/multilingual-translation-v1-schema-translation-schemas.types.d.ts +0 -915
- package/build/cjs/src/multilingual-translation-v1-schema-translation-schemas.types.js +0 -158
- package/build/cjs/src/multilingual-translation-v1-schema-translation-schemas.types.js.map +0 -1
- package/build/cjs/src/multilingual-translation-v1-schema-translation-schemas.universal.js +0 -503
- package/build/cjs/src/multilingual-translation-v1-schema-translation-schemas.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/package.json +0 -3
- package/build/es/src/multilingual-translation-v1-schema-translation-schemas.context.d.ts +0 -27
- package/build/es/src/multilingual-translation-v1-schema-translation-schemas.context.js +0 -27
- package/build/es/src/multilingual-translation-v1-schema-translation-schemas.context.js.map +0 -1
- package/build/es/src/multilingual-translation-v1-schema-translation-schemas.http.d.ts +0 -52
- package/build/es/src/multilingual-translation-v1-schema-translation-schemas.http.js +0 -329
- package/build/es/src/multilingual-translation-v1-schema-translation-schemas.http.js.map +0 -1
- package/build/es/src/multilingual-translation-v1-schema-translation-schemas.meta.d.ts +0 -29
- package/build/es/src/multilingual-translation-v1-schema-translation-schemas.meta.js +0 -138
- package/build/es/src/multilingual-translation-v1-schema-translation-schemas.meta.js.map +0 -1
- package/build/es/src/multilingual-translation-v1-schema-translation-schemas.public.d.ts +0 -98
- package/build/es/src/multilingual-translation-v1-schema-translation-schemas.public.js +0 -86
- package/build/es/src/multilingual-translation-v1-schema-translation-schemas.public.js.map +0 -1
- package/build/es/src/multilingual-translation-v1-schema-translation-schemas.types.d.ts +0 -915
- package/build/es/src/multilingual-translation-v1-schema-translation-schemas.types.js +0 -155
- package/build/es/src/multilingual-translation-v1-schema-translation-schemas.types.js.map +0 -1
- package/build/es/src/multilingual-translation-v1-schema-translation-schemas.universal.js +0 -470
- package/build/es/src/multilingual-translation-v1-schema-translation-schemas.universal.js.map +0 -1
- package/build/internal/cjs/index.d.ts +0 -1
- package/build/internal/cjs/index.js +0 -18
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -1
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.d.ts +0 -1
- package/build/internal/cjs/meta.js +0 -18
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/src/multilingual-translation-v1-schema-translation-schemas.context.d.ts +0 -27
- package/build/internal/cjs/src/multilingual-translation-v1-schema-translation-schemas.context.js +0 -38
- package/build/internal/cjs/src/multilingual-translation-v1-schema-translation-schemas.context.js.map +0 -1
- package/build/internal/cjs/src/multilingual-translation-v1-schema-translation-schemas.http.d.ts +0 -52
- package/build/internal/cjs/src/multilingual-translation-v1-schema-translation-schemas.http.js +0 -339
- package/build/internal/cjs/src/multilingual-translation-v1-schema-translation-schemas.http.js.map +0 -1
- package/build/internal/cjs/src/multilingual-translation-v1-schema-translation-schemas.meta.d.ts +0 -29
- package/build/internal/cjs/src/multilingual-translation-v1-schema-translation-schemas.meta.js +0 -171
- package/build/internal/cjs/src/multilingual-translation-v1-schema-translation-schemas.meta.js.map +0 -1
- package/build/internal/cjs/src/multilingual-translation-v1-schema-translation-schemas.public.d.ts +0 -98
- package/build/internal/cjs/src/multilingual-translation-v1-schema-translation-schemas.public.js +0 -104
- package/build/internal/cjs/src/multilingual-translation-v1-schema-translation-schemas.public.js.map +0 -1
- package/build/internal/cjs/src/multilingual-translation-v1-schema-translation-schemas.types.d.ts +0 -915
- package/build/internal/cjs/src/multilingual-translation-v1-schema-translation-schemas.types.js +0 -158
- package/build/internal/cjs/src/multilingual-translation-v1-schema-translation-schemas.types.js.map +0 -1
- package/build/internal/cjs/src/multilingual-translation-v1-schema-translation-schemas.universal.js +0 -503
- package/build/internal/cjs/src/multilingual-translation-v1-schema-translation-schemas.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/multilingual-translation-v1-schema-translation-schemas.context.d.ts +0 -27
- package/build/internal/es/src/multilingual-translation-v1-schema-translation-schemas.context.js +0 -27
- package/build/internal/es/src/multilingual-translation-v1-schema-translation-schemas.context.js.map +0 -1
- package/build/internal/es/src/multilingual-translation-v1-schema-translation-schemas.http.d.ts +0 -52
- package/build/internal/es/src/multilingual-translation-v1-schema-translation-schemas.http.js +0 -329
- package/build/internal/es/src/multilingual-translation-v1-schema-translation-schemas.http.js.map +0 -1
- package/build/internal/es/src/multilingual-translation-v1-schema-translation-schemas.meta.d.ts +0 -29
- package/build/internal/es/src/multilingual-translation-v1-schema-translation-schemas.meta.js +0 -138
- package/build/internal/es/src/multilingual-translation-v1-schema-translation-schemas.meta.js.map +0 -1
- package/build/internal/es/src/multilingual-translation-v1-schema-translation-schemas.public.d.ts +0 -98
- package/build/internal/es/src/multilingual-translation-v1-schema-translation-schemas.public.js +0 -86
- package/build/internal/es/src/multilingual-translation-v1-schema-translation-schemas.public.js.map +0 -1
- package/build/internal/es/src/multilingual-translation-v1-schema-translation-schemas.types.d.ts +0 -915
- package/build/internal/es/src/multilingual-translation-v1-schema-translation-schemas.types.js +0 -155
- package/build/internal/es/src/multilingual-translation-v1-schema-translation-schemas.types.js.map +0 -1
- package/build/internal/es/src/multilingual-translation-v1-schema-translation-schemas.universal.js +0 -470
- package/build/internal/es/src/multilingual-translation-v1-schema-translation-schemas.universal.js.map +0 -1
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
+
import { S as Schema, G as GetSchemaByKeyIdentifiers, a as GetSchemaByKeyResponse, U as UpdateSchema, Q as QuerySchemasOptions, b as SchemasQueryBuilder, L as ListSiteSchemasOptions, c as ListSiteSchemasResponse } from './multilingual-translation-v1-schema-translation-schemas.universal-NgJpHCdB.mjs';
|
|
3
|
+
export { ab as ActionEvent, B as Asset, af as BaseEventMetadata, C as CreateSchemaRequest, j as CreateSchemaResponse, v as CursorPaging, x as CursorPagingMetadata, s as CursorQuery, t as CursorQueryPagingMethodOneOf, y as Cursors, J as DeleteContext, p as DeleteSchemaRequest, q as DeleteSchemaResponse, D as DeleteStatus, a5 as DomainEvent, a6 as DomainEventBodyOneOf, a4 as Empty, a7 as EntityCreatedEvent, aa as EntityDeletedEvent, a9 as EntityUpdatedEvent, ag as EventMetadata, F as FieldType, m as GetSchemaByKeyRequest, k as GetSchemaRequest, l as GetSchemaResponse, ad as IdentificationData, ae as IdentificationDataIdOneOf, z as ListSiteSchemasRequest, ac as MessageEnvelope, M as MetaSiteSpecialEvent, A as MetaSiteSpecialEventPayloadOneOf, N as Namespace, $ as NamespaceChanged, P as PreviewFields, r as QuerySchemasRequest, w as QuerySchemasResponse, a8 as RestoreInfo, ah as SchemaCreatedEnvelope, ai as SchemaDeletedEnvelope, i as SchemaField, h as SchemaKey, d as SchemaScope, aj as SchemaUpdatedEnvelope, ak as SchemasQueryResult, X as ServiceProvisioned, Y as ServiceRemoved, E as SiteCreated, g as SiteCreatedContext, I as SiteDeleted, _ as SiteHardDeleted, T as SiteMarkedAsTemplate, V as SiteMarkedAsWixSite, O as SitePublished, a3 as SitePurgedExternally, Z as SiteRenamed, H as SiteTransferred, K as SiteUndeleted, R as SiteUnpublished, a2 as SiteUrlChanged, e as SortOrder, u as Sorting, f as State, a0 as StudioAssigned, a1 as StudioUnassigned, n as UpdateSchemaRequest, o as UpdateSchemaResponse, W as WebhookIdentityType } from './multilingual-translation-v1-schema-translation-schemas.universal-NgJpHCdB.mjs';
|
|
4
|
+
import { createEventModule } from '@wix/sdk-runtime/event-definition-modules';
|
|
5
|
+
|
|
6
|
+
declare function createSchema$1(httpClient: HttpClient): CreateSchemaSignature;
|
|
7
|
+
interface CreateSchemaSignature {
|
|
8
|
+
/**
|
|
9
|
+
* Creates a translation schema.
|
|
10
|
+
* @param - Translation schema to create.
|
|
11
|
+
* @returns Newly created translation schema.
|
|
12
|
+
*/
|
|
13
|
+
(schema: Schema): Promise<Schema>;
|
|
14
|
+
}
|
|
15
|
+
declare function getSchema$1(httpClient: HttpClient): GetSchemaSignature;
|
|
16
|
+
interface GetSchemaSignature {
|
|
17
|
+
/**
|
|
18
|
+
* Retrieves a translation schema by ID.
|
|
19
|
+
* @param - ID of the translation schema to retrieve.
|
|
20
|
+
* @returns The requested translation schema.
|
|
21
|
+
*/
|
|
22
|
+
(schemaId: string): Promise<Schema>;
|
|
23
|
+
}
|
|
24
|
+
declare function getSchemaByKey$1(httpClient: HttpClient): GetSchemaByKeySignature;
|
|
25
|
+
interface GetSchemaByKeySignature {
|
|
26
|
+
/**
|
|
27
|
+
* Retrieves a translation schema by key.
|
|
28
|
+
*/
|
|
29
|
+
(identifiers: GetSchemaByKeyIdentifiers): Promise<GetSchemaByKeyResponse>;
|
|
30
|
+
}
|
|
31
|
+
declare function updateSchema$1(httpClient: HttpClient): UpdateSchemaSignature;
|
|
32
|
+
interface UpdateSchemaSignature {
|
|
33
|
+
/**
|
|
34
|
+
* Updates a translation schema.
|
|
35
|
+
*
|
|
36
|
+
* To remove a field, pass the field key with an empty object as the value. For example:
|
|
37
|
+
*
|
|
38
|
+
* ```json
|
|
39
|
+
* {
|
|
40
|
+
* "fields": {
|
|
41
|
+
* "title": {}
|
|
42
|
+
* }
|
|
43
|
+
* }
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* <blockquote class="caution">
|
|
47
|
+
* <strong>Caution:</strong>
|
|
48
|
+
*
|
|
49
|
+
* Removing a schema field makes the corresponding content field unavailable.
|
|
50
|
+
* </blockquote>
|
|
51
|
+
* @param - Translation schema ID.
|
|
52
|
+
* @returns Updated Schema.
|
|
53
|
+
*/
|
|
54
|
+
(_id: string, schema: UpdateSchema): Promise<Schema>;
|
|
55
|
+
}
|
|
56
|
+
declare function deleteSchema$1(httpClient: HttpClient): DeleteSchemaSignature;
|
|
57
|
+
interface DeleteSchemaSignature {
|
|
58
|
+
/**
|
|
59
|
+
* Deletes a translation schema.
|
|
60
|
+
* @param - ID of the translation schema to delete.
|
|
61
|
+
*/
|
|
62
|
+
(schemaId: string): Promise<void>;
|
|
63
|
+
}
|
|
64
|
+
declare function querySchemas$1(httpClient: HttpClient): QuerySchemasSignature;
|
|
65
|
+
interface QuerySchemasSignature {
|
|
66
|
+
/**
|
|
67
|
+
* Creates a query to retrieve a list of schemas.
|
|
68
|
+
*
|
|
69
|
+
* > **Note:**
|
|
70
|
+
* >
|
|
71
|
+
* > 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.
|
|
72
|
+
*
|
|
73
|
+
* The `querySchemas()` function builds a query to retrieve a list of translation schemas and returns a `SchemasQueryBuilder` object.
|
|
74
|
+
*
|
|
75
|
+
* 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.
|
|
76
|
+
*
|
|
77
|
+
* 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.
|
|
78
|
+
*
|
|
79
|
+
* `querySchemas()` runs with the following `SchemasQueryBuilder` defaults which you can override:
|
|
80
|
+
*
|
|
81
|
+
* + [`limit(100)`](https://dev.wix.com/docs/sdk/backend-modules/multilingual/translation/translation-schema/schemas-query-builder/limit)
|
|
82
|
+
* + [`ascending('_id')`](https://dev.wix.com/docs/sdk/backend-modules/multilingual/translation/translation-schema/schemas-query-builder/ascending)
|
|
83
|
+
*
|
|
84
|
+
* 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`.
|
|
85
|
+
*/
|
|
86
|
+
(options?: QuerySchemasOptions | undefined): SchemasQueryBuilder;
|
|
87
|
+
}
|
|
88
|
+
declare function listSiteSchemas$1(httpClient: HttpClient): ListSiteSchemasSignature;
|
|
89
|
+
interface ListSiteSchemasSignature {
|
|
90
|
+
/**
|
|
91
|
+
* Retrieves a list of all translation schemas associated with a site, regardless of which app created them.
|
|
92
|
+
*/
|
|
93
|
+
(options?: ListSiteSchemasOptions | undefined): Promise<ListSiteSchemasResponse>;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
declare const createSchema: MaybeContext<BuildRESTFunction<typeof createSchema$1> & typeof createSchema$1>;
|
|
97
|
+
declare const getSchema: MaybeContext<BuildRESTFunction<typeof getSchema$1> & typeof getSchema$1>;
|
|
98
|
+
declare const getSchemaByKey: MaybeContext<BuildRESTFunction<typeof getSchemaByKey$1> & typeof getSchemaByKey$1>;
|
|
99
|
+
declare const updateSchema: MaybeContext<BuildRESTFunction<typeof updateSchema$1> & typeof updateSchema$1>;
|
|
100
|
+
declare const deleteSchema: MaybeContext<BuildRESTFunction<typeof deleteSchema$1> & typeof deleteSchema$1>;
|
|
101
|
+
declare const querySchemas: MaybeContext<BuildRESTFunction<typeof querySchemas$1> & typeof querySchemas$1>;
|
|
102
|
+
declare const listSiteSchemas: MaybeContext<BuildRESTFunction<typeof listSiteSchemas$1> & typeof listSiteSchemas$1>;
|
|
103
|
+
/**
|
|
104
|
+
* Triggered when translation schema is created.
|
|
105
|
+
*/
|
|
106
|
+
declare const onSchemaCreated: ReturnType<typeof createEventModule<typeof publicOnSchemaCreated>>;
|
|
107
|
+
/**
|
|
108
|
+
* Triggered when translation schema is deleted.
|
|
109
|
+
*/
|
|
110
|
+
declare const onSchemaDeleted: ReturnType<typeof createEventModule<typeof publicOnSchemaDeleted>>;
|
|
111
|
+
/**
|
|
112
|
+
* Triggered when translation schema is updated.
|
|
113
|
+
*/
|
|
114
|
+
declare const onSchemaUpdated: ReturnType<typeof createEventModule<typeof publicOnSchemaUpdated>>;
|
|
115
|
+
|
|
116
|
+
export { GetSchemaByKeyIdentifiers, GetSchemaByKeyResponse, ListSiteSchemasOptions, ListSiteSchemasResponse, QuerySchemasOptions, Schema, SchemasQueryBuilder, UpdateSchema, createSchema, deleteSchema, getSchema, getSchemaByKey, listSiteSchemas, onSchemaCreated, onSchemaDeleted, onSchemaUpdated, querySchemas, updateSchema };
|
package/build/index.d.ts
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
+
import { S as Schema, G as GetSchemaByKeyIdentifiers, a as GetSchemaByKeyResponse, U as UpdateSchema, Q as QuerySchemasOptions, b as SchemasQueryBuilder, L as ListSiteSchemasOptions, c as ListSiteSchemasResponse } from './multilingual-translation-v1-schema-translation-schemas.universal-NgJpHCdB.js';
|
|
3
|
+
export { ab as ActionEvent, B as Asset, af as BaseEventMetadata, C as CreateSchemaRequest, j as CreateSchemaResponse, v as CursorPaging, x as CursorPagingMetadata, s as CursorQuery, t as CursorQueryPagingMethodOneOf, y as Cursors, J as DeleteContext, p as DeleteSchemaRequest, q as DeleteSchemaResponse, D as DeleteStatus, a5 as DomainEvent, a6 as DomainEventBodyOneOf, a4 as Empty, a7 as EntityCreatedEvent, aa as EntityDeletedEvent, a9 as EntityUpdatedEvent, ag as EventMetadata, F as FieldType, m as GetSchemaByKeyRequest, k as GetSchemaRequest, l as GetSchemaResponse, ad as IdentificationData, ae as IdentificationDataIdOneOf, z as ListSiteSchemasRequest, ac as MessageEnvelope, M as MetaSiteSpecialEvent, A as MetaSiteSpecialEventPayloadOneOf, N as Namespace, $ as NamespaceChanged, P as PreviewFields, r as QuerySchemasRequest, w as QuerySchemasResponse, a8 as RestoreInfo, ah as SchemaCreatedEnvelope, ai as SchemaDeletedEnvelope, i as SchemaField, h as SchemaKey, d as SchemaScope, aj as SchemaUpdatedEnvelope, ak as SchemasQueryResult, X as ServiceProvisioned, Y as ServiceRemoved, E as SiteCreated, g as SiteCreatedContext, I as SiteDeleted, _ as SiteHardDeleted, T as SiteMarkedAsTemplate, V as SiteMarkedAsWixSite, O as SitePublished, a3 as SitePurgedExternally, Z as SiteRenamed, H as SiteTransferred, K as SiteUndeleted, R as SiteUnpublished, a2 as SiteUrlChanged, e as SortOrder, u as Sorting, f as State, a0 as StudioAssigned, a1 as StudioUnassigned, n as UpdateSchemaRequest, o as UpdateSchemaResponse, W as WebhookIdentityType } from './multilingual-translation-v1-schema-translation-schemas.universal-NgJpHCdB.js';
|
|
4
|
+
import { createEventModule } from '@wix/sdk-runtime/event-definition-modules';
|
|
5
|
+
|
|
6
|
+
declare function createSchema$1(httpClient: HttpClient): CreateSchemaSignature;
|
|
7
|
+
interface CreateSchemaSignature {
|
|
8
|
+
/**
|
|
9
|
+
* Creates a translation schema.
|
|
10
|
+
* @param - Translation schema to create.
|
|
11
|
+
* @returns Newly created translation schema.
|
|
12
|
+
*/
|
|
13
|
+
(schema: Schema): Promise<Schema>;
|
|
14
|
+
}
|
|
15
|
+
declare function getSchema$1(httpClient: HttpClient): GetSchemaSignature;
|
|
16
|
+
interface GetSchemaSignature {
|
|
17
|
+
/**
|
|
18
|
+
* Retrieves a translation schema by ID.
|
|
19
|
+
* @param - ID of the translation schema to retrieve.
|
|
20
|
+
* @returns The requested translation schema.
|
|
21
|
+
*/
|
|
22
|
+
(schemaId: string): Promise<Schema>;
|
|
23
|
+
}
|
|
24
|
+
declare function getSchemaByKey$1(httpClient: HttpClient): GetSchemaByKeySignature;
|
|
25
|
+
interface GetSchemaByKeySignature {
|
|
26
|
+
/**
|
|
27
|
+
* Retrieves a translation schema by key.
|
|
28
|
+
*/
|
|
29
|
+
(identifiers: GetSchemaByKeyIdentifiers): Promise<GetSchemaByKeyResponse>;
|
|
30
|
+
}
|
|
31
|
+
declare function updateSchema$1(httpClient: HttpClient): UpdateSchemaSignature;
|
|
32
|
+
interface UpdateSchemaSignature {
|
|
33
|
+
/**
|
|
34
|
+
* Updates a translation schema.
|
|
35
|
+
*
|
|
36
|
+
* To remove a field, pass the field key with an empty object as the value. For example:
|
|
37
|
+
*
|
|
38
|
+
* ```json
|
|
39
|
+
* {
|
|
40
|
+
* "fields": {
|
|
41
|
+
* "title": {}
|
|
42
|
+
* }
|
|
43
|
+
* }
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* <blockquote class="caution">
|
|
47
|
+
* <strong>Caution:</strong>
|
|
48
|
+
*
|
|
49
|
+
* Removing a schema field makes the corresponding content field unavailable.
|
|
50
|
+
* </blockquote>
|
|
51
|
+
* @param - Translation schema ID.
|
|
52
|
+
* @returns Updated Schema.
|
|
53
|
+
*/
|
|
54
|
+
(_id: string, schema: UpdateSchema): Promise<Schema>;
|
|
55
|
+
}
|
|
56
|
+
declare function deleteSchema$1(httpClient: HttpClient): DeleteSchemaSignature;
|
|
57
|
+
interface DeleteSchemaSignature {
|
|
58
|
+
/**
|
|
59
|
+
* Deletes a translation schema.
|
|
60
|
+
* @param - ID of the translation schema to delete.
|
|
61
|
+
*/
|
|
62
|
+
(schemaId: string): Promise<void>;
|
|
63
|
+
}
|
|
64
|
+
declare function querySchemas$1(httpClient: HttpClient): QuerySchemasSignature;
|
|
65
|
+
interface QuerySchemasSignature {
|
|
66
|
+
/**
|
|
67
|
+
* Creates a query to retrieve a list of schemas.
|
|
68
|
+
*
|
|
69
|
+
* > **Note:**
|
|
70
|
+
* >
|
|
71
|
+
* > 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.
|
|
72
|
+
*
|
|
73
|
+
* The `querySchemas()` function builds a query to retrieve a list of translation schemas and returns a `SchemasQueryBuilder` object.
|
|
74
|
+
*
|
|
75
|
+
* 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.
|
|
76
|
+
*
|
|
77
|
+
* 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.
|
|
78
|
+
*
|
|
79
|
+
* `querySchemas()` runs with the following `SchemasQueryBuilder` defaults which you can override:
|
|
80
|
+
*
|
|
81
|
+
* + [`limit(100)`](https://dev.wix.com/docs/sdk/backend-modules/multilingual/translation/translation-schema/schemas-query-builder/limit)
|
|
82
|
+
* + [`ascending('_id')`](https://dev.wix.com/docs/sdk/backend-modules/multilingual/translation/translation-schema/schemas-query-builder/ascending)
|
|
83
|
+
*
|
|
84
|
+
* 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`.
|
|
85
|
+
*/
|
|
86
|
+
(options?: QuerySchemasOptions | undefined): SchemasQueryBuilder;
|
|
87
|
+
}
|
|
88
|
+
declare function listSiteSchemas$1(httpClient: HttpClient): ListSiteSchemasSignature;
|
|
89
|
+
interface ListSiteSchemasSignature {
|
|
90
|
+
/**
|
|
91
|
+
* Retrieves a list of all translation schemas associated with a site, regardless of which app created them.
|
|
92
|
+
*/
|
|
93
|
+
(options?: ListSiteSchemasOptions | undefined): Promise<ListSiteSchemasResponse>;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
declare const createSchema: MaybeContext<BuildRESTFunction<typeof createSchema$1> & typeof createSchema$1>;
|
|
97
|
+
declare const getSchema: MaybeContext<BuildRESTFunction<typeof getSchema$1> & typeof getSchema$1>;
|
|
98
|
+
declare const getSchemaByKey: MaybeContext<BuildRESTFunction<typeof getSchemaByKey$1> & typeof getSchemaByKey$1>;
|
|
99
|
+
declare const updateSchema: MaybeContext<BuildRESTFunction<typeof updateSchema$1> & typeof updateSchema$1>;
|
|
100
|
+
declare const deleteSchema: MaybeContext<BuildRESTFunction<typeof deleteSchema$1> & typeof deleteSchema$1>;
|
|
101
|
+
declare const querySchemas: MaybeContext<BuildRESTFunction<typeof querySchemas$1> & typeof querySchemas$1>;
|
|
102
|
+
declare const listSiteSchemas: MaybeContext<BuildRESTFunction<typeof listSiteSchemas$1> & typeof listSiteSchemas$1>;
|
|
103
|
+
/**
|
|
104
|
+
* Triggered when translation schema is created.
|
|
105
|
+
*/
|
|
106
|
+
declare const onSchemaCreated: ReturnType<typeof createEventModule<typeof publicOnSchemaCreated>>;
|
|
107
|
+
/**
|
|
108
|
+
* Triggered when translation schema is deleted.
|
|
109
|
+
*/
|
|
110
|
+
declare const onSchemaDeleted: ReturnType<typeof createEventModule<typeof publicOnSchemaDeleted>>;
|
|
111
|
+
/**
|
|
112
|
+
* Triggered when translation schema is updated.
|
|
113
|
+
*/
|
|
114
|
+
declare const onSchemaUpdated: ReturnType<typeof createEventModule<typeof publicOnSchemaUpdated>>;
|
|
115
|
+
|
|
116
|
+
export { GetSchemaByKeyIdentifiers, GetSchemaByKeyResponse, ListSiteSchemasOptions, ListSiteSchemasResponse, QuerySchemasOptions, Schema, SchemasQueryBuilder, UpdateSchema, createSchema, deleteSchema, getSchema, getSchemaByKey, listSiteSchemas, onSchemaCreated, onSchemaDeleted, onSchemaUpdated, querySchemas, updateSchema };
|