@wix/forms 1.0.0

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.
Files changed (31) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +24 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/src/forms-v4-submission.http.d.ts +23 -0
  5. package/build/cjs/src/forms-v4-submission.http.js +316 -0
  6. package/build/cjs/src/forms-v4-submission.http.js.map +1 -0
  7. package/build/cjs/src/forms-v4-submission.public.d.ts +16 -0
  8. package/build/cjs/src/forms-v4-submission.public.js +64 -0
  9. package/build/cjs/src/forms-v4-submission.public.js.map +1 -0
  10. package/build/cjs/src/forms-v4-submission.types.d.ts +412 -0
  11. package/build/cjs/src/forms-v4-submission.types.js +25 -0
  12. package/build/cjs/src/forms-v4-submission.types.js.map +1 -0
  13. package/build/cjs/src/forms-v4-submission.universal.d.ts +627 -0
  14. package/build/cjs/src/forms-v4-submission.universal.js +586 -0
  15. package/build/cjs/src/forms-v4-submission.universal.js.map +1 -0
  16. package/build/es/index.d.ts +1 -0
  17. package/build/es/index.js +2 -0
  18. package/build/es/index.js.map +1 -0
  19. package/build/es/src/forms-v4-submission.http.d.ts +23 -0
  20. package/build/es/src/forms-v4-submission.http.js +304 -0
  21. package/build/es/src/forms-v4-submission.http.js.map +1 -0
  22. package/build/es/src/forms-v4-submission.public.d.ts +16 -0
  23. package/build/es/src/forms-v4-submission.public.js +49 -0
  24. package/build/es/src/forms-v4-submission.public.js.map +1 -0
  25. package/build/es/src/forms-v4-submission.types.d.ts +412 -0
  26. package/build/es/src/forms-v4-submission.types.js +22 -0
  27. package/build/es/src/forms-v4-submission.types.js.map +1 -0
  28. package/build/es/src/forms-v4-submission.universal.d.ts +627 -0
  29. package/build/es/src/forms-v4-submission.universal.js +555 -0
  30. package/build/es/src/forms-v4-submission.universal.js.map +1 -0
  31. package/package.json +37 -0
@@ -0,0 +1,627 @@
1
+ export declare const __debug: {
2
+ verboseLogging: {
3
+ on: () => boolean;
4
+ off: () => boolean;
5
+ };
6
+ };
7
+ export interface FormSubmission {
8
+ /**
9
+ * Submission id.
10
+ * @readonly
11
+ */
12
+ _id?: string | null;
13
+ /** Id of a form to which submission belongs. */
14
+ formId?: string;
15
+ /**
16
+ * Form namespace to which submissions belong.
17
+ * @readonly
18
+ */
19
+ namespace?: string;
20
+ /** Status of the submission. */
21
+ status?: SubmissionStatus;
22
+ /** Submission values where key is a target of a form field and value is a submissions for the given field. */
23
+ submissions?: Record<string, any>;
24
+ /**
25
+ * Date of creation.
26
+ * @readonly
27
+ */
28
+ _createdDate?: Date;
29
+ /**
30
+ * Date of last update.
31
+ * @readonly
32
+ */
33
+ _updatedDate?: Date;
34
+ /**
35
+ * Represents the current state of an item. Each time the item is modified, its `revision` changes. for an update operation to succeed, you MUST pass the latest revision.
36
+ * @readonly
37
+ */
38
+ revision?: string | null;
39
+ /**
40
+ * Identification of submission creator
41
+ * @readonly
42
+ */
43
+ submitter?: Submitter;
44
+ /** Flag identifying if submission was read by user */
45
+ seen?: boolean;
46
+ }
47
+ export declare enum SubmissionStatus {
48
+ UNDEFINED = "UNDEFINED",
49
+ PENDING = "PENDING",
50
+ CONFIRMED = "CONFIRMED"
51
+ }
52
+ export interface Owner extends OwnerOwnerOneOf {
53
+ /** Member ID. */
54
+ memberId?: string | null;
55
+ /** Visitor ID. */
56
+ visitorId?: string | null;
57
+ /** Service ID. */
58
+ serviceId?: string | null;
59
+ /** User ID. */
60
+ userId?: string | null;
61
+ /** External app id */
62
+ externalAppId?: string | null;
63
+ }
64
+ /** @oneof */
65
+ export interface OwnerOwnerOneOf {
66
+ /** Member ID. */
67
+ memberId?: string | null;
68
+ /** Visitor ID. */
69
+ visitorId?: string | null;
70
+ /** Service ID. */
71
+ serviceId?: string | null;
72
+ /** User ID. */
73
+ userId?: string | null;
74
+ /** External app id */
75
+ externalAppId?: string | null;
76
+ }
77
+ export interface Submitter extends SubmitterSubmitterOneOf {
78
+ /** Member ID. */
79
+ memberId?: string | null;
80
+ /** Visitor ID. */
81
+ visitorId?: string | null;
82
+ /** Service ID. */
83
+ serviceId?: string | null;
84
+ /** User ID. */
85
+ userId?: string | null;
86
+ /** External app id */
87
+ externalAppId?: string | null;
88
+ }
89
+ /** @oneof */
90
+ export interface SubmitterSubmitterOneOf {
91
+ /** Member ID. */
92
+ memberId?: string | null;
93
+ /** Visitor ID. */
94
+ visitorId?: string | null;
95
+ /** Service ID. */
96
+ serviceId?: string | null;
97
+ /** User ID. */
98
+ userId?: string | null;
99
+ /** External app id */
100
+ externalAppId?: string | null;
101
+ }
102
+ export interface DomainEvent extends DomainEventBodyOneOf {
103
+ createdEvent?: EntityCreatedEvent;
104
+ updatedEvent?: EntityUpdatedEvent;
105
+ deletedEvent?: EntityDeletedEvent;
106
+ actionEvent?: ActionEvent;
107
+ extendedFieldsUpdatedEvent?: ExtendedFieldsUpdatedEvent;
108
+ /** random GUID so clients can tell if event was already handled */
109
+ _id?: string;
110
+ /**
111
+ * Assumes actions are also always typed to an entity_type
112
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
113
+ */
114
+ entityFqdn?: string;
115
+ /**
116
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
117
+ * This is although the created/updated/deleted notion is duplication of the oneof types
118
+ * Example: created/updated/deleted/started/completed/email_opened
119
+ */
120
+ slug?: string;
121
+ /**
122
+ * Assuming that all messages including Actions have id
123
+ * Example: The id of the specific order, the id of a specific campaign
124
+ */
125
+ entityId?: string;
126
+ /** The time of the event. Useful if there was a delay in dispatching */
127
+ eventTime?: Date;
128
+ /**
129
+ * A field that should be set if this event was triggered by an anonymize request.
130
+ * For example you must set it to true when sending an event as a result of a GDPR right to be forgotten request.
131
+ * NOTE: This field is not relevant for `EntityCreatedEvent` but is located here for better ergonomics of consumers.
132
+ */
133
+ triggeredByAnonymizeRequest?: boolean | null;
134
+ /** If present, indicates the action that triggered the event. */
135
+ originatedFrom?: string | null;
136
+ /**
137
+ * A sequence number defining the order of updates to the underlying entity.
138
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
139
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
140
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
141
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
142
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
143
+ */
144
+ entityEventSequence?: string | null;
145
+ }
146
+ /** @oneof */
147
+ export interface DomainEventBodyOneOf {
148
+ createdEvent?: EntityCreatedEvent;
149
+ updatedEvent?: EntityUpdatedEvent;
150
+ deletedEvent?: EntityDeletedEvent;
151
+ actionEvent?: ActionEvent;
152
+ extendedFieldsUpdatedEvent?: ExtendedFieldsUpdatedEvent;
153
+ }
154
+ export interface EntityCreatedEvent {
155
+ entityAsJson?: string;
156
+ }
157
+ export interface EntityUpdatedEvent {
158
+ /**
159
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
160
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
161
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
162
+ */
163
+ currentEntityAsJson?: string;
164
+ }
165
+ export interface EntityDeletedEvent {
166
+ }
167
+ export interface ActionEvent {
168
+ bodyAsJson?: string;
169
+ }
170
+ export interface ExtendedFieldsUpdatedEvent {
171
+ currentEntityAsJson?: string;
172
+ }
173
+ export interface Empty {
174
+ }
175
+ export interface UpsertContactFromSubmissionRequest {
176
+ /** Submission from which contact needs to be upserted. */
177
+ submissionId?: string;
178
+ /** Optional contact id to which submission should be mapped. */
179
+ contactId?: string | null;
180
+ /** Indicates contact has verified primary email. */
181
+ emailVerified?: boolean;
182
+ }
183
+ export interface UpsertContactFromSubmissionResponse {
184
+ /** Submit contact response. */
185
+ submitContactResponse?: SubmitContactResponse;
186
+ }
187
+ export interface SubmitContactResponse {
188
+ /** ID of the contact that was found or created. */
189
+ contactId?: string;
190
+ /**
191
+ * Identity type of the returned contact.
192
+ *
193
+ * - `CONTACT`: The returned contact ID belongs to a new or existing contact.
194
+ * - `MEMBER`: The returned contact ID belongs to the currently logged-in site member.
195
+ * - `NOT_AUTHENTICATED_MEMBER`: The returned contact ID belongs to a site member who is not currently logged in.
196
+ */
197
+ identityType?: IdentityType;
198
+ /**
199
+ * Indicates whether the contact was just created or already existed.
200
+ *
201
+ * If the contact was just created, returns `true`.
202
+ * If it already existed, returns `false`.
203
+ */
204
+ newContact?: boolean;
205
+ }
206
+ export declare enum IdentityType {
207
+ UNKNOWN = "UNKNOWN",
208
+ /** Existing or new contact */
209
+ CONTACT = "CONTACT",
210
+ /** Member is logged in, matching logic skipped */
211
+ MEMBER = "MEMBER",
212
+ /** Matching contact is a member, Merge logic won't be applied */
213
+ NOT_AUTHENTICATED_MEMBER = "NOT_AUTHENTICATED_MEMBER"
214
+ }
215
+ export interface SubmissionContactMapped {
216
+ /**
217
+ * Mapped upserted contact ID.
218
+ * @readonly
219
+ */
220
+ contactId?: string;
221
+ /**
222
+ * Mapped contact emails.
223
+ * @readonly
224
+ */
225
+ emails?: string[];
226
+ /** Identifies the namespace that the submission's form belongs to. */
227
+ namespace?: string;
228
+ }
229
+ export interface CreateSubmissionRequest {
230
+ /** Submission to be created. */
231
+ submission: FormSubmission;
232
+ /** Captcha token */
233
+ captchaToken?: string | null;
234
+ }
235
+ export interface CreateSubmissionResponse {
236
+ /** The created submission. */
237
+ submission?: FormSubmission;
238
+ }
239
+ export interface CreateSubmissionByOwnerRequest {
240
+ /** Submission to be created. */
241
+ submission?: FormSubmission;
242
+ }
243
+ export interface CreateSubmissionByOwnerResponse {
244
+ /** The created submission. */
245
+ submission?: FormSubmission;
246
+ }
247
+ export interface GetSubmissionRequest {
248
+ /** Id of the submission to retrieve. */
249
+ submissionId: string;
250
+ }
251
+ export interface GetSubmissionResponse {
252
+ /** The retrieved submission. */
253
+ submission?: FormSubmission;
254
+ }
255
+ export interface UpdateSubmissionRequest {
256
+ /** Submission to be updated, may be partial. */
257
+ submission: FormSubmission;
258
+ }
259
+ export interface UpdateSubmissionResponse {
260
+ /** The updated submission. */
261
+ submission?: FormSubmission;
262
+ }
263
+ export interface ConfirmSubmissionRequest {
264
+ /** Submission id. */
265
+ submissionId: string;
266
+ }
267
+ export interface ConfirmSubmissionResponse {
268
+ /** Confirmed submission. */
269
+ submission?: FormSubmission;
270
+ }
271
+ export interface DeleteSubmissionRequest {
272
+ /** Id of the submission to delete. */
273
+ submissionId: string;
274
+ }
275
+ export interface DeleteSubmissionResponse {
276
+ }
277
+ export interface QuerySubmissionRequest {
278
+ /** WQL expression. */
279
+ query: CursorQuery;
280
+ /** Return only own submissions. */
281
+ onlyYourOwn?: boolean;
282
+ }
283
+ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
284
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
285
+ cursorPaging?: CursorPaging;
286
+ /**
287
+ * Filter object in the following format:
288
+ * `"filter" : {
289
+ * "fieldName1": "value1",
290
+ * "fieldName2":{"$operator":"value2"}
291
+ * }`
292
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
293
+ */
294
+ filter?: Record<string, any> | null;
295
+ /**
296
+ * Sort object in the following format:
297
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
298
+ */
299
+ sort?: Sorting[];
300
+ }
301
+ /** @oneof */
302
+ export interface CursorQueryPagingMethodOneOf {
303
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
304
+ cursorPaging?: CursorPaging;
305
+ }
306
+ export interface Sorting {
307
+ /** Name of the field to sort by. */
308
+ fieldName?: string;
309
+ /** Sort order. */
310
+ order?: SortOrder;
311
+ }
312
+ export declare enum SortOrder {
313
+ ASC = "ASC",
314
+ DESC = "DESC"
315
+ }
316
+ export interface CursorPaging {
317
+ /** Number of items to load. */
318
+ limit?: number | null;
319
+ /**
320
+ * Pointer to the next or previous page in the list of results.
321
+ *
322
+ * You can get the relevant cursor token
323
+ * from the `pagingMetadata` object in the previous call's response.
324
+ * Not relevant for the first request.
325
+ */
326
+ cursor?: string | null;
327
+ }
328
+ export interface QuerySubmissionResponse {
329
+ /** The retrieved Submissions. */
330
+ submissions?: FormSubmission[];
331
+ /** Paging metadata. */
332
+ metadata?: CursorPagingMetadata;
333
+ }
334
+ export interface CursorPagingMetadata {
335
+ /** Number of items returned in the response. */
336
+ count?: number | null;
337
+ /** Offset that was requested. */
338
+ cursors?: Cursors;
339
+ /**
340
+ * Indicates if there are more results after the current page.
341
+ * If `true`, another page of results can be retrieved.
342
+ * If `false`, this is the last page.
343
+ */
344
+ hasNext?: boolean | null;
345
+ }
346
+ export interface Cursors {
347
+ /** Cursor pointing to next page in the list of results. */
348
+ next?: string | null;
349
+ /** Cursor pointing to previous page in the list of results. */
350
+ prev?: string | null;
351
+ }
352
+ export interface CountSubmissionsRequest {
353
+ /** Form IDs. */
354
+ formIds: string[];
355
+ /** Identifies the namespace that the forms belong to. */
356
+ namespace: string;
357
+ }
358
+ export interface CountSubmissionsResponse {
359
+ /** Forms submissions count. */
360
+ formsSubmissionsCount?: FormSubmissionsCount[];
361
+ }
362
+ export interface FormSubmissionsCount {
363
+ /** Form ID. */
364
+ formId?: string;
365
+ /** Total form submissions count. */
366
+ totalCount?: number;
367
+ /** Unseen form submissions count. */
368
+ unseenCount?: number;
369
+ }
370
+ export interface GetMediaUploadURLRequest {
371
+ /** Form id. */
372
+ formId: string;
373
+ /** Name of file to upload. */
374
+ filename: string;
375
+ /** Mime type of file to upload. */
376
+ mimeType: string;
377
+ }
378
+ export interface GetMediaUploadURLResponse {
379
+ /** Url to upload file. */
380
+ uploadUrl?: string;
381
+ }
382
+ export interface BulkMarkSubmissionsAsSeenRequest {
383
+ /** Submission ids to mark as seen. */
384
+ ids: string[];
385
+ /** Submissions form id. */
386
+ formId: string;
387
+ }
388
+ export interface BulkMarkSubmissionsAsSeenResponse {
389
+ }
390
+ export interface Task {
391
+ key?: TaskKey;
392
+ executeAt?: Date;
393
+ payload?: string | null;
394
+ }
395
+ export interface TaskKey {
396
+ appId?: string;
397
+ instanceId?: string;
398
+ subjectId?: string | null;
399
+ }
400
+ export interface TaskAction extends TaskActionActionOneOf {
401
+ complete?: Complete;
402
+ cancel?: Cancel;
403
+ reschedule?: Reschedule;
404
+ }
405
+ /** @oneof */
406
+ export interface TaskActionActionOneOf {
407
+ complete?: Complete;
408
+ cancel?: Cancel;
409
+ reschedule?: Reschedule;
410
+ }
411
+ export interface Complete {
412
+ }
413
+ export interface Cancel {
414
+ }
415
+ export interface Reschedule {
416
+ executeAt?: Date;
417
+ payload?: string | null;
418
+ }
419
+ /**
420
+ * Creates a new submission.
421
+ * @param submission - Submission to be created.
422
+ * @public
423
+ * @documentationMaturity preview
424
+ * @requiredField submission
425
+ * @requiredField submission.formId
426
+ * @applicableIdentity VISITOR
427
+ */
428
+ export declare function createSubmission(submission: FormSubmission, options?: CreateSubmissionOptions): Promise<CreateSubmissionResponse>;
429
+ export interface CreateSubmissionOptions {
430
+ /** Captcha token */
431
+ captchaToken?: string | null;
432
+ }
433
+ /**
434
+ * Gets a submission by id.
435
+ * @param submissionId - Id of the submission to retrieve.
436
+ * @public
437
+ * @documentationMaturity preview
438
+ * @requiredField submissionId
439
+ * @returns The retrieved submission.
440
+ */
441
+ export declare function getSubmission(submissionId: string): Promise<FormSubmission>;
442
+ /**
443
+ * Updates a submission, supports partial update.
444
+ * You need to pass the latest 'revision' for a successful update.
445
+ * @param _id - Submission id.
446
+ * @public
447
+ * @documentationMaturity preview
448
+ * @requiredField _id
449
+ * @requiredField submission
450
+ * @requiredField submission.formId
451
+ * @requiredField submission.revision
452
+ * @returns The updated submission.
453
+ */
454
+ export declare function updateSubmission(_id: string | null, submission: UpdateSubmission): Promise<FormSubmission>;
455
+ export interface UpdateSubmission {
456
+ /**
457
+ * Submission id.
458
+ * @readonly
459
+ */
460
+ _id?: string | null;
461
+ /** Id of a form to which submission belongs. */
462
+ formId?: string;
463
+ /**
464
+ * Form namespace to which submissions belong.
465
+ * @readonly
466
+ */
467
+ namespace?: string;
468
+ /** Status of the submission. */
469
+ status?: SubmissionStatus;
470
+ /** Submission values where key is a target of a form field and value is a submissions for the given field. */
471
+ submissions?: Record<string, any>;
472
+ /**
473
+ * Date of creation.
474
+ * @readonly
475
+ */
476
+ _createdDate?: Date;
477
+ /**
478
+ * Date of last update.
479
+ * @readonly
480
+ */
481
+ _updatedDate?: Date;
482
+ /**
483
+ * Represents the current state of an item. Each time the item is modified, its `revision` changes. for an update operation to succeed, you MUST pass the latest revision.
484
+ * @readonly
485
+ */
486
+ revision?: string | null;
487
+ /**
488
+ * Identification of submission creator
489
+ * @readonly
490
+ */
491
+ submitter?: Submitter;
492
+ /** Flag identifying if submission was read by user */
493
+ seen?: boolean;
494
+ }
495
+ /**
496
+ * Change submission status to 'CONFIRMED'
497
+ * @param submissionId - Submission id.
498
+ * @public
499
+ * @documentationMaturity preview
500
+ * @requiredField submissionId
501
+ */
502
+ export declare function confirmSubmission(submissionId: string): Promise<ConfirmSubmissionResponse>;
503
+ /**
504
+ * Deletes a submission.
505
+ * @param submissionId - Id of the submission to delete.
506
+ * @public
507
+ * @documentationMaturity preview
508
+ * @requiredField submissionId
509
+ */
510
+ export declare function deleteSubmission(submissionId: string): Promise<void>;
511
+ /**
512
+ * Query submissions using [WQL - Wix Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
513
+ * @public
514
+ * @documentationMaturity preview
515
+ */
516
+ export declare function querySubmission(options?: QuerySubmissionOptions): SubmissionsQueryBuilder;
517
+ export interface QuerySubmissionOptions {
518
+ /** Return only own submissions. */
519
+ onlyYourOwn?: boolean | undefined;
520
+ }
521
+ interface QueryCursorResult {
522
+ cursors: Cursors;
523
+ hasNext: () => boolean;
524
+ hasPrev: () => boolean;
525
+ length: number;
526
+ pageSize: number;
527
+ }
528
+ export interface SubmissionsQueryResult extends QueryCursorResult {
529
+ items: FormSubmission[];
530
+ query: SubmissionsQueryBuilder;
531
+ next: () => Promise<SubmissionsQueryResult>;
532
+ prev: () => Promise<SubmissionsQueryResult>;
533
+ }
534
+ export interface SubmissionsQueryBuilder {
535
+ /** @param propertyName - Property whose value is compared with `value`.
536
+ * @param value - Value to compare against.
537
+ * @documentationMaturity preview
538
+ */
539
+ eq: (propertyName: '_id' | 'formId' | 'namespace' | 'status' | '_createdDate' | '_updatedDate', value: any) => SubmissionsQueryBuilder;
540
+ /** @param propertyName - Property whose value is compared with `value`.
541
+ * @param value - Value to compare against.
542
+ * @documentationMaturity preview
543
+ */
544
+ ne: (propertyName: '_id' | 'formId' | 'namespace' | 'status' | '_createdDate' | '_updatedDate', value: any) => SubmissionsQueryBuilder;
545
+ /** @param propertyName - Property whose value is compared with `value`.
546
+ * @param value - Value to compare against.
547
+ * @documentationMaturity preview
548
+ */
549
+ gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => SubmissionsQueryBuilder;
550
+ /** @param propertyName - Property whose value is compared with `value`.
551
+ * @param value - Value to compare against.
552
+ * @documentationMaturity preview
553
+ */
554
+ le: (propertyName: '_createdDate' | '_updatedDate', value: any) => SubmissionsQueryBuilder;
555
+ /** @param propertyName - Property whose value is compared with `value`.
556
+ * @param value - Value to compare against.
557
+ * @documentationMaturity preview
558
+ */
559
+ lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => SubmissionsQueryBuilder;
560
+ /** @documentationMaturity preview */
561
+ in: (propertyName: '_id' | 'formId' | 'namespace' | 'status' | '_createdDate' | '_updatedDate', value: any) => SubmissionsQueryBuilder;
562
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
563
+ * @documentationMaturity preview
564
+ */
565
+ ascending: (...propertyNames: Array<'_id' | 'formId' | 'namespace' | 'status' | '_createdDate' | '_updatedDate'>) => SubmissionsQueryBuilder;
566
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
567
+ * @documentationMaturity preview
568
+ */
569
+ descending: (...propertyNames: Array<'_id' | 'formId' | 'namespace' | 'status' | '_createdDate' | '_updatedDate'>) => SubmissionsQueryBuilder;
570
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
571
+ * @documentationMaturity preview
572
+ */
573
+ limit: (limit: number) => SubmissionsQueryBuilder;
574
+ /** @param cursor - A pointer to specific record
575
+ * @documentationMaturity preview
576
+ */
577
+ skipTo: (cursor: string) => SubmissionsQueryBuilder;
578
+ /** @documentationMaturity preview */
579
+ find: () => Promise<SubmissionsQueryResult>;
580
+ }
581
+ /**
582
+ * Counts forms submissions.
583
+ * @param formIds - Form IDs.
584
+ * @public
585
+ * @documentationMaturity preview
586
+ * @requiredField formIds
587
+ * @requiredField options
588
+ * @requiredField options.namespace
589
+ */
590
+ export declare function countSubmissions(formIds: string[], options: CountSubmissionsOptions): Promise<CountSubmissionsResponse>;
591
+ export interface CountSubmissionsOptions {
592
+ /** Identifies the namespace that the forms belong to. */
593
+ namespace: string;
594
+ }
595
+ /**
596
+ * Returns url to upload media file.
597
+ * @param formId - Form id.
598
+ * @public
599
+ * @documentationMaturity preview
600
+ * @requiredField formId
601
+ * @requiredField options
602
+ * @requiredField options.filename
603
+ * @requiredField options.mimeType
604
+ * @applicableIdentity VISITOR
605
+ */
606
+ export declare function getMediaUploadUrl(formId: string, options: GetMediaUploadUrlOptions): Promise<GetMediaUploadURLResponse>;
607
+ export interface GetMediaUploadUrlOptions {
608
+ /** Name of file to upload. */
609
+ filename: string;
610
+ /** Mime type of file to upload. */
611
+ mimeType: string;
612
+ }
613
+ /**
614
+ * Marks submissions as seen.
615
+ * @param ids - Submission ids to mark as seen.
616
+ * @public
617
+ * @documentationMaturity preview
618
+ * @requiredField ids
619
+ * @requiredField options
620
+ * @requiredField options.formId
621
+ */
622
+ export declare function bulkMarkSubmissionsAsSeen(ids: string[], options: BulkMarkSubmissionsAsSeenOptions): Promise<void>;
623
+ export interface BulkMarkSubmissionsAsSeenOptions {
624
+ /** Submissions form id. */
625
+ formId: string;
626
+ }
627
+ export {};