import { GetTaxDocumentRequest as GetTaxDocumentRequest$1, GetTaxDocumentResponse as GetTaxDocumentResponse$1, ListTaxDocumentsRequest as ListTaxDocumentsRequest$1, ListTaxDocumentsResponse as ListTaxDocumentsResponse$1, GenerateFileDownloadInfoRequest as GenerateFileDownloadInfoRequest$1, GenerateFileDownloadInfoResponse as GenerateFileDownloadInfoResponse$1 } from './index.typings.js'; import '@wix/sdk-types'; /** * A tax document is a tax-related form that Wix Payments issues to a merchant, such as a US IRS Form 1099-K. * Each tax document belongs to a Wix Payments account and covers a specific period. * When a document's file is available, you can generate a temporary URL to download it as a PDF. */ interface TaxDocument { /** * Tax document ID. * @format GUID * @readonly */ id?: string | null; /** * Date and time the tax document was created. * @readonly */ createdDate?: Date | null; /** * Date and time the tax document was last updated. * @readonly */ updatedDate?: Date | null; /** * Revision number, which increments by 1 each time the tax document is updated. * @readonly */ revision?: string; /** * ID of the Wix Payments account the tax document belongs to. * @format GUID * @immutable */ accountId?: string; /** * Type of tax document. * @immutable */ type?: TaxDocumentTypeWithLiterals; /** * Period the tax document covers. * @immutable */ period?: TaxPeriod; /** * Whether a file is available to download for the tax document. When `false`, calling Generate File Download Info returns an error. * * At least one of `downloadable` and `problematic` is always `true`. */ downloadable?: boolean; /** * Whether a problem was found with the tax document's file, for example incorrect data that's being corrected. * * At least one of `downloadable` and `problematic` is always `true`, and both can be `true` at the same time. */ problematic?: boolean; /** * How the tax document's amounts are aggregated. * @readonly */ sourceType?: SourceTypeWithLiterals; /** * Human-readable name for the tax document's file. * @readonly * @minLength 1 * @maxLength 1000 */ displayName?: string | null; } /** Type of tax document. */ declare enum TaxDocumentType { /** US IRS Form 1099-K. */ FORM_1099_K = "FORM_1099_K" } /** @enumType */ type TaxDocumentTypeWithLiterals = TaxDocumentType | 'FORM_1099_K'; interface TaxPeriod extends TaxPeriodOptionsOneOf { /** The tax document covers a full calendar year. */ yearPeriod?: YearPeriod; } /** @oneof */ interface TaxPeriodOptionsOneOf { /** The tax document covers a full calendar year. */ yearPeriod?: YearPeriod; } interface YearPeriod { /** Calendar year the tax document covers. For example, `2024`. */ year?: number; } /** Source of data for tax document. */ declare enum SourceType { /** Amounts are aggregated by payment date. */ PAYMENT = "PAYMENT", /** Amounts are aggregated by payout date. */ PAYOUT = "PAYOUT" } /** @enumType */ type SourceTypeWithLiterals = SourceType | 'PAYMENT' | 'PAYOUT'; interface GetTaxDocumentFileHistoryRequest { /** * Id of a tax document. * @format GUID */ taxDocumentId?: string; } interface GetTaxDocumentFileHistoryResponse { /** Tax document history. */ taxDocumentFileHistory?: TaxDocumentFileHistory; } interface TaxDocumentFileHistory { /** * Tax document identifier. * @format GUID */ taxDocumentId?: string; /** * File history records which correspond to file versions for this tax document. * Includes current file version, if it exists. * Sorted in descending order by `created_date`. * @maxSize 100 */ records?: TaxDocumentFileHistoryRecord[]; } interface TaxDocumentFileHistoryRecord { /** * History record identifier. * @format GUID */ id?: string; /** * Date when tax document file was uploaded. * History record is created at the same moment. * @readonly */ createdDate?: Date | null; } interface GenerateHistoryFileDownloadInfoRequest { /** * Tax document to download a file for. * @format GUID */ taxDocumentId?: string; /** * Tax document history record to download a file for. * @format GUID */ taxDocumentFileHistoryRecordId?: string; } interface GenerateHistoryFileDownloadInfoResponse { /** Information used to download a file. */ downloadInfo?: Document; } interface Document { /** Not used. Always empty for tax documents. */ id?: string; /** * Temporary URL for downloading the tax document's PDF file. Expires 10 seconds after it's generated. * @format WEB_URL */ url?: string; /** Date and time the download URL expires, 10 seconds after it's generated. */ urlExpirationDate?: Date | null; /** * File size in bytes. * @decimalValue options { gt:0, maxScale:0 } */ sizeInBytes?: string | null; /** * File name. * @maxLength 255 */ filename?: string | null; } interface UpdateTaxDocumentRequest { /** Tax document to update. */ taxDocument?: TaxDocument; } interface UpdateTaxDocumentResponse { /** Updated tax document. */ taxDocument?: TaxDocument; } interface RefreshTaxDocumentFileRequest { /** * Tax document to be updated. * @format GUID */ taxDocumentId?: string; /** Flag represents whether ping notification to user should be sent if the tax document is successfully updated. */ notifyOnSuccess?: boolean; } interface RefreshTaxDocumentFileResponse { /** Latest version of the tax document. */ taxDocument?: TaxDocument; /** Represents whether the document was updated. */ updated?: boolean; } interface GenerateFileUploadTargetRequest { /** * Tax document for file upload. * @format GUID */ taxDocumentId?: string; } interface GenerateFileUploadTargetResponse { /** Upload target. */ uploadTarget?: FileUploadTarget; } interface FileUploadTarget { /** * File upload URL. * @format WEB_URL */ uploadUrl?: string; /** * File upload token. * @minLength 1 * @maxLength 1000 */ uploadToken?: string; } interface ConfirmFileUploadedRequest { /** * Tax document for which there was a successful upload. * @format GUID */ taxDocumentId?: string; } interface ConfirmFileUploadedResponse { } interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** Event ID. With this ID you can easily spot duplicated events and ignore them. */ id?: string; /** * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. */ entityFqdn?: string; /** * Event action name, placed at the top level to make it easier for users to dispatch messages. * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * 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. * 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. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } interface EntityCreatedEvent { entityAsJson?: string; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo; } interface RestoreInfo { deletedDate?: Date | null; } interface EntityUpdatedEvent { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; } interface EntityDeletedEvent { /** Entity that was deleted. */ deletedEntityAsJson?: string | null; } interface ActionEvent { bodyAsJson?: string; } interface MessageEnvelope { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; /** Details related to the account */ accountInfo?: AccountInfo; } interface IdentificationData extends IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; /** @readonly */ identityType?: WebhookIdentityTypeWithLiterals; } /** @oneof */ interface IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; } declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** @enumType */ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP'; interface AccountInfo { /** * ID of the Wix account associated with the event. * @format GUID */ accountId?: string | null; /** * ID of the parent Wix account. Only included when accountId belongs to a child account. * @format GUID */ parentAccountId?: string | null; /** * ID of the Wix site associated with the event. Only included when the event is tied to a specific site. * @format GUID */ siteId?: string | null; } interface GetTaxDocumentRequest { /** * ID of the tax document to retrieve. * @format GUID */ taxDocumentId: string; } interface GetTaxDocumentResponse { /** Retrieved tax document. */ taxDocument?: TaxDocument; } interface ListTaxDocumentsRequest { /** * ID of the Wix Payments account whose tax documents are retrieved. * @format GUID */ accountId: string | null; /** Cursor paging options. */ paging?: CursorPaging; /** Filters the retrieved tax documents by type. When omitted, tax documents of all types are returned. */ type?: TaxDocumentTypeWithLiterals; } interface CursorPaging { /** * Number of items to load. * @max 100 */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * You can get the relevant cursor token * from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. * @maxLength 16000 */ cursor?: string | null; } interface ListTaxDocumentsResponse { /** Retrieved tax documents. */ taxDocuments?: TaxDocument[]; /** Paging metadata. */ pagingMetadata?: PagingMetadataV2; } interface PagingMetadataV2 { /** Number of items returned in the response. */ count?: number | null; /** Offset that was requested. */ offset?: number | null; /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */ total?: number | null; /** Flag that indicates the server failed to calculate the `total` field. */ tooManyToCount?: boolean | null; /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */ cursors?: Cursors; } interface Cursors { /** * Cursor pointing to next page in the list of results. * @maxLength 16000 */ next?: string | null; /** * Cursor pointing to previous page in the list of results. * @maxLength 16000 */ prev?: string | null; } interface GenerateFileDownloadInfoRequest { /** * ID of the tax document to download a file for. * @format GUID */ taxDocumentId: string; } interface GenerateFileDownloadInfoResponse { /** Information for downloading the tax document's file. */ downloadInfo?: Document; } type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function getTaxDocument(): __PublicMethodMetaInfo<'GET', { taxDocumentId: string; }, GetTaxDocumentRequest$1, GetTaxDocumentRequest, GetTaxDocumentResponse$1, GetTaxDocumentResponse>; declare function listTaxDocuments(): __PublicMethodMetaInfo<'GET', {}, ListTaxDocumentsRequest$1, ListTaxDocumentsRequest, ListTaxDocumentsResponse$1, ListTaxDocumentsResponse>; declare function generateFileDownloadInfo(): __PublicMethodMetaInfo<'GET', { taxDocumentId: string; }, GenerateFileDownloadInfoRequest$1, GenerateFileDownloadInfoRequest, GenerateFileDownloadInfoResponse$1, GenerateFileDownloadInfoResponse>; export { type AccountInfo as AccountInfoOriginal, type ActionEvent as ActionEventOriginal, type ConfirmFileUploadedRequest as ConfirmFileUploadedRequestOriginal, type ConfirmFileUploadedResponse as ConfirmFileUploadedResponseOriginal, type CursorPaging as CursorPagingOriginal, type Cursors as CursorsOriginal, type Document as DocumentOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type FileUploadTarget as FileUploadTargetOriginal, type GenerateFileDownloadInfoRequest as GenerateFileDownloadInfoRequestOriginal, type GenerateFileDownloadInfoResponse as GenerateFileDownloadInfoResponseOriginal, type GenerateFileUploadTargetRequest as GenerateFileUploadTargetRequestOriginal, type GenerateFileUploadTargetResponse as GenerateFileUploadTargetResponseOriginal, type GenerateHistoryFileDownloadInfoRequest as GenerateHistoryFileDownloadInfoRequestOriginal, type GenerateHistoryFileDownloadInfoResponse as GenerateHistoryFileDownloadInfoResponseOriginal, type GetTaxDocumentFileHistoryRequest as GetTaxDocumentFileHistoryRequestOriginal, type GetTaxDocumentFileHistoryResponse as GetTaxDocumentFileHistoryResponseOriginal, type GetTaxDocumentRequest as GetTaxDocumentRequestOriginal, type GetTaxDocumentResponse as GetTaxDocumentResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type ListTaxDocumentsRequest as ListTaxDocumentsRequestOriginal, type ListTaxDocumentsResponse as ListTaxDocumentsResponseOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type PagingMetadataV2 as PagingMetadataV2Original, type RefreshTaxDocumentFileRequest as RefreshTaxDocumentFileRequestOriginal, type RefreshTaxDocumentFileResponse as RefreshTaxDocumentFileResponseOriginal, type RestoreInfo as RestoreInfoOriginal, SourceType as SourceTypeOriginal, type SourceTypeWithLiterals as SourceTypeWithLiteralsOriginal, type TaxDocumentFileHistory as TaxDocumentFileHistoryOriginal, type TaxDocumentFileHistoryRecord as TaxDocumentFileHistoryRecordOriginal, type TaxDocument as TaxDocumentOriginal, TaxDocumentType as TaxDocumentTypeOriginal, type TaxDocumentTypeWithLiterals as TaxDocumentTypeWithLiteralsOriginal, type TaxPeriodOptionsOneOf as TaxPeriodOptionsOneOfOriginal, type TaxPeriod as TaxPeriodOriginal, type UpdateTaxDocumentRequest as UpdateTaxDocumentRequestOriginal, type UpdateTaxDocumentResponse as UpdateTaxDocumentResponseOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type YearPeriod as YearPeriodOriginal, type __PublicMethodMetaInfo, generateFileDownloadInfo, getTaxDocument, listTaxDocuments };