@wix/auto_sdk_intake-forms_intake-forms 1.0.4 → 1.0.5

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.
@@ -1,4 +1,5 @@
1
- import { NonNullablePaths } from '@wix/sdk-types';
1
+ import * as _wix_sdk_types from '@wix/sdk-types';
2
+ import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types';
2
3
 
3
4
  /**
4
5
  * A wrapper around a Wix form that adds expiration tracking and submission management.
@@ -303,7 +304,7 @@ interface Empty {
303
304
  interface DecryptContactDetailsFromTokenRequest {
304
305
  /**
305
306
  * Encrypted token containing contact details and creation timestamp.
306
- * Generated by [Create Customer Submission Link](https://dev.wix.com/docs/api-reference/crm/forms/other-services/intake-forms/create-customer-submission-link) when a `contactId` is provided.
307
+ * Generated by [Create Customer Submission Link](https://dev.wix.com/docs/api-reference/crm/forms/other-services/intake-forms/intake-forms/create-customer-submission-link) when a `contactId` is provided.
307
308
  * @minLength 1
308
309
  * @maxLength 2048
309
310
  */
@@ -339,13 +340,16 @@ type CreateCustomerSubmissionLinkApplicationErrors = {
339
340
  /**
340
341
  * Retrieves a list of intake forms, with the specified paging, filtering, and sorting.
341
342
  *
342
- *
343
- * QueryIntakeForms runs with these defaults, which you can override:
343
+ * Query Intake Forms runs with these defaults, which you can override:
344
344
  *
345
345
  * - `createdDate` is sorted in `DESC` order.
346
346
  * - `paging.limit` is `50`.
347
347
  * - `paging.offset` is `0`.
348
348
  *
349
+ * This method forwards queries to Wix Forms' [Query Forms](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/query-forms) method and supports the same filters.
350
+ *
351
+ * Additionally, you can filter by `archived` to retrieve only archived or non-archived intake forms.
352
+ *
349
353
  * Learn more about [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language).
350
354
  * @public
351
355
  * @documentationMaturity preview
@@ -353,27 +357,157 @@ type CreateCustomerSubmissionLinkApplicationErrors = {
353
357
  * @applicableIdentity APP
354
358
  * @fqn wix.intakeforms.v1.IntakeFormsService.QueryIntakeForms
355
359
  */
356
- declare function queryIntakeForms(options?: QueryIntakeFormsOptions): Promise<NonNullablePaths<QueryIntakeFormsResponse, `intakeForms`, 2>>;
357
- interface QueryIntakeFormsOptions {
358
- /**
359
- * Filter object.
360
- * See
361
- * @API Query Language
362
- * for more information.
363
- *
364
- * For a detailed list of supported filters, see
365
- * @Supported Filters.
366
- */
367
- query?: CursorQuery;
360
+ declare function queryIntakeForms(): IntakeFormsQueryBuilder;
361
+ interface QueryCursorResult {
362
+ cursors: Cursors;
363
+ hasNext: () => boolean;
364
+ hasPrev: () => boolean;
365
+ length: number;
366
+ pageSize: number;
367
+ }
368
+ interface IntakeFormsQueryResult extends QueryCursorResult {
369
+ items: IntakeForm[];
370
+ query: IntakeFormsQueryBuilder;
371
+ next: () => Promise<IntakeFormsQueryResult>;
372
+ prev: () => Promise<IntakeFormsQueryResult>;
373
+ }
374
+ interface IntakeFormsQueryBuilder {
375
+ /** @param propertyName - Property whose value is compared with `value`.
376
+ * @param value - Value to compare against.
377
+ * @documentationMaturity preview
378
+ */
379
+ eq: (propertyName: '_id' | 'archived' | 'name' | '_createdDate' | '_updatedDate', value: any) => IntakeFormsQueryBuilder;
380
+ /** @param propertyName - Property whose value is compared with `value`.
381
+ * @param value - Value to compare against.
382
+ * @documentationMaturity preview
383
+ */
384
+ ne: (propertyName: '_id' | 'archived' | 'name' | '_createdDate' | '_updatedDate', value: any) => IntakeFormsQueryBuilder;
385
+ /** @param propertyName - Property whose value is compared with `value`.
386
+ * @param value - Value to compare against.
387
+ * @documentationMaturity preview
388
+ */
389
+ ge: (propertyName: '_id' | 'name' | '_createdDate' | '_updatedDate', value: any) => IntakeFormsQueryBuilder;
390
+ /** @param propertyName - Property whose value is compared with `value`.
391
+ * @param value - Value to compare against.
392
+ * @documentationMaturity preview
393
+ */
394
+ gt: (propertyName: '_id' | 'name' | '_createdDate' | '_updatedDate', value: any) => IntakeFormsQueryBuilder;
395
+ /** @param propertyName - Property whose value is compared with `value`.
396
+ * @param value - Value to compare against.
397
+ * @documentationMaturity preview
398
+ */
399
+ le: (propertyName: '_id' | 'name' | '_createdDate' | '_updatedDate', value: any) => IntakeFormsQueryBuilder;
400
+ /** @param propertyName - Property whose value is compared with `value`.
401
+ * @param value - Value to compare against.
402
+ * @documentationMaturity preview
403
+ */
404
+ lt: (propertyName: '_id' | 'name' | '_createdDate' | '_updatedDate', value: any) => IntakeFormsQueryBuilder;
405
+ /** @param propertyName - Property whose value is compared with `string`.
406
+ * @param string - String to compare against. Case-insensitive.
407
+ * @documentationMaturity preview
408
+ */
409
+ startsWith: (propertyName: '_id' | 'name', value: string) => IntakeFormsQueryBuilder;
410
+ /** @param propertyName - Property whose value is compared with `values`.
411
+ * @param values - List of values to compare against.
412
+ * @documentationMaturity preview
413
+ */
414
+ hasSome: (propertyName: '_id' | 'archived' | 'name' | '_createdDate' | '_updatedDate', value: any[]) => IntakeFormsQueryBuilder;
415
+ /** @documentationMaturity preview */
416
+ in: (propertyName: '_id' | 'archived' | 'name' | '_createdDate' | '_updatedDate', value: any) => IntakeFormsQueryBuilder;
417
+ /** @documentationMaturity preview */
418
+ exists: (propertyName: '_id' | 'archived' | 'name' | '_createdDate' | '_updatedDate', value: boolean) => IntakeFormsQueryBuilder;
419
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
420
+ * @documentationMaturity preview
421
+ */
422
+ ascending: (...propertyNames: Array<'_id' | 'archived' | 'name' | '_createdDate' | '_updatedDate'>) => IntakeFormsQueryBuilder;
423
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
424
+ * @documentationMaturity preview
425
+ */
426
+ descending: (...propertyNames: Array<'_id' | 'archived' | 'name' | '_createdDate' | '_updatedDate'>) => IntakeFormsQueryBuilder;
427
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
428
+ * @documentationMaturity preview
429
+ */
430
+ limit: (limit: number) => IntakeFormsQueryBuilder;
431
+ /** @param cursor - A pointer to specific record
432
+ * @documentationMaturity preview
433
+ */
434
+ skipTo: (cursor: string) => IntakeFormsQueryBuilder;
435
+ /** @documentationMaturity preview */
436
+ find: () => Promise<IntakeFormsQueryResult>;
368
437
  }
438
+ /**
439
+ * @hidden
440
+ * @fqn wix.intakeforms.v1.IntakeFormsService.QueryIntakeForms
441
+ * @requiredField query
442
+ */
443
+ declare function typedQueryIntakeForms(query: IntakeFormQuery): Promise<NonNullablePaths<QueryIntakeFormsResponse, `intakeForms`, 2>>;
444
+ interface IntakeFormQuerySpec extends QuerySpec {
445
+ paging: 'cursor';
446
+ wql: [
447
+ {
448
+ fields: ['_createdDate', '_id', '_updatedDate', 'archived', 'name'];
449
+ operators: '*';
450
+ sort: 'BOTH';
451
+ }
452
+ ];
453
+ }
454
+ type CommonQueryWithEntityContext = Query<IntakeForm, IntakeFormQuerySpec>;
455
+ type IntakeFormQuery = {
456
+ /**
457
+ Cursor paging options.
458
+
459
+ Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
460
+ */
461
+ cursorPaging?: {
462
+ /**
463
+ Maximum number of items to return in the results.
464
+ @max: 100
465
+ */
466
+ limit?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit'] | null;
467
+ /**
468
+ Pointer to the next or previous page in the list of results.
469
+
470
+ Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
471
+ Not relevant for the first request.
472
+ @maxLength: 16000
473
+ */
474
+ cursor?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor'] | null;
475
+ };
476
+ /**
477
+ Filter object.
478
+
479
+ Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
480
+ */
481
+ filter?: CommonQueryWithEntityContext['filter'] | null;
482
+ /**
483
+ Sort object.
484
+
485
+ Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
486
+ @maxSize: 5
487
+ */
488
+ sort?: {
489
+ /**
490
+ Name of the field to sort by.
491
+ @maxLength: 512
492
+ */
493
+ fieldName?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['fieldName'];
494
+ /**
495
+ Sort order.
496
+ */
497
+ order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];
498
+ }[];
499
+ };
500
+ declare const utils: {
501
+ query: {
502
+ QueryBuilder: () => _wix_sdk_types.QueryBuilder<IntakeForm, IntakeFormQuerySpec, IntakeFormQuery>;
503
+ Filter: _wix_sdk_types.FilterFactory<IntakeForm, IntakeFormQuerySpec>;
504
+ Sort: _wix_sdk_types.SortFactory<IntakeFormQuerySpec>;
505
+ };
506
+ };
369
507
  /**
370
508
  * Updates the expiration period of a specific intake form.
371
509
  *
372
510
  * When you update the expiration period, the system recalculates expiration for all existing submissions.
373
- *
374
- * Each time the intake form is updated, `revision` increments by 1.
375
- * You must specify the current `revision` when updating the intake form.
376
- * This ensures you're working with the latest intake form and prevents unintended overwrites.
377
511
  * @param intakeFormId - Intake form ID.
378
512
  * @public
379
513
  * @documentationMaturity preview
@@ -425,8 +559,8 @@ interface CreateCustomerSubmissionLinkOptions {
425
559
  *
426
560
  * Also deletes the underlying [Wix form](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/introduction).
427
561
  *
428
- * Existing [submissions](https://dev.wix.com/docs/api-reference/crm/forms/other-services/intake-form-submissions/introduction) for the intake form aren't automatically deleted but become orphaned.
429
- * When [querying submissions](https://dev.wix.com/docs/api-reference/crm/forms/other-services/intake-form-submissions/query-intake-form-submissions), orphaned submissions aren't returned.
562
+ * Existing [submissions](https://dev.wix.com/docs/api-reference/crm/forms/other-services/intake-forms/intake-form-submissions/introduction) for the intake form aren't automatically deleted but become orphaned.
563
+ * When [querying submissions](https://dev.wix.com/docs/api-reference/crm/forms/other-services/intake-forms/intake-form-submissions/query-intake-form-submissions), orphaned submissions aren't returned.
430
564
  * @param intakeFormId - Intake form ID.
431
565
  * @public
432
566
  * @documentationMaturity preview
@@ -439,11 +573,7 @@ declare function deleteIntakeForm(intakeFormId: string): Promise<void>;
439
573
  /**
440
574
  * Archives an intake form, disabling it from accepting new submissions.
441
575
  *
442
- * Existing submissions remain accessible. You can [unarchive](https://dev.wix.com/docs/api-reference/crm/forms/other-services/intake-forms/unarchive-intake-form) the form later to resume accepting submissions.
443
- *
444
- * Each time the intake form is updated, `revision` increments by 1.
445
- * You must specify the current `revision` when updating the intake form.
446
- * This ensures you're working with the latest intake form and prevents unintended overwrites.
576
+ * Existing submissions remain accessible. You can [unarchive](https://dev.wix.com/docs/api-reference/crm/forms/other-services/intake-forms/intake-forms/unarchive-intake-form) the form later to resume accepting submissions.
447
577
  * @param intakeFormId - Intake form ID.
448
578
  * @param formRevision - Revision number, which increments by 1 each time the intake form is updated.
449
579
  * To prevent conflicting changes, you must specify the current revision when updating the intake form.
@@ -458,11 +588,6 @@ declare function deleteIntakeForm(intakeFormId: string): Promise<void>;
458
588
  declare function archiveIntakeForm(intakeFormId: string, formRevision: string): Promise<ArchiveIntakeFormResponse>;
459
589
  /**
460
590
  * Unarchives an intake form, enabling it to accept new submissions.
461
- *
462
- *
463
- * Each time the intake form is updated, `revision` increments by 1.
464
- * You must specify the current `revision` when updating the intake form.
465
- * This ensures you're working with the latest intake form and prevents unintended overwrites.
466
591
  * @param intakeFormId - Intake form ID.
467
592
  * @param formRevision - Revision number, which increments by 1 each time the intake form is updated.
468
593
  * To prevent conflicting changes, you must specify the current revision when updating the intake form.
@@ -476,4 +601,4 @@ declare function archiveIntakeForm(intakeFormId: string, formRevision: string):
476
601
  */
477
602
  declare function unarchiveIntakeForm(intakeFormId: string, formRevision: string): Promise<UnarchiveIntakeFormResponse>;
478
603
 
479
- export { type ActionEvent, type ArchiveIntakeFormRequest, type ArchiveIntakeFormResponse, type ContactDetails, type CreateCustomerSubmissionLinkApplicationErrors, type CreateCustomerSubmissionLinkOptions, type CreateCustomerSubmissionLinkRequest, type CreateCustomerSubmissionLinkResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DecryptContactDetailsFromTokenRequest, type DecryptContactDetailsFromTokenResponse, type DeleteIntakeFormRequest, type DeleteIntakeFormResponse, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type IntakeForm, type QueryIntakeFormsOptions, type QueryIntakeFormsRequest, type QueryIntakeFormsResponse, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, type UnarchiveIntakeFormRequest, type UnarchiveIntakeFormResponse, type UpdateIntakeFormExpirationPeriodOptions, type UpdateIntakeFormExpirationPeriodRequest, type UpdateIntakeFormExpirationPeriodResponse, archiveIntakeForm, createCustomerSubmissionLink, deleteIntakeForm, queryIntakeForms, unarchiveIntakeForm, updateIntakeFormExpirationPeriod };
604
+ export { type ActionEvent, type ArchiveIntakeFormRequest, type ArchiveIntakeFormResponse, type CommonQueryWithEntityContext, type ContactDetails, type CreateCustomerSubmissionLinkApplicationErrors, type CreateCustomerSubmissionLinkOptions, type CreateCustomerSubmissionLinkRequest, type CreateCustomerSubmissionLinkResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DecryptContactDetailsFromTokenRequest, type DecryptContactDetailsFromTokenResponse, type DeleteIntakeFormRequest, type DeleteIntakeFormResponse, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type IntakeForm, type IntakeFormQuery, type IntakeFormQuerySpec, type IntakeFormsQueryBuilder, type IntakeFormsQueryResult, type QueryIntakeFormsRequest, type QueryIntakeFormsResponse, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, type UnarchiveIntakeFormRequest, type UnarchiveIntakeFormResponse, type UpdateIntakeFormExpirationPeriodOptions, type UpdateIntakeFormExpirationPeriodRequest, type UpdateIntakeFormExpirationPeriodResponse, archiveIntakeForm, createCustomerSubmissionLink, deleteIntakeForm, queryIntakeForms, typedQueryIntakeForms, unarchiveIntakeForm, updateIntakeFormExpirationPeriod, utils };
@@ -25,13 +25,16 @@ __export(index_typings_exports, {
25
25
  createCustomerSubmissionLink: () => createCustomerSubmissionLink2,
26
26
  deleteIntakeForm: () => deleteIntakeForm2,
27
27
  queryIntakeForms: () => queryIntakeForms2,
28
+ typedQueryIntakeForms: () => typedQueryIntakeForms,
28
29
  unarchiveIntakeForm: () => unarchiveIntakeForm2,
29
- updateIntakeFormExpirationPeriod: () => updateIntakeFormExpirationPeriod2
30
+ updateIntakeFormExpirationPeriod: () => updateIntakeFormExpirationPeriod2,
31
+ utils: () => utils
30
32
  });
31
33
  module.exports = __toCommonJS(index_typings_exports);
32
34
 
33
35
  // src/intake-forms-v1-intake-form-intake-forms.universal.ts
34
36
  var import_transform_error = require("@wix/sdk-runtime/transform-error");
37
+ var import_query_builder = require("@wix/sdk-runtime/query-builder");
35
38
  var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
36
39
 
37
40
  // src/intake-forms-v1-intake-form-intake-forms.http.ts
@@ -269,16 +272,59 @@ function unarchiveIntakeForm(payload) {
269
272
  }
270
273
 
271
274
  // src/intake-forms-v1-intake-form-intake-forms.universal.ts
275
+ var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
276
+ var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
272
277
  var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
273
278
  SortOrder2["ASC"] = "ASC";
274
279
  SortOrder2["DESC"] = "DESC";
275
280
  return SortOrder2;
276
281
  })(SortOrder || {});
277
- async function queryIntakeForms2(options) {
278
- const { httpClient, sideEffects } = arguments[1];
279
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
280
- query: options?.query
282
+ function queryIntakeForms2() {
283
+ const { httpClient, sideEffects } = arguments[0];
284
+ return (0, import_query_builder.queryBuilder)({
285
+ func: async (payload) => {
286
+ const reqOpts = queryIntakeForms(payload);
287
+ sideEffects?.onSiteCall?.();
288
+ try {
289
+ const result = await httpClient.request(reqOpts);
290
+ sideEffects?.onSuccess?.(result);
291
+ return result;
292
+ } catch (err) {
293
+ sideEffects?.onError?.(err);
294
+ throw err;
295
+ }
296
+ },
297
+ requestTransformer: (query) => {
298
+ const args = [query, {}];
299
+ return (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
300
+ ...args?.[1],
301
+ query: args?.[0]
302
+ });
303
+ },
304
+ responseTransformer: ({ data }) => {
305
+ const transformedData = (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
306
+ (0, import_transform_paths2.transformPaths)(data, [])
307
+ );
308
+ return {
309
+ items: transformedData?.intakeForms,
310
+ pagingMetadata: transformedData?.pagingMetadata
311
+ };
312
+ },
313
+ errorTransformer: (err) => {
314
+ const transformedError = (0, import_transform_error.transformError)(err, {
315
+ spreadPathsToArguments: {},
316
+ explicitPathsToArguments: { query: "$[0]" },
317
+ singleArgumentUnchanged: false
318
+ });
319
+ throw transformedError;
320
+ },
321
+ pagingMethod: "CURSOR",
322
+ transformationPaths: {}
281
323
  });
324
+ }
325
+ async function typedQueryIntakeForms(query) {
326
+ const { httpClient, sideEffects } = arguments[1];
327
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query });
282
328
  const reqOpts = queryIntakeForms(payload);
283
329
  sideEffects?.onSiteCall?.();
284
330
  try {
@@ -290,15 +336,20 @@ async function queryIntakeForms2(options) {
290
336
  err,
291
337
  {
292
338
  spreadPathsToArguments: {},
293
- explicitPathsToArguments: { query: "$[0].query" },
339
+ explicitPathsToArguments: { query: "$[0]" },
294
340
  singleArgumentUnchanged: false
295
341
  },
296
- ["options"]
342
+ ["query"]
297
343
  );
298
344
  sideEffects?.onError?.(err);
299
345
  throw transformedError;
300
346
  }
301
347
  }
348
+ var utils = {
349
+ query: {
350
+ ...(0, import_query_builder_utils.createQueryUtils)()
351
+ }
352
+ };
302
353
  async function updateIntakeFormExpirationPeriod2(intakeFormId, options) {
303
354
  const { httpClient, sideEffects } = arguments[2];
304
355
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
@@ -450,7 +501,9 @@ async function unarchiveIntakeForm2(intakeFormId, formRevision) {
450
501
  createCustomerSubmissionLink,
451
502
  deleteIntakeForm,
452
503
  queryIntakeForms,
504
+ typedQueryIntakeForms,
453
505
  unarchiveIntakeForm,
454
- updateIntakeFormExpirationPeriod
506
+ updateIntakeFormExpirationPeriod,
507
+ utils
455
508
  });
456
509
  //# sourceMappingURL=index.typings.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.typings.ts","../../src/intake-forms-v1-intake-form-intake-forms.universal.ts","../../src/intake-forms-v1-intake-form-intake-forms.http.ts"],"sourcesContent":["export * from './src/intake-forms-v1-intake-form-intake-forms.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixIntakeFormsV1IntakeForm from './intake-forms-v1-intake-form-intake-forms.http.js';\n\n/**\n * A wrapper around a Wix form that adds expiration tracking and submission management.\n * Intake forms collect information from contacts with time-based validity requirements.\n */\nexport interface IntakeForm {\n /**\n * Intake form ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Expiration period in months. If not set, submissions don't expire.\n * @min 1\n * @max 60\n */\n expirationPeriodInMonths?: number | null;\n /**\n * Whether the intake form is archived and disabled from accepting new submissions.\n * @readonly\n */\n archived?: boolean | null;\n /**\n * Intake form name.\n * @minLength 1\n * @maxLength 100\n * @readonly\n */\n name?: string | null;\n /**\n * Date and time the intake form was created in UTC datetime `YYYY-MM-DDThh:mm:ssZ` format.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the intake form was updated in UTC datetime `YYYY-MM-DDThh:mm:ssZ` format.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Revision number, which increments by 1 each time the intake form is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the intake form.\n * @readonly\n */\n revision?: string | null;\n}\n\nexport interface QueryIntakeFormsRequest {\n /**\n * Filter object.\n * See @API Query Language\n * for more information.\n *\n * For a detailed list of supported filters, see\n * @Supported Filters.\n */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface QueryIntakeFormsResponse {\n /** Retrieved intake forms. */\n intakeForms?: IntakeForm[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in current page. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface UpdateIntakeFormExpirationPeriodRequest {\n /**\n * Intake form ID.\n * @format GUID\n */\n intakeFormId: string | null;\n /**\n * New expiration period in months. If not set, submissions don't expire.\n * @min 1\n * @max 60\n */\n expirationPeriodInMonths?: number | null;\n /**\n * Revision number, which increments by 1 each time the intake form is updated.\n * To prevent conflicting changes, you must specify the current revision when updating the intake form.\n */\n formRevision: string | null;\n}\n\nexport interface UpdateIntakeFormExpirationPeriodResponse {\n /** Updated intake form. */\n intakeForm?: IntakeForm;\n}\n\nexport interface CreateCustomerSubmissionLinkRequest {\n /**\n * Intake form ID.\n * @format GUID\n */\n intakeFormId: string | null;\n /**\n * [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.\n * @format GUID\n */\n contactId?: string | null;\n}\n\nexport interface CreateCustomerSubmissionLinkResponse {\n /**\n * Generated link URL for the intake form submission.\n * @minLength 1\n * @maxLength 2048\n */\n intakeFormUrl?: string | null;\n /**\n * Encrypted token containing contact details. Available only if you specified `contactId` in request.\n * @maxLength 2048\n */\n token?: string | null;\n}\n\nexport interface DeleteIntakeFormRequest {\n /**\n * Intake form ID.\n * @format GUID\n */\n intakeFormId: string | null;\n}\n\nexport interface DeleteIntakeFormResponse {}\n\nexport interface ArchiveIntakeFormRequest {\n /**\n * Intake form ID.\n * @format GUID\n */\n intakeFormId: string | null;\n /**\n * Revision number, which increments by 1 each time the intake form is updated.\n * To prevent conflicting changes, you must specify the current revision when updating the intake form.\n */\n formRevision: string | null;\n}\n\nexport interface ArchiveIntakeFormResponse {\n /** Archived intake form. */\n intakeForm?: IntakeForm;\n}\n\nexport interface UnarchiveIntakeFormRequest {\n /**\n * Intake form ID.\n * @format GUID\n */\n intakeFormId: string | null;\n /**\n * Revision number, which increments by 1 each time the intake form is updated.\n * To prevent conflicting changes, you must specify the current revision when updating the intake form.\n */\n formRevision: string | null;\n}\n\nexport interface UnarchiveIntakeFormResponse {\n /** Unarchived intake form. */\n intakeForm?: IntakeForm;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * 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.\n * 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.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface Empty {}\n\nexport interface DecryptContactDetailsFromTokenRequest {\n /**\n * Encrypted token containing contact details and creation timestamp.\n * Generated by [Create Customer Submission Link](https://dev.wix.com/docs/api-reference/crm/forms/other-services/intake-forms/create-customer-submission-link) when a `contactId` is provided.\n * @minLength 1\n * @maxLength 2048\n */\n token?: string;\n}\n\nexport interface DecryptContactDetailsFromTokenResponse {\n /** Contact details extracted from the token. */\n contactDetails?: ContactDetails;\n}\n\nexport interface ContactDetails {\n /**\n * Contact email address. Always present.\n * @format EMAIL\n */\n email?: string;\n /**\n * Contact first name. Present when the contact record has a first name.\n * @maxLength 200\n */\n firstName?: string | null;\n /**\n * Contact last name. Present when the contact record has a last name.\n * @maxLength 200\n */\n lastName?: string | null;\n}\n\n/** @docsIgnore */\nexport type CreateCustomerSubmissionLinkApplicationErrors = {\n code?: 'MISSING_SITE_URL';\n description?: string;\n data?: Record<string, any>;\n};\n\n/**\n * Retrieves a list of intake forms, with the specified paging, filtering, and sorting.\n *\n *\n * QueryIntakeForms runs with these defaults, which you can override:\n *\n * - `createdDate` is sorted in `DESC` order.\n * - `paging.limit` is `50`.\n * - `paging.offset` is `0`.\n *\n * Learn more about [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language).\n * @public\n * @documentationMaturity preview\n * @permissionId INTAKE_FORM.INTAKE_FORM_READ\n * @applicableIdentity APP\n * @fqn wix.intakeforms.v1.IntakeFormsService.QueryIntakeForms\n */\nexport async function queryIntakeForms(\n options?: QueryIntakeFormsOptions\n): Promise<NonNullablePaths<QueryIntakeFormsResponse, `intakeForms`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n query: options?.query,\n });\n\n const reqOpts =\n ambassadorWixIntakeFormsV1IntakeForm.queryIntakeForms(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0].query' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface QueryIntakeFormsOptions {\n /**\n * Filter object.\n * See\n * @API Query Language\n * for more information.\n *\n * For a detailed list of supported filters, see\n * @Supported Filters.\n */\n query?: CursorQuery;\n}\n\n/**\n * Updates the expiration period of a specific intake form.\n *\n * When you update the expiration period, the system recalculates expiration for all existing submissions.\n *\n * Each time the intake form is updated, `revision` increments by 1.\n * You must specify the current `revision` when updating the intake form.\n * This ensures you're working with the latest intake form and prevents unintended overwrites.\n * @param intakeFormId - Intake form ID.\n * @public\n * @documentationMaturity preview\n * @requiredField intakeFormId\n * @requiredField options.formRevision\n * @permissionId INTAKE_FORM.INTAKE_FORM_UPDATE\n * @applicableIdentity APP\n * @fqn wix.intakeforms.v1.IntakeFormsService.UpdateIntakeFormExpirationPeriod\n */\nexport async function updateIntakeFormExpirationPeriod(\n intakeFormId: string,\n options?: NonNullablePaths<\n UpdateIntakeFormExpirationPeriodOptions,\n `formRevision`,\n 2\n >\n): Promise<UpdateIntakeFormExpirationPeriodResponse> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n intakeFormId: intakeFormId,\n expirationPeriodInMonths: options?.expirationPeriodInMonths,\n formRevision: options?.formRevision,\n });\n\n const reqOpts =\n ambassadorWixIntakeFormsV1IntakeForm.updateIntakeFormExpirationPeriod(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n intakeFormId: '$[0]',\n expirationPeriodInMonths: '$[1].expirationPeriodInMonths',\n formRevision: '$[1].formRevision',\n },\n singleArgumentUnchanged: false,\n },\n ['intakeFormId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateIntakeFormExpirationPeriodOptions {\n /**\n * New expiration period in months. If not set, submissions don't expire.\n * @min 1\n * @max 60\n */\n expirationPeriodInMonths?: number | null;\n /**\n * Revision number, which increments by 1 each time the intake form is updated.\n * To prevent conflicting changes, you must specify the current revision when updating the intake form.\n */\n formRevision: string | null;\n}\n\n/**\n * Creates a shareable link for customers to submit an intake form.\n *\n * The link is valid for 72 hours.\n * @param intakeFormId - Intake form ID.\n * @public\n * @documentationMaturity preview\n * @requiredField intakeFormId\n * @permissionId INTAKE_FORMS.CUSTOMER_SUBMISSION_LINK_CREATE\n * @applicableIdentity APP\n * @fqn wix.intakeforms.v1.IntakeFormsService.CreateCustomerSubmissionLink\n */\nexport async function createCustomerSubmissionLink(\n intakeFormId: string,\n options?: CreateCustomerSubmissionLinkOptions\n): Promise<\n CreateCustomerSubmissionLinkResponse & {\n __applicationErrorsType?: CreateCustomerSubmissionLinkApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n intakeFormId: intakeFormId,\n contactId: options?.contactId,\n });\n\n const reqOpts =\n ambassadorWixIntakeFormsV1IntakeForm.createCustomerSubmissionLink(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n intakeFormId: '$[0]',\n contactId: '$[1].contactId',\n },\n singleArgumentUnchanged: false,\n },\n ['intakeFormId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateCustomerSubmissionLinkOptions {\n /**\n * [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.\n * @format GUID\n */\n contactId?: string | null;\n}\n\n/**\n * Deletes an intake form.\n *\n *\n * Also deletes the underlying [Wix form](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/introduction).\n *\n * Existing [submissions](https://dev.wix.com/docs/api-reference/crm/forms/other-services/intake-form-submissions/introduction) for the intake form aren't automatically deleted but become orphaned.\n * When [querying submissions](https://dev.wix.com/docs/api-reference/crm/forms/other-services/intake-form-submissions/query-intake-form-submissions), orphaned submissions aren't returned.\n * @param intakeFormId - Intake form ID.\n * @public\n * @documentationMaturity preview\n * @requiredField intakeFormId\n * @permissionId INTAKE_FORM.INTAKE_FORM_DELETE\n * @applicableIdentity APP\n * @fqn wix.intakeforms.v1.IntakeFormsService.DeleteIntakeForm\n */\nexport async function deleteIntakeForm(intakeFormId: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n intakeFormId: intakeFormId,\n });\n\n const reqOpts =\n ambassadorWixIntakeFormsV1IntakeForm.deleteIntakeForm(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { intakeFormId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['intakeFormId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Archives an intake form, disabling it from accepting new submissions.\n *\n * Existing submissions remain accessible. You can [unarchive](https://dev.wix.com/docs/api-reference/crm/forms/other-services/intake-forms/unarchive-intake-form) the form later to resume accepting submissions.\n *\n * Each time the intake form is updated, `revision` increments by 1.\n * You must specify the current `revision` when updating the intake form.\n * This ensures you're working with the latest intake form and prevents unintended overwrites.\n * @param intakeFormId - Intake form ID.\n * @param formRevision - Revision number, which increments by 1 each time the intake form is updated.\n * To prevent conflicting changes, you must specify the current revision when updating the intake form.\n * @public\n * @documentationMaturity preview\n * @requiredField formRevision\n * @requiredField intakeFormId\n * @permissionId INTAKE_FORM.INTAKE_FORM_UPDATE\n * @applicableIdentity APP\n * @fqn wix.intakeforms.v1.IntakeFormsService.ArchiveIntakeForm\n */\nexport async function archiveIntakeForm(\n intakeFormId: string,\n formRevision: string\n): Promise<ArchiveIntakeFormResponse> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n intakeFormId: intakeFormId,\n formRevision: formRevision,\n });\n\n const reqOpts =\n ambassadorWixIntakeFormsV1IntakeForm.archiveIntakeForm(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n intakeFormId: '$[0]',\n formRevision: '$[1]',\n },\n singleArgumentUnchanged: false,\n },\n ['intakeFormId', 'formRevision']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Unarchives an intake form, enabling it to accept new submissions.\n *\n *\n * Each time the intake form is updated, `revision` increments by 1.\n * You must specify the current `revision` when updating the intake form.\n * This ensures you're working with the latest intake form and prevents unintended overwrites.\n * @param intakeFormId - Intake form ID.\n * @param formRevision - Revision number, which increments by 1 each time the intake form is updated.\n * To prevent conflicting changes, you must specify the current revision when updating the intake form.\n * @public\n * @documentationMaturity preview\n * @requiredField formRevision\n * @requiredField intakeFormId\n * @permissionId INTAKE_FORM.INTAKE_FORM_UPDATE\n * @applicableIdentity APP\n * @fqn wix.intakeforms.v1.IntakeFormsService.UnarchiveIntakeForm\n */\nexport async function unarchiveIntakeForm(\n intakeFormId: string,\n formRevision: string\n): Promise<UnarchiveIntakeFormResponse> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n intakeFormId: intakeFormId,\n formRevision: formRevision,\n });\n\n const reqOpts =\n ambassadorWixIntakeFormsV1IntakeForm.unarchiveIntakeForm(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n intakeFormId: '$[0]',\n formRevision: '$[1]',\n },\n singleArgumentUnchanged: false,\n },\n ['intakeFormId', 'formRevision']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixIntakeformsV1IntakeFormsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/intake-forms/v1/intake-forms',\n destPath: '/v1/intake-forms',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/intake-forms',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/intake-forms',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/intake-forms',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/intake-forms/v1/intake-forms',\n destPath: '/v1/intake-forms',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/intake-forms/v1/intake-forms',\n destPath: '/v1/intake-forms',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/intake-forms/v1/intake-forms',\n destPath: '/v1/intake-forms',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/intake-forms/v1/intake-forms',\n destPath: '/v1/intake-forms',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/intake-forms/v1/intake-forms',\n destPath: '/v1/intake-forms',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/intake-forms/v1/intake-forms',\n destPath: '/v1/intake-forms',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_intake-forms_intake-forms';\n\n/**\n * Retrieves a list of intake forms, with the specified paging, filtering, and sorting.\n *\n *\n * QueryIntakeForms runs with these defaults, which you can override:\n *\n * - `createdDate` is sorted in `DESC` order.\n * - `paging.limit` is `50`.\n * - `paging.offset` is `0`.\n *\n * Learn more about [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language).\n */\nexport function queryIntakeForms(payload: object): RequestOptionsFactory<any> {\n function __queryIntakeForms({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.intake_forms.v1.intake_form',\n method: 'POST' as any,\n methodFqn: 'wix.intakeforms.v1.IntakeFormsService.QueryIntakeForms',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIntakeformsV1IntakeFormsServiceUrl({\n protoPath: '/v1/intake-forms/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'intakeForms.createdDate' },\n { path: 'intakeForms.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryIntakeForms;\n}\n\n/**\n * Updates the expiration period of a specific intake form.\n *\n * When you update the expiration period, the system recalculates expiration for all existing submissions.\n *\n * Each time the intake form is updated, `revision` increments by 1.\n * You must specify the current `revision` when updating the intake form.\n * This ensures you're working with the latest intake form and prevents unintended overwrites.\n */\nexport function updateIntakeFormExpirationPeriod(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateIntakeFormExpirationPeriod({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.intake_forms.v1.intake_form',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.intakeforms.v1.IntakeFormsService.UpdateIntakeFormExpirationPeriod',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIntakeformsV1IntakeFormsServiceUrl({\n protoPath: '/v1/intake-forms/{intakeFormId}',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'intakeForm.createdDate' },\n { path: 'intakeForm.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateIntakeFormExpirationPeriod;\n}\n\n/**\n * Creates a shareable link for customers to submit an intake form.\n *\n * The link is valid for 72 hours.\n */\nexport function createCustomerSubmissionLink(\n payload: object\n): RequestOptionsFactory<any> {\n function __createCustomerSubmissionLink({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.intake_forms.v1.intake_form',\n method: 'GET' as any,\n methodFqn:\n 'wix.intakeforms.v1.IntakeFormsService.CreateCustomerSubmissionLink',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIntakeformsV1IntakeFormsServiceUrl({\n protoPath: '/v1/intake-forms/{intakeFormId}/link',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __createCustomerSubmissionLink;\n}\n\n/**\n * Deletes an intake form.\n *\n *\n * Also deletes the underlying [Wix form](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/introduction).\n *\n * Existing [submissions](https://dev.wix.com/docs/api-reference/crm/forms/other-services/intake-form-submissions/introduction) for the intake form aren't automatically deleted but become orphaned.\n * When [querying submissions](https://dev.wix.com/docs/api-reference/crm/forms/other-services/intake-form-submissions/query-intake-form-submissions), orphaned submissions aren't returned.\n */\nexport function deleteIntakeForm(payload: object): RequestOptionsFactory<any> {\n function __deleteIntakeForm({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.intake_forms.v1.intake_form',\n method: 'DELETE' as any,\n methodFqn: 'wix.intakeforms.v1.IntakeFormsService.DeleteIntakeForm',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIntakeformsV1IntakeFormsServiceUrl({\n protoPath: '/v1/intake-forms/{intakeFormId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteIntakeForm;\n}\n\n/**\n * Archives an intake form, disabling it from accepting new submissions.\n *\n * Existing submissions remain accessible. You can [unarchive](https://dev.wix.com/docs/api-reference/crm/forms/other-services/intake-forms/unarchive-intake-form) the form later to resume accepting submissions.\n *\n * Each time the intake form is updated, `revision` increments by 1.\n * You must specify the current `revision` when updating the intake form.\n * This ensures you're working with the latest intake form and prevents unintended overwrites.\n */\nexport function archiveIntakeForm(payload: object): RequestOptionsFactory<any> {\n function __archiveIntakeForm({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.intake_forms.v1.intake_form',\n method: 'POST' as any,\n methodFqn: 'wix.intakeforms.v1.IntakeFormsService.ArchiveIntakeForm',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIntakeformsV1IntakeFormsServiceUrl({\n protoPath: '/v1/intake-forms/{intakeFormId}/archive',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'intakeForm.createdDate' },\n { path: 'intakeForm.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __archiveIntakeForm;\n}\n\n/**\n * Unarchives an intake form, enabling it to accept new submissions.\n *\n *\n * Each time the intake form is updated, `revision` increments by 1.\n * You must specify the current `revision` when updating the intake form.\n * This ensures you're working with the latest intake form and prevents unintended overwrites.\n */\nexport function unarchiveIntakeForm(\n payload: object\n): RequestOptionsFactory<any> {\n function __unarchiveIntakeForm({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.intake_forms.v1.intake_form',\n method: 'POST' as any,\n methodFqn: 'wix.intakeforms.v1.IntakeFormsService.UnarchiveIntakeForm',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIntakeformsV1IntakeFormsServiceUrl({\n protoPath: '/v1/intake-forms/{intakeFormId}/unarchive',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'intakeForm.createdDate' },\n { path: 'intakeForm.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __unarchiveIntakeForm;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,2BAAAA;AAAA,EAAA,oCAAAC;AAAA,EAAA,wBAAAC;AAAA,EAAA,wBAAAC;AAAA,EAAA,2BAAAC;AAAA,EAAA,wCAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,6CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAA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AAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAJ;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,cAAc;AAAA,UACd,cAAc;AAAA,QAChB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,gBAAgB,cAAc;AAAA,IACjC;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAoBA,eAAsBK,qBACpB,cACA,cACsC;AAEtC,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,UACiC,oBAAoB,OAAO;AAElE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAL;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,cAAc;AAAA,UACd,cAAc;AAAA,QAChB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,gBAAgB,cAAc;AAAA,IACjC;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["archiveIntakeForm","createCustomerSubmissionLink","deleteIntakeForm","queryIntakeForms","unarchiveIntakeForm","updateIntakeFormExpirationPeriod","import_rest_modules","payload","SortOrder","queryIntakeForms","sdkTransformError","updateIntakeFormExpirationPeriod","createCustomerSubmissionLink","deleteIntakeForm","archiveIntakeForm","unarchiveIntakeForm"]}
1
+ {"version":3,"sources":["../../index.typings.ts","../../src/intake-forms-v1-intake-form-intake-forms.universal.ts","../../src/intake-forms-v1-intake-form-intake-forms.http.ts"],"sourcesContent":["export * from './src/intake-forms-v1-intake-form-intake-forms.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport {\n HttpClient,\n HttpResponse,\n NonNullablePaths,\n QuerySpec,\n Query as QuerySdkType,\n} from '@wix/sdk-types';\nimport * as ambassadorWixIntakeFormsV1IntakeForm from './intake-forms-v1-intake-form-intake-forms.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { createQueryUtils } from '@wix/sdk-runtime/query-builder-utils';\n\n/**\n * A wrapper around a Wix form that adds expiration tracking and submission management.\n * Intake forms collect information from contacts with time-based validity requirements.\n */\nexport interface IntakeForm {\n /**\n * Intake form ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Expiration period in months. If not set, submissions don't expire.\n * @min 1\n * @max 60\n */\n expirationPeriodInMonths?: number | null;\n /**\n * Whether the intake form is archived and disabled from accepting new submissions.\n * @readonly\n */\n archived?: boolean | null;\n /**\n * Intake form name.\n * @minLength 1\n * @maxLength 100\n * @readonly\n */\n name?: string | null;\n /**\n * Date and time the intake form was created in UTC datetime `YYYY-MM-DDThh:mm:ssZ` format.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the intake form was updated in UTC datetime `YYYY-MM-DDThh:mm:ssZ` format.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Revision number, which increments by 1 each time the intake form is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the intake form.\n * @readonly\n */\n revision?: string | null;\n}\n\nexport interface QueryIntakeFormsRequest {\n /**\n * Filter object.\n * See @API Query Language\n * for more information.\n *\n * For a detailed list of supported filters, see\n * @Supported Filters.\n */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface QueryIntakeFormsResponse {\n /** Retrieved intake forms. */\n intakeForms?: IntakeForm[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in current page. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface UpdateIntakeFormExpirationPeriodRequest {\n /**\n * Intake form ID.\n * @format GUID\n */\n intakeFormId: string | null;\n /**\n * New expiration period in months. If not set, submissions don't expire.\n * @min 1\n * @max 60\n */\n expirationPeriodInMonths?: number | null;\n /**\n * Revision number, which increments by 1 each time the intake form is updated.\n * To prevent conflicting changes, you must specify the current revision when updating the intake form.\n */\n formRevision: string | null;\n}\n\nexport interface UpdateIntakeFormExpirationPeriodResponse {\n /** Updated intake form. */\n intakeForm?: IntakeForm;\n}\n\nexport interface CreateCustomerSubmissionLinkRequest {\n /**\n * Intake form ID.\n * @format GUID\n */\n intakeFormId: string | null;\n /**\n * [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.\n * @format GUID\n */\n contactId?: string | null;\n}\n\nexport interface CreateCustomerSubmissionLinkResponse {\n /**\n * Generated link URL for the intake form submission.\n * @minLength 1\n * @maxLength 2048\n */\n intakeFormUrl?: string | null;\n /**\n * Encrypted token containing contact details. Available only if you specified `contactId` in request.\n * @maxLength 2048\n */\n token?: string | null;\n}\n\nexport interface DeleteIntakeFormRequest {\n /**\n * Intake form ID.\n * @format GUID\n */\n intakeFormId: string | null;\n}\n\nexport interface DeleteIntakeFormResponse {}\n\nexport interface ArchiveIntakeFormRequest {\n /**\n * Intake form ID.\n * @format GUID\n */\n intakeFormId: string | null;\n /**\n * Revision number, which increments by 1 each time the intake form is updated.\n * To prevent conflicting changes, you must specify the current revision when updating the intake form.\n */\n formRevision: string | null;\n}\n\nexport interface ArchiveIntakeFormResponse {\n /** Archived intake form. */\n intakeForm?: IntakeForm;\n}\n\nexport interface UnarchiveIntakeFormRequest {\n /**\n * Intake form ID.\n * @format GUID\n */\n intakeFormId: string | null;\n /**\n * Revision number, which increments by 1 each time the intake form is updated.\n * To prevent conflicting changes, you must specify the current revision when updating the intake form.\n */\n formRevision: string | null;\n}\n\nexport interface UnarchiveIntakeFormResponse {\n /** Unarchived intake form. */\n intakeForm?: IntakeForm;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * 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.\n * 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.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface Empty {}\n\nexport interface DecryptContactDetailsFromTokenRequest {\n /**\n * Encrypted token containing contact details and creation timestamp.\n * Generated by [Create Customer Submission Link](https://dev.wix.com/docs/api-reference/crm/forms/other-services/intake-forms/intake-forms/create-customer-submission-link) when a `contactId` is provided.\n * @minLength 1\n * @maxLength 2048\n */\n token?: string;\n}\n\nexport interface DecryptContactDetailsFromTokenResponse {\n /** Contact details extracted from the token. */\n contactDetails?: ContactDetails;\n}\n\nexport interface ContactDetails {\n /**\n * Contact email address. Always present.\n * @format EMAIL\n */\n email?: string;\n /**\n * Contact first name. Present when the contact record has a first name.\n * @maxLength 200\n */\n firstName?: string | null;\n /**\n * Contact last name. Present when the contact record has a last name.\n * @maxLength 200\n */\n lastName?: string | null;\n}\n\n/** @docsIgnore */\nexport type CreateCustomerSubmissionLinkApplicationErrors = {\n code?: 'MISSING_SITE_URL';\n description?: string;\n data?: Record<string, any>;\n};\n\n/**\n * Retrieves a list of intake forms, with the specified paging, filtering, and sorting.\n *\n * Query Intake Forms runs with these defaults, which you can override:\n *\n * - `createdDate` is sorted in `DESC` order.\n * - `paging.limit` is `50`.\n * - `paging.offset` is `0`.\n *\n * This method forwards queries to Wix Forms' [Query Forms](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/query-forms) method and supports the same filters.\n *\n * Additionally, you can filter by `archived` to retrieve only archived or non-archived intake forms.\n *\n * Learn more about [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language).\n * @public\n * @documentationMaturity preview\n * @permissionId INTAKE_FORM.INTAKE_FORM_READ\n * @applicableIdentity APP\n * @fqn wix.intakeforms.v1.IntakeFormsService.QueryIntakeForms\n */\nexport function queryIntakeForms(): IntakeFormsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n IntakeForm,\n 'CURSOR',\n QueryIntakeFormsRequest,\n QueryIntakeFormsResponse\n >({\n func: async (payload: QueryIntakeFormsRequest) => {\n const reqOpts =\n ambassadorWixIntakeFormsV1IntakeForm.queryIntakeForms(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryIntakeFormsRequest['query']) => {\n const args = [query, {}] as [QueryIntakeFormsRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryIntakeFormsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.intakeForms,\n pagingMetadata: transformedData?.pagingMetadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface IntakeFormsQueryResult extends QueryCursorResult {\n items: IntakeForm[];\n query: IntakeFormsQueryBuilder;\n next: () => Promise<IntakeFormsQueryResult>;\n prev: () => Promise<IntakeFormsQueryResult>;\n}\n\nexport interface IntakeFormsQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n eq: (\n propertyName: '_id' | 'archived' | 'name' | '_createdDate' | '_updatedDate',\n value: any\n ) => IntakeFormsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ne: (\n propertyName: '_id' | 'archived' | 'name' | '_createdDate' | '_updatedDate',\n value: any\n ) => IntakeFormsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ge: (\n propertyName: '_id' | 'name' | '_createdDate' | '_updatedDate',\n value: any\n ) => IntakeFormsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n gt: (\n propertyName: '_id' | 'name' | '_createdDate' | '_updatedDate',\n value: any\n ) => IntakeFormsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n le: (\n propertyName: '_id' | 'name' | '_createdDate' | '_updatedDate',\n value: any\n ) => IntakeFormsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n lt: (\n propertyName: '_id' | 'name' | '_createdDate' | '_updatedDate',\n value: any\n ) => IntakeFormsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n * @documentationMaturity preview\n */\n startsWith: (\n propertyName: '_id' | 'name',\n value: string\n ) => IntakeFormsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n * @documentationMaturity preview\n */\n hasSome: (\n propertyName: '_id' | 'archived' | 'name' | '_createdDate' | '_updatedDate',\n value: any[]\n ) => IntakeFormsQueryBuilder;\n /** @documentationMaturity preview */\n in: (\n propertyName: '_id' | 'archived' | 'name' | '_createdDate' | '_updatedDate',\n value: any\n ) => IntakeFormsQueryBuilder;\n /** @documentationMaturity preview */\n exists: (\n propertyName: '_id' | 'archived' | 'name' | '_createdDate' | '_updatedDate',\n value: boolean\n ) => IntakeFormsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n ascending: (\n ...propertyNames: Array<\n '_id' | 'archived' | 'name' | '_createdDate' | '_updatedDate'\n >\n ) => IntakeFormsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n descending: (\n ...propertyNames: Array<\n '_id' | 'archived' | 'name' | '_createdDate' | '_updatedDate'\n >\n ) => IntakeFormsQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object.\n * @documentationMaturity preview\n */\n limit: (limit: number) => IntakeFormsQueryBuilder;\n /** @param cursor - A pointer to specific record\n * @documentationMaturity preview\n */\n skipTo: (cursor: string) => IntakeFormsQueryBuilder;\n /** @documentationMaturity preview */\n find: () => Promise<IntakeFormsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.intakeforms.v1.IntakeFormsService.QueryIntakeForms\n * @requiredField query\n */\nexport async function typedQueryIntakeForms(\n query: IntakeFormQuery\n): Promise<NonNullablePaths<QueryIntakeFormsResponse, `intakeForms`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ query: query });\n\n const reqOpts =\n ambassadorWixIntakeFormsV1IntakeForm.queryIntakeForms(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface IntakeFormQuerySpec extends QuerySpec {\n paging: 'cursor';\n wql: [\n {\n fields: ['_createdDate', '_id', '_updatedDate', 'archived', 'name'];\n operators: '*';\n sort: 'BOTH';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n IntakeForm,\n IntakeFormQuerySpec\n>;\nexport type IntakeFormQuery = {\n /** \n Cursor paging options.\n\n Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). \n */\n cursorPaging?: {\n /** \n Maximum number of items to return in the results. \n @max: 100 \n */\n limit?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit']\n | null;\n /** \n Pointer to the next or previous page in the list of results.\n\n Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n Not relevant for the first request. \n @maxLength: 16000 \n */\n cursor?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\n /** \n Filter object.\n\n Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section). \n */\n filter?: CommonQueryWithEntityContext['filter'] | null;\n /** \n Sort object.\n\n Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section). \n @maxSize: 5 \n */\n sort?: {\n /** \n Name of the field to sort by. \n @maxLength: 512 \n */\n fieldName?: NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order. \n */\n order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n }[];\n};\n\nexport const utils = {\n query: {\n ...createQueryUtils<IntakeForm, IntakeFormQuerySpec, IntakeFormQuery>(),\n },\n};\n\n/**\n * Updates the expiration period of a specific intake form.\n *\n * When you update the expiration period, the system recalculates expiration for all existing submissions.\n * @param intakeFormId - Intake form ID.\n * @public\n * @documentationMaturity preview\n * @requiredField intakeFormId\n * @requiredField options.formRevision\n * @permissionId INTAKE_FORM.INTAKE_FORM_UPDATE\n * @applicableIdentity APP\n * @fqn wix.intakeforms.v1.IntakeFormsService.UpdateIntakeFormExpirationPeriod\n */\nexport async function updateIntakeFormExpirationPeriod(\n intakeFormId: string,\n options?: NonNullablePaths<\n UpdateIntakeFormExpirationPeriodOptions,\n `formRevision`,\n 2\n >\n): Promise<UpdateIntakeFormExpirationPeriodResponse> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n intakeFormId: intakeFormId,\n expirationPeriodInMonths: options?.expirationPeriodInMonths,\n formRevision: options?.formRevision,\n });\n\n const reqOpts =\n ambassadorWixIntakeFormsV1IntakeForm.updateIntakeFormExpirationPeriod(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n intakeFormId: '$[0]',\n expirationPeriodInMonths: '$[1].expirationPeriodInMonths',\n formRevision: '$[1].formRevision',\n },\n singleArgumentUnchanged: false,\n },\n ['intakeFormId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateIntakeFormExpirationPeriodOptions {\n /**\n * New expiration period in months. If not set, submissions don't expire.\n * @min 1\n * @max 60\n */\n expirationPeriodInMonths?: number | null;\n /**\n * Revision number, which increments by 1 each time the intake form is updated.\n * To prevent conflicting changes, you must specify the current revision when updating the intake form.\n */\n formRevision: string | null;\n}\n\n/**\n * Creates a shareable link for customers to submit an intake form.\n *\n * The link is valid for 72 hours.\n * @param intakeFormId - Intake form ID.\n * @public\n * @documentationMaturity preview\n * @requiredField intakeFormId\n * @permissionId INTAKE_FORMS.CUSTOMER_SUBMISSION_LINK_CREATE\n * @applicableIdentity APP\n * @fqn wix.intakeforms.v1.IntakeFormsService.CreateCustomerSubmissionLink\n */\nexport async function createCustomerSubmissionLink(\n intakeFormId: string,\n options?: CreateCustomerSubmissionLinkOptions\n): Promise<\n CreateCustomerSubmissionLinkResponse & {\n __applicationErrorsType?: CreateCustomerSubmissionLinkApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n intakeFormId: intakeFormId,\n contactId: options?.contactId,\n });\n\n const reqOpts =\n ambassadorWixIntakeFormsV1IntakeForm.createCustomerSubmissionLink(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n intakeFormId: '$[0]',\n contactId: '$[1].contactId',\n },\n singleArgumentUnchanged: false,\n },\n ['intakeFormId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateCustomerSubmissionLinkOptions {\n /**\n * [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.\n * @format GUID\n */\n contactId?: string | null;\n}\n\n/**\n * Deletes an intake form.\n *\n *\n * Also deletes the underlying [Wix form](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/introduction).\n *\n * Existing [submissions](https://dev.wix.com/docs/api-reference/crm/forms/other-services/intake-forms/intake-form-submissions/introduction) for the intake form aren't automatically deleted but become orphaned.\n * When [querying submissions](https://dev.wix.com/docs/api-reference/crm/forms/other-services/intake-forms/intake-form-submissions/query-intake-form-submissions), orphaned submissions aren't returned.\n * @param intakeFormId - Intake form ID.\n * @public\n * @documentationMaturity preview\n * @requiredField intakeFormId\n * @permissionId INTAKE_FORM.INTAKE_FORM_DELETE\n * @applicableIdentity APP\n * @fqn wix.intakeforms.v1.IntakeFormsService.DeleteIntakeForm\n */\nexport async function deleteIntakeForm(intakeFormId: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n intakeFormId: intakeFormId,\n });\n\n const reqOpts =\n ambassadorWixIntakeFormsV1IntakeForm.deleteIntakeForm(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { intakeFormId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['intakeFormId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Archives an intake form, disabling it from accepting new submissions.\n *\n * Existing submissions remain accessible. You can [unarchive](https://dev.wix.com/docs/api-reference/crm/forms/other-services/intake-forms/intake-forms/unarchive-intake-form) the form later to resume accepting submissions.\n * @param intakeFormId - Intake form ID.\n * @param formRevision - Revision number, which increments by 1 each time the intake form is updated.\n * To prevent conflicting changes, you must specify the current revision when updating the intake form.\n * @public\n * @documentationMaturity preview\n * @requiredField formRevision\n * @requiredField intakeFormId\n * @permissionId INTAKE_FORM.INTAKE_FORM_UPDATE\n * @applicableIdentity APP\n * @fqn wix.intakeforms.v1.IntakeFormsService.ArchiveIntakeForm\n */\nexport async function archiveIntakeForm(\n intakeFormId: string,\n formRevision: string\n): Promise<ArchiveIntakeFormResponse> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n intakeFormId: intakeFormId,\n formRevision: formRevision,\n });\n\n const reqOpts =\n ambassadorWixIntakeFormsV1IntakeForm.archiveIntakeForm(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n intakeFormId: '$[0]',\n formRevision: '$[1]',\n },\n singleArgumentUnchanged: false,\n },\n ['intakeFormId', 'formRevision']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Unarchives an intake form, enabling it to accept new submissions.\n * @param intakeFormId - Intake form ID.\n * @param formRevision - Revision number, which increments by 1 each time the intake form is updated.\n * To prevent conflicting changes, you must specify the current revision when updating the intake form.\n * @public\n * @documentationMaturity preview\n * @requiredField formRevision\n * @requiredField intakeFormId\n * @permissionId INTAKE_FORM.INTAKE_FORM_UPDATE\n * @applicableIdentity APP\n * @fqn wix.intakeforms.v1.IntakeFormsService.UnarchiveIntakeForm\n */\nexport async function unarchiveIntakeForm(\n intakeFormId: string,\n formRevision: string\n): Promise<UnarchiveIntakeFormResponse> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n intakeFormId: intakeFormId,\n formRevision: formRevision,\n });\n\n const reqOpts =\n ambassadorWixIntakeFormsV1IntakeForm.unarchiveIntakeForm(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n intakeFormId: '$[0]',\n formRevision: '$[1]',\n },\n singleArgumentUnchanged: false,\n },\n ['intakeFormId', 'formRevision']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixIntakeformsV1IntakeFormsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/intake-forms/v1/intake-forms',\n destPath: '/v1/intake-forms',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/intake-forms',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/intake-forms',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/intake-forms',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/intake-forms/v1/intake-forms',\n destPath: '/v1/intake-forms',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/intake-forms/v1/intake-forms',\n destPath: '/v1/intake-forms',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/intake-forms/v1/intake-forms',\n destPath: '/v1/intake-forms',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/intake-forms/v1/intake-forms',\n destPath: '/v1/intake-forms',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/intake-forms/v1/intake-forms',\n destPath: '/v1/intake-forms',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/intake-forms/v1/intake-forms',\n destPath: '/v1/intake-forms',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_intake-forms_intake-forms';\n\n/**\n * Retrieves a list of intake forms, with the specified paging, filtering, and sorting.\n *\n * Query Intake Forms runs with these defaults, which you can override:\n *\n * - `createdDate` is sorted in `DESC` order.\n * - `paging.limit` is `50`.\n * - `paging.offset` is `0`.\n *\n * This method forwards queries to Wix Forms' [Query Forms](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/query-forms) method and supports the same filters.\n *\n * Additionally, you can filter by `archived` to retrieve only archived or non-archived intake forms.\n *\n * Learn more about [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language).\n */\nexport function queryIntakeForms(payload: object): RequestOptionsFactory<any> {\n function __queryIntakeForms({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.intake_forms.v1.intake_form',\n method: 'POST' as any,\n methodFqn: 'wix.intakeforms.v1.IntakeFormsService.QueryIntakeForms',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIntakeformsV1IntakeFormsServiceUrl({\n protoPath: '/v1/intake-forms/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'intakeForms.createdDate' },\n { path: 'intakeForms.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryIntakeForms;\n}\n\n/**\n * Updates the expiration period of a specific intake form.\n *\n * When you update the expiration period, the system recalculates expiration for all existing submissions.\n */\nexport function updateIntakeFormExpirationPeriod(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateIntakeFormExpirationPeriod({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.intake_forms.v1.intake_form',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.intakeforms.v1.IntakeFormsService.UpdateIntakeFormExpirationPeriod',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIntakeformsV1IntakeFormsServiceUrl({\n protoPath: '/v1/intake-forms/{intakeFormId}',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'intakeForm.createdDate' },\n { path: 'intakeForm.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateIntakeFormExpirationPeriod;\n}\n\n/**\n * Creates a shareable link for customers to submit an intake form.\n *\n * The link is valid for 72 hours.\n */\nexport function createCustomerSubmissionLink(\n payload: object\n): RequestOptionsFactory<any> {\n function __createCustomerSubmissionLink({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.intake_forms.v1.intake_form',\n method: 'GET' as any,\n methodFqn:\n 'wix.intakeforms.v1.IntakeFormsService.CreateCustomerSubmissionLink',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIntakeformsV1IntakeFormsServiceUrl({\n protoPath: '/v1/intake-forms/{intakeFormId}/link',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __createCustomerSubmissionLink;\n}\n\n/**\n * Deletes an intake form.\n *\n *\n * Also deletes the underlying [Wix form](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/introduction).\n *\n * Existing [submissions](https://dev.wix.com/docs/api-reference/crm/forms/other-services/intake-forms/intake-form-submissions/introduction) for the intake form aren't automatically deleted but become orphaned.\n * When [querying submissions](https://dev.wix.com/docs/api-reference/crm/forms/other-services/intake-forms/intake-form-submissions/query-intake-form-submissions), orphaned submissions aren't returned.\n */\nexport function deleteIntakeForm(payload: object): RequestOptionsFactory<any> {\n function __deleteIntakeForm({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.intake_forms.v1.intake_form',\n method: 'DELETE' as any,\n methodFqn: 'wix.intakeforms.v1.IntakeFormsService.DeleteIntakeForm',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIntakeformsV1IntakeFormsServiceUrl({\n protoPath: '/v1/intake-forms/{intakeFormId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteIntakeForm;\n}\n\n/**\n * Archives an intake form, disabling it from accepting new submissions.\n *\n * Existing submissions remain accessible. You can [unarchive](https://dev.wix.com/docs/api-reference/crm/forms/other-services/intake-forms/intake-forms/unarchive-intake-form) the form later to resume accepting submissions.\n */\nexport function archiveIntakeForm(payload: object): RequestOptionsFactory<any> {\n function __archiveIntakeForm({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.intake_forms.v1.intake_form',\n method: 'POST' as any,\n methodFqn: 'wix.intakeforms.v1.IntakeFormsService.ArchiveIntakeForm',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIntakeformsV1IntakeFormsServiceUrl({\n protoPath: '/v1/intake-forms/{intakeFormId}/archive',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'intakeForm.createdDate' },\n { path: 'intakeForm.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __archiveIntakeForm;\n}\n\n/** Unarchives an intake form, enabling it to accept new submissions. */\nexport function unarchiveIntakeForm(\n payload: object\n): RequestOptionsFactory<any> {\n function __unarchiveIntakeForm({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.intake_forms.v1.intake_form',\n method: 'POST' as any,\n methodFqn: 'wix.intakeforms.v1.IntakeFormsService.UnarchiveIntakeForm',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIntakeformsV1IntakeFormsServiceUrl({\n protoPath: '/v1/intake-forms/{intakeFormId}/unarchive',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'intakeForm.createdDate' },\n { path: 'intakeForm.updatedDate'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AAA,EACR;AACF;AAeA,eAAsBK,qBACpB,cACA,cACsC;AAEtC,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,UACiC,oBAAoB,OAAO;AAElE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAL;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,cAAc;AAAA,UACd,cAAc;AAAA,QAChB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,gBAAgB,cAAc;AAAA,IACjC;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["archiveIntakeForm","createCustomerSubmissionLink","deleteIntakeForm","queryIntakeForms","unarchiveIntakeForm","updateIntakeFormExpirationPeriod","import_rest_modules","payload","import_transform_paths","SortOrder","queryIntakeForms","sdkTransformError","updateIntakeFormExpirationPeriod","createCustomerSubmissionLink","deleteIntakeForm","archiveIntakeForm","unarchiveIntakeForm"]}
@@ -306,7 +306,7 @@ interface Empty {
306
306
  interface DecryptContactDetailsFromTokenRequest {
307
307
  /**
308
308
  * Encrypted token containing contact details and creation timestamp.
309
- * Generated by [Create Customer Submission Link](https://dev.wix.com/docs/api-reference/crm/forms/other-services/intake-forms/create-customer-submission-link) when a `contactId` is provided.
309
+ * Generated by [Create Customer Submission Link](https://dev.wix.com/docs/api-reference/crm/forms/other-services/intake-forms/intake-forms/create-customer-submission-link) when a `contactId` is provided.
310
310
  * @minLength 1
311
311
  * @maxLength 2048
312
312
  */