@wix/auto_sdk_intake-forms_intake-forms 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +11 -36
- package/build/cjs/index.js +80 -11
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +158 -33
- package/build/cjs/index.typings.js +61 -8
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +1 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +11 -36
- package/build/es/index.mjs +78 -10
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +158 -33
- package/build/es/index.typings.mjs +58 -7
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +1 -1
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +11 -36
- package/build/internal/cjs/index.js +80 -11
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +158 -33
- package/build/internal/cjs/index.typings.js +61 -8
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +1 -1
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +11 -36
- package/build/internal/es/index.mjs +78 -10
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +158 -33
- package/build/internal/es/index.typings.mjs +58 -7
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +1 -1
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +4 -4
package/build/cjs/meta.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../meta.ts","../../src/intake-forms-v1-intake-form-intake-forms.http.ts","../../src/intake-forms-v1-intake-form-intake-forms.types.ts","../../src/intake-forms-v1-intake-form-intake-forms.meta.ts"],"sourcesContent":["export * from './src/intake-forms-v1-intake-form-intake-forms.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixIntakeformsV1IntakeFormsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/intake-forms/v1/intake-forms',\n destPath: '/v1/intake-forms',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/intake-forms',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/intake-forms',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/intake-forms',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/intake-forms/v1/intake-forms',\n destPath: '/v1/intake-forms',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/intake-forms/v1/intake-forms',\n destPath: '/v1/intake-forms',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/intake-forms/v1/intake-forms',\n destPath: '/v1/intake-forms',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/intake-forms/v1/intake-forms',\n destPath: '/v1/intake-forms',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/intake-forms/v1/intake-forms',\n destPath: '/v1/intake-forms',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/intake-forms/v1/intake-forms',\n destPath: '/v1/intake-forms',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_intake-forms_intake-forms';\n\n/**\n * Retrieves a list of intake forms, with the specified paging, filtering, and sorting.\n *\n *\n * QueryIntakeForms runs with these defaults, which you can override:\n *\n * - `createdDate` is sorted in `DESC` order.\n * - `paging.limit` is `50`.\n * - `paging.offset` is `0`.\n *\n * Learn more about [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language).\n */\nexport function queryIntakeForms(payload: object): RequestOptionsFactory<any> {\n function __queryIntakeForms({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.intake_forms.v1.intake_form',\n method: 'POST' as any,\n methodFqn: 'wix.intakeforms.v1.IntakeFormsService.QueryIntakeForms',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIntakeformsV1IntakeFormsServiceUrl({\n protoPath: '/v1/intake-forms/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'intakeForms.createdDate' },\n { path: 'intakeForms.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryIntakeForms;\n}\n\n/**\n * Updates the expiration period of a specific intake form.\n *\n * When you update the expiration period, the system recalculates expiration for all existing submissions.\n *\n * Each time the intake form is updated, `revision` increments by 1.\n * You must specify the current `revision` when updating the intake form.\n * This ensures you're working with the latest intake form and prevents unintended overwrites.\n */\nexport function updateIntakeFormExpirationPeriod(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateIntakeFormExpirationPeriod({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.intake_forms.v1.intake_form',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.intakeforms.v1.IntakeFormsService.UpdateIntakeFormExpirationPeriod',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIntakeformsV1IntakeFormsServiceUrl({\n protoPath: '/v1/intake-forms/{intakeFormId}',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'intakeForm.createdDate' },\n { path: 'intakeForm.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateIntakeFormExpirationPeriod;\n}\n\n/**\n * Creates a shareable link for customers to submit an intake form.\n *\n * The link is valid for 72 hours.\n */\nexport function createCustomerSubmissionLink(\n payload: object\n): RequestOptionsFactory<any> {\n function __createCustomerSubmissionLink({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.intake_forms.v1.intake_form',\n method: 'GET' as any,\n methodFqn:\n 'wix.intakeforms.v1.IntakeFormsService.CreateCustomerSubmissionLink',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIntakeformsV1IntakeFormsServiceUrl({\n protoPath: '/v1/intake-forms/{intakeFormId}/link',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __createCustomerSubmissionLink;\n}\n\n/**\n * Deletes an intake form.\n *\n *\n * Also deletes the underlying [Wix form](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/introduction).\n *\n * Existing [submissions](https://dev.wix.com/docs/api-reference/crm/forms/other-services/intake-form-submissions/introduction) for the intake form aren't automatically deleted but become orphaned.\n * When [querying submissions](https://dev.wix.com/docs/api-reference/crm/forms/other-services/intake-form-submissions/query-intake-form-submissions), orphaned submissions aren't returned.\n */\nexport function deleteIntakeForm(payload: object): RequestOptionsFactory<any> {\n function __deleteIntakeForm({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.intake_forms.v1.intake_form',\n method: 'DELETE' as any,\n methodFqn: 'wix.intakeforms.v1.IntakeFormsService.DeleteIntakeForm',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIntakeformsV1IntakeFormsServiceUrl({\n protoPath: '/v1/intake-forms/{intakeFormId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteIntakeForm;\n}\n\n/**\n * Archives an intake form, disabling it from accepting new submissions.\n *\n * Existing submissions remain accessible. You can [unarchive](https://dev.wix.com/docs/api-reference/crm/forms/other-services/intake-forms/unarchive-intake-form) the form later to resume accepting submissions.\n *\n * Each time the intake form is updated, `revision` increments by 1.\n * You must specify the current `revision` when updating the intake form.\n * This ensures you're working with the latest intake form and prevents unintended overwrites.\n */\nexport function archiveIntakeForm(payload: object): RequestOptionsFactory<any> {\n function __archiveIntakeForm({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.intake_forms.v1.intake_form',\n method: 'POST' as any,\n methodFqn: 'wix.intakeforms.v1.IntakeFormsService.ArchiveIntakeForm',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIntakeformsV1IntakeFormsServiceUrl({\n protoPath: '/v1/intake-forms/{intakeFormId}/archive',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'intakeForm.createdDate' },\n { path: 'intakeForm.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __archiveIntakeForm;\n}\n\n/**\n * Unarchives an intake form, enabling it to accept new submissions.\n *\n *\n * Each time the intake form is updated, `revision` increments by 1.\n * You must specify the current `revision` when updating the intake form.\n * This ensures you're working with the latest intake form and prevents unintended overwrites.\n */\nexport function unarchiveIntakeForm(\n payload: object\n): RequestOptionsFactory<any> {\n function __unarchiveIntakeForm({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.intake_forms.v1.intake_form',\n method: 'POST' as any,\n methodFqn: 'wix.intakeforms.v1.IntakeFormsService.UnarchiveIntakeForm',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIntakeformsV1IntakeFormsServiceUrl({\n protoPath: '/v1/intake-forms/{intakeFormId}/unarchive',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'intakeForm.createdDate' },\n { path: 'intakeForm.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __unarchiveIntakeForm;\n}\n","/**\n * A wrapper around a Wix form that adds expiration tracking and submission management.\n * Intake forms collect information from contacts with time-based validity requirements.\n */\nexport interface IntakeForm {\n /**\n * Intake form ID.\n * @format GUID\n * @readonly\n */\n id?: string | null;\n /**\n * Expiration period in months. If not set, submissions don't expire.\n * @min 1\n * @max 60\n */\n expirationPeriodInMonths?: number | null;\n /**\n * Whether the intake form is archived and disabled from accepting new submissions.\n * @readonly\n */\n archived?: boolean | null;\n /**\n * Intake form name.\n * @minLength 1\n * @maxLength 100\n * @readonly\n */\n name?: string | null;\n /**\n * Date and time the intake form was created in UTC datetime `YYYY-MM-DDThh:mm:ssZ` format.\n * @readonly\n */\n createdDate?: Date | null;\n /**\n * Date and time the intake form was updated in UTC datetime `YYYY-MM-DDThh:mm:ssZ` format.\n * @readonly\n */\n updatedDate?: Date | null;\n /**\n * Revision number, which increments by 1 each time the intake form is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the intake form.\n * @readonly\n */\n revision?: string | null;\n}\n\nexport interface QueryIntakeFormsRequest {\n /**\n * Filter object.\n * See @API Query Language\n * for more information.\n *\n * For a detailed list of supported filters, see\n * @Supported Filters.\n */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface QueryIntakeFormsResponse {\n /** Retrieved intake forms. */\n intakeForms?: IntakeForm[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in current page. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface UpdateIntakeFormExpirationPeriodRequest {\n /**\n * Intake form ID.\n * @format GUID\n */\n intakeFormId: string | null;\n /**\n * New expiration period in months. If not set, submissions don't expire.\n * @min 1\n * @max 60\n */\n expirationPeriodInMonths?: number | null;\n /**\n * Revision number, which increments by 1 each time the intake form is updated.\n * To prevent conflicting changes, you must specify the current revision when updating the intake form.\n */\n formRevision: string | null;\n}\n\nexport interface UpdateIntakeFormExpirationPeriodResponse {\n /** Updated intake form. */\n intakeForm?: IntakeForm;\n}\n\nexport interface CreateCustomerSubmissionLinkRequest {\n /**\n * Intake form ID.\n * @format GUID\n */\n intakeFormId: string | null;\n /**\n * [Contact](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts/introduction) ID to personalize and pre-fill the submission with the contact's information.\n * @format GUID\n */\n contactId?: string | null;\n}\n\nexport interface CreateCustomerSubmissionLinkResponse {\n /**\n * Generated link URL for the intake form submission.\n * @minLength 1\n * @maxLength 2048\n */\n intakeFormUrl?: string | null;\n /**\n * Encrypted token containing contact details. Available only if you specified `contactId` in request.\n * @maxLength 2048\n */\n token?: string | null;\n}\n\nexport interface DeleteIntakeFormRequest {\n /**\n * Intake form ID.\n * @format GUID\n */\n intakeFormId: string | null;\n}\n\nexport interface DeleteIntakeFormResponse {}\n\nexport interface ArchiveIntakeFormRequest {\n /**\n * Intake form ID.\n * @format GUID\n */\n intakeFormId: string | null;\n /**\n * Revision number, which increments by 1 each time the intake form is updated.\n * To prevent conflicting changes, you must specify the current revision when updating the intake form.\n */\n formRevision: string | null;\n}\n\nexport interface ArchiveIntakeFormResponse {\n /** Archived intake form. */\n intakeForm?: IntakeForm;\n}\n\nexport interface UnarchiveIntakeFormRequest {\n /**\n * Intake form ID.\n * @format GUID\n */\n intakeFormId: string | null;\n /**\n * Revision number, which increments by 1 each time the intake form is updated.\n * To prevent conflicting changes, you must specify the current revision when updating the intake form.\n */\n formRevision: string | null;\n}\n\nexport interface UnarchiveIntakeFormResponse {\n /** Unarchived intake form. */\n intakeForm?: IntakeForm;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entityAsJson?: string;\n /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n restoreInfo?: RestoreInfo;\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 currentEntityAsJson?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntityAsJson?: string | null;\n}\n\nexport interface ActionEvent {\n bodyAsJson?: string;\n}\n\nexport interface Empty {}\n\nexport interface DecryptContactDetailsFromTokenRequest {\n /**\n * Encrypted token containing contact details and creation timestamp.\n * Generated by [Create Customer Submission Link](https://dev.wix.com/docs/api-reference/crm/forms/other-services/intake-forms/create-customer-submission-link) when a `contactId` is provided.\n * @minLength 1\n * @maxLength 2048\n */\n token?: string;\n}\n\nexport interface DecryptContactDetailsFromTokenResponse {\n /** Contact details extracted from the token. */\n contactDetails?: ContactDetails;\n}\n\nexport interface ContactDetails {\n /**\n * Contact email address. Always present.\n * @format EMAIL\n */\n email?: string;\n /**\n * Contact first name. Present when the contact record has a first name.\n * @maxLength 200\n */\n firstName?: string | null;\n /**\n * Contact last name. Present when the contact record has a last name.\n * @maxLength 200\n */\n lastName?: string | null;\n}\n\n/** @docsIgnore */\nexport type CreateCustomerSubmissionLinkApplicationErrors = {\n code?: 'MISSING_SITE_URL';\n description?: string;\n data?: Record<string, any>;\n};\n","import * as ambassadorWixIntakeFormsV1IntakeForm from './intake-forms-v1-intake-form-intake-forms.http.js';\nimport * as ambassadorWixIntakeFormsV1IntakeFormTypes from './intake-forms-v1-intake-form-intake-forms.types.js';\nimport * as ambassadorWixIntakeFormsV1IntakeFormUniversalTypes from './intake-forms-v1-intake-form-intake-forms.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function queryIntakeForms(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixIntakeFormsV1IntakeFormUniversalTypes.QueryIntakeFormsRequest,\n ambassadorWixIntakeFormsV1IntakeFormTypes.QueryIntakeFormsRequest,\n ambassadorWixIntakeFormsV1IntakeFormUniversalTypes.QueryIntakeFormsResponse,\n ambassadorWixIntakeFormsV1IntakeFormTypes.QueryIntakeFormsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixIntakeFormsV1IntakeForm.queryIntakeForms(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/intake-forms/query',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function updateIntakeFormExpirationPeriod(): __PublicMethodMetaInfo<\n 'PATCH',\n { intakeFormId: string },\n ambassadorWixIntakeFormsV1IntakeFormUniversalTypes.UpdateIntakeFormExpirationPeriodRequest,\n ambassadorWixIntakeFormsV1IntakeFormTypes.UpdateIntakeFormExpirationPeriodRequest,\n ambassadorWixIntakeFormsV1IntakeFormUniversalTypes.UpdateIntakeFormExpirationPeriodResponse,\n ambassadorWixIntakeFormsV1IntakeFormTypes.UpdateIntakeFormExpirationPeriodResponse\n> {\n const payload = { intakeFormId: ':intakeFormId' } as any;\n\n const getRequestOptions =\n ambassadorWixIntakeFormsV1IntakeForm.updateIntakeFormExpirationPeriod(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'PATCH',\n path: '/v1/intake-forms/{intakeFormId}',\n pathParams: { intakeFormId: 'intakeFormId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function createCustomerSubmissionLink(): __PublicMethodMetaInfo<\n 'GET',\n { intakeFormId: string },\n ambassadorWixIntakeFormsV1IntakeFormUniversalTypes.CreateCustomerSubmissionLinkRequest,\n ambassadorWixIntakeFormsV1IntakeFormTypes.CreateCustomerSubmissionLinkRequest,\n ambassadorWixIntakeFormsV1IntakeFormUniversalTypes.CreateCustomerSubmissionLinkResponse,\n ambassadorWixIntakeFormsV1IntakeFormTypes.CreateCustomerSubmissionLinkResponse\n> {\n const payload = { intakeFormId: ':intakeFormId' } as any;\n\n const getRequestOptions =\n ambassadorWixIntakeFormsV1IntakeForm.createCustomerSubmissionLink(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/intake-forms/{intakeFormId}/link',\n pathParams: { intakeFormId: 'intakeFormId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function deleteIntakeForm(): __PublicMethodMetaInfo<\n 'DELETE',\n { intakeFormId: string },\n ambassadorWixIntakeFormsV1IntakeFormUniversalTypes.DeleteIntakeFormRequest,\n ambassadorWixIntakeFormsV1IntakeFormTypes.DeleteIntakeFormRequest,\n ambassadorWixIntakeFormsV1IntakeFormUniversalTypes.DeleteIntakeFormResponse,\n ambassadorWixIntakeFormsV1IntakeFormTypes.DeleteIntakeFormResponse\n> {\n const payload = { intakeFormId: ':intakeFormId' } as any;\n\n const getRequestOptions =\n ambassadorWixIntakeFormsV1IntakeForm.deleteIntakeForm(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'DELETE',\n path: '/v1/intake-forms/{intakeFormId}',\n pathParams: { intakeFormId: 'intakeFormId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function archiveIntakeForm(): __PublicMethodMetaInfo<\n 'POST',\n { intakeFormId: string },\n ambassadorWixIntakeFormsV1IntakeFormUniversalTypes.ArchiveIntakeFormRequest,\n ambassadorWixIntakeFormsV1IntakeFormTypes.ArchiveIntakeFormRequest,\n ambassadorWixIntakeFormsV1IntakeFormUniversalTypes.ArchiveIntakeFormResponse,\n ambassadorWixIntakeFormsV1IntakeFormTypes.ArchiveIntakeFormResponse\n> {\n const payload = { intakeFormId: ':intakeFormId' } as any;\n\n const getRequestOptions =\n ambassadorWixIntakeFormsV1IntakeForm.archiveIntakeForm(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/intake-forms/{intakeFormId}/archive',\n pathParams: { intakeFormId: 'intakeFormId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function unarchiveIntakeForm(): __PublicMethodMetaInfo<\n 'POST',\n { intakeFormId: string },\n ambassadorWixIntakeFormsV1IntakeFormUniversalTypes.UnarchiveIntakeFormRequest,\n ambassadorWixIntakeFormsV1IntakeFormTypes.UnarchiveIntakeFormRequest,\n ambassadorWixIntakeFormsV1IntakeFormUniversalTypes.UnarchiveIntakeFormResponse,\n ambassadorWixIntakeFormsV1IntakeFormTypes.UnarchiveIntakeFormResponse\n> {\n const payload = { intakeFormId: ':intakeFormId' } as any;\n\n const getRequestOptions =\n ambassadorWixIntakeFormsV1IntakeForm.unarchiveIntakeForm(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/intake-forms/{intakeFormId}/unarchive',\n pathParams: { intakeFormId: 'intakeFormId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n IntakeForm as IntakeFormOriginal,\n QueryIntakeFormsRequest as QueryIntakeFormsRequestOriginal,\n CursorQuery as CursorQueryOriginal,\n CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal,\n Sorting as SortingOriginal,\n SortOrder as SortOrderOriginal,\n SortOrderWithLiterals as SortOrderWithLiteralsOriginal,\n CursorPaging as CursorPagingOriginal,\n QueryIntakeFormsResponse as QueryIntakeFormsResponseOriginal,\n CursorPagingMetadata as CursorPagingMetadataOriginal,\n Cursors as CursorsOriginal,\n UpdateIntakeFormExpirationPeriodRequest as UpdateIntakeFormExpirationPeriodRequestOriginal,\n UpdateIntakeFormExpirationPeriodResponse as UpdateIntakeFormExpirationPeriodResponseOriginal,\n CreateCustomerSubmissionLinkRequest as CreateCustomerSubmissionLinkRequestOriginal,\n CreateCustomerSubmissionLinkResponse as CreateCustomerSubmissionLinkResponseOriginal,\n DeleteIntakeFormRequest as DeleteIntakeFormRequestOriginal,\n DeleteIntakeFormResponse as DeleteIntakeFormResponseOriginal,\n ArchiveIntakeFormRequest as ArchiveIntakeFormRequestOriginal,\n ArchiveIntakeFormResponse as ArchiveIntakeFormResponseOriginal,\n UnarchiveIntakeFormRequest as UnarchiveIntakeFormRequestOriginal,\n UnarchiveIntakeFormResponse as UnarchiveIntakeFormResponseOriginal,\n DomainEvent as DomainEventOriginal,\n DomainEventBodyOneOf as DomainEventBodyOneOfOriginal,\n EntityCreatedEvent as EntityCreatedEventOriginal,\n RestoreInfo as RestoreInfoOriginal,\n EntityUpdatedEvent as EntityUpdatedEventOriginal,\n EntityDeletedEvent as EntityDeletedEventOriginal,\n ActionEvent as ActionEventOriginal,\n Empty as EmptyOriginal,\n DecryptContactDetailsFromTokenRequest as DecryptContactDetailsFromTokenRequestOriginal,\n DecryptContactDetailsFromTokenResponse as DecryptContactDetailsFromTokenResponseOriginal,\n ContactDetails as ContactDetailsOriginal,\n CreateCustomerSubmissionLinkApplicationErrors as CreateCustomerSubmissionLinkApplicationErrorsOriginal,\n} from './intake-forms-v1-intake-form-intake-forms.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,2BAAAA;AAAA,EAAA,oCAAAC;AAAA,EAAA,wBAAAC;AAAA,EAAA,wBAAAC;AAAA,EAAA,2BAAAC;AAAA,EAAA,wCAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,uBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,6CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AA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A,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,cAAc,eAAe;AAAA,IAC3C,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["archiveIntakeForm","createCustomerSubmissionLink","deleteIntakeForm","queryIntakeForms","unarchiveIntakeForm","updateIntakeFormExpirationPeriod","import_rest_modules","payload","SortOrder","queryIntakeForms","updateIntakeFormExpirationPeriod","createCustomerSubmissionLink","deleteIntakeForm","archiveIntakeForm","unarchiveIntakeForm"]}
|
|
1
|
+
{"version":3,"sources":["../../meta.ts","../../src/intake-forms-v1-intake-form-intake-forms.http.ts","../../src/intake-forms-v1-intake-form-intake-forms.types.ts","../../src/intake-forms-v1-intake-form-intake-forms.meta.ts"],"sourcesContent":["export * from './src/intake-forms-v1-intake-form-intake-forms.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixIntakeformsV1IntakeFormsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/intake-forms/v1/intake-forms',\n destPath: '/v1/intake-forms',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/intake-forms',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/intake-forms',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/intake-forms',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/intake-forms/v1/intake-forms',\n destPath: '/v1/intake-forms',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/intake-forms/v1/intake-forms',\n destPath: '/v1/intake-forms',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/intake-forms/v1/intake-forms',\n destPath: '/v1/intake-forms',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/intake-forms/v1/intake-forms',\n destPath: '/v1/intake-forms',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/intake-forms/v1/intake-forms',\n destPath: '/v1/intake-forms',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/intake-forms/v1/intake-forms',\n destPath: '/v1/intake-forms',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_intake-forms_intake-forms';\n\n/**\n * Retrieves a list of intake forms, with the specified paging, filtering, and sorting.\n *\n * Query Intake Forms runs with these defaults, which you can override:\n *\n * - `createdDate` is sorted in `DESC` order.\n * - `paging.limit` is `50`.\n * - `paging.offset` is `0`.\n *\n * This method forwards queries to Wix Forms' [Query Forms](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/query-forms) method and supports the same filters.\n *\n * Additionally, you can filter by `archived` to retrieve only archived or non-archived intake forms.\n *\n * Learn more about [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language).\n */\nexport function queryIntakeForms(payload: object): RequestOptionsFactory<any> {\n function __queryIntakeForms({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.intake_forms.v1.intake_form',\n method: 'POST' as any,\n methodFqn: 'wix.intakeforms.v1.IntakeFormsService.QueryIntakeForms',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIntakeformsV1IntakeFormsServiceUrl({\n protoPath: '/v1/intake-forms/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'intakeForms.createdDate' },\n { path: 'intakeForms.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryIntakeForms;\n}\n\n/**\n * Updates the expiration period of a specific intake form.\n *\n * When you update the expiration period, the system recalculates expiration for all existing submissions.\n */\nexport function updateIntakeFormExpirationPeriod(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateIntakeFormExpirationPeriod({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.intake_forms.v1.intake_form',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.intakeforms.v1.IntakeFormsService.UpdateIntakeFormExpirationPeriod',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIntakeformsV1IntakeFormsServiceUrl({\n protoPath: '/v1/intake-forms/{intakeFormId}',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'intakeForm.createdDate' },\n { path: 'intakeForm.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateIntakeFormExpirationPeriod;\n}\n\n/**\n * Creates a shareable link for customers to submit an intake form.\n *\n * The link is valid for 72 hours.\n */\nexport function createCustomerSubmissionLink(\n payload: object\n): RequestOptionsFactory<any> {\n function __createCustomerSubmissionLink({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.intake_forms.v1.intake_form',\n method: 'GET' as any,\n methodFqn:\n 'wix.intakeforms.v1.IntakeFormsService.CreateCustomerSubmissionLink',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIntakeformsV1IntakeFormsServiceUrl({\n protoPath: '/v1/intake-forms/{intakeFormId}/link',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __createCustomerSubmissionLink;\n}\n\n/**\n * Deletes an intake form.\n *\n *\n * Also deletes the underlying [Wix form](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/introduction).\n *\n * Existing [submissions](https://dev.wix.com/docs/api-reference/crm/forms/other-services/intake-forms/intake-form-submissions/introduction) for the intake form aren't automatically deleted but become orphaned.\n * When [querying submissions](https://dev.wix.com/docs/api-reference/crm/forms/other-services/intake-forms/intake-form-submissions/query-intake-form-submissions), orphaned submissions aren't returned.\n */\nexport function deleteIntakeForm(payload: object): RequestOptionsFactory<any> {\n function __deleteIntakeForm({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.intake_forms.v1.intake_form',\n method: 'DELETE' as any,\n methodFqn: 'wix.intakeforms.v1.IntakeFormsService.DeleteIntakeForm',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIntakeformsV1IntakeFormsServiceUrl({\n protoPath: '/v1/intake-forms/{intakeFormId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteIntakeForm;\n}\n\n/**\n * Archives an intake form, disabling it from accepting new submissions.\n *\n * Existing submissions remain accessible. You can [unarchive](https://dev.wix.com/docs/api-reference/crm/forms/other-services/intake-forms/intake-forms/unarchive-intake-form) the form later to resume accepting submissions.\n */\nexport function archiveIntakeForm(payload: object): RequestOptionsFactory<any> {\n function __archiveIntakeForm({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.intake_forms.v1.intake_form',\n method: 'POST' as any,\n methodFqn: 'wix.intakeforms.v1.IntakeFormsService.ArchiveIntakeForm',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIntakeformsV1IntakeFormsServiceUrl({\n protoPath: '/v1/intake-forms/{intakeFormId}/archive',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'intakeForm.createdDate' },\n { path: 'intakeForm.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __archiveIntakeForm;\n}\n\n/** Unarchives an intake form, enabling it to accept new submissions. */\nexport function unarchiveIntakeForm(\n payload: object\n): RequestOptionsFactory<any> {\n function __unarchiveIntakeForm({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.intake_forms.v1.intake_form',\n method: 'POST' as any,\n methodFqn: 'wix.intakeforms.v1.IntakeFormsService.UnarchiveIntakeForm',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIntakeformsV1IntakeFormsServiceUrl({\n protoPath: '/v1/intake-forms/{intakeFormId}/unarchive',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'intakeForm.createdDate' },\n { path: 'intakeForm.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __unarchiveIntakeForm;\n}\n","/**\n * A wrapper around a Wix form that adds expiration tracking and submission management.\n * Intake forms collect information from contacts with time-based validity requirements.\n */\nexport interface IntakeForm {\n /**\n * Intake form ID.\n * @format GUID\n * @readonly\n */\n id?: string | null;\n /**\n * Expiration period in months. If not set, submissions don't expire.\n * @min 1\n * @max 60\n */\n expirationPeriodInMonths?: number | null;\n /**\n * Whether the intake form is archived and disabled from accepting new submissions.\n * @readonly\n */\n archived?: boolean | null;\n /**\n * Intake form name.\n * @minLength 1\n * @maxLength 100\n * @readonly\n */\n name?: string | null;\n /**\n * Date and time the intake form was created in UTC datetime `YYYY-MM-DDThh:mm:ssZ` format.\n * @readonly\n */\n createdDate?: Date | null;\n /**\n * Date and time the intake form was updated in UTC datetime `YYYY-MM-DDThh:mm:ssZ` format.\n * @readonly\n */\n updatedDate?: Date | null;\n /**\n * Revision number, which increments by 1 each time the intake form is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the intake form.\n * @readonly\n */\n revision?: string | null;\n}\n\nexport interface QueryIntakeFormsRequest {\n /**\n * Filter object.\n * See @API Query Language\n * for more information.\n *\n * For a detailed list of supported filters, see\n * @Supported Filters.\n */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface QueryIntakeFormsResponse {\n /** Retrieved intake forms. */\n intakeForms?: IntakeForm[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in current page. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface UpdateIntakeFormExpirationPeriodRequest {\n /**\n * Intake form ID.\n * @format GUID\n */\n intakeFormId: string | null;\n /**\n * New expiration period in months. If not set, submissions don't expire.\n * @min 1\n * @max 60\n */\n expirationPeriodInMonths?: number | null;\n /**\n * Revision number, which increments by 1 each time the intake form is updated.\n * To prevent conflicting changes, you must specify the current revision when updating the intake form.\n */\n formRevision: string | null;\n}\n\nexport interface UpdateIntakeFormExpirationPeriodResponse {\n /** Updated intake form. */\n intakeForm?: IntakeForm;\n}\n\nexport interface CreateCustomerSubmissionLinkRequest {\n /**\n * Intake form ID.\n * @format GUID\n */\n intakeFormId: string | null;\n /**\n * [Contact](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts/introduction) ID to personalize and pre-fill the submission with the contact's information.\n * @format GUID\n */\n contactId?: string | null;\n}\n\nexport interface CreateCustomerSubmissionLinkResponse {\n /**\n * Generated link URL for the intake form submission.\n * @minLength 1\n * @maxLength 2048\n */\n intakeFormUrl?: string | null;\n /**\n * Encrypted token containing contact details. Available only if you specified `contactId` in request.\n * @maxLength 2048\n */\n token?: string | null;\n}\n\nexport interface DeleteIntakeFormRequest {\n /**\n * Intake form ID.\n * @format GUID\n */\n intakeFormId: string | null;\n}\n\nexport interface DeleteIntakeFormResponse {}\n\nexport interface ArchiveIntakeFormRequest {\n /**\n * Intake form ID.\n * @format GUID\n */\n intakeFormId: string | null;\n /**\n * Revision number, which increments by 1 each time the intake form is updated.\n * To prevent conflicting changes, you must specify the current revision when updating the intake form.\n */\n formRevision: string | null;\n}\n\nexport interface ArchiveIntakeFormResponse {\n /** Archived intake form. */\n intakeForm?: IntakeForm;\n}\n\nexport interface UnarchiveIntakeFormRequest {\n /**\n * Intake form ID.\n * @format GUID\n */\n intakeFormId: string | null;\n /**\n * Revision number, which increments by 1 each time the intake form is updated.\n * To prevent conflicting changes, you must specify the current revision when updating the intake form.\n */\n formRevision: string | null;\n}\n\nexport interface UnarchiveIntakeFormResponse {\n /** Unarchived intake form. */\n intakeForm?: IntakeForm;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entityAsJson?: string;\n /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n restoreInfo?: RestoreInfo;\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 currentEntityAsJson?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntityAsJson?: string | null;\n}\n\nexport interface ActionEvent {\n bodyAsJson?: string;\n}\n\nexport interface Empty {}\n\nexport interface DecryptContactDetailsFromTokenRequest {\n /**\n * Encrypted token containing contact details and creation timestamp.\n * Generated by [Create Customer Submission Link](https://dev.wix.com/docs/api-reference/crm/forms/other-services/intake-forms/intake-forms/create-customer-submission-link) when a `contactId` is provided.\n * @minLength 1\n * @maxLength 2048\n */\n token?: string;\n}\n\nexport interface DecryptContactDetailsFromTokenResponse {\n /** Contact details extracted from the token. */\n contactDetails?: ContactDetails;\n}\n\nexport interface ContactDetails {\n /**\n * Contact email address. Always present.\n * @format EMAIL\n */\n email?: string;\n /**\n * Contact first name. Present when the contact record has a first name.\n * @maxLength 200\n */\n firstName?: string | null;\n /**\n * Contact last name. Present when the contact record has a last name.\n * @maxLength 200\n */\n lastName?: string | null;\n}\n\n/** @docsIgnore */\nexport type CreateCustomerSubmissionLinkApplicationErrors = {\n code?: 'MISSING_SITE_URL';\n description?: string;\n data?: Record<string, any>;\n};\n","import * as ambassadorWixIntakeFormsV1IntakeForm from './intake-forms-v1-intake-form-intake-forms.http.js';\nimport * as ambassadorWixIntakeFormsV1IntakeFormTypes from './intake-forms-v1-intake-form-intake-forms.types.js';\nimport * as ambassadorWixIntakeFormsV1IntakeFormUniversalTypes from './intake-forms-v1-intake-form-intake-forms.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function queryIntakeForms(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixIntakeFormsV1IntakeFormUniversalTypes.QueryIntakeFormsRequest,\n ambassadorWixIntakeFormsV1IntakeFormTypes.QueryIntakeFormsRequest,\n ambassadorWixIntakeFormsV1IntakeFormUniversalTypes.QueryIntakeFormsResponse,\n ambassadorWixIntakeFormsV1IntakeFormTypes.QueryIntakeFormsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixIntakeFormsV1IntakeForm.queryIntakeForms(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/intake-forms/query',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function updateIntakeFormExpirationPeriod(): __PublicMethodMetaInfo<\n 'PATCH',\n { intakeFormId: string },\n ambassadorWixIntakeFormsV1IntakeFormUniversalTypes.UpdateIntakeFormExpirationPeriodRequest,\n ambassadorWixIntakeFormsV1IntakeFormTypes.UpdateIntakeFormExpirationPeriodRequest,\n ambassadorWixIntakeFormsV1IntakeFormUniversalTypes.UpdateIntakeFormExpirationPeriodResponse,\n ambassadorWixIntakeFormsV1IntakeFormTypes.UpdateIntakeFormExpirationPeriodResponse\n> {\n const payload = { intakeFormId: ':intakeFormId' } as any;\n\n const getRequestOptions =\n ambassadorWixIntakeFormsV1IntakeForm.updateIntakeFormExpirationPeriod(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'PATCH',\n path: '/v1/intake-forms/{intakeFormId}',\n pathParams: { intakeFormId: 'intakeFormId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function createCustomerSubmissionLink(): __PublicMethodMetaInfo<\n 'GET',\n { intakeFormId: string },\n ambassadorWixIntakeFormsV1IntakeFormUniversalTypes.CreateCustomerSubmissionLinkRequest,\n ambassadorWixIntakeFormsV1IntakeFormTypes.CreateCustomerSubmissionLinkRequest,\n ambassadorWixIntakeFormsV1IntakeFormUniversalTypes.CreateCustomerSubmissionLinkResponse,\n ambassadorWixIntakeFormsV1IntakeFormTypes.CreateCustomerSubmissionLinkResponse\n> {\n const payload = { intakeFormId: ':intakeFormId' } as any;\n\n const getRequestOptions =\n ambassadorWixIntakeFormsV1IntakeForm.createCustomerSubmissionLink(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/intake-forms/{intakeFormId}/link',\n pathParams: { intakeFormId: 'intakeFormId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function deleteIntakeForm(): __PublicMethodMetaInfo<\n 'DELETE',\n { intakeFormId: string },\n ambassadorWixIntakeFormsV1IntakeFormUniversalTypes.DeleteIntakeFormRequest,\n ambassadorWixIntakeFormsV1IntakeFormTypes.DeleteIntakeFormRequest,\n ambassadorWixIntakeFormsV1IntakeFormUniversalTypes.DeleteIntakeFormResponse,\n ambassadorWixIntakeFormsV1IntakeFormTypes.DeleteIntakeFormResponse\n> {\n const payload = { intakeFormId: ':intakeFormId' } as any;\n\n const getRequestOptions =\n ambassadorWixIntakeFormsV1IntakeForm.deleteIntakeForm(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'DELETE',\n path: '/v1/intake-forms/{intakeFormId}',\n pathParams: { intakeFormId: 'intakeFormId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function archiveIntakeForm(): __PublicMethodMetaInfo<\n 'POST',\n { intakeFormId: string },\n ambassadorWixIntakeFormsV1IntakeFormUniversalTypes.ArchiveIntakeFormRequest,\n ambassadorWixIntakeFormsV1IntakeFormTypes.ArchiveIntakeFormRequest,\n ambassadorWixIntakeFormsV1IntakeFormUniversalTypes.ArchiveIntakeFormResponse,\n ambassadorWixIntakeFormsV1IntakeFormTypes.ArchiveIntakeFormResponse\n> {\n const payload = { intakeFormId: ':intakeFormId' } as any;\n\n const getRequestOptions =\n ambassadorWixIntakeFormsV1IntakeForm.archiveIntakeForm(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/intake-forms/{intakeFormId}/archive',\n pathParams: { intakeFormId: 'intakeFormId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function unarchiveIntakeForm(): __PublicMethodMetaInfo<\n 'POST',\n { intakeFormId: string },\n ambassadorWixIntakeFormsV1IntakeFormUniversalTypes.UnarchiveIntakeFormRequest,\n ambassadorWixIntakeFormsV1IntakeFormTypes.UnarchiveIntakeFormRequest,\n ambassadorWixIntakeFormsV1IntakeFormUniversalTypes.UnarchiveIntakeFormResponse,\n ambassadorWixIntakeFormsV1IntakeFormTypes.UnarchiveIntakeFormResponse\n> {\n const payload = { intakeFormId: ':intakeFormId' } as any;\n\n const getRequestOptions =\n ambassadorWixIntakeFormsV1IntakeForm.unarchiveIntakeForm(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/intake-forms/{intakeFormId}/unarchive',\n pathParams: { intakeFormId: 'intakeFormId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n IntakeForm as IntakeFormOriginal,\n QueryIntakeFormsRequest as QueryIntakeFormsRequestOriginal,\n CursorQuery as CursorQueryOriginal,\n CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal,\n Sorting as SortingOriginal,\n SortOrder as SortOrderOriginal,\n SortOrderWithLiterals as SortOrderWithLiteralsOriginal,\n CursorPaging as CursorPagingOriginal,\n QueryIntakeFormsResponse as QueryIntakeFormsResponseOriginal,\n CursorPagingMetadata as CursorPagingMetadataOriginal,\n Cursors as CursorsOriginal,\n UpdateIntakeFormExpirationPeriodRequest as UpdateIntakeFormExpirationPeriodRequestOriginal,\n UpdateIntakeFormExpirationPeriodResponse as UpdateIntakeFormExpirationPeriodResponseOriginal,\n CreateCustomerSubmissionLinkRequest as CreateCustomerSubmissionLinkRequestOriginal,\n CreateCustomerSubmissionLinkResponse as CreateCustomerSubmissionLinkResponseOriginal,\n DeleteIntakeFormRequest as DeleteIntakeFormRequestOriginal,\n DeleteIntakeFormResponse as DeleteIntakeFormResponseOriginal,\n ArchiveIntakeFormRequest as ArchiveIntakeFormRequestOriginal,\n ArchiveIntakeFormResponse as ArchiveIntakeFormResponseOriginal,\n UnarchiveIntakeFormRequest as UnarchiveIntakeFormRequestOriginal,\n UnarchiveIntakeFormResponse as UnarchiveIntakeFormResponseOriginal,\n DomainEvent as DomainEventOriginal,\n DomainEventBodyOneOf as DomainEventBodyOneOfOriginal,\n EntityCreatedEvent as EntityCreatedEventOriginal,\n RestoreInfo as RestoreInfoOriginal,\n EntityUpdatedEvent as EntityUpdatedEventOriginal,\n EntityDeletedEvent as EntityDeletedEventOriginal,\n ActionEvent as ActionEventOriginal,\n Empty as EmptyOriginal,\n DecryptContactDetailsFromTokenRequest as DecryptContactDetailsFromTokenRequestOriginal,\n DecryptContactDetailsFromTokenResponse as DecryptContactDetailsFromTokenResponseOriginal,\n ContactDetails as ContactDetailsOriginal,\n CreateCustomerSubmissionLinkApplicationErrors as CreateCustomerSubmissionLinkApplicationErrorsOriginal,\n} from './intake-forms-v1-intake-form-intake-forms.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,2BAAAA;AAAA,EAAA,oCAAAC;AAAA,EAAA,wBAAAC;AAAA,EAAA,wBAAAC;AAAA,EAAA,2BAAAC;AAAA,EAAA,wCAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,uBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,6CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QAC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AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,cAAc,eAAe;AAAA,IAC3C,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,uBAOd;AACA,QAAM,UAAU,EAAE,cAAc,gBAAgB;AAEhD,QAAM,oBACiC,oBAAoB,OAAO;AAElE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,cAAc,eAAe;AAAA,IAC3C,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["archiveIntakeForm","createCustomerSubmissionLink","deleteIntakeForm","queryIntakeForms","unarchiveIntakeForm","updateIntakeFormExpirationPeriod","import_rest_modules","payload","SortOrder","queryIntakeForms","updateIntakeFormExpirationPeriod","createCustomerSubmissionLink","deleteIntakeForm","archiveIntakeForm","unarchiveIntakeForm"]}
|
package/build/es/index.d.mts
CHANGED
|
@@ -1,33 +1,13 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
-
import {
|
|
3
|
-
export { ActionEvent, ArchiveIntakeFormRequest, ContactDetails, CreateCustomerSubmissionLinkRequest, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DecryptContactDetailsFromTokenRequest, DecryptContactDetailsFromTokenResponse, DeleteIntakeFormRequest, DeleteIntakeFormResponse, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, IntakeForm, QueryIntakeFormsRequest, RestoreInfo, SortOrder, SortOrderWithLiterals, Sorting, UnarchiveIntakeFormRequest, UpdateIntakeFormExpirationPeriodRequest } from './index.typings.mjs';
|
|
2
|
+
import { UpdateIntakeFormExpirationPeriodOptions, UpdateIntakeFormExpirationPeriodResponse, CreateCustomerSubmissionLinkOptions, CreateCustomerSubmissionLinkResponse, CreateCustomerSubmissionLinkApplicationErrors, ArchiveIntakeFormResponse, UnarchiveIntakeFormResponse, IntakeFormsQueryBuilder, IntakeFormQuery, typedQueryIntakeForms } from './index.typings.mjs';
|
|
3
|
+
export { ActionEvent, ArchiveIntakeFormRequest, CommonQueryWithEntityContext, ContactDetails, CreateCustomerSubmissionLinkRequest, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DecryptContactDetailsFromTokenRequest, DecryptContactDetailsFromTokenResponse, DeleteIntakeFormRequest, DeleteIntakeFormResponse, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, IntakeForm, IntakeFormQuerySpec, IntakeFormsQueryResult, QueryIntakeFormsRequest, QueryIntakeFormsResponse, RestoreInfo, SortOrder, SortOrderWithLiterals, Sorting, UnarchiveIntakeFormRequest, UpdateIntakeFormExpirationPeriodRequest, utils } from './index.typings.mjs';
|
|
4
4
|
|
|
5
|
-
declare function queryIntakeForms$1(httpClient: HttpClient): QueryIntakeFormsSignature;
|
|
6
|
-
interface QueryIntakeFormsSignature {
|
|
7
|
-
/**
|
|
8
|
-
* Retrieves a list of intake forms, with the specified paging, filtering, and sorting.
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* QueryIntakeForms runs with these defaults, which you can override:
|
|
12
|
-
*
|
|
13
|
-
* - `createdDate` is sorted in `DESC` order.
|
|
14
|
-
* - `paging.limit` is `50`.
|
|
15
|
-
* - `paging.offset` is `0`.
|
|
16
|
-
*
|
|
17
|
-
* 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).
|
|
18
|
-
*/
|
|
19
|
-
(options?: QueryIntakeFormsOptions): Promise<NonNullablePaths<QueryIntakeFormsResponse, `intakeForms`, 2>>;
|
|
20
|
-
}
|
|
21
5
|
declare function updateIntakeFormExpirationPeriod$1(httpClient: HttpClient): UpdateIntakeFormExpirationPeriodSignature;
|
|
22
6
|
interface UpdateIntakeFormExpirationPeriodSignature {
|
|
23
7
|
/**
|
|
24
8
|
* Updates the expiration period of a specific intake form.
|
|
25
9
|
*
|
|
26
10
|
* When you update the expiration period, the system recalculates expiration for all existing submissions.
|
|
27
|
-
*
|
|
28
|
-
* Each time the intake form is updated, `revision` increments by 1.
|
|
29
|
-
* You must specify the current `revision` when updating the intake form.
|
|
30
|
-
* This ensures you're working with the latest intake form and prevents unintended overwrites.
|
|
31
11
|
* @param - Intake form ID.
|
|
32
12
|
*/
|
|
33
13
|
(intakeFormId: string, options?: NonNullablePaths<UpdateIntakeFormExpirationPeriodOptions, `formRevision`, 2>): Promise<UpdateIntakeFormExpirationPeriodResponse>;
|
|
@@ -52,8 +32,8 @@ interface DeleteIntakeFormSignature {
|
|
|
52
32
|
*
|
|
53
33
|
* Also deletes the underlying [Wix form](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/introduction).
|
|
54
34
|
*
|
|
55
|
-
* Existing [submissions](https://dev.wix.com/docs/api-reference/crm/forms/other-services/intake-form-submissions/introduction) for the intake form aren't automatically deleted but become orphaned.
|
|
56
|
-
* When [querying submissions](https://dev.wix.com/docs/api-reference/crm/forms/other-services/intake-form-submissions/query-intake-form-submissions), orphaned submissions aren't returned.
|
|
35
|
+
* 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.
|
|
36
|
+
* 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.
|
|
57
37
|
* @param - Intake form ID.
|
|
58
38
|
*/
|
|
59
39
|
(intakeFormId: string): Promise<void>;
|
|
@@ -63,11 +43,7 @@ interface ArchiveIntakeFormSignature {
|
|
|
63
43
|
/**
|
|
64
44
|
* Archives an intake form, disabling it from accepting new submissions.
|
|
65
45
|
*
|
|
66
|
-
* Existing submissions remain accessible. You can [unarchive](https://dev.wix.com/docs/api-reference/crm/forms/other-services/intake-forms/unarchive-intake-form) the form later to resume accepting submissions.
|
|
67
|
-
*
|
|
68
|
-
* Each time the intake form is updated, `revision` increments by 1.
|
|
69
|
-
* You must specify the current `revision` when updating the intake form.
|
|
70
|
-
* This ensures you're working with the latest intake form and prevents unintended overwrites.
|
|
46
|
+
* 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.
|
|
71
47
|
* @param - Intake form ID.
|
|
72
48
|
* @param - Revision number, which increments by 1 each time the intake form is updated.
|
|
73
49
|
* To prevent conflicting changes, you must specify the current revision when updating the intake form.
|
|
@@ -78,11 +54,6 @@ declare function unarchiveIntakeForm$1(httpClient: HttpClient): UnarchiveIntakeF
|
|
|
78
54
|
interface UnarchiveIntakeFormSignature {
|
|
79
55
|
/**
|
|
80
56
|
* Unarchives an intake form, enabling it to accept new submissions.
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
* Each time the intake form is updated, `revision` increments by 1.
|
|
84
|
-
* You must specify the current `revision` when updating the intake form.
|
|
85
|
-
* This ensures you're working with the latest intake form and prevents unintended overwrites.
|
|
86
57
|
* @param - Intake form ID.
|
|
87
58
|
* @param - Revision number, which increments by 1 each time the intake form is updated.
|
|
88
59
|
* To prevent conflicting changes, you must specify the current revision when updating the intake form.
|
|
@@ -90,11 +61,15 @@ interface UnarchiveIntakeFormSignature {
|
|
|
90
61
|
(intakeFormId: string, formRevision: string): Promise<UnarchiveIntakeFormResponse>;
|
|
91
62
|
}
|
|
92
63
|
|
|
93
|
-
declare
|
|
64
|
+
declare function customQueryIntakeForms(httpClient: HttpClient): {
|
|
65
|
+
(): IntakeFormsQueryBuilder;
|
|
66
|
+
(query: IntakeFormQuery): ReturnType<typeof typedQueryIntakeForms>;
|
|
67
|
+
};
|
|
94
68
|
declare const updateIntakeFormExpirationPeriod: MaybeContext<BuildRESTFunction<typeof updateIntakeFormExpirationPeriod$1> & typeof updateIntakeFormExpirationPeriod$1>;
|
|
95
69
|
declare const createCustomerSubmissionLink: MaybeContext<BuildRESTFunction<typeof createCustomerSubmissionLink$1> & typeof createCustomerSubmissionLink$1>;
|
|
96
70
|
declare const deleteIntakeForm: MaybeContext<BuildRESTFunction<typeof deleteIntakeForm$1> & typeof deleteIntakeForm$1>;
|
|
97
71
|
declare const archiveIntakeForm: MaybeContext<BuildRESTFunction<typeof archiveIntakeForm$1> & typeof archiveIntakeForm$1>;
|
|
98
72
|
declare const unarchiveIntakeForm: MaybeContext<BuildRESTFunction<typeof unarchiveIntakeForm$1> & typeof unarchiveIntakeForm$1>;
|
|
73
|
+
declare const queryIntakeForms: MaybeContext<BuildRESTFunction<typeof customQueryIntakeForms> & typeof customQueryIntakeForms>;
|
|
99
74
|
|
|
100
|
-
export { ArchiveIntakeFormResponse, CreateCustomerSubmissionLinkApplicationErrors, CreateCustomerSubmissionLinkOptions, CreateCustomerSubmissionLinkResponse,
|
|
75
|
+
export { ArchiveIntakeFormResponse, CreateCustomerSubmissionLinkApplicationErrors, CreateCustomerSubmissionLinkOptions, CreateCustomerSubmissionLinkResponse, IntakeFormQuery, IntakeFormsQueryBuilder, UnarchiveIntakeFormResponse, UpdateIntakeFormExpirationPeriodOptions, UpdateIntakeFormExpirationPeriodResponse, archiveIntakeForm, createCustomerSubmissionLink, deleteIntakeForm, queryIntakeForms, unarchiveIntakeForm, updateIntakeFormExpirationPeriod };
|
package/build/es/index.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// src/intake-forms-v1-intake-form-intake-forms.universal.ts
|
|
2
2
|
import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
|
|
3
|
+
import { queryBuilder } from "@wix/sdk-runtime/query-builder";
|
|
3
4
|
import {
|
|
4
5
|
renameKeysFromSDKRequestToRESTRequest,
|
|
5
6
|
renameKeysFromRESTResponseToSDKResponse
|
|
@@ -240,16 +241,59 @@ function unarchiveIntakeForm(payload) {
|
|
|
240
241
|
}
|
|
241
242
|
|
|
242
243
|
// src/intake-forms-v1-intake-form-intake-forms.universal.ts
|
|
244
|
+
import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
245
|
+
import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
|
|
243
246
|
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
244
247
|
SortOrder2["ASC"] = "ASC";
|
|
245
248
|
SortOrder2["DESC"] = "DESC";
|
|
246
249
|
return SortOrder2;
|
|
247
250
|
})(SortOrder || {});
|
|
248
|
-
|
|
249
|
-
const { httpClient, sideEffects } = arguments[
|
|
250
|
-
|
|
251
|
-
|
|
251
|
+
function queryIntakeForms2() {
|
|
252
|
+
const { httpClient, sideEffects } = arguments[0];
|
|
253
|
+
return queryBuilder({
|
|
254
|
+
func: async (payload) => {
|
|
255
|
+
const reqOpts = queryIntakeForms(payload);
|
|
256
|
+
sideEffects?.onSiteCall?.();
|
|
257
|
+
try {
|
|
258
|
+
const result = await httpClient.request(reqOpts);
|
|
259
|
+
sideEffects?.onSuccess?.(result);
|
|
260
|
+
return result;
|
|
261
|
+
} catch (err) {
|
|
262
|
+
sideEffects?.onError?.(err);
|
|
263
|
+
throw err;
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
requestTransformer: (query) => {
|
|
267
|
+
const args = [query, {}];
|
|
268
|
+
return renameKeysFromSDKRequestToRESTRequest({
|
|
269
|
+
...args?.[1],
|
|
270
|
+
query: args?.[0]
|
|
271
|
+
});
|
|
272
|
+
},
|
|
273
|
+
responseTransformer: ({ data }) => {
|
|
274
|
+
const transformedData = renameKeysFromRESTResponseToSDKResponse(
|
|
275
|
+
transformPaths2(data, [])
|
|
276
|
+
);
|
|
277
|
+
return {
|
|
278
|
+
items: transformedData?.intakeForms,
|
|
279
|
+
pagingMetadata: transformedData?.pagingMetadata
|
|
280
|
+
};
|
|
281
|
+
},
|
|
282
|
+
errorTransformer: (err) => {
|
|
283
|
+
const transformedError = sdkTransformError(err, {
|
|
284
|
+
spreadPathsToArguments: {},
|
|
285
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
286
|
+
singleArgumentUnchanged: false
|
|
287
|
+
});
|
|
288
|
+
throw transformedError;
|
|
289
|
+
},
|
|
290
|
+
pagingMethod: "CURSOR",
|
|
291
|
+
transformationPaths: {}
|
|
252
292
|
});
|
|
293
|
+
}
|
|
294
|
+
async function typedQueryIntakeForms(query) {
|
|
295
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
296
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ query });
|
|
253
297
|
const reqOpts = queryIntakeForms(payload);
|
|
254
298
|
sideEffects?.onSiteCall?.();
|
|
255
299
|
try {
|
|
@@ -261,15 +305,20 @@ async function queryIntakeForms2(options) {
|
|
|
261
305
|
err,
|
|
262
306
|
{
|
|
263
307
|
spreadPathsToArguments: {},
|
|
264
|
-
explicitPathsToArguments: { query: "$[0]
|
|
308
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
265
309
|
singleArgumentUnchanged: false
|
|
266
310
|
},
|
|
267
|
-
["
|
|
311
|
+
["query"]
|
|
268
312
|
);
|
|
269
313
|
sideEffects?.onError?.(err);
|
|
270
314
|
throw transformedError;
|
|
271
315
|
}
|
|
272
316
|
}
|
|
317
|
+
var utils = {
|
|
318
|
+
query: {
|
|
319
|
+
...createQueryUtils()
|
|
320
|
+
}
|
|
321
|
+
};
|
|
273
322
|
async function updateIntakeFormExpirationPeriod2(intakeFormId, options) {
|
|
274
323
|
const { httpClient, sideEffects } = arguments[2];
|
|
275
324
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -417,8 +466,14 @@ async function unarchiveIntakeForm2(intakeFormId, formRevision) {
|
|
|
417
466
|
|
|
418
467
|
// src/intake-forms-v1-intake-form-intake-forms.public.ts
|
|
419
468
|
function queryIntakeForms3(httpClient) {
|
|
420
|
-
return (
|
|
421
|
-
|
|
469
|
+
return () => queryIntakeForms2(
|
|
470
|
+
// @ts-ignore
|
|
471
|
+
{ httpClient }
|
|
472
|
+
);
|
|
473
|
+
}
|
|
474
|
+
function typedQueryIntakeForms2(httpClient) {
|
|
475
|
+
return (query) => typedQueryIntakeForms(
|
|
476
|
+
query,
|
|
422
477
|
// @ts-ignore
|
|
423
478
|
{ httpClient }
|
|
424
479
|
);
|
|
@@ -465,12 +520,24 @@ function unarchiveIntakeForm3(httpClient) {
|
|
|
465
520
|
|
|
466
521
|
// src/intake-forms-v1-intake-form-intake-forms.context.ts
|
|
467
522
|
import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
|
|
468
|
-
|
|
523
|
+
import { createQueryOverloadRouter } from "@wix/sdk-runtime/query-method-router";
|
|
524
|
+
function customQueryIntakeForms(httpClient) {
|
|
525
|
+
const router = createQueryOverloadRouter({
|
|
526
|
+
builderQueryFunction: () => queryIntakeForms3(httpClient)(),
|
|
527
|
+
typedQueryFunction: (query) => typedQueryIntakeForms2(httpClient)(query),
|
|
528
|
+
hasOptionsParameter: false
|
|
529
|
+
});
|
|
530
|
+
function overloadedQuery(query) {
|
|
531
|
+
return router(...arguments);
|
|
532
|
+
}
|
|
533
|
+
return overloadedQuery;
|
|
534
|
+
}
|
|
469
535
|
var updateIntakeFormExpirationPeriod4 = /* @__PURE__ */ createRESTModule(updateIntakeFormExpirationPeriod3);
|
|
470
536
|
var createCustomerSubmissionLink4 = /* @__PURE__ */ createRESTModule(createCustomerSubmissionLink3);
|
|
471
537
|
var deleteIntakeForm4 = /* @__PURE__ */ createRESTModule(deleteIntakeForm3);
|
|
472
538
|
var archiveIntakeForm4 = /* @__PURE__ */ createRESTModule(archiveIntakeForm3);
|
|
473
539
|
var unarchiveIntakeForm4 = /* @__PURE__ */ createRESTModule(unarchiveIntakeForm3);
|
|
540
|
+
var queryIntakeForms4 = /* @__PURE__ */ createRESTModule(customQueryIntakeForms);
|
|
474
541
|
export {
|
|
475
542
|
SortOrder,
|
|
476
543
|
archiveIntakeForm4 as archiveIntakeForm,
|
|
@@ -478,6 +545,7 @@ export {
|
|
|
478
545
|
deleteIntakeForm4 as deleteIntakeForm,
|
|
479
546
|
queryIntakeForms4 as queryIntakeForms,
|
|
480
547
|
unarchiveIntakeForm4 as unarchiveIntakeForm,
|
|
481
|
-
updateIntakeFormExpirationPeriod4 as updateIntakeFormExpirationPeriod
|
|
548
|
+
updateIntakeFormExpirationPeriod4 as updateIntakeFormExpirationPeriod,
|
|
549
|
+
utils
|
|
482
550
|
};
|
|
483
551
|
//# sourceMappingURL=index.mjs.map
|