@wix/auto_sdk_intake-forms_intake-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 (39) hide show
  1. package/build/cjs/index.d.ts +105 -0
  2. package/build/cjs/index.js +507 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +474 -0
  5. package/build/cjs/index.typings.js +450 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +366 -0
  8. package/build/cjs/meta.js +389 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/es/index.d.mts +105 -0
  11. package/build/es/index.mjs +477 -0
  12. package/build/es/index.mjs.map +1 -0
  13. package/build/es/index.typings.d.mts +474 -0
  14. package/build/es/index.typings.mjs +420 -0
  15. package/build/es/index.typings.mjs.map +1 -0
  16. package/build/es/meta.d.mts +366 -0
  17. package/build/es/meta.mjs +356 -0
  18. package/build/es/meta.mjs.map +1 -0
  19. package/build/es/package.json +3 -0
  20. package/build/internal/cjs/index.d.ts +105 -0
  21. package/build/internal/cjs/index.js +507 -0
  22. package/build/internal/cjs/index.js.map +1 -0
  23. package/build/internal/cjs/index.typings.d.ts +474 -0
  24. package/build/internal/cjs/index.typings.js +450 -0
  25. package/build/internal/cjs/index.typings.js.map +1 -0
  26. package/build/internal/cjs/meta.d.ts +366 -0
  27. package/build/internal/cjs/meta.js +389 -0
  28. package/build/internal/cjs/meta.js.map +1 -0
  29. package/build/internal/es/index.d.mts +105 -0
  30. package/build/internal/es/index.mjs +477 -0
  31. package/build/internal/es/index.mjs.map +1 -0
  32. package/build/internal/es/index.typings.d.mts +474 -0
  33. package/build/internal/es/index.typings.mjs +420 -0
  34. package/build/internal/es/index.typings.mjs.map +1 -0
  35. package/build/internal/es/meta.d.mts +366 -0
  36. package/build/internal/es/meta.mjs +356 -0
  37. package/build/internal/es/meta.mjs.map +1 -0
  38. package/meta/package.json +3 -0
  39. package/package.json +54 -0
@@ -0,0 +1,366 @@
1
+ import { QueryIntakeFormsRequest as QueryIntakeFormsRequest$1, QueryIntakeFormsResponse as QueryIntakeFormsResponse$1, UpdateIntakeFormExpirationPeriodRequest as UpdateIntakeFormExpirationPeriodRequest$1, UpdateIntakeFormExpirationPeriodResponse as UpdateIntakeFormExpirationPeriodResponse$1, CreateCustomerSubmissionLinkRequest as CreateCustomerSubmissionLinkRequest$1, CreateCustomerSubmissionLinkResponse as CreateCustomerSubmissionLinkResponse$1, DeleteIntakeFormRequest as DeleteIntakeFormRequest$1, DeleteIntakeFormResponse as DeleteIntakeFormResponse$1, ArchiveIntakeFormRequest as ArchiveIntakeFormRequest$1, ArchiveIntakeFormResponse as ArchiveIntakeFormResponse$1, UnarchiveIntakeFormRequest as UnarchiveIntakeFormRequest$1, UnarchiveIntakeFormResponse as UnarchiveIntakeFormResponse$1 } from './index.typings.mjs';
2
+ import '@wix/sdk-types';
3
+
4
+ interface IntakeForm {
5
+ /**
6
+ * Intake form ID.
7
+ * @format GUID
8
+ * @readonly
9
+ */
10
+ id?: string | null;
11
+ /**
12
+ * Expiration period in months. If not set, submissions don't expire.
13
+ * @min 1
14
+ * @max 60
15
+ */
16
+ expirationPeriodInMonths?: number | null;
17
+ /**
18
+ * Whether the intake form is archived and disabled from accepting new submissions.
19
+ * @readonly
20
+ */
21
+ archived?: boolean | null;
22
+ /**
23
+ * Intake form name.
24
+ * @minLength 1
25
+ * @maxLength 100
26
+ * @readonly
27
+ */
28
+ name?: string | null;
29
+ /**
30
+ * Date and time the intake form was created in UTC datetime `YYYY-MM-DDThh:mm:ssZ` format.
31
+ * @readonly
32
+ */
33
+ createdDate?: Date | null;
34
+ /**
35
+ * Date and time the intake form was updated in UTC datetime `YYYY-MM-DDThh:mm:ssZ` format.
36
+ * @readonly
37
+ */
38
+ updatedDate?: Date | null;
39
+ /**
40
+ * Revision number, which increments by 1 each time the intake form is updated.
41
+ * To prevent conflicting changes, the current revision must be passed when updating the intake form.
42
+ * @readonly
43
+ */
44
+ revision?: string | null;
45
+ }
46
+ interface QueryIntakeFormsRequest {
47
+ /**
48
+ * Filter object.
49
+ * See @API Query Language
50
+ * for more information.
51
+ *
52
+ * For a detailed list of supported filters, see
53
+ * @Supported Filters.
54
+ */
55
+ query?: CursorQuery;
56
+ }
57
+ interface CursorQuery extends CursorQueryPagingMethodOneOf {
58
+ /**
59
+ * Cursor paging options.
60
+ *
61
+ * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
62
+ */
63
+ cursorPaging?: CursorPaging;
64
+ /**
65
+ * Filter object.
66
+ *
67
+ * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
68
+ */
69
+ filter?: Record<string, any> | null;
70
+ /**
71
+ * Sort object.
72
+ *
73
+ * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
74
+ * @maxSize 5
75
+ */
76
+ sort?: Sorting[];
77
+ }
78
+ /** @oneof */
79
+ interface CursorQueryPagingMethodOneOf {
80
+ /**
81
+ * Cursor paging options.
82
+ *
83
+ * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
84
+ */
85
+ cursorPaging?: CursorPaging;
86
+ }
87
+ interface Sorting {
88
+ /**
89
+ * Name of the field to sort by.
90
+ * @maxLength 512
91
+ */
92
+ fieldName?: string;
93
+ /** Sort order. */
94
+ order?: SortOrderWithLiterals;
95
+ }
96
+ declare enum SortOrder {
97
+ ASC = "ASC",
98
+ DESC = "DESC"
99
+ }
100
+ /** @enumType */
101
+ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
102
+ interface CursorPaging {
103
+ /**
104
+ * Maximum number of items to return in the results.
105
+ * @max 100
106
+ */
107
+ limit?: number | null;
108
+ /**
109
+ * Pointer to the next or previous page in the list of results.
110
+ *
111
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
112
+ * Not relevant for the first request.
113
+ * @maxLength 16000
114
+ */
115
+ cursor?: string | null;
116
+ }
117
+ interface QueryIntakeFormsResponse {
118
+ /** Retrieved intake forms. */
119
+ intakeForms?: IntakeForm[];
120
+ /** Paging metadata. */
121
+ pagingMetadata?: CursorPagingMetadata;
122
+ }
123
+ interface CursorPagingMetadata {
124
+ /** Number of items returned in current page. */
125
+ count?: number | null;
126
+ /** Cursor strings that point to the next page, previous page, or both. */
127
+ cursors?: Cursors;
128
+ /**
129
+ * Whether there are more pages to retrieve following the current page.
130
+ *
131
+ * + `true`: Another page of results can be retrieved.
132
+ * + `false`: This is the last page.
133
+ */
134
+ hasNext?: boolean | null;
135
+ }
136
+ interface Cursors {
137
+ /**
138
+ * Cursor string pointing to the next page in the list of results.
139
+ * @maxLength 16000
140
+ */
141
+ next?: string | null;
142
+ /**
143
+ * Cursor pointing to the previous page in the list of results.
144
+ * @maxLength 16000
145
+ */
146
+ prev?: string | null;
147
+ }
148
+ interface UpdateIntakeFormExpirationPeriodRequest {
149
+ /**
150
+ * Intake form ID.
151
+ * @format GUID
152
+ */
153
+ intakeFormId: string | null;
154
+ /**
155
+ * New expiration period in months. If not set, submissions don't expire.
156
+ * @min 1
157
+ * @max 60
158
+ */
159
+ expirationPeriodInMonths?: number | null;
160
+ /**
161
+ * Revision number, which increments by 1 each time the intake form is updated.
162
+ * To prevent conflicting changes, you must specify the current revision when updating the intake form.
163
+ */
164
+ formRevision: string | null;
165
+ }
166
+ interface UpdateIntakeFormExpirationPeriodResponse {
167
+ /** Updated intake form. */
168
+ intakeForm?: IntakeForm;
169
+ }
170
+ interface CreateCustomerSubmissionLinkRequest {
171
+ /**
172
+ * Intake form ID.
173
+ * @format GUID
174
+ */
175
+ intakeFormId: string | null;
176
+ /**
177
+ * [Contact](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts/introduction) ID to personalize and pre-fill the submission with the contact's information.
178
+ * @format GUID
179
+ */
180
+ contactId?: string | null;
181
+ }
182
+ interface CreateCustomerSubmissionLinkResponse {
183
+ /**
184
+ * Generated link URL for the intake form submission.
185
+ * @minLength 1
186
+ * @maxLength 2048
187
+ */
188
+ intakeFormUrl?: string | null;
189
+ /**
190
+ * Encrypted token containing contact details. Available only if you specified `contactId` in request.
191
+ * @maxLength 2048
192
+ */
193
+ token?: string | null;
194
+ }
195
+ interface DeleteIntakeFormRequest {
196
+ /**
197
+ * Intake form ID.
198
+ * @format GUID
199
+ */
200
+ intakeFormId: string | null;
201
+ }
202
+ interface DeleteIntakeFormResponse {
203
+ }
204
+ interface ArchiveIntakeFormRequest {
205
+ /**
206
+ * Intake form ID.
207
+ * @format GUID
208
+ */
209
+ intakeFormId: string | null;
210
+ /**
211
+ * Revision number, which increments by 1 each time the intake form is updated.
212
+ * To prevent conflicting changes, you must specify the current revision when updating the intake form.
213
+ */
214
+ formRevision: string | null;
215
+ }
216
+ interface ArchiveIntakeFormResponse {
217
+ /** Archived intake form. */
218
+ intakeForm?: IntakeForm;
219
+ }
220
+ interface UnarchiveIntakeFormRequest {
221
+ /**
222
+ * Intake form ID.
223
+ * @format GUID
224
+ */
225
+ intakeFormId: string | null;
226
+ /**
227
+ * Revision number, which increments by 1 each time the intake form is updated.
228
+ * To prevent conflicting changes, you must specify the current revision when updating the intake form.
229
+ */
230
+ formRevision: string | null;
231
+ }
232
+ interface UnarchiveIntakeFormResponse {
233
+ /** Unarchived intake form. */
234
+ intakeForm?: IntakeForm;
235
+ }
236
+ interface DomainEvent extends DomainEventBodyOneOf {
237
+ createdEvent?: EntityCreatedEvent;
238
+ updatedEvent?: EntityUpdatedEvent;
239
+ deletedEvent?: EntityDeletedEvent;
240
+ actionEvent?: ActionEvent;
241
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
242
+ id?: string;
243
+ /**
244
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
245
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
246
+ */
247
+ entityFqdn?: string;
248
+ /**
249
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
250
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
251
+ */
252
+ slug?: string;
253
+ /** ID of the entity associated with the event. */
254
+ entityId?: string;
255
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
256
+ eventTime?: Date | null;
257
+ /**
258
+ * Whether the event was triggered as a result of a privacy regulation application
259
+ * (for example, GDPR).
260
+ */
261
+ triggeredByAnonymizeRequest?: boolean | null;
262
+ /** If present, indicates the action that triggered the event. */
263
+ originatedFrom?: string | null;
264
+ /**
265
+ * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
266
+ * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
267
+ */
268
+ entityEventSequence?: string | null;
269
+ }
270
+ /** @oneof */
271
+ interface DomainEventBodyOneOf {
272
+ createdEvent?: EntityCreatedEvent;
273
+ updatedEvent?: EntityUpdatedEvent;
274
+ deletedEvent?: EntityDeletedEvent;
275
+ actionEvent?: ActionEvent;
276
+ }
277
+ interface EntityCreatedEvent {
278
+ entityAsJson?: string;
279
+ /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
280
+ restoreInfo?: RestoreInfo;
281
+ }
282
+ interface RestoreInfo {
283
+ deletedDate?: Date | null;
284
+ }
285
+ interface EntityUpdatedEvent {
286
+ /**
287
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
288
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
289
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
290
+ */
291
+ currentEntityAsJson?: string;
292
+ }
293
+ interface EntityDeletedEvent {
294
+ /** Entity that was deleted. */
295
+ deletedEntityAsJson?: string | null;
296
+ }
297
+ interface ActionEvent {
298
+ bodyAsJson?: string;
299
+ }
300
+ interface Empty {
301
+ }
302
+ interface DecryptContactDetailsFromTokenRequest {
303
+ /**
304
+ * Encrypted token containing contact details and creation timestamp.
305
+ * Generated by [Create Customer Submission Link](TODO) when a `contactId` is provided.
306
+ * @minLength 1
307
+ * @maxLength 2048
308
+ */
309
+ token?: string;
310
+ }
311
+ interface DecryptContactDetailsFromTokenResponse {
312
+ /** Contact details extracted from the token. */
313
+ contactDetails?: ContactDetails;
314
+ }
315
+ interface ContactDetails {
316
+ /**
317
+ * Contact email address. Always present.
318
+ * @format EMAIL
319
+ */
320
+ email?: string;
321
+ /**
322
+ * Contact first name. Present when the contact record has a first name.
323
+ * @maxLength 200
324
+ */
325
+ firstName?: string | null;
326
+ /**
327
+ * Contact last name. Present when the contact record has a last name.
328
+ * @maxLength 200
329
+ */
330
+ lastName?: string | null;
331
+ }
332
+ /** @docsIgnore */
333
+ type CreateCustomerSubmissionLinkApplicationErrors = {
334
+ code?: 'MISSING_SITE_URL';
335
+ description?: string;
336
+ data?: Record<string, any>;
337
+ };
338
+
339
+ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
340
+ getUrl: (context: any) => string;
341
+ httpMethod: K;
342
+ path: string;
343
+ pathParams: M;
344
+ __requestType: T;
345
+ __originalRequestType: S;
346
+ __responseType: Q;
347
+ __originalResponseType: R;
348
+ };
349
+ declare function queryIntakeForms(): __PublicMethodMetaInfo<'POST', {}, QueryIntakeFormsRequest$1, QueryIntakeFormsRequest, QueryIntakeFormsResponse$1, QueryIntakeFormsResponse>;
350
+ declare function updateIntakeFormExpirationPeriod(): __PublicMethodMetaInfo<'PATCH', {
351
+ intakeFormId: string;
352
+ }, UpdateIntakeFormExpirationPeriodRequest$1, UpdateIntakeFormExpirationPeriodRequest, UpdateIntakeFormExpirationPeriodResponse$1, UpdateIntakeFormExpirationPeriodResponse>;
353
+ declare function createCustomerSubmissionLink(): __PublicMethodMetaInfo<'GET', {
354
+ intakeFormId: string;
355
+ }, CreateCustomerSubmissionLinkRequest$1, CreateCustomerSubmissionLinkRequest, CreateCustomerSubmissionLinkResponse$1, CreateCustomerSubmissionLinkResponse>;
356
+ declare function deleteIntakeForm(): __PublicMethodMetaInfo<'DELETE', {
357
+ intakeFormId: string;
358
+ }, DeleteIntakeFormRequest$1, DeleteIntakeFormRequest, DeleteIntakeFormResponse$1, DeleteIntakeFormResponse>;
359
+ declare function archiveIntakeForm(): __PublicMethodMetaInfo<'POST', {
360
+ intakeFormId: string;
361
+ }, ArchiveIntakeFormRequest$1, ArchiveIntakeFormRequest, ArchiveIntakeFormResponse$1, ArchiveIntakeFormResponse>;
362
+ declare function unarchiveIntakeForm(): __PublicMethodMetaInfo<'POST', {
363
+ intakeFormId: string;
364
+ }, UnarchiveIntakeFormRequest$1, UnarchiveIntakeFormRequest, UnarchiveIntakeFormResponse$1, UnarchiveIntakeFormResponse>;
365
+
366
+ export { type ActionEvent as ActionEventOriginal, type ArchiveIntakeFormRequest as ArchiveIntakeFormRequestOriginal, type ArchiveIntakeFormResponse as ArchiveIntakeFormResponseOriginal, type ContactDetails as ContactDetailsOriginal, type CreateCustomerSubmissionLinkApplicationErrors as CreateCustomerSubmissionLinkApplicationErrorsOriginal, type CreateCustomerSubmissionLinkRequest as CreateCustomerSubmissionLinkRequestOriginal, type CreateCustomerSubmissionLinkResponse as CreateCustomerSubmissionLinkResponseOriginal, type CursorPagingMetadata as CursorPagingMetadataOriginal, type CursorPaging as CursorPagingOriginal, type CursorQuery as CursorQueryOriginal, type CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal, type Cursors as CursorsOriginal, type DecryptContactDetailsFromTokenRequest as DecryptContactDetailsFromTokenRequestOriginal, type DecryptContactDetailsFromTokenResponse as DecryptContactDetailsFromTokenResponseOriginal, type DeleteIntakeFormRequest as DeleteIntakeFormRequestOriginal, type DeleteIntakeFormResponse as DeleteIntakeFormResponseOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type Empty as EmptyOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type IntakeForm as IntakeFormOriginal, type QueryIntakeFormsRequest as QueryIntakeFormsRequestOriginal, type QueryIntakeFormsResponse as QueryIntakeFormsResponseOriginal, type RestoreInfo as RestoreInfoOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sorting as SortingOriginal, type UnarchiveIntakeFormRequest as UnarchiveIntakeFormRequestOriginal, type UnarchiveIntakeFormResponse as UnarchiveIntakeFormResponseOriginal, type UpdateIntakeFormExpirationPeriodRequest as UpdateIntakeFormExpirationPeriodRequestOriginal, type UpdateIntakeFormExpirationPeriodResponse as UpdateIntakeFormExpirationPeriodResponseOriginal, type __PublicMethodMetaInfo, archiveIntakeForm, createCustomerSubmissionLink, deleteIntakeForm, queryIntakeForms, unarchiveIntakeForm, updateIntakeFormExpirationPeriod };