@wix/auto_sdk_payments_tax-documents 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/build/cjs/index.js.map +1 -1
  2. package/build/cjs/index.typings.js.map +1 -1
  3. package/build/cjs/meta.js.map +1 -1
  4. package/build/es/index.mjs.map +1 -1
  5. package/build/es/index.typings.mjs.map +1 -1
  6. package/build/es/meta.mjs.map +1 -1
  7. package/build/internal/cjs/index.typings.d.ts +44 -0
  8. package/build/internal/cjs/meta.d.ts +86 -0
  9. package/build/internal/es/index.typings.d.mts +44 -0
  10. package/build/internal/es/meta.d.mts +86 -0
  11. package/package.json +5 -12
  12. package/build/cjs/schemas.d.ts +0 -85
  13. package/build/cjs/schemas.js +0 -183
  14. package/build/cjs/schemas.js.map +0 -1
  15. package/build/es/schemas.d.mts +0 -85
  16. package/build/es/schemas.mjs +0 -141
  17. package/build/es/schemas.mjs.map +0 -1
  18. package/build/internal/cjs/index.js +0 -342
  19. package/build/internal/cjs/index.js.map +0 -1
  20. package/build/internal/cjs/index.typings.js +0 -312
  21. package/build/internal/cjs/index.typings.js.map +0 -1
  22. package/build/internal/cjs/meta.js +0 -274
  23. package/build/internal/cjs/meta.js.map +0 -1
  24. package/build/internal/cjs/schemas.d.ts +0 -85
  25. package/build/internal/cjs/schemas.js +0 -183
  26. package/build/internal/cjs/schemas.js.map +0 -1
  27. package/build/internal/es/index.mjs +0 -313
  28. package/build/internal/es/index.mjs.map +0 -1
  29. package/build/internal/es/index.typings.mjs +0 -283
  30. package/build/internal/es/index.typings.mjs.map +0 -1
  31. package/build/internal/es/meta.mjs +0 -242
  32. package/build/internal/es/meta.mjs.map +0 -1
  33. package/build/internal/es/schemas.d.mts +0 -85
  34. package/build/internal/es/schemas.mjs +0 -141
  35. package/build/internal/es/schemas.mjs.map +0 -1
  36. package/schemas/package.json +0 -3
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts","../../src/payments-tax-documents-v1-tax-document-tax-documents.universal.ts","../../src/payments-tax-documents-v1-tax-document-tax-documents.http.ts","../../src/payments-tax-documents-v1-tax-document-tax-documents.public.ts","../../src/payments-tax-documents-v1-tax-document-tax-documents.context.ts"],"sourcesContent":["export * from './src/payments-tax-documents-v1-tax-document-tax-documents.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 ambassadorWixPaymentsTaxDocumentsV1TaxDocument from './payments-tax-documents-v1-tax-document-tax-documents.http.js';\nimport { transformRESTDocumentToSDKDocument } from '@wix/sdk-runtime/transformations/document';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/**\n * A tax document is a tax-related form that Wix Payments issues to a merchant, such as a US IRS Form 1099-K.\n * Each tax document belongs to a Wix Payments account and covers a specific period.\n * When a document's file is available, you can generate a temporary URL to download it as a PDF.\n */\nexport interface TaxDocument {\n /**\n * Tax document ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Date and time the tax document was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the tax document was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Revision number, which increments by 1 each time the tax document is updated.\n * @readonly\n */\n revision?: string;\n /**\n * ID of the Wix Payments account the tax document belongs to.\n * @format GUID\n * @immutable\n */\n accountId?: string;\n /**\n * Type of tax document.\n * @immutable\n */\n type?: TaxDocumentTypeWithLiterals;\n /**\n * Period the tax document covers.\n * @immutable\n */\n period?: TaxPeriod;\n /**\n * Whether a file is available to download for the tax document. When `false`, calling Generate File Download Info returns an error.\n *\n * At least one of `downloadable` and `problematic` is always `true`.\n */\n downloadable?: boolean;\n /**\n * Whether a problem was found with the tax document's file, for example incorrect data that's being corrected.\n *\n * At least one of `downloadable` and `problematic` is always `true`, and both can be `true` at the same time.\n */\n problematic?: boolean;\n /**\n * How the tax document's amounts are aggregated.\n * @readonly\n */\n sourceType?: SourceTypeWithLiterals;\n /**\n * Human-readable name for the tax document's file.\n * @readonly\n * @minLength 1\n * @maxLength 1000\n */\n displayName?: string | null;\n}\n\n/** Type of tax document. */\nexport enum TaxDocumentType {\n /** US IRS Form 1099-K. */\n FORM_1099_K = 'FORM_1099_K',\n}\n\n/** @enumType */\nexport type TaxDocumentTypeWithLiterals = TaxDocumentType | 'FORM_1099_K';\n\nexport interface TaxPeriod extends TaxPeriodOptionsOneOf {\n /** The tax document covers a full calendar year. */\n yearPeriod?: YearPeriod;\n}\n\n/** @oneof */\nexport interface TaxPeriodOptionsOneOf {\n /** The tax document covers a full calendar year. */\n yearPeriod?: YearPeriod;\n}\n\nexport interface YearPeriod {\n /** Calendar year the tax document covers. For example, `2024`. */\n year?: number;\n}\n\n/** Source of data for tax document. */\nexport enum SourceType {\n /** Amounts are aggregated by payment date. */\n PAYMENT = 'PAYMENT',\n /** Amounts are aggregated by payout date. */\n PAYOUT = 'PAYOUT',\n}\n\n/** @enumType */\nexport type SourceTypeWithLiterals = SourceType | 'PAYMENT' | 'PAYOUT';\n\nexport interface GetTaxDocumentFileHistoryRequest {\n /**\n * Id of a tax document.\n * @format GUID\n */\n taxDocumentId?: string;\n}\n\nexport interface GetTaxDocumentFileHistoryResponse {\n /** Tax document history. */\n taxDocumentFileHistory?: TaxDocumentFileHistory;\n}\n\nexport interface TaxDocumentFileHistory {\n /**\n * Tax document identifier.\n * @format GUID\n */\n taxDocumentId?: string;\n /**\n * File history records which correspond to file versions for this tax document.\n * Includes current file version, if it exists.\n * Sorted in descending order by `created_date`.\n * @maxSize 100\n */\n records?: TaxDocumentFileHistoryRecord[];\n}\n\nexport interface TaxDocumentFileHistoryRecord {\n /**\n * History record identifier.\n * @format GUID\n */\n _id?: string;\n /**\n * Date when tax document file was uploaded.\n * History record is created at the same moment.\n * @readonly\n */\n _createdDate?: Date | null;\n}\n\nexport interface GenerateHistoryFileDownloadInfoRequest {\n /**\n * Tax document to download a file for.\n * @format GUID\n */\n taxDocumentId?: string;\n /**\n * Tax document history record to download a file for.\n * @format GUID\n */\n taxDocumentFileHistoryRecordId?: string;\n}\n\nexport interface GenerateHistoryFileDownloadInfoResponse {\n /** Information used to download a file. */\n downloadInfo?: string;\n}\n\nexport interface UpdateTaxDocumentRequest {\n /** Tax document to update. */\n taxDocument?: TaxDocument;\n}\n\nexport interface UpdateTaxDocumentResponse {\n /** Updated tax document. */\n taxDocument?: TaxDocument;\n}\n\nexport interface RefreshTaxDocumentFileRequest {\n /**\n * Tax document to be updated.\n * @format GUID\n */\n taxDocumentId?: string;\n /** Flag represents whether ping notification to user should be sent if the tax document is successfully updated. */\n notifyOnSuccess?: boolean;\n}\n\nexport interface RefreshTaxDocumentFileResponse {\n /** Latest version of the tax document. */\n taxDocument?: TaxDocument;\n /** Represents whether the document was updated. */\n updated?: boolean;\n}\n\nexport interface GenerateFileUploadTargetRequest {\n /**\n * Tax document for file upload.\n * @format GUID\n */\n taxDocumentId?: string;\n}\n\nexport interface GenerateFileUploadTargetResponse {\n /** Upload target. */\n uploadTarget?: FileUploadTarget;\n}\n\nexport interface FileUploadTarget {\n /**\n * File upload URL.\n * @format WEB_URL\n */\n uploadUrl?: string;\n /**\n * File upload token.\n * @minLength 1\n * @maxLength 1000\n */\n uploadToken?: string;\n}\n\nexport interface ConfirmFileUploadedRequest {\n /**\n * Tax document for which there was a successful upload.\n * @format GUID\n */\n taxDocumentId?: string;\n}\n\nexport interface ConfirmFileUploadedResponse {}\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\nexport interface GetTaxDocumentRequest {\n /**\n * ID of the tax document to retrieve.\n * @format GUID\n */\n taxDocumentId: string;\n}\n\nexport interface GetTaxDocumentResponse {\n /** Retrieved tax document. */\n taxDocument?: TaxDocument;\n}\n\nexport interface ListTaxDocumentsRequest {\n /**\n * ID of the Wix Payments account whose tax documents are retrieved.\n * @format GUID\n */\n accountId: string | null;\n /** Cursor paging options. */\n paging?: CursorPaging;\n /** Filters the retrieved tax documents by type. When omitted, tax documents of all types are returned. */\n type?: TaxDocumentTypeWithLiterals;\n}\n\nexport interface CursorPaging {\n /**\n * Number of items to load.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * You can get the relevant cursor token\n * from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface ListTaxDocumentsResponse {\n /** Retrieved tax documents. */\n taxDocuments?: TaxDocument[];\n /** Paging metadata. */\n pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | 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 GenerateFileDownloadInfoRequest {\n /**\n * ID of the tax document to download a file for.\n * @format GUID\n */\n taxDocumentId: string;\n}\n\nexport interface GenerateFileDownloadInfoResponse {\n /** Information for downloading the tax document's file. */\n downloadInfo?: string;\n}\n\n/**\n * Retrieves a tax document by ID.\n * @param taxDocumentId - ID of the tax document to retrieve.\n * @public\n * @documentationMaturity preview\n * @requiredField taxDocumentId\n * @permissionId PAYMENTS.TAX_DOCUMENT_READ\n * @applicableIdentity APP\n * @returns Retrieved tax document.\n * @fqn wix.payments.tax_documents.v1.TaxDocumentsService.GetTaxDocument\n */\nexport async function getTaxDocument(\n taxDocumentId: string\n): Promise<\n NonNullablePaths<\n TaxDocument,\n | `revision`\n | `accountId`\n | `type`\n | `period.yearPeriod.year`\n | `downloadable`\n | `problematic`\n | `sourceType`,\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({\n taxDocumentId: taxDocumentId,\n });\n\n const reqOpts =\n ambassadorWixPaymentsTaxDocumentsV1TaxDocument.getTaxDocument(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.taxDocument!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { taxDocumentId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['taxDocumentId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of tax documents that belong to a Wix Payments account.\n *\n * You must specify the `accountId` of the account whose tax documents you want to retrieve.\n *\n * Tax documents are sorted in descending order by `period`, then by `createdDate`.\n *\n * When `type` is omitted, tax documents of all types are returned.\n * @param accountId - ID of the Wix Payments account whose tax documents are retrieved.\n * @public\n * @documentationMaturity preview\n * @requiredField accountId\n * @permissionId PAYMENTS.TAX_DOCUMENT_READ\n * @applicableIdentity APP\n * @fqn wix.payments.tax_documents.v1.TaxDocumentsService.ListTaxDocuments\n */\nexport async function listTaxDocuments(\n accountId: string,\n options?: ListTaxDocumentsOptions\n): Promise<\n NonNullablePaths<\n ListTaxDocumentsResponse,\n | `taxDocuments`\n | `taxDocuments.${number}.revision`\n | `taxDocuments.${number}.accountId`\n | `taxDocuments.${number}.type`\n | `taxDocuments.${number}.period.yearPeriod.year`\n | `taxDocuments.${number}.downloadable`\n | `taxDocuments.${number}.problematic`\n | `taxDocuments.${number}.sourceType`,\n 6\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 accountId: accountId,\n paging: options?.paging,\n type: options?.type,\n });\n\n const reqOpts =\n ambassadorWixPaymentsTaxDocumentsV1TaxDocument.listTaxDocuments(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 accountId: '$[0]',\n paging: '$[1].paging',\n type: '$[1].type',\n },\n singleArgumentUnchanged: false,\n },\n ['accountId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListTaxDocumentsOptions {\n /** Cursor paging options. */\n paging?: CursorPaging;\n /** Filters the retrieved tax documents by type. When omitted, tax documents of all types are returned. */\n type?: TaxDocumentTypeWithLiterals;\n}\n\n/**\n * Generates temporary information for downloading a tax document's file.\n *\n * The returned `downloadInfo.url` is a temporary link to a PDF. It expires 10 seconds after it's generated, so follow it immediately, and don't store it as a static link. Call this method again to get a fresh URL.\n *\n * The tax document must have a file available, meaning its `downloadable` field is `true`.\n * @param taxDocumentId - ID of the tax document to download a file for.\n * @public\n * @documentationMaturity preview\n * @requiredField taxDocumentId\n * @permissionId PAYMENTS.TAX_DOCUMENT_DOWNLOAD\n * @applicableIdentity APP\n * @fqn wix.payments.tax_documents.v1.TaxDocumentsService.GenerateFileDownloadInfo\n */\nexport async function generateFileDownloadInfo(\n taxDocumentId: string\n): Promise<GenerateFileDownloadInfoResponse> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n taxDocumentId: taxDocumentId,\n });\n\n const reqOpts =\n ambassadorWixPaymentsTaxDocumentsV1TaxDocument.generateFileDownloadInfo(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTDocumentToSDKDocument,\n paths: [{ path: 'downloadInfo' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { taxDocumentId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['taxDocumentId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixPaymentsTaxDocumentsV1TaxDocumentsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/tax-document-service/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n {\n srcPath: '/_api/finance/wix-payments/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/tax-document-service/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/tax-document-service/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/tax-document-service/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n 'manage.base44.com': [\n {\n srcPath: '/_api/tax-document-service',\n destPath: '',\n },\n ],\n 'payments.base44.com': [\n {\n srcPath: '/_api/tax-document-service',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/payments/platform/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n _: [\n {\n srcPath: '/payments/platform/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/payments/platform/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_payments_tax-documents';\n\n/** Retrieves a tax document by ID. */\nexport function getTaxDocument(payload: object): RequestOptionsFactory<any> {\n function __getTaxDocument({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.tax_documents.v1.tax_document',\n method: 'GET' as any,\n methodFqn:\n 'wix.payments.tax_documents.v1.TaxDocumentsService.GetTaxDocument',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsTaxDocumentsV1TaxDocumentsServiceUrl({\n protoPath: '/v1/tax-documents/{taxDocumentId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'taxDocument.createdDate' },\n { path: 'taxDocument.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getTaxDocument;\n}\n\n/**\n * Retrieves a list of tax documents that belong to a Wix Payments account.\n *\n * You must specify the `accountId` of the account whose tax documents you want to retrieve.\n *\n * Tax documents are sorted in descending order by `period`, then by `createdDate`.\n *\n * When `type` is omitted, tax documents of all types are returned.\n */\nexport function listTaxDocuments(payload: object): RequestOptionsFactory<any> {\n function __listTaxDocuments({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.tax_documents.v1.tax_document',\n method: 'GET' as any,\n methodFqn:\n 'wix.payments.tax_documents.v1.TaxDocumentsService.ListTaxDocuments',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsTaxDocumentsV1TaxDocumentsServiceUrl({\n protoPath: '/v1/tax-documents',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'taxDocuments.createdDate' },\n { path: 'taxDocuments.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listTaxDocuments;\n}\n\n/**\n * Generates temporary information for downloading a tax document's file.\n *\n * The returned `downloadInfo.url` is a temporary link to a PDF. It expires 10 seconds after it's generated, so follow it immediately, and don't store it as a static link. Call this method again to get a fresh URL.\n *\n * The tax document must have a file available, meaning its `downloadable` field is `true`.\n */\nexport function generateFileDownloadInfo(\n payload: object\n): RequestOptionsFactory<any> {\n function __generateFileDownloadInfo({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.tax_documents.v1.tax_document',\n method: 'GET' as any,\n methodFqn:\n 'wix.payments.tax_documents.v1.TaxDocumentsService.GenerateFileDownloadInfo',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsTaxDocumentsV1TaxDocumentsServiceUrl({\n protoPath:\n '/v1/tax-documents/{taxDocumentId}/generate-file-download-info',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'downloadInfo.urlExpirationDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __generateFileDownloadInfo;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n GenerateFileDownloadInfoResponse,\n ListTaxDocumentsOptions,\n ListTaxDocumentsResponse,\n TaxDocument,\n generateFileDownloadInfo as universalGenerateFileDownloadInfo,\n getTaxDocument as universalGetTaxDocument,\n listTaxDocuments as universalListTaxDocuments,\n} from './payments-tax-documents-v1-tax-document-tax-documents.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/payments' };\n\nexport function getTaxDocument(\n httpClient: HttpClient\n): GetTaxDocumentSignature {\n return (taxDocumentId: string) =>\n universalGetTaxDocument(\n taxDocumentId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetTaxDocumentSignature {\n /**\n * Retrieves a tax document by ID.\n * @param - ID of the tax document to retrieve.\n * @returns Retrieved tax document.\n */\n (taxDocumentId: string): Promise<\n NonNullablePaths<\n TaxDocument,\n | `revision`\n | `accountId`\n | `type`\n | `period.yearPeriod.year`\n | `downloadable`\n | `problematic`\n | `sourceType`,\n 4\n >\n >;\n}\n\nexport function listTaxDocuments(\n httpClient: HttpClient\n): ListTaxDocumentsSignature {\n return (accountId: string, options?: ListTaxDocumentsOptions) =>\n universalListTaxDocuments(\n accountId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListTaxDocumentsSignature {\n /**\n * Retrieves a list of tax documents that belong to a Wix Payments account.\n *\n * You must specify the `accountId` of the account whose tax documents you want to retrieve.\n *\n * Tax documents are sorted in descending order by `period`, then by `createdDate`.\n *\n * When `type` is omitted, tax documents of all types are returned.\n * @param - ID of the Wix Payments account whose tax documents are retrieved.\n */\n (accountId: string, options?: ListTaxDocumentsOptions): Promise<\n NonNullablePaths<\n ListTaxDocumentsResponse,\n | `taxDocuments`\n | `taxDocuments.${number}.revision`\n | `taxDocuments.${number}.accountId`\n | `taxDocuments.${number}.type`\n | `taxDocuments.${number}.period.yearPeriod.year`\n | `taxDocuments.${number}.downloadable`\n | `taxDocuments.${number}.problematic`\n | `taxDocuments.${number}.sourceType`,\n 6\n >\n >;\n}\n\nexport function generateFileDownloadInfo(\n httpClient: HttpClient\n): GenerateFileDownloadInfoSignature {\n return (taxDocumentId: string) =>\n universalGenerateFileDownloadInfo(\n taxDocumentId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GenerateFileDownloadInfoSignature {\n /**\n * Generates temporary information for downloading a tax document's file.\n *\n * The returned `downloadInfo.url` is a temporary link to a PDF. It expires 10 seconds after it's generated, so follow it immediately, and don't store it as a static link. Call this method again to get a fresh URL.\n *\n * The tax document must have a file available, meaning its `downloadable` field is `true`.\n * @param - ID of the tax document to download a file for.\n */\n (taxDocumentId: string): Promise<GenerateFileDownloadInfoResponse>;\n}\n\nexport {\n AccountInfo,\n ActionEvent,\n ConfirmFileUploadedRequest,\n ConfirmFileUploadedResponse,\n CursorPaging,\n Cursors,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n FileUploadTarget,\n GenerateFileDownloadInfoRequest,\n GenerateFileDownloadInfoResponse,\n GenerateFileUploadTargetRequest,\n GenerateFileUploadTargetResponse,\n GenerateHistoryFileDownloadInfoRequest,\n GenerateHistoryFileDownloadInfoResponse,\n GetTaxDocumentFileHistoryRequest,\n GetTaxDocumentFileHistoryResponse,\n GetTaxDocumentRequest,\n GetTaxDocumentResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n ListTaxDocumentsOptions,\n ListTaxDocumentsRequest,\n ListTaxDocumentsResponse,\n MessageEnvelope,\n PagingMetadataV2,\n RefreshTaxDocumentFileRequest,\n RefreshTaxDocumentFileResponse,\n RestoreInfo,\n SourceType,\n TaxDocument,\n TaxDocumentFileHistory,\n TaxDocumentFileHistoryRecord,\n TaxDocumentType,\n TaxPeriod,\n TaxPeriodOptionsOneOf,\n UpdateTaxDocumentRequest,\n UpdateTaxDocumentResponse,\n WebhookIdentityType,\n YearPeriod,\n} from './payments-tax-documents-v1-tax-document-tax-documents.universal.js';\n","import {\n getTaxDocument as publicGetTaxDocument,\n listTaxDocuments as publicListTaxDocuments,\n generateFileDownloadInfo as publicGenerateFileDownloadInfo,\n} from './payments-tax-documents-v1-tax-document-tax-documents.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getTaxDocument: MaybeContext<\n BuildRESTFunction<typeof publicGetTaxDocument> & typeof publicGetTaxDocument\n> = /*#__PURE__*/ createRESTModule(publicGetTaxDocument);\nexport const listTaxDocuments: MaybeContext<\n BuildRESTFunction<typeof publicListTaxDocuments> &\n typeof publicListTaxDocuments\n> = /*#__PURE__*/ createRESTModule(publicListTaxDocuments);\nexport const generateFileDownloadInfo: MaybeContext<\n BuildRESTFunction<typeof publicGenerateFileDownloadInfo> &\n typeof publicGenerateFileDownloadInfo\n> = /*#__PURE__*/ createRESTModule(publicGenerateFileDownloadInfo);\n\nexport {\n TaxDocumentType,\n SourceType,\n WebhookIdentityType,\n} from './payments-tax-documents-v1-tax-document-tax-documents.universal.js';\nexport {\n TaxDocument,\n TaxPeriod,\n TaxPeriodOptionsOneOf,\n YearPeriod,\n GetTaxDocumentFileHistoryRequest,\n GetTaxDocumentFileHistoryResponse,\n TaxDocumentFileHistory,\n TaxDocumentFileHistoryRecord,\n GenerateHistoryFileDownloadInfoRequest,\n GenerateHistoryFileDownloadInfoResponse,\n UpdateTaxDocumentRequest,\n UpdateTaxDocumentResponse,\n RefreshTaxDocumentFileRequest,\n RefreshTaxDocumentFileResponse,\n GenerateFileUploadTargetRequest,\n GenerateFileUploadTargetResponse,\n FileUploadTarget,\n ConfirmFileUploadedRequest,\n ConfirmFileUploadedResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n GetTaxDocumentRequest,\n GetTaxDocumentResponse,\n ListTaxDocumentsRequest,\n CursorPaging,\n ListTaxDocumentsResponse,\n PagingMetadataV2,\n Cursors,\n GenerateFileDownloadInfoRequest,\n GenerateFileDownloadInfoResponse,\n ListTaxDocumentsOptions,\n} from './payments-tax-documents-v1-tax-document-tax-documents.universal.js';\nexport {\n TaxDocumentTypeWithLiterals,\n SourceTypeWithLiterals,\n WebhookIdentityTypeWithLiterals,\n} from './payments-tax-documents-v1-tax-document-tax-documents.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kCAAAA;AAAA,EAAA,sBAAAC;AAAA,EAAA,wBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,uDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,uBAAuB;AAAA,MACrB;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,UAA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C;AAED,QAAM,UAC2C;AAAA,IAC7C;AAAA,EACF;AAEF,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO;AAAA,UACL,wCAAe,OAAO,MAAM;AAAA,QAC1B;AAAA,UACE,aAAa;AAAA,UACb,OAAO,CAAC,EAAE,MAAM,eAAe,CAAC;AAAA,QAClC;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAF;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,eAAe,OAAO;AAAA,QAClD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,eAAe;AAAA,IAClB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AE/qBO,SAASG,gBACd,YACyB;AACzB,SAAO,CAAC,kBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAuBO,SAASC,kBACd,YAC2B;AAC3B,SAAO,CAAC,WAAmB,YACzBA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AA6BO,SAASC,0BACd,YACmC;AACnC,SAAO,CAAC,kBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACxFA,IAAAC,uBAAiC;AAG1B,IAAMC,kBAEK,2DAAiBA,eAAoB;AAChD,IAAMC,oBAGK,2DAAiBA,iBAAsB;AAClD,IAAMC,4BAGK,2DAAiBA,yBAA8B;","names":["generateFileDownloadInfo","getTaxDocument","listTaxDocuments","import_rest_modules","payload","import_transform_paths","TaxDocumentType","SourceType","WebhookIdentityType","getTaxDocument","sdkTransformError","listTaxDocuments","generateFileDownloadInfo","getTaxDocument","listTaxDocuments","generateFileDownloadInfo","import_rest_modules","getTaxDocument","listTaxDocuments","generateFileDownloadInfo"]}
1
+ {"version":3,"sources":["../../index.ts","../../src/payments-tax-documents-v1-tax-document-tax-documents.universal.ts","../../src/payments-tax-documents-v1-tax-document-tax-documents.http.ts","../../src/payments-tax-documents-v1-tax-document-tax-documents.public.ts","../../src/payments-tax-documents-v1-tax-document-tax-documents.context.ts"],"sourcesContent":["export * from './src/payments-tax-documents-v1-tax-document-tax-documents.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 ambassadorWixPaymentsTaxDocumentsV1TaxDocument from './payments-tax-documents-v1-tax-document-tax-documents.http.js';\nimport { transformRESTDocumentToSDKDocument } from '@wix/sdk-runtime/transformations/document';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/**\n * A tax document is a tax-related form that Wix Payments issues to a merchant, such as a US IRS Form 1099-K.\n * Each tax document belongs to a Wix Payments account and covers a specific period.\n * When a document's file is available, you can generate a temporary URL to download it as a PDF.\n */\nexport interface TaxDocument {\n /**\n * Tax document ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Date and time the tax document was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the tax document was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Revision number, which increments by 1 each time the tax document is updated.\n * @readonly\n */\n revision?: string;\n /**\n * ID of the Wix Payments account the tax document belongs to.\n * @format GUID\n * @immutable\n */\n accountId?: string;\n /**\n * ID of the Wix Payments account profile the tax document belongs to. A profile is a sub-account of a Wix Payments account. Most accounts have a single profile.\n * @internal\n * @format GUID\n * @immutable\n */\n accountProfileId?: string;\n /**\n * Type of tax document.\n * @immutable\n */\n type?: TaxDocumentTypeWithLiterals;\n /**\n * Period the tax document covers.\n * @immutable\n */\n period?: TaxPeriod;\n /**\n * Whether a file is available to download for the tax document. When `false`, calling Generate File Download Info returns an error.\n *\n * At least one of `downloadable` and `problematic` is always `true`.\n */\n downloadable?: boolean;\n /**\n * Whether a problem was found with the tax document's file, for example incorrect data that's being corrected.\n *\n * At least one of `downloadable` and `problematic` is always `true`, and both can be `true` at the same time.\n */\n problematic?: boolean;\n /**\n * Whether the tax document is shown to the merchant in their Wix dashboard. A hidden tax document (`false`) is in an internal state and typically shouldn't be surfaced to the merchant.\n * @internal\n * @readonly\n */\n visible?: boolean;\n /**\n * How the tax document's amounts are aggregated.\n * @readonly\n */\n sourceType?: SourceTypeWithLiterals;\n /**\n * Human-readable name for the tax document's file.\n * @readonly\n * @minLength 1\n * @maxLength 1000\n */\n displayName?: string | null;\n /**\n * Whether the tax document's file has been replaced at least once since it was first created.\n * @internal\n * @readonly\n */\n fileEdited?: boolean;\n /**\n * [Internal] Reference to Adyen legal entity. Cant be removed any time\n * @internal\n * @readonly\n * @minLength 1\n * @maxLength 100\n */\n kycReference?: string | null;\n}\n\n/** Type of tax document. */\nexport enum TaxDocumentType {\n /** US IRS Form 1099-K. */\n FORM_1099_K = 'FORM_1099_K',\n}\n\n/** @enumType */\nexport type TaxDocumentTypeWithLiterals = TaxDocumentType | 'FORM_1099_K';\n\nexport interface TaxPeriod extends TaxPeriodOptionsOneOf {\n /** The tax document covers a full calendar year. */\n yearPeriod?: YearPeriod;\n}\n\n/** @oneof */\nexport interface TaxPeriodOptionsOneOf {\n /** The tax document covers a full calendar year. */\n yearPeriod?: YearPeriod;\n}\n\nexport interface YearPeriod {\n /** Calendar year the tax document covers. For example, `2024`. */\n year?: number;\n}\n\n/** Source of data for tax document. */\nexport enum SourceType {\n /** Amounts are aggregated by payment date. */\n PAYMENT = 'PAYMENT',\n /** Amounts are aggregated by payout date. */\n PAYOUT = 'PAYOUT',\n}\n\n/** @enumType */\nexport type SourceTypeWithLiterals = SourceType | 'PAYMENT' | 'PAYOUT';\n\nexport interface GetTaxDocumentFileHistoryRequest {\n /**\n * Id of a tax document.\n * @format GUID\n */\n taxDocumentId?: string;\n}\n\nexport interface GetTaxDocumentFileHistoryResponse {\n /** Tax document history. */\n taxDocumentFileHistory?: TaxDocumentFileHistory;\n}\n\nexport interface TaxDocumentFileHistory {\n /**\n * Tax document identifier.\n * @format GUID\n */\n taxDocumentId?: string;\n /**\n * File history records which correspond to file versions for this tax document.\n * Includes current file version, if it exists.\n * Sorted in descending order by `created_date`.\n * @maxSize 100\n */\n records?: TaxDocumentFileHistoryRecord[];\n}\n\nexport interface TaxDocumentFileHistoryRecord {\n /**\n * History record identifier.\n * @format GUID\n */\n _id?: string;\n /**\n * Date when tax document file was uploaded.\n * History record is created at the same moment.\n * @readonly\n */\n _createdDate?: Date | null;\n}\n\nexport interface GenerateHistoryFileDownloadInfoRequest {\n /**\n * Tax document to download a file for.\n * @format GUID\n */\n taxDocumentId?: string;\n /**\n * Tax document history record to download a file for.\n * @format GUID\n */\n taxDocumentFileHistoryRecordId?: string;\n}\n\nexport interface GenerateHistoryFileDownloadInfoResponse {\n /** Information used to download a file. */\n downloadInfo?: string;\n}\n\nexport interface UpdateTaxDocumentRequest {\n /** Tax document to update. */\n taxDocument?: TaxDocument;\n /**\n * Field mask.\n * @internal\n */\n fieldMask?: string[];\n}\n\nexport interface UpdateTaxDocumentResponse {\n /** Updated tax document. */\n taxDocument?: TaxDocument;\n}\n\nexport interface RefreshTaxDocumentFileRequest {\n /**\n * Tax document to be updated.\n * @format GUID\n */\n taxDocumentId?: string;\n /** Flag represents whether ping notification to user should be sent if the tax document is successfully updated. */\n notifyOnSuccess?: boolean;\n}\n\nexport interface RefreshTaxDocumentFileResponse {\n /** Latest version of the tax document. */\n taxDocument?: TaxDocument;\n /** Represents whether the document was updated. */\n updated?: boolean;\n}\n\nexport interface GenerateFileUploadTargetRequest {\n /**\n * Tax document for file upload.\n * @format GUID\n */\n taxDocumentId?: string;\n}\n\nexport interface GenerateFileUploadTargetResponse {\n /** Upload target. */\n uploadTarget?: FileUploadTarget;\n}\n\nexport interface FileUploadTarget {\n /**\n * File upload URL.\n * @format WEB_URL\n */\n uploadUrl?: string;\n /**\n * File upload token.\n * @minLength 1\n * @maxLength 1000\n */\n uploadToken?: string;\n}\n\nexport interface ConfirmFileUploadedRequest {\n /**\n * Tax document for which there was a successful upload.\n * @format GUID\n */\n taxDocumentId?: string;\n}\n\nexport interface ConfirmFileUploadedResponse {}\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\nexport interface GetTaxDocumentRequest {\n /**\n * ID of the tax document to retrieve.\n * @format GUID\n */\n taxDocumentId: string;\n}\n\nexport interface GetTaxDocumentResponse {\n /** Retrieved tax document. */\n taxDocument?: TaxDocument;\n}\n\nexport interface ListTaxDocumentsRequest {\n /**\n * ID of the Wix Payments account whose tax documents are retrieved.\n * @format GUID\n */\n accountId: string | null;\n /** Cursor paging options. */\n paging?: CursorPaging;\n /** Filters the retrieved tax documents by type. When omitted, tax documents of all types are returned. */\n type?: TaxDocumentTypeWithLiterals;\n /**\n * Filters the retrieved tax documents by whether they're visible to the merchant. When omitted, both visible and hidden tax documents are returned.\n * @internal\n */\n visible?: boolean | null;\n}\n\nexport interface CursorPaging {\n /**\n * Number of items to load.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * You can get the relevant cursor token\n * from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface ListTaxDocumentsResponse {\n /** Retrieved tax documents. */\n taxDocuments?: TaxDocument[];\n /** Paging metadata. */\n pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n /**\n * Indicates if there are more results after the current page.\n * If `true`, another page of results can be retrieved.\n * If `false`, this is the last page.\n * @internal\n */\n hasNext?: boolean | null;\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 GenerateFileDownloadInfoRequest {\n /**\n * ID of the tax document to download a file for.\n * @format GUID\n */\n taxDocumentId: string;\n}\n\nexport interface GenerateFileDownloadInfoResponse {\n /** Information for downloading the tax document's file. */\n downloadInfo?: string;\n}\n\n/**\n * Retrieves a tax document by ID.\n * @param taxDocumentId - ID of the tax document to retrieve.\n * @public\n * @documentationMaturity preview\n * @requiredField taxDocumentId\n * @permissionId PAYMENTS.TAX_DOCUMENT_READ\n * @applicableIdentity APP\n * @returns Retrieved tax document.\n * @fqn wix.payments.tax_documents.v1.TaxDocumentsService.GetTaxDocument\n */\nexport async function getTaxDocument(\n taxDocumentId: string\n): Promise<\n NonNullablePaths<\n TaxDocument,\n | `revision`\n | `accountId`\n | `type`\n | `period.yearPeriod.year`\n | `downloadable`\n | `problematic`\n | `sourceType`,\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({\n taxDocumentId: taxDocumentId,\n });\n\n const reqOpts =\n ambassadorWixPaymentsTaxDocumentsV1TaxDocument.getTaxDocument(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.taxDocument!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { taxDocumentId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['taxDocumentId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of tax documents that belong to a Wix Payments account.\n *\n * You must specify the `accountId` of the account whose tax documents you want to retrieve.\n *\n * Tax documents are sorted in descending order by `period`, then by `createdDate`.\n *\n * When `type` is omitted, tax documents of all types are returned.\n * @param accountId - ID of the Wix Payments account whose tax documents are retrieved.\n * @public\n * @documentationMaturity preview\n * @requiredField accountId\n * @permissionId PAYMENTS.TAX_DOCUMENT_READ\n * @applicableIdentity APP\n * @fqn wix.payments.tax_documents.v1.TaxDocumentsService.ListTaxDocuments\n */\nexport async function listTaxDocuments(\n accountId: string,\n options?: ListTaxDocumentsOptions\n): Promise<\n NonNullablePaths<\n ListTaxDocumentsResponse,\n | `taxDocuments`\n | `taxDocuments.${number}.revision`\n | `taxDocuments.${number}.accountId`\n | `taxDocuments.${number}.type`\n | `taxDocuments.${number}.period.yearPeriod.year`\n | `taxDocuments.${number}.downloadable`\n | `taxDocuments.${number}.problematic`\n | `taxDocuments.${number}.sourceType`,\n 6\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 accountId: accountId,\n paging: options?.paging,\n type: options?.type,\n });\n\n const reqOpts =\n ambassadorWixPaymentsTaxDocumentsV1TaxDocument.listTaxDocuments(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 accountId: '$[0]',\n paging: '$[1].paging',\n type: '$[1].type',\n },\n singleArgumentUnchanged: false,\n },\n ['accountId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListTaxDocumentsOptions {\n /** Cursor paging options. */\n paging?: CursorPaging;\n /** Filters the retrieved tax documents by type. When omitted, tax documents of all types are returned. */\n type?: TaxDocumentTypeWithLiterals;\n}\n\n/**\n * Generates temporary information for downloading a tax document's file.\n *\n * The returned `downloadInfo.url` is a temporary link to a PDF. It expires 10 seconds after it's generated, so follow it immediately, and don't store it as a static link. Call this method again to get a fresh URL.\n *\n * The tax document must have a file available, meaning its `downloadable` field is `true`.\n * @param taxDocumentId - ID of the tax document to download a file for.\n * @public\n * @documentationMaturity preview\n * @requiredField taxDocumentId\n * @permissionId PAYMENTS.TAX_DOCUMENT_DOWNLOAD\n * @applicableIdentity APP\n * @fqn wix.payments.tax_documents.v1.TaxDocumentsService.GenerateFileDownloadInfo\n */\nexport async function generateFileDownloadInfo(\n taxDocumentId: string\n): Promise<GenerateFileDownloadInfoResponse> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n taxDocumentId: taxDocumentId,\n });\n\n const reqOpts =\n ambassadorWixPaymentsTaxDocumentsV1TaxDocument.generateFileDownloadInfo(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTDocumentToSDKDocument,\n paths: [{ path: 'downloadInfo' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { taxDocumentId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['taxDocumentId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixPaymentsTaxDocumentsV1TaxDocumentsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/tax-document-service/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n {\n srcPath: '/_api/finance/wix-payments/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/tax-document-service/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/tax-document-service/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/tax-document-service/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n 'manage.base44.com': [\n {\n srcPath: '/_api/tax-document-service',\n destPath: '',\n },\n ],\n 'payments.base44.com': [\n {\n srcPath: '/_api/tax-document-service',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/payments/platform/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n _: [\n {\n srcPath: '/payments/platform/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/payments/platform/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_payments_tax-documents';\n\n/** Retrieves a tax document by ID. */\nexport function getTaxDocument(payload: object): RequestOptionsFactory<any> {\n function __getTaxDocument({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.tax_documents.v1.tax_document',\n method: 'GET' as any,\n methodFqn:\n 'wix.payments.tax_documents.v1.TaxDocumentsService.GetTaxDocument',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsTaxDocumentsV1TaxDocumentsServiceUrl({\n protoPath: '/v1/tax-documents/{taxDocumentId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'taxDocument.createdDate' },\n { path: 'taxDocument.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getTaxDocument;\n}\n\n/**\n * Retrieves a list of tax documents that belong to a Wix Payments account.\n *\n * You must specify the `accountId` of the account whose tax documents you want to retrieve.\n *\n * Tax documents are sorted in descending order by `period`, then by `createdDate`.\n *\n * When `type` is omitted, tax documents of all types are returned.\n */\nexport function listTaxDocuments(payload: object): RequestOptionsFactory<any> {\n function __listTaxDocuments({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.tax_documents.v1.tax_document',\n method: 'GET' as any,\n methodFqn:\n 'wix.payments.tax_documents.v1.TaxDocumentsService.ListTaxDocuments',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsTaxDocumentsV1TaxDocumentsServiceUrl({\n protoPath: '/v1/tax-documents',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'taxDocuments.createdDate' },\n { path: 'taxDocuments.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listTaxDocuments;\n}\n\n/**\n * Generates temporary information for downloading a tax document's file.\n *\n * The returned `downloadInfo.url` is a temporary link to a PDF. It expires 10 seconds after it's generated, so follow it immediately, and don't store it as a static link. Call this method again to get a fresh URL.\n *\n * The tax document must have a file available, meaning its `downloadable` field is `true`.\n */\nexport function generateFileDownloadInfo(\n payload: object\n): RequestOptionsFactory<any> {\n function __generateFileDownloadInfo({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.tax_documents.v1.tax_document',\n method: 'GET' as any,\n methodFqn:\n 'wix.payments.tax_documents.v1.TaxDocumentsService.GenerateFileDownloadInfo',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsTaxDocumentsV1TaxDocumentsServiceUrl({\n protoPath:\n '/v1/tax-documents/{taxDocumentId}/generate-file-download-info',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'downloadInfo.urlExpirationDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __generateFileDownloadInfo;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n GenerateFileDownloadInfoResponse,\n ListTaxDocumentsOptions,\n ListTaxDocumentsResponse,\n TaxDocument,\n generateFileDownloadInfo as universalGenerateFileDownloadInfo,\n getTaxDocument as universalGetTaxDocument,\n listTaxDocuments as universalListTaxDocuments,\n} from './payments-tax-documents-v1-tax-document-tax-documents.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/payments' };\n\nexport function getTaxDocument(\n httpClient: HttpClient\n): GetTaxDocumentSignature {\n return (taxDocumentId: string) =>\n universalGetTaxDocument(\n taxDocumentId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetTaxDocumentSignature {\n /**\n * Retrieves a tax document by ID.\n * @param - ID of the tax document to retrieve.\n * @returns Retrieved tax document.\n */\n (taxDocumentId: string): Promise<\n NonNullablePaths<\n TaxDocument,\n | `revision`\n | `accountId`\n | `type`\n | `period.yearPeriod.year`\n | `downloadable`\n | `problematic`\n | `sourceType`,\n 4\n >\n >;\n}\n\nexport function listTaxDocuments(\n httpClient: HttpClient\n): ListTaxDocumentsSignature {\n return (accountId: string, options?: ListTaxDocumentsOptions) =>\n universalListTaxDocuments(\n accountId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListTaxDocumentsSignature {\n /**\n * Retrieves a list of tax documents that belong to a Wix Payments account.\n *\n * You must specify the `accountId` of the account whose tax documents you want to retrieve.\n *\n * Tax documents are sorted in descending order by `period`, then by `createdDate`.\n *\n * When `type` is omitted, tax documents of all types are returned.\n * @param - ID of the Wix Payments account whose tax documents are retrieved.\n */\n (accountId: string, options?: ListTaxDocumentsOptions): Promise<\n NonNullablePaths<\n ListTaxDocumentsResponse,\n | `taxDocuments`\n | `taxDocuments.${number}.revision`\n | `taxDocuments.${number}.accountId`\n | `taxDocuments.${number}.type`\n | `taxDocuments.${number}.period.yearPeriod.year`\n | `taxDocuments.${number}.downloadable`\n | `taxDocuments.${number}.problematic`\n | `taxDocuments.${number}.sourceType`,\n 6\n >\n >;\n}\n\nexport function generateFileDownloadInfo(\n httpClient: HttpClient\n): GenerateFileDownloadInfoSignature {\n return (taxDocumentId: string) =>\n universalGenerateFileDownloadInfo(\n taxDocumentId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GenerateFileDownloadInfoSignature {\n /**\n * Generates temporary information for downloading a tax document's file.\n *\n * The returned `downloadInfo.url` is a temporary link to a PDF. It expires 10 seconds after it's generated, so follow it immediately, and don't store it as a static link. Call this method again to get a fresh URL.\n *\n * The tax document must have a file available, meaning its `downloadable` field is `true`.\n * @param - ID of the tax document to download a file for.\n */\n (taxDocumentId: string): Promise<GenerateFileDownloadInfoResponse>;\n}\n\nexport {\n AccountInfo,\n ActionEvent,\n ConfirmFileUploadedRequest,\n ConfirmFileUploadedResponse,\n CursorPaging,\n Cursors,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n FileUploadTarget,\n GenerateFileDownloadInfoRequest,\n GenerateFileDownloadInfoResponse,\n GenerateFileUploadTargetRequest,\n GenerateFileUploadTargetResponse,\n GenerateHistoryFileDownloadInfoRequest,\n GenerateHistoryFileDownloadInfoResponse,\n GetTaxDocumentFileHistoryRequest,\n GetTaxDocumentFileHistoryResponse,\n GetTaxDocumentRequest,\n GetTaxDocumentResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n ListTaxDocumentsOptions,\n ListTaxDocumentsRequest,\n ListTaxDocumentsResponse,\n MessageEnvelope,\n PagingMetadataV2,\n RefreshTaxDocumentFileRequest,\n RefreshTaxDocumentFileResponse,\n RestoreInfo,\n SourceType,\n TaxDocument,\n TaxDocumentFileHistory,\n TaxDocumentFileHistoryRecord,\n TaxDocumentType,\n TaxPeriod,\n TaxPeriodOptionsOneOf,\n UpdateTaxDocumentRequest,\n UpdateTaxDocumentResponse,\n WebhookIdentityType,\n YearPeriod,\n} from './payments-tax-documents-v1-tax-document-tax-documents.universal.js';\n","import {\n getTaxDocument as publicGetTaxDocument,\n listTaxDocuments as publicListTaxDocuments,\n generateFileDownloadInfo as publicGenerateFileDownloadInfo,\n} from './payments-tax-documents-v1-tax-document-tax-documents.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getTaxDocument: MaybeContext<\n BuildRESTFunction<typeof publicGetTaxDocument> & typeof publicGetTaxDocument\n> = /*#__PURE__*/ createRESTModule(publicGetTaxDocument);\nexport const listTaxDocuments: MaybeContext<\n BuildRESTFunction<typeof publicListTaxDocuments> &\n typeof publicListTaxDocuments\n> = /*#__PURE__*/ createRESTModule(publicListTaxDocuments);\nexport const generateFileDownloadInfo: MaybeContext<\n BuildRESTFunction<typeof publicGenerateFileDownloadInfo> &\n typeof publicGenerateFileDownloadInfo\n> = /*#__PURE__*/ createRESTModule(publicGenerateFileDownloadInfo);\n\nexport {\n TaxDocumentType,\n SourceType,\n WebhookIdentityType,\n} from './payments-tax-documents-v1-tax-document-tax-documents.universal.js';\nexport {\n TaxDocument,\n TaxPeriod,\n TaxPeriodOptionsOneOf,\n YearPeriod,\n GetTaxDocumentFileHistoryRequest,\n GetTaxDocumentFileHistoryResponse,\n TaxDocumentFileHistory,\n TaxDocumentFileHistoryRecord,\n GenerateHistoryFileDownloadInfoRequest,\n GenerateHistoryFileDownloadInfoResponse,\n UpdateTaxDocumentRequest,\n UpdateTaxDocumentResponse,\n RefreshTaxDocumentFileRequest,\n RefreshTaxDocumentFileResponse,\n GenerateFileUploadTargetRequest,\n GenerateFileUploadTargetResponse,\n FileUploadTarget,\n ConfirmFileUploadedRequest,\n ConfirmFileUploadedResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n GetTaxDocumentRequest,\n GetTaxDocumentResponse,\n ListTaxDocumentsRequest,\n CursorPaging,\n ListTaxDocumentsResponse,\n PagingMetadataV2,\n Cursors,\n GenerateFileDownloadInfoRequest,\n GenerateFileDownloadInfoResponse,\n ListTaxDocumentsOptions,\n} from './payments-tax-documents-v1-tax-document-tax-documents.universal.js';\nexport {\n TaxDocumentTypeWithLiterals,\n SourceTypeWithLiterals,\n WebhookIdentityTypeWithLiterals,\n} from './payments-tax-documents-v1-tax-document-tax-documents.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kCAAAA;AAAA,EAAA,sBAAAC;AAAA,EAAA,wBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,uDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS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,EACR;AACF;;;AE3tBO,SAASG,gBACd,YACyB;AACzB,SAAO,CAAC,kBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAuBO,SAASC,kBACd,YAC2B;AAC3B,SAAO,CAAC,WAAmB,YACzBA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AA6BO,SAASC,0BACd,YACmC;AACnC,SAAO,CAAC,kBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACxFA,IAAAC,uBAAiC;AAG1B,IAAMC,kBAEK,2DAAiBA,eAAoB;AAChD,IAAMC,oBAGK,2DAAiBA,iBAAsB;AAClD,IAAMC,4BAGK,2DAAiBA,yBAA8B;","names":["generateFileDownloadInfo","getTaxDocument","listTaxDocuments","import_rest_modules","payload","import_transform_paths","TaxDocumentType","SourceType","WebhookIdentityType","getTaxDocument","sdkTransformError","listTaxDocuments","generateFileDownloadInfo","getTaxDocument","listTaxDocuments","generateFileDownloadInfo","import_rest_modules","getTaxDocument","listTaxDocuments","generateFileDownloadInfo"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.typings.ts","../../src/payments-tax-documents-v1-tax-document-tax-documents.universal.ts","../../src/payments-tax-documents-v1-tax-document-tax-documents.http.ts"],"sourcesContent":["export * from './src/payments-tax-documents-v1-tax-document-tax-documents.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 ambassadorWixPaymentsTaxDocumentsV1TaxDocument from './payments-tax-documents-v1-tax-document-tax-documents.http.js';\nimport { transformRESTDocumentToSDKDocument } from '@wix/sdk-runtime/transformations/document';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/**\n * A tax document is a tax-related form that Wix Payments issues to a merchant, such as a US IRS Form 1099-K.\n * Each tax document belongs to a Wix Payments account and covers a specific period.\n * When a document's file is available, you can generate a temporary URL to download it as a PDF.\n */\nexport interface TaxDocument {\n /**\n * Tax document ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Date and time the tax document was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the tax document was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Revision number, which increments by 1 each time the tax document is updated.\n * @readonly\n */\n revision?: string;\n /**\n * ID of the Wix Payments account the tax document belongs to.\n * @format GUID\n * @immutable\n */\n accountId?: string;\n /**\n * Type of tax document.\n * @immutable\n */\n type?: TaxDocumentTypeWithLiterals;\n /**\n * Period the tax document covers.\n * @immutable\n */\n period?: TaxPeriod;\n /**\n * Whether a file is available to download for the tax document. When `false`, calling Generate File Download Info returns an error.\n *\n * At least one of `downloadable` and `problematic` is always `true`.\n */\n downloadable?: boolean;\n /**\n * Whether a problem was found with the tax document's file, for example incorrect data that's being corrected.\n *\n * At least one of `downloadable` and `problematic` is always `true`, and both can be `true` at the same time.\n */\n problematic?: boolean;\n /**\n * How the tax document's amounts are aggregated.\n * @readonly\n */\n sourceType?: SourceTypeWithLiterals;\n /**\n * Human-readable name for the tax document's file.\n * @readonly\n * @minLength 1\n * @maxLength 1000\n */\n displayName?: string | null;\n}\n\n/** Type of tax document. */\nexport enum TaxDocumentType {\n /** US IRS Form 1099-K. */\n FORM_1099_K = 'FORM_1099_K',\n}\n\n/** @enumType */\nexport type TaxDocumentTypeWithLiterals = TaxDocumentType | 'FORM_1099_K';\n\nexport interface TaxPeriod extends TaxPeriodOptionsOneOf {\n /** The tax document covers a full calendar year. */\n yearPeriod?: YearPeriod;\n}\n\n/** @oneof */\nexport interface TaxPeriodOptionsOneOf {\n /** The tax document covers a full calendar year. */\n yearPeriod?: YearPeriod;\n}\n\nexport interface YearPeriod {\n /** Calendar year the tax document covers. For example, `2024`. */\n year?: number;\n}\n\n/** Source of data for tax document. */\nexport enum SourceType {\n /** Amounts are aggregated by payment date. */\n PAYMENT = 'PAYMENT',\n /** Amounts are aggregated by payout date. */\n PAYOUT = 'PAYOUT',\n}\n\n/** @enumType */\nexport type SourceTypeWithLiterals = SourceType | 'PAYMENT' | 'PAYOUT';\n\nexport interface GetTaxDocumentFileHistoryRequest {\n /**\n * Id of a tax document.\n * @format GUID\n */\n taxDocumentId?: string;\n}\n\nexport interface GetTaxDocumentFileHistoryResponse {\n /** Tax document history. */\n taxDocumentFileHistory?: TaxDocumentFileHistory;\n}\n\nexport interface TaxDocumentFileHistory {\n /**\n * Tax document identifier.\n * @format GUID\n */\n taxDocumentId?: string;\n /**\n * File history records which correspond to file versions for this tax document.\n * Includes current file version, if it exists.\n * Sorted in descending order by `created_date`.\n * @maxSize 100\n */\n records?: TaxDocumentFileHistoryRecord[];\n}\n\nexport interface TaxDocumentFileHistoryRecord {\n /**\n * History record identifier.\n * @format GUID\n */\n _id?: string;\n /**\n * Date when tax document file was uploaded.\n * History record is created at the same moment.\n * @readonly\n */\n _createdDate?: Date | null;\n}\n\nexport interface GenerateHistoryFileDownloadInfoRequest {\n /**\n * Tax document to download a file for.\n * @format GUID\n */\n taxDocumentId?: string;\n /**\n * Tax document history record to download a file for.\n * @format GUID\n */\n taxDocumentFileHistoryRecordId?: string;\n}\n\nexport interface GenerateHistoryFileDownloadInfoResponse {\n /** Information used to download a file. */\n downloadInfo?: string;\n}\n\nexport interface UpdateTaxDocumentRequest {\n /** Tax document to update. */\n taxDocument?: TaxDocument;\n}\n\nexport interface UpdateTaxDocumentResponse {\n /** Updated tax document. */\n taxDocument?: TaxDocument;\n}\n\nexport interface RefreshTaxDocumentFileRequest {\n /**\n * Tax document to be updated.\n * @format GUID\n */\n taxDocumentId?: string;\n /** Flag represents whether ping notification to user should be sent if the tax document is successfully updated. */\n notifyOnSuccess?: boolean;\n}\n\nexport interface RefreshTaxDocumentFileResponse {\n /** Latest version of the tax document. */\n taxDocument?: TaxDocument;\n /** Represents whether the document was updated. */\n updated?: boolean;\n}\n\nexport interface GenerateFileUploadTargetRequest {\n /**\n * Tax document for file upload.\n * @format GUID\n */\n taxDocumentId?: string;\n}\n\nexport interface GenerateFileUploadTargetResponse {\n /** Upload target. */\n uploadTarget?: FileUploadTarget;\n}\n\nexport interface FileUploadTarget {\n /**\n * File upload URL.\n * @format WEB_URL\n */\n uploadUrl?: string;\n /**\n * File upload token.\n * @minLength 1\n * @maxLength 1000\n */\n uploadToken?: string;\n}\n\nexport interface ConfirmFileUploadedRequest {\n /**\n * Tax document for which there was a successful upload.\n * @format GUID\n */\n taxDocumentId?: string;\n}\n\nexport interface ConfirmFileUploadedResponse {}\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\nexport interface GetTaxDocumentRequest {\n /**\n * ID of the tax document to retrieve.\n * @format GUID\n */\n taxDocumentId: string;\n}\n\nexport interface GetTaxDocumentResponse {\n /** Retrieved tax document. */\n taxDocument?: TaxDocument;\n}\n\nexport interface ListTaxDocumentsRequest {\n /**\n * ID of the Wix Payments account whose tax documents are retrieved.\n * @format GUID\n */\n accountId: string | null;\n /** Cursor paging options. */\n paging?: CursorPaging;\n /** Filters the retrieved tax documents by type. When omitted, tax documents of all types are returned. */\n type?: TaxDocumentTypeWithLiterals;\n}\n\nexport interface CursorPaging {\n /**\n * Number of items to load.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * You can get the relevant cursor token\n * from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface ListTaxDocumentsResponse {\n /** Retrieved tax documents. */\n taxDocuments?: TaxDocument[];\n /** Paging metadata. */\n pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | 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 GenerateFileDownloadInfoRequest {\n /**\n * ID of the tax document to download a file for.\n * @format GUID\n */\n taxDocumentId: string;\n}\n\nexport interface GenerateFileDownloadInfoResponse {\n /** Information for downloading the tax document's file. */\n downloadInfo?: string;\n}\n\n/**\n * Retrieves a tax document by ID.\n * @param taxDocumentId - ID of the tax document to retrieve.\n * @public\n * @documentationMaturity preview\n * @requiredField taxDocumentId\n * @permissionId PAYMENTS.TAX_DOCUMENT_READ\n * @applicableIdentity APP\n * @returns Retrieved tax document.\n * @fqn wix.payments.tax_documents.v1.TaxDocumentsService.GetTaxDocument\n */\nexport async function getTaxDocument(\n taxDocumentId: string\n): Promise<\n NonNullablePaths<\n TaxDocument,\n | `revision`\n | `accountId`\n | `type`\n | `period.yearPeriod.year`\n | `downloadable`\n | `problematic`\n | `sourceType`,\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({\n taxDocumentId: taxDocumentId,\n });\n\n const reqOpts =\n ambassadorWixPaymentsTaxDocumentsV1TaxDocument.getTaxDocument(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.taxDocument!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { taxDocumentId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['taxDocumentId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of tax documents that belong to a Wix Payments account.\n *\n * You must specify the `accountId` of the account whose tax documents you want to retrieve.\n *\n * Tax documents are sorted in descending order by `period`, then by `createdDate`.\n *\n * When `type` is omitted, tax documents of all types are returned.\n * @param accountId - ID of the Wix Payments account whose tax documents are retrieved.\n * @public\n * @documentationMaturity preview\n * @requiredField accountId\n * @permissionId PAYMENTS.TAX_DOCUMENT_READ\n * @applicableIdentity APP\n * @fqn wix.payments.tax_documents.v1.TaxDocumentsService.ListTaxDocuments\n */\nexport async function listTaxDocuments(\n accountId: string,\n options?: ListTaxDocumentsOptions\n): Promise<\n NonNullablePaths<\n ListTaxDocumentsResponse,\n | `taxDocuments`\n | `taxDocuments.${number}.revision`\n | `taxDocuments.${number}.accountId`\n | `taxDocuments.${number}.type`\n | `taxDocuments.${number}.period.yearPeriod.year`\n | `taxDocuments.${number}.downloadable`\n | `taxDocuments.${number}.problematic`\n | `taxDocuments.${number}.sourceType`,\n 6\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 accountId: accountId,\n paging: options?.paging,\n type: options?.type,\n });\n\n const reqOpts =\n ambassadorWixPaymentsTaxDocumentsV1TaxDocument.listTaxDocuments(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 accountId: '$[0]',\n paging: '$[1].paging',\n type: '$[1].type',\n },\n singleArgumentUnchanged: false,\n },\n ['accountId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListTaxDocumentsOptions {\n /** Cursor paging options. */\n paging?: CursorPaging;\n /** Filters the retrieved tax documents by type. When omitted, tax documents of all types are returned. */\n type?: TaxDocumentTypeWithLiterals;\n}\n\n/**\n * Generates temporary information for downloading a tax document's file.\n *\n * The returned `downloadInfo.url` is a temporary link to a PDF. It expires 10 seconds after it's generated, so follow it immediately, and don't store it as a static link. Call this method again to get a fresh URL.\n *\n * The tax document must have a file available, meaning its `downloadable` field is `true`.\n * @param taxDocumentId - ID of the tax document to download a file for.\n * @public\n * @documentationMaturity preview\n * @requiredField taxDocumentId\n * @permissionId PAYMENTS.TAX_DOCUMENT_DOWNLOAD\n * @applicableIdentity APP\n * @fqn wix.payments.tax_documents.v1.TaxDocumentsService.GenerateFileDownloadInfo\n */\nexport async function generateFileDownloadInfo(\n taxDocumentId: string\n): Promise<GenerateFileDownloadInfoResponse> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n taxDocumentId: taxDocumentId,\n });\n\n const reqOpts =\n ambassadorWixPaymentsTaxDocumentsV1TaxDocument.generateFileDownloadInfo(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTDocumentToSDKDocument,\n paths: [{ path: 'downloadInfo' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { taxDocumentId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['taxDocumentId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixPaymentsTaxDocumentsV1TaxDocumentsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/tax-document-service/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n {\n srcPath: '/_api/finance/wix-payments/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/tax-document-service/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/tax-document-service/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/tax-document-service/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n 'manage.base44.com': [\n {\n srcPath: '/_api/tax-document-service',\n destPath: '',\n },\n ],\n 'payments.base44.com': [\n {\n srcPath: '/_api/tax-document-service',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/payments/platform/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n _: [\n {\n srcPath: '/payments/platform/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/payments/platform/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_payments_tax-documents';\n\n/** Retrieves a tax document by ID. */\nexport function getTaxDocument(payload: object): RequestOptionsFactory<any> {\n function __getTaxDocument({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.tax_documents.v1.tax_document',\n method: 'GET' as any,\n methodFqn:\n 'wix.payments.tax_documents.v1.TaxDocumentsService.GetTaxDocument',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsTaxDocumentsV1TaxDocumentsServiceUrl({\n protoPath: '/v1/tax-documents/{taxDocumentId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'taxDocument.createdDate' },\n { path: 'taxDocument.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getTaxDocument;\n}\n\n/**\n * Retrieves a list of tax documents that belong to a Wix Payments account.\n *\n * You must specify the `accountId` of the account whose tax documents you want to retrieve.\n *\n * Tax documents are sorted in descending order by `period`, then by `createdDate`.\n *\n * When `type` is omitted, tax documents of all types are returned.\n */\nexport function listTaxDocuments(payload: object): RequestOptionsFactory<any> {\n function __listTaxDocuments({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.tax_documents.v1.tax_document',\n method: 'GET' as any,\n methodFqn:\n 'wix.payments.tax_documents.v1.TaxDocumentsService.ListTaxDocuments',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsTaxDocumentsV1TaxDocumentsServiceUrl({\n protoPath: '/v1/tax-documents',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'taxDocuments.createdDate' },\n { path: 'taxDocuments.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listTaxDocuments;\n}\n\n/**\n * Generates temporary information for downloading a tax document's file.\n *\n * The returned `downloadInfo.url` is a temporary link to a PDF. It expires 10 seconds after it's generated, so follow it immediately, and don't store it as a static link. Call this method again to get a fresh URL.\n *\n * The tax document must have a file available, meaning its `downloadable` field is `true`.\n */\nexport function generateFileDownloadInfo(\n payload: object\n): RequestOptionsFactory<any> {\n function __generateFileDownloadInfo({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.tax_documents.v1.tax_document',\n method: 'GET' as any,\n methodFqn:\n 'wix.payments.tax_documents.v1.TaxDocumentsService.GenerateFileDownloadInfo',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsTaxDocumentsV1TaxDocumentsServiceUrl({\n protoPath:\n '/v1/tax-documents/{taxDocumentId}/generate-file-download-info',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'downloadInfo.urlExpirationDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __generateFileDownloadInfo;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kCAAAA;AAAA,EAAA,sBAAAC;AAAA,EAAA,wBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,uDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;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,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ACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,WAAW;AAAA,UACX,QAAQ;AAAA,UACR,MAAM;AAAA,QACR;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,aAAa,SAAS;AAAA,IACzB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAuBA,eAAsBE,0BACpB,eAC2C;AAE3C,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD;AAAA,EACF,CAAC;AAED,QAAM,UAC2C;AAAA,IAC7C;AAAA,EACF;AAEF,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO;AAAA,UACL,wCAAe,OAAO,MAAM;AAAA,QAC1B;AAAA,UACE,aAAa;AAAA,UACb,OAAO,CAAC,EAAE,MAAM,eAAe,CAAC;AAAA,QAClC;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAF;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,eAAe,OAAO;AAAA,QAClD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,eAAe;AAAA,IAClB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["generateFileDownloadInfo","getTaxDocument","listTaxDocuments","import_rest_modules","payload","import_transform_paths","TaxDocumentType","SourceType","WebhookIdentityType","getTaxDocument","sdkTransformError","listTaxDocuments","generateFileDownloadInfo"]}
1
+ {"version":3,"sources":["../../index.typings.ts","../../src/payments-tax-documents-v1-tax-document-tax-documents.universal.ts","../../src/payments-tax-documents-v1-tax-document-tax-documents.http.ts"],"sourcesContent":["export * from './src/payments-tax-documents-v1-tax-document-tax-documents.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 ambassadorWixPaymentsTaxDocumentsV1TaxDocument from './payments-tax-documents-v1-tax-document-tax-documents.http.js';\nimport { transformRESTDocumentToSDKDocument } from '@wix/sdk-runtime/transformations/document';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/**\n * A tax document is a tax-related form that Wix Payments issues to a merchant, such as a US IRS Form 1099-K.\n * Each tax document belongs to a Wix Payments account and covers a specific period.\n * When a document's file is available, you can generate a temporary URL to download it as a PDF.\n */\nexport interface TaxDocument {\n /**\n * Tax document ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Date and time the tax document was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the tax document was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Revision number, which increments by 1 each time the tax document is updated.\n * @readonly\n */\n revision?: string;\n /**\n * ID of the Wix Payments account the tax document belongs to.\n * @format GUID\n * @immutable\n */\n accountId?: string;\n /**\n * ID of the Wix Payments account profile the tax document belongs to. A profile is a sub-account of a Wix Payments account. Most accounts have a single profile.\n * @internal\n * @format GUID\n * @immutable\n */\n accountProfileId?: string;\n /**\n * Type of tax document.\n * @immutable\n */\n type?: TaxDocumentTypeWithLiterals;\n /**\n * Period the tax document covers.\n * @immutable\n */\n period?: TaxPeriod;\n /**\n * Whether a file is available to download for the tax document. When `false`, calling Generate File Download Info returns an error.\n *\n * At least one of `downloadable` and `problematic` is always `true`.\n */\n downloadable?: boolean;\n /**\n * Whether a problem was found with the tax document's file, for example incorrect data that's being corrected.\n *\n * At least one of `downloadable` and `problematic` is always `true`, and both can be `true` at the same time.\n */\n problematic?: boolean;\n /**\n * Whether the tax document is shown to the merchant in their Wix dashboard. A hidden tax document (`false`) is in an internal state and typically shouldn't be surfaced to the merchant.\n * @internal\n * @readonly\n */\n visible?: boolean;\n /**\n * How the tax document's amounts are aggregated.\n * @readonly\n */\n sourceType?: SourceTypeWithLiterals;\n /**\n * Human-readable name for the tax document's file.\n * @readonly\n * @minLength 1\n * @maxLength 1000\n */\n displayName?: string | null;\n /**\n * Whether the tax document's file has been replaced at least once since it was first created.\n * @internal\n * @readonly\n */\n fileEdited?: boolean;\n /**\n * [Internal] Reference to Adyen legal entity. Cant be removed any time\n * @internal\n * @readonly\n * @minLength 1\n * @maxLength 100\n */\n kycReference?: string | null;\n}\n\n/** Type of tax document. */\nexport enum TaxDocumentType {\n /** US IRS Form 1099-K. */\n FORM_1099_K = 'FORM_1099_K',\n}\n\n/** @enumType */\nexport type TaxDocumentTypeWithLiterals = TaxDocumentType | 'FORM_1099_K';\n\nexport interface TaxPeriod extends TaxPeriodOptionsOneOf {\n /** The tax document covers a full calendar year. */\n yearPeriod?: YearPeriod;\n}\n\n/** @oneof */\nexport interface TaxPeriodOptionsOneOf {\n /** The tax document covers a full calendar year. */\n yearPeriod?: YearPeriod;\n}\n\nexport interface YearPeriod {\n /** Calendar year the tax document covers. For example, `2024`. */\n year?: number;\n}\n\n/** Source of data for tax document. */\nexport enum SourceType {\n /** Amounts are aggregated by payment date. */\n PAYMENT = 'PAYMENT',\n /** Amounts are aggregated by payout date. */\n PAYOUT = 'PAYOUT',\n}\n\n/** @enumType */\nexport type SourceTypeWithLiterals = SourceType | 'PAYMENT' | 'PAYOUT';\n\nexport interface GetTaxDocumentFileHistoryRequest {\n /**\n * Id of a tax document.\n * @format GUID\n */\n taxDocumentId?: string;\n}\n\nexport interface GetTaxDocumentFileHistoryResponse {\n /** Tax document history. */\n taxDocumentFileHistory?: TaxDocumentFileHistory;\n}\n\nexport interface TaxDocumentFileHistory {\n /**\n * Tax document identifier.\n * @format GUID\n */\n taxDocumentId?: string;\n /**\n * File history records which correspond to file versions for this tax document.\n * Includes current file version, if it exists.\n * Sorted in descending order by `created_date`.\n * @maxSize 100\n */\n records?: TaxDocumentFileHistoryRecord[];\n}\n\nexport interface TaxDocumentFileHistoryRecord {\n /**\n * History record identifier.\n * @format GUID\n */\n _id?: string;\n /**\n * Date when tax document file was uploaded.\n * History record is created at the same moment.\n * @readonly\n */\n _createdDate?: Date | null;\n}\n\nexport interface GenerateHistoryFileDownloadInfoRequest {\n /**\n * Tax document to download a file for.\n * @format GUID\n */\n taxDocumentId?: string;\n /**\n * Tax document history record to download a file for.\n * @format GUID\n */\n taxDocumentFileHistoryRecordId?: string;\n}\n\nexport interface GenerateHistoryFileDownloadInfoResponse {\n /** Information used to download a file. */\n downloadInfo?: string;\n}\n\nexport interface UpdateTaxDocumentRequest {\n /** Tax document to update. */\n taxDocument?: TaxDocument;\n /**\n * Field mask.\n * @internal\n */\n fieldMask?: string[];\n}\n\nexport interface UpdateTaxDocumentResponse {\n /** Updated tax document. */\n taxDocument?: TaxDocument;\n}\n\nexport interface RefreshTaxDocumentFileRequest {\n /**\n * Tax document to be updated.\n * @format GUID\n */\n taxDocumentId?: string;\n /** Flag represents whether ping notification to user should be sent if the tax document is successfully updated. */\n notifyOnSuccess?: boolean;\n}\n\nexport interface RefreshTaxDocumentFileResponse {\n /** Latest version of the tax document. */\n taxDocument?: TaxDocument;\n /** Represents whether the document was updated. */\n updated?: boolean;\n}\n\nexport interface GenerateFileUploadTargetRequest {\n /**\n * Tax document for file upload.\n * @format GUID\n */\n taxDocumentId?: string;\n}\n\nexport interface GenerateFileUploadTargetResponse {\n /** Upload target. */\n uploadTarget?: FileUploadTarget;\n}\n\nexport interface FileUploadTarget {\n /**\n * File upload URL.\n * @format WEB_URL\n */\n uploadUrl?: string;\n /**\n * File upload token.\n * @minLength 1\n * @maxLength 1000\n */\n uploadToken?: string;\n}\n\nexport interface ConfirmFileUploadedRequest {\n /**\n * Tax document for which there was a successful upload.\n * @format GUID\n */\n taxDocumentId?: string;\n}\n\nexport interface ConfirmFileUploadedResponse {}\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\nexport interface GetTaxDocumentRequest {\n /**\n * ID of the tax document to retrieve.\n * @format GUID\n */\n taxDocumentId: string;\n}\n\nexport interface GetTaxDocumentResponse {\n /** Retrieved tax document. */\n taxDocument?: TaxDocument;\n}\n\nexport interface ListTaxDocumentsRequest {\n /**\n * ID of the Wix Payments account whose tax documents are retrieved.\n * @format GUID\n */\n accountId: string | null;\n /** Cursor paging options. */\n paging?: CursorPaging;\n /** Filters the retrieved tax documents by type. When omitted, tax documents of all types are returned. */\n type?: TaxDocumentTypeWithLiterals;\n /**\n * Filters the retrieved tax documents by whether they're visible to the merchant. When omitted, both visible and hidden tax documents are returned.\n * @internal\n */\n visible?: boolean | null;\n}\n\nexport interface CursorPaging {\n /**\n * Number of items to load.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * You can get the relevant cursor token\n * from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface ListTaxDocumentsResponse {\n /** Retrieved tax documents. */\n taxDocuments?: TaxDocument[];\n /** Paging metadata. */\n pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n /**\n * Indicates if there are more results after the current page.\n * If `true`, another page of results can be retrieved.\n * If `false`, this is the last page.\n * @internal\n */\n hasNext?: boolean | null;\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 GenerateFileDownloadInfoRequest {\n /**\n * ID of the tax document to download a file for.\n * @format GUID\n */\n taxDocumentId: string;\n}\n\nexport interface GenerateFileDownloadInfoResponse {\n /** Information for downloading the tax document's file. */\n downloadInfo?: string;\n}\n\n/**\n * Retrieves a tax document by ID.\n * @param taxDocumentId - ID of the tax document to retrieve.\n * @public\n * @documentationMaturity preview\n * @requiredField taxDocumentId\n * @permissionId PAYMENTS.TAX_DOCUMENT_READ\n * @applicableIdentity APP\n * @returns Retrieved tax document.\n * @fqn wix.payments.tax_documents.v1.TaxDocumentsService.GetTaxDocument\n */\nexport async function getTaxDocument(\n taxDocumentId: string\n): Promise<\n NonNullablePaths<\n TaxDocument,\n | `revision`\n | `accountId`\n | `type`\n | `period.yearPeriod.year`\n | `downloadable`\n | `problematic`\n | `sourceType`,\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({\n taxDocumentId: taxDocumentId,\n });\n\n const reqOpts =\n ambassadorWixPaymentsTaxDocumentsV1TaxDocument.getTaxDocument(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.taxDocument!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { taxDocumentId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['taxDocumentId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of tax documents that belong to a Wix Payments account.\n *\n * You must specify the `accountId` of the account whose tax documents you want to retrieve.\n *\n * Tax documents are sorted in descending order by `period`, then by `createdDate`.\n *\n * When `type` is omitted, tax documents of all types are returned.\n * @param accountId - ID of the Wix Payments account whose tax documents are retrieved.\n * @public\n * @documentationMaturity preview\n * @requiredField accountId\n * @permissionId PAYMENTS.TAX_DOCUMENT_READ\n * @applicableIdentity APP\n * @fqn wix.payments.tax_documents.v1.TaxDocumentsService.ListTaxDocuments\n */\nexport async function listTaxDocuments(\n accountId: string,\n options?: ListTaxDocumentsOptions\n): Promise<\n NonNullablePaths<\n ListTaxDocumentsResponse,\n | `taxDocuments`\n | `taxDocuments.${number}.revision`\n | `taxDocuments.${number}.accountId`\n | `taxDocuments.${number}.type`\n | `taxDocuments.${number}.period.yearPeriod.year`\n | `taxDocuments.${number}.downloadable`\n | `taxDocuments.${number}.problematic`\n | `taxDocuments.${number}.sourceType`,\n 6\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 accountId: accountId,\n paging: options?.paging,\n type: options?.type,\n });\n\n const reqOpts =\n ambassadorWixPaymentsTaxDocumentsV1TaxDocument.listTaxDocuments(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 accountId: '$[0]',\n paging: '$[1].paging',\n type: '$[1].type',\n },\n singleArgumentUnchanged: false,\n },\n ['accountId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListTaxDocumentsOptions {\n /** Cursor paging options. */\n paging?: CursorPaging;\n /** Filters the retrieved tax documents by type. When omitted, tax documents of all types are returned. */\n type?: TaxDocumentTypeWithLiterals;\n}\n\n/**\n * Generates temporary information for downloading a tax document's file.\n *\n * The returned `downloadInfo.url` is a temporary link to a PDF. It expires 10 seconds after it's generated, so follow it immediately, and don't store it as a static link. Call this method again to get a fresh URL.\n *\n * The tax document must have a file available, meaning its `downloadable` field is `true`.\n * @param taxDocumentId - ID of the tax document to download a file for.\n * @public\n * @documentationMaturity preview\n * @requiredField taxDocumentId\n * @permissionId PAYMENTS.TAX_DOCUMENT_DOWNLOAD\n * @applicableIdentity APP\n * @fqn wix.payments.tax_documents.v1.TaxDocumentsService.GenerateFileDownloadInfo\n */\nexport async function generateFileDownloadInfo(\n taxDocumentId: string\n): Promise<GenerateFileDownloadInfoResponse> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n taxDocumentId: taxDocumentId,\n });\n\n const reqOpts =\n ambassadorWixPaymentsTaxDocumentsV1TaxDocument.generateFileDownloadInfo(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTDocumentToSDKDocument,\n paths: [{ path: 'downloadInfo' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { taxDocumentId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['taxDocumentId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixPaymentsTaxDocumentsV1TaxDocumentsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/tax-document-service/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n {\n srcPath: '/_api/finance/wix-payments/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/tax-document-service/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/tax-document-service/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/tax-document-service/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n 'manage.base44.com': [\n {\n srcPath: '/_api/tax-document-service',\n destPath: '',\n },\n ],\n 'payments.base44.com': [\n {\n srcPath: '/_api/tax-document-service',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/payments/platform/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n _: [\n {\n srcPath: '/payments/platform/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/payments/platform/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_payments_tax-documents';\n\n/** Retrieves a tax document by ID. */\nexport function getTaxDocument(payload: object): RequestOptionsFactory<any> {\n function __getTaxDocument({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.tax_documents.v1.tax_document',\n method: 'GET' as any,\n methodFqn:\n 'wix.payments.tax_documents.v1.TaxDocumentsService.GetTaxDocument',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsTaxDocumentsV1TaxDocumentsServiceUrl({\n protoPath: '/v1/tax-documents/{taxDocumentId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'taxDocument.createdDate' },\n { path: 'taxDocument.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getTaxDocument;\n}\n\n/**\n * Retrieves a list of tax documents that belong to a Wix Payments account.\n *\n * You must specify the `accountId` of the account whose tax documents you want to retrieve.\n *\n * Tax documents are sorted in descending order by `period`, then by `createdDate`.\n *\n * When `type` is omitted, tax documents of all types are returned.\n */\nexport function listTaxDocuments(payload: object): RequestOptionsFactory<any> {\n function __listTaxDocuments({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.tax_documents.v1.tax_document',\n method: 'GET' as any,\n methodFqn:\n 'wix.payments.tax_documents.v1.TaxDocumentsService.ListTaxDocuments',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsTaxDocumentsV1TaxDocumentsServiceUrl({\n protoPath: '/v1/tax-documents',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'taxDocuments.createdDate' },\n { path: 'taxDocuments.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listTaxDocuments;\n}\n\n/**\n * Generates temporary information for downloading a tax document's file.\n *\n * The returned `downloadInfo.url` is a temporary link to a PDF. It expires 10 seconds after it's generated, so follow it immediately, and don't store it as a static link. Call this method again to get a fresh URL.\n *\n * The tax document must have a file available, meaning its `downloadable` field is `true`.\n */\nexport function generateFileDownloadInfo(\n payload: object\n): RequestOptionsFactory<any> {\n function __generateFileDownloadInfo({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.tax_documents.v1.tax_document',\n method: 'GET' as any,\n methodFqn:\n 'wix.payments.tax_documents.v1.TaxDocumentsService.GenerateFileDownloadInfo',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsTaxDocumentsV1TaxDocumentsServiceUrl({\n protoPath:\n '/v1/tax-documents/{taxDocumentId}/generate-file-download-info',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'downloadInfo.urlExpirationDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __generateFileDownloadInfo;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kCAAAA;AAAA,EAAA,sBAAAC;AAAA,EAAA,wBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,uDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,uBAAuB;AAAA,MACrB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAA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AE3C,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD;AAAA,EACF,CAAC;AAED,QAAM,UAC2C;AAAA,IAC7C;AAAA,EACF;AAEF,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO;AAAA,UACL,wCAAe,OAAO,MAAM;AAAA,QAC1B;AAAA,UACE,aAAa;AAAA,UACb,OAAO,CAAC,EAAE,MAAM,eAAe,CAAC;AAAA,QAClC;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAF;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,eAAe,OAAO;AAAA,QAClD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,eAAe;AAAA,IAClB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["generateFileDownloadInfo","getTaxDocument","listTaxDocuments","import_rest_modules","payload","import_transform_paths","TaxDocumentType","SourceType","WebhookIdentityType","getTaxDocument","sdkTransformError","listTaxDocuments","generateFileDownloadInfo"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../meta.ts","../../src/payments-tax-documents-v1-tax-document-tax-documents.http.ts","../../src/payments-tax-documents-v1-tax-document-tax-documents.types.ts","../../src/payments-tax-documents-v1-tax-document-tax-documents.meta.ts"],"sourcesContent":["export * from './src/payments-tax-documents-v1-tax-document-tax-documents.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 resolveWixPaymentsTaxDocumentsV1TaxDocumentsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/tax-document-service/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n {\n srcPath: '/_api/finance/wix-payments/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/tax-document-service/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/tax-document-service/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/tax-document-service/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n 'manage.base44.com': [\n {\n srcPath: '/_api/tax-document-service',\n destPath: '',\n },\n ],\n 'payments.base44.com': [\n {\n srcPath: '/_api/tax-document-service',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/payments/platform/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n _: [\n {\n srcPath: '/payments/platform/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/payments/platform/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_payments_tax-documents';\n\n/** Retrieves a tax document by ID. */\nexport function getTaxDocument(payload: object): RequestOptionsFactory<any> {\n function __getTaxDocument({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.tax_documents.v1.tax_document',\n method: 'GET' as any,\n methodFqn:\n 'wix.payments.tax_documents.v1.TaxDocumentsService.GetTaxDocument',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsTaxDocumentsV1TaxDocumentsServiceUrl({\n protoPath: '/v1/tax-documents/{taxDocumentId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'taxDocument.createdDate' },\n { path: 'taxDocument.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getTaxDocument;\n}\n\n/**\n * Retrieves a list of tax documents that belong to a Wix Payments account.\n *\n * You must specify the `accountId` of the account whose tax documents you want to retrieve.\n *\n * Tax documents are sorted in descending order by `period`, then by `createdDate`.\n *\n * When `type` is omitted, tax documents of all types are returned.\n */\nexport function listTaxDocuments(payload: object): RequestOptionsFactory<any> {\n function __listTaxDocuments({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.tax_documents.v1.tax_document',\n method: 'GET' as any,\n methodFqn:\n 'wix.payments.tax_documents.v1.TaxDocumentsService.ListTaxDocuments',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsTaxDocumentsV1TaxDocumentsServiceUrl({\n protoPath: '/v1/tax-documents',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'taxDocuments.createdDate' },\n { path: 'taxDocuments.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listTaxDocuments;\n}\n\n/**\n * Generates temporary information for downloading a tax document's file.\n *\n * The returned `downloadInfo.url` is a temporary link to a PDF. It expires 10 seconds after it's generated, so follow it immediately, and don't store it as a static link. Call this method again to get a fresh URL.\n *\n * The tax document must have a file available, meaning its `downloadable` field is `true`.\n */\nexport function generateFileDownloadInfo(\n payload: object\n): RequestOptionsFactory<any> {\n function __generateFileDownloadInfo({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.tax_documents.v1.tax_document',\n method: 'GET' as any,\n methodFqn:\n 'wix.payments.tax_documents.v1.TaxDocumentsService.GenerateFileDownloadInfo',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsTaxDocumentsV1TaxDocumentsServiceUrl({\n protoPath:\n '/v1/tax-documents/{taxDocumentId}/generate-file-download-info',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'downloadInfo.urlExpirationDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __generateFileDownloadInfo;\n}\n","/**\n * A tax document is a tax-related form that Wix Payments issues to a merchant, such as a US IRS Form 1099-K.\n * Each tax document belongs to a Wix Payments account and covers a specific period.\n * When a document's file is available, you can generate a temporary URL to download it as a PDF.\n */\nexport interface TaxDocument {\n /**\n * Tax document ID.\n * @format GUID\n * @readonly\n */\n id?: string | null;\n /**\n * Date and time the tax document was created.\n * @readonly\n */\n createdDate?: Date | null;\n /**\n * Date and time the tax document was last updated.\n * @readonly\n */\n updatedDate?: Date | null;\n /**\n * Revision number, which increments by 1 each time the tax document is updated.\n * @readonly\n */\n revision?: string;\n /**\n * ID of the Wix Payments account the tax document belongs to.\n * @format GUID\n * @immutable\n */\n accountId?: string;\n /**\n * Type of tax document.\n * @immutable\n */\n type?: TaxDocumentTypeWithLiterals;\n /**\n * Period the tax document covers.\n * @immutable\n */\n period?: TaxPeriod;\n /**\n * Whether a file is available to download for the tax document. When `false`, calling Generate File Download Info returns an error.\n *\n * At least one of `downloadable` and `problematic` is always `true`.\n */\n downloadable?: boolean;\n /**\n * Whether a problem was found with the tax document's file, for example incorrect data that's being corrected.\n *\n * At least one of `downloadable` and `problematic` is always `true`, and both can be `true` at the same time.\n */\n problematic?: boolean;\n /**\n * How the tax document's amounts are aggregated.\n * @readonly\n */\n sourceType?: SourceTypeWithLiterals;\n /**\n * Human-readable name for the tax document's file.\n * @readonly\n * @minLength 1\n * @maxLength 1000\n */\n displayName?: string | null;\n}\n\n/** Type of tax document. */\nexport enum TaxDocumentType {\n /** US IRS Form 1099-K. */\n FORM_1099_K = 'FORM_1099_K',\n}\n\n/** @enumType */\nexport type TaxDocumentTypeWithLiterals = TaxDocumentType | 'FORM_1099_K';\n\nexport interface TaxPeriod extends TaxPeriodOptionsOneOf {\n /** The tax document covers a full calendar year. */\n yearPeriod?: YearPeriod;\n}\n\n/** @oneof */\nexport interface TaxPeriodOptionsOneOf {\n /** The tax document covers a full calendar year. */\n yearPeriod?: YearPeriod;\n}\n\nexport interface YearPeriod {\n /** Calendar year the tax document covers. For example, `2024`. */\n year?: number;\n}\n\n/** Source of data for tax document. */\nexport enum SourceType {\n /** Amounts are aggregated by payment date. */\n PAYMENT = 'PAYMENT',\n /** Amounts are aggregated by payout date. */\n PAYOUT = 'PAYOUT',\n}\n\n/** @enumType */\nexport type SourceTypeWithLiterals = SourceType | 'PAYMENT' | 'PAYOUT';\n\nexport interface GetTaxDocumentFileHistoryRequest {\n /**\n * Id of a tax document.\n * @format GUID\n */\n taxDocumentId?: string;\n}\n\nexport interface GetTaxDocumentFileHistoryResponse {\n /** Tax document history. */\n taxDocumentFileHistory?: TaxDocumentFileHistory;\n}\n\nexport interface TaxDocumentFileHistory {\n /**\n * Tax document identifier.\n * @format GUID\n */\n taxDocumentId?: string;\n /**\n * File history records which correspond to file versions for this tax document.\n * Includes current file version, if it exists.\n * Sorted in descending order by `created_date`.\n * @maxSize 100\n */\n records?: TaxDocumentFileHistoryRecord[];\n}\n\nexport interface TaxDocumentFileHistoryRecord {\n /**\n * History record identifier.\n * @format GUID\n */\n id?: string;\n /**\n * Date when tax document file was uploaded.\n * History record is created at the same moment.\n * @readonly\n */\n createdDate?: Date | null;\n}\n\nexport interface GenerateHistoryFileDownloadInfoRequest {\n /**\n * Tax document to download a file for.\n * @format GUID\n */\n taxDocumentId?: string;\n /**\n * Tax document history record to download a file for.\n * @format GUID\n */\n taxDocumentFileHistoryRecordId?: string;\n}\n\nexport interface GenerateHistoryFileDownloadInfoResponse {\n /** Information used to download a file. */\n downloadInfo?: Document;\n}\n\nexport interface Document {\n /** Not used. Always empty for tax documents. */\n id?: string;\n /**\n * Temporary URL for downloading the tax document's PDF file. Expires 10 seconds after it's generated.\n * @format WEB_URL\n */\n url?: string;\n /** Date and time the download URL expires, 10 seconds after it's generated. */\n urlExpirationDate?: Date | null;\n /**\n * File size in bytes.\n * @decimalValue options { gt:0, maxScale:0 }\n */\n sizeInBytes?: string | null;\n /**\n * File name.\n * @maxLength 255\n */\n filename?: string | null;\n}\n\nexport interface UpdateTaxDocumentRequest {\n /** Tax document to update. */\n taxDocument?: TaxDocument;\n}\n\nexport interface UpdateTaxDocumentResponse {\n /** Updated tax document. */\n taxDocument?: TaxDocument;\n}\n\nexport interface RefreshTaxDocumentFileRequest {\n /**\n * Tax document to be updated.\n * @format GUID\n */\n taxDocumentId?: string;\n /** Flag represents whether ping notification to user should be sent if the tax document is successfully updated. */\n notifyOnSuccess?: boolean;\n}\n\nexport interface RefreshTaxDocumentFileResponse {\n /** Latest version of the tax document. */\n taxDocument?: TaxDocument;\n /** Represents whether the document was updated. */\n updated?: boolean;\n}\n\nexport interface GenerateFileUploadTargetRequest {\n /**\n * Tax document for file upload.\n * @format GUID\n */\n taxDocumentId?: string;\n}\n\nexport interface GenerateFileUploadTargetResponse {\n /** Upload target. */\n uploadTarget?: FileUploadTarget;\n}\n\nexport interface FileUploadTarget {\n /**\n * File upload URL.\n * @format WEB_URL\n */\n uploadUrl?: string;\n /**\n * File upload token.\n * @minLength 1\n * @maxLength 1000\n */\n uploadToken?: string;\n}\n\nexport interface ConfirmFileUploadedRequest {\n /**\n * Tax document for which there was a successful upload.\n * @format GUID\n */\n taxDocumentId?: string;\n}\n\nexport interface ConfirmFileUploadedResponse {}\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\nexport interface GetTaxDocumentRequest {\n /**\n * ID of the tax document to retrieve.\n * @format GUID\n */\n taxDocumentId: string;\n}\n\nexport interface GetTaxDocumentResponse {\n /** Retrieved tax document. */\n taxDocument?: TaxDocument;\n}\n\nexport interface ListTaxDocumentsRequest {\n /**\n * ID of the Wix Payments account whose tax documents are retrieved.\n * @format GUID\n */\n accountId: string | null;\n /** Cursor paging options. */\n paging?: CursorPaging;\n /** Filters the retrieved tax documents by type. When omitted, tax documents of all types are returned. */\n type?: TaxDocumentTypeWithLiterals;\n}\n\nexport interface CursorPaging {\n /**\n * Number of items to load.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * You can get the relevant cursor token\n * from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface ListTaxDocumentsResponse {\n /** Retrieved tax documents. */\n taxDocuments?: TaxDocument[];\n /** Paging metadata. */\n pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | 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 GenerateFileDownloadInfoRequest {\n /**\n * ID of the tax document to download a file for.\n * @format GUID\n */\n taxDocumentId: string;\n}\n\nexport interface GenerateFileDownloadInfoResponse {\n /** Information for downloading the tax document's file. */\n downloadInfo?: Document;\n}\n","import * as ambassadorWixPaymentsTaxDocumentsV1TaxDocument from './payments-tax-documents-v1-tax-document-tax-documents.http.js';\nimport * as ambassadorWixPaymentsTaxDocumentsV1TaxDocumentTypes from './payments-tax-documents-v1-tax-document-tax-documents.types.js';\nimport * as ambassadorWixPaymentsTaxDocumentsV1TaxDocumentUniversalTypes from './payments-tax-documents-v1-tax-document-tax-documents.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 getTaxDocument(): __PublicMethodMetaInfo<\n 'GET',\n { taxDocumentId: string },\n ambassadorWixPaymentsTaxDocumentsV1TaxDocumentUniversalTypes.GetTaxDocumentRequest,\n ambassadorWixPaymentsTaxDocumentsV1TaxDocumentTypes.GetTaxDocumentRequest,\n ambassadorWixPaymentsTaxDocumentsV1TaxDocumentUniversalTypes.GetTaxDocumentResponse,\n ambassadorWixPaymentsTaxDocumentsV1TaxDocumentTypes.GetTaxDocumentResponse\n> {\n const payload = { taxDocumentId: ':taxDocumentId' } as any;\n\n const getRequestOptions =\n ambassadorWixPaymentsTaxDocumentsV1TaxDocument.getTaxDocument(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/tax-documents/{taxDocumentId}',\n pathParams: { taxDocumentId: 'taxDocumentId' },\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 listTaxDocuments(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixPaymentsTaxDocumentsV1TaxDocumentUniversalTypes.ListTaxDocumentsRequest,\n ambassadorWixPaymentsTaxDocumentsV1TaxDocumentTypes.ListTaxDocumentsRequest,\n ambassadorWixPaymentsTaxDocumentsV1TaxDocumentUniversalTypes.ListTaxDocumentsResponse,\n ambassadorWixPaymentsTaxDocumentsV1TaxDocumentTypes.ListTaxDocumentsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixPaymentsTaxDocumentsV1TaxDocument.listTaxDocuments(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/tax-documents',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function generateFileDownloadInfo(): __PublicMethodMetaInfo<\n 'GET',\n { taxDocumentId: string },\n ambassadorWixPaymentsTaxDocumentsV1TaxDocumentUniversalTypes.GenerateFileDownloadInfoRequest,\n ambassadorWixPaymentsTaxDocumentsV1TaxDocumentTypes.GenerateFileDownloadInfoRequest,\n ambassadorWixPaymentsTaxDocumentsV1TaxDocumentUniversalTypes.GenerateFileDownloadInfoResponse,\n ambassadorWixPaymentsTaxDocumentsV1TaxDocumentTypes.GenerateFileDownloadInfoResponse\n> {\n const payload = { taxDocumentId: ':taxDocumentId' } as any;\n\n const getRequestOptions =\n ambassadorWixPaymentsTaxDocumentsV1TaxDocument.generateFileDownloadInfo(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/tax-documents/{taxDocumentId}/generate-file-download-info',\n pathParams: { taxDocumentId: 'taxDocumentId' },\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 TaxDocument as TaxDocumentOriginal,\n TaxDocumentType as TaxDocumentTypeOriginal,\n TaxDocumentTypeWithLiterals as TaxDocumentTypeWithLiteralsOriginal,\n TaxPeriod as TaxPeriodOriginal,\n TaxPeriodOptionsOneOf as TaxPeriodOptionsOneOfOriginal,\n YearPeriod as YearPeriodOriginal,\n SourceType as SourceTypeOriginal,\n SourceTypeWithLiterals as SourceTypeWithLiteralsOriginal,\n GetTaxDocumentFileHistoryRequest as GetTaxDocumentFileHistoryRequestOriginal,\n GetTaxDocumentFileHistoryResponse as GetTaxDocumentFileHistoryResponseOriginal,\n TaxDocumentFileHistory as TaxDocumentFileHistoryOriginal,\n TaxDocumentFileHistoryRecord as TaxDocumentFileHistoryRecordOriginal,\n GenerateHistoryFileDownloadInfoRequest as GenerateHistoryFileDownloadInfoRequestOriginal,\n GenerateHistoryFileDownloadInfoResponse as GenerateHistoryFileDownloadInfoResponseOriginal,\n Document as DocumentOriginal,\n UpdateTaxDocumentRequest as UpdateTaxDocumentRequestOriginal,\n UpdateTaxDocumentResponse as UpdateTaxDocumentResponseOriginal,\n RefreshTaxDocumentFileRequest as RefreshTaxDocumentFileRequestOriginal,\n RefreshTaxDocumentFileResponse as RefreshTaxDocumentFileResponseOriginal,\n GenerateFileUploadTargetRequest as GenerateFileUploadTargetRequestOriginal,\n GenerateFileUploadTargetResponse as GenerateFileUploadTargetResponseOriginal,\n FileUploadTarget as FileUploadTargetOriginal,\n ConfirmFileUploadedRequest as ConfirmFileUploadedRequestOriginal,\n ConfirmFileUploadedResponse as ConfirmFileUploadedResponseOriginal,\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 GetTaxDocumentRequest as GetTaxDocumentRequestOriginal,\n GetTaxDocumentResponse as GetTaxDocumentResponseOriginal,\n ListTaxDocumentsRequest as ListTaxDocumentsRequestOriginal,\n CursorPaging as CursorPagingOriginal,\n ListTaxDocumentsResponse as ListTaxDocumentsResponseOriginal,\n PagingMetadataV2 as PagingMetadataV2Original,\n Cursors as CursorsOriginal,\n GenerateFileDownloadInfoRequest as GenerateFileDownloadInfoRequestOriginal,\n GenerateFileDownloadInfoResponse as GenerateFileDownloadInfoResponseOriginal,\n} from './payments-tax-documents-v1-tax-document-tax-documents.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kCAAAA;AAAA,EAAA,sBAAAC;AAAA,EAAA,wBAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,uBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,uDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,uBAAuB;AAAA,MACrB;AAAA,QACE,SAAS;AAAA,QACT,UAA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AChXL,SAASC,kBAOd;AACA,QAAM,UAAU,EAAE,eAAe,iBAAiB;AAElD,QAAM,oBAC2C,eAAe,OAAO;AAEvE,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,eAAe,gBAAgB;AAAA,IAC7C,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,oBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBAC2C,iBAAiB,OAAO;AAEzE,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,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,4BAOd;AACA,QAAM,UAAU,EAAE,eAAe,iBAAiB;AAElD,QAAM,oBAC2C;AAAA,IAC7C;AAAA,EACF;AAEF,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,eAAe,gBAAgB;AAAA,IAC7C,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["generateFileDownloadInfo","getTaxDocument","listTaxDocuments","import_rest_modules","payload","TaxDocumentType","SourceType","WebhookIdentityType","getTaxDocument","listTaxDocuments","generateFileDownloadInfo"]}
1
+ {"version":3,"sources":["../../meta.ts","../../src/payments-tax-documents-v1-tax-document-tax-documents.http.ts","../../src/payments-tax-documents-v1-tax-document-tax-documents.types.ts","../../src/payments-tax-documents-v1-tax-document-tax-documents.meta.ts"],"sourcesContent":["export * from './src/payments-tax-documents-v1-tax-document-tax-documents.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 resolveWixPaymentsTaxDocumentsV1TaxDocumentsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/tax-document-service/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n {\n srcPath: '/_api/finance/wix-payments/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/tax-document-service/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/tax-document-service/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/tax-document-service/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n 'manage.base44.com': [\n {\n srcPath: '/_api/tax-document-service',\n destPath: '',\n },\n ],\n 'payments.base44.com': [\n {\n srcPath: '/_api/tax-document-service',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/payments/platform/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n _: [\n {\n srcPath: '/payments/platform/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/payments/platform/v1/tax-documents',\n destPath: '/v1/tax-documents',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_payments_tax-documents';\n\n/** Retrieves a tax document by ID. */\nexport function getTaxDocument(payload: object): RequestOptionsFactory<any> {\n function __getTaxDocument({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.tax_documents.v1.tax_document',\n method: 'GET' as any,\n methodFqn:\n 'wix.payments.tax_documents.v1.TaxDocumentsService.GetTaxDocument',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsTaxDocumentsV1TaxDocumentsServiceUrl({\n protoPath: '/v1/tax-documents/{taxDocumentId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'taxDocument.createdDate' },\n { path: 'taxDocument.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getTaxDocument;\n}\n\n/**\n * Retrieves a list of tax documents that belong to a Wix Payments account.\n *\n * You must specify the `accountId` of the account whose tax documents you want to retrieve.\n *\n * Tax documents are sorted in descending order by `period`, then by `createdDate`.\n *\n * When `type` is omitted, tax documents of all types are returned.\n */\nexport function listTaxDocuments(payload: object): RequestOptionsFactory<any> {\n function __listTaxDocuments({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.tax_documents.v1.tax_document',\n method: 'GET' as any,\n methodFqn:\n 'wix.payments.tax_documents.v1.TaxDocumentsService.ListTaxDocuments',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsTaxDocumentsV1TaxDocumentsServiceUrl({\n protoPath: '/v1/tax-documents',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'taxDocuments.createdDate' },\n { path: 'taxDocuments.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listTaxDocuments;\n}\n\n/**\n * Generates temporary information for downloading a tax document's file.\n *\n * The returned `downloadInfo.url` is a temporary link to a PDF. It expires 10 seconds after it's generated, so follow it immediately, and don't store it as a static link. Call this method again to get a fresh URL.\n *\n * The tax document must have a file available, meaning its `downloadable` field is `true`.\n */\nexport function generateFileDownloadInfo(\n payload: object\n): RequestOptionsFactory<any> {\n function __generateFileDownloadInfo({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.tax_documents.v1.tax_document',\n method: 'GET' as any,\n methodFqn:\n 'wix.payments.tax_documents.v1.TaxDocumentsService.GenerateFileDownloadInfo',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsTaxDocumentsV1TaxDocumentsServiceUrl({\n protoPath:\n '/v1/tax-documents/{taxDocumentId}/generate-file-download-info',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'downloadInfo.urlExpirationDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __generateFileDownloadInfo;\n}\n","/**\n * A tax document is a tax-related form that Wix Payments issues to a merchant, such as a US IRS Form 1099-K.\n * Each tax document belongs to a Wix Payments account and covers a specific period.\n * When a document's file is available, you can generate a temporary URL to download it as a PDF.\n */\nexport interface TaxDocument {\n /**\n * Tax document ID.\n * @format GUID\n * @readonly\n */\n id?: string | null;\n /**\n * Date and time the tax document was created.\n * @readonly\n */\n createdDate?: Date | null;\n /**\n * Date and time the tax document was last updated.\n * @readonly\n */\n updatedDate?: Date | null;\n /**\n * Revision number, which increments by 1 each time the tax document is updated.\n * @readonly\n */\n revision?: string;\n /**\n * ID of the Wix Payments account the tax document belongs to.\n * @format GUID\n * @immutable\n */\n accountId?: string;\n /**\n * ID of the Wix Payments account profile the tax document belongs to. A profile is a sub-account of a Wix Payments account. Most accounts have a single profile.\n * @internal\n * @format GUID\n * @immutable\n */\n accountProfileId?: string;\n /**\n * Type of tax document.\n * @immutable\n */\n type?: TaxDocumentTypeWithLiterals;\n /**\n * Period the tax document covers.\n * @immutable\n */\n period?: TaxPeriod;\n /**\n * Whether a file is available to download for the tax document. When `false`, calling Generate File Download Info returns an error.\n *\n * At least one of `downloadable` and `problematic` is always `true`.\n */\n downloadable?: boolean;\n /**\n * Whether a problem was found with the tax document's file, for example incorrect data that's being corrected.\n *\n * At least one of `downloadable` and `problematic` is always `true`, and both can be `true` at the same time.\n */\n problematic?: boolean;\n /**\n * Whether the tax document is shown to the merchant in their Wix dashboard. A hidden tax document (`false`) is in an internal state and typically shouldn't be surfaced to the merchant.\n * @internal\n * @readonly\n */\n visible?: boolean;\n /**\n * How the tax document's amounts are aggregated.\n * @readonly\n */\n sourceType?: SourceTypeWithLiterals;\n /**\n * Human-readable name for the tax document's file.\n * @readonly\n * @minLength 1\n * @maxLength 1000\n */\n displayName?: string | null;\n /**\n * Whether the tax document's file has been replaced at least once since it was first created.\n * @internal\n * @readonly\n */\n fileEdited?: boolean;\n /**\n * [Internal] Reference to Adyen legal entity. Cant be removed any time\n * @internal\n * @readonly\n * @minLength 1\n * @maxLength 100\n */\n kycReference?: string | null;\n}\n\n/** Type of tax document. */\nexport enum TaxDocumentType {\n /** US IRS Form 1099-K. */\n FORM_1099_K = 'FORM_1099_K',\n}\n\n/** @enumType */\nexport type TaxDocumentTypeWithLiterals = TaxDocumentType | 'FORM_1099_K';\n\nexport interface TaxPeriod extends TaxPeriodOptionsOneOf {\n /** The tax document covers a full calendar year. */\n yearPeriod?: YearPeriod;\n}\n\n/** @oneof */\nexport interface TaxPeriodOptionsOneOf {\n /** The tax document covers a full calendar year. */\n yearPeriod?: YearPeriod;\n}\n\nexport interface YearPeriod {\n /** Calendar year the tax document covers. For example, `2024`. */\n year?: number;\n}\n\n/** Source of data for tax document. */\nexport enum SourceType {\n /** Amounts are aggregated by payment date. */\n PAYMENT = 'PAYMENT',\n /** Amounts are aggregated by payout date. */\n PAYOUT = 'PAYOUT',\n}\n\n/** @enumType */\nexport type SourceTypeWithLiterals = SourceType | 'PAYMENT' | 'PAYOUT';\n\nexport interface GetTaxDocumentFileHistoryRequest {\n /**\n * Id of a tax document.\n * @format GUID\n */\n taxDocumentId?: string;\n}\n\nexport interface GetTaxDocumentFileHistoryResponse {\n /** Tax document history. */\n taxDocumentFileHistory?: TaxDocumentFileHistory;\n}\n\nexport interface TaxDocumentFileHistory {\n /**\n * Tax document identifier.\n * @format GUID\n */\n taxDocumentId?: string;\n /**\n * File history records which correspond to file versions for this tax document.\n * Includes current file version, if it exists.\n * Sorted in descending order by `created_date`.\n * @maxSize 100\n */\n records?: TaxDocumentFileHistoryRecord[];\n}\n\nexport interface TaxDocumentFileHistoryRecord {\n /**\n * History record identifier.\n * @format GUID\n */\n id?: string;\n /**\n * Date when tax document file was uploaded.\n * History record is created at the same moment.\n * @readonly\n */\n createdDate?: Date | null;\n}\n\nexport interface GenerateHistoryFileDownloadInfoRequest {\n /**\n * Tax document to download a file for.\n * @format GUID\n */\n taxDocumentId?: string;\n /**\n * Tax document history record to download a file for.\n * @format GUID\n */\n taxDocumentFileHistoryRecordId?: string;\n}\n\nexport interface GenerateHistoryFileDownloadInfoResponse {\n /** Information used to download a file. */\n downloadInfo?: Document;\n}\n\nexport interface Document {\n /** Not used. Always empty for tax documents. */\n id?: string;\n /**\n * Temporary URL for downloading the tax document's PDF file. Expires 10 seconds after it's generated.\n * @format WEB_URL\n */\n url?: string;\n /** Date and time the download URL expires, 10 seconds after it's generated. */\n urlExpirationDate?: Date | null;\n /**\n * File size in bytes.\n * @decimalValue options { gt:0, maxScale:0 }\n */\n sizeInBytes?: string | null;\n /**\n * File name.\n * @maxLength 255\n */\n filename?: string | null;\n}\n\nexport interface UpdateTaxDocumentRequest {\n /** Tax document to update. */\n taxDocument?: TaxDocument;\n /**\n * Field mask.\n * @internal\n */\n fieldMask?: string[];\n}\n\nexport interface UpdateTaxDocumentResponse {\n /** Updated tax document. */\n taxDocument?: TaxDocument;\n}\n\nexport interface RefreshTaxDocumentFileRequest {\n /**\n * Tax document to be updated.\n * @format GUID\n */\n taxDocumentId?: string;\n /** Flag represents whether ping notification to user should be sent if the tax document is successfully updated. */\n notifyOnSuccess?: boolean;\n}\n\nexport interface RefreshTaxDocumentFileResponse {\n /** Latest version of the tax document. */\n taxDocument?: TaxDocument;\n /** Represents whether the document was updated. */\n updated?: boolean;\n}\n\nexport interface GenerateFileUploadTargetRequest {\n /**\n * Tax document for file upload.\n * @format GUID\n */\n taxDocumentId?: string;\n}\n\nexport interface GenerateFileUploadTargetResponse {\n /** Upload target. */\n uploadTarget?: FileUploadTarget;\n}\n\nexport interface FileUploadTarget {\n /**\n * File upload URL.\n * @format WEB_URL\n */\n uploadUrl?: string;\n /**\n * File upload token.\n * @minLength 1\n * @maxLength 1000\n */\n uploadToken?: string;\n}\n\nexport interface ConfirmFileUploadedRequest {\n /**\n * Tax document for which there was a successful upload.\n * @format GUID\n */\n taxDocumentId?: string;\n}\n\nexport interface ConfirmFileUploadedResponse {}\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 /**\n * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity\n * @internal\n */\n triggeredByUndelete?: boolean | null;\n /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n restoreInfo?: RestoreInfo;\n /**\n * Optional domain-specific metadata defined by the API owner, encoded as JSON.\n * @internal\n */\n additionalMetadataAsJson?: string | null;\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 * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard\n * wont populate it / have any reference to it in the API.\n * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed,\n * the developer should send only the new (current) entity.\n * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big\n * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message.\n * @internal\n * @deprecated\n */\n previousEntityAsJson?: string | null;\n /**\n * Map of fully qualified field paths to their previous values for fields that changed.\n * For more details please see [AIP](https://dev.wix.com/docs/rnd-general/articles/p13n-guidelines-aips/guidance-aips/design-patterns/7016-events#modified-fields-format)\n * @internal\n */\n modifiedFields?: Record<string, any>;\n /**\n * Optional domain-specific metadata defined by the API owner, encoded as JSON.\n * @internal\n */\n additionalMetadataAsJson?: string | null;\n}\n\nexport interface EntityDeletedEvent {\n /**\n * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled\n * @internal\n */\n movedToTrash?: boolean | null;\n /** Entity that was deleted. */\n deletedEntityAsJson?: string | null;\n /**\n * Optional domain-specific metadata defined by the API owner, encoded as JSON.\n * @internal\n */\n additionalMetadataAsJson?: 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\nexport interface GetTaxDocumentRequest {\n /**\n * ID of the tax document to retrieve.\n * @format GUID\n */\n taxDocumentId: string;\n}\n\nexport interface GetTaxDocumentResponse {\n /** Retrieved tax document. */\n taxDocument?: TaxDocument;\n}\n\nexport interface ListTaxDocumentsRequest {\n /**\n * ID of the Wix Payments account whose tax documents are retrieved.\n * @format GUID\n */\n accountId: string | null;\n /** Cursor paging options. */\n paging?: CursorPaging;\n /** Filters the retrieved tax documents by type. When omitted, tax documents of all types are returned. */\n type?: TaxDocumentTypeWithLiterals;\n /**\n * Filters the retrieved tax documents by whether they're visible to the merchant. When omitted, both visible and hidden tax documents are returned.\n * @internal\n */\n visible?: boolean | null;\n}\n\nexport interface CursorPaging {\n /**\n * Number of items to load.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * You can get the relevant cursor token\n * from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface ListTaxDocumentsResponse {\n /** Retrieved tax documents. */\n taxDocuments?: TaxDocument[];\n /** Paging metadata. */\n pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n /**\n * Indicates if there are more results after the current page.\n * If `true`, another page of results can be retrieved.\n * If `false`, this is the last page.\n * @internal\n */\n hasNext?: boolean | null;\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 GenerateFileDownloadInfoRequest {\n /**\n * ID of the tax document to download a file for.\n * @format GUID\n */\n taxDocumentId: string;\n}\n\nexport interface GenerateFileDownloadInfoResponse {\n /** Information for downloading the tax document's file. */\n downloadInfo?: Document;\n}\n","import * as ambassadorWixPaymentsTaxDocumentsV1TaxDocument from './payments-tax-documents-v1-tax-document-tax-documents.http.js';\nimport * as ambassadorWixPaymentsTaxDocumentsV1TaxDocumentTypes from './payments-tax-documents-v1-tax-document-tax-documents.types.js';\nimport * as ambassadorWixPaymentsTaxDocumentsV1TaxDocumentUniversalTypes from './payments-tax-documents-v1-tax-document-tax-documents.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 getTaxDocument(): __PublicMethodMetaInfo<\n 'GET',\n { taxDocumentId: string },\n ambassadorWixPaymentsTaxDocumentsV1TaxDocumentUniversalTypes.GetTaxDocumentRequest,\n ambassadorWixPaymentsTaxDocumentsV1TaxDocumentTypes.GetTaxDocumentRequest,\n ambassadorWixPaymentsTaxDocumentsV1TaxDocumentUniversalTypes.GetTaxDocumentResponse,\n ambassadorWixPaymentsTaxDocumentsV1TaxDocumentTypes.GetTaxDocumentResponse\n> {\n const payload = { taxDocumentId: ':taxDocumentId' } as any;\n\n const getRequestOptions =\n ambassadorWixPaymentsTaxDocumentsV1TaxDocument.getTaxDocument(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/tax-documents/{taxDocumentId}',\n pathParams: { taxDocumentId: 'taxDocumentId' },\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 listTaxDocuments(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixPaymentsTaxDocumentsV1TaxDocumentUniversalTypes.ListTaxDocumentsRequest,\n ambassadorWixPaymentsTaxDocumentsV1TaxDocumentTypes.ListTaxDocumentsRequest,\n ambassadorWixPaymentsTaxDocumentsV1TaxDocumentUniversalTypes.ListTaxDocumentsResponse,\n ambassadorWixPaymentsTaxDocumentsV1TaxDocumentTypes.ListTaxDocumentsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixPaymentsTaxDocumentsV1TaxDocument.listTaxDocuments(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/tax-documents',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function generateFileDownloadInfo(): __PublicMethodMetaInfo<\n 'GET',\n { taxDocumentId: string },\n ambassadorWixPaymentsTaxDocumentsV1TaxDocumentUniversalTypes.GenerateFileDownloadInfoRequest,\n ambassadorWixPaymentsTaxDocumentsV1TaxDocumentTypes.GenerateFileDownloadInfoRequest,\n ambassadorWixPaymentsTaxDocumentsV1TaxDocumentUniversalTypes.GenerateFileDownloadInfoResponse,\n ambassadorWixPaymentsTaxDocumentsV1TaxDocumentTypes.GenerateFileDownloadInfoResponse\n> {\n const payload = { taxDocumentId: ':taxDocumentId' } as any;\n\n const getRequestOptions =\n ambassadorWixPaymentsTaxDocumentsV1TaxDocument.generateFileDownloadInfo(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/tax-documents/{taxDocumentId}/generate-file-download-info',\n pathParams: { taxDocumentId: 'taxDocumentId' },\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 TaxDocument as TaxDocumentOriginal,\n TaxDocumentType as TaxDocumentTypeOriginal,\n TaxDocumentTypeWithLiterals as TaxDocumentTypeWithLiteralsOriginal,\n TaxPeriod as TaxPeriodOriginal,\n TaxPeriodOptionsOneOf as TaxPeriodOptionsOneOfOriginal,\n YearPeriod as YearPeriodOriginal,\n SourceType as SourceTypeOriginal,\n SourceTypeWithLiterals as SourceTypeWithLiteralsOriginal,\n GetTaxDocumentFileHistoryRequest as GetTaxDocumentFileHistoryRequestOriginal,\n GetTaxDocumentFileHistoryResponse as GetTaxDocumentFileHistoryResponseOriginal,\n TaxDocumentFileHistory as TaxDocumentFileHistoryOriginal,\n TaxDocumentFileHistoryRecord as TaxDocumentFileHistoryRecordOriginal,\n GenerateHistoryFileDownloadInfoRequest as GenerateHistoryFileDownloadInfoRequestOriginal,\n GenerateHistoryFileDownloadInfoResponse as GenerateHistoryFileDownloadInfoResponseOriginal,\n Document as DocumentOriginal,\n UpdateTaxDocumentRequest as UpdateTaxDocumentRequestOriginal,\n UpdateTaxDocumentResponse as UpdateTaxDocumentResponseOriginal,\n RefreshTaxDocumentFileRequest as RefreshTaxDocumentFileRequestOriginal,\n RefreshTaxDocumentFileResponse as RefreshTaxDocumentFileResponseOriginal,\n GenerateFileUploadTargetRequest as GenerateFileUploadTargetRequestOriginal,\n GenerateFileUploadTargetResponse as GenerateFileUploadTargetResponseOriginal,\n FileUploadTarget as FileUploadTargetOriginal,\n ConfirmFileUploadedRequest as ConfirmFileUploadedRequestOriginal,\n ConfirmFileUploadedResponse as ConfirmFileUploadedResponseOriginal,\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 GetTaxDocumentRequest as GetTaxDocumentRequestOriginal,\n GetTaxDocumentResponse as GetTaxDocumentResponseOriginal,\n ListTaxDocumentsRequest as ListTaxDocumentsRequestOriginal,\n CursorPaging as CursorPagingOriginal,\n ListTaxDocumentsResponse as ListTaxDocumentsResponseOriginal,\n PagingMetadataV2 as PagingMetadataV2Original,\n Cursors as CursorsOriginal,\n GenerateFileDownloadInfoRequest as GenerateFileDownloadInfoRequestOriginal,\n GenerateFileDownloadInfoResponse as GenerateFileDownloadInfoResponseOriginal,\n} from './payments-tax-documents-v1-tax-document-tax-documents.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kCAAAA;AAAA,EAAA,sBAAAC;AAAA,EAAA,wBAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,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IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,4BAOd;AACA,QAAM,UAAU,EAAE,eAAe,iBAAiB;AAElD,QAAM,oBAC2C;AAAA,IAC7C;AAAA,EACF;AAEF,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,eAAe,gBAAgB;AAAA,IAC7C,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["generateFileDownloadInfo","getTaxDocument","listTaxDocuments","import_rest_modules","payload","TaxDocumentType","SourceType","WebhookIdentityType","getTaxDocument","listTaxDocuments","generateFileDownloadInfo"]}