@wix/auto_sdk_async-jobs_async-jobs 1.0.21 → 1.0.22
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.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -1
- 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.mjs.map +1 -1
- package/build/es/index.typings.d.mts +1 -1
- 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.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +1 -1
- 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.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +1 -1
- 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 +2 -2
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts","../../src/infra-asyncjobs-v1-async-job-async-jobs.universal.ts","../../src/infra-asyncjobs-v1-async-job-async-jobs.http.ts","../../src/infra-asyncjobs-v1-async-job-async-jobs.public.ts","../../src/infra-asyncjobs-v1-async-job-async-jobs.context.ts"],"sourcesContent":["export * from './src/infra-asyncjobs-v1-async-job-async-jobs.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixInfraAsyncjobsV1AsyncJob from './infra-asyncjobs-v1-async-job-async-jobs.http.js';\n\nexport interface AsyncJob {\n /**\n * Job ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /** Optional job metadata, used to store any parameters used during job execution, user-defined statuses, etc. */\n metadata?: Record<string, any> | null;\n /** Current job execution status. */\n status?: StatusWithLiterals;\n /**\n * Current counters.\n * @deprecated Current counters.\n * @replacedBy wix.infra.asyncjobs.v1.AsyncJob.counts\n * @targetRemovalDate 2024-12-12\n */\n counters?: Counters;\n /**\n * Date and time the job was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the job was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Job owner.\n * @readonly\n * @deprecated Job owner.\n * @replacedBy wix.infra.asyncjobs.v1.AsyncJob.created_by\n * @targetRemovalDate 2024-12-12\n */\n owner?: Owner;\n /**\n * Job creator.\n * @readonly\n */\n createdBy?: CreatedBy;\n /** Current execution counts. */\n counts?: Counts;\n}\n\nexport enum Type {\n UNKNOWN_TYPE = 'UNKNOWN_TYPE',\n /** Job was created by a site visitor that was **not** logged in. */\n ANONYMOUS_VISITOR_ID = 'ANONYMOUS_VISITOR_ID',\n /** Job was created by a **logged in** site visitor. */\n MEMBER_ID = 'MEMBER_ID',\n /** Job was created by a Wix user. */\n WIX_USER_ID = 'WIX_USER_ID',\n /** Job was created by an external app or app by Wix. */\n APP_ID = 'APP_ID',\n}\n\n/** @enumType */\nexport type TypeWithLiterals =\n | Type\n | 'UNKNOWN_TYPE'\n | 'ANONYMOUS_VISITOR_ID'\n | 'MEMBER_ID'\n | 'WIX_USER_ID'\n | 'APP_ID';\n\nexport interface AnonymousVisitorIdOptions {\n /**\n * Visitor ID - When the job is owned by a site visitor that was **not** logged in.\n * @format GUID\n */\n anonymousVisitorId?: string;\n}\n\nexport interface MemberIdOptions {\n /**\n * Member ID - When the job is owned by a by a **logged in** site visitor.\n * @format GUID\n */\n memberId?: string;\n}\n\nexport interface WixUserIdOptions {\n /**\n * User ID - When the job is owned by a site owner or contributor.\n * @format GUID\n */\n wixUserId?: string;\n}\n\nexport interface AppIdOptions {\n /**\n * App ID - When the job is owned by an external app. or app by Wix.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum Status {\n UNKNOWN = 'UNKNOWN',\n /** Job is created, but hasn't started yet. */\n INITIALIZED = 'INITIALIZED',\n /** Job has started and is in progress. */\n PROCESSING = 'PROCESSING',\n /** Job is finished. */\n FINISHED = 'FINISHED',\n /** Job has failed. */\n FAILED = 'FAILED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals =\n | Status\n | 'UNKNOWN'\n | 'INITIALIZED'\n | 'PROCESSING'\n | 'FINISHED'\n | 'FAILED';\n\nexport interface Counters {\n /** Optional count of the dataset size, as specified during job creation. Can be used for progress bars, etc. */\n itemsToProcess?: number | null;\n /** Amount of items that were successfully processed. */\n itemsSucceeded?: number;\n /** Amount of items whose processing failed. */\n itemsFailed?: number;\n /** Mapping between an error code and the number of failures associated with it. */\n errorCountByCode?: Record<string, number>;\n}\n\nexport interface Owner extends OwnerIdOneOf {\n /**\n * Visitor ID - when the job is owned by a site visitor that was **not** logged in.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * Member ID - When the job is owned by a by a **logged in** site visitor.\n * @format GUID\n */\n memberId?: string;\n /**\n * User ID - When the job is owned by a Wix user.\n * @format GUID\n */\n wixUserId?: string;\n /**\n * App ID - When the job is owned by an external app or app by Wix.\n * @format GUID\n */\n appId?: string;\n /**\n * Service ID.\n * @format GUID\n */\n serviceId?: string;\n}\n\n/** @oneof */\nexport interface OwnerIdOneOf {\n /**\n * Visitor ID - when the job is owned by a site visitor that was **not** logged in.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * Member ID - When the job is owned by a by a **logged in** site visitor.\n * @format GUID\n */\n memberId?: string;\n /**\n * User ID - When the job is owned by a Wix user.\n * @format GUID\n */\n wixUserId?: string;\n /**\n * App ID - When the job is owned by an external app or app by Wix.\n * @format GUID\n */\n appId?: string;\n /**\n * Service ID.\n * @format GUID\n */\n serviceId?: string;\n}\n\nexport interface CreatedBy extends CreatedByOptionsOneOf {\n /** Visitor ID - when the job is created by a site visitor that was **not** logged in. */\n anonymousVisitorIdOptions?: AnonymousVisitorIdOptions;\n /** Member ID - When the job is created by a by a **logged in** site visitor. */\n memberIdOptions?: MemberIdOptions;\n /** User ID - When the job is created by a Wix user. */\n wixUserIdOptions?: WixUserIdOptions;\n /** App ID - When the job is created by an external app or app by Wix. */\n appIdOptions?: AppIdOptions;\n /** The type of the creator. */\n type?: TypeWithLiterals;\n}\n\n/** @oneof */\nexport interface CreatedByOptionsOneOf {\n /** Visitor ID - when the job is created by a site visitor that was **not** logged in. */\n anonymousVisitorIdOptions?: AnonymousVisitorIdOptions;\n /** Member ID - When the job is created by a by a **logged in** site visitor. */\n memberIdOptions?: MemberIdOptions;\n /** User ID - When the job is created by a Wix user. */\n wixUserIdOptions?: WixUserIdOptions;\n /** App ID - When the job is created by an external app or app by Wix. */\n appIdOptions?: AppIdOptions;\n}\n\nexport interface Counts {\n /** Optional count of the dataset size, specified during job creation. Can be used for progress bars, etc. */\n total?: number | null;\n /** Amount of items that were successfully processed. */\n successCount?: number;\n /** Amount of items whose processing failed. */\n failCount?: number;\n /** Mapping between an error code and the number of failures associated with it. */\n errorByCodeCount?: Record<string, number>;\n}\n\n/** Events */\nexport interface AsyncJobFinishedEvent {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface AsyncJobFailedEvent {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface AsyncJobItemFailedEvent {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n /** Job items. */\n jobItem?: AsyncJobItem;\n}\n\nexport interface AsyncJobItem {\n /**\n * Job item ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /** Job item data, as passed by the originating service. */\n data?: Record<string, any> | null;\n /**\n * ID of the entity being processed, as passed by the originating service.\n * @minLength 1\n * @maxLength 128\n * @immutable\n */\n entityId?: string | null;\n /**\n * Whether the job item was processed successfully.\n * @readonly\n */\n success?: boolean;\n /**\n * Error that prevented the item from being processed, if relevant.\n * @immutable\n */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface CreateAsyncJobRequest {\n /** Job to create. */\n job?: AsyncJob;\n}\n\nexport interface CreateAsyncJobResponse {\n /** Created job. */\n job?: AsyncJob;\n}\n\nexport interface GetAsyncJobRequest {\n /**\n * Job ID.\n * @format GUID\n */\n jobId: string;\n}\n\nexport interface GetAsyncJobResponse {\n /** Returned job. */\n job?: AsyncJob;\n}\n\nexport interface UpdateAsyncJobRequest {\n /** Job to update. */\n job?: AsyncJob;\n}\n\nexport interface UpdateAsyncJobResponse {\n /** Updated job. */\n job?: AsyncJob;\n}\n\nexport interface DeleteAsyncJobRequest {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface DeleteAsyncJobResponse {}\n\nexport interface CompleteAsyncJobRequest {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n /** Job status. */\n status?: CompleteStatusWithLiterals;\n}\n\nexport enum CompleteStatus {\n /** Job is finished. */\n FINISHED = 'FINISHED',\n /** Job has failed. */\n FAILED = 'FAILED',\n}\n\n/** @enumType */\nexport type CompleteStatusWithLiterals = CompleteStatus | 'FINISHED' | 'FAILED';\n\nexport interface CompleteAsyncJobResponse {}\n\nexport interface ReportAsyncJobProgressRequest {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n /**\n * Job items being reported.\n * @maxSize 1000\n */\n items?: AsyncJobItem[];\n}\n\nexport interface ReportAsyncJobProgressResponse {}\n\nexport interface AsyncJobItemAddedEvent {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n /** Job items. */\n jobItem?: AsyncJobItem;\n}\n\nexport interface ListAsyncJobItemsRequest {\n /**\n * Job ID.\n * @format GUID\n */\n jobId: string;\n /** Pagination options. */\n paging?: CursorPaging;\n /** async job item status filter. */\n statusFilter?: StatusFilterWithLiterals;\n}\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 enum StatusFilter {\n /** Return all items. */\n ALL = 'ALL',\n /** Return only failed items. */\n FAILED_ONLY = 'FAILED_ONLY',\n /** Return only successful items. */\n SUCCESSFUL_ONLY = 'SUCCESSFUL_ONLY',\n}\n\n/** @enumType */\nexport type StatusFilterWithLiterals =\n | StatusFilter\n | 'ALL'\n | 'FAILED_ONLY'\n | 'SUCCESSFUL_ONLY';\n\nexport interface ListAsyncJobItemsResponse {\n /** Job items. */\n results?: AsyncJobItem[];\n /** Paging metadata. */\n pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n}\n\nexport interface Cursors {\n /**\n * Cursor pointing to next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\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 MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/**\n * Retrieves a job.\n * @param jobId - Job ID.\n * @public\n * @requiredField jobId\n * @permissionId INFRA.ASYNC_JOB_READ\n * @applicableIdentity APP\n * @returns Returned job.\n * @fqn wix.infra.asyncjobs.v1.AsyncJobService.GetAsyncJob\n */\nexport async function getAsyncJob(\n jobId: string\n): Promise<\n NonNullablePaths<\n AsyncJob,\n | `_id`\n | `status`\n | `counters.itemsSucceeded`\n | `counters.itemsFailed`\n | `owner.anonymousVisitorId`\n | `owner.memberId`\n | `owner.wixUserId`\n | `owner.appId`\n | `owner.serviceId`\n | `createdBy.anonymousVisitorIdOptions.anonymousVisitorId`\n | `createdBy.memberIdOptions.memberId`\n | `createdBy.wixUserIdOptions.wixUserId`\n | `createdBy.appIdOptions.appId`\n | `createdBy.type`\n | `counts.successCount`\n | `counts.failCount`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ jobId: jobId });\n\n const reqOpts = ambassadorWixInfraAsyncjobsV1AsyncJob.getAsyncJob(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.job!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { jobId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['jobId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of job items.\n * @param jobId - Job ID.\n * @public\n * @requiredField jobId\n * @param options - Field options.\n * @permissionId INFRA.ASYNC_JOB_READ\n * @applicableIdentity APP\n * @fqn wix.infra.asyncjobs.v1.AsyncJobService.ListAsyncJobItems\n */\nexport async function listAsyncJobItems(\n jobId: string,\n options?: ListAsyncJobItemsOptions\n): Promise<\n NonNullablePaths<\n ListAsyncJobItemsResponse,\n | `results`\n | `results.${number}._id`\n | `results.${number}.success`\n | `results.${number}.error.code`\n | `results.${number}.error.description`,\n 5\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 jobId: jobId,\n paging: options?.paging,\n statusFilter: options?.statusFilter,\n });\n\n const reqOpts =\n ambassadorWixInfraAsyncjobsV1AsyncJob.listAsyncJobItems(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 jobId: '$[0]',\n paging: '$[1].paging',\n statusFilter: '$[1].statusFilter',\n },\n singleArgumentUnchanged: false,\n },\n ['jobId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListAsyncJobItemsOptions {\n /** Pagination options. */\n paging?: CursorPaging;\n /** async job item status filter. */\n statusFilter?: StatusFilterWithLiterals;\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 resolveWixInfraAsyncjobsV1AsyncJobServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/async-job-service',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/async-jobs',\n destPath: '/v1/async-jobs',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/async-jobs',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/async-jobs',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/async-jobs',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/async-jobs',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/async-jobs',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/async-jobs',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/async-job-service',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/async-job-service',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/async-job-service',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_async-jobs_async-jobs';\n\n/** Retrieves a job. */\nexport function getAsyncJob(payload: object): RequestOptionsFactory<any> {\n function __getAsyncJob({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.infra.asyncjobs.v1.async_job',\n method: 'GET' as any,\n methodFqn: 'wix.infra.asyncjobs.v1.AsyncJobService.GetAsyncJob',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInfraAsyncjobsV1AsyncJobServiceUrl({\n protoPath: '/v1/async-jobs/{jobId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'job.createdDate' }, { path: 'job.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getAsyncJob;\n}\n\n/** Retrieves a list of job items. */\nexport function listAsyncJobItems(payload: object): RequestOptionsFactory<any> {\n function __listAsyncJobItems({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.infra.asyncjobs.v1.async_job',\n method: 'GET' as any,\n methodFqn: 'wix.infra.asyncjobs.v1.AsyncJobService.ListAsyncJobItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInfraAsyncjobsV1AsyncJobServiceUrl({\n protoPath: '/v1/async-jobs/{jobId}/items',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listAsyncJobItems;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n AsyncJob,\n ListAsyncJobItemsOptions,\n ListAsyncJobItemsResponse,\n getAsyncJob as universalGetAsyncJob,\n listAsyncJobItems as universalListAsyncJobItems,\n} from './infra-asyncjobs-v1-async-job-async-jobs.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/async-jobs' };\n\nexport function getAsyncJob(httpClient: HttpClient): GetAsyncJobSignature {\n return (jobId: string) =>\n universalGetAsyncJob(\n jobId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetAsyncJobSignature {\n /**\n * Retrieves a job.\n * @param - Job ID.\n * @returns Returned job.\n */\n (jobId: string): Promise<\n NonNullablePaths<\n AsyncJob,\n | `_id`\n | `status`\n | `counters.itemsSucceeded`\n | `counters.itemsFailed`\n | `owner.anonymousVisitorId`\n | `owner.memberId`\n | `owner.wixUserId`\n | `owner.appId`\n | `owner.serviceId`\n | `createdBy.anonymousVisitorIdOptions.anonymousVisitorId`\n | `createdBy.memberIdOptions.memberId`\n | `createdBy.wixUserIdOptions.wixUserId`\n | `createdBy.appIdOptions.appId`\n | `createdBy.type`\n | `counts.successCount`\n | `counts.failCount`,\n 4\n >\n >;\n}\n\nexport function listAsyncJobItems(\n httpClient: HttpClient\n): ListAsyncJobItemsSignature {\n return (jobId: string, options?: ListAsyncJobItemsOptions) =>\n universalListAsyncJobItems(\n jobId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListAsyncJobItemsSignature {\n /**\n * Retrieves a list of job items.\n * @param - Job ID.\n * @param - Field options.\n */\n (jobId: string, options?: ListAsyncJobItemsOptions): Promise<\n NonNullablePaths<\n ListAsyncJobItemsResponse,\n | `results`\n | `results.${number}._id`\n | `results.${number}.success`\n | `results.${number}.error.code`\n | `results.${number}.error.description`,\n 5\n >\n >;\n}\n\nexport {\n AccountInfo,\n ActionEvent,\n AnonymousVisitorIdOptions,\n AppIdOptions,\n ApplicationError,\n AsyncJob,\n AsyncJobFailedEvent,\n AsyncJobFinishedEvent,\n AsyncJobItem,\n AsyncJobItemAddedEvent,\n AsyncJobItemFailedEvent,\n CompleteAsyncJobRequest,\n CompleteAsyncJobResponse,\n CompleteStatus,\n Counters,\n Counts,\n CreateAsyncJobRequest,\n CreateAsyncJobResponse,\n CreatedBy,\n CreatedByOptionsOneOf,\n CursorPaging,\n Cursors,\n DeleteAsyncJobRequest,\n DeleteAsyncJobResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n GetAsyncJobRequest,\n GetAsyncJobResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n ListAsyncJobItemsOptions,\n ListAsyncJobItemsRequest,\n ListAsyncJobItemsResponse,\n MemberIdOptions,\n MessageEnvelope,\n Owner,\n OwnerIdOneOf,\n PagingMetadataV2,\n ReportAsyncJobProgressRequest,\n ReportAsyncJobProgressResponse,\n RestoreInfo,\n Status,\n StatusFilter,\n Type,\n UpdateAsyncJobRequest,\n UpdateAsyncJobResponse,\n WebhookIdentityType,\n WixUserIdOptions,\n} from './infra-asyncjobs-v1-async-job-async-jobs.universal.js';\n","import {\n getAsyncJob as publicGetAsyncJob,\n listAsyncJobItems as publicListAsyncJobItems,\n} from './infra-asyncjobs-v1-async-job-async-jobs.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getAsyncJob: MaybeContext<\n BuildRESTFunction<typeof publicGetAsyncJob> & typeof publicGetAsyncJob\n> = /*#__PURE__*/ createRESTModule(publicGetAsyncJob);\nexport const listAsyncJobItems: MaybeContext<\n BuildRESTFunction<typeof publicListAsyncJobItems> &\n typeof publicListAsyncJobItems\n> = /*#__PURE__*/ createRESTModule(publicListAsyncJobItems);\n\nexport {\n Type,\n Status,\n CompleteStatus,\n StatusFilter,\n WebhookIdentityType,\n} from './infra-asyncjobs-v1-async-job-async-jobs.universal.js';\nexport {\n AsyncJob,\n AnonymousVisitorIdOptions,\n MemberIdOptions,\n WixUserIdOptions,\n AppIdOptions,\n Counters,\n Owner,\n OwnerIdOneOf,\n CreatedBy,\n CreatedByOptionsOneOf,\n Counts,\n AsyncJobFinishedEvent,\n AsyncJobFailedEvent,\n AsyncJobItemFailedEvent,\n AsyncJobItem,\n ApplicationError,\n CreateAsyncJobRequest,\n CreateAsyncJobResponse,\n GetAsyncJobRequest,\n GetAsyncJobResponse,\n UpdateAsyncJobRequest,\n UpdateAsyncJobResponse,\n DeleteAsyncJobRequest,\n DeleteAsyncJobResponse,\n CompleteAsyncJobRequest,\n CompleteAsyncJobResponse,\n ReportAsyncJobProgressRequest,\n ReportAsyncJobProgressResponse,\n AsyncJobItemAddedEvent,\n ListAsyncJobItemsRequest,\n CursorPaging,\n ListAsyncJobItemsResponse,\n PagingMetadataV2,\n Cursors,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n ListAsyncJobItemsOptions,\n} from './infra-asyncjobs-v1-async-job-async-jobs.universal.js';\nexport {\n TypeWithLiterals,\n StatusWithLiterals,\n CompleteStatusWithLiterals,\n StatusFilterWithLiterals,\n WebhookIdentityTypeWithLiterals,\n} from './infra-asyncjobs-v1-async-job-async-jobs.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAAA;AAAA,EAAA,yBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,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AAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAD;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,cAAc;AAAA,QAChB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS,SAAS;AAAA,IACrB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AE1uBO,SAASE,aAAY,YAA8C;AACxE,SAAO,CAAC,UACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAgCO,SAASC,mBACd,YAC4B;AAC5B,SAAO,CAAC,OAAe,YACrBA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACxDA,IAAAC,uBAAiC;AAG1B,IAAMC,eAEK,2DAAiBA,YAAiB;AAC7C,IAAMC,qBAGK,2DAAiBA,kBAAuB;","names":["getAsyncJob","listAsyncJobItems","import_rest_modules","payload","Type","Status","CompleteStatus","StatusFilter","WebhookIdentityType","getAsyncJob","sdkTransformError","listAsyncJobItems","getAsyncJob","listAsyncJobItems","import_rest_modules","getAsyncJob","listAsyncJobItems"]}
|
|
1
|
+
{"version":3,"sources":["../../index.ts","../../src/infra-asyncjobs-v1-async-job-async-jobs.universal.ts","../../src/infra-asyncjobs-v1-async-job-async-jobs.http.ts","../../src/infra-asyncjobs-v1-async-job-async-jobs.public.ts","../../src/infra-asyncjobs-v1-async-job-async-jobs.context.ts"],"sourcesContent":["export * from './src/infra-asyncjobs-v1-async-job-async-jobs.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixInfraAsyncjobsV1AsyncJob from './infra-asyncjobs-v1-async-job-async-jobs.http.js';\n\nexport interface AsyncJob {\n /**\n * Job ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /** Optional job metadata, used to store any parameters used during job execution, user-defined statuses, etc. */\n metadata?: Record<string, any> | null;\n /** Current job execution status. */\n status?: StatusWithLiterals;\n /**\n * Current counters.\n * @deprecated Current counters.\n * @replacedBy wix.infra.asyncjobs.v1.AsyncJob.counts\n * @targetRemovalDate 2024-12-12\n */\n counters?: Counters;\n /**\n * Date and time the job was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the job was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Job owner.\n * @readonly\n * @deprecated Job owner.\n * @replacedBy wix.infra.asyncjobs.v1.AsyncJob.created_by\n * @targetRemovalDate 2024-12-12\n */\n owner?: Owner;\n /**\n * Job creator.\n * @readonly\n */\n createdBy?: CreatedBy;\n /** Current execution counts. */\n counts?: Counts;\n}\n\nexport enum Type {\n UNKNOWN_TYPE = 'UNKNOWN_TYPE',\n /** Job was created by a site visitor that was **not** logged in. */\n ANONYMOUS_VISITOR_ID = 'ANONYMOUS_VISITOR_ID',\n /** Job was created by a **logged in** site visitor. */\n MEMBER_ID = 'MEMBER_ID',\n /** Job was created by a Wix user. */\n WIX_USER_ID = 'WIX_USER_ID',\n /** Job was created by an external app or app by Wix. */\n APP_ID = 'APP_ID',\n}\n\n/** @enumType */\nexport type TypeWithLiterals =\n | Type\n | 'UNKNOWN_TYPE'\n | 'ANONYMOUS_VISITOR_ID'\n | 'MEMBER_ID'\n | 'WIX_USER_ID'\n | 'APP_ID';\n\nexport interface AnonymousVisitorIdOptions {\n /**\n * Visitor ID - When the job is owned by a site visitor that was **not** logged in.\n * @format GUID\n */\n anonymousVisitorId?: string;\n}\n\nexport interface MemberIdOptions {\n /**\n * Member ID - When the job is owned by a by a **logged in** site visitor.\n * @format GUID\n */\n memberId?: string;\n}\n\nexport interface WixUserIdOptions {\n /**\n * User ID - When the job is owned by a site owner or contributor.\n * @format GUID\n */\n wixUserId?: string;\n}\n\nexport interface AppIdOptions {\n /**\n * App ID - When the job is owned by an external app. or app by Wix.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum Status {\n UNKNOWN = 'UNKNOWN',\n /** Job is created, but hasn't started yet. */\n INITIALIZED = 'INITIALIZED',\n /** Job has started and is in progress. */\n PROCESSING = 'PROCESSING',\n /** Job is finished. */\n FINISHED = 'FINISHED',\n /** Job has failed. */\n FAILED = 'FAILED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals =\n | Status\n | 'UNKNOWN'\n | 'INITIALIZED'\n | 'PROCESSING'\n | 'FINISHED'\n | 'FAILED';\n\nexport interface Counters {\n /** Optional count of the dataset size, as specified during job creation. Can be used for progress bars, etc. */\n itemsToProcess?: number | null;\n /** Amount of items that were successfully processed. */\n itemsSucceeded?: number;\n /** Amount of items whose processing failed. */\n itemsFailed?: number;\n /** Mapping between an error code and the number of failures associated with it. */\n errorCountByCode?: Record<string, number>;\n}\n\nexport interface Owner extends OwnerIdOneOf {\n /**\n * Visitor ID - when the job is owned by a site visitor that was **not** logged in.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * Member ID - When the job is owned by a by a **logged in** site visitor.\n * @format GUID\n */\n memberId?: string;\n /**\n * User ID - When the job is owned by a Wix user.\n * @format GUID\n */\n wixUserId?: string;\n /**\n * App ID - When the job is owned by an external app or app by Wix.\n * @format GUID\n */\n appId?: string;\n /**\n * Service ID.\n * @format GUID\n */\n serviceId?: string;\n}\n\n/** @oneof */\nexport interface OwnerIdOneOf {\n /**\n * Visitor ID - when the job is owned by a site visitor that was **not** logged in.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * Member ID - When the job is owned by a by a **logged in** site visitor.\n * @format GUID\n */\n memberId?: string;\n /**\n * User ID - When the job is owned by a Wix user.\n * @format GUID\n */\n wixUserId?: string;\n /**\n * App ID - When the job is owned by an external app or app by Wix.\n * @format GUID\n */\n appId?: string;\n /**\n * Service ID.\n * @format GUID\n */\n serviceId?: string;\n}\n\nexport interface CreatedBy extends CreatedByOptionsOneOf {\n /** Visitor ID - when the job is created by a site visitor that was **not** logged in. */\n anonymousVisitorIdOptions?: AnonymousVisitorIdOptions;\n /** Member ID - When the job is created by a by a **logged in** site visitor. */\n memberIdOptions?: MemberIdOptions;\n /** User ID - When the job is created by a Wix user. */\n wixUserIdOptions?: WixUserIdOptions;\n /** App ID - When the job is created by an external app or app by Wix. */\n appIdOptions?: AppIdOptions;\n /** The type of the creator. */\n type?: TypeWithLiterals;\n}\n\n/** @oneof */\nexport interface CreatedByOptionsOneOf {\n /** Visitor ID - when the job is created by a site visitor that was **not** logged in. */\n anonymousVisitorIdOptions?: AnonymousVisitorIdOptions;\n /** Member ID - When the job is created by a by a **logged in** site visitor. */\n memberIdOptions?: MemberIdOptions;\n /** User ID - When the job is created by a Wix user. */\n wixUserIdOptions?: WixUserIdOptions;\n /** App ID - When the job is created by an external app or app by Wix. */\n appIdOptions?: AppIdOptions;\n}\n\nexport interface Counts {\n /** Optional count of the dataset size, specified during job creation. Can be used for progress bars, etc. */\n total?: number | null;\n /** Amount of items that were successfully processed. */\n successCount?: number;\n /** Amount of items whose processing failed. */\n failCount?: number;\n /** Mapping between an error code and the number of failures associated with it. */\n errorByCodeCount?: Record<string, number>;\n}\n\n/** Events */\nexport interface AsyncJobFinishedEvent {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface AsyncJobFailedEvent {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface AsyncJobItemFailedEvent {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n /** Job items. */\n jobItem?: AsyncJobItem;\n}\n\nexport interface AsyncJobItem {\n /**\n * Job item ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /** Job item data, as passed by the originating service. */\n data?: Record<string, any> | null;\n /**\n * ID of the entity being processed, as passed by the originating service.\n * @minLength 1\n * @maxLength 128\n * @immutable\n */\n entityId?: string | null;\n /**\n * Whether the job item was processed successfully.\n * @readonly\n */\n success?: boolean;\n /**\n * Error that prevented the item from being processed, if relevant.\n * @immutable\n */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface CreateAsyncJobRequest {\n /** Job to create. */\n job?: AsyncJob;\n}\n\nexport interface CreateAsyncJobResponse {\n /** Created job. */\n job?: AsyncJob;\n}\n\nexport interface GetAsyncJobRequest {\n /**\n * Job ID.\n * @format GUID\n */\n jobId: string;\n}\n\nexport interface GetAsyncJobResponse {\n /** Returned job. */\n job?: AsyncJob;\n}\n\nexport interface UpdateAsyncJobRequest {\n /** Job to update. */\n job?: AsyncJob;\n}\n\nexport interface UpdateAsyncJobResponse {\n /** Updated job. */\n job?: AsyncJob;\n}\n\nexport interface DeleteAsyncJobRequest {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface DeleteAsyncJobResponse {}\n\nexport interface CompleteAsyncJobRequest {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n /** Job status. */\n status?: CompleteStatusWithLiterals;\n}\n\nexport enum CompleteStatus {\n /** Job is finished. */\n FINISHED = 'FINISHED',\n /** Job has failed. */\n FAILED = 'FAILED',\n}\n\n/** @enumType */\nexport type CompleteStatusWithLiterals = CompleteStatus | 'FINISHED' | 'FAILED';\n\nexport interface CompleteAsyncJobResponse {}\n\nexport interface ReportAsyncJobProgressRequest {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n /**\n * Job items being reported.\n * @maxSize 1000\n */\n items?: AsyncJobItem[];\n}\n\nexport interface ReportAsyncJobProgressResponse {}\n\nexport interface AsyncJobItemAddedEvent {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n /** Job items. */\n jobItem?: AsyncJobItem;\n}\n\nexport interface ListAsyncJobItemsRequest {\n /**\n * Job ID.\n * @format GUID\n */\n jobId: string;\n /** Pagination options. */\n paging?: CursorPaging;\n /** async job item status filter. */\n statusFilter?: StatusFilterWithLiterals;\n}\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 enum StatusFilter {\n /** Return all items. */\n ALL = 'ALL',\n /** Return only failed items. */\n FAILED_ONLY = 'FAILED_ONLY',\n /** Return only successful items. */\n SUCCESSFUL_ONLY = 'SUCCESSFUL_ONLY',\n}\n\n/** @enumType */\nexport type StatusFilterWithLiterals =\n | StatusFilter\n | 'ALL'\n | 'FAILED_ONLY'\n | 'SUCCESSFUL_ONLY';\n\nexport interface ListAsyncJobItemsResponse {\n /** Job items. */\n results?: AsyncJobItem[];\n /** Paging metadata. */\n pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n}\n\nexport interface Cursors {\n /**\n * Cursor pointing to next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\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 MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/**\n * Retrieves a job.\n * @param jobId - Job ID.\n * @public\n * @requiredField jobId\n * @permissionId INFRA.ASYNC_JOB_READ\n * @applicableIdentity APP\n * @returns Returned job.\n * @fqn wix.infra.asyncjobs.v1.AsyncJobService.GetAsyncJob\n */\nexport async function getAsyncJob(\n jobId: string\n): Promise<\n NonNullablePaths<\n AsyncJob,\n | `_id`\n | `status`\n | `counters.itemsSucceeded`\n | `counters.itemsFailed`\n | `owner.anonymousVisitorId`\n | `owner.memberId`\n | `owner.wixUserId`\n | `owner.appId`\n | `owner.serviceId`\n | `createdBy.anonymousVisitorIdOptions.anonymousVisitorId`\n | `createdBy.memberIdOptions.memberId`\n | `createdBy.wixUserIdOptions.wixUserId`\n | `createdBy.appIdOptions.appId`\n | `createdBy.type`\n | `counts.successCount`\n | `counts.failCount`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ jobId: jobId });\n\n const reqOpts = ambassadorWixInfraAsyncjobsV1AsyncJob.getAsyncJob(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.job!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { jobId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['jobId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of job items.\n * @param jobId - Job ID.\n * @public\n * @requiredField jobId\n * @param options - Field options.\n * @permissionId INFRA.ASYNC_JOB_READ\n * @applicableIdentity APP\n * @fqn wix.infra.asyncjobs.v1.AsyncJobService.ListAsyncJobItems\n */\nexport async function listAsyncJobItems(\n jobId: string,\n options?: ListAsyncJobItemsOptions\n): Promise<\n NonNullablePaths<\n ListAsyncJobItemsResponse,\n | `results`\n | `results.${number}._id`\n | `results.${number}.success`\n | `results.${number}.error.code`\n | `results.${number}.error.description`,\n 5\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 jobId: jobId,\n paging: options?.paging,\n statusFilter: options?.statusFilter,\n });\n\n const reqOpts =\n ambassadorWixInfraAsyncjobsV1AsyncJob.listAsyncJobItems(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 jobId: '$[0]',\n paging: '$[1].paging',\n statusFilter: '$[1].statusFilter',\n },\n singleArgumentUnchanged: false,\n },\n ['jobId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListAsyncJobItemsOptions {\n /** Pagination options. */\n paging?: CursorPaging;\n /** async job item status filter. */\n statusFilter?: StatusFilterWithLiterals;\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 resolveWixInfraAsyncjobsV1AsyncJobServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/async-job-service',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/async-jobs',\n destPath: '/v1/async-jobs',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/async-jobs',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/async-jobs',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/async-jobs',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/async-jobs',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/async-jobs',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/async-jobs',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/async-job-service',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/async-job-service',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/async-job-service',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_async-jobs_async-jobs';\n\n/** Retrieves a job. */\nexport function getAsyncJob(payload: object): RequestOptionsFactory<any> {\n function __getAsyncJob({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.infra.asyncjobs.v1.async_job',\n method: 'GET' as any,\n methodFqn: 'wix.infra.asyncjobs.v1.AsyncJobService.GetAsyncJob',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInfraAsyncjobsV1AsyncJobServiceUrl({\n protoPath: '/v1/async-jobs/{jobId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'job.createdDate' }, { path: 'job.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getAsyncJob;\n}\n\n/** Retrieves a list of job items. */\nexport function listAsyncJobItems(payload: object): RequestOptionsFactory<any> {\n function __listAsyncJobItems({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.infra.asyncjobs.v1.async_job',\n method: 'GET' as any,\n methodFqn: 'wix.infra.asyncjobs.v1.AsyncJobService.ListAsyncJobItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInfraAsyncjobsV1AsyncJobServiceUrl({\n protoPath: '/v1/async-jobs/{jobId}/items',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listAsyncJobItems;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n AsyncJob,\n ListAsyncJobItemsOptions,\n ListAsyncJobItemsResponse,\n getAsyncJob as universalGetAsyncJob,\n listAsyncJobItems as universalListAsyncJobItems,\n} from './infra-asyncjobs-v1-async-job-async-jobs.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/async-jobs' };\n\nexport function getAsyncJob(httpClient: HttpClient): GetAsyncJobSignature {\n return (jobId: string) =>\n universalGetAsyncJob(\n jobId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetAsyncJobSignature {\n /**\n * Retrieves a job.\n * @param - Job ID.\n * @returns Returned job.\n */\n (jobId: string): Promise<\n NonNullablePaths<\n AsyncJob,\n | `_id`\n | `status`\n | `counters.itemsSucceeded`\n | `counters.itemsFailed`\n | `owner.anonymousVisitorId`\n | `owner.memberId`\n | `owner.wixUserId`\n | `owner.appId`\n | `owner.serviceId`\n | `createdBy.anonymousVisitorIdOptions.anonymousVisitorId`\n | `createdBy.memberIdOptions.memberId`\n | `createdBy.wixUserIdOptions.wixUserId`\n | `createdBy.appIdOptions.appId`\n | `createdBy.type`\n | `counts.successCount`\n | `counts.failCount`,\n 4\n >\n >;\n}\n\nexport function listAsyncJobItems(\n httpClient: HttpClient\n): ListAsyncJobItemsSignature {\n return (jobId: string, options?: ListAsyncJobItemsOptions) =>\n universalListAsyncJobItems(\n jobId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListAsyncJobItemsSignature {\n /**\n * Retrieves a list of job items.\n * @param - Job ID.\n * @param - Field options.\n */\n (jobId: string, options?: ListAsyncJobItemsOptions): Promise<\n NonNullablePaths<\n ListAsyncJobItemsResponse,\n | `results`\n | `results.${number}._id`\n | `results.${number}.success`\n | `results.${number}.error.code`\n | `results.${number}.error.description`,\n 5\n >\n >;\n}\n\nexport {\n AccountInfo,\n ActionEvent,\n AnonymousVisitorIdOptions,\n AppIdOptions,\n ApplicationError,\n AsyncJob,\n AsyncJobFailedEvent,\n AsyncJobFinishedEvent,\n AsyncJobItem,\n AsyncJobItemAddedEvent,\n AsyncJobItemFailedEvent,\n CompleteAsyncJobRequest,\n CompleteAsyncJobResponse,\n CompleteStatus,\n Counters,\n Counts,\n CreateAsyncJobRequest,\n CreateAsyncJobResponse,\n CreatedBy,\n CreatedByOptionsOneOf,\n CursorPaging,\n Cursors,\n DeleteAsyncJobRequest,\n DeleteAsyncJobResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n GetAsyncJobRequest,\n GetAsyncJobResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n ListAsyncJobItemsOptions,\n ListAsyncJobItemsRequest,\n ListAsyncJobItemsResponse,\n MemberIdOptions,\n MessageEnvelope,\n Owner,\n OwnerIdOneOf,\n PagingMetadataV2,\n ReportAsyncJobProgressRequest,\n ReportAsyncJobProgressResponse,\n RestoreInfo,\n Status,\n StatusFilter,\n Type,\n UpdateAsyncJobRequest,\n UpdateAsyncJobResponse,\n WebhookIdentityType,\n WixUserIdOptions,\n} from './infra-asyncjobs-v1-async-job-async-jobs.universal.js';\n","import {\n getAsyncJob as publicGetAsyncJob,\n listAsyncJobItems as publicListAsyncJobItems,\n} from './infra-asyncjobs-v1-async-job-async-jobs.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getAsyncJob: MaybeContext<\n BuildRESTFunction<typeof publicGetAsyncJob> & typeof publicGetAsyncJob\n> = /*#__PURE__*/ createRESTModule(publicGetAsyncJob);\nexport const listAsyncJobItems: MaybeContext<\n BuildRESTFunction<typeof publicListAsyncJobItems> &\n typeof publicListAsyncJobItems\n> = /*#__PURE__*/ createRESTModule(publicListAsyncJobItems);\n\nexport {\n Type,\n Status,\n CompleteStatus,\n StatusFilter,\n WebhookIdentityType,\n} from './infra-asyncjobs-v1-async-job-async-jobs.universal.js';\nexport {\n AsyncJob,\n AnonymousVisitorIdOptions,\n MemberIdOptions,\n WixUserIdOptions,\n AppIdOptions,\n Counters,\n Owner,\n OwnerIdOneOf,\n CreatedBy,\n CreatedByOptionsOneOf,\n Counts,\n AsyncJobFinishedEvent,\n AsyncJobFailedEvent,\n AsyncJobItemFailedEvent,\n AsyncJobItem,\n ApplicationError,\n CreateAsyncJobRequest,\n CreateAsyncJobResponse,\n GetAsyncJobRequest,\n GetAsyncJobResponse,\n UpdateAsyncJobRequest,\n UpdateAsyncJobResponse,\n DeleteAsyncJobRequest,\n DeleteAsyncJobResponse,\n CompleteAsyncJobRequest,\n CompleteAsyncJobResponse,\n ReportAsyncJobProgressRequest,\n ReportAsyncJobProgressResponse,\n AsyncJobItemAddedEvent,\n ListAsyncJobItemsRequest,\n CursorPaging,\n ListAsyncJobItemsResponse,\n PagingMetadataV2,\n Cursors,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n ListAsyncJobItemsOptions,\n} from './infra-asyncjobs-v1-async-job-async-jobs.universal.js';\nexport {\n TypeWithLiterals,\n StatusWithLiterals,\n CompleteStatusWithLiterals,\n StatusFilterWithLiterals,\n WebhookIdentityTypeWithLiterals,\n} from './infra-asyncjobs-v1-async-job-async-jobs.universal.js';\n"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AAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD;AAAA,IACA,QAAQ,SAAS;AAAA,IACjB,cAAc,SAAS;AAAA,EACzB,CAAC;AAED,QAAM,UACkC,kBAAkB,OAAO;AAEjE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAD;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,cAAc;AAAA,QAChB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS,SAAS;AAAA,IACrB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AE1uBO,SAASE,aAAY,YAA8C;AACxE,SAAO,CAAC,UACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAgCO,SAASC,mBACd,YAC4B;AAC5B,SAAO,CAAC,OAAe,YACrBA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACxDA,IAAAC,uBAAiC;AAG1B,IAAMC,eAEK,2DAAiBA,YAAiB;AAC7C,IAAMC,qBAGK,2DAAiBA,kBAAuB;","names":["getAsyncJob","listAsyncJobItems","import_rest_modules","payload","Type","Status","CompleteStatus","StatusFilter","WebhookIdentityType","getAsyncJob","sdkTransformError","listAsyncJobItems","getAsyncJob","listAsyncJobItems","import_rest_modules","getAsyncJob","listAsyncJobItems"]}
|
|
@@ -422,7 +422,7 @@ interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
422
422
|
/** If present, indicates the action that triggered the event. */
|
|
423
423
|
originatedFrom?: string | null;
|
|
424
424
|
/**
|
|
425
|
-
* 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
|
|
425
|
+
* 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.
|
|
426
426
|
* 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.
|
|
427
427
|
*/
|
|
428
428
|
entityEventSequence?: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.typings.ts","../../src/infra-asyncjobs-v1-async-job-async-jobs.universal.ts","../../src/infra-asyncjobs-v1-async-job-async-jobs.http.ts"],"sourcesContent":["export * from './src/infra-asyncjobs-v1-async-job-async-jobs.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixInfraAsyncjobsV1AsyncJob from './infra-asyncjobs-v1-async-job-async-jobs.http.js';\n\nexport interface AsyncJob {\n /**\n * Job ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /** Optional job metadata, used to store any parameters used during job execution, user-defined statuses, etc. */\n metadata?: Record<string, any> | null;\n /** Current job execution status. */\n status?: StatusWithLiterals;\n /**\n * Current counters.\n * @deprecated Current counters.\n * @replacedBy wix.infra.asyncjobs.v1.AsyncJob.counts\n * @targetRemovalDate 2024-12-12\n */\n counters?: Counters;\n /**\n * Date and time the job was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the job was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Job owner.\n * @readonly\n * @deprecated Job owner.\n * @replacedBy wix.infra.asyncjobs.v1.AsyncJob.created_by\n * @targetRemovalDate 2024-12-12\n */\n owner?: Owner;\n /**\n * Job creator.\n * @readonly\n */\n createdBy?: CreatedBy;\n /** Current execution counts. */\n counts?: Counts;\n}\n\nexport enum Type {\n UNKNOWN_TYPE = 'UNKNOWN_TYPE',\n /** Job was created by a site visitor that was **not** logged in. */\n ANONYMOUS_VISITOR_ID = 'ANONYMOUS_VISITOR_ID',\n /** Job was created by a **logged in** site visitor. */\n MEMBER_ID = 'MEMBER_ID',\n /** Job was created by a Wix user. */\n WIX_USER_ID = 'WIX_USER_ID',\n /** Job was created by an external app or app by Wix. */\n APP_ID = 'APP_ID',\n}\n\n/** @enumType */\nexport type TypeWithLiterals =\n | Type\n | 'UNKNOWN_TYPE'\n | 'ANONYMOUS_VISITOR_ID'\n | 'MEMBER_ID'\n | 'WIX_USER_ID'\n | 'APP_ID';\n\nexport interface AnonymousVisitorIdOptions {\n /**\n * Visitor ID - When the job is owned by a site visitor that was **not** logged in.\n * @format GUID\n */\n anonymousVisitorId?: string;\n}\n\nexport interface MemberIdOptions {\n /**\n * Member ID - When the job is owned by a by a **logged in** site visitor.\n * @format GUID\n */\n memberId?: string;\n}\n\nexport interface WixUserIdOptions {\n /**\n * User ID - When the job is owned by a site owner or contributor.\n * @format GUID\n */\n wixUserId?: string;\n}\n\nexport interface AppIdOptions {\n /**\n * App ID - When the job is owned by an external app. or app by Wix.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum Status {\n UNKNOWN = 'UNKNOWN',\n /** Job is created, but hasn't started yet. */\n INITIALIZED = 'INITIALIZED',\n /** Job has started and is in progress. */\n PROCESSING = 'PROCESSING',\n /** Job is finished. */\n FINISHED = 'FINISHED',\n /** Job has failed. */\n FAILED = 'FAILED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals =\n | Status\n | 'UNKNOWN'\n | 'INITIALIZED'\n | 'PROCESSING'\n | 'FINISHED'\n | 'FAILED';\n\nexport interface Counters {\n /** Optional count of the dataset size, as specified during job creation. Can be used for progress bars, etc. */\n itemsToProcess?: number | null;\n /** Amount of items that were successfully processed. */\n itemsSucceeded?: number;\n /** Amount of items whose processing failed. */\n itemsFailed?: number;\n /** Mapping between an error code and the number of failures associated with it. */\n errorCountByCode?: Record<string, number>;\n}\n\nexport interface Owner extends OwnerIdOneOf {\n /**\n * Visitor ID - when the job is owned by a site visitor that was **not** logged in.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * Member ID - When the job is owned by a by a **logged in** site visitor.\n * @format GUID\n */\n memberId?: string;\n /**\n * User ID - When the job is owned by a Wix user.\n * @format GUID\n */\n wixUserId?: string;\n /**\n * App ID - When the job is owned by an external app or app by Wix.\n * @format GUID\n */\n appId?: string;\n /**\n * Service ID.\n * @format GUID\n */\n serviceId?: string;\n}\n\n/** @oneof */\nexport interface OwnerIdOneOf {\n /**\n * Visitor ID - when the job is owned by a site visitor that was **not** logged in.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * Member ID - When the job is owned by a by a **logged in** site visitor.\n * @format GUID\n */\n memberId?: string;\n /**\n * User ID - When the job is owned by a Wix user.\n * @format GUID\n */\n wixUserId?: string;\n /**\n * App ID - When the job is owned by an external app or app by Wix.\n * @format GUID\n */\n appId?: string;\n /**\n * Service ID.\n * @format GUID\n */\n serviceId?: string;\n}\n\nexport interface CreatedBy extends CreatedByOptionsOneOf {\n /** Visitor ID - when the job is created by a site visitor that was **not** logged in. */\n anonymousVisitorIdOptions?: AnonymousVisitorIdOptions;\n /** Member ID - When the job is created by a by a **logged in** site visitor. */\n memberIdOptions?: MemberIdOptions;\n /** User ID - When the job is created by a Wix user. */\n wixUserIdOptions?: WixUserIdOptions;\n /** App ID - When the job is created by an external app or app by Wix. */\n appIdOptions?: AppIdOptions;\n /** The type of the creator. */\n type?: TypeWithLiterals;\n}\n\n/** @oneof */\nexport interface CreatedByOptionsOneOf {\n /** Visitor ID - when the job is created by a site visitor that was **not** logged in. */\n anonymousVisitorIdOptions?: AnonymousVisitorIdOptions;\n /** Member ID - When the job is created by a by a **logged in** site visitor. */\n memberIdOptions?: MemberIdOptions;\n /** User ID - When the job is created by a Wix user. */\n wixUserIdOptions?: WixUserIdOptions;\n /** App ID - When the job is created by an external app or app by Wix. */\n appIdOptions?: AppIdOptions;\n}\n\nexport interface Counts {\n /** Optional count of the dataset size, specified during job creation. Can be used for progress bars, etc. */\n total?: number | null;\n /** Amount of items that were successfully processed. */\n successCount?: number;\n /** Amount of items whose processing failed. */\n failCount?: number;\n /** Mapping between an error code and the number of failures associated with it. */\n errorByCodeCount?: Record<string, number>;\n}\n\n/** Events */\nexport interface AsyncJobFinishedEvent {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface AsyncJobFailedEvent {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface AsyncJobItemFailedEvent {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n /** Job items. */\n jobItem?: AsyncJobItem;\n}\n\nexport interface AsyncJobItem {\n /**\n * Job item ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /** Job item data, as passed by the originating service. */\n data?: Record<string, any> | null;\n /**\n * ID of the entity being processed, as passed by the originating service.\n * @minLength 1\n * @maxLength 128\n * @immutable\n */\n entityId?: string | null;\n /**\n * Whether the job item was processed successfully.\n * @readonly\n */\n success?: boolean;\n /**\n * Error that prevented the item from being processed, if relevant.\n * @immutable\n */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface CreateAsyncJobRequest {\n /** Job to create. */\n job?: AsyncJob;\n}\n\nexport interface CreateAsyncJobResponse {\n /** Created job. */\n job?: AsyncJob;\n}\n\nexport interface GetAsyncJobRequest {\n /**\n * Job ID.\n * @format GUID\n */\n jobId: string;\n}\n\nexport interface GetAsyncJobResponse {\n /** Returned job. */\n job?: AsyncJob;\n}\n\nexport interface UpdateAsyncJobRequest {\n /** Job to update. */\n job?: AsyncJob;\n}\n\nexport interface UpdateAsyncJobResponse {\n /** Updated job. */\n job?: AsyncJob;\n}\n\nexport interface DeleteAsyncJobRequest {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface DeleteAsyncJobResponse {}\n\nexport interface CompleteAsyncJobRequest {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n /** Job status. */\n status?: CompleteStatusWithLiterals;\n}\n\nexport enum CompleteStatus {\n /** Job is finished. */\n FINISHED = 'FINISHED',\n /** Job has failed. */\n FAILED = 'FAILED',\n}\n\n/** @enumType */\nexport type CompleteStatusWithLiterals = CompleteStatus | 'FINISHED' | 'FAILED';\n\nexport interface CompleteAsyncJobResponse {}\n\nexport interface ReportAsyncJobProgressRequest {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n /**\n * Job items being reported.\n * @maxSize 1000\n */\n items?: AsyncJobItem[];\n}\n\nexport interface ReportAsyncJobProgressResponse {}\n\nexport interface AsyncJobItemAddedEvent {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n /** Job items. */\n jobItem?: AsyncJobItem;\n}\n\nexport interface ListAsyncJobItemsRequest {\n /**\n * Job ID.\n * @format GUID\n */\n jobId: string;\n /** Pagination options. */\n paging?: CursorPaging;\n /** async job item status filter. */\n statusFilter?: StatusFilterWithLiterals;\n}\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 enum StatusFilter {\n /** Return all items. */\n ALL = 'ALL',\n /** Return only failed items. */\n FAILED_ONLY = 'FAILED_ONLY',\n /** Return only successful items. */\n SUCCESSFUL_ONLY = 'SUCCESSFUL_ONLY',\n}\n\n/** @enumType */\nexport type StatusFilterWithLiterals =\n | StatusFilter\n | 'ALL'\n | 'FAILED_ONLY'\n | 'SUCCESSFUL_ONLY';\n\nexport interface ListAsyncJobItemsResponse {\n /** Job items. */\n results?: AsyncJobItem[];\n /** Paging metadata. */\n pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n}\n\nexport interface Cursors {\n /**\n * Cursor pointing to next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\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 MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/**\n * Retrieves a job.\n * @param jobId - Job ID.\n * @public\n * @requiredField jobId\n * @permissionId INFRA.ASYNC_JOB_READ\n * @applicableIdentity APP\n * @returns Returned job.\n * @fqn wix.infra.asyncjobs.v1.AsyncJobService.GetAsyncJob\n */\nexport async function getAsyncJob(\n jobId: string\n): Promise<\n NonNullablePaths<\n AsyncJob,\n | `_id`\n | `status`\n | `counters.itemsSucceeded`\n | `counters.itemsFailed`\n | `owner.anonymousVisitorId`\n | `owner.memberId`\n | `owner.wixUserId`\n | `owner.appId`\n | `owner.serviceId`\n | `createdBy.anonymousVisitorIdOptions.anonymousVisitorId`\n | `createdBy.memberIdOptions.memberId`\n | `createdBy.wixUserIdOptions.wixUserId`\n | `createdBy.appIdOptions.appId`\n | `createdBy.type`\n | `counts.successCount`\n | `counts.failCount`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ jobId: jobId });\n\n const reqOpts = ambassadorWixInfraAsyncjobsV1AsyncJob.getAsyncJob(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.job!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { jobId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['jobId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of job items.\n * @param jobId - Job ID.\n * @public\n * @requiredField jobId\n * @param options - Field options.\n * @permissionId INFRA.ASYNC_JOB_READ\n * @applicableIdentity APP\n * @fqn wix.infra.asyncjobs.v1.AsyncJobService.ListAsyncJobItems\n */\nexport async function listAsyncJobItems(\n jobId: string,\n options?: ListAsyncJobItemsOptions\n): Promise<\n NonNullablePaths<\n ListAsyncJobItemsResponse,\n | `results`\n | `results.${number}._id`\n | `results.${number}.success`\n | `results.${number}.error.code`\n | `results.${number}.error.description`,\n 5\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 jobId: jobId,\n paging: options?.paging,\n statusFilter: options?.statusFilter,\n });\n\n const reqOpts =\n ambassadorWixInfraAsyncjobsV1AsyncJob.listAsyncJobItems(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 jobId: '$[0]',\n paging: '$[1].paging',\n statusFilter: '$[1].statusFilter',\n },\n singleArgumentUnchanged: false,\n },\n ['jobId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListAsyncJobItemsOptions {\n /** Pagination options. */\n paging?: CursorPaging;\n /** async job item status filter. */\n statusFilter?: StatusFilterWithLiterals;\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 resolveWixInfraAsyncjobsV1AsyncJobServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/async-job-service',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/async-jobs',\n destPath: '/v1/async-jobs',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/async-jobs',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/async-jobs',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/async-jobs',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/async-jobs',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/async-jobs',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/async-jobs',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/async-job-service',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/async-job-service',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/async-job-service',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_async-jobs_async-jobs';\n\n/** Retrieves a job. */\nexport function getAsyncJob(payload: object): RequestOptionsFactory<any> {\n function __getAsyncJob({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.infra.asyncjobs.v1.async_job',\n method: 'GET' as any,\n methodFqn: 'wix.infra.asyncjobs.v1.AsyncJobService.GetAsyncJob',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInfraAsyncjobsV1AsyncJobServiceUrl({\n protoPath: '/v1/async-jobs/{jobId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'job.createdDate' }, { path: 'job.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getAsyncJob;\n}\n\n/** Retrieves a list of job items. */\nexport function listAsyncJobItems(payload: object): RequestOptionsFactory<any> {\n function __listAsyncJobItems({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.infra.asyncjobs.v1.async_job',\n method: 'GET' as any,\n methodFqn: 'wix.infra.asyncjobs.v1.AsyncJobService.ListAsyncJobItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInfraAsyncjobsV1AsyncJobServiceUrl({\n protoPath: '/v1/async-jobs/{jobId}/items',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listAsyncJobItems;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAAA;AAAA,EAAA,yBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,6CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,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D;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,cAAc;AAAA,QAChB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS,SAAS;AAAA,IACrB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["getAsyncJob","listAsyncJobItems","import_rest_modules","payload","Type","Status","CompleteStatus","StatusFilter","WebhookIdentityType","getAsyncJob","sdkTransformError","listAsyncJobItems"]}
|
|
1
|
+
{"version":3,"sources":["../../index.typings.ts","../../src/infra-asyncjobs-v1-async-job-async-jobs.universal.ts","../../src/infra-asyncjobs-v1-async-job-async-jobs.http.ts"],"sourcesContent":["export * from './src/infra-asyncjobs-v1-async-job-async-jobs.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixInfraAsyncjobsV1AsyncJob from './infra-asyncjobs-v1-async-job-async-jobs.http.js';\n\nexport interface AsyncJob {\n /**\n * Job ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /** Optional job metadata, used to store any parameters used during job execution, user-defined statuses, etc. */\n metadata?: Record<string, any> | null;\n /** Current job execution status. */\n status?: StatusWithLiterals;\n /**\n * Current counters.\n * @deprecated Current counters.\n * @replacedBy wix.infra.asyncjobs.v1.AsyncJob.counts\n * @targetRemovalDate 2024-12-12\n */\n counters?: Counters;\n /**\n * Date and time the job was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the job was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Job owner.\n * @readonly\n * @deprecated Job owner.\n * @replacedBy wix.infra.asyncjobs.v1.AsyncJob.created_by\n * @targetRemovalDate 2024-12-12\n */\n owner?: Owner;\n /**\n * Job creator.\n * @readonly\n */\n createdBy?: CreatedBy;\n /** Current execution counts. */\n counts?: Counts;\n}\n\nexport enum Type {\n UNKNOWN_TYPE = 'UNKNOWN_TYPE',\n /** Job was created by a site visitor that was **not** logged in. */\n ANONYMOUS_VISITOR_ID = 'ANONYMOUS_VISITOR_ID',\n /** Job was created by a **logged in** site visitor. */\n MEMBER_ID = 'MEMBER_ID',\n /** Job was created by a Wix user. */\n WIX_USER_ID = 'WIX_USER_ID',\n /** Job was created by an external app or app by Wix. */\n APP_ID = 'APP_ID',\n}\n\n/** @enumType */\nexport type TypeWithLiterals =\n | Type\n | 'UNKNOWN_TYPE'\n | 'ANONYMOUS_VISITOR_ID'\n | 'MEMBER_ID'\n | 'WIX_USER_ID'\n | 'APP_ID';\n\nexport interface AnonymousVisitorIdOptions {\n /**\n * Visitor ID - When the job is owned by a site visitor that was **not** logged in.\n * @format GUID\n */\n anonymousVisitorId?: string;\n}\n\nexport interface MemberIdOptions {\n /**\n * Member ID - When the job is owned by a by a **logged in** site visitor.\n * @format GUID\n */\n memberId?: string;\n}\n\nexport interface WixUserIdOptions {\n /**\n * User ID - When the job is owned by a site owner or contributor.\n * @format GUID\n */\n wixUserId?: string;\n}\n\nexport interface AppIdOptions {\n /**\n * App ID - When the job is owned by an external app. or app by Wix.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum Status {\n UNKNOWN = 'UNKNOWN',\n /** Job is created, but hasn't started yet. */\n INITIALIZED = 'INITIALIZED',\n /** Job has started and is in progress. */\n PROCESSING = 'PROCESSING',\n /** Job is finished. */\n FINISHED = 'FINISHED',\n /** Job has failed. */\n FAILED = 'FAILED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals =\n | Status\n | 'UNKNOWN'\n | 'INITIALIZED'\n | 'PROCESSING'\n | 'FINISHED'\n | 'FAILED';\n\nexport interface Counters {\n /** Optional count of the dataset size, as specified during job creation. Can be used for progress bars, etc. */\n itemsToProcess?: number | null;\n /** Amount of items that were successfully processed. */\n itemsSucceeded?: number;\n /** Amount of items whose processing failed. */\n itemsFailed?: number;\n /** Mapping between an error code and the number of failures associated with it. */\n errorCountByCode?: Record<string, number>;\n}\n\nexport interface Owner extends OwnerIdOneOf {\n /**\n * Visitor ID - when the job is owned by a site visitor that was **not** logged in.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * Member ID - When the job is owned by a by a **logged in** site visitor.\n * @format GUID\n */\n memberId?: string;\n /**\n * User ID - When the job is owned by a Wix user.\n * @format GUID\n */\n wixUserId?: string;\n /**\n * App ID - When the job is owned by an external app or app by Wix.\n * @format GUID\n */\n appId?: string;\n /**\n * Service ID.\n * @format GUID\n */\n serviceId?: string;\n}\n\n/** @oneof */\nexport interface OwnerIdOneOf {\n /**\n * Visitor ID - when the job is owned by a site visitor that was **not** logged in.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * Member ID - When the job is owned by a by a **logged in** site visitor.\n * @format GUID\n */\n memberId?: string;\n /**\n * User ID - When the job is owned by a Wix user.\n * @format GUID\n */\n wixUserId?: string;\n /**\n * App ID - When the job is owned by an external app or app by Wix.\n * @format GUID\n */\n appId?: string;\n /**\n * Service ID.\n * @format GUID\n */\n serviceId?: string;\n}\n\nexport interface CreatedBy extends CreatedByOptionsOneOf {\n /** Visitor ID - when the job is created by a site visitor that was **not** logged in. */\n anonymousVisitorIdOptions?: AnonymousVisitorIdOptions;\n /** Member ID - When the job is created by a by a **logged in** site visitor. */\n memberIdOptions?: MemberIdOptions;\n /** User ID - When the job is created by a Wix user. */\n wixUserIdOptions?: WixUserIdOptions;\n /** App ID - When the job is created by an external app or app by Wix. */\n appIdOptions?: AppIdOptions;\n /** The type of the creator. */\n type?: TypeWithLiterals;\n}\n\n/** @oneof */\nexport interface CreatedByOptionsOneOf {\n /** Visitor ID - when the job is created by a site visitor that was **not** logged in. */\n anonymousVisitorIdOptions?: AnonymousVisitorIdOptions;\n /** Member ID - When the job is created by a by a **logged in** site visitor. */\n memberIdOptions?: MemberIdOptions;\n /** User ID - When the job is created by a Wix user. */\n wixUserIdOptions?: WixUserIdOptions;\n /** App ID - When the job is created by an external app or app by Wix. */\n appIdOptions?: AppIdOptions;\n}\n\nexport interface Counts {\n /** Optional count of the dataset size, specified during job creation. Can be used for progress bars, etc. */\n total?: number | null;\n /** Amount of items that were successfully processed. */\n successCount?: number;\n /** Amount of items whose processing failed. */\n failCount?: number;\n /** Mapping between an error code and the number of failures associated with it. */\n errorByCodeCount?: Record<string, number>;\n}\n\n/** Events */\nexport interface AsyncJobFinishedEvent {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface AsyncJobFailedEvent {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface AsyncJobItemFailedEvent {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n /** Job items. */\n jobItem?: AsyncJobItem;\n}\n\nexport interface AsyncJobItem {\n /**\n * Job item ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /** Job item data, as passed by the originating service. */\n data?: Record<string, any> | null;\n /**\n * ID of the entity being processed, as passed by the originating service.\n * @minLength 1\n * @maxLength 128\n * @immutable\n */\n entityId?: string | null;\n /**\n * Whether the job item was processed successfully.\n * @readonly\n */\n success?: boolean;\n /**\n * Error that prevented the item from being processed, if relevant.\n * @immutable\n */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface CreateAsyncJobRequest {\n /** Job to create. */\n job?: AsyncJob;\n}\n\nexport interface CreateAsyncJobResponse {\n /** Created job. */\n job?: AsyncJob;\n}\n\nexport interface GetAsyncJobRequest {\n /**\n * Job ID.\n * @format GUID\n */\n jobId: string;\n}\n\nexport interface GetAsyncJobResponse {\n /** Returned job. */\n job?: AsyncJob;\n}\n\nexport interface UpdateAsyncJobRequest {\n /** Job to update. */\n job?: AsyncJob;\n}\n\nexport interface UpdateAsyncJobResponse {\n /** Updated job. */\n job?: AsyncJob;\n}\n\nexport interface DeleteAsyncJobRequest {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface DeleteAsyncJobResponse {}\n\nexport interface CompleteAsyncJobRequest {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n /** Job status. */\n status?: CompleteStatusWithLiterals;\n}\n\nexport enum CompleteStatus {\n /** Job is finished. */\n FINISHED = 'FINISHED',\n /** Job has failed. */\n FAILED = 'FAILED',\n}\n\n/** @enumType */\nexport type CompleteStatusWithLiterals = CompleteStatus | 'FINISHED' | 'FAILED';\n\nexport interface CompleteAsyncJobResponse {}\n\nexport interface ReportAsyncJobProgressRequest {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n /**\n * Job items being reported.\n * @maxSize 1000\n */\n items?: AsyncJobItem[];\n}\n\nexport interface ReportAsyncJobProgressResponse {}\n\nexport interface AsyncJobItemAddedEvent {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n /** Job items. */\n jobItem?: AsyncJobItem;\n}\n\nexport interface ListAsyncJobItemsRequest {\n /**\n * Job ID.\n * @format GUID\n */\n jobId: string;\n /** Pagination options. */\n paging?: CursorPaging;\n /** async job item status filter. */\n statusFilter?: StatusFilterWithLiterals;\n}\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 enum StatusFilter {\n /** Return all items. */\n ALL = 'ALL',\n /** Return only failed items. */\n FAILED_ONLY = 'FAILED_ONLY',\n /** Return only successful items. */\n SUCCESSFUL_ONLY = 'SUCCESSFUL_ONLY',\n}\n\n/** @enumType */\nexport type StatusFilterWithLiterals =\n | StatusFilter\n | 'ALL'\n | 'FAILED_ONLY'\n | 'SUCCESSFUL_ONLY';\n\nexport interface ListAsyncJobItemsResponse {\n /** Job items. */\n results?: AsyncJobItem[];\n /** Paging metadata. */\n pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n}\n\nexport interface Cursors {\n /**\n * Cursor pointing to next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\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 MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/**\n * Retrieves a job.\n * @param jobId - Job ID.\n * @public\n * @requiredField jobId\n * @permissionId INFRA.ASYNC_JOB_READ\n * @applicableIdentity APP\n * @returns Returned job.\n * @fqn wix.infra.asyncjobs.v1.AsyncJobService.GetAsyncJob\n */\nexport async function getAsyncJob(\n jobId: string\n): Promise<\n NonNullablePaths<\n AsyncJob,\n | `_id`\n | `status`\n | `counters.itemsSucceeded`\n | `counters.itemsFailed`\n | `owner.anonymousVisitorId`\n | `owner.memberId`\n | `owner.wixUserId`\n | `owner.appId`\n | `owner.serviceId`\n | `createdBy.anonymousVisitorIdOptions.anonymousVisitorId`\n | `createdBy.memberIdOptions.memberId`\n | `createdBy.wixUserIdOptions.wixUserId`\n | `createdBy.appIdOptions.appId`\n | `createdBy.type`\n | `counts.successCount`\n | `counts.failCount`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ jobId: jobId });\n\n const reqOpts = ambassadorWixInfraAsyncjobsV1AsyncJob.getAsyncJob(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.job!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { jobId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['jobId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of job items.\n * @param jobId - Job ID.\n * @public\n * @requiredField jobId\n * @param options - Field options.\n * @permissionId INFRA.ASYNC_JOB_READ\n * @applicableIdentity APP\n * @fqn wix.infra.asyncjobs.v1.AsyncJobService.ListAsyncJobItems\n */\nexport async function listAsyncJobItems(\n jobId: string,\n options?: ListAsyncJobItemsOptions\n): Promise<\n NonNullablePaths<\n ListAsyncJobItemsResponse,\n | `results`\n | `results.${number}._id`\n | `results.${number}.success`\n | `results.${number}.error.code`\n | `results.${number}.error.description`,\n 5\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 jobId: jobId,\n paging: options?.paging,\n statusFilter: options?.statusFilter,\n });\n\n const reqOpts =\n ambassadorWixInfraAsyncjobsV1AsyncJob.listAsyncJobItems(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 jobId: '$[0]',\n paging: '$[1].paging',\n statusFilter: '$[1].statusFilter',\n },\n singleArgumentUnchanged: false,\n },\n ['jobId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListAsyncJobItemsOptions {\n /** Pagination options. */\n paging?: CursorPaging;\n /** async job item status filter. */\n statusFilter?: StatusFilterWithLiterals;\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 resolveWixInfraAsyncjobsV1AsyncJobServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/async-job-service',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/async-jobs',\n destPath: '/v1/async-jobs',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/async-jobs',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/async-jobs',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/async-jobs',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/async-jobs',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/async-jobs',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/async-jobs',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/async-job-service',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/async-job-service',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/async-job-service',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_async-jobs_async-jobs';\n\n/** Retrieves a job. */\nexport function getAsyncJob(payload: object): RequestOptionsFactory<any> {\n function __getAsyncJob({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.infra.asyncjobs.v1.async_job',\n method: 'GET' as any,\n methodFqn: 'wix.infra.asyncjobs.v1.AsyncJobService.GetAsyncJob',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInfraAsyncjobsV1AsyncJobServiceUrl({\n protoPath: '/v1/async-jobs/{jobId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'job.createdDate' }, { path: 'job.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getAsyncJob;\n}\n\n/** Retrieves a list of job items. */\nexport function listAsyncJobItems(payload: object): RequestOptionsFactory<any> {\n function __listAsyncJobItems({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.infra.asyncjobs.v1.async_job',\n method: 'GET' as any,\n methodFqn: 'wix.infra.asyncjobs.v1.AsyncJobService.ListAsyncJobItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInfraAsyncjobsV1AsyncJobServiceUrl({\n protoPath: '/v1/async-jobs/{jobId}/items',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listAsyncJobItems;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAAA;AAAA,EAAA,yBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,6CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,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EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAD;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,cAAc;AAAA,QAChB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS,SAAS;AAAA,IACrB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["getAsyncJob","listAsyncJobItems","import_rest_modules","payload","Type","Status","CompleteStatus","StatusFilter","WebhookIdentityType","getAsyncJob","sdkTransformError","listAsyncJobItems"]}
|
package/build/cjs/meta.d.ts
CHANGED
|
@@ -423,7 +423,7 @@ interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
423
423
|
/** If present, indicates the action that triggered the event. */
|
|
424
424
|
originatedFrom?: string | null;
|
|
425
425
|
/**
|
|
426
|
-
* 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
|
|
426
|
+
* 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.
|
|
427
427
|
* 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.
|
|
428
428
|
*/
|
|
429
429
|
entityEventSequence?: string | null;
|
package/build/cjs/meta.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../meta.ts","../../src/infra-asyncjobs-v1-async-job-async-jobs.http.ts","../../src/infra-asyncjobs-v1-async-job-async-jobs.types.ts","../../src/infra-asyncjobs-v1-async-job-async-jobs.meta.ts"],"sourcesContent":["export * from './src/infra-asyncjobs-v1-async-job-async-jobs.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 resolveWixInfraAsyncjobsV1AsyncJobServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/async-job-service',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/async-jobs',\n destPath: '/v1/async-jobs',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/async-jobs',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/async-jobs',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/async-jobs',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/async-jobs',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/async-jobs',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/async-jobs',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/async-job-service',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/async-job-service',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/async-job-service',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_async-jobs_async-jobs';\n\n/** Retrieves a job. */\nexport function getAsyncJob(payload: object): RequestOptionsFactory<any> {\n function __getAsyncJob({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.infra.asyncjobs.v1.async_job',\n method: 'GET' as any,\n methodFqn: 'wix.infra.asyncjobs.v1.AsyncJobService.GetAsyncJob',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInfraAsyncjobsV1AsyncJobServiceUrl({\n protoPath: '/v1/async-jobs/{jobId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'job.createdDate' }, { path: 'job.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getAsyncJob;\n}\n\n/** Retrieves a list of job items. */\nexport function listAsyncJobItems(payload: object): RequestOptionsFactory<any> {\n function __listAsyncJobItems({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.infra.asyncjobs.v1.async_job',\n method: 'GET' as any,\n methodFqn: 'wix.infra.asyncjobs.v1.AsyncJobService.ListAsyncJobItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInfraAsyncjobsV1AsyncJobServiceUrl({\n protoPath: '/v1/async-jobs/{jobId}/items',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listAsyncJobItems;\n}\n","export interface AsyncJob {\n /**\n * Job ID.\n * @format GUID\n * @readonly\n */\n id?: string;\n /** Optional job metadata, used to store any parameters used during job execution, user-defined statuses, etc. */\n metadata?: Record<string, any> | null;\n /** Current job execution status. */\n status?: StatusWithLiterals;\n /**\n * Current counters.\n * @deprecated Current counters.\n * @replacedBy wix.infra.asyncjobs.v1.AsyncJob.counts\n * @targetRemovalDate 2024-12-12\n */\n counters?: Counters;\n /**\n * Date and time the job was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.\n * @readonly\n */\n createdDate?: Date | null;\n /**\n * Date and time the job was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.\n * @readonly\n */\n updatedDate?: Date | null;\n /**\n * Job owner.\n * @readonly\n * @deprecated Job owner.\n * @replacedBy wix.infra.asyncjobs.v1.AsyncJob.created_by\n * @targetRemovalDate 2024-12-12\n */\n owner?: Owner;\n /**\n * Job creator.\n * @readonly\n */\n createdBy?: CreatedBy;\n /** Current execution counts. */\n counts?: Counts;\n}\n\nexport enum Type {\n UNKNOWN_TYPE = 'UNKNOWN_TYPE',\n /** Job was created by a site visitor that was **not** logged in. */\n ANONYMOUS_VISITOR_ID = 'ANONYMOUS_VISITOR_ID',\n /** Job was created by a **logged in** site visitor. */\n MEMBER_ID = 'MEMBER_ID',\n /** Job was created by a Wix user. */\n WIX_USER_ID = 'WIX_USER_ID',\n /** Job was created by an external app or app by Wix. */\n APP_ID = 'APP_ID',\n}\n\n/** @enumType */\nexport type TypeWithLiterals =\n | Type\n | 'UNKNOWN_TYPE'\n | 'ANONYMOUS_VISITOR_ID'\n | 'MEMBER_ID'\n | 'WIX_USER_ID'\n | 'APP_ID';\n\nexport interface AnonymousVisitorIdOptions {\n /**\n * Visitor ID - When the job is owned by a site visitor that was **not** logged in.\n * @format GUID\n */\n anonymousVisitorId?: string;\n}\n\nexport interface MemberIdOptions {\n /**\n * Member ID - When the job is owned by a by a **logged in** site visitor.\n * @format GUID\n */\n memberId?: string;\n}\n\nexport interface WixUserIdOptions {\n /**\n * User ID - When the job is owned by a site owner or contributor.\n * @format GUID\n */\n wixUserId?: string;\n}\n\nexport interface AppIdOptions {\n /**\n * App ID - When the job is owned by an external app. or app by Wix.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum Status {\n UNKNOWN = 'UNKNOWN',\n /** Job is created, but hasn't started yet. */\n INITIALIZED = 'INITIALIZED',\n /** Job has started and is in progress. */\n PROCESSING = 'PROCESSING',\n /** Job is finished. */\n FINISHED = 'FINISHED',\n /** Job has failed. */\n FAILED = 'FAILED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals =\n | Status\n | 'UNKNOWN'\n | 'INITIALIZED'\n | 'PROCESSING'\n | 'FINISHED'\n | 'FAILED';\n\nexport interface Counters {\n /** Optional count of the dataset size, as specified during job creation. Can be used for progress bars, etc. */\n itemsToProcess?: number | null;\n /** Amount of items that were successfully processed. */\n itemsSucceeded?: number;\n /** Amount of items whose processing failed. */\n itemsFailed?: number;\n /** Mapping between an error code and the number of failures associated with it. */\n errorCountByCode?: Record<string, number>;\n}\n\nexport interface Owner extends OwnerIdOneOf {\n /**\n * Visitor ID - when the job is owned by a site visitor that was **not** logged in.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * Member ID - When the job is owned by a by a **logged in** site visitor.\n * @format GUID\n */\n memberId?: string;\n /**\n * User ID - When the job is owned by a Wix user.\n * @format GUID\n */\n wixUserId?: string;\n /**\n * App ID - When the job is owned by an external app or app by Wix.\n * @format GUID\n */\n appId?: string;\n /**\n * Service ID.\n * @format GUID\n */\n serviceId?: string;\n}\n\n/** @oneof */\nexport interface OwnerIdOneOf {\n /**\n * Visitor ID - when the job is owned by a site visitor that was **not** logged in.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * Member ID - When the job is owned by a by a **logged in** site visitor.\n * @format GUID\n */\n memberId?: string;\n /**\n * User ID - When the job is owned by a Wix user.\n * @format GUID\n */\n wixUserId?: string;\n /**\n * App ID - When the job is owned by an external app or app by Wix.\n * @format GUID\n */\n appId?: string;\n /**\n * Service ID.\n * @format GUID\n */\n serviceId?: string;\n}\n\nexport interface CreatedBy extends CreatedByOptionsOneOf {\n /** Visitor ID - when the job is created by a site visitor that was **not** logged in. */\n anonymousVisitorIdOptions?: AnonymousVisitorIdOptions;\n /** Member ID - When the job is created by a by a **logged in** site visitor. */\n memberIdOptions?: MemberIdOptions;\n /** User ID - When the job is created by a Wix user. */\n wixUserIdOptions?: WixUserIdOptions;\n /** App ID - When the job is created by an external app or app by Wix. */\n appIdOptions?: AppIdOptions;\n /** The type of the creator. */\n type?: TypeWithLiterals;\n}\n\n/** @oneof */\nexport interface CreatedByOptionsOneOf {\n /** Visitor ID - when the job is created by a site visitor that was **not** logged in. */\n anonymousVisitorIdOptions?: AnonymousVisitorIdOptions;\n /** Member ID - When the job is created by a by a **logged in** site visitor. */\n memberIdOptions?: MemberIdOptions;\n /** User ID - When the job is created by a Wix user. */\n wixUserIdOptions?: WixUserIdOptions;\n /** App ID - When the job is created by an external app or app by Wix. */\n appIdOptions?: AppIdOptions;\n}\n\nexport interface Counts {\n /** Optional count of the dataset size, specified during job creation. Can be used for progress bars, etc. */\n total?: number | null;\n /** Amount of items that were successfully processed. */\n successCount?: number;\n /** Amount of items whose processing failed. */\n failCount?: number;\n /** Mapping between an error code and the number of failures associated with it. */\n errorByCodeCount?: Record<string, number>;\n}\n\n/** Events */\nexport interface AsyncJobFinishedEvent {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface AsyncJobFailedEvent {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface AsyncJobItemFailedEvent {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n /** Job items. */\n jobItem?: AsyncJobItem;\n}\n\nexport interface AsyncJobItem {\n /**\n * Job item ID.\n * @format GUID\n * @readonly\n */\n id?: string;\n /** Job item data, as passed by the originating service. */\n data?: Record<string, any> | null;\n /**\n * ID of the entity being processed, as passed by the originating service.\n * @minLength 1\n * @maxLength 128\n * @immutable\n */\n entityId?: string | null;\n /**\n * Whether the job item was processed successfully.\n * @readonly\n */\n success?: boolean;\n /**\n * Error that prevented the item from being processed, if relevant.\n * @immutable\n */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface CreateAsyncJobRequest {\n /** Job to create. */\n job?: AsyncJob;\n}\n\nexport interface CreateAsyncJobResponse {\n /** Created job. */\n job?: AsyncJob;\n}\n\nexport interface GetAsyncJobRequest {\n /**\n * Job ID.\n * @format GUID\n */\n jobId: string;\n}\n\nexport interface GetAsyncJobResponse {\n /** Returned job. */\n job?: AsyncJob;\n}\n\nexport interface UpdateAsyncJobRequest {\n /** Job to update. */\n job?: AsyncJob;\n}\n\nexport interface UpdateAsyncJobResponse {\n /** Updated job. */\n job?: AsyncJob;\n}\n\nexport interface DeleteAsyncJobRequest {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface DeleteAsyncJobResponse {}\n\nexport interface CompleteAsyncJobRequest {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n /** Job status. */\n status?: CompleteStatusWithLiterals;\n}\n\nexport enum CompleteStatus {\n /** Job is finished. */\n FINISHED = 'FINISHED',\n /** Job has failed. */\n FAILED = 'FAILED',\n}\n\n/** @enumType */\nexport type CompleteStatusWithLiterals = CompleteStatus | 'FINISHED' | 'FAILED';\n\nexport interface CompleteAsyncJobResponse {}\n\nexport interface ReportAsyncJobProgressRequest {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n /**\n * Job items being reported.\n * @maxSize 1000\n */\n items?: AsyncJobItem[];\n}\n\nexport interface ReportAsyncJobProgressResponse {}\n\nexport interface AsyncJobItemAddedEvent {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n /** Job items. */\n jobItem?: AsyncJobItem;\n}\n\nexport interface ListAsyncJobItemsRequest {\n /**\n * Job ID.\n * @format GUID\n */\n jobId: string;\n /** Pagination options. */\n paging?: CursorPaging;\n /** async job item status filter. */\n statusFilter?: StatusFilterWithLiterals;\n}\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 enum StatusFilter {\n /** Return all items. */\n ALL = 'ALL',\n /** Return only failed items. */\n FAILED_ONLY = 'FAILED_ONLY',\n /** Return only successful items. */\n SUCCESSFUL_ONLY = 'SUCCESSFUL_ONLY',\n}\n\n/** @enumType */\nexport type StatusFilterWithLiterals =\n | StatusFilter\n | 'ALL'\n | 'FAILED_ONLY'\n | 'SUCCESSFUL_ONLY';\n\nexport interface ListAsyncJobItemsResponse {\n /** Job items. */\n results?: AsyncJobItem[];\n /** Paging metadata. */\n pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n}\n\nexport interface Cursors {\n /**\n * Cursor pointing to next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\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 MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n","import * as ambassadorWixInfraAsyncjobsV1AsyncJob from './infra-asyncjobs-v1-async-job-async-jobs.http.js';\nimport * as ambassadorWixInfraAsyncjobsV1AsyncJobTypes from './infra-asyncjobs-v1-async-job-async-jobs.types.js';\nimport * as ambassadorWixInfraAsyncjobsV1AsyncJobUniversalTypes from './infra-asyncjobs-v1-async-job-async-jobs.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 getAsyncJob(): __PublicMethodMetaInfo<\n 'GET',\n { jobId: string },\n ambassadorWixInfraAsyncjobsV1AsyncJobUniversalTypes.GetAsyncJobRequest,\n ambassadorWixInfraAsyncjobsV1AsyncJobTypes.GetAsyncJobRequest,\n ambassadorWixInfraAsyncjobsV1AsyncJobUniversalTypes.GetAsyncJobResponse,\n ambassadorWixInfraAsyncjobsV1AsyncJobTypes.GetAsyncJobResponse\n> {\n const payload = { jobId: ':jobId' } as any;\n\n const getRequestOptions =\n ambassadorWixInfraAsyncjobsV1AsyncJob.getAsyncJob(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/async-jobs/{jobId}',\n pathParams: { jobId: 'jobId' },\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 listAsyncJobItems(): __PublicMethodMetaInfo<\n 'GET',\n { jobId: string },\n ambassadorWixInfraAsyncjobsV1AsyncJobUniversalTypes.ListAsyncJobItemsRequest,\n ambassadorWixInfraAsyncjobsV1AsyncJobTypes.ListAsyncJobItemsRequest,\n ambassadorWixInfraAsyncjobsV1AsyncJobUniversalTypes.ListAsyncJobItemsResponse,\n ambassadorWixInfraAsyncjobsV1AsyncJobTypes.ListAsyncJobItemsResponse\n> {\n const payload = { jobId: ':jobId' } as any;\n\n const getRequestOptions =\n ambassadorWixInfraAsyncjobsV1AsyncJob.listAsyncJobItems(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/async-jobs/{jobId}/items',\n pathParams: { jobId: 'jobId' },\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 AsyncJob as AsyncJobOriginal,\n Type as TypeOriginal,\n TypeWithLiterals as TypeWithLiteralsOriginal,\n AnonymousVisitorIdOptions as AnonymousVisitorIdOptionsOriginal,\n MemberIdOptions as MemberIdOptionsOriginal,\n WixUserIdOptions as WixUserIdOptionsOriginal,\n AppIdOptions as AppIdOptionsOriginal,\n Status as StatusOriginal,\n StatusWithLiterals as StatusWithLiteralsOriginal,\n Counters as CountersOriginal,\n Owner as OwnerOriginal,\n OwnerIdOneOf as OwnerIdOneOfOriginal,\n CreatedBy as CreatedByOriginal,\n CreatedByOptionsOneOf as CreatedByOptionsOneOfOriginal,\n Counts as CountsOriginal,\n AsyncJobFinishedEvent as AsyncJobFinishedEventOriginal,\n AsyncJobFailedEvent as AsyncJobFailedEventOriginal,\n AsyncJobItemFailedEvent as AsyncJobItemFailedEventOriginal,\n AsyncJobItem as AsyncJobItemOriginal,\n ApplicationError as ApplicationErrorOriginal,\n CreateAsyncJobRequest as CreateAsyncJobRequestOriginal,\n CreateAsyncJobResponse as CreateAsyncJobResponseOriginal,\n GetAsyncJobRequest as GetAsyncJobRequestOriginal,\n GetAsyncJobResponse as GetAsyncJobResponseOriginal,\n UpdateAsyncJobRequest as UpdateAsyncJobRequestOriginal,\n UpdateAsyncJobResponse as UpdateAsyncJobResponseOriginal,\n DeleteAsyncJobRequest as DeleteAsyncJobRequestOriginal,\n DeleteAsyncJobResponse as DeleteAsyncJobResponseOriginal,\n CompleteAsyncJobRequest as CompleteAsyncJobRequestOriginal,\n CompleteStatus as CompleteStatusOriginal,\n CompleteStatusWithLiterals as CompleteStatusWithLiteralsOriginal,\n CompleteAsyncJobResponse as CompleteAsyncJobResponseOriginal,\n ReportAsyncJobProgressRequest as ReportAsyncJobProgressRequestOriginal,\n ReportAsyncJobProgressResponse as ReportAsyncJobProgressResponseOriginal,\n AsyncJobItemAddedEvent as AsyncJobItemAddedEventOriginal,\n ListAsyncJobItemsRequest as ListAsyncJobItemsRequestOriginal,\n CursorPaging as CursorPagingOriginal,\n StatusFilter as StatusFilterOriginal,\n StatusFilterWithLiterals as StatusFilterWithLiteralsOriginal,\n ListAsyncJobItemsResponse as ListAsyncJobItemsResponseOriginal,\n PagingMetadataV2 as PagingMetadataV2Original,\n Cursors as CursorsOriginal,\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 MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n AccountInfo as AccountInfoOriginal,\n} from './infra-asyncjobs-v1-async-job-async-jobs.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAAA;AAAA,EAAA,yBAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,uBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,6CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;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,mBAAmB;AAAA,MACjB;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,sBAAsB;AAAA,MACpB;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;A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;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,qBAOd;AACA,QAAM,UAAU,EAAE,OAAO,SAAS;AAElC,QAAM,oBACkC,kBAAkB,OAAO;AAEjE,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,OAAO,QAAQ;AAAA,IAC7B,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["getAsyncJob","listAsyncJobItems","import_rest_modules","payload","Type","Status","CompleteStatus","StatusFilter","WebhookIdentityType","getAsyncJob","listAsyncJobItems"]}
|
|
1
|
+
{"version":3,"sources":["../../meta.ts","../../src/infra-asyncjobs-v1-async-job-async-jobs.http.ts","../../src/infra-asyncjobs-v1-async-job-async-jobs.types.ts","../../src/infra-asyncjobs-v1-async-job-async-jobs.meta.ts"],"sourcesContent":["export * from './src/infra-asyncjobs-v1-async-job-async-jobs.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 resolveWixInfraAsyncjobsV1AsyncJobServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/async-job-service',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/async-jobs',\n destPath: '/v1/async-jobs',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/async-jobs',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/async-jobs',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/async-jobs',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/async-jobs',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/async-jobs',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/async-jobs',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/async-job-service',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/async-job-service',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/async-job-service',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_async-jobs_async-jobs';\n\n/** Retrieves a job. */\nexport function getAsyncJob(payload: object): RequestOptionsFactory<any> {\n function __getAsyncJob({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.infra.asyncjobs.v1.async_job',\n method: 'GET' as any,\n methodFqn: 'wix.infra.asyncjobs.v1.AsyncJobService.GetAsyncJob',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInfraAsyncjobsV1AsyncJobServiceUrl({\n protoPath: '/v1/async-jobs/{jobId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'job.createdDate' }, { path: 'job.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getAsyncJob;\n}\n\n/** Retrieves a list of job items. */\nexport function listAsyncJobItems(payload: object): RequestOptionsFactory<any> {\n function __listAsyncJobItems({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.infra.asyncjobs.v1.async_job',\n method: 'GET' as any,\n methodFqn: 'wix.infra.asyncjobs.v1.AsyncJobService.ListAsyncJobItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInfraAsyncjobsV1AsyncJobServiceUrl({\n protoPath: '/v1/async-jobs/{jobId}/items',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listAsyncJobItems;\n}\n","export interface AsyncJob {\n /**\n * Job ID.\n * @format GUID\n * @readonly\n */\n id?: string;\n /** Optional job metadata, used to store any parameters used during job execution, user-defined statuses, etc. */\n metadata?: Record<string, any> | null;\n /** Current job execution status. */\n status?: StatusWithLiterals;\n /**\n * Current counters.\n * @deprecated Current counters.\n * @replacedBy wix.infra.asyncjobs.v1.AsyncJob.counts\n * @targetRemovalDate 2024-12-12\n */\n counters?: Counters;\n /**\n * Date and time the job was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.\n * @readonly\n */\n createdDate?: Date | null;\n /**\n * Date and time the job was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.\n * @readonly\n */\n updatedDate?: Date | null;\n /**\n * Job owner.\n * @readonly\n * @deprecated Job owner.\n * @replacedBy wix.infra.asyncjobs.v1.AsyncJob.created_by\n * @targetRemovalDate 2024-12-12\n */\n owner?: Owner;\n /**\n * Job creator.\n * @readonly\n */\n createdBy?: CreatedBy;\n /** Current execution counts. */\n counts?: Counts;\n}\n\nexport enum Type {\n UNKNOWN_TYPE = 'UNKNOWN_TYPE',\n /** Job was created by a site visitor that was **not** logged in. */\n ANONYMOUS_VISITOR_ID = 'ANONYMOUS_VISITOR_ID',\n /** Job was created by a **logged in** site visitor. */\n MEMBER_ID = 'MEMBER_ID',\n /** Job was created by a Wix user. */\n WIX_USER_ID = 'WIX_USER_ID',\n /** Job was created by an external app or app by Wix. */\n APP_ID = 'APP_ID',\n}\n\n/** @enumType */\nexport type TypeWithLiterals =\n | Type\n | 'UNKNOWN_TYPE'\n | 'ANONYMOUS_VISITOR_ID'\n | 'MEMBER_ID'\n | 'WIX_USER_ID'\n | 'APP_ID';\n\nexport interface AnonymousVisitorIdOptions {\n /**\n * Visitor ID - When the job is owned by a site visitor that was **not** logged in.\n * @format GUID\n */\n anonymousVisitorId?: string;\n}\n\nexport interface MemberIdOptions {\n /**\n * Member ID - When the job is owned by a by a **logged in** site visitor.\n * @format GUID\n */\n memberId?: string;\n}\n\nexport interface WixUserIdOptions {\n /**\n * User ID - When the job is owned by a site owner or contributor.\n * @format GUID\n */\n wixUserId?: string;\n}\n\nexport interface AppIdOptions {\n /**\n * App ID - When the job is owned by an external app. or app by Wix.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum Status {\n UNKNOWN = 'UNKNOWN',\n /** Job is created, but hasn't started yet. */\n INITIALIZED = 'INITIALIZED',\n /** Job has started and is in progress. */\n PROCESSING = 'PROCESSING',\n /** Job is finished. */\n FINISHED = 'FINISHED',\n /** Job has failed. */\n FAILED = 'FAILED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals =\n | Status\n | 'UNKNOWN'\n | 'INITIALIZED'\n | 'PROCESSING'\n | 'FINISHED'\n | 'FAILED';\n\nexport interface Counters {\n /** Optional count of the dataset size, as specified during job creation. Can be used for progress bars, etc. */\n itemsToProcess?: number | null;\n /** Amount of items that were successfully processed. */\n itemsSucceeded?: number;\n /** Amount of items whose processing failed. */\n itemsFailed?: number;\n /** Mapping between an error code and the number of failures associated with it. */\n errorCountByCode?: Record<string, number>;\n}\n\nexport interface Owner extends OwnerIdOneOf {\n /**\n * Visitor ID - when the job is owned by a site visitor that was **not** logged in.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * Member ID - When the job is owned by a by a **logged in** site visitor.\n * @format GUID\n */\n memberId?: string;\n /**\n * User ID - When the job is owned by a Wix user.\n * @format GUID\n */\n wixUserId?: string;\n /**\n * App ID - When the job is owned by an external app or app by Wix.\n * @format GUID\n */\n appId?: string;\n /**\n * Service ID.\n * @format GUID\n */\n serviceId?: string;\n}\n\n/** @oneof */\nexport interface OwnerIdOneOf {\n /**\n * Visitor ID - when the job is owned by a site visitor that was **not** logged in.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * Member ID - When the job is owned by a by a **logged in** site visitor.\n * @format GUID\n */\n memberId?: string;\n /**\n * User ID - When the job is owned by a Wix user.\n * @format GUID\n */\n wixUserId?: string;\n /**\n * App ID - When the job is owned by an external app or app by Wix.\n * @format GUID\n */\n appId?: string;\n /**\n * Service ID.\n * @format GUID\n */\n serviceId?: string;\n}\n\nexport interface CreatedBy extends CreatedByOptionsOneOf {\n /** Visitor ID - when the job is created by a site visitor that was **not** logged in. */\n anonymousVisitorIdOptions?: AnonymousVisitorIdOptions;\n /** Member ID - When the job is created by a by a **logged in** site visitor. */\n memberIdOptions?: MemberIdOptions;\n /** User ID - When the job is created by a Wix user. */\n wixUserIdOptions?: WixUserIdOptions;\n /** App ID - When the job is created by an external app or app by Wix. */\n appIdOptions?: AppIdOptions;\n /** The type of the creator. */\n type?: TypeWithLiterals;\n}\n\n/** @oneof */\nexport interface CreatedByOptionsOneOf {\n /** Visitor ID - when the job is created by a site visitor that was **not** logged in. */\n anonymousVisitorIdOptions?: AnonymousVisitorIdOptions;\n /** Member ID - When the job is created by a by a **logged in** site visitor. */\n memberIdOptions?: MemberIdOptions;\n /** User ID - When the job is created by a Wix user. */\n wixUserIdOptions?: WixUserIdOptions;\n /** App ID - When the job is created by an external app or app by Wix. */\n appIdOptions?: AppIdOptions;\n}\n\nexport interface Counts {\n /** Optional count of the dataset size, specified during job creation. Can be used for progress bars, etc. */\n total?: number | null;\n /** Amount of items that were successfully processed. */\n successCount?: number;\n /** Amount of items whose processing failed. */\n failCount?: number;\n /** Mapping between an error code and the number of failures associated with it. */\n errorByCodeCount?: Record<string, number>;\n}\n\n/** Events */\nexport interface AsyncJobFinishedEvent {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface AsyncJobFailedEvent {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface AsyncJobItemFailedEvent {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n /** Job items. */\n jobItem?: AsyncJobItem;\n}\n\nexport interface AsyncJobItem {\n /**\n * Job item ID.\n * @format GUID\n * @readonly\n */\n id?: string;\n /** Job item data, as passed by the originating service. */\n data?: Record<string, any> | null;\n /**\n * ID of the entity being processed, as passed by the originating service.\n * @minLength 1\n * @maxLength 128\n * @immutable\n */\n entityId?: string | null;\n /**\n * Whether the job item was processed successfully.\n * @readonly\n */\n success?: boolean;\n /**\n * Error that prevented the item from being processed, if relevant.\n * @immutable\n */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface CreateAsyncJobRequest {\n /** Job to create. */\n job?: AsyncJob;\n}\n\nexport interface CreateAsyncJobResponse {\n /** Created job. */\n job?: AsyncJob;\n}\n\nexport interface GetAsyncJobRequest {\n /**\n * Job ID.\n * @format GUID\n */\n jobId: string;\n}\n\nexport interface GetAsyncJobResponse {\n /** Returned job. */\n job?: AsyncJob;\n}\n\nexport interface UpdateAsyncJobRequest {\n /** Job to update. */\n job?: AsyncJob;\n}\n\nexport interface UpdateAsyncJobResponse {\n /** Updated job. */\n job?: AsyncJob;\n}\n\nexport interface DeleteAsyncJobRequest {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface DeleteAsyncJobResponse {}\n\nexport interface CompleteAsyncJobRequest {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n /** Job status. */\n status?: CompleteStatusWithLiterals;\n}\n\nexport enum CompleteStatus {\n /** Job is finished. */\n FINISHED = 'FINISHED',\n /** Job has failed. */\n FAILED = 'FAILED',\n}\n\n/** @enumType */\nexport type CompleteStatusWithLiterals = CompleteStatus | 'FINISHED' | 'FAILED';\n\nexport interface CompleteAsyncJobResponse {}\n\nexport interface ReportAsyncJobProgressRequest {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n /**\n * Job items being reported.\n * @maxSize 1000\n */\n items?: AsyncJobItem[];\n}\n\nexport interface ReportAsyncJobProgressResponse {}\n\nexport interface AsyncJobItemAddedEvent {\n /**\n * Job ID.\n * @format GUID\n */\n jobId?: string;\n /** Job items. */\n jobItem?: AsyncJobItem;\n}\n\nexport interface ListAsyncJobItemsRequest {\n /**\n * Job ID.\n * @format GUID\n */\n jobId: string;\n /** Pagination options. */\n paging?: CursorPaging;\n /** async job item status filter. */\n statusFilter?: StatusFilterWithLiterals;\n}\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 enum StatusFilter {\n /** Return all items. */\n ALL = 'ALL',\n /** Return only failed items. */\n FAILED_ONLY = 'FAILED_ONLY',\n /** Return only successful items. */\n SUCCESSFUL_ONLY = 'SUCCESSFUL_ONLY',\n}\n\n/** @enumType */\nexport type StatusFilterWithLiterals =\n | StatusFilter\n | 'ALL'\n | 'FAILED_ONLY'\n | 'SUCCESSFUL_ONLY';\n\nexport interface ListAsyncJobItemsResponse {\n /** Job items. */\n results?: AsyncJobItem[];\n /** Paging metadata. */\n pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n}\n\nexport interface Cursors {\n /**\n * Cursor pointing to next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\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 MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n","import * as ambassadorWixInfraAsyncjobsV1AsyncJob from './infra-asyncjobs-v1-async-job-async-jobs.http.js';\nimport * as ambassadorWixInfraAsyncjobsV1AsyncJobTypes from './infra-asyncjobs-v1-async-job-async-jobs.types.js';\nimport * as ambassadorWixInfraAsyncjobsV1AsyncJobUniversalTypes from './infra-asyncjobs-v1-async-job-async-jobs.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 getAsyncJob(): __PublicMethodMetaInfo<\n 'GET',\n { jobId: string },\n ambassadorWixInfraAsyncjobsV1AsyncJobUniversalTypes.GetAsyncJobRequest,\n ambassadorWixInfraAsyncjobsV1AsyncJobTypes.GetAsyncJobRequest,\n ambassadorWixInfraAsyncjobsV1AsyncJobUniversalTypes.GetAsyncJobResponse,\n ambassadorWixInfraAsyncjobsV1AsyncJobTypes.GetAsyncJobResponse\n> {\n const payload = { jobId: ':jobId' } as any;\n\n const getRequestOptions =\n ambassadorWixInfraAsyncjobsV1AsyncJob.getAsyncJob(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/async-jobs/{jobId}',\n pathParams: { jobId: 'jobId' },\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 listAsyncJobItems(): __PublicMethodMetaInfo<\n 'GET',\n { jobId: string },\n ambassadorWixInfraAsyncjobsV1AsyncJobUniversalTypes.ListAsyncJobItemsRequest,\n ambassadorWixInfraAsyncjobsV1AsyncJobTypes.ListAsyncJobItemsRequest,\n ambassadorWixInfraAsyncjobsV1AsyncJobUniversalTypes.ListAsyncJobItemsResponse,\n ambassadorWixInfraAsyncjobsV1AsyncJobTypes.ListAsyncJobItemsResponse\n> {\n const payload = { jobId: ':jobId' } as any;\n\n const getRequestOptions =\n ambassadorWixInfraAsyncjobsV1AsyncJob.listAsyncJobItems(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/async-jobs/{jobId}/items',\n pathParams: { jobId: 'jobId' },\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 AsyncJob as AsyncJobOriginal,\n Type as TypeOriginal,\n TypeWithLiterals as TypeWithLiteralsOriginal,\n AnonymousVisitorIdOptions as AnonymousVisitorIdOptionsOriginal,\n MemberIdOptions as MemberIdOptionsOriginal,\n WixUserIdOptions as WixUserIdOptionsOriginal,\n AppIdOptions as AppIdOptionsOriginal,\n Status as StatusOriginal,\n StatusWithLiterals as StatusWithLiteralsOriginal,\n Counters as CountersOriginal,\n Owner as OwnerOriginal,\n OwnerIdOneOf as OwnerIdOneOfOriginal,\n CreatedBy as CreatedByOriginal,\n CreatedByOptionsOneOf as CreatedByOptionsOneOfOriginal,\n Counts as CountsOriginal,\n AsyncJobFinishedEvent as AsyncJobFinishedEventOriginal,\n AsyncJobFailedEvent as AsyncJobFailedEventOriginal,\n AsyncJobItemFailedEvent as AsyncJobItemFailedEventOriginal,\n AsyncJobItem as AsyncJobItemOriginal,\n ApplicationError as ApplicationErrorOriginal,\n CreateAsyncJobRequest as CreateAsyncJobRequestOriginal,\n CreateAsyncJobResponse as CreateAsyncJobResponseOriginal,\n GetAsyncJobRequest as GetAsyncJobRequestOriginal,\n GetAsyncJobResponse as GetAsyncJobResponseOriginal,\n UpdateAsyncJobRequest as UpdateAsyncJobRequestOriginal,\n UpdateAsyncJobResponse as UpdateAsyncJobResponseOriginal,\n DeleteAsyncJobRequest as DeleteAsyncJobRequestOriginal,\n DeleteAsyncJobResponse as DeleteAsyncJobResponseOriginal,\n CompleteAsyncJobRequest as CompleteAsyncJobRequestOriginal,\n CompleteStatus as CompleteStatusOriginal,\n CompleteStatusWithLiterals as CompleteStatusWithLiteralsOriginal,\n CompleteAsyncJobResponse as CompleteAsyncJobResponseOriginal,\n ReportAsyncJobProgressRequest as ReportAsyncJobProgressRequestOriginal,\n ReportAsyncJobProgressResponse as ReportAsyncJobProgressResponseOriginal,\n AsyncJobItemAddedEvent as AsyncJobItemAddedEventOriginal,\n ListAsyncJobItemsRequest as ListAsyncJobItemsRequestOriginal,\n CursorPaging as CursorPagingOriginal,\n StatusFilter as StatusFilterOriginal,\n StatusFilterWithLiterals as StatusFilterWithLiteralsOriginal,\n ListAsyncJobItemsResponse as ListAsyncJobItemsResponseOriginal,\n PagingMetadataV2 as PagingMetadataV2Original,\n Cursors as CursorsOriginal,\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 MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n AccountInfo as AccountInfoOriginal,\n} from './infra-asyncjobs-v1-async-job-async-jobs.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA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AuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["getAsyncJob","listAsyncJobItems","import_rest_modules","payload","Type","Status","CompleteStatus","StatusFilter","WebhookIdentityType","getAsyncJob","listAsyncJobItems"]}
|