@wix/auto_sdk_intake-forms_intake-forms 1.0.11 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.js +13 -4
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +13 -3
- package/build/cjs/index.typings.js +13 -4
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +7 -2
- package/build/cjs/meta.js +9 -2
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.mjs +13 -4
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +13 -3
- package/build/es/index.typings.mjs +13 -4
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +7 -2
- package/build/es/meta.mjs +9 -2
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +5 -6
- package/build/internal/cjs/index.js +13 -4
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +21 -10
- package/build/internal/cjs/index.typings.js +13 -4
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +7 -2
- package/build/internal/cjs/meta.js +9 -2
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +5 -6
- package/build/internal/es/index.mjs +13 -4
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +21 -10
- package/build/internal/es/index.typings.mjs +13 -4
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +7 -2
- package/build/internal/es/meta.mjs +9 -2
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
// src/intake-forms-v1-intake-form-intake-forms.http.ts
|
|
10
10
|
import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
|
|
11
11
|
import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
12
|
+
import { transformSDKFieldMaskToRESTFieldMask } from "@wix/sdk-runtime/transformations/field-mask";
|
|
12
13
|
import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
13
14
|
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
|
|
14
15
|
function resolveWixIntakeformsV1IntakeFormsServiceUrl(opts) {
|
|
@@ -78,6 +79,12 @@ function updateIntakeFormExpirationPeriod(payload) {
|
|
|
78
79
|
}
|
|
79
80
|
function updateIntakeFormSettings(payload) {
|
|
80
81
|
function __updateIntakeFormSettings({ host }) {
|
|
82
|
+
const serializedData = transformPaths(payload, [
|
|
83
|
+
{
|
|
84
|
+
transformFn: transformSDKFieldMaskToRESTFieldMask,
|
|
85
|
+
paths: [{ path: "fieldMask" }]
|
|
86
|
+
}
|
|
87
|
+
]);
|
|
81
88
|
const metadata = {
|
|
82
89
|
entityFqdn: "wix.intake_forms.v1.intake_form",
|
|
83
90
|
method: "PATCH",
|
|
@@ -88,10 +95,10 @@ function updateIntakeFormSettings(payload) {
|
|
|
88
95
|
},
|
|
89
96
|
url: resolveWixIntakeformsV1IntakeFormsServiceUrl({
|
|
90
97
|
protoPath: "/v1/intake-forms/{intakeFormId}/settings",
|
|
91
|
-
data:
|
|
98
|
+
data: serializedData,
|
|
92
99
|
host
|
|
93
100
|
}),
|
|
94
|
-
data:
|
|
101
|
+
data: serializedData,
|
|
95
102
|
transformResponse: (payload2) => transformPaths(payload2, [
|
|
96
103
|
{
|
|
97
104
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
@@ -328,7 +335,8 @@ async function updateIntakeFormSettings2(intakeFormId, formRevision, options) {
|
|
|
328
335
|
formRevision,
|
|
329
336
|
expirationPeriodInMonths: options?.expirationPeriodInMonths,
|
|
330
337
|
triggeredExpirationPeriodInMonths: options?.triggeredExpirationPeriodInMonths,
|
|
331
|
-
pendingTriggerFields: options?.pendingTriggerFields
|
|
338
|
+
pendingTriggerFields: options?.pendingTriggerFields,
|
|
339
|
+
fieldMask: options?.fieldMask
|
|
332
340
|
});
|
|
333
341
|
const reqOpts = updateIntakeFormSettings(payload);
|
|
334
342
|
sideEffects?.onSiteCall?.();
|
|
@@ -346,7 +354,8 @@ async function updateIntakeFormSettings2(intakeFormId, formRevision, options) {
|
|
|
346
354
|
formRevision: "$[1]",
|
|
347
355
|
expirationPeriodInMonths: "$[2].expirationPeriodInMonths",
|
|
348
356
|
triggeredExpirationPeriodInMonths: "$[2].triggeredExpirationPeriodInMonths",
|
|
349
|
-
pendingTriggerFields: "$[2].pendingTriggerFields"
|
|
357
|
+
pendingTriggerFields: "$[2].pendingTriggerFields",
|
|
358
|
+
fieldMask: "$[2].fieldMask"
|
|
350
359
|
},
|
|
351
360
|
singleArgumentUnchanged: false
|
|
352
361
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/intake-forms-v1-intake-form-intake-forms.universal.ts","../../../src/intake-forms-v1-intake-form-intake-forms.http.ts","../../../src/intake-forms-v1-intake-form-intake-forms.public.ts","../../../src/intake-forms-v1-intake-form-intake-forms.context.ts"],"sourcesContent":["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. Identical to the [Wix Forms form ID](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/form-object).\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 * Expiration period in months applied only to submissions that fill a configured trigger field\n * (`pending_trigger_fields`). It has no effect when `pending_trigger_fields` is empty. When not set, triggered\n * submissions fall back to `expiration_period_in_months`.\n * No relational constraint with the base period — it may be shorter or longer.\n * @internal\n * @min 1\n * @max 60\n */\n triggeredExpirationPeriodInMonths?: number | null;\n /**\n * Form fields that, when filled, mark a new submission as `PENDING_APPROVAL` (awaiting manual administrator review).\n * Each entry must reference a visible input field of a supported type — checkbox or radio in v1.\n * Any single configured field firing transitions the submission to pending. Empty means no triggers are configured.\n * @internal\n * @maxSize 100\n */\n pendingTriggerFields?: PendingTriggerField[];\n}\n\n/** A reference to a Wix Forms field that triggers `PENDING_APPROVAL` when filled. */\nexport interface PendingTriggerField {\n /**\n * ID of the [Wix Forms field](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/form-object) that drives the trigger.\n * Must reference a visible input field of a supported type — checkbox or radio in v1. Configuring an unsupported,\n * hidden, or unknown field via `UpdateIntakeFormSettings` is rejected with `UNSUPPORTED_TRIGGER_FIELD`.\n * Stored as the stable field ID (not the translatable label).\n * @format GUID\n */\n formFieldId?: string;\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 UpdateIntakeFormSettingsRequest {\n /**\n * Intake form ID.\n * @format GUID\n */\n intakeFormId: string;\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;\n /**\n * Base expiration period in months. Omit to leave unchanged; explicit null clears it (submissions don't expire).\n * @min 1\n * @max 60\n */\n expirationPeriodInMonths?: number | null;\n /**\n * Expiration period in months applied only to submissions that fire a trigger field. Has no effect when `pending_trigger_fields` is empty. Omit to leave unchanged; explicit null clears it (triggered submissions fall back to the base period).\n * @min 1\n * @max 60\n */\n triggeredExpirationPeriodInMonths?: number | null;\n /**\n * Trigger fields that mark a new submission as `PENDING_APPROVAL` when filled. Each must reference a visible input field of a supported type (checkbox or radio in v1); otherwise rejected with `UNSUPPORTED_TRIGGER_FIELD`. An empty list clears all triggers (feature off for this form).\n * @maxSize 100\n */\n pendingTriggerFields?: PendingTriggerField[];\n}\n\nexport interface UpdateIntakeFormSettingsResponse {\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 UpdateIntakeFormSettingsApplicationErrors = {\n code?: 'UNSUPPORTED_TRIGGER_FIELD';\n description?: string;\n data?: Record<string, any>;\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 * 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 * @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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\n hasSome: (\n propertyName: '_id' | 'archived' | 'name' | '_createdDate' | '_updatedDate',\n value: any[]\n ) => IntakeFormsQueryBuilder;\n in: (\n propertyName: '_id' | 'archived' | 'name' | '_createdDate' | '_updatedDate',\n value: any\n ) => IntakeFormsQueryBuilder;\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 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 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 limit: (limit: number) => IntakeFormsQueryBuilder;\n /** @param cursor - A pointer to specific record */\n skipTo: (cursor: string) => IntakeFormsQueryBuilder;\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 * @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 * Updates the waivers-managed settings of an intake form in a single call: the base expiration period, the\n * triggered expiration period (applied to submissions that fill a trigger field), and the pending-approval\n * trigger fields.\n *\n * The current `form_revision` is required — the update is rejected if it does not match the stored revision\n * (optimistic locking). The update merges into the waivers settings, preserving any keys not present in the request;\n * an explicitly cleared (null / empty) field reverts that setting to its default.\n *\n * Each `pending_trigger_fields[].form_field_id` must reference a visible input field of a supported type\n * (checkbox or radio in v1). Unsupported, hidden, or unknown field IDs are rejected with `INVALID_ARGUMENT`\n * (application code `UNSUPPORTED_TRIGGER_FIELD`).\n *\n * The `triggered_expiration_period_in_months` applies only to submissions that fire a trigger; it has no\n * effect when `pending_trigger_fields` is empty.\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 * @internal\n * @documentationMaturity preview\n * @requiredField formRevision\n * @requiredField intakeFormId\n * @permissionId intake_forms:v1:intake_form:update_intake_form_settings\n * @fqn wix.intakeforms.v1.IntakeFormsService.UpdateIntakeFormSettings\n */\nexport async function updateIntakeFormSettings(\n intakeFormId: string,\n formRevision: string,\n options?: UpdateIntakeFormSettingsOptions\n): Promise<\n UpdateIntakeFormSettingsResponse & {\n __applicationErrorsType?: UpdateIntakeFormSettingsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[3] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n intakeFormId: intakeFormId,\n formRevision: formRevision,\n expirationPeriodInMonths: options?.expirationPeriodInMonths,\n triggeredExpirationPeriodInMonths:\n options?.triggeredExpirationPeriodInMonths,\n pendingTriggerFields: options?.pendingTriggerFields,\n });\n\n const reqOpts =\n ambassadorWixIntakeFormsV1IntakeForm.updateIntakeFormSettings(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 expirationPeriodInMonths: '$[2].expirationPeriodInMonths',\n triggeredExpirationPeriodInMonths:\n '$[2].triggeredExpirationPeriodInMonths',\n pendingTriggerFields: '$[2].pendingTriggerFields',\n },\n singleArgumentUnchanged: false,\n },\n ['intakeFormId', 'formRevision', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateIntakeFormSettingsOptions {\n /**\n * Base expiration period in months. Omit to leave unchanged; explicit null clears it (submissions don't expire).\n * @min 1\n * @max 60\n */\n expirationPeriodInMonths?: number | null;\n /**\n * Expiration period in months applied only to submissions that fire a trigger field. Has no effect when `pending_trigger_fields` is empty. Omit to leave unchanged; explicit null clears it (triggered submissions fall back to the base period).\n * @min 1\n * @max 60\n */\n triggeredExpirationPeriodInMonths?: number | null;\n /**\n * Trigger fields that mark a new submission as `PENDING_APPROVAL` when filled. Each must reference a visible input field of a supported type (checkbox or radio in v1); otherwise rejected with `UNSUPPORTED_TRIGGER_FIELD`. An empty list clears all triggers (feature off for this form).\n * @maxSize 100\n */\n pendingTriggerFields?: PendingTriggerField[];\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 * @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 * @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 * @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 * @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\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 * 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 * Updates the waivers-managed settings of an intake form in a single call: the base expiration period, the\n * triggered expiration period (applied to submissions that fill a trigger field), and the pending-approval\n * trigger fields.\n *\n * The current `form_revision` is required — the update is rejected if it does not match the stored revision\n * (optimistic locking). The update merges into the waivers settings, preserving any keys not present in the request;\n * an explicitly cleared (null / empty) field reverts that setting to its default.\n *\n * Each `pending_trigger_fields[].form_field_id` must reference a visible input field of a supported type\n * (checkbox or radio in v1). Unsupported, hidden, or unknown field IDs are rejected with `INVALID_ARGUMENT`\n * (application code `UNSUPPORTED_TRIGGER_FIELD`).\n *\n * The `triggered_expiration_period_in_months` applies only to submissions that fire a trigger; it has no\n * effect when `pending_trigger_fields` is empty.\n */\nexport function updateIntakeFormSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateIntakeFormSettings({ 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.UpdateIntakeFormSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIntakeformsV1IntakeFormsServiceUrl({\n protoPath: '/v1/intake-forms/{intakeFormId}/settings',\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 __updateIntakeFormSettings;\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' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __unarchiveIntakeForm;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n ArchiveIntakeFormResponse,\n CreateCustomerSubmissionLinkApplicationErrors,\n CreateCustomerSubmissionLinkOptions,\n CreateCustomerSubmissionLinkResponse,\n IntakeFormQuery,\n IntakeFormsQueryBuilder,\n QueryIntakeFormsResponse,\n UnarchiveIntakeFormResponse,\n UpdateIntakeFormExpirationPeriodOptions,\n UpdateIntakeFormExpirationPeriodResponse,\n UpdateIntakeFormSettingsApplicationErrors,\n UpdateIntakeFormSettingsOptions,\n UpdateIntakeFormSettingsResponse,\n archiveIntakeForm as universalArchiveIntakeForm,\n createCustomerSubmissionLink as universalCreateCustomerSubmissionLink,\n deleteIntakeForm as universalDeleteIntakeForm,\n queryIntakeForms as universalQueryIntakeForms,\n typedQueryIntakeForms as universalTypedQueryIntakeForms,\n unarchiveIntakeForm as universalUnarchiveIntakeForm,\n updateIntakeFormExpirationPeriod as universalUpdateIntakeFormExpirationPeriod,\n updateIntakeFormSettings as universalUpdateIntakeFormSettings,\n} from './intake-forms-v1-intake-form-intake-forms.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/intake-forms' };\n\nexport function queryIntakeForms(\n httpClient: HttpClient\n): QueryIntakeFormsSignature {\n return () =>\n universalQueryIntakeForms(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryIntakeFormsSignature {\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 * 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 */\n (): IntakeFormsQueryBuilder;\n}\n\nexport function typedQueryIntakeForms(\n httpClient: HttpClient\n): TypedQueryIntakeFormsSignature {\n return (query: IntakeFormQuery) =>\n universalTypedQueryIntakeForms(\n query,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryIntakeFormsSignature {\n /** */\n (query: IntakeFormQuery): Promise<\n NonNullablePaths<QueryIntakeFormsResponse, `intakeForms`, 2>\n >;\n}\n\nexport function updateIntakeFormExpirationPeriod(\n httpClient: HttpClient\n): UpdateIntakeFormExpirationPeriodSignature {\n return (\n intakeFormId: string,\n options?: NonNullablePaths<\n UpdateIntakeFormExpirationPeriodOptions,\n `formRevision`,\n 2\n >\n ) =>\n universalUpdateIntakeFormExpirationPeriod(\n intakeFormId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateIntakeFormExpirationPeriodSignature {\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 - Intake form ID.\n */\n (\n intakeFormId: string,\n options?: NonNullablePaths<\n UpdateIntakeFormExpirationPeriodOptions,\n `formRevision`,\n 2\n >\n ): Promise<UpdateIntakeFormExpirationPeriodResponse>;\n}\n\n/** @internal */\nexport function updateIntakeFormSettings(\n httpClient: HttpClient\n): UpdateIntakeFormSettingsSignature {\n return (\n intakeFormId: string,\n formRevision: string,\n options?: UpdateIntakeFormSettingsOptions\n ) =>\n universalUpdateIntakeFormSettings(\n intakeFormId,\n formRevision,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateIntakeFormSettingsSignature {\n /**\n * Updates the waivers-managed settings of an intake form in a single call: the base expiration period, the\n * triggered expiration period (applied to submissions that fill a trigger field), and the pending-approval\n * trigger fields.\n *\n * The current `form_revision` is required — the update is rejected if it does not match the stored revision\n * (optimistic locking). The update merges into the waivers settings, preserving any keys not present in the request;\n * an explicitly cleared (null / empty) field reverts that setting to its default.\n *\n * Each `pending_trigger_fields[].form_field_id` must reference a visible input field of a supported type\n * (checkbox or radio in v1). Unsupported, hidden, or unknown field IDs are rejected with `INVALID_ARGUMENT`\n * (application code `UNSUPPORTED_TRIGGER_FIELD`).\n *\n * The `triggered_expiration_period_in_months` applies only to submissions that fire a trigger; it has no\n * effect when `pending_trigger_fields` is empty.\n * @param - Intake form ID.\n * @param - 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 (\n intakeFormId: string,\n formRevision: string,\n options?: UpdateIntakeFormSettingsOptions\n ): Promise<\n UpdateIntakeFormSettingsResponse & {\n __applicationErrorsType?: UpdateIntakeFormSettingsApplicationErrors;\n }\n >;\n}\n\nexport function createCustomerSubmissionLink(\n httpClient: HttpClient\n): CreateCustomerSubmissionLinkSignature {\n return (\n intakeFormId: string,\n options?: CreateCustomerSubmissionLinkOptions\n ) =>\n universalCreateCustomerSubmissionLink(\n intakeFormId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateCustomerSubmissionLinkSignature {\n /**\n * Creates a shareable link for customers to submit an intake form.\n *\n * The link is valid for 72 hours.\n * @param - Intake form ID.\n */\n (\n intakeFormId: string,\n options?: CreateCustomerSubmissionLinkOptions\n ): Promise<\n CreateCustomerSubmissionLinkResponse & {\n __applicationErrorsType?: CreateCustomerSubmissionLinkApplicationErrors;\n }\n >;\n}\n\nexport function deleteIntakeForm(\n httpClient: HttpClient\n): DeleteIntakeFormSignature {\n return (intakeFormId: string) =>\n universalDeleteIntakeForm(\n intakeFormId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteIntakeFormSignature {\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 - Intake form ID.\n */\n (intakeFormId: string): Promise<void>;\n}\n\nexport function archiveIntakeForm(\n httpClient: HttpClient\n): ArchiveIntakeFormSignature {\n return (intakeFormId: string, formRevision: string) =>\n universalArchiveIntakeForm(\n intakeFormId,\n formRevision,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ArchiveIntakeFormSignature {\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 - Intake form ID.\n * @param - 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 (\n intakeFormId: string,\n formRevision: string\n ): Promise<ArchiveIntakeFormResponse>;\n}\n\nexport function unarchiveIntakeForm(\n httpClient: HttpClient\n): UnarchiveIntakeFormSignature {\n return (intakeFormId: string, formRevision: string) =>\n universalUnarchiveIntakeForm(\n intakeFormId,\n formRevision,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UnarchiveIntakeFormSignature {\n /**\n * Unarchives an intake form, enabling it to accept new submissions.\n * @param - Intake form ID.\n * @param - 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 (\n intakeFormId: string,\n formRevision: string\n ): Promise<UnarchiveIntakeFormResponse>;\n}\n\nexport {\n ActionEvent,\n ArchiveIntakeFormRequest,\n ArchiveIntakeFormResponse,\n ContactDetails,\n CreateCustomerSubmissionLinkOptions,\n CreateCustomerSubmissionLinkRequest,\n CreateCustomerSubmissionLinkResponse,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DecryptContactDetailsFromTokenRequest,\n DecryptContactDetailsFromTokenResponse,\n DeleteIntakeFormRequest,\n DeleteIntakeFormResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n IntakeForm,\n IntakeFormQuerySpec,\n IntakeFormsQueryBuilder,\n IntakeFormsQueryResult,\n PendingTriggerField,\n QueryIntakeFormsRequest,\n QueryIntakeFormsResponse,\n RestoreInfo,\n SortOrder,\n Sorting,\n UnarchiveIntakeFormRequest,\n UnarchiveIntakeFormResponse,\n UpdateIntakeFormExpirationPeriodOptions,\n UpdateIntakeFormExpirationPeriodRequest,\n UpdateIntakeFormExpirationPeriodResponse,\n UpdateIntakeFormSettingsOptions,\n UpdateIntakeFormSettingsRequest,\n UpdateIntakeFormSettingsResponse,\n utils,\n} from './intake-forms-v1-intake-form-intake-forms.universal.js';\n","import {\n queryIntakeForms as publicQueryIntakeForms,\n typedQueryIntakeForms as publicTypedQueryIntakeForms,\n updateIntakeFormExpirationPeriod as publicUpdateIntakeFormExpirationPeriod,\n updateIntakeFormSettings as publicUpdateIntakeFormSettings,\n createCustomerSubmissionLink as publicCreateCustomerSubmissionLink,\n deleteIntakeForm as publicDeleteIntakeForm,\n archiveIntakeForm as publicArchiveIntakeForm,\n unarchiveIntakeForm as publicUnarchiveIntakeForm,\n} from './intake-forms-v1-intake-form-intake-forms.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n IntakeFormQuery,\n IntakeFormsQueryBuilder,\n typedQueryIntakeForms as universalTypedQueryIntakeForms,\n} from './intake-forms-v1-intake-form-intake-forms.universal.js';\n\nfunction customQueryIntakeForms(httpClient: HttpClient) {\n const router = createQueryOverloadRouter({\n builderQueryFunction: () => publicQueryIntakeForms(httpClient)(),\n typedQueryFunction: (query: IntakeFormQuery) =>\n publicTypedQueryIntakeForms(httpClient)(query),\n hasOptionsParameter: false,\n });\n\n function overloadedQuery(): IntakeFormsQueryBuilder;\n function overloadedQuery(\n query: IntakeFormQuery\n ): ReturnType<typeof universalTypedQueryIntakeForms>;\n function overloadedQuery(query?: IntakeFormQuery): any {\n return router(...arguments);\n }\n\n return overloadedQuery;\n}\n\nexport const updateIntakeFormExpirationPeriod: MaybeContext<\n BuildRESTFunction<typeof publicUpdateIntakeFormExpirationPeriod> &\n typeof publicUpdateIntakeFormExpirationPeriod\n> = /*#__PURE__*/ createRESTModule(publicUpdateIntakeFormExpirationPeriod);\n/** @internal */\nexport const updateIntakeFormSettings: MaybeContext<\n BuildRESTFunction<typeof publicUpdateIntakeFormSettings> &\n typeof publicUpdateIntakeFormSettings\n> = /*#__PURE__*/ createRESTModule(publicUpdateIntakeFormSettings);\nexport const createCustomerSubmissionLink: MaybeContext<\n BuildRESTFunction<typeof publicCreateCustomerSubmissionLink> &\n typeof publicCreateCustomerSubmissionLink\n> = /*#__PURE__*/ createRESTModule(publicCreateCustomerSubmissionLink);\nexport const deleteIntakeForm: MaybeContext<\n BuildRESTFunction<typeof publicDeleteIntakeForm> &\n typeof publicDeleteIntakeForm\n> = /*#__PURE__*/ createRESTModule(publicDeleteIntakeForm);\nexport const archiveIntakeForm: MaybeContext<\n BuildRESTFunction<typeof publicArchiveIntakeForm> &\n typeof publicArchiveIntakeForm\n> = /*#__PURE__*/ createRESTModule(publicArchiveIntakeForm);\nexport const unarchiveIntakeForm: MaybeContext<\n BuildRESTFunction<typeof publicUnarchiveIntakeForm> &\n typeof publicUnarchiveIntakeForm\n> = /*#__PURE__*/ createRESTModule(publicUnarchiveIntakeForm);\nexport const queryIntakeForms: MaybeContext<\n BuildRESTFunction<typeof customQueryIntakeForms> &\n typeof customQueryIntakeForms\n> = /*#__PURE__*/ createRESTModule(customQueryIntakeForms);\n\nexport { SortOrder } from './intake-forms-v1-intake-form-intake-forms.universal.js';\nexport {\n IntakeForm,\n PendingTriggerField,\n QueryIntakeFormsRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n CursorPaging,\n QueryIntakeFormsResponse,\n CursorPagingMetadata,\n Cursors,\n UpdateIntakeFormExpirationPeriodRequest,\n UpdateIntakeFormExpirationPeriodResponse,\n UpdateIntakeFormSettingsRequest,\n UpdateIntakeFormSettingsResponse,\n CreateCustomerSubmissionLinkRequest,\n CreateCustomerSubmissionLinkResponse,\n DeleteIntakeFormRequest,\n DeleteIntakeFormResponse,\n ArchiveIntakeFormRequest,\n ArchiveIntakeFormResponse,\n UnarchiveIntakeFormRequest,\n UnarchiveIntakeFormResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n DecryptContactDetailsFromTokenRequest,\n DecryptContactDetailsFromTokenResponse,\n ContactDetails,\n IntakeFormsQueryResult,\n IntakeFormsQueryBuilder,\n IntakeFormQuerySpec,\n UpdateIntakeFormExpirationPeriodOptions,\n UpdateIntakeFormSettingsOptions,\n CreateCustomerSubmissionLinkOptions,\n} from './intake-forms-v1-intake-form-intake-forms.universal.js';\nexport { utils } from './intake-forms-v1-intake-form-intake-forms.universal.js';\nexport {\n SortOrderWithLiterals,\n UpdateIntakeFormSettingsApplicationErrors,\n CreateCustomerSubmissionLinkApplicationErrors,\n CommonQueryWithEntityContext,\n IntakeFormQuery,\n} from './intake-forms-v1-intake-form-intake-forms.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD,SAAS,oBAAoB;AAC7B;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACLP,SAAS,yBAAyB;AAClC,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,6CACP,MACA;AACA,QAAM,mBAAmB,CAAC;AAE1B,SAAO,WAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAad,SAAS,iBAAiB,SAA6C;AAC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AA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAiBO,SAASC,qBACd,YAC8B;AAC9B,SAAO,CAAC,cAAsB,iBAC5BA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AC/OA,SAAS,wBAAwB;AAGjC,SAAS,iCAAiC;AAO1C,SAAS,uBAAuB,YAAwB;AACtD,QAAM,SAAS,0BAA0B;AAAA,IACvC,sBAAsB,MAAMC,kBAAuB,UAAU,EAAE;AAAA,IAC/D,oBAAoB,CAAC,UACnBC,uBAA4B,UAAU,EAAE,KAAK;AAAA,IAC/C,qBAAqB;AAAA,EACvB,CAAC;AAMD,WAAS,gBAAgB,OAA8B;AACrD,WAAO,OAAO,GAAG,SAAS;AAAA,EAC5B;AAEA,SAAO;AACT;AAEO,IAAMC,oCAGK,iCAAiBA,iCAAsC;AAElE,IAAMC,4BAGK,iCAAiBA,yBAA8B;AAC1D,IAAMC,gCAGK,iCAAiBA,6BAAkC;AAC9D,IAAMC,oBAGK,iCAAiBA,iBAAsB;AAClD,IAAMC,qBAGK,iCAAiBA,kBAAuB;AACnD,IAAMC,uBAGK,iCAAiBA,oBAAyB;AACrD,IAAMP,oBAGK,iCAAiB,sBAAsB;","names":["payload","transformPaths","SortOrder","queryIntakeForms","updateIntakeFormExpirationPeriod","updateIntakeFormSettings","createCustomerSubmissionLink","deleteIntakeForm","archiveIntakeForm","unarchiveIntakeForm","queryIntakeForms","typedQueryIntakeForms","updateIntakeFormExpirationPeriod","updateIntakeFormSettings","createCustomerSubmissionLink","deleteIntakeForm","archiveIntakeForm","unarchiveIntakeForm","queryIntakeForms","typedQueryIntakeForms","updateIntakeFormExpirationPeriod","updateIntakeFormSettings","createCustomerSubmissionLink","deleteIntakeForm","archiveIntakeForm","unarchiveIntakeForm"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/intake-forms-v1-intake-form-intake-forms.universal.ts","../../../src/intake-forms-v1-intake-form-intake-forms.http.ts","../../../src/intake-forms-v1-intake-form-intake-forms.public.ts","../../../src/intake-forms-v1-intake-form-intake-forms.context.ts"],"sourcesContent":["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. Identical to the [Wix Forms form ID](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/form-object).\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 * Expiration period in months applied only to submissions that fill a configured trigger field\n * (`pending_trigger_fields`). It has no effect when `pending_trigger_fields` is empty. When not set, triggered\n * submissions fall back to `expiration_period_in_months`.\n * No relational constraint with the base period — it may be shorter or longer.\n * @internal\n * @min 1\n * @max 60\n */\n triggeredExpirationPeriodInMonths?: number | null;\n /**\n * Form fields that, when filled, mark a new submission as `PENDING_APPROVAL` (awaiting manual administrator review).\n * Each entry must reference a visible checkbox input field.\n * Any single configured field firing transitions the submission to pending. Empty means no triggers are configured.\n * @internal\n * @maxSize 100\n */\n pendingTriggerFields?: PendingTriggerField[];\n}\n\n/** A reference to a Wix Forms field that triggers `PENDING_APPROVAL` when filled. */\nexport interface PendingTriggerField {\n /**\n * ID of the [Wix Forms field](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/form-object) that drives the trigger.\n * Must reference a visible checkbox input field. Configuring an unsupported,\n * hidden, or unknown field via `UpdateIntakeFormSettings` is rejected with `UNSUPPORTED_TRIGGER_FIELD`.\n * Stored as the stable field ID (not the translatable label).\n * @format GUID\n */\n formFieldId?: string;\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 UpdateIntakeFormSettingsRequest {\n /**\n * Intake form ID.\n * @format GUID\n */\n intakeFormId: string;\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;\n /**\n * Base expiration period in months. Omit to leave unchanged; explicit null clears it (submissions don't expire).\n * @min 1\n * @max 60\n */\n expirationPeriodInMonths?: number | null;\n /**\n * Expiration period in months applied only to submissions that fire a trigger field. Has no effect when `pending_trigger_fields` is empty. Omit to leave unchanged; explicit null clears it (triggered submissions fall back to the base period).\n * @min 1\n * @max 60\n */\n triggeredExpirationPeriodInMonths?: number | null;\n /**\n * Trigger fields that mark a new submission as `PENDING_APPROVAL` when filled. Each must reference a visible checkbox input field; otherwise rejected with `UNSUPPORTED_TRIGGER_FIELD`. An empty list clears all triggers (feature off for this form).\n * @maxSize 100\n */\n pendingTriggerFields?: PendingTriggerField[];\n /**\n * Required. Set of fields to update. Only the fields listed here are written; fields you omit are left unchanged.\n * List a field with no value (or an empty list) to reset it to its default.\n */\n fieldMask: string[];\n}\n\nexport interface UpdateIntakeFormSettingsResponse {\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 UpdateIntakeFormSettingsApplicationErrors = {\n code?: 'UNSUPPORTED_TRIGGER_FIELD';\n description?: string;\n data?: Record<string, any>;\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 * 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 * @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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\n hasSome: (\n propertyName: '_id' | 'archived' | 'name' | '_createdDate' | '_updatedDate',\n value: any[]\n ) => IntakeFormsQueryBuilder;\n in: (\n propertyName: '_id' | 'archived' | 'name' | '_createdDate' | '_updatedDate',\n value: any\n ) => IntakeFormsQueryBuilder;\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 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 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 limit: (limit: number) => IntakeFormsQueryBuilder;\n /** @param cursor - A pointer to specific record */\n skipTo: (cursor: string) => IntakeFormsQueryBuilder;\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 * @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 * Updates the waivers-managed settings of an intake form in a single call: the base expiration period, the\n * triggered expiration period (applied to submissions that fill a trigger field), and the pending-approval\n * trigger fields.\n *\n * The current `form_revision` is required — the update is rejected if it does not match the stored revision\n * (optimistic locking). Only fields listed in `field_mask` are written; fields omitted from the mask are left\n * untouched, and a masked field with no value reverts that setting to its default.\n *\n * Each `pending_trigger_fields[].form_field_id` must reference a visible checkbox input field. Unsupported,\n * hidden, or unknown field IDs are rejected with `INVALID_ARGUMENT` (application code `UNSUPPORTED_TRIGGER_FIELD`).\n *\n * The `triggered_expiration_period_in_months` applies only to submissions that fire a trigger; it has no\n * effect when `pending_trigger_fields` is empty.\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 * @internal\n * @documentationMaturity preview\n * @requiredField formRevision\n * @requiredField intakeFormId\n * @requiredField options.fieldMask\n * @permissionId intake_forms:v1:intake_form:update_intake_form_settings\n * @applicableIdentity APP\n * @fqn wix.intakeforms.v1.IntakeFormsService.UpdateIntakeFormSettings\n */\nexport async function updateIntakeFormSettings(\n intakeFormId: string,\n formRevision: string,\n options?: NonNullablePaths<UpdateIntakeFormSettingsOptions, `fieldMask`, 2>\n): Promise<\n UpdateIntakeFormSettingsResponse & {\n __applicationErrorsType?: UpdateIntakeFormSettingsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[3] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n intakeFormId: intakeFormId,\n formRevision: formRevision,\n expirationPeriodInMonths: options?.expirationPeriodInMonths,\n triggeredExpirationPeriodInMonths:\n options?.triggeredExpirationPeriodInMonths,\n pendingTriggerFields: options?.pendingTriggerFields,\n fieldMask: options?.fieldMask,\n });\n\n const reqOpts =\n ambassadorWixIntakeFormsV1IntakeForm.updateIntakeFormSettings(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 expirationPeriodInMonths: '$[2].expirationPeriodInMonths',\n triggeredExpirationPeriodInMonths:\n '$[2].triggeredExpirationPeriodInMonths',\n pendingTriggerFields: '$[2].pendingTriggerFields',\n fieldMask: '$[2].fieldMask',\n },\n singleArgumentUnchanged: false,\n },\n ['intakeFormId', 'formRevision', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateIntakeFormSettingsOptions {\n /**\n * Base expiration period in months. Omit to leave unchanged; explicit null clears it (submissions don't expire).\n * @min 1\n * @max 60\n */\n expirationPeriodInMonths?: number | null;\n /**\n * Expiration period in months applied only to submissions that fire a trigger field. Has no effect when `pending_trigger_fields` is empty. Omit to leave unchanged; explicit null clears it (triggered submissions fall back to the base period).\n * @min 1\n * @max 60\n */\n triggeredExpirationPeriodInMonths?: number | null;\n /**\n * Trigger fields that mark a new submission as `PENDING_APPROVAL` when filled. Each must reference a visible checkbox input field; otherwise rejected with `UNSUPPORTED_TRIGGER_FIELD`. An empty list clears all triggers (feature off for this form).\n * @maxSize 100\n */\n pendingTriggerFields?: PendingTriggerField[];\n /**\n * Required. Set of fields to update. Only the fields listed here are written; fields you omit are left unchanged.\n * List a field with no value (or an empty list) to reset it to its default.\n */\n fieldMask: string[];\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 * @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 * @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 * @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 * @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 { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\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\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 * 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 * Updates the waivers-managed settings of an intake form in a single call: the base expiration period, the\n * triggered expiration period (applied to submissions that fill a trigger field), and the pending-approval\n * trigger fields.\n *\n * The current `form_revision` is required — the update is rejected if it does not match the stored revision\n * (optimistic locking). Only fields listed in `field_mask` are written; fields omitted from the mask are left\n * untouched, and a masked field with no value reverts that setting to its default.\n *\n * Each `pending_trigger_fields[].form_field_id` must reference a visible checkbox input field. Unsupported,\n * hidden, or unknown field IDs are rejected with `INVALID_ARGUMENT` (application code `UNSUPPORTED_TRIGGER_FIELD`).\n *\n * The `triggered_expiration_period_in_months` applies only to submissions that fire a trigger; it has no\n * effect when `pending_trigger_fields` is empty.\n */\nexport function updateIntakeFormSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateIntakeFormSettings({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.intake_forms.v1.intake_form',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.intakeforms.v1.IntakeFormsService.UpdateIntakeFormSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIntakeformsV1IntakeFormsServiceUrl({\n protoPath: '/v1/intake-forms/{intakeFormId}/settings',\n data: serializedData,\n host,\n }),\n data: serializedData,\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 __updateIntakeFormSettings;\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' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __unarchiveIntakeForm;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n ArchiveIntakeFormResponse,\n CreateCustomerSubmissionLinkApplicationErrors,\n CreateCustomerSubmissionLinkOptions,\n CreateCustomerSubmissionLinkResponse,\n IntakeFormQuery,\n IntakeFormsQueryBuilder,\n QueryIntakeFormsResponse,\n UnarchiveIntakeFormResponse,\n UpdateIntakeFormExpirationPeriodOptions,\n UpdateIntakeFormExpirationPeriodResponse,\n UpdateIntakeFormSettingsApplicationErrors,\n UpdateIntakeFormSettingsOptions,\n UpdateIntakeFormSettingsResponse,\n archiveIntakeForm as universalArchiveIntakeForm,\n createCustomerSubmissionLink as universalCreateCustomerSubmissionLink,\n deleteIntakeForm as universalDeleteIntakeForm,\n queryIntakeForms as universalQueryIntakeForms,\n typedQueryIntakeForms as universalTypedQueryIntakeForms,\n unarchiveIntakeForm as universalUnarchiveIntakeForm,\n updateIntakeFormExpirationPeriod as universalUpdateIntakeFormExpirationPeriod,\n updateIntakeFormSettings as universalUpdateIntakeFormSettings,\n} from './intake-forms-v1-intake-form-intake-forms.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/intake-forms' };\n\nexport function queryIntakeForms(\n httpClient: HttpClient\n): QueryIntakeFormsSignature {\n return () =>\n universalQueryIntakeForms(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryIntakeFormsSignature {\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 * 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 */\n (): IntakeFormsQueryBuilder;\n}\n\nexport function typedQueryIntakeForms(\n httpClient: HttpClient\n): TypedQueryIntakeFormsSignature {\n return (query: IntakeFormQuery) =>\n universalTypedQueryIntakeForms(\n query,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryIntakeFormsSignature {\n /** */\n (query: IntakeFormQuery): Promise<\n NonNullablePaths<QueryIntakeFormsResponse, `intakeForms`, 2>\n >;\n}\n\nexport function updateIntakeFormExpirationPeriod(\n httpClient: HttpClient\n): UpdateIntakeFormExpirationPeriodSignature {\n return (\n intakeFormId: string,\n options?: NonNullablePaths<\n UpdateIntakeFormExpirationPeriodOptions,\n `formRevision`,\n 2\n >\n ) =>\n universalUpdateIntakeFormExpirationPeriod(\n intakeFormId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateIntakeFormExpirationPeriodSignature {\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 - Intake form ID.\n */\n (\n intakeFormId: string,\n options?: NonNullablePaths<\n UpdateIntakeFormExpirationPeriodOptions,\n `formRevision`,\n 2\n >\n ): Promise<UpdateIntakeFormExpirationPeriodResponse>;\n}\n\n/** @internal */\nexport function updateIntakeFormSettings(\n httpClient: HttpClient\n): UpdateIntakeFormSettingsSignature {\n return (\n intakeFormId: string,\n formRevision: string,\n options?: NonNullablePaths<UpdateIntakeFormSettingsOptions, `fieldMask`, 2>\n ) =>\n universalUpdateIntakeFormSettings(\n intakeFormId,\n formRevision,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateIntakeFormSettingsSignature {\n /**\n * Updates the waivers-managed settings of an intake form in a single call: the base expiration period, the\n * triggered expiration period (applied to submissions that fill a trigger field), and the pending-approval\n * trigger fields.\n *\n * The current `form_revision` is required — the update is rejected if it does not match the stored revision\n * (optimistic locking). Only fields listed in `field_mask` are written; fields omitted from the mask are left\n * untouched, and a masked field with no value reverts that setting to its default.\n *\n * Each `pending_trigger_fields[].form_field_id` must reference a visible checkbox input field. Unsupported,\n * hidden, or unknown field IDs are rejected with `INVALID_ARGUMENT` (application code `UNSUPPORTED_TRIGGER_FIELD`).\n *\n * The `triggered_expiration_period_in_months` applies only to submissions that fire a trigger; it has no\n * effect when `pending_trigger_fields` is empty.\n * @param - Intake form ID.\n * @param - 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 (\n intakeFormId: string,\n formRevision: string,\n options?: NonNullablePaths<UpdateIntakeFormSettingsOptions, `fieldMask`, 2>\n ): Promise<\n UpdateIntakeFormSettingsResponse & {\n __applicationErrorsType?: UpdateIntakeFormSettingsApplicationErrors;\n }\n >;\n}\n\nexport function createCustomerSubmissionLink(\n httpClient: HttpClient\n): CreateCustomerSubmissionLinkSignature {\n return (\n intakeFormId: string,\n options?: CreateCustomerSubmissionLinkOptions\n ) =>\n universalCreateCustomerSubmissionLink(\n intakeFormId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateCustomerSubmissionLinkSignature {\n /**\n * Creates a shareable link for customers to submit an intake form.\n *\n * The link is valid for 72 hours.\n * @param - Intake form ID.\n */\n (\n intakeFormId: string,\n options?: CreateCustomerSubmissionLinkOptions\n ): Promise<\n CreateCustomerSubmissionLinkResponse & {\n __applicationErrorsType?: CreateCustomerSubmissionLinkApplicationErrors;\n }\n >;\n}\n\nexport function deleteIntakeForm(\n httpClient: HttpClient\n): DeleteIntakeFormSignature {\n return (intakeFormId: string) =>\n universalDeleteIntakeForm(\n intakeFormId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteIntakeFormSignature {\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 - Intake form ID.\n */\n (intakeFormId: string): Promise<void>;\n}\n\nexport function archiveIntakeForm(\n httpClient: HttpClient\n): ArchiveIntakeFormSignature {\n return (intakeFormId: string, formRevision: string) =>\n universalArchiveIntakeForm(\n intakeFormId,\n formRevision,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ArchiveIntakeFormSignature {\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 - Intake form ID.\n * @param - 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 (\n intakeFormId: string,\n formRevision: string\n ): Promise<ArchiveIntakeFormResponse>;\n}\n\nexport function unarchiveIntakeForm(\n httpClient: HttpClient\n): UnarchiveIntakeFormSignature {\n return (intakeFormId: string, formRevision: string) =>\n universalUnarchiveIntakeForm(\n intakeFormId,\n formRevision,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UnarchiveIntakeFormSignature {\n /**\n * Unarchives an intake form, enabling it to accept new submissions.\n * @param - Intake form ID.\n * @param - 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 (\n intakeFormId: string,\n formRevision: string\n ): Promise<UnarchiveIntakeFormResponse>;\n}\n\nexport {\n ActionEvent,\n ArchiveIntakeFormRequest,\n ArchiveIntakeFormResponse,\n ContactDetails,\n CreateCustomerSubmissionLinkOptions,\n CreateCustomerSubmissionLinkRequest,\n CreateCustomerSubmissionLinkResponse,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DecryptContactDetailsFromTokenRequest,\n DecryptContactDetailsFromTokenResponse,\n DeleteIntakeFormRequest,\n DeleteIntakeFormResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n IntakeForm,\n IntakeFormQuerySpec,\n IntakeFormsQueryBuilder,\n IntakeFormsQueryResult,\n PendingTriggerField,\n QueryIntakeFormsRequest,\n QueryIntakeFormsResponse,\n RestoreInfo,\n SortOrder,\n Sorting,\n UnarchiveIntakeFormRequest,\n UnarchiveIntakeFormResponse,\n UpdateIntakeFormExpirationPeriodOptions,\n UpdateIntakeFormExpirationPeriodRequest,\n UpdateIntakeFormExpirationPeriodResponse,\n UpdateIntakeFormSettingsOptions,\n UpdateIntakeFormSettingsRequest,\n UpdateIntakeFormSettingsResponse,\n utils,\n} from './intake-forms-v1-intake-form-intake-forms.universal.js';\n","import {\n queryIntakeForms as publicQueryIntakeForms,\n typedQueryIntakeForms as publicTypedQueryIntakeForms,\n updateIntakeFormExpirationPeriod as publicUpdateIntakeFormExpirationPeriod,\n updateIntakeFormSettings as publicUpdateIntakeFormSettings,\n createCustomerSubmissionLink as publicCreateCustomerSubmissionLink,\n deleteIntakeForm as publicDeleteIntakeForm,\n archiveIntakeForm as publicArchiveIntakeForm,\n unarchiveIntakeForm as publicUnarchiveIntakeForm,\n} from './intake-forms-v1-intake-form-intake-forms.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n IntakeFormQuery,\n IntakeFormsQueryBuilder,\n typedQueryIntakeForms as universalTypedQueryIntakeForms,\n} from './intake-forms-v1-intake-form-intake-forms.universal.js';\n\nfunction customQueryIntakeForms(httpClient: HttpClient) {\n const router = createQueryOverloadRouter({\n builderQueryFunction: () => publicQueryIntakeForms(httpClient)(),\n typedQueryFunction: (query: IntakeFormQuery) =>\n publicTypedQueryIntakeForms(httpClient)(query),\n hasOptionsParameter: false,\n });\n\n function overloadedQuery(): IntakeFormsQueryBuilder;\n function overloadedQuery(\n query: IntakeFormQuery\n ): ReturnType<typeof universalTypedQueryIntakeForms>;\n function overloadedQuery(query?: IntakeFormQuery): any {\n return router(...arguments);\n }\n\n return overloadedQuery;\n}\n\nexport const updateIntakeFormExpirationPeriod: MaybeContext<\n BuildRESTFunction<typeof publicUpdateIntakeFormExpirationPeriod> &\n typeof publicUpdateIntakeFormExpirationPeriod\n> = /*#__PURE__*/ createRESTModule(publicUpdateIntakeFormExpirationPeriod);\n/** @internal */\nexport const updateIntakeFormSettings: MaybeContext<\n BuildRESTFunction<typeof publicUpdateIntakeFormSettings> &\n typeof publicUpdateIntakeFormSettings\n> = /*#__PURE__*/ createRESTModule(publicUpdateIntakeFormSettings);\nexport const createCustomerSubmissionLink: MaybeContext<\n BuildRESTFunction<typeof publicCreateCustomerSubmissionLink> &\n typeof publicCreateCustomerSubmissionLink\n> = /*#__PURE__*/ createRESTModule(publicCreateCustomerSubmissionLink);\nexport const deleteIntakeForm: MaybeContext<\n BuildRESTFunction<typeof publicDeleteIntakeForm> &\n typeof publicDeleteIntakeForm\n> = /*#__PURE__*/ createRESTModule(publicDeleteIntakeForm);\nexport const archiveIntakeForm: MaybeContext<\n BuildRESTFunction<typeof publicArchiveIntakeForm> &\n typeof publicArchiveIntakeForm\n> = /*#__PURE__*/ createRESTModule(publicArchiveIntakeForm);\nexport const unarchiveIntakeForm: MaybeContext<\n BuildRESTFunction<typeof publicUnarchiveIntakeForm> &\n typeof publicUnarchiveIntakeForm\n> = /*#__PURE__*/ createRESTModule(publicUnarchiveIntakeForm);\nexport const queryIntakeForms: MaybeContext<\n BuildRESTFunction<typeof customQueryIntakeForms> &\n typeof customQueryIntakeForms\n> = /*#__PURE__*/ createRESTModule(customQueryIntakeForms);\n\nexport { SortOrder } from './intake-forms-v1-intake-form-intake-forms.universal.js';\nexport {\n IntakeForm,\n PendingTriggerField,\n QueryIntakeFormsRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n CursorPaging,\n QueryIntakeFormsResponse,\n CursorPagingMetadata,\n Cursors,\n UpdateIntakeFormExpirationPeriodRequest,\n UpdateIntakeFormExpirationPeriodResponse,\n UpdateIntakeFormSettingsRequest,\n UpdateIntakeFormSettingsResponse,\n CreateCustomerSubmissionLinkRequest,\n CreateCustomerSubmissionLinkResponse,\n DeleteIntakeFormRequest,\n DeleteIntakeFormResponse,\n ArchiveIntakeFormRequest,\n ArchiveIntakeFormResponse,\n UnarchiveIntakeFormRequest,\n UnarchiveIntakeFormResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n DecryptContactDetailsFromTokenRequest,\n DecryptContactDetailsFromTokenResponse,\n ContactDetails,\n IntakeFormsQueryResult,\n IntakeFormsQueryBuilder,\n IntakeFormQuerySpec,\n UpdateIntakeFormExpirationPeriodOptions,\n UpdateIntakeFormSettingsOptions,\n CreateCustomerSubmissionLinkOptions,\n} from './intake-forms-v1-intake-form-intake-forms.universal.js';\nexport { utils } from './intake-forms-v1-intake-form-intake-forms.universal.js';\nexport {\n SortOrderWithLiterals,\n UpdateIntakeFormSettingsApplicationErrors,\n CreateCustomerSubmissionLinkApplicationErrors,\n CommonQueryWithEntityContext,\n IntakeFormQuery,\n} from './intake-forms-v1-intake-form-intake-forms.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD,SAAS,oBAAoB;AAC7B;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACLP,SAAS,yBAAyB;AAClC,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,6CACP,MACA;AACA,QAAM,mBAAmB,CAAC;AAE1B,SAAO,WAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAad,SAAS,iBAAiB,SAA6C;AAC5E,WAAS,mBAAmB,EAAE,KAAK,GAAQ;AACzC,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WAAW;AAAA,MACX,aAAa;AAAA,MACb,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,KAAK,6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AAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAiBO,SAASC,qBACd,YAC8B;AAC9B,SAAO,CAAC,cAAsB,iBAC5BA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AC9OA,SAAS,wBAAwB;AAGjC,SAAS,iCAAiC;AAO1C,SAAS,uBAAuB,YAAwB;AACtD,QAAM,SAAS,0BAA0B;AAAA,IACvC,sBAAsB,MAAMC,kBAAuB,UAAU,EAAE;AAAA,IAC/D,oBAAoB,CAAC,UACnBC,uBAA4B,UAAU,EAAE,KAAK;AAAA,IAC/C,qBAAqB;AAAA,EACvB,CAAC;AAMD,WAAS,gBAAgB,OAA8B;AACrD,WAAO,OAAO,GAAG,SAAS;AAAA,EAC5B;AAEA,SAAO;AACT;AAEO,IAAMC,oCAGK,iCAAiBA,iCAAsC;AAElE,IAAMC,4BAGK,iCAAiBA,yBAA8B;AAC1D,IAAMC,gCAGK,iCAAiBA,6BAAkC;AAC9D,IAAMC,oBAGK,iCAAiBA,iBAAsB;AAClD,IAAMC,qBAGK,iCAAiBA,kBAAuB;AACnD,IAAMC,uBAGK,iCAAiBA,oBAAyB;AACrD,IAAMP,oBAGK,iCAAiB,sBAAsB;","names":["payload","transformPaths","SortOrder","queryIntakeForms","updateIntakeFormExpirationPeriod","updateIntakeFormSettings","createCustomerSubmissionLink","deleteIntakeForm","archiveIntakeForm","unarchiveIntakeForm","queryIntakeForms","typedQueryIntakeForms","updateIntakeFormExpirationPeriod","updateIntakeFormSettings","createCustomerSubmissionLink","deleteIntakeForm","archiveIntakeForm","unarchiveIntakeForm","queryIntakeForms","typedQueryIntakeForms","updateIntakeFormExpirationPeriod","updateIntakeFormSettings","createCustomerSubmissionLink","deleteIntakeForm","archiveIntakeForm","unarchiveIntakeForm"]}
|
|
@@ -58,7 +58,7 @@ interface IntakeForm {
|
|
|
58
58
|
triggeredExpirationPeriodInMonths?: number | null;
|
|
59
59
|
/**
|
|
60
60
|
* Form fields that, when filled, mark a new submission as `PENDING_APPROVAL` (awaiting manual administrator review).
|
|
61
|
-
* Each entry must reference a visible input field
|
|
61
|
+
* Each entry must reference a visible checkbox input field.
|
|
62
62
|
* Any single configured field firing transitions the submission to pending. Empty means no triggers are configured.
|
|
63
63
|
* @internal
|
|
64
64
|
* @maxSize 100
|
|
@@ -69,7 +69,7 @@ interface IntakeForm {
|
|
|
69
69
|
interface PendingTriggerField {
|
|
70
70
|
/**
|
|
71
71
|
* ID of the [Wix Forms field](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/form-object) that drives the trigger.
|
|
72
|
-
* Must reference a visible input field
|
|
72
|
+
* Must reference a visible checkbox input field. Configuring an unsupported,
|
|
73
73
|
* hidden, or unknown field via `UpdateIntakeFormSettings` is rejected with `UNSUPPORTED_TRIGGER_FIELD`.
|
|
74
74
|
* Stored as the stable field ID (not the translatable label).
|
|
75
75
|
* @format GUID
|
|
@@ -224,10 +224,15 @@ interface UpdateIntakeFormSettingsRequest {
|
|
|
224
224
|
*/
|
|
225
225
|
triggeredExpirationPeriodInMonths?: number | null;
|
|
226
226
|
/**
|
|
227
|
-
* Trigger fields that mark a new submission as `PENDING_APPROVAL` when filled. Each must reference a visible input field
|
|
227
|
+
* Trigger fields that mark a new submission as `PENDING_APPROVAL` when filled. Each must reference a visible checkbox input field; otherwise rejected with `UNSUPPORTED_TRIGGER_FIELD`. An empty list clears all triggers (feature off for this form).
|
|
228
228
|
* @maxSize 100
|
|
229
229
|
*/
|
|
230
230
|
pendingTriggerFields?: PendingTriggerField[];
|
|
231
|
+
/**
|
|
232
|
+
* Required. Set of fields to update. Only the fields listed here are written; fields you omit are left unchanged.
|
|
233
|
+
* List a field with no value (or an empty list) to reset it to its default.
|
|
234
|
+
*/
|
|
235
|
+
fieldMask: string[];
|
|
231
236
|
}
|
|
232
237
|
interface UpdateIntakeFormSettingsResponse {
|
|
233
238
|
/** Updated intake form. */
|
|
@@ -580,12 +585,11 @@ interface UpdateIntakeFormExpirationPeriodOptions {
|
|
|
580
585
|
* trigger fields.
|
|
581
586
|
*
|
|
582
587
|
* The current `form_revision` is required — the update is rejected if it does not match the stored revision
|
|
583
|
-
* (optimistic locking).
|
|
584
|
-
*
|
|
588
|
+
* (optimistic locking). Only fields listed in `field_mask` are written; fields omitted from the mask are left
|
|
589
|
+
* untouched, and a masked field with no value reverts that setting to its default.
|
|
585
590
|
*
|
|
586
|
-
* Each `pending_trigger_fields[].form_field_id` must reference a visible input field
|
|
587
|
-
*
|
|
588
|
-
* (application code `UNSUPPORTED_TRIGGER_FIELD`).
|
|
591
|
+
* Each `pending_trigger_fields[].form_field_id` must reference a visible checkbox input field. Unsupported,
|
|
592
|
+
* hidden, or unknown field IDs are rejected with `INVALID_ARGUMENT` (application code `UNSUPPORTED_TRIGGER_FIELD`).
|
|
589
593
|
*
|
|
590
594
|
* The `triggered_expiration_period_in_months` applies only to submissions that fire a trigger; it has no
|
|
591
595
|
* effect when `pending_trigger_fields` is empty.
|
|
@@ -596,10 +600,12 @@ interface UpdateIntakeFormExpirationPeriodOptions {
|
|
|
596
600
|
* @documentationMaturity preview
|
|
597
601
|
* @requiredField formRevision
|
|
598
602
|
* @requiredField intakeFormId
|
|
603
|
+
* @requiredField options.fieldMask
|
|
599
604
|
* @permissionId intake_forms:v1:intake_form:update_intake_form_settings
|
|
605
|
+
* @applicableIdentity APP
|
|
600
606
|
* @fqn wix.intakeforms.v1.IntakeFormsService.UpdateIntakeFormSettings
|
|
601
607
|
*/
|
|
602
|
-
declare function updateIntakeFormSettings(intakeFormId: string, formRevision: string, options?: UpdateIntakeFormSettingsOptions): Promise<UpdateIntakeFormSettingsResponse & {
|
|
608
|
+
declare function updateIntakeFormSettings(intakeFormId: string, formRevision: string, options?: NonNullablePaths<UpdateIntakeFormSettingsOptions, `fieldMask`, 2>): Promise<UpdateIntakeFormSettingsResponse & {
|
|
603
609
|
__applicationErrorsType?: UpdateIntakeFormSettingsApplicationErrors;
|
|
604
610
|
}>;
|
|
605
611
|
interface UpdateIntakeFormSettingsOptions {
|
|
@@ -616,10 +622,15 @@ interface UpdateIntakeFormSettingsOptions {
|
|
|
616
622
|
*/
|
|
617
623
|
triggeredExpirationPeriodInMonths?: number | null;
|
|
618
624
|
/**
|
|
619
|
-
* Trigger fields that mark a new submission as `PENDING_APPROVAL` when filled. Each must reference a visible input field
|
|
625
|
+
* Trigger fields that mark a new submission as `PENDING_APPROVAL` when filled. Each must reference a visible checkbox input field; otherwise rejected with `UNSUPPORTED_TRIGGER_FIELD`. An empty list clears all triggers (feature off for this form).
|
|
620
626
|
* @maxSize 100
|
|
621
627
|
*/
|
|
622
628
|
pendingTriggerFields?: PendingTriggerField[];
|
|
629
|
+
/**
|
|
630
|
+
* Required. Set of fields to update. Only the fields listed here are written; fields you omit are left unchanged.
|
|
631
|
+
* List a field with no value (or an empty list) to reset it to its default.
|
|
632
|
+
*/
|
|
633
|
+
fieldMask: string[];
|
|
623
634
|
}
|
|
624
635
|
/**
|
|
625
636
|
* Creates a shareable link for customers to submit an intake form.
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
// src/intake-forms-v1-intake-form-intake-forms.http.ts
|
|
10
10
|
import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
|
|
11
11
|
import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
12
|
+
import { transformSDKFieldMaskToRESTFieldMask } from "@wix/sdk-runtime/transformations/field-mask";
|
|
12
13
|
import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
13
14
|
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
|
|
14
15
|
function resolveWixIntakeformsV1IntakeFormsServiceUrl(opts) {
|
|
@@ -78,6 +79,12 @@ function updateIntakeFormExpirationPeriod(payload) {
|
|
|
78
79
|
}
|
|
79
80
|
function updateIntakeFormSettings(payload) {
|
|
80
81
|
function __updateIntakeFormSettings({ host }) {
|
|
82
|
+
const serializedData = transformPaths(payload, [
|
|
83
|
+
{
|
|
84
|
+
transformFn: transformSDKFieldMaskToRESTFieldMask,
|
|
85
|
+
paths: [{ path: "fieldMask" }]
|
|
86
|
+
}
|
|
87
|
+
]);
|
|
81
88
|
const metadata = {
|
|
82
89
|
entityFqdn: "wix.intake_forms.v1.intake_form",
|
|
83
90
|
method: "PATCH",
|
|
@@ -88,10 +95,10 @@ function updateIntakeFormSettings(payload) {
|
|
|
88
95
|
},
|
|
89
96
|
url: resolveWixIntakeformsV1IntakeFormsServiceUrl({
|
|
90
97
|
protoPath: "/v1/intake-forms/{intakeFormId}/settings",
|
|
91
|
-
data:
|
|
98
|
+
data: serializedData,
|
|
92
99
|
host
|
|
93
100
|
}),
|
|
94
|
-
data:
|
|
101
|
+
data: serializedData,
|
|
95
102
|
transformResponse: (payload2) => transformPaths(payload2, [
|
|
96
103
|
{
|
|
97
104
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
@@ -328,7 +335,8 @@ async function updateIntakeFormSettings2(intakeFormId, formRevision, options) {
|
|
|
328
335
|
formRevision,
|
|
329
336
|
expirationPeriodInMonths: options?.expirationPeriodInMonths,
|
|
330
337
|
triggeredExpirationPeriodInMonths: options?.triggeredExpirationPeriodInMonths,
|
|
331
|
-
pendingTriggerFields: options?.pendingTriggerFields
|
|
338
|
+
pendingTriggerFields: options?.pendingTriggerFields,
|
|
339
|
+
fieldMask: options?.fieldMask
|
|
332
340
|
});
|
|
333
341
|
const reqOpts = updateIntakeFormSettings(payload);
|
|
334
342
|
sideEffects?.onSiteCall?.();
|
|
@@ -346,7 +354,8 @@ async function updateIntakeFormSettings2(intakeFormId, formRevision, options) {
|
|
|
346
354
|
formRevision: "$[1]",
|
|
347
355
|
expirationPeriodInMonths: "$[2].expirationPeriodInMonths",
|
|
348
356
|
triggeredExpirationPeriodInMonths: "$[2].triggeredExpirationPeriodInMonths",
|
|
349
|
-
pendingTriggerFields: "$[2].pendingTriggerFields"
|
|
357
|
+
pendingTriggerFields: "$[2].pendingTriggerFields",
|
|
358
|
+
fieldMask: "$[2].fieldMask"
|
|
350
359
|
},
|
|
351
360
|
singleArgumentUnchanged: false
|
|
352
361
|
},
|