@wix/forms 1.0.99 → 1.0.101
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/package.json +5 -6
- package/type-bundles/service-plugins-context.bundle.d.ts +12 -5
- package/type-bundles/service-plugins.bundle.d.ts +12 -5
- package/build/cjs/context.d.ts +0 -2
- package/build/cjs/context.js +0 -29
- package/build/cjs/context.js.map +0 -1
- package/build/cjs/index.d.ts +0 -2
- package/build/cjs/index.js +0 -29
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/meta.d.ts +0 -2
- package/build/cjs/meta.js +0 -29
- package/build/cjs/meta.js.map +0 -1
- package/build/es/context.d.ts +0 -2
- package/build/es/context.js +0 -3
- package/build/es/context.js.map +0 -1
- package/build/es/index.d.ts +0 -2
- package/build/es/index.js +0 -3
- package/build/es/index.js.map +0 -1
- package/build/es/meta.d.ts +0 -2
- package/build/es/meta.js +0 -3
- package/build/es/meta.js.map +0 -1
- package/type-bundles/context.bundle.d.ts +0 -1095
- package/type-bundles/index.bundle.d.ts +0 -4950
- package/type-bundles/meta.bundle.d.ts +0 -1624
|
@@ -1,1095 +0,0 @@
|
|
|
1
|
-
/** Form submission that was created or retrieved. */
|
|
2
|
-
interface FormSubmission$1 {
|
|
3
|
-
/**
|
|
4
|
-
* Submission ID.
|
|
5
|
-
* @readonly
|
|
6
|
-
*/
|
|
7
|
-
_id?: string | null;
|
|
8
|
-
/** ID of the form which the submission belongs to. */
|
|
9
|
-
formId?: string;
|
|
10
|
-
/**
|
|
11
|
-
* The app which the form submissions belong to. For example, the namespace for the Wix Forms app is `wix.form_app.form`. Call `Get Submission` to retrieve the namespace.
|
|
12
|
-
* @readonly
|
|
13
|
-
*/
|
|
14
|
-
namespace?: string;
|
|
15
|
-
/**
|
|
16
|
-
* Status of the submission.
|
|
17
|
-
* - `PENDING`: A submission is created, but has not yet been recorded in the Wix Forms collection.
|
|
18
|
-
* - `PAYMENT_WAITING`: A form submission requiring payment is created.
|
|
19
|
-
* - `PAYMENT_CANCELED`: An order of a form submission is canceled.
|
|
20
|
-
* - `CONFIRMED`: A submission is recorded in the Wix Forms collection.
|
|
21
|
-
*/
|
|
22
|
-
status?: SubmissionStatus$1;
|
|
23
|
-
/** Submission values where `key` is the form field and `value` is the data submitted for the given field. */
|
|
24
|
-
submissions?: Record<string, any>;
|
|
25
|
-
/**
|
|
26
|
-
* Date and time the form submission was created.
|
|
27
|
-
* @readonly
|
|
28
|
-
*/
|
|
29
|
-
_createdDate?: Date;
|
|
30
|
-
/**
|
|
31
|
-
* Date and time the form submission was updated.
|
|
32
|
-
* @readonly
|
|
33
|
-
*/
|
|
34
|
-
_updatedDate?: Date;
|
|
35
|
-
/**
|
|
36
|
-
* Revision number, which increments by 1 each time the form submission is updated. To prevent conflicting changes, the existing revision must be used when updating a form submission.
|
|
37
|
-
* @readonly
|
|
38
|
-
*/
|
|
39
|
-
revision?: string | null;
|
|
40
|
-
/**
|
|
41
|
-
* ID of the visitor that submitted the form.
|
|
42
|
-
* @readonly
|
|
43
|
-
*/
|
|
44
|
-
submitter?: Submitter$1;
|
|
45
|
-
/** Whether a site owner marked a submission as "seen". */
|
|
46
|
-
seen?: boolean;
|
|
47
|
-
/** Data extension object that holds users' and apps' fields. */
|
|
48
|
-
extendedFields?: ExtendedFields$1;
|
|
49
|
-
/**
|
|
50
|
-
* Order details. <br>
|
|
51
|
-
* <b>Note</b>: This object is only applicable when submittng a form in the Wix Payments app.
|
|
52
|
-
*/
|
|
53
|
-
orderDetails?: OrderDetails$1;
|
|
54
|
-
}
|
|
55
|
-
declare enum SubmissionStatus$1 {
|
|
56
|
-
UNDEFINED = "UNDEFINED",
|
|
57
|
-
PENDING = "PENDING",
|
|
58
|
-
CONFIRMED = "CONFIRMED",
|
|
59
|
-
PAYMENT_WAITING = "PAYMENT_WAITING",
|
|
60
|
-
PAYMENT_CANCELED = "PAYMENT_CANCELED"
|
|
61
|
-
}
|
|
62
|
-
interface Submitter$1 extends SubmitterSubmitterOneOf$1 {
|
|
63
|
-
/** Member ID. */
|
|
64
|
-
memberId?: string | null;
|
|
65
|
-
/** Visitor ID. */
|
|
66
|
-
visitorId?: string | null;
|
|
67
|
-
/** Application ID. */
|
|
68
|
-
applicationId?: string | null;
|
|
69
|
-
/** User ID. */
|
|
70
|
-
userId?: string | null;
|
|
71
|
-
}
|
|
72
|
-
/** @oneof */
|
|
73
|
-
interface SubmitterSubmitterOneOf$1 {
|
|
74
|
-
/** Member ID. */
|
|
75
|
-
memberId?: string | null;
|
|
76
|
-
/** Visitor ID. */
|
|
77
|
-
visitorId?: string | null;
|
|
78
|
-
/** Application ID. */
|
|
79
|
-
applicationId?: string | null;
|
|
80
|
-
/** User ID. */
|
|
81
|
-
userId?: string | null;
|
|
82
|
-
}
|
|
83
|
-
interface ExtendedFields$1 {
|
|
84
|
-
/**
|
|
85
|
-
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
86
|
-
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
87
|
-
*
|
|
88
|
-
* You can only access fields for which you have the appropriate permissions.
|
|
89
|
-
*
|
|
90
|
-
* Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
|
|
91
|
-
*/
|
|
92
|
-
namespaces?: Record<string, Record<string, any>>;
|
|
93
|
-
}
|
|
94
|
-
interface OrderDetails$1 {
|
|
95
|
-
/**
|
|
96
|
-
* ID of the order related to submission (only applicable if a form has payments).
|
|
97
|
-
* @readonly
|
|
98
|
-
*/
|
|
99
|
-
orderId?: string | null;
|
|
100
|
-
/**
|
|
101
|
-
* Order number.
|
|
102
|
-
* @readonly
|
|
103
|
-
*/
|
|
104
|
-
number?: string | null;
|
|
105
|
-
/**
|
|
106
|
-
* Currency.
|
|
107
|
-
* @readonly
|
|
108
|
-
*/
|
|
109
|
-
currency?: string | null;
|
|
110
|
-
/**
|
|
111
|
-
* Item subtotal.
|
|
112
|
-
* @readonly
|
|
113
|
-
*/
|
|
114
|
-
itemSubtotal?: string;
|
|
115
|
-
/**
|
|
116
|
-
* ID of the checkout related to submission (only applicable if a form has payments).
|
|
117
|
-
* @readonly
|
|
118
|
-
*/
|
|
119
|
-
checkoutId?: string;
|
|
120
|
-
}
|
|
121
|
-
interface IdentificationData$1 extends IdentificationDataIdOneOf$1 {
|
|
122
|
-
/** ID of a site visitor that has not logged in to the site. */
|
|
123
|
-
anonymousVisitorId?: string;
|
|
124
|
-
/** ID of a site visitor that has logged in to the site. */
|
|
125
|
-
memberId?: string;
|
|
126
|
-
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
127
|
-
wixUserId?: string;
|
|
128
|
-
/** ID of an app. */
|
|
129
|
-
appId?: string;
|
|
130
|
-
/** @readonly */
|
|
131
|
-
identityType?: WebhookIdentityType;
|
|
132
|
-
}
|
|
133
|
-
/** @oneof */
|
|
134
|
-
interface IdentificationDataIdOneOf$1 {
|
|
135
|
-
/** ID of a site visitor that has not logged in to the site. */
|
|
136
|
-
anonymousVisitorId?: string;
|
|
137
|
-
/** ID of a site visitor that has logged in to the site. */
|
|
138
|
-
memberId?: string;
|
|
139
|
-
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
140
|
-
wixUserId?: string;
|
|
141
|
-
/** ID of an app. */
|
|
142
|
-
appId?: string;
|
|
143
|
-
}
|
|
144
|
-
declare enum WebhookIdentityType {
|
|
145
|
-
UNKNOWN = "UNKNOWN",
|
|
146
|
-
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
147
|
-
MEMBER = "MEMBER",
|
|
148
|
-
WIX_USER = "WIX_USER",
|
|
149
|
-
APP = "APP"
|
|
150
|
-
}
|
|
151
|
-
interface CreateSubmissionResponse {
|
|
152
|
-
/** The created submission. */
|
|
153
|
-
submission?: FormSubmission$1;
|
|
154
|
-
}
|
|
155
|
-
interface ItemMetadata {
|
|
156
|
-
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
157
|
-
_id?: string | null;
|
|
158
|
-
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
159
|
-
originalIndex?: number;
|
|
160
|
-
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
161
|
-
success?: boolean;
|
|
162
|
-
/** Details about the error in case of failure. */
|
|
163
|
-
error?: ApplicationError;
|
|
164
|
-
}
|
|
165
|
-
interface ApplicationError {
|
|
166
|
-
/** Error code. */
|
|
167
|
-
code?: string;
|
|
168
|
-
/** Description of the error. */
|
|
169
|
-
description?: string;
|
|
170
|
-
/** Data related to the error. */
|
|
171
|
-
data?: Record<string, any> | null;
|
|
172
|
-
}
|
|
173
|
-
interface BulkActionMetadata {
|
|
174
|
-
/** Number of items that were successfully processed. */
|
|
175
|
-
totalSuccesses?: number;
|
|
176
|
-
/** Number of items that couldn't be processed. */
|
|
177
|
-
totalFailures?: number;
|
|
178
|
-
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
179
|
-
undetailedFailures?: number;
|
|
180
|
-
}
|
|
181
|
-
interface GetSubmissionResponse {
|
|
182
|
-
/** The retrieved submission. */
|
|
183
|
-
submission?: FormSubmission$1;
|
|
184
|
-
}
|
|
185
|
-
interface ConfirmSubmissionResponse {
|
|
186
|
-
/** The confirmed submission. */
|
|
187
|
-
submission?: FormSubmission$1;
|
|
188
|
-
}
|
|
189
|
-
interface FormSubmissionStatusUpdatedEvent {
|
|
190
|
-
/** Updated submission. */
|
|
191
|
-
submission?: FormSubmission$1;
|
|
192
|
-
/** Previous status of the submission. */
|
|
193
|
-
previousStatus?: SubmissionStatus$1;
|
|
194
|
-
}
|
|
195
|
-
interface BulkDeleteSubmissionResponse {
|
|
196
|
-
/** Results of bulk submission delete */
|
|
197
|
-
results?: BulkDeleteSubmissionResult[];
|
|
198
|
-
/** Metadata of request */
|
|
199
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
200
|
-
}
|
|
201
|
-
interface BulkDeleteSubmissionResult {
|
|
202
|
-
/** Deleted item metadata */
|
|
203
|
-
itemMetadata?: ItemMetadata;
|
|
204
|
-
}
|
|
205
|
-
interface RestoreSubmissionFromTrashBinResponse {
|
|
206
|
-
/** The restored submission. */
|
|
207
|
-
submission?: FormSubmission$1;
|
|
208
|
-
}
|
|
209
|
-
interface RemovedSubmissionFromTrash {
|
|
210
|
-
/** Removed submission. */
|
|
211
|
-
submission?: FormSubmission$1;
|
|
212
|
-
}
|
|
213
|
-
interface BulkRemoveSubmissionFromTrashBinResponse {
|
|
214
|
-
/** Results of bulk submission removal from trash */
|
|
215
|
-
results?: BulkRemoveSubmissionFromTrashBinResult[];
|
|
216
|
-
/** Metadata of request */
|
|
217
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
218
|
-
}
|
|
219
|
-
interface BulkRemoveSubmissionFromTrashBinResult {
|
|
220
|
-
/** Deleted item metadata */
|
|
221
|
-
itemMetadata?: ItemMetadata;
|
|
222
|
-
}
|
|
223
|
-
interface CursorPaging {
|
|
224
|
-
/** Number of items to load. */
|
|
225
|
-
limit?: number | null;
|
|
226
|
-
/**
|
|
227
|
-
* Pointer to the next or previous page in the list of results.
|
|
228
|
-
*
|
|
229
|
-
* You can get the relevant cursor token
|
|
230
|
-
* from the `pagingMetadata` object in the previous call's response.
|
|
231
|
-
* Not relevant for the first request.
|
|
232
|
-
*/
|
|
233
|
-
cursor?: string | null;
|
|
234
|
-
}
|
|
235
|
-
interface ListDeletedSubmissionsResponse {
|
|
236
|
-
/** The retrieved Submissions. */
|
|
237
|
-
submissions?: FormSubmission$1[];
|
|
238
|
-
/** Paging metadata. */
|
|
239
|
-
pagingMetadata?: CursorPagingMetadata;
|
|
240
|
-
}
|
|
241
|
-
interface CursorPagingMetadata {
|
|
242
|
-
/** Number of items returned in the response. */
|
|
243
|
-
count?: number | null;
|
|
244
|
-
/** Offset that was requested. */
|
|
245
|
-
cursors?: Cursors;
|
|
246
|
-
/**
|
|
247
|
-
* Indicates if there are more results after the current page.
|
|
248
|
-
* If `true`, another page of results can be retrieved.
|
|
249
|
-
* If `false`, this is the last page.
|
|
250
|
-
*/
|
|
251
|
-
hasNext?: boolean | null;
|
|
252
|
-
}
|
|
253
|
-
interface Cursors {
|
|
254
|
-
/** Cursor pointing to next page in the list of results. */
|
|
255
|
-
next?: string | null;
|
|
256
|
-
/** Cursor pointing to previous page in the list of results. */
|
|
257
|
-
prev?: string | null;
|
|
258
|
-
}
|
|
259
|
-
interface GetDeletedSubmissionResponse {
|
|
260
|
-
/** The retrieved Submission. */
|
|
261
|
-
submission?: FormSubmission$1;
|
|
262
|
-
}
|
|
263
|
-
interface FormSubmissionsCount {
|
|
264
|
-
/** Form ID. */
|
|
265
|
-
formId?: string;
|
|
266
|
-
/** Total number of submissions. */
|
|
267
|
-
totalCount?: number;
|
|
268
|
-
/** Number of submissions that the site owner hasn't seen yet. */
|
|
269
|
-
unseenCount?: number;
|
|
270
|
-
}
|
|
271
|
-
interface CountSubmissionsResponse {
|
|
272
|
-
/** Forms submission count. */
|
|
273
|
-
formsSubmissionsCount?: FormSubmissionsCount[];
|
|
274
|
-
}
|
|
275
|
-
interface CountDeletedSubmissionsResponse {
|
|
276
|
-
/** Forms submission count. */
|
|
277
|
-
formsDeletedSubmissionsCount?: FormDeletedSubmissionsCount[];
|
|
278
|
-
}
|
|
279
|
-
interface FormDeletedSubmissionsCount {
|
|
280
|
-
/** Form ID. */
|
|
281
|
-
formId?: string;
|
|
282
|
-
/** Total number of submissions. */
|
|
283
|
-
totalCount?: number;
|
|
284
|
-
}
|
|
285
|
-
interface GetMediaUploadURLResponse {
|
|
286
|
-
/** Url to upload file. */
|
|
287
|
-
uploadUrl?: string;
|
|
288
|
-
}
|
|
289
|
-
interface CreateSubmissionResponseNonNullableFields {
|
|
290
|
-
submission?: {
|
|
291
|
-
formId: string;
|
|
292
|
-
namespace: string;
|
|
293
|
-
status: SubmissionStatus$1;
|
|
294
|
-
seen: boolean;
|
|
295
|
-
orderDetails?: {
|
|
296
|
-
itemSubtotal: string;
|
|
297
|
-
checkoutId: string;
|
|
298
|
-
};
|
|
299
|
-
};
|
|
300
|
-
}
|
|
301
|
-
interface GetSubmissionResponseNonNullableFields {
|
|
302
|
-
submission?: {
|
|
303
|
-
formId: string;
|
|
304
|
-
namespace: string;
|
|
305
|
-
status: SubmissionStatus$1;
|
|
306
|
-
seen: boolean;
|
|
307
|
-
orderDetails?: {
|
|
308
|
-
itemSubtotal: string;
|
|
309
|
-
checkoutId: string;
|
|
310
|
-
};
|
|
311
|
-
};
|
|
312
|
-
}
|
|
313
|
-
interface ConfirmSubmissionResponseNonNullableFields {
|
|
314
|
-
submission?: {
|
|
315
|
-
formId: string;
|
|
316
|
-
namespace: string;
|
|
317
|
-
status: SubmissionStatus$1;
|
|
318
|
-
seen: boolean;
|
|
319
|
-
orderDetails?: {
|
|
320
|
-
itemSubtotal: string;
|
|
321
|
-
checkoutId: string;
|
|
322
|
-
};
|
|
323
|
-
};
|
|
324
|
-
}
|
|
325
|
-
interface BulkDeleteSubmissionResponseNonNullableFields {
|
|
326
|
-
results: {
|
|
327
|
-
itemMetadata?: {
|
|
328
|
-
originalIndex: number;
|
|
329
|
-
success: boolean;
|
|
330
|
-
error?: {
|
|
331
|
-
code: string;
|
|
332
|
-
description: string;
|
|
333
|
-
};
|
|
334
|
-
};
|
|
335
|
-
}[];
|
|
336
|
-
bulkActionMetadata?: {
|
|
337
|
-
totalSuccesses: number;
|
|
338
|
-
totalFailures: number;
|
|
339
|
-
undetailedFailures: number;
|
|
340
|
-
};
|
|
341
|
-
}
|
|
342
|
-
interface RestoreSubmissionFromTrashBinResponseNonNullableFields {
|
|
343
|
-
submission?: {
|
|
344
|
-
formId: string;
|
|
345
|
-
namespace: string;
|
|
346
|
-
status: SubmissionStatus$1;
|
|
347
|
-
seen: boolean;
|
|
348
|
-
orderDetails?: {
|
|
349
|
-
itemSubtotal: string;
|
|
350
|
-
checkoutId: string;
|
|
351
|
-
};
|
|
352
|
-
};
|
|
353
|
-
}
|
|
354
|
-
interface BulkRemoveSubmissionFromTrashBinResponseNonNullableFields {
|
|
355
|
-
results: {
|
|
356
|
-
itemMetadata?: {
|
|
357
|
-
originalIndex: number;
|
|
358
|
-
success: boolean;
|
|
359
|
-
error?: {
|
|
360
|
-
code: string;
|
|
361
|
-
description: string;
|
|
362
|
-
};
|
|
363
|
-
};
|
|
364
|
-
}[];
|
|
365
|
-
bulkActionMetadata?: {
|
|
366
|
-
totalSuccesses: number;
|
|
367
|
-
totalFailures: number;
|
|
368
|
-
undetailedFailures: number;
|
|
369
|
-
};
|
|
370
|
-
}
|
|
371
|
-
interface ListDeletedSubmissionsResponseNonNullableFields {
|
|
372
|
-
submissions: {
|
|
373
|
-
formId: string;
|
|
374
|
-
namespace: string;
|
|
375
|
-
status: SubmissionStatus$1;
|
|
376
|
-
seen: boolean;
|
|
377
|
-
orderDetails?: {
|
|
378
|
-
itemSubtotal: string;
|
|
379
|
-
checkoutId: string;
|
|
380
|
-
};
|
|
381
|
-
}[];
|
|
382
|
-
}
|
|
383
|
-
interface GetDeletedSubmissionResponseNonNullableFields {
|
|
384
|
-
submission?: {
|
|
385
|
-
formId: string;
|
|
386
|
-
namespace: string;
|
|
387
|
-
status: SubmissionStatus$1;
|
|
388
|
-
seen: boolean;
|
|
389
|
-
orderDetails?: {
|
|
390
|
-
itemSubtotal: string;
|
|
391
|
-
checkoutId: string;
|
|
392
|
-
};
|
|
393
|
-
};
|
|
394
|
-
}
|
|
395
|
-
interface CountSubmissionsResponseNonNullableFields {
|
|
396
|
-
formsSubmissionsCount: {
|
|
397
|
-
formId: string;
|
|
398
|
-
totalCount: number;
|
|
399
|
-
unseenCount: number;
|
|
400
|
-
}[];
|
|
401
|
-
}
|
|
402
|
-
interface CountDeletedSubmissionsResponseNonNullableFields {
|
|
403
|
-
formsDeletedSubmissionsCount: {
|
|
404
|
-
formId: string;
|
|
405
|
-
totalCount: number;
|
|
406
|
-
}[];
|
|
407
|
-
}
|
|
408
|
-
interface GetMediaUploadURLResponseNonNullableFields {
|
|
409
|
-
uploadUrl: string;
|
|
410
|
-
}
|
|
411
|
-
interface BaseEventMetadata {
|
|
412
|
-
/** App instance ID. */
|
|
413
|
-
instanceId?: string | null;
|
|
414
|
-
/** Event type. */
|
|
415
|
-
eventType?: string;
|
|
416
|
-
/** The identification type and identity data. */
|
|
417
|
-
identity?: IdentificationData$1;
|
|
418
|
-
}
|
|
419
|
-
interface EventMetadata extends BaseEventMetadata {
|
|
420
|
-
/**
|
|
421
|
-
* Unique event ID.
|
|
422
|
-
* Allows clients to ignore duplicate webhooks.
|
|
423
|
-
*/
|
|
424
|
-
_id?: string;
|
|
425
|
-
/**
|
|
426
|
-
* Assumes actions are also always typed to an entity_type
|
|
427
|
-
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
428
|
-
*/
|
|
429
|
-
entityFqdn?: string;
|
|
430
|
-
/**
|
|
431
|
-
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
432
|
-
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
433
|
-
* Example: created/updated/deleted/started/completed/email_opened
|
|
434
|
-
*/
|
|
435
|
-
slug?: string;
|
|
436
|
-
/** ID of the entity associated with the event. */
|
|
437
|
-
entityId?: string;
|
|
438
|
-
/** Event timestamp. */
|
|
439
|
-
eventTime?: Date;
|
|
440
|
-
/**
|
|
441
|
-
* Whether the event was triggered as a result of a privacy regulation application
|
|
442
|
-
* (for example, GDPR).
|
|
443
|
-
*/
|
|
444
|
-
triggeredByAnonymizeRequest?: boolean | null;
|
|
445
|
-
/** If present, indicates the action that triggered the event. */
|
|
446
|
-
originatedFrom?: string | null;
|
|
447
|
-
/**
|
|
448
|
-
* A sequence number defining the order of updates to the underlying entity.
|
|
449
|
-
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
450
|
-
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
451
|
-
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
452
|
-
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
453
|
-
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
454
|
-
*/
|
|
455
|
-
entityEventSequence?: string | null;
|
|
456
|
-
}
|
|
457
|
-
interface SubmissionCreatedEnvelope {
|
|
458
|
-
entity: FormSubmission$1;
|
|
459
|
-
metadata: EventMetadata;
|
|
460
|
-
}
|
|
461
|
-
interface SubmissionUpdatedEnvelope {
|
|
462
|
-
entity: FormSubmission$1;
|
|
463
|
-
metadata: EventMetadata;
|
|
464
|
-
}
|
|
465
|
-
interface SubmissionStatusUpdatedEnvelope {
|
|
466
|
-
data: FormSubmissionStatusUpdatedEvent;
|
|
467
|
-
metadata: EventMetadata;
|
|
468
|
-
}
|
|
469
|
-
interface SubmissionDeletedEnvelope {
|
|
470
|
-
metadata: EventMetadata;
|
|
471
|
-
}
|
|
472
|
-
interface SubmissionRemovedSubmissionFromTrashEnvelope {
|
|
473
|
-
data: RemovedSubmissionFromTrash;
|
|
474
|
-
metadata: EventMetadata;
|
|
475
|
-
}
|
|
476
|
-
interface CreateSubmissionOptions {
|
|
477
|
-
/** Captcha token. */
|
|
478
|
-
captchaToken?: string | null;
|
|
479
|
-
}
|
|
480
|
-
interface UpdateSubmission {
|
|
481
|
-
/**
|
|
482
|
-
* Submission ID.
|
|
483
|
-
* @readonly
|
|
484
|
-
*/
|
|
485
|
-
_id?: string | null;
|
|
486
|
-
/** ID of the form which the submission belongs to. */
|
|
487
|
-
formId?: string;
|
|
488
|
-
/**
|
|
489
|
-
* The app which the form submissions belong to. For example, the namespace for the Wix Forms app is `wix.form_app.form`. Call `Get Submission` to retrieve the namespace.
|
|
490
|
-
* @readonly
|
|
491
|
-
*/
|
|
492
|
-
namespace?: string;
|
|
493
|
-
/**
|
|
494
|
-
* Status of the submission.
|
|
495
|
-
* - `PENDING`: A submission is created, but has not yet been recorded in the Wix Forms collection.
|
|
496
|
-
* - `PAYMENT_WAITING`: A form submission requiring payment is created.
|
|
497
|
-
* - `PAYMENT_CANCELED`: An order of a form submission is canceled.
|
|
498
|
-
* - `CONFIRMED`: A submission is recorded in the Wix Forms collection.
|
|
499
|
-
*/
|
|
500
|
-
status?: SubmissionStatus$1;
|
|
501
|
-
/** Submission values where `key` is the form field and `value` is the data submitted for the given field. */
|
|
502
|
-
submissions?: Record<string, any>;
|
|
503
|
-
/**
|
|
504
|
-
* Date and time the form submission was created.
|
|
505
|
-
* @readonly
|
|
506
|
-
*/
|
|
507
|
-
_createdDate?: Date;
|
|
508
|
-
/**
|
|
509
|
-
* Date and time the form submission was updated.
|
|
510
|
-
* @readonly
|
|
511
|
-
*/
|
|
512
|
-
_updatedDate?: Date;
|
|
513
|
-
/**
|
|
514
|
-
* Revision number, which increments by 1 each time the form submission is updated. To prevent conflicting changes, the existing revision must be used when updating a form submission.
|
|
515
|
-
* @readonly
|
|
516
|
-
*/
|
|
517
|
-
revision?: string | null;
|
|
518
|
-
/**
|
|
519
|
-
* ID of the visitor that submitted the form.
|
|
520
|
-
* @readonly
|
|
521
|
-
*/
|
|
522
|
-
submitter?: Submitter$1;
|
|
523
|
-
/** Whether a site owner marked a submission as "seen". */
|
|
524
|
-
seen?: boolean;
|
|
525
|
-
/** Data extension object that holds users' and apps' fields. */
|
|
526
|
-
extendedFields?: ExtendedFields$1;
|
|
527
|
-
/**
|
|
528
|
-
* Order details. <br>
|
|
529
|
-
* <b>Note</b>: This object is only applicable when submittng a form in the Wix Payments app.
|
|
530
|
-
*/
|
|
531
|
-
orderDetails?: OrderDetails$1;
|
|
532
|
-
}
|
|
533
|
-
interface DeleteSubmissionOptions {
|
|
534
|
-
/**
|
|
535
|
-
* Delete the submission, bypassing the trash bin. This means that the submission is permanently delete and cannot be restored.
|
|
536
|
-
*
|
|
537
|
-
*
|
|
538
|
-
* Default: `false`
|
|
539
|
-
*/
|
|
540
|
-
permanent?: boolean;
|
|
541
|
-
/** Preserve files. */
|
|
542
|
-
preserveFiles?: boolean;
|
|
543
|
-
}
|
|
544
|
-
interface BulkDeleteSubmissionOptions {
|
|
545
|
-
/** Submission ids. */
|
|
546
|
-
submissionIds?: string[];
|
|
547
|
-
/**
|
|
548
|
-
* Delete submission bypassing trash-bin
|
|
549
|
-
* Default: false
|
|
550
|
-
*/
|
|
551
|
-
permanent?: boolean;
|
|
552
|
-
/** Preserve files. */
|
|
553
|
-
preserveFiles?: boolean;
|
|
554
|
-
}
|
|
555
|
-
interface BulkRemoveSubmissionFromTrashBinOptions {
|
|
556
|
-
/** Submission ids. */
|
|
557
|
-
submissionIds?: string[];
|
|
558
|
-
}
|
|
559
|
-
interface ListDeletedSubmissionsOptions {
|
|
560
|
-
/** Submission ids. */
|
|
561
|
-
submissionIds?: string[];
|
|
562
|
-
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not filter or `order`. */
|
|
563
|
-
paging?: CursorPaging;
|
|
564
|
-
/**
|
|
565
|
-
* List of statuses of submissions which should be returned
|
|
566
|
-
* Default: CONFIRMED
|
|
567
|
-
*/
|
|
568
|
-
statuses?: SubmissionStatus$1[];
|
|
569
|
-
}
|
|
570
|
-
interface QuerySubmissionsByNamespaceOptions {
|
|
571
|
-
/** Whether to return only your own submissions. If `false`, returns all submissions based on query filters. */
|
|
572
|
-
onlyYourOwn?: boolean | undefined;
|
|
573
|
-
}
|
|
574
|
-
interface QueryCursorResult {
|
|
575
|
-
cursors: Cursors;
|
|
576
|
-
hasNext: () => boolean;
|
|
577
|
-
hasPrev: () => boolean;
|
|
578
|
-
length: number;
|
|
579
|
-
pageSize: number;
|
|
580
|
-
}
|
|
581
|
-
interface SubmissionsQueryResult extends QueryCursorResult {
|
|
582
|
-
items: FormSubmission$1[];
|
|
583
|
-
query: SubmissionsQueryBuilder;
|
|
584
|
-
next: () => Promise<SubmissionsQueryResult>;
|
|
585
|
-
prev: () => Promise<SubmissionsQueryResult>;
|
|
586
|
-
}
|
|
587
|
-
interface SubmissionsQueryBuilder {
|
|
588
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
589
|
-
* @param value - Value to compare against.
|
|
590
|
-
*/
|
|
591
|
-
eq: (propertyName: '_id' | 'formId' | 'namespace' | 'status' | '_createdDate' | '_updatedDate' | 'seen', value: any) => SubmissionsQueryBuilder;
|
|
592
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
593
|
-
* @param value - Value to compare against.
|
|
594
|
-
*/
|
|
595
|
-
ne: (propertyName: '_id' | 'formId' | 'status' | '_createdDate' | '_updatedDate' | 'seen', value: any) => SubmissionsQueryBuilder;
|
|
596
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
597
|
-
* @param value - Value to compare against.
|
|
598
|
-
*/
|
|
599
|
-
ge: (propertyName: '_createdDate' | '_updatedDate', value: any) => SubmissionsQueryBuilder;
|
|
600
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
601
|
-
* @param value - Value to compare against.
|
|
602
|
-
*/
|
|
603
|
-
gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => SubmissionsQueryBuilder;
|
|
604
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
605
|
-
* @param value - Value to compare against.
|
|
606
|
-
*/
|
|
607
|
-
le: (propertyName: '_createdDate' | '_updatedDate', value: any) => SubmissionsQueryBuilder;
|
|
608
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
609
|
-
* @param value - Value to compare against.
|
|
610
|
-
*/
|
|
611
|
-
lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => SubmissionsQueryBuilder;
|
|
612
|
-
in: (propertyName: '_id' | 'formId' | 'status' | '_createdDate' | '_updatedDate', value: any) => SubmissionsQueryBuilder;
|
|
613
|
-
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
|
|
614
|
-
ascending: (...propertyNames: Array<'_id' | 'formId' | 'status' | '_createdDate' | '_updatedDate' | 'seen'>) => SubmissionsQueryBuilder;
|
|
615
|
-
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
|
|
616
|
-
descending: (...propertyNames: Array<'_id' | 'formId' | 'status' | '_createdDate' | '_updatedDate' | 'seen'>) => SubmissionsQueryBuilder;
|
|
617
|
-
/** @param limit - Number of items to return, which is also the `pageSize` of the results object. */
|
|
618
|
-
limit: (limit: number) => SubmissionsQueryBuilder;
|
|
619
|
-
/** @param cursor - A pointer to specific record */
|
|
620
|
-
skipTo: (cursor: string) => SubmissionsQueryBuilder;
|
|
621
|
-
find: () => Promise<SubmissionsQueryResult>;
|
|
622
|
-
}
|
|
623
|
-
interface CountSubmissionsOptions {
|
|
624
|
-
/**
|
|
625
|
-
* Status of the submission.
|
|
626
|
-
* - `PENDING`: A submission is created, but has not yet been recorded in the Wix Forms collection.
|
|
627
|
-
* - `PAYMENT_WAITING`: A form submission requiring payment is created.
|
|
628
|
-
* - `PAYMENT_CANCELED`: An order of a form submission is canceled.
|
|
629
|
-
* - `CONFIRMED`: A submission is recorded in the Wix Forms collection.
|
|
630
|
-
*/
|
|
631
|
-
statuses?: SubmissionStatus$1[];
|
|
632
|
-
}
|
|
633
|
-
interface CountDeletedSubmissionsOptions {
|
|
634
|
-
/**
|
|
635
|
-
* List of statuses of submissions which should be taken into count
|
|
636
|
-
* Default: CONFIRMED, PAYMENT_WAITING, PAYMENT_CANCELED
|
|
637
|
-
*/
|
|
638
|
-
statuses?: SubmissionStatus$1[];
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
642
|
-
interface HttpClient {
|
|
643
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
644
|
-
}
|
|
645
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
646
|
-
type HttpResponse<T = any> = {
|
|
647
|
-
data: T;
|
|
648
|
-
status: number;
|
|
649
|
-
statusText: string;
|
|
650
|
-
headers: any;
|
|
651
|
-
request?: any;
|
|
652
|
-
};
|
|
653
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
654
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
655
|
-
url: string;
|
|
656
|
-
data?: Data;
|
|
657
|
-
params?: URLSearchParams;
|
|
658
|
-
} & APIMetadata;
|
|
659
|
-
type APIMetadata = {
|
|
660
|
-
methodFqn?: string;
|
|
661
|
-
entityFqdn?: string;
|
|
662
|
-
packageName?: string;
|
|
663
|
-
};
|
|
664
|
-
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
665
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
666
|
-
__type: 'event-definition';
|
|
667
|
-
type: Type;
|
|
668
|
-
isDomainEvent?: boolean;
|
|
669
|
-
transformations?: unknown;
|
|
670
|
-
__payload: Payload;
|
|
671
|
-
};
|
|
672
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
673
|
-
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
674
|
-
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
675
|
-
|
|
676
|
-
declare function createSubmission$1(httpClient: HttpClient): (submission: FormSubmission$1, options?: CreateSubmissionOptions) => Promise<CreateSubmissionResponse & CreateSubmissionResponseNonNullableFields>;
|
|
677
|
-
declare function getSubmission$1(httpClient: HttpClient): (submissionId: string) => Promise<GetSubmissionResponse & GetSubmissionResponseNonNullableFields>;
|
|
678
|
-
declare function updateSubmission$1(httpClient: HttpClient): (_id: string | null, submission: UpdateSubmission) => Promise<FormSubmission$1 & {
|
|
679
|
-
formId: string;
|
|
680
|
-
namespace: string;
|
|
681
|
-
status: SubmissionStatus$1;
|
|
682
|
-
seen: boolean;
|
|
683
|
-
orderDetails?: {
|
|
684
|
-
itemSubtotal: string;
|
|
685
|
-
checkoutId: string;
|
|
686
|
-
} | undefined;
|
|
687
|
-
}>;
|
|
688
|
-
declare function confirmSubmission$1(httpClient: HttpClient): (submissionId: string) => Promise<ConfirmSubmissionResponse & ConfirmSubmissionResponseNonNullableFields>;
|
|
689
|
-
declare function deleteSubmission$1(httpClient: HttpClient): (submissionId: string, options?: DeleteSubmissionOptions) => Promise<void>;
|
|
690
|
-
declare function bulkDeleteSubmission$1(httpClient: HttpClient): (formId: string, options?: BulkDeleteSubmissionOptions) => Promise<BulkDeleteSubmissionResponse & BulkDeleteSubmissionResponseNonNullableFields>;
|
|
691
|
-
declare function restoreSubmissionFromTrashBin$1(httpClient: HttpClient): (submissionId: string) => Promise<RestoreSubmissionFromTrashBinResponse & RestoreSubmissionFromTrashBinResponseNonNullableFields>;
|
|
692
|
-
declare function removeSubmissionFromTrashBin$1(httpClient: HttpClient): (submissionId: string) => Promise<void>;
|
|
693
|
-
declare function bulkRemoveSubmissionFromTrashBin$1(httpClient: HttpClient): (formId: string, options?: BulkRemoveSubmissionFromTrashBinOptions) => Promise<BulkRemoveSubmissionFromTrashBinResponse & BulkRemoveSubmissionFromTrashBinResponseNonNullableFields>;
|
|
694
|
-
declare function listDeletedSubmissions$1(httpClient: HttpClient): (formId: string, options?: ListDeletedSubmissionsOptions) => Promise<ListDeletedSubmissionsResponse & ListDeletedSubmissionsResponseNonNullableFields>;
|
|
695
|
-
declare function getDeletedSubmission$1(httpClient: HttpClient): (submissionId: string) => Promise<GetDeletedSubmissionResponse & GetDeletedSubmissionResponseNonNullableFields>;
|
|
696
|
-
declare function querySubmissionsByNamespace$1(httpClient: HttpClient): (options?: QuerySubmissionsByNamespaceOptions) => SubmissionsQueryBuilder;
|
|
697
|
-
declare function countSubmissions$1(httpClient: HttpClient): (formIds: string[], namespace: string, options?: CountSubmissionsOptions) => Promise<CountSubmissionsResponse & CountSubmissionsResponseNonNullableFields>;
|
|
698
|
-
declare function countDeletedSubmissions$1(httpClient: HttpClient): (formIds: string[], namespace: string, options?: CountDeletedSubmissionsOptions) => Promise<CountDeletedSubmissionsResponse & CountDeletedSubmissionsResponseNonNullableFields>;
|
|
699
|
-
declare function getMediaUploadUrl$1(httpClient: HttpClient): (formId: string, filename: string, mimeType: string) => Promise<GetMediaUploadURLResponse & GetMediaUploadURLResponseNonNullableFields>;
|
|
700
|
-
declare function bulkMarkSubmissionsAsSeen$1(httpClient: HttpClient): (ids: string[], formId: string) => Promise<void>;
|
|
701
|
-
declare const onSubmissionCreated$1: EventDefinition<SubmissionCreatedEnvelope, "wix.forms.v4.submission_created">;
|
|
702
|
-
declare const onSubmissionUpdated$1: EventDefinition<SubmissionUpdatedEnvelope, "wix.forms.v4.submission_updated">;
|
|
703
|
-
declare const onSubmissionStatusUpdated$1: EventDefinition<SubmissionStatusUpdatedEnvelope, "wix.forms.v4.submission_status_updated">;
|
|
704
|
-
declare const onSubmissionDeleted$1: EventDefinition<SubmissionDeletedEnvelope, "wix.forms.v4.submission_deleted">;
|
|
705
|
-
declare const onSubmissionRemovedSubmissionFromTrash$1: EventDefinition<SubmissionRemovedSubmissionFromTrashEnvelope, "wix.forms.v4.submission_removed_submission_from_trash">;
|
|
706
|
-
|
|
707
|
-
declare const createSubmission: BuildRESTFunction<typeof createSubmission$1>;
|
|
708
|
-
declare const getSubmission: BuildRESTFunction<typeof getSubmission$1>;
|
|
709
|
-
declare const updateSubmission: BuildRESTFunction<typeof updateSubmission$1>;
|
|
710
|
-
declare const confirmSubmission: BuildRESTFunction<typeof confirmSubmission$1>;
|
|
711
|
-
declare const deleteSubmission: BuildRESTFunction<typeof deleteSubmission$1>;
|
|
712
|
-
declare const bulkDeleteSubmission: BuildRESTFunction<typeof bulkDeleteSubmission$1>;
|
|
713
|
-
declare const restoreSubmissionFromTrashBin: BuildRESTFunction<typeof restoreSubmissionFromTrashBin$1>;
|
|
714
|
-
declare const removeSubmissionFromTrashBin: BuildRESTFunction<typeof removeSubmissionFromTrashBin$1>;
|
|
715
|
-
declare const bulkRemoveSubmissionFromTrashBin: BuildRESTFunction<typeof bulkRemoveSubmissionFromTrashBin$1>;
|
|
716
|
-
declare const listDeletedSubmissions: BuildRESTFunction<typeof listDeletedSubmissions$1>;
|
|
717
|
-
declare const getDeletedSubmission: BuildRESTFunction<typeof getDeletedSubmission$1>;
|
|
718
|
-
declare const querySubmissionsByNamespace: BuildRESTFunction<typeof querySubmissionsByNamespace$1>;
|
|
719
|
-
declare const countSubmissions: BuildRESTFunction<typeof countSubmissions$1>;
|
|
720
|
-
declare const countDeletedSubmissions: BuildRESTFunction<typeof countDeletedSubmissions$1>;
|
|
721
|
-
declare const getMediaUploadUrl: BuildRESTFunction<typeof getMediaUploadUrl$1>;
|
|
722
|
-
declare const bulkMarkSubmissionsAsSeen: BuildRESTFunction<typeof bulkMarkSubmissionsAsSeen$1>;
|
|
723
|
-
declare const onSubmissionCreated: BuildEventDefinition<typeof onSubmissionCreated$1>;
|
|
724
|
-
declare const onSubmissionUpdated: BuildEventDefinition<typeof onSubmissionUpdated$1>;
|
|
725
|
-
declare const onSubmissionStatusUpdated: BuildEventDefinition<typeof onSubmissionStatusUpdated$1>;
|
|
726
|
-
declare const onSubmissionDeleted: BuildEventDefinition<typeof onSubmissionDeleted$1>;
|
|
727
|
-
declare const onSubmissionRemovedSubmissionFromTrash: BuildEventDefinition<typeof onSubmissionRemovedSubmissionFromTrash$1>;
|
|
728
|
-
|
|
729
|
-
declare const context$1_bulkDeleteSubmission: typeof bulkDeleteSubmission;
|
|
730
|
-
declare const context$1_bulkMarkSubmissionsAsSeen: typeof bulkMarkSubmissionsAsSeen;
|
|
731
|
-
declare const context$1_bulkRemoveSubmissionFromTrashBin: typeof bulkRemoveSubmissionFromTrashBin;
|
|
732
|
-
declare const context$1_confirmSubmission: typeof confirmSubmission;
|
|
733
|
-
declare const context$1_countDeletedSubmissions: typeof countDeletedSubmissions;
|
|
734
|
-
declare const context$1_countSubmissions: typeof countSubmissions;
|
|
735
|
-
declare const context$1_createSubmission: typeof createSubmission;
|
|
736
|
-
declare const context$1_deleteSubmission: typeof deleteSubmission;
|
|
737
|
-
declare const context$1_getDeletedSubmission: typeof getDeletedSubmission;
|
|
738
|
-
declare const context$1_getMediaUploadUrl: typeof getMediaUploadUrl;
|
|
739
|
-
declare const context$1_getSubmission: typeof getSubmission;
|
|
740
|
-
declare const context$1_listDeletedSubmissions: typeof listDeletedSubmissions;
|
|
741
|
-
declare const context$1_onSubmissionCreated: typeof onSubmissionCreated;
|
|
742
|
-
declare const context$1_onSubmissionDeleted: typeof onSubmissionDeleted;
|
|
743
|
-
declare const context$1_onSubmissionRemovedSubmissionFromTrash: typeof onSubmissionRemovedSubmissionFromTrash;
|
|
744
|
-
declare const context$1_onSubmissionStatusUpdated: typeof onSubmissionStatusUpdated;
|
|
745
|
-
declare const context$1_onSubmissionUpdated: typeof onSubmissionUpdated;
|
|
746
|
-
declare const context$1_querySubmissionsByNamespace: typeof querySubmissionsByNamespace;
|
|
747
|
-
declare const context$1_removeSubmissionFromTrashBin: typeof removeSubmissionFromTrashBin;
|
|
748
|
-
declare const context$1_restoreSubmissionFromTrashBin: typeof restoreSubmissionFromTrashBin;
|
|
749
|
-
declare const context$1_updateSubmission: typeof updateSubmission;
|
|
750
|
-
declare namespace context$1 {
|
|
751
|
-
export { context$1_bulkDeleteSubmission as bulkDeleteSubmission, context$1_bulkMarkSubmissionsAsSeen as bulkMarkSubmissionsAsSeen, context$1_bulkRemoveSubmissionFromTrashBin as bulkRemoveSubmissionFromTrashBin, context$1_confirmSubmission as confirmSubmission, context$1_countDeletedSubmissions as countDeletedSubmissions, context$1_countSubmissions as countSubmissions, context$1_createSubmission as createSubmission, context$1_deleteSubmission as deleteSubmission, context$1_getDeletedSubmission as getDeletedSubmission, context$1_getMediaUploadUrl as getMediaUploadUrl, context$1_getSubmission as getSubmission, context$1_listDeletedSubmissions as listDeletedSubmissions, context$1_onSubmissionCreated as onSubmissionCreated, context$1_onSubmissionDeleted as onSubmissionDeleted, context$1_onSubmissionRemovedSubmissionFromTrash as onSubmissionRemovedSubmissionFromTrash, context$1_onSubmissionStatusUpdated as onSubmissionStatusUpdated, context$1_onSubmissionUpdated as onSubmissionUpdated, context$1_querySubmissionsByNamespace as querySubmissionsByNamespace, context$1_removeSubmissionFromTrashBin as removeSubmissionFromTrashBin, context$1_restoreSubmissionFromTrashBin as restoreSubmissionFromTrashBin, context$1_updateSubmission as updateSubmission };
|
|
752
|
-
}
|
|
753
|
-
|
|
754
|
-
interface ValidateSubmissionRequest extends ValidateSubmissionRequestActionsOneOf {
|
|
755
|
-
/** Data for updating an existing submission. */
|
|
756
|
-
updateOptions?: UpdateOptions;
|
|
757
|
-
/** Submission to validate. */
|
|
758
|
-
submission: FormSubmission;
|
|
759
|
-
/** Whether to create or update the submission. */
|
|
760
|
-
actionType: ActionType;
|
|
761
|
-
}
|
|
762
|
-
/** @oneof */
|
|
763
|
-
interface ValidateSubmissionRequestActionsOneOf {
|
|
764
|
-
/** Data for updating an existing submission. */
|
|
765
|
-
updateOptions?: UpdateOptions;
|
|
766
|
-
}
|
|
767
|
-
/** Form submission that was created or retrieved. */
|
|
768
|
-
interface FormSubmission {
|
|
769
|
-
/**
|
|
770
|
-
* Submission ID.
|
|
771
|
-
* @readonly
|
|
772
|
-
*/
|
|
773
|
-
_id?: string | null;
|
|
774
|
-
/** ID of the form which the submission belongs to. */
|
|
775
|
-
formId?: string;
|
|
776
|
-
/**
|
|
777
|
-
* The app which the form submissions belong to. For example, the namespace for the Wix Forms app is `wix.form_app.form`. Call `Get Submission` to retrieve the namespace.
|
|
778
|
-
* @readonly
|
|
779
|
-
*/
|
|
780
|
-
namespace?: string;
|
|
781
|
-
/**
|
|
782
|
-
* Status of the submission.
|
|
783
|
-
* - `PENDING`: A submission is created, but has not yet been recorded in the Wix Forms collection.
|
|
784
|
-
* - `PAYMENT_WAITING`: A form submission requiring payment is created.
|
|
785
|
-
* - `PAYMENT_CANCELED`: An order of a form submission is canceled.
|
|
786
|
-
* - `CONFIRMED`: A submission is recorded in the Wix Forms collection.
|
|
787
|
-
*/
|
|
788
|
-
status?: SubmissionStatus;
|
|
789
|
-
/** Submission values where `key` is the form field and `value` is the data submitted for the given field. */
|
|
790
|
-
submissions?: Record<string, any>;
|
|
791
|
-
/**
|
|
792
|
-
* Date and time the form submission was created.
|
|
793
|
-
* @readonly
|
|
794
|
-
*/
|
|
795
|
-
_createdDate?: Date;
|
|
796
|
-
/**
|
|
797
|
-
* Date and time the form submission was updated.
|
|
798
|
-
* @readonly
|
|
799
|
-
*/
|
|
800
|
-
_updatedDate?: Date;
|
|
801
|
-
/**
|
|
802
|
-
* Revision number, which increments by 1 each time the form submission is updated. To prevent conflicting changes, the existing revision must be used when updating a form submission.
|
|
803
|
-
* @readonly
|
|
804
|
-
*/
|
|
805
|
-
revision?: string | null;
|
|
806
|
-
/**
|
|
807
|
-
* ID of the visitor that submitted the form.
|
|
808
|
-
* @readonly
|
|
809
|
-
*/
|
|
810
|
-
submitter?: Submitter;
|
|
811
|
-
/** Whether a site owner marked a submission as "seen". */
|
|
812
|
-
seen?: boolean;
|
|
813
|
-
/** Data extension object that holds users' and apps' fields. */
|
|
814
|
-
extendedFields?: ExtendedFields;
|
|
815
|
-
/**
|
|
816
|
-
* Order details. <br>
|
|
817
|
-
* <b>Note</b>: This object is only applicable when submittng a form in the Wix Payments app.
|
|
818
|
-
*/
|
|
819
|
-
orderDetails?: OrderDetails;
|
|
820
|
-
}
|
|
821
|
-
declare enum SubmissionStatus {
|
|
822
|
-
UNDEFINED = "UNDEFINED",
|
|
823
|
-
PENDING = "PENDING",
|
|
824
|
-
CONFIRMED = "CONFIRMED",
|
|
825
|
-
PAYMENT_WAITING = "PAYMENT_WAITING",
|
|
826
|
-
PAYMENT_CANCELED = "PAYMENT_CANCELED"
|
|
827
|
-
}
|
|
828
|
-
interface Submitter extends SubmitterSubmitterOneOf {
|
|
829
|
-
/** Member ID. */
|
|
830
|
-
memberId?: string | null;
|
|
831
|
-
/** Visitor ID. */
|
|
832
|
-
visitorId?: string | null;
|
|
833
|
-
/** Application ID. */
|
|
834
|
-
applicationId?: string | null;
|
|
835
|
-
/** User ID. */
|
|
836
|
-
userId?: string | null;
|
|
837
|
-
}
|
|
838
|
-
/** @oneof */
|
|
839
|
-
interface SubmitterSubmitterOneOf {
|
|
840
|
-
/** Member ID. */
|
|
841
|
-
memberId?: string | null;
|
|
842
|
-
/** Visitor ID. */
|
|
843
|
-
visitorId?: string | null;
|
|
844
|
-
/** Application ID. */
|
|
845
|
-
applicationId?: string | null;
|
|
846
|
-
/** User ID. */
|
|
847
|
-
userId?: string | null;
|
|
848
|
-
}
|
|
849
|
-
interface ExtendedFields {
|
|
850
|
-
/**
|
|
851
|
-
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
852
|
-
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
853
|
-
*
|
|
854
|
-
* You can only access fields for which you have the appropriate permissions.
|
|
855
|
-
*
|
|
856
|
-
* Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
|
|
857
|
-
*/
|
|
858
|
-
namespaces?: Record<string, Record<string, any>>;
|
|
859
|
-
}
|
|
860
|
-
interface OrderDetails {
|
|
861
|
-
/**
|
|
862
|
-
* ID of the order related to submission (only applicable if a form has payments).
|
|
863
|
-
* @readonly
|
|
864
|
-
*/
|
|
865
|
-
orderId?: string | null;
|
|
866
|
-
/**
|
|
867
|
-
* Order number.
|
|
868
|
-
* @readonly
|
|
869
|
-
*/
|
|
870
|
-
number?: string | null;
|
|
871
|
-
/**
|
|
872
|
-
* Currency.
|
|
873
|
-
* @readonly
|
|
874
|
-
*/
|
|
875
|
-
currency?: string | null;
|
|
876
|
-
/**
|
|
877
|
-
* Item subtotal.
|
|
878
|
-
* @readonly
|
|
879
|
-
*/
|
|
880
|
-
itemSubtotal?: string;
|
|
881
|
-
/**
|
|
882
|
-
* ID of the checkout related to submission (only applicable if a form has payments).
|
|
883
|
-
* @readonly
|
|
884
|
-
*/
|
|
885
|
-
checkoutId?: string;
|
|
886
|
-
}
|
|
887
|
-
declare enum ActionType {
|
|
888
|
-
UNKNOWN_ACTION = "UNKNOWN_ACTION",
|
|
889
|
-
UPDATE = "UPDATE",
|
|
890
|
-
CREATE = "CREATE"
|
|
891
|
-
}
|
|
892
|
-
interface UpdateOptions {
|
|
893
|
-
/** Submission to update. */
|
|
894
|
-
currentSubmission?: FormSubmission;
|
|
895
|
-
}
|
|
896
|
-
interface ValidateSubmissionResponse {
|
|
897
|
-
/**
|
|
898
|
-
* List of validation errors. <br>
|
|
899
|
-
* If there are no validation errors, returns an empty array.
|
|
900
|
-
*/
|
|
901
|
-
errors?: SubmissionValidationError[];
|
|
902
|
-
}
|
|
903
|
-
interface SubmissionValidationError extends SubmissionValidationErrorErrorMessageOneOf {
|
|
904
|
-
/** Predefined error type. */
|
|
905
|
-
errorType?: SubmissionErrorType;
|
|
906
|
-
/** Custom error message. The message is displayed instead of an error type. */
|
|
907
|
-
customErrorMessage?: string;
|
|
908
|
-
/** Path indicating the source of the error, such as `form.fields.target`. */
|
|
909
|
-
errorPath?: string;
|
|
910
|
-
/** Additional error parameters. */
|
|
911
|
-
params?: Record<string, any> | null;
|
|
912
|
-
}
|
|
913
|
-
/** @oneof */
|
|
914
|
-
interface SubmissionValidationErrorErrorMessageOneOf {
|
|
915
|
-
/** Predefined error type. */
|
|
916
|
-
errorType?: SubmissionErrorType;
|
|
917
|
-
/** Custom error message. The message is displayed instead of an error type. */
|
|
918
|
-
customErrorMessage?: string;
|
|
919
|
-
}
|
|
920
|
-
declare enum SubmissionErrorType {
|
|
921
|
-
/** Error is unknown or not suitable for any of options bellow */
|
|
922
|
-
UNKNOWN_ERROR = "UNKNOWN_ERROR",
|
|
923
|
-
/** Type of submitted value is incorrect */
|
|
924
|
-
TYPE_ERROR = "TYPE_ERROR",
|
|
925
|
-
/** Value is required to be provided */
|
|
926
|
-
REQUIRED_VALUE_ERROR = "REQUIRED_VALUE_ERROR",
|
|
927
|
-
/** Value contains additional properties not expected in schema */
|
|
928
|
-
UNKNOWN_VALUE_ERROR = "UNKNOWN_VALUE_ERROR",
|
|
929
|
-
/** Text value exceeds max length */
|
|
930
|
-
MAX_LENGTH_ERROR = "MAX_LENGTH_ERROR",
|
|
931
|
-
/** Text value not reaches min length */
|
|
932
|
-
MIN_LENGTH_ERROR = "MIN_LENGTH_ERROR",
|
|
933
|
-
/** Text value not applicable for expected pattern */
|
|
934
|
-
PATTERN_ERROR = "PATTERN_ERROR",
|
|
935
|
-
/** Text value not applicable for expected format */
|
|
936
|
-
FORMAT_ERROR = "FORMAT_ERROR",
|
|
937
|
-
/** Number value is too big */
|
|
938
|
-
MAX_VALUE_ERROR = "MAX_VALUE_ERROR",
|
|
939
|
-
/** Number value is too small */
|
|
940
|
-
MIN_VALUE_ERROR = "MIN_VALUE_ERROR",
|
|
941
|
-
/** Number value is not multiple of expected number */
|
|
942
|
-
MULTIPLE_OF_VALUE_ERROR = "MULTIPLE_OF_VALUE_ERROR",
|
|
943
|
-
/** Array value has too much items */
|
|
944
|
-
MIN_ITEMS_ERROR = "MIN_ITEMS_ERROR",
|
|
945
|
-
/** Array value has not enough items */
|
|
946
|
-
MAX_ITEMS_ERROR = "MAX_ITEMS_ERROR",
|
|
947
|
-
/** Value is not in list of allowed values */
|
|
948
|
-
NOT_ALLOWED_VALUE_ERROR = "NOT_ALLOWED_VALUE_ERROR",
|
|
949
|
-
/** Submitted form is disabled */
|
|
950
|
-
DISABLED_FORM_ERROR = "DISABLED_FORM_ERROR"
|
|
951
|
-
}
|
|
952
|
-
interface FormSubmissionSpiExtensionConfig {
|
|
953
|
-
/** URI where the service plugin Implementer is deployed */
|
|
954
|
-
deploymentUri?: SpiBaseUri;
|
|
955
|
-
/** Namespace names. */
|
|
956
|
-
namespaceConfigs?: FormsSubmissionsExtensionNamespaceConfig[];
|
|
957
|
-
}
|
|
958
|
-
interface SpiBaseUri {
|
|
959
|
-
/** URI that will be used by the host to call the implementer. The path-suffix defined on the method will be appended to it */
|
|
960
|
-
baseUri?: string;
|
|
961
|
-
/** override method mappings per method */
|
|
962
|
-
alternativeUris?: AlternativeUri[];
|
|
963
|
-
}
|
|
964
|
-
interface AlternativeUri {
|
|
965
|
-
/** name of the method as it appears in the proto */
|
|
966
|
-
methodName?: string;
|
|
967
|
-
/** absolute uri that will be used by the host to call that method. The path-suffix mapped from the method http option will NOT be appended to this URI. For TPAs. it must be https */
|
|
968
|
-
absoluteUri?: string;
|
|
969
|
-
}
|
|
970
|
-
interface FormsSubmissionsExtensionNamespaceConfig {
|
|
971
|
-
/** Targeted namespace, with what submissions should trigger defined methods. */
|
|
972
|
-
namespace?: string;
|
|
973
|
-
/** Enable submission validation. */
|
|
974
|
-
submissionValidationEnabled?: boolean;
|
|
975
|
-
}
|
|
976
|
-
/**
|
|
977
|
-
* this message is not directly used by any service,
|
|
978
|
-
* it exists to describe the expected parameters that SHOULD be provided to invoked Velo methods as part of open-platform.
|
|
979
|
-
* e.g. SPIs, event-handlers, etc..
|
|
980
|
-
* NOTE: this context object MUST be provided as the last argument in each Velo method signature.
|
|
981
|
-
*
|
|
982
|
-
* Example:
|
|
983
|
-
* ```typescript
|
|
984
|
-
* export function wixStores_onOrderCanceled({ event, metadata }: OrderCanceledEvent) {
|
|
985
|
-
* ...
|
|
986
|
-
* }
|
|
987
|
-
* ```
|
|
988
|
-
*/
|
|
989
|
-
interface Context {
|
|
990
|
-
/** A unique identifier for each request. Can be used for logging / troubleshooting */
|
|
991
|
-
requestId?: string | null;
|
|
992
|
-
/** 3 capital letters string representing a currency according to ISO-4217 */
|
|
993
|
-
currency?: string | null;
|
|
994
|
-
/** The identification type and identity data */
|
|
995
|
-
identity?: IdentificationData;
|
|
996
|
-
/** A string representing a language and region in the format of "xx-XX". First 2 letters represent the language code according to ISO 639-1. This is followed by a dash "-", and then a by 2 capital letters representing the region according to ISO 3166-2 */
|
|
997
|
-
languages?: string[];
|
|
998
|
-
/** App instance ID of SPI in context */
|
|
999
|
-
instanceId?: string | null;
|
|
1000
|
-
}
|
|
1001
|
-
declare enum IdentityType {
|
|
1002
|
-
UNKNOWN = "UNKNOWN",
|
|
1003
|
-
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
1004
|
-
MEMBER = "MEMBER",
|
|
1005
|
-
WIX_USER = "WIX_USER",
|
|
1006
|
-
APP = "APP"
|
|
1007
|
-
}
|
|
1008
|
-
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
1009
|
-
/** ID of a site visitor that has not logged in to the site. */
|
|
1010
|
-
anonymousVisitorId?: string;
|
|
1011
|
-
/** ID of a site visitor that has logged in to the site. */
|
|
1012
|
-
memberId?: string;
|
|
1013
|
-
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
1014
|
-
wixUserId?: string;
|
|
1015
|
-
/** ID of an app. */
|
|
1016
|
-
appId?: string;
|
|
1017
|
-
/** @readonly */
|
|
1018
|
-
identityType?: IdentityType;
|
|
1019
|
-
}
|
|
1020
|
-
/** @oneof */
|
|
1021
|
-
interface IdentificationDataIdOneOf {
|
|
1022
|
-
/** ID of a site visitor that has not logged in to the site. */
|
|
1023
|
-
anonymousVisitorId?: string;
|
|
1024
|
-
/** ID of a site visitor that has logged in to the site. */
|
|
1025
|
-
memberId?: string;
|
|
1026
|
-
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
1027
|
-
wixUserId?: string;
|
|
1028
|
-
/** ID of an app. */
|
|
1029
|
-
appId?: string;
|
|
1030
|
-
}
|
|
1031
|
-
|
|
1032
|
-
type ServicePluginMethodInput = {
|
|
1033
|
-
request: any;
|
|
1034
|
-
metadata: any;
|
|
1035
|
-
};
|
|
1036
|
-
type ServicePluginContract = Record<string, (payload: ServicePluginMethodInput) => unknown | Promise<unknown>>;
|
|
1037
|
-
type ServicePluginMethodMetadata = {
|
|
1038
|
-
name: string;
|
|
1039
|
-
primaryHttpMappingPath: string;
|
|
1040
|
-
transformations: {
|
|
1041
|
-
fromREST: (...args: unknown[]) => ServicePluginMethodInput;
|
|
1042
|
-
toREST: (...args: unknown[]) => unknown;
|
|
1043
|
-
};
|
|
1044
|
-
};
|
|
1045
|
-
type ServicePluginDefinition<Contract extends ServicePluginContract> = {
|
|
1046
|
-
__type: 'service-plugin-definition';
|
|
1047
|
-
componentType: string;
|
|
1048
|
-
methods: ServicePluginMethodMetadata[];
|
|
1049
|
-
__contract: Contract;
|
|
1050
|
-
};
|
|
1051
|
-
declare function ServicePluginDefinition<Contract extends ServicePluginContract>(componentType: string, methods: ServicePluginMethodMetadata[]): ServicePluginDefinition<Contract>;
|
|
1052
|
-
type BuildServicePluginDefinition<T extends ServicePluginDefinition<any>> = (implementation: T['__contract']) => void;
|
|
1053
|
-
|
|
1054
|
-
interface ValidateSubmissionEnvelope {
|
|
1055
|
-
request: ValidateSubmissionRequest;
|
|
1056
|
-
metadata: Context;
|
|
1057
|
-
}
|
|
1058
|
-
declare const provideHandlers$1: ServicePluginDefinition<{
|
|
1059
|
-
validateSubmission(payload: ValidateSubmissionEnvelope): ValidateSubmissionResponse | Promise<ValidateSubmissionResponse>;
|
|
1060
|
-
}>;
|
|
1061
|
-
|
|
1062
|
-
declare const provideHandlers: BuildServicePluginDefinition<typeof provideHandlers$1>;
|
|
1063
|
-
|
|
1064
|
-
type context_ActionType = ActionType;
|
|
1065
|
-
declare const context_ActionType: typeof ActionType;
|
|
1066
|
-
type context_AlternativeUri = AlternativeUri;
|
|
1067
|
-
type context_Context = Context;
|
|
1068
|
-
type context_ExtendedFields = ExtendedFields;
|
|
1069
|
-
type context_FormSubmission = FormSubmission;
|
|
1070
|
-
type context_FormSubmissionSpiExtensionConfig = FormSubmissionSpiExtensionConfig;
|
|
1071
|
-
type context_FormsSubmissionsExtensionNamespaceConfig = FormsSubmissionsExtensionNamespaceConfig;
|
|
1072
|
-
type context_IdentificationData = IdentificationData;
|
|
1073
|
-
type context_IdentificationDataIdOneOf = IdentificationDataIdOneOf;
|
|
1074
|
-
type context_IdentityType = IdentityType;
|
|
1075
|
-
declare const context_IdentityType: typeof IdentityType;
|
|
1076
|
-
type context_OrderDetails = OrderDetails;
|
|
1077
|
-
type context_SpiBaseUri = SpiBaseUri;
|
|
1078
|
-
type context_SubmissionErrorType = SubmissionErrorType;
|
|
1079
|
-
declare const context_SubmissionErrorType: typeof SubmissionErrorType;
|
|
1080
|
-
type context_SubmissionStatus = SubmissionStatus;
|
|
1081
|
-
declare const context_SubmissionStatus: typeof SubmissionStatus;
|
|
1082
|
-
type context_SubmissionValidationError = SubmissionValidationError;
|
|
1083
|
-
type context_SubmissionValidationErrorErrorMessageOneOf = SubmissionValidationErrorErrorMessageOneOf;
|
|
1084
|
-
type context_Submitter = Submitter;
|
|
1085
|
-
type context_SubmitterSubmitterOneOf = SubmitterSubmitterOneOf;
|
|
1086
|
-
type context_UpdateOptions = UpdateOptions;
|
|
1087
|
-
type context_ValidateSubmissionRequest = ValidateSubmissionRequest;
|
|
1088
|
-
type context_ValidateSubmissionRequestActionsOneOf = ValidateSubmissionRequestActionsOneOf;
|
|
1089
|
-
type context_ValidateSubmissionResponse = ValidateSubmissionResponse;
|
|
1090
|
-
declare const context_provideHandlers: typeof provideHandlers;
|
|
1091
|
-
declare namespace context {
|
|
1092
|
-
export { context_ActionType as ActionType, type context_AlternativeUri as AlternativeUri, type context_Context as Context, type context_ExtendedFields as ExtendedFields, type context_FormSubmission as FormSubmission, type context_FormSubmissionSpiExtensionConfig as FormSubmissionSpiExtensionConfig, type context_FormsSubmissionsExtensionNamespaceConfig as FormsSubmissionsExtensionNamespaceConfig, type context_IdentificationData as IdentificationData, type context_IdentificationDataIdOneOf as IdentificationDataIdOneOf, context_IdentityType as IdentityType, type context_OrderDetails as OrderDetails, type context_SpiBaseUri as SpiBaseUri, context_SubmissionErrorType as SubmissionErrorType, context_SubmissionStatus as SubmissionStatus, type context_SubmissionValidationError as SubmissionValidationError, type context_SubmissionValidationErrorErrorMessageOneOf as SubmissionValidationErrorErrorMessageOneOf, type context_Submitter as Submitter, type context_SubmitterSubmitterOneOf as SubmitterSubmitterOneOf, type context_UpdateOptions as UpdateOptions, type context_ValidateSubmissionRequest as ValidateSubmissionRequest, type context_ValidateSubmissionRequestActionsOneOf as ValidateSubmissionRequestActionsOneOf, type context_ValidateSubmissionResponse as ValidateSubmissionResponse, context_provideHandlers as provideHandlers };
|
|
1093
|
-
}
|
|
1094
|
-
|
|
1095
|
-
export { context$1 as submissions, context as submissionsExtensionSpi };
|