@wix/multilingual 1.0.20 → 1.0.22
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/context.d.ts +1 -0
- package/build/cjs/context.js +2 -1
- package/build/cjs/context.js.map +1 -1
- package/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +2 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +2 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/es/context.d.ts +1 -0
- package/build/es/context.js +1 -0
- package/build/es/context.js.map +1 -1
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +1 -0
- package/build/es/index.js.map +1 -1
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +1 -0
- package/build/es/meta.js.map +1 -1
- package/package.json +8 -7
- package/type-bundles/context.bundle.d.ts +515 -45
- package/type-bundles/index.bundle.d.ts +515 -45
- package/type-bundles/meta.bundle.d.ts +40 -1
|
@@ -1,3 +1,517 @@
|
|
|
1
|
+
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
2
|
+
interface HttpClient {
|
|
3
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
4
|
+
fetchWithAuth: typeof fetch;
|
|
5
|
+
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
6
|
+
}
|
|
7
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
8
|
+
type HttpResponse<T = any> = {
|
|
9
|
+
data: T;
|
|
10
|
+
status: number;
|
|
11
|
+
statusText: string;
|
|
12
|
+
headers: any;
|
|
13
|
+
request?: any;
|
|
14
|
+
};
|
|
15
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
16
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
17
|
+
url: string;
|
|
18
|
+
data?: Data;
|
|
19
|
+
params?: URLSearchParams;
|
|
20
|
+
} & APIMetadata;
|
|
21
|
+
type APIMetadata = {
|
|
22
|
+
methodFqn?: string;
|
|
23
|
+
entityFqdn?: string;
|
|
24
|
+
packageName?: string;
|
|
25
|
+
};
|
|
26
|
+
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
27
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
28
|
+
__type: 'event-definition';
|
|
29
|
+
type: Type;
|
|
30
|
+
isDomainEvent?: boolean;
|
|
31
|
+
transformations?: (envelope: unknown) => Payload;
|
|
32
|
+
__payload: Payload;
|
|
33
|
+
};
|
|
34
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
35
|
+
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
36
|
+
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
37
|
+
|
|
38
|
+
declare global {
|
|
39
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
40
|
+
interface SymbolConstructor {
|
|
41
|
+
readonly observable: symbol;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
interface Mapper {
|
|
46
|
+
_id?: string | null;
|
|
47
|
+
/** The FQDN of the entity the mapper refer to of exist */
|
|
48
|
+
entityFqdn?: string;
|
|
49
|
+
/** The entity fqn - this is unique across wix */
|
|
50
|
+
entityFqn?: string;
|
|
51
|
+
/** The appDefId that the entity belongs to */
|
|
52
|
+
appId?: string;
|
|
53
|
+
/** A list of fields to translate from the entity */
|
|
54
|
+
fields?: MapperField[];
|
|
55
|
+
/** The name of field that hold the parent name (if exist) */
|
|
56
|
+
groupByNameFieldId?: string | null;
|
|
57
|
+
/** Flag to turn off sync data to localization upon domain events */
|
|
58
|
+
ignoreDomainEvents?: boolean | null;
|
|
59
|
+
/** The segment of the entity */
|
|
60
|
+
segment?: string | null;
|
|
61
|
+
}
|
|
62
|
+
interface MapperField {
|
|
63
|
+
/** The field FQN */
|
|
64
|
+
_id?: string;
|
|
65
|
+
/** The field Type as it's shown in localization schema */
|
|
66
|
+
type?: FieldType$1;
|
|
67
|
+
/** If the field is part of a repeated fields */
|
|
68
|
+
sequencePath?: SequencePath[];
|
|
69
|
+
/** Option to override the field mask (the default is the id) */
|
|
70
|
+
overrideMask?: string | null;
|
|
71
|
+
}
|
|
72
|
+
declare enum FieldType$1 {
|
|
73
|
+
/** Undefined field type */
|
|
74
|
+
UNDEFINED_TYPE = "UNDEFINED_TYPE",
|
|
75
|
+
/** Short text TEXT */
|
|
76
|
+
SHORT_TEXT = "SHORT_TEXT",
|
|
77
|
+
/** Long Plain Text TEXT */
|
|
78
|
+
LONG_TEXT = "LONG_TEXT",
|
|
79
|
+
/** Long text including styles, images, links and more... HTML */
|
|
80
|
+
RICH_TEXT = "RICH_TEXT",
|
|
81
|
+
/** Wix Rich-Content-Editor format RICO */
|
|
82
|
+
RICH_CONTENT_EDITOR = "RICH_CONTENT_EDITOR",
|
|
83
|
+
/** Choose one from many options CSV TEXT */
|
|
84
|
+
SELECTION = "SELECTION",
|
|
85
|
+
/** Choose multi items from many options */
|
|
86
|
+
MULTI_SELECTION = "MULTI_SELECTION",
|
|
87
|
+
/** Wix document media item */
|
|
88
|
+
DOCUMENT = "DOCUMENT",
|
|
89
|
+
/** Wix Image media item */
|
|
90
|
+
IMAGE = "IMAGE",
|
|
91
|
+
/** Wix Video media item */
|
|
92
|
+
VIDEO = "VIDEO",
|
|
93
|
+
/** Image URL without metadata */
|
|
94
|
+
IMAGE_LINK = "IMAGE_LINK",
|
|
95
|
+
/** contain an XML representation of an entity or part of it */
|
|
96
|
+
XML = "XML"
|
|
97
|
+
}
|
|
98
|
+
interface SequencePath {
|
|
99
|
+
/** The name of the sequence the field is a part of */
|
|
100
|
+
name?: string;
|
|
101
|
+
/** The name of the field hold the id in the entity */
|
|
102
|
+
fieldId?: string;
|
|
103
|
+
}
|
|
104
|
+
interface Empty$2 {
|
|
105
|
+
}
|
|
106
|
+
interface DomainEvent$2 extends DomainEventBodyOneOf$2 {
|
|
107
|
+
createdEvent?: EntityCreatedEvent$2;
|
|
108
|
+
updatedEvent?: EntityUpdatedEvent$2;
|
|
109
|
+
deletedEvent?: EntityDeletedEvent$2;
|
|
110
|
+
actionEvent?: ActionEvent$2;
|
|
111
|
+
/**
|
|
112
|
+
* Unique event ID.
|
|
113
|
+
* Allows clients to ignore duplicate webhooks.
|
|
114
|
+
*/
|
|
115
|
+
_id?: string;
|
|
116
|
+
/**
|
|
117
|
+
* Assumes actions are also always typed to an entity_type
|
|
118
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
119
|
+
*/
|
|
120
|
+
entityFqdn?: string;
|
|
121
|
+
/**
|
|
122
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
123
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
124
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
125
|
+
*/
|
|
126
|
+
slug?: string;
|
|
127
|
+
/** ID of the entity associated with the event. */
|
|
128
|
+
entityId?: string;
|
|
129
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
130
|
+
eventTime?: Date;
|
|
131
|
+
/**
|
|
132
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
133
|
+
* (for example, GDPR).
|
|
134
|
+
*/
|
|
135
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
136
|
+
/** If present, indicates the action that triggered the event. */
|
|
137
|
+
originatedFrom?: string | null;
|
|
138
|
+
/**
|
|
139
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
140
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
141
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
142
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
143
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
144
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
145
|
+
*/
|
|
146
|
+
entityEventSequence?: string | null;
|
|
147
|
+
}
|
|
148
|
+
/** @oneof */
|
|
149
|
+
interface DomainEventBodyOneOf$2 {
|
|
150
|
+
createdEvent?: EntityCreatedEvent$2;
|
|
151
|
+
updatedEvent?: EntityUpdatedEvent$2;
|
|
152
|
+
deletedEvent?: EntityDeletedEvent$2;
|
|
153
|
+
actionEvent?: ActionEvent$2;
|
|
154
|
+
}
|
|
155
|
+
interface EntityCreatedEvent$2 {
|
|
156
|
+
entity?: string;
|
|
157
|
+
}
|
|
158
|
+
interface RestoreInfo$2 {
|
|
159
|
+
deletedDate?: Date;
|
|
160
|
+
}
|
|
161
|
+
interface EntityUpdatedEvent$2 {
|
|
162
|
+
/**
|
|
163
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
164
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
165
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
166
|
+
*/
|
|
167
|
+
currentEntity?: string;
|
|
168
|
+
}
|
|
169
|
+
interface EntityDeletedEvent$2 {
|
|
170
|
+
/** Entity that was deleted */
|
|
171
|
+
deletedEntity?: string | null;
|
|
172
|
+
}
|
|
173
|
+
interface ActionEvent$2 {
|
|
174
|
+
body?: string;
|
|
175
|
+
}
|
|
176
|
+
interface LocalizedPublishedLanguageContentChanged {
|
|
177
|
+
/** The action that changed the content */
|
|
178
|
+
action?: LocalizationPublicAction;
|
|
179
|
+
/** token to identify the flow this event is part of and the total number of event in this flow. */
|
|
180
|
+
flowToken?: string | null;
|
|
181
|
+
}
|
|
182
|
+
interface LocalizedPublishedContent {
|
|
183
|
+
/** UUID identifier for content. */
|
|
184
|
+
contentId?: string;
|
|
185
|
+
/** compound key identifier for content. */
|
|
186
|
+
contentKey?: LocalizedContentKey;
|
|
187
|
+
/** content IETF BCP 47 language tag */
|
|
188
|
+
languageTag?: string;
|
|
189
|
+
/** localized content list of published fields. */
|
|
190
|
+
languagePublishedFields?: LocalizedPublishedContentField[];
|
|
191
|
+
/** Optional field that will group in the UI contents with the same group name */
|
|
192
|
+
groupByName?: string | null;
|
|
193
|
+
}
|
|
194
|
+
interface LocalizedContentKey {
|
|
195
|
+
/** Schema unique key identifier */
|
|
196
|
+
schemaKey?: SchemaKey$1;
|
|
197
|
+
/** Unique identifier that represents a specific entity in the app */
|
|
198
|
+
entityId?: string;
|
|
199
|
+
}
|
|
200
|
+
interface SchemaKey$1 {
|
|
201
|
+
/** ID of app that created the schema. */
|
|
202
|
+
appId?: string;
|
|
203
|
+
/** Unique name defined by the creator app, used to distinguish between different entities in the the app domain. */
|
|
204
|
+
entityType?: string;
|
|
205
|
+
/** Scope schema is defined in (Global/Site) */
|
|
206
|
+
scope?: SchemaScope$1;
|
|
207
|
+
}
|
|
208
|
+
declare enum SchemaScope$1 {
|
|
209
|
+
/** Global schema, relevant to all sites */
|
|
210
|
+
GLOBAL = "GLOBAL",
|
|
211
|
+
/** Site schema, relevant to specific site only */
|
|
212
|
+
SITE = "SITE"
|
|
213
|
+
}
|
|
214
|
+
/** contains only information relevant to UoU */
|
|
215
|
+
interface LocalizedPublishedContentField extends LocalizedPublishedContentFieldValueOneOf {
|
|
216
|
+
/** Field actual localized content as simple text type */
|
|
217
|
+
textValue?: string;
|
|
218
|
+
/** Field actual localized content as rich content editor type */
|
|
219
|
+
wixRichContentEditorValue?: string;
|
|
220
|
+
/** Field actual localized content as media type (image, video or document) */
|
|
221
|
+
mediaValue?: MediaItem;
|
|
222
|
+
/** Field unique identifier. This id has to fit to a schema field id. */
|
|
223
|
+
_id?: string;
|
|
224
|
+
/** In case field is reachable via sequence/s, this array represents all the sequences names in the path, and their corresponding item id. */
|
|
225
|
+
sequencePath?: FieldSequence[];
|
|
226
|
+
}
|
|
227
|
+
/** @oneof */
|
|
228
|
+
interface LocalizedPublishedContentFieldValueOneOf {
|
|
229
|
+
/** Field actual localized content as simple text type */
|
|
230
|
+
textValue?: string;
|
|
231
|
+
/** Field actual localized content as rich content editor type */
|
|
232
|
+
wixRichContentEditorValue?: string;
|
|
233
|
+
/** Field actual localized content as media type (image, video or document) */
|
|
234
|
+
mediaValue?: MediaItem;
|
|
235
|
+
}
|
|
236
|
+
interface MediaItem extends MediaItemMediaOneOf {
|
|
237
|
+
/** Image media item */
|
|
238
|
+
image?: string;
|
|
239
|
+
/** Video media item */
|
|
240
|
+
video?: string;
|
|
241
|
+
/** Document media item */
|
|
242
|
+
document?: string;
|
|
243
|
+
}
|
|
244
|
+
/** @oneof */
|
|
245
|
+
interface MediaItemMediaOneOf {
|
|
246
|
+
/** Image media item */
|
|
247
|
+
image?: string;
|
|
248
|
+
/** Video media item */
|
|
249
|
+
video?: string;
|
|
250
|
+
/** Document media item */
|
|
251
|
+
document?: string;
|
|
252
|
+
}
|
|
253
|
+
interface VideoResolution$1 {
|
|
254
|
+
/** Video URL. */
|
|
255
|
+
url?: string;
|
|
256
|
+
/** Video height. */
|
|
257
|
+
height?: number;
|
|
258
|
+
/** Video width. */
|
|
259
|
+
width?: number;
|
|
260
|
+
/** Video format for example, mp4, hls. */
|
|
261
|
+
format?: string;
|
|
262
|
+
}
|
|
263
|
+
interface FieldSequence {
|
|
264
|
+
/** Name of sequence */
|
|
265
|
+
seqName?: string;
|
|
266
|
+
/** Id of relevant item in the sequence */
|
|
267
|
+
itemId?: string;
|
|
268
|
+
/** Optional field - in case set sequences will be ordered by priority index (best effort) */
|
|
269
|
+
priorityIndex?: number | null;
|
|
270
|
+
}
|
|
271
|
+
interface CreateOrUpdateAction {
|
|
272
|
+
/** The new Localized published state */
|
|
273
|
+
localizedPublishedContent?: LocalizedPublishedContent;
|
|
274
|
+
}
|
|
275
|
+
interface DeleteAction {
|
|
276
|
+
/** compound key identifier for removed content. */
|
|
277
|
+
contentKey?: LocalizedContentKey;
|
|
278
|
+
/** content IETF BCP 47 language tag */
|
|
279
|
+
languageTag?: string;
|
|
280
|
+
}
|
|
281
|
+
interface LocalizationPublicAction extends LocalizationPublicActionActionOneOf {
|
|
282
|
+
/** Content has changes in its fields */
|
|
283
|
+
createOrUpdateAction?: CreateOrUpdateAction;
|
|
284
|
+
/** Content deleted */
|
|
285
|
+
deleteAction?: DeleteAction;
|
|
286
|
+
}
|
|
287
|
+
/** @oneof */
|
|
288
|
+
interface LocalizationPublicActionActionOneOf {
|
|
289
|
+
/** Content has changes in its fields */
|
|
290
|
+
createOrUpdateAction?: CreateOrUpdateAction;
|
|
291
|
+
/** Content deleted */
|
|
292
|
+
deleteAction?: DeleteAction;
|
|
293
|
+
}
|
|
294
|
+
interface CreateOrUpdateMapperRequest {
|
|
295
|
+
/** A mapper to create or update if already exist */
|
|
296
|
+
mapper?: Mapper;
|
|
297
|
+
}
|
|
298
|
+
interface CreateOrUpdateMapperResponse {
|
|
299
|
+
}
|
|
300
|
+
interface GetEntityMapperRequest {
|
|
301
|
+
/** App id of the mapper requested */
|
|
302
|
+
appId?: string;
|
|
303
|
+
/** Entity fqn of the mapper requested */
|
|
304
|
+
entityFqn?: string;
|
|
305
|
+
}
|
|
306
|
+
interface GetEntityMapperResponse {
|
|
307
|
+
/** Mapper requested */
|
|
308
|
+
entityMapper?: Mapper;
|
|
309
|
+
}
|
|
310
|
+
interface DeleteEntityMapperRequest {
|
|
311
|
+
/** App id of the mapper to delete */
|
|
312
|
+
appId?: string;
|
|
313
|
+
/** Entity fqn of the mapper to delete */
|
|
314
|
+
entityFqn?: string;
|
|
315
|
+
}
|
|
316
|
+
interface DeleteEntityMapperResponse {
|
|
317
|
+
}
|
|
318
|
+
interface GetSubscribedTopicsRequest {
|
|
319
|
+
}
|
|
320
|
+
interface GetSubscribedTopicsResponse {
|
|
321
|
+
/** List of subscribed topics */
|
|
322
|
+
topics?: string[];
|
|
323
|
+
}
|
|
324
|
+
interface MessageEnvelope$2 {
|
|
325
|
+
/** App instance ID. */
|
|
326
|
+
instanceId?: string | null;
|
|
327
|
+
/** Event type. */
|
|
328
|
+
eventType?: string;
|
|
329
|
+
/** The identification type and identity data. */
|
|
330
|
+
identity?: IdentificationData$2;
|
|
331
|
+
/** Stringify payload. */
|
|
332
|
+
data?: string;
|
|
333
|
+
}
|
|
334
|
+
interface IdentificationData$2 extends IdentificationDataIdOneOf$2 {
|
|
335
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
336
|
+
anonymousVisitorId?: string;
|
|
337
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
338
|
+
memberId?: string;
|
|
339
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
340
|
+
wixUserId?: string;
|
|
341
|
+
/** ID of an app. */
|
|
342
|
+
appId?: string;
|
|
343
|
+
/** @readonly */
|
|
344
|
+
identityType?: WebhookIdentityType$2;
|
|
345
|
+
}
|
|
346
|
+
/** @oneof */
|
|
347
|
+
interface IdentificationDataIdOneOf$2 {
|
|
348
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
349
|
+
anonymousVisitorId?: string;
|
|
350
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
351
|
+
memberId?: string;
|
|
352
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
353
|
+
wixUserId?: string;
|
|
354
|
+
/** ID of an app. */
|
|
355
|
+
appId?: string;
|
|
356
|
+
}
|
|
357
|
+
declare enum WebhookIdentityType$2 {
|
|
358
|
+
UNKNOWN = "UNKNOWN",
|
|
359
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
360
|
+
MEMBER = "MEMBER",
|
|
361
|
+
WIX_USER = "WIX_USER",
|
|
362
|
+
APP = "APP"
|
|
363
|
+
}
|
|
364
|
+
interface HtmlNewRevisionSavedMessage {
|
|
365
|
+
/** HTML Site ID */
|
|
366
|
+
siteId?: string;
|
|
367
|
+
/** Newly saved revision */
|
|
368
|
+
revision?: string;
|
|
369
|
+
/** Restored from revision */
|
|
370
|
+
restoredFrom?: string | null;
|
|
371
|
+
/** Optional meta site id */
|
|
372
|
+
metaSiteId?: string | null;
|
|
373
|
+
/** Date that this version was updated (same as created) */
|
|
374
|
+
updateDate?: string;
|
|
375
|
+
/** determine whether this site uses responsive editor */
|
|
376
|
+
isResponsive?: boolean;
|
|
377
|
+
/** optional branch id if revision saved on branch */
|
|
378
|
+
branchId?: string | null;
|
|
379
|
+
/** determine if the new revision is a result of override save */
|
|
380
|
+
overrideSave?: boolean;
|
|
381
|
+
/** Optional last transaction id */
|
|
382
|
+
lastTransactionId?: string | null;
|
|
383
|
+
/** optional branch id if revision restored from branch */
|
|
384
|
+
restoredFromBranchId?: string | null;
|
|
385
|
+
/** information of revision prior to save revision operation */
|
|
386
|
+
lastRevisionInfo?: RevisionInfo;
|
|
387
|
+
/** new revision pages */
|
|
388
|
+
pages?: Page[];
|
|
389
|
+
/** the pages that were changed from the last save. Operations such as clone and restore will return an empty response at the moment. */
|
|
390
|
+
changedPages?: ChangedPages;
|
|
391
|
+
/** id of the main page of the site */
|
|
392
|
+
mainPageId?: string;
|
|
393
|
+
}
|
|
394
|
+
interface RevisionInfo {
|
|
395
|
+
/** revision number */
|
|
396
|
+
revision?: string;
|
|
397
|
+
/** last_transaction_id of revision */
|
|
398
|
+
lastTransactionId?: string | null;
|
|
399
|
+
}
|
|
400
|
+
interface Page {
|
|
401
|
+
/** Page's Id */
|
|
402
|
+
_id?: string;
|
|
403
|
+
}
|
|
404
|
+
interface ChangedPages {
|
|
405
|
+
/** list of updated_pages */
|
|
406
|
+
updatedPages?: Page[];
|
|
407
|
+
/** list of deleted_pages */
|
|
408
|
+
deletedPages?: Page[];
|
|
409
|
+
}
|
|
410
|
+
interface SyncEditorDataRequest {
|
|
411
|
+
/** an optional filter for syncing the content */
|
|
412
|
+
syncFilter?: SyncFilter;
|
|
413
|
+
}
|
|
414
|
+
interface SyncFilter {
|
|
415
|
+
/** content IETF BCP 47 language tag */
|
|
416
|
+
languageTag?: string;
|
|
417
|
+
}
|
|
418
|
+
interface SyncEditorDataResponse {
|
|
419
|
+
}
|
|
420
|
+
interface PublishSiteTranslationsRequest {
|
|
421
|
+
/** A language to publish it's language */
|
|
422
|
+
language?: string;
|
|
423
|
+
}
|
|
424
|
+
interface PublishSiteTranslationsResponse {
|
|
425
|
+
}
|
|
426
|
+
interface V1CreateOrUpdateMapperRequest {
|
|
427
|
+
/** A mapper to create or update if already exist */
|
|
428
|
+
mapper?: Mapper;
|
|
429
|
+
}
|
|
430
|
+
interface V1CreateOrUpdateMapperResponse {
|
|
431
|
+
}
|
|
432
|
+
interface GetMapperRequest {
|
|
433
|
+
/** The mapper type requested */
|
|
434
|
+
entityType?: string;
|
|
435
|
+
}
|
|
436
|
+
interface GetMapperResponse {
|
|
437
|
+
/** The mapper with the entity type requested */
|
|
438
|
+
mapper?: Mapper;
|
|
439
|
+
}
|
|
440
|
+
interface DeleteMapperRequest {
|
|
441
|
+
/** The entity type to delete from the service */
|
|
442
|
+
entityType?: string;
|
|
443
|
+
}
|
|
444
|
+
interface DeleteMapperResponse {
|
|
445
|
+
}
|
|
446
|
+
interface ListMappersRequest {
|
|
447
|
+
}
|
|
448
|
+
interface ListMappersResponse {
|
|
449
|
+
/** all mappers known to editor adapter */
|
|
450
|
+
mappers?: Mapper[];
|
|
451
|
+
}
|
|
452
|
+
interface StressDMRequest {
|
|
453
|
+
/** the meta site id to stress */
|
|
454
|
+
metaSiteId?: string;
|
|
455
|
+
}
|
|
456
|
+
interface StressDMResponse {
|
|
457
|
+
}
|
|
458
|
+
interface SyncEditorDataOptions {
|
|
459
|
+
/** an optional filter for syncing the content */
|
|
460
|
+
syncFilter?: SyncFilter;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
declare function createRESTModule$4<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
464
|
+
|
|
465
|
+
declare const syncEditorData: ReturnType<typeof createRESTModule$4<typeof publicSyncEditorData>>;
|
|
466
|
+
|
|
467
|
+
type context$4_ChangedPages = ChangedPages;
|
|
468
|
+
type context$4_CreateOrUpdateAction = CreateOrUpdateAction;
|
|
469
|
+
type context$4_CreateOrUpdateMapperRequest = CreateOrUpdateMapperRequest;
|
|
470
|
+
type context$4_CreateOrUpdateMapperResponse = CreateOrUpdateMapperResponse;
|
|
471
|
+
type context$4_DeleteAction = DeleteAction;
|
|
472
|
+
type context$4_DeleteEntityMapperRequest = DeleteEntityMapperRequest;
|
|
473
|
+
type context$4_DeleteEntityMapperResponse = DeleteEntityMapperResponse;
|
|
474
|
+
type context$4_DeleteMapperRequest = DeleteMapperRequest;
|
|
475
|
+
type context$4_DeleteMapperResponse = DeleteMapperResponse;
|
|
476
|
+
type context$4_FieldSequence = FieldSequence;
|
|
477
|
+
type context$4_GetEntityMapperRequest = GetEntityMapperRequest;
|
|
478
|
+
type context$4_GetEntityMapperResponse = GetEntityMapperResponse;
|
|
479
|
+
type context$4_GetMapperRequest = GetMapperRequest;
|
|
480
|
+
type context$4_GetMapperResponse = GetMapperResponse;
|
|
481
|
+
type context$4_GetSubscribedTopicsRequest = GetSubscribedTopicsRequest;
|
|
482
|
+
type context$4_GetSubscribedTopicsResponse = GetSubscribedTopicsResponse;
|
|
483
|
+
type context$4_HtmlNewRevisionSavedMessage = HtmlNewRevisionSavedMessage;
|
|
484
|
+
type context$4_ListMappersRequest = ListMappersRequest;
|
|
485
|
+
type context$4_ListMappersResponse = ListMappersResponse;
|
|
486
|
+
type context$4_LocalizationPublicAction = LocalizationPublicAction;
|
|
487
|
+
type context$4_LocalizationPublicActionActionOneOf = LocalizationPublicActionActionOneOf;
|
|
488
|
+
type context$4_LocalizedContentKey = LocalizedContentKey;
|
|
489
|
+
type context$4_LocalizedPublishedContent = LocalizedPublishedContent;
|
|
490
|
+
type context$4_LocalizedPublishedContentField = LocalizedPublishedContentField;
|
|
491
|
+
type context$4_LocalizedPublishedContentFieldValueOneOf = LocalizedPublishedContentFieldValueOneOf;
|
|
492
|
+
type context$4_LocalizedPublishedLanguageContentChanged = LocalizedPublishedLanguageContentChanged;
|
|
493
|
+
type context$4_Mapper = Mapper;
|
|
494
|
+
type context$4_MapperField = MapperField;
|
|
495
|
+
type context$4_MediaItem = MediaItem;
|
|
496
|
+
type context$4_MediaItemMediaOneOf = MediaItemMediaOneOf;
|
|
497
|
+
type context$4_Page = Page;
|
|
498
|
+
type context$4_PublishSiteTranslationsRequest = PublishSiteTranslationsRequest;
|
|
499
|
+
type context$4_PublishSiteTranslationsResponse = PublishSiteTranslationsResponse;
|
|
500
|
+
type context$4_RevisionInfo = RevisionInfo;
|
|
501
|
+
type context$4_SequencePath = SequencePath;
|
|
502
|
+
type context$4_StressDMRequest = StressDMRequest;
|
|
503
|
+
type context$4_StressDMResponse = StressDMResponse;
|
|
504
|
+
type context$4_SyncEditorDataOptions = SyncEditorDataOptions;
|
|
505
|
+
type context$4_SyncEditorDataRequest = SyncEditorDataRequest;
|
|
506
|
+
type context$4_SyncEditorDataResponse = SyncEditorDataResponse;
|
|
507
|
+
type context$4_SyncFilter = SyncFilter;
|
|
508
|
+
type context$4_V1CreateOrUpdateMapperRequest = V1CreateOrUpdateMapperRequest;
|
|
509
|
+
type context$4_V1CreateOrUpdateMapperResponse = V1CreateOrUpdateMapperResponse;
|
|
510
|
+
declare const context$4_syncEditorData: typeof syncEditorData;
|
|
511
|
+
declare namespace context$4 {
|
|
512
|
+
export { type ActionEvent$2 as ActionEvent, type context$4_ChangedPages as ChangedPages, type context$4_CreateOrUpdateAction as CreateOrUpdateAction, type context$4_CreateOrUpdateMapperRequest as CreateOrUpdateMapperRequest, type context$4_CreateOrUpdateMapperResponse as CreateOrUpdateMapperResponse, type context$4_DeleteAction as DeleteAction, type context$4_DeleteEntityMapperRequest as DeleteEntityMapperRequest, type context$4_DeleteEntityMapperResponse as DeleteEntityMapperResponse, type context$4_DeleteMapperRequest as DeleteMapperRequest, type context$4_DeleteMapperResponse as DeleteMapperResponse, type DomainEvent$2 as DomainEvent, type DomainEventBodyOneOf$2 as DomainEventBodyOneOf, type Empty$2 as Empty, type EntityCreatedEvent$2 as EntityCreatedEvent, type EntityDeletedEvent$2 as EntityDeletedEvent, type EntityUpdatedEvent$2 as EntityUpdatedEvent, type context$4_FieldSequence as FieldSequence, FieldType$1 as FieldType, type context$4_GetEntityMapperRequest as GetEntityMapperRequest, type context$4_GetEntityMapperResponse as GetEntityMapperResponse, type context$4_GetMapperRequest as GetMapperRequest, type context$4_GetMapperResponse as GetMapperResponse, type context$4_GetSubscribedTopicsRequest as GetSubscribedTopicsRequest, type context$4_GetSubscribedTopicsResponse as GetSubscribedTopicsResponse, type context$4_HtmlNewRevisionSavedMessage as HtmlNewRevisionSavedMessage, type IdentificationData$2 as IdentificationData, type IdentificationDataIdOneOf$2 as IdentificationDataIdOneOf, type context$4_ListMappersRequest as ListMappersRequest, type context$4_ListMappersResponse as ListMappersResponse, type context$4_LocalizationPublicAction as LocalizationPublicAction, type context$4_LocalizationPublicActionActionOneOf as LocalizationPublicActionActionOneOf, type context$4_LocalizedContentKey as LocalizedContentKey, type context$4_LocalizedPublishedContent as LocalizedPublishedContent, type context$4_LocalizedPublishedContentField as LocalizedPublishedContentField, type context$4_LocalizedPublishedContentFieldValueOneOf as LocalizedPublishedContentFieldValueOneOf, type context$4_LocalizedPublishedLanguageContentChanged as LocalizedPublishedLanguageContentChanged, type context$4_Mapper as Mapper, type context$4_MapperField as MapperField, type context$4_MediaItem as MediaItem, type context$4_MediaItemMediaOneOf as MediaItemMediaOneOf, type MessageEnvelope$2 as MessageEnvelope, type context$4_Page as Page, type context$4_PublishSiteTranslationsRequest as PublishSiteTranslationsRequest, type context$4_PublishSiteTranslationsResponse as PublishSiteTranslationsResponse, type RestoreInfo$2 as RestoreInfo, type context$4_RevisionInfo as RevisionInfo, type SchemaKey$1 as SchemaKey, SchemaScope$1 as SchemaScope, type context$4_SequencePath as SequencePath, type context$4_StressDMRequest as StressDMRequest, type context$4_StressDMResponse as StressDMResponse, type context$4_SyncEditorDataOptions as SyncEditorDataOptions, type context$4_SyncEditorDataRequest as SyncEditorDataRequest, type context$4_SyncEditorDataResponse as SyncEditorDataResponse, type context$4_SyncFilter as SyncFilter, type context$4_V1CreateOrUpdateMapperRequest as V1CreateOrUpdateMapperRequest, type context$4_V1CreateOrUpdateMapperResponse as V1CreateOrUpdateMapperResponse, type VideoResolution$1 as VideoResolution, WebhookIdentityType$2 as WebhookIdentityType, context$4_syncEditorData as syncEditorData };
|
|
513
|
+
}
|
|
514
|
+
|
|
1
515
|
/**
|
|
2
516
|
* A translatable content is a unit of content to translate.
|
|
3
517
|
*
|
|
@@ -1895,50 +2409,6 @@ interface BulkMachineTranslateOptions {
|
|
|
1895
2409
|
contentToTranslate?: TranslatableContent[];
|
|
1896
2410
|
}
|
|
1897
2411
|
|
|
1898
|
-
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
1899
|
-
interface HttpClient {
|
|
1900
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
1901
|
-
fetchWithAuth: typeof fetch;
|
|
1902
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
1903
|
-
}
|
|
1904
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
1905
|
-
type HttpResponse<T = any> = {
|
|
1906
|
-
data: T;
|
|
1907
|
-
status: number;
|
|
1908
|
-
statusText: string;
|
|
1909
|
-
headers: any;
|
|
1910
|
-
request?: any;
|
|
1911
|
-
};
|
|
1912
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
1913
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
1914
|
-
url: string;
|
|
1915
|
-
data?: Data;
|
|
1916
|
-
params?: URLSearchParams;
|
|
1917
|
-
} & APIMetadata;
|
|
1918
|
-
type APIMetadata = {
|
|
1919
|
-
methodFqn?: string;
|
|
1920
|
-
entityFqdn?: string;
|
|
1921
|
-
packageName?: string;
|
|
1922
|
-
};
|
|
1923
|
-
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
1924
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
1925
|
-
__type: 'event-definition';
|
|
1926
|
-
type: Type;
|
|
1927
|
-
isDomainEvent?: boolean;
|
|
1928
|
-
transformations?: (envelope: unknown) => Payload;
|
|
1929
|
-
__payload: Payload;
|
|
1930
|
-
};
|
|
1931
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
1932
|
-
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
1933
|
-
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
1934
|
-
|
|
1935
|
-
declare global {
|
|
1936
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
1937
|
-
interface SymbolConstructor {
|
|
1938
|
-
readonly observable: symbol;
|
|
1939
|
-
}
|
|
1940
|
-
}
|
|
1941
|
-
|
|
1942
2412
|
declare function createRESTModule$3<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
1943
2413
|
|
|
1944
2414
|
declare const machineTranslate: ReturnType<typeof createRESTModule$3<typeof publicMachineTranslate>>;
|
|
@@ -6038,4 +6508,4 @@ declare namespace context {
|
|
|
6038
6508
|
export { type context_ActionEvent as ActionEvent, type context_Asset as Asset, type context_BaseEventMetadata as BaseEventMetadata, type context_CreateSchemaRequest as CreateSchemaRequest, type context_CreateSchemaResponse as CreateSchemaResponse, type context_CursorPaging as CursorPaging, type context_CursorPagingMetadata as CursorPagingMetadata, type context_CursorQuery as CursorQuery, type context_CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOf, type context_Cursors as Cursors, type context_DeleteContext as DeleteContext, type context_DeleteSchemaRequest as DeleteSchemaRequest, type context_DeleteSchemaResponse as DeleteSchemaResponse, context_DeleteStatus as DeleteStatus, type context_DomainEvent as DomainEvent, type context_DomainEventBodyOneOf as DomainEventBodyOneOf, type context_Empty as Empty, type context_EntityCreatedEvent as EntityCreatedEvent, type context_EntityDeletedEvent as EntityDeletedEvent, type context_EntityUpdatedEvent as EntityUpdatedEvent, type context_EventMetadata as EventMetadata, context_FieldType as FieldType, type context_GetSchemaByKey as GetSchemaByKey, type context_GetSchemaByKeyIdentifiers as GetSchemaByKeyIdentifiers, type context_GetSchemaByKeyRequest as GetSchemaByKeyRequest, type context_GetSchemaByKeyResponse as GetSchemaByKeyResponse, type context_GetSchemaByKeyResponseNonNullableFields as GetSchemaByKeyResponseNonNullableFields, type context_GetSchemaRequest as GetSchemaRequest, type context_GetSchemaResponse as GetSchemaResponse, type context_GetSchemaResponseNonNullableFields as GetSchemaResponseNonNullableFields, type context_IdentificationData as IdentificationData, type context_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type context_ListSiteSchemasOptions as ListSiteSchemasOptions, type context_ListSiteSchemasRequest as ListSiteSchemasRequest, type context_ListSiteSchemasResponse as ListSiteSchemasResponse, type context_ListSiteSchemasResponseNonNullableFields as ListSiteSchemasResponseNonNullableFields, type context_MessageEnvelope as MessageEnvelope, type context_MetaSiteSpecialEvent as MetaSiteSpecialEvent, type context_MetaSiteSpecialEventPayloadOneOf as MetaSiteSpecialEventPayloadOneOf, context_Namespace as Namespace, type context_NamespaceChanged as NamespaceChanged, type context_PreviewFields as PreviewFields, type context_QuerySchemasOptions as QuerySchemasOptions, type context_QuerySchemasRequest as QuerySchemasRequest, type context_QuerySchemasResponse as QuerySchemasResponse, type context_QuerySchemasResponseNonNullableFields as QuerySchemasResponseNonNullableFields, type context_RestoreInfo as RestoreInfo, type context_Schema as Schema, type context_SchemaCreatedEnvelope as SchemaCreatedEnvelope, type context_SchemaDeletedEnvelope as SchemaDeletedEnvelope, type context_SchemaField as SchemaField, type context_SchemaKey as SchemaKey, type context_SchemaNonNullableFields as SchemaNonNullableFields, context_SchemaScope as SchemaScope, type context_SchemaUpdatedEnvelope as SchemaUpdatedEnvelope, type context_SchemasQueryBuilder as SchemasQueryBuilder, type context_SchemasQueryResult as SchemasQueryResult, type context_ServiceProvisioned as ServiceProvisioned, type context_ServiceRemoved as ServiceRemoved, type context_SiteCreated as SiteCreated, context_SiteCreatedContext as SiteCreatedContext, type context_SiteDeleted as SiteDeleted, type context_SiteHardDeleted as SiteHardDeleted, type context_SiteMarkedAsTemplate as SiteMarkedAsTemplate, type context_SiteMarkedAsWixSite as SiteMarkedAsWixSite, type context_SitePublished as SitePublished, type context_SiteRenamed as SiteRenamed, type context_SiteTransferred as SiteTransferred, type context_SiteUndeleted as SiteUndeleted, type context_SiteUnpublished as SiteUnpublished, context_SortOrder as SortOrder, type context_Sorting as Sorting, context_State as State, type context_StudioAssigned as StudioAssigned, type context_StudioUnassigned as StudioUnassigned, type context_UpdateSchemaRequest as UpdateSchemaRequest, type context_UpdateSchemaResponse as UpdateSchemaResponse, context_WebhookIdentityType as WebhookIdentityType, context_getSchema as getSchema, context_getSchemaByKey as getSchemaByKey, context_listSiteSchemas as listSiteSchemas, context_onSchemaCreated as onSchemaCreated, context_onSchemaDeleted as onSchemaDeleted, context_onSchemaUpdated as onSchemaUpdated, context_querySchemas as querySchemas };
|
|
6039
6509
|
}
|
|
6040
6510
|
|
|
6041
|
-
export { context$3 as machineTranslation, context$2 as siteTranslator, context$1 as translationContents, context as translationSchemas };
|
|
6511
|
+
export { context$4 as entityMapper, context$3 as machineTranslation, context$2 as siteTranslator, context$1 as translationContents, context as translationSchemas };
|