@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 index_d$4_ChangedPages = ChangedPages;
|
|
468
|
+
type index_d$4_CreateOrUpdateAction = CreateOrUpdateAction;
|
|
469
|
+
type index_d$4_CreateOrUpdateMapperRequest = CreateOrUpdateMapperRequest;
|
|
470
|
+
type index_d$4_CreateOrUpdateMapperResponse = CreateOrUpdateMapperResponse;
|
|
471
|
+
type index_d$4_DeleteAction = DeleteAction;
|
|
472
|
+
type index_d$4_DeleteEntityMapperRequest = DeleteEntityMapperRequest;
|
|
473
|
+
type index_d$4_DeleteEntityMapperResponse = DeleteEntityMapperResponse;
|
|
474
|
+
type index_d$4_DeleteMapperRequest = DeleteMapperRequest;
|
|
475
|
+
type index_d$4_DeleteMapperResponse = DeleteMapperResponse;
|
|
476
|
+
type index_d$4_FieldSequence = FieldSequence;
|
|
477
|
+
type index_d$4_GetEntityMapperRequest = GetEntityMapperRequest;
|
|
478
|
+
type index_d$4_GetEntityMapperResponse = GetEntityMapperResponse;
|
|
479
|
+
type index_d$4_GetMapperRequest = GetMapperRequest;
|
|
480
|
+
type index_d$4_GetMapperResponse = GetMapperResponse;
|
|
481
|
+
type index_d$4_GetSubscribedTopicsRequest = GetSubscribedTopicsRequest;
|
|
482
|
+
type index_d$4_GetSubscribedTopicsResponse = GetSubscribedTopicsResponse;
|
|
483
|
+
type index_d$4_HtmlNewRevisionSavedMessage = HtmlNewRevisionSavedMessage;
|
|
484
|
+
type index_d$4_ListMappersRequest = ListMappersRequest;
|
|
485
|
+
type index_d$4_ListMappersResponse = ListMappersResponse;
|
|
486
|
+
type index_d$4_LocalizationPublicAction = LocalizationPublicAction;
|
|
487
|
+
type index_d$4_LocalizationPublicActionActionOneOf = LocalizationPublicActionActionOneOf;
|
|
488
|
+
type index_d$4_LocalizedContentKey = LocalizedContentKey;
|
|
489
|
+
type index_d$4_LocalizedPublishedContent = LocalizedPublishedContent;
|
|
490
|
+
type index_d$4_LocalizedPublishedContentField = LocalizedPublishedContentField;
|
|
491
|
+
type index_d$4_LocalizedPublishedContentFieldValueOneOf = LocalizedPublishedContentFieldValueOneOf;
|
|
492
|
+
type index_d$4_LocalizedPublishedLanguageContentChanged = LocalizedPublishedLanguageContentChanged;
|
|
493
|
+
type index_d$4_Mapper = Mapper;
|
|
494
|
+
type index_d$4_MapperField = MapperField;
|
|
495
|
+
type index_d$4_MediaItem = MediaItem;
|
|
496
|
+
type index_d$4_MediaItemMediaOneOf = MediaItemMediaOneOf;
|
|
497
|
+
type index_d$4_Page = Page;
|
|
498
|
+
type index_d$4_PublishSiteTranslationsRequest = PublishSiteTranslationsRequest;
|
|
499
|
+
type index_d$4_PublishSiteTranslationsResponse = PublishSiteTranslationsResponse;
|
|
500
|
+
type index_d$4_RevisionInfo = RevisionInfo;
|
|
501
|
+
type index_d$4_SequencePath = SequencePath;
|
|
502
|
+
type index_d$4_StressDMRequest = StressDMRequest;
|
|
503
|
+
type index_d$4_StressDMResponse = StressDMResponse;
|
|
504
|
+
type index_d$4_SyncEditorDataOptions = SyncEditorDataOptions;
|
|
505
|
+
type index_d$4_SyncEditorDataRequest = SyncEditorDataRequest;
|
|
506
|
+
type index_d$4_SyncEditorDataResponse = SyncEditorDataResponse;
|
|
507
|
+
type index_d$4_SyncFilter = SyncFilter;
|
|
508
|
+
type index_d$4_V1CreateOrUpdateMapperRequest = V1CreateOrUpdateMapperRequest;
|
|
509
|
+
type index_d$4_V1CreateOrUpdateMapperResponse = V1CreateOrUpdateMapperResponse;
|
|
510
|
+
declare const index_d$4_syncEditorData: typeof syncEditorData;
|
|
511
|
+
declare namespace index_d$4 {
|
|
512
|
+
export { type ActionEvent$2 as ActionEvent, type index_d$4_ChangedPages as ChangedPages, type index_d$4_CreateOrUpdateAction as CreateOrUpdateAction, type index_d$4_CreateOrUpdateMapperRequest as CreateOrUpdateMapperRequest, type index_d$4_CreateOrUpdateMapperResponse as CreateOrUpdateMapperResponse, type index_d$4_DeleteAction as DeleteAction, type index_d$4_DeleteEntityMapperRequest as DeleteEntityMapperRequest, type index_d$4_DeleteEntityMapperResponse as DeleteEntityMapperResponse, type index_d$4_DeleteMapperRequest as DeleteMapperRequest, type index_d$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 index_d$4_FieldSequence as FieldSequence, FieldType$1 as FieldType, type index_d$4_GetEntityMapperRequest as GetEntityMapperRequest, type index_d$4_GetEntityMapperResponse as GetEntityMapperResponse, type index_d$4_GetMapperRequest as GetMapperRequest, type index_d$4_GetMapperResponse as GetMapperResponse, type index_d$4_GetSubscribedTopicsRequest as GetSubscribedTopicsRequest, type index_d$4_GetSubscribedTopicsResponse as GetSubscribedTopicsResponse, type index_d$4_HtmlNewRevisionSavedMessage as HtmlNewRevisionSavedMessage, type IdentificationData$2 as IdentificationData, type IdentificationDataIdOneOf$2 as IdentificationDataIdOneOf, type index_d$4_ListMappersRequest as ListMappersRequest, type index_d$4_ListMappersResponse as ListMappersResponse, type index_d$4_LocalizationPublicAction as LocalizationPublicAction, type index_d$4_LocalizationPublicActionActionOneOf as LocalizationPublicActionActionOneOf, type index_d$4_LocalizedContentKey as LocalizedContentKey, type index_d$4_LocalizedPublishedContent as LocalizedPublishedContent, type index_d$4_LocalizedPublishedContentField as LocalizedPublishedContentField, type index_d$4_LocalizedPublishedContentFieldValueOneOf as LocalizedPublishedContentFieldValueOneOf, type index_d$4_LocalizedPublishedLanguageContentChanged as LocalizedPublishedLanguageContentChanged, type index_d$4_Mapper as Mapper, type index_d$4_MapperField as MapperField, type index_d$4_MediaItem as MediaItem, type index_d$4_MediaItemMediaOneOf as MediaItemMediaOneOf, type MessageEnvelope$2 as MessageEnvelope, type index_d$4_Page as Page, type index_d$4_PublishSiteTranslationsRequest as PublishSiteTranslationsRequest, type index_d$4_PublishSiteTranslationsResponse as PublishSiteTranslationsResponse, type RestoreInfo$2 as RestoreInfo, type index_d$4_RevisionInfo as RevisionInfo, type SchemaKey$1 as SchemaKey, SchemaScope$1 as SchemaScope, type index_d$4_SequencePath as SequencePath, type index_d$4_StressDMRequest as StressDMRequest, type index_d$4_StressDMResponse as StressDMResponse, type index_d$4_SyncEditorDataOptions as SyncEditorDataOptions, type index_d$4_SyncEditorDataRequest as SyncEditorDataRequest, type index_d$4_SyncEditorDataResponse as SyncEditorDataResponse, type index_d$4_SyncFilter as SyncFilter, type index_d$4_V1CreateOrUpdateMapperRequest as V1CreateOrUpdateMapperRequest, type index_d$4_V1CreateOrUpdateMapperResponse as V1CreateOrUpdateMapperResponse, type VideoResolution$1 as VideoResolution, WebhookIdentityType$2 as WebhookIdentityType, index_d$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 index_d {
|
|
|
6038
6508
|
export { type index_d_ActionEvent as ActionEvent, type index_d_Asset as Asset, type index_d_BaseEventMetadata as BaseEventMetadata, type index_d_CreateSchemaRequest as CreateSchemaRequest, type index_d_CreateSchemaResponse as CreateSchemaResponse, type index_d_CursorPaging as CursorPaging, type index_d_CursorPagingMetadata as CursorPagingMetadata, type index_d_CursorQuery as CursorQuery, type index_d_CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOf, type index_d_Cursors as Cursors, type index_d_DeleteContext as DeleteContext, type index_d_DeleteSchemaRequest as DeleteSchemaRequest, type index_d_DeleteSchemaResponse as DeleteSchemaResponse, index_d_DeleteStatus as DeleteStatus, type index_d_DomainEvent as DomainEvent, type index_d_DomainEventBodyOneOf as DomainEventBodyOneOf, type index_d_Empty as Empty, type index_d_EntityCreatedEvent as EntityCreatedEvent, type index_d_EntityDeletedEvent as EntityDeletedEvent, type index_d_EntityUpdatedEvent as EntityUpdatedEvent, type index_d_EventMetadata as EventMetadata, index_d_FieldType as FieldType, type index_d_GetSchemaByKey as GetSchemaByKey, type index_d_GetSchemaByKeyIdentifiers as GetSchemaByKeyIdentifiers, type index_d_GetSchemaByKeyRequest as GetSchemaByKeyRequest, type index_d_GetSchemaByKeyResponse as GetSchemaByKeyResponse, type index_d_GetSchemaByKeyResponseNonNullableFields as GetSchemaByKeyResponseNonNullableFields, type index_d_GetSchemaRequest as GetSchemaRequest, type index_d_GetSchemaResponse as GetSchemaResponse, type index_d_GetSchemaResponseNonNullableFields as GetSchemaResponseNonNullableFields, type index_d_IdentificationData as IdentificationData, type index_d_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type index_d_ListSiteSchemasOptions as ListSiteSchemasOptions, type index_d_ListSiteSchemasRequest as ListSiteSchemasRequest, type index_d_ListSiteSchemasResponse as ListSiteSchemasResponse, type index_d_ListSiteSchemasResponseNonNullableFields as ListSiteSchemasResponseNonNullableFields, type index_d_MessageEnvelope as MessageEnvelope, type index_d_MetaSiteSpecialEvent as MetaSiteSpecialEvent, type index_d_MetaSiteSpecialEventPayloadOneOf as MetaSiteSpecialEventPayloadOneOf, index_d_Namespace as Namespace, type index_d_NamespaceChanged as NamespaceChanged, type index_d_PreviewFields as PreviewFields, type index_d_QuerySchemasOptions as QuerySchemasOptions, type index_d_QuerySchemasRequest as QuerySchemasRequest, type index_d_QuerySchemasResponse as QuerySchemasResponse, type index_d_QuerySchemasResponseNonNullableFields as QuerySchemasResponseNonNullableFields, type index_d_RestoreInfo as RestoreInfo, type index_d_Schema as Schema, type index_d_SchemaCreatedEnvelope as SchemaCreatedEnvelope, type index_d_SchemaDeletedEnvelope as SchemaDeletedEnvelope, type index_d_SchemaField as SchemaField, type index_d_SchemaKey as SchemaKey, type index_d_SchemaNonNullableFields as SchemaNonNullableFields, index_d_SchemaScope as SchemaScope, type index_d_SchemaUpdatedEnvelope as SchemaUpdatedEnvelope, type index_d_SchemasQueryBuilder as SchemasQueryBuilder, type index_d_SchemasQueryResult as SchemasQueryResult, type index_d_ServiceProvisioned as ServiceProvisioned, type index_d_ServiceRemoved as ServiceRemoved, type index_d_SiteCreated as SiteCreated, index_d_SiteCreatedContext as SiteCreatedContext, type index_d_SiteDeleted as SiteDeleted, type index_d_SiteHardDeleted as SiteHardDeleted, type index_d_SiteMarkedAsTemplate as SiteMarkedAsTemplate, type index_d_SiteMarkedAsWixSite as SiteMarkedAsWixSite, type index_d_SitePublished as SitePublished, type index_d_SiteRenamed as SiteRenamed, type index_d_SiteTransferred as SiteTransferred, type index_d_SiteUndeleted as SiteUndeleted, type index_d_SiteUnpublished as SiteUnpublished, index_d_SortOrder as SortOrder, type index_d_Sorting as Sorting, index_d_State as State, type index_d_StudioAssigned as StudioAssigned, type index_d_StudioUnassigned as StudioUnassigned, type index_d_UpdateSchemaRequest as UpdateSchemaRequest, type index_d_UpdateSchemaResponse as UpdateSchemaResponse, index_d_WebhookIdentityType as WebhookIdentityType, index_d_getSchema as getSchema, index_d_getSchemaByKey as getSchemaByKey, index_d_listSiteSchemas as listSiteSchemas, index_d_onSchemaCreated as onSchemaCreated, index_d_onSchemaDeleted as onSchemaDeleted, index_d_onSchemaUpdated as onSchemaUpdated, index_d_querySchemas as querySchemas };
|
|
6039
6509
|
}
|
|
6040
6510
|
|
|
6041
|
-
export { index_d$3 as machineTranslation, index_d$2 as siteTranslator, index_d$1 as translationContents, index_d as translationSchemas };
|
|
6511
|
+
export { index_d$4 as entityMapper, index_d$3 as machineTranslation, index_d$2 as siteTranslator, index_d$1 as translationContents, index_d as translationSchemas };
|
|
@@ -1,3 +1,42 @@
|
|
|
1
|
+
interface SyncEditorDataRequest$1 {
|
|
2
|
+
/** an optional filter for syncing the content */
|
|
3
|
+
syncFilter?: SyncFilter$1;
|
|
4
|
+
}
|
|
5
|
+
interface SyncFilter$1 {
|
|
6
|
+
/** content IETF BCP 47 language tag */
|
|
7
|
+
languageTag?: string;
|
|
8
|
+
}
|
|
9
|
+
interface SyncEditorDataResponse$1 {
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface SyncEditorDataRequest {
|
|
13
|
+
/** an optional filter for syncing the content */
|
|
14
|
+
syncFilter?: SyncFilter;
|
|
15
|
+
}
|
|
16
|
+
interface SyncFilter {
|
|
17
|
+
/** content IETF BCP 47 language tag */
|
|
18
|
+
languageTag?: string;
|
|
19
|
+
}
|
|
20
|
+
interface SyncEditorDataResponse {
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
type __PublicMethodMetaInfo$4<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
24
|
+
getUrl: (context: any) => string;
|
|
25
|
+
httpMethod: K;
|
|
26
|
+
path: string;
|
|
27
|
+
pathParams: M;
|
|
28
|
+
__requestType: T;
|
|
29
|
+
__originalRequestType: S;
|
|
30
|
+
__responseType: Q;
|
|
31
|
+
__originalResponseType: R;
|
|
32
|
+
};
|
|
33
|
+
declare function syncEditorData(): __PublicMethodMetaInfo$4<'GET', {}, SyncEditorDataRequest, SyncEditorDataRequest$1, SyncEditorDataResponse, SyncEditorDataResponse$1>;
|
|
34
|
+
|
|
35
|
+
declare const meta$4_syncEditorData: typeof syncEditorData;
|
|
36
|
+
declare namespace meta$4 {
|
|
37
|
+
export { type __PublicMethodMetaInfo$4 as __PublicMethodMetaInfo, meta$4_syncEditorData as syncEditorData };
|
|
38
|
+
}
|
|
39
|
+
|
|
1
40
|
/**
|
|
2
41
|
* A translatable content is a unit of content to translate.
|
|
3
42
|
*
|
|
@@ -8954,4 +8993,4 @@ declare namespace meta {
|
|
|
8954
8993
|
export { type meta___PublicMethodMetaInfo as __PublicMethodMetaInfo, meta_getSchema as getSchema, meta_getSchemaByKey as getSchemaByKey, meta_listSiteSchemas as listSiteSchemas, meta_querySchemas as querySchemas };
|
|
8955
8994
|
}
|
|
8956
8995
|
|
|
8957
|
-
export { meta$3 as machineTranslation, meta$2 as siteTranslator, meta$1 as translationContents, meta as translationSchemas };
|
|
8996
|
+
export { meta$4 as entityMapper, meta$3 as machineTranslation, meta$2 as siteTranslator, meta$1 as translationContents, meta as translationSchemas };
|