@wix/auto_sdk_benefit-programs_transactions 1.0.25 → 1.0.26

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.
@@ -1,6 +1,6 @@
1
- import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
- import { T as Transaction, a as TransactionsQueryBuilder } from './benefit-programs-v1-transaction-transactions.universal-CC4UPjY4.js';
3
- export { J as ActionEvent, A as ApplicationError, B as BalanceType, l as BulkActionMetadata, h as BulkCreateTransactionsRequest, i as BulkCreateTransactionsResponse, j as BulkTransactionResult, n as BulkUpdateTransactionsRequest, o as BulkUpdateTransactionsResponse, C as CommonIdentificationData, c as CommonIdentificationDataIdOneOf, f as CreateTransactionRequest, g as CreateTransactionResponse, t as CursorPaging, v as CursorPagingMetadata, q as CursorQuery, r as CursorQueryPagingMethodOneOf, w as Cursors, D as DomainEvent, x as DomainEventBodyOneOf, y as EntityCreatedEvent, H as EntityDeletedEvent, F as EntityUpdatedEvent, E as ExtendedFields, G as GetTransactionRequest, p as GetTransactionResponse, L as IdentificationData, N as IdentificationDataIdOneOf, I as IdentityType, e as Item, k as ItemMetadata, M as MaskedTransaction, K as MessageEnvelope, P as PoolInfo, Q as QueryTransactionsRequest, u as QueryTransactionsResponse, R as RequestedValues, z as RestoreInfo, S as SortOrder, s as Sorting, d as TransactionDetails, b as TransactionStatus, O as TransactionsQueryResult, U as UpdateTransactionRequest, m as UpdateTransactionResponse, W as WebhookIdentityType } from './benefit-programs-v1-transaction-transactions.universal-CC4UPjY4.js';
1
+ import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
+ import { Transaction, TransactionsQueryBuilder } from './index.typings.js';
3
+ export { ActionEvent, ApplicationError, BalanceType, BalanceTypeWithLiterals, BulkActionMetadata, BulkCreateTransactionsRequest, BulkCreateTransactionsResponse, BulkTransactionResult, BulkUpdateTransactionsRequest, BulkUpdateTransactionsResponse, CommonIdentificationData, CommonIdentificationDataIdOneOf, CreateTransactionRequest, CreateTransactionResponse, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, ExtendedFields, FailedTransactionDetails, GetTransactionRequest, GetTransactionResponse, IdentificationData, IdentificationDataIdOneOf, IdentityType, IdentityTypeWithLiterals, Item, ItemMetadata, MaskedTransaction, MessageEnvelope, PoolInfo, QueryTransactionsRequest, QueryTransactionsResponse, RequestedValues, RestoreInfo, SortOrder, SortOrderWithLiterals, Sorting, TransactionDetails, TransactionStatus, TransactionStatusDetailsOneOf, TransactionStatusWithLiterals, TransactionsQueryResult, UpdateTransactionRequest, UpdateTransactionResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
4
4
 
5
5
  declare function getTransaction$1(httpClient: HttpClient): GetTransactionSignature;
6
6
  interface GetTransactionSignature {
@@ -9,7 +9,7 @@ interface GetTransactionSignature {
9
9
  * @param - ID of the transaction to retrieve.
10
10
  * @returns Retrieved transaction.
11
11
  */
12
- (transactionId: string): Promise<Transaction>;
12
+ (transactionId: string): Promise<NonNullablePaths<Transaction, `pool._id` | `amount` | `source` | `target` | `idempotencyKey` | `beneficiary.anonymousVisitorId` | `beneficiary.memberId` | `beneficiary.wixUserId` | `status`, 3>>;
13
13
  }
14
14
  declare function queryTransactions$1(httpClient: HttpClient): QueryTransactionsSignature;
15
15
  interface QueryTransactionsSignature {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts","../../src/benefit-programs-v1-transaction-transactions.universal.ts","../../src/benefit-programs-v1-transaction-transactions.http.ts","../../src/benefit-programs-v1-transaction-transactions.public.ts","../../src/benefit-programs-v1-transaction-transactions.context.ts"],"sourcesContent":["export * from './src/benefit-programs-v1-transaction-transactions.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, HttpResponse, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixBenefitProgramsV1Transaction from './benefit-programs-v1-transaction-transactions.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\nexport interface Transaction {\n /**\n * Transaction ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the transaction is updated.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the transaction was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the transaction was updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Pool associated with this transaction.\n * @readonly\n */\n pool?: PoolInfo;\n /**\n * Amount the balance was adjusted in this transaction.\n * @decimalValue options { gte:0, maxScale:4 }\n */\n amount?: string;\n /** Where the credits came from. */\n source?: BalanceTypeWithLiterals;\n /** Where the credits went to. */\n target?: BalanceTypeWithLiterals;\n /**\n * Unique identifier, generated by the client.\n * Used to recognize repeated attempts to make the same request.\n * @maxLength 200\n * @readonly\n */\n idempotencyKey?: string;\n /**\n * ID of the related transaction. For example, if this transaction is a refund for a benefit redemption, the related transaction is the benefit redemption transaction.\n * @format GUID\n * @readonly\n */\n relatedTransactionId?: string | null;\n /**\n * Beneficiary of the pool associated with this transaction.\n * @readonly\n * @immutable\n */\n beneficiary?: CommonIdentificationData;\n /**\n * Identity that created the transaction.\n * @readonly\n * @immutable\n */\n instructingParty?: CommonIdentificationData;\n /** Transaction status. */\n status?: TransactionStatusWithLiterals;\n /**\n * Additional transaction details.\n * @readonly\n */\n details?: TransactionDetails;\n /**\n * Custom field data for the transaction object.\n *\n * [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n}\n\nexport interface PoolInfo {\n /**\n * Pool ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * ID of the pool definition the pool was created from.\n * @format GUID\n * @readonly\n */\n poolDefinitionId?: string | null;\n /**\n * ID of the program definition containing the pool definition the pool was created from.\n * @format GUID\n * @readonly\n */\n programDefinitionId?: string | null;\n /**\n * ID of the program that contains the pool.\n * @format GUID\n * @readonly\n */\n programId?: string | null;\n /**\n * Available credits.\n * @decimalValue options { gte:0, maxScale:4 }\n * @readonly\n */\n creditAmount?: string | null;\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n * @readonly\n */\n namespace?: string | null;\n}\n\nexport enum BalanceType {\n UNDEFINED = 'UNDEFINED',\n /** In a pool's balance. */\n AVAILABLE = 'AVAILABLE',\n /** Outside a pool's balance. */\n EXTERNAL = 'EXTERNAL',\n}\n\n/** @enumType */\nexport type BalanceTypeWithLiterals =\n | BalanceType\n | 'UNDEFINED'\n | 'AVAILABLE'\n | 'EXTERNAL';\n\nexport interface CommonIdentificationData\n extends CommonIdentificationDataIdOneOf {\n /**\n * ID of a site visitor that hasn't logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site member.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user.\n * @format GUID\n */\n wixUserId?: string;\n}\n\n/** @oneof */\nexport interface CommonIdentificationDataIdOneOf {\n /**\n * ID of a site visitor that hasn't logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site member.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user.\n * @format GUID\n */\n wixUserId?: string;\n}\n\nexport enum IdentityType {\n /** Unknown type. This value is not used. */\n UNKNOWN = 'UNKNOWN',\n /** A site visitor who has not logged in. */\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n /** A logged-in site member. */\n MEMBER = 'MEMBER',\n /** A Wix account holder, such as a site owner or contributor. */\n WIX_USER = 'WIX_USER',\n}\n\n/** @enumType */\nexport type IdentityTypeWithLiterals =\n | IdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER';\n\nexport enum TransactionStatus {\n UNDEFINED = 'UNDEFINED',\n /** Transaction is pending. This is the initial transaction status. */\n PENDING = 'PENDING',\n /** Transaction completed successfully. */\n COMPLETED = 'COMPLETED',\n /** Transaction failed. */\n FAILED = 'FAILED',\n}\n\n/** @enumType */\nexport type TransactionStatusWithLiterals =\n | TransactionStatus\n | 'UNDEFINED'\n | 'PENDING'\n | 'COMPLETED'\n | 'FAILED';\n\nexport interface TransactionDetails {\n /**\n * Item associated with the transaction.\n * @readonly\n */\n item?: Item;\n /** Amount of items associated with the transaction. */\n itemCount?: number | null;\n /**\n * Date and time the transaction was created.\n * @readonly\n */\n effectiveDate?: Date | null;\n /**\n * Reason for the transaction. For example, `Redemption`.\n * @readonly\n * @maxLength 256\n */\n reason?: string | null;\n}\n\nexport interface Item {\n /**\n * Item ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Item external ID.\n * @format GUID\n * @readonly\n */\n externalId?: string | null;\n /**\n * Item category.\n * @maxLength 20\n * @readonly\n */\n category?: string | null;\n /**\n * Item set ID.\n * @format GUID\n * @readonly\n */\n itemSetId?: string | null;\n /**\n * Item name.\n * @maxLength 64\n * @readonly\n */\n displayName?: string | null;\n}\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface RequestedValues {\n /**\n * Amount the balance was adjusted in this transaction.\n * @decimalValue options { gte:0, maxScale:4 }\n */\n amount?: string;\n /** Where the credits came from. */\n source?: BalanceTypeWithLiterals;\n /** Where the credits went to. */\n target?: BalanceTypeWithLiterals;\n}\n\nexport interface CreateTransactionRequest {\n /** Transaction to create. */\n transaction?: Transaction;\n}\n\nexport interface CreateTransactionResponse {\n /** Created transaction. */\n transaction?: Transaction;\n}\n\nexport interface BulkCreateTransactionsRequest {\n /**\n * Transactions to be created.\n * @minSize 1\n * @maxSize 100\n */\n transactions?: Transaction[];\n /**\n * Whether to return the full item entities.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\nexport interface BulkCreateTransactionsResponse {\n /**\n * List of results for each transaction.\n *\n * Includes the transaction and whether the operation was successful.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkTransactionResult[];\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkTransactionResult {\n /** Metadata for the item. */\n itemMetadata?: ItemMetadata;\n /** Created transaction. */\n transaction?: Transaction;\n}\n\nexport interface ItemMetadata {\n /**\n * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).\n * @format GUID\n */\n _id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface UpdateTransactionRequest {\n /** Transaction to update. */\n transaction?: Transaction;\n}\n\nexport interface UpdateTransactionResponse {\n /** Updated transaction. */\n transaction?: Transaction;\n}\n\nexport interface BulkUpdateTransactionsRequest {\n /**\n * Transactions to update.\n * @minSize 1\n * @maxSize 100\n */\n transactions?: MaskedTransaction[];\n /**\n * Whether to return full transaction entities.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\nexport interface MaskedTransaction {\n /** Transaction to be updated. */\n transaction?: Transaction;\n /** Explicit list of fields to update. */\n fieldMask?: string[];\n}\n\nexport interface BulkUpdateTransactionsResponse {\n /**\n * List of results for each Transaction.\n *\n * Includes the Transaction and whether the update was successful.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkTransactionResult[];\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface GetTransactionRequest {\n /**\n * ID of the transaction to retrieve.\n * @format GUID\n */\n transactionId: string;\n}\n\nexport interface GetTransactionResponse {\n /** Retrieved transaction. */\n transaction?: Transaction;\n}\n\nexport interface QueryTransactionsRequest {\n /** Filter, sort, and paging to apply to the query. */\n query: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n * See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language)\n * for more information.\n */\n filter?: Record<string, any> | null;\n /**\n * List of sort objects.\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /**\n * Sort order. Use `ASC` for ascending order or `DESC` for descending order.\n *\n * Default: `ASC`\n */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n /** Ascending sort order. */\n ASC = 'ASC',\n /** Descending sort order. */\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface QueryTransactionsResponse {\n /** List of retrieved transactions. */\n transactions?: Transaction[];\n /** Metadata for paginated results. */\n metadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface 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}\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\ntype TransactionNonNullablePaths =\n | `pool._id`\n | `amount`\n | `source`\n | `target`\n | `idempotencyKey`\n | `beneficiary.anonymousVisitorId`\n | `beneficiary.memberId`\n | `beneficiary.wixUserId`\n | `instructingParty.anonymousVisitorId`\n | `instructingParty.memberId`\n | `instructingParty.wixUserId`\n | `status`;\n\n/**\n * Retrieves a transaction.\n * @param transactionId - ID of the transaction to retrieve.\n * @public\n * @documentationMaturity preview\n * @requiredField transactionId\n * @permissionId BENEFIT_PROGRAMS.TRANSACTION_READ\n * @applicableIdentity APP\n * @returns Retrieved transaction.\n * @fqn wix.benefit_programs.v1.transaction.TransactionService.GetTransaction\n */\nexport async function getTransaction(\n transactionId: string\n): Promise<NonNullablePaths<Transaction, TransactionNonNullablePaths>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n transactionId: transactionId,\n });\n\n const reqOpts =\n ambassadorWixBenefitProgramsV1Transaction.getTransaction(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.transaction!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { transactionId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['transactionId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates a query to retrieve a list of transactions.\n *\n * The Query Transactions method builds a query to retrieve a list of transactions and returns a `TransactionsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the `find()` method.\n *\n * You can refine the query by chaining `TransactionsQueryBuilder` methods onto the query. `TransactionsQueryBuilder` methods enable you to filter, sort, and control the results that Query Transactions returns.\n *\n * Query Transactions has a default paging limit of 50, which you can override.\n *\n * For a full description of the item object, see the object returned for the `items` property in `TransactionsQueryResult`.\n * @public\n * @documentationMaturity preview\n * @permissionId BENEFIT_PROGRAMS.TRANSACTION_READ\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.transaction.TransactionService.QueryTransactions\n */\nexport function queryTransactions(): TransactionsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n Transaction,\n 'CURSOR',\n QueryTransactionsRequest,\n QueryTransactionsResponse\n >({\n func: async (payload: QueryTransactionsRequest) => {\n const reqOpts =\n ambassadorWixBenefitProgramsV1Transaction.queryTransactions(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryTransactionsRequest['query']) => {\n const args = [query, {}] as [QueryTransactionsRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({\n data,\n }: HttpResponse<QueryTransactionsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.transactions,\n pagingMetadata: transformedData?.metadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface TransactionsQueryResult extends QueryCursorResult {\n items: Transaction[];\n query: TransactionsQueryBuilder;\n next: () => Promise<TransactionsQueryResult>;\n prev: () => Promise<TransactionsQueryResult>;\n}\n\nexport interface TransactionsQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n eq: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'pool.id'\n | 'relatedTransactionId'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.item.id',\n value: any\n ) => TransactionsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ne: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'pool.id'\n | 'relatedTransactionId'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.item.id',\n value: any\n ) => TransactionsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ge: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'pool.id'\n | 'relatedTransactionId'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.item.id',\n value: any\n ) => TransactionsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n gt: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'pool.id'\n | 'relatedTransactionId'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.item.id',\n value: any\n ) => TransactionsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n le: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'pool.id'\n | 'relatedTransactionId'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.item.id',\n value: any\n ) => TransactionsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n lt: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'pool.id'\n | 'relatedTransactionId'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.item.id',\n value: any\n ) => TransactionsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n * @documentationMaturity preview\n */\n startsWith: (\n propertyName:\n | '_id'\n | 'pool.id'\n | 'relatedTransactionId'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.item.id',\n value: string\n ) => TransactionsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n * @documentationMaturity preview\n */\n hasSome: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'pool.id'\n | 'relatedTransactionId'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.item.id',\n value: any[]\n ) => TransactionsQueryBuilder;\n /** @documentationMaturity preview */\n in: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'pool.id'\n | 'relatedTransactionId'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.item.id',\n value: any\n ) => TransactionsQueryBuilder;\n /** @documentationMaturity preview */\n exists: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'pool.id'\n | 'relatedTransactionId'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.item.id',\n value: boolean\n ) => TransactionsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n ascending: (\n ...propertyNames: Array<\n | '_id'\n | '_createdDate'\n | 'pool.id'\n | 'relatedTransactionId'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.item.id'\n >\n ) => TransactionsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n descending: (\n ...propertyNames: Array<\n | '_id'\n | '_createdDate'\n | 'pool.id'\n | 'relatedTransactionId'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.item.id'\n >\n ) => TransactionsQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object.\n * @documentationMaturity preview\n */\n limit: (limit: number) => TransactionsQueryBuilder;\n /** @param cursor - A pointer to specific record\n * @documentationMaturity preview\n */\n skipTo: (cursor: string) => TransactionsQueryBuilder;\n /** @documentationMaturity preview */\n find: () => Promise<TransactionsQueryResult>;\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 resolveWixBenefitProgramsV1TransactionTransactionServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/pool-transactions',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/benefit-programs/v1/transactions',\n destPath: '/v1/transactions',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/transactions',\n destPath: '/v1/bulk/transactions',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/benefit-programs/v1/transactions',\n destPath: '/v1/transactions',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/transactions',\n destPath: '/v1/bulk/transactions',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/benefit-programs/v1/transactions',\n destPath: '/v1/transactions',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/transactions',\n destPath: '/v1/bulk/transactions',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/benefit-programs/v1/transactions',\n destPath: '/v1/transactions',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/transactions',\n destPath: '/v1/bulk/transactions',\n },\n ],\n _: [\n {\n srcPath: '/_api/benefit-programs/v1/transactions',\n destPath: '/v1/transactions',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/transactions',\n destPath: '/v1/bulk/transactions',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/benefit-programs/v1/transactions',\n destPath: '/v1/transactions',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/transactions',\n destPath: '/v1/bulk/transactions',\n },\n ],\n '*.pub.wix-code.com': [\n {\n srcPath: '/_api/benefit-programs/v1/transactions',\n destPath: '/v1/transactions',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/transactions',\n destPath: '/v1/bulk/transactions',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/benefit-programs/v1/transactions',\n destPath: '/v1/transactions',\n },\n {\n srcPath: '/benefit-programs/v1/bulk/transactions',\n destPath: '/v1/bulk/transactions',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_benefit-programs_transactions';\n\n/** Retrieves a transaction. */\nexport function getTransaction(payload: object): RequestOptionsFactory<any> {\n function __getTransaction({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.transaction',\n method: 'GET' as any,\n methodFqn:\n 'wix.benefit_programs.v1.transaction.TransactionService.GetTransaction',\n packageName: PACKAGE_NAME,\n url: resolveWixBenefitProgramsV1TransactionTransactionServiceUrl({\n protoPath: '/v1/transactions/{transactionId}',\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: 'transaction.createdDate' },\n { path: 'transaction.updatedDate' },\n { path: 'transaction.details.effectiveDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getTransaction;\n}\n\n/**\n * Creates a query to retrieve a list of transactions.\n *\n * The Query Transactions method builds a query to retrieve a list of transactions and returns a `TransactionsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the `find()` method.\n *\n * You can refine the query by chaining `TransactionsQueryBuilder` methods onto the query. `TransactionsQueryBuilder` methods enable you to filter, sort, and control the results that Query Transactions returns.\n *\n * Query Transactions has a default paging limit of 50, which you can override.\n *\n * For a full description of the item object, see the object returned for the `items` property in `TransactionsQueryResult`.\n */\nexport function queryTransactions(payload: object): RequestOptionsFactory<any> {\n function __queryTransactions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.transaction',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.transaction.TransactionService.QueryTransactions',\n packageName: PACKAGE_NAME,\n url: resolveWixBenefitProgramsV1TransactionTransactionServiceUrl({\n protoPath: '/v1/transactions/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'transactions.createdDate' },\n { path: 'transactions.updatedDate' },\n { path: 'transactions.details.effectiveDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryTransactions;\n}\n","import { HttpClient } from '@wix/sdk-types';\nimport {\n Transaction,\n TransactionsQueryBuilder,\n getTransaction as universalGetTransaction,\n queryTransactions as universalQueryTransactions,\n} from './benefit-programs-v1-transaction-transactions.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/benefit-programs' };\n\nexport function getTransaction(\n httpClient: HttpClient\n): GetTransactionSignature {\n return (transactionId: string) =>\n universalGetTransaction(\n transactionId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetTransactionSignature {\n /**\n * Retrieves a transaction.\n * @param - ID of the transaction to retrieve.\n * @returns Retrieved transaction.\n */\n (transactionId: string): Promise<Transaction>;\n}\n\nexport function queryTransactions(\n httpClient: HttpClient\n): QueryTransactionsSignature {\n return () =>\n universalQueryTransactions(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryTransactionsSignature {\n /**\n * Creates a query to retrieve a list of transactions.\n *\n * The Query Transactions method builds a query to retrieve a list of transactions and returns a `TransactionsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the `find()` method.\n *\n * You can refine the query by chaining `TransactionsQueryBuilder` methods onto the query. `TransactionsQueryBuilder` methods enable you to filter, sort, and control the results that Query Transactions returns.\n *\n * Query Transactions has a default paging limit of 50, which you can override.\n *\n * For a full description of the item object, see the object returned for the `items` property in `TransactionsQueryResult`.\n */\n (): TransactionsQueryBuilder;\n}\n\nexport {\n ActionEvent,\n ApplicationError,\n BalanceType,\n BulkActionMetadata,\n BulkCreateTransactionsRequest,\n BulkCreateTransactionsResponse,\n BulkTransactionResult,\n BulkUpdateTransactionsRequest,\n BulkUpdateTransactionsResponse,\n CommonIdentificationData,\n CommonIdentificationDataIdOneOf,\n CreateTransactionRequest,\n CreateTransactionResponse,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n ExtendedFields,\n GetTransactionRequest,\n GetTransactionResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n IdentityType,\n Item,\n ItemMetadata,\n MaskedTransaction,\n MessageEnvelope,\n PoolInfo,\n QueryTransactionsRequest,\n QueryTransactionsResponse,\n RequestedValues,\n RestoreInfo,\n SortOrder,\n Sorting,\n Transaction,\n TransactionDetails,\n TransactionStatus,\n TransactionsQueryBuilder,\n TransactionsQueryResult,\n UpdateTransactionRequest,\n UpdateTransactionResponse,\n WebhookIdentityType,\n} from './benefit-programs-v1-transaction-transactions.universal.js';\n","import {\n getTransaction as publicGetTransaction,\n queryTransactions as publicQueryTransactions,\n} from './benefit-programs-v1-transaction-transactions.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getTransaction: MaybeContext<\n BuildRESTFunction<typeof publicGetTransaction> & typeof publicGetTransaction\n> = /*#__PURE__*/ createRESTModule(publicGetTransaction);\nexport const queryTransactions: MaybeContext<\n BuildRESTFunction<typeof publicQueryTransactions> &\n typeof publicQueryTransactions\n> = /*#__PURE__*/ createRESTModule(publicQueryTransactions);\n\nexport {\n BalanceType,\n IdentityType,\n TransactionStatus,\n SortOrder,\n WebhookIdentityType,\n} from './benefit-programs-v1-transaction-transactions.universal.js';\nexport {\n Transaction,\n PoolInfo,\n CommonIdentificationData,\n CommonIdentificationDataIdOneOf,\n TransactionDetails,\n Item,\n ExtendedFields,\n RequestedValues,\n CreateTransactionRequest,\n CreateTransactionResponse,\n BulkCreateTransactionsRequest,\n BulkCreateTransactionsResponse,\n BulkTransactionResult,\n ItemMetadata,\n ApplicationError,\n BulkActionMetadata,\n UpdateTransactionRequest,\n UpdateTransactionResponse,\n BulkUpdateTransactionsRequest,\n MaskedTransaction,\n BulkUpdateTransactionsResponse,\n GetTransactionRequest,\n GetTransactionResponse,\n QueryTransactionsRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n CursorPaging,\n QueryTransactionsResponse,\n CursorPagingMetadata,\n Cursors,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n TransactionsQueryResult,\n TransactionsQueryBuilder,\n} from './benefit-programs-v1-transaction-transactions.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAAA;AAAA,EAAA,yBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,0BAAkC;AAClC,uBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,4DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,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,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,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,I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AAgB,iBAAiB;AAAA,MACnC;AAAA,IACF;AAAA,IACA,kBAAkB,CAAC,QAAiB;AAClC,YAAM,uBAAmB,uBAAAD,gBAAkB,KAAK;AAAA,QAC9C,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,OAAO,OAAO;AAAA,QAC1C,yBAAyB;AAAA,MAC3B,CAAC;AAED,YAAM;AAAA,IACR;AAAA,IACA,cAAc;AAAA,IACd,qBAAqB,CAAC;AAAA,EACxB,CAAC;AACH;;;AE5yBO,SAASE,gBACd,YACyB;AACzB,SAAO,CAAC,kBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAWO,SAASC,mBACd,YAC4B;AAC5B,SAAO,MACLA;AAAA;AAAA,IAEE,EAAE,WAAW;AAAA,EACf;AACJ;;;AClCA,IAAAC,uBAAiC;AAG1B,IAAMC,kBAEK,2DAAiBA,eAAoB;AAChD,IAAMC,qBAGK,2DAAiBA,kBAAuB;","names":["getTransaction","queryTransactions","import_rest_modules","payload","import_transform_paths","BalanceType","IdentityType","TransactionStatus","SortOrder","WebhookIdentityType","getTransaction","sdkTransformError","queryTransactions","getTransaction","queryTransactions","import_rest_modules","getTransaction","queryTransactions"]}
1
+ {"version":3,"sources":["../../index.ts","../../src/benefit-programs-v1-transaction-transactions.universal.ts","../../src/benefit-programs-v1-transaction-transactions.http.ts","../../src/benefit-programs-v1-transaction-transactions.public.ts","../../src/benefit-programs-v1-transaction-transactions.context.ts"],"sourcesContent":["export * from './src/benefit-programs-v1-transaction-transactions.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, HttpResponse, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixBenefitProgramsV1Transaction from './benefit-programs-v1-transaction-transactions.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\nexport interface Transaction extends TransactionStatusDetailsOneOf {\n /**\n * Transaction ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the transaction is updated.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the transaction was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the transaction was updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Pool associated with this transaction.\n * @readonly\n */\n pool?: PoolInfo;\n /**\n * Amount the balance was adjusted in this transaction.\n * @decimalValue options { gte:0, maxScale:4 }\n */\n amount?: string;\n /** Where the credits came from. */\n source?: BalanceTypeWithLiterals;\n /** Where the credits went to. */\n target?: BalanceTypeWithLiterals;\n /**\n * Unique identifier, generated by the client.\n * Used to recognize repeated attempts to make the same request.\n * @maxLength 200\n * @readonly\n */\n idempotencyKey?: string;\n /**\n * ID of the related transaction. For example, if this transaction is a refund for a benefit redemption, the related transaction is the benefit redemption transaction.\n * @format GUID\n * @readonly\n */\n relatedTransactionId?: string | null;\n /**\n * Beneficiary of the pool associated with this transaction.\n * @readonly\n * @immutable\n */\n beneficiary?: CommonIdentificationData;\n /**\n * Identity that created the transaction.\n * @readonly\n * @immutable\n */\n instructingParty?: CommonIdentificationData;\n /** Transaction status. */\n status?: TransactionStatusWithLiterals;\n /**\n * Additional transaction details.\n * @readonly\n */\n details?: TransactionDetails;\n /**\n * Custom field data for the transaction object.\n *\n * [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n}\n\n/** @oneof */\nexport interface TransactionStatusDetailsOneOf {}\n\nexport interface PoolInfo {\n /**\n * Pool ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * ID of the pool definition the pool was created from.\n * @format GUID\n * @readonly\n */\n poolDefinitionId?: string | null;\n /**\n * ID of the program definition containing the pool definition the pool was created from.\n * @format GUID\n * @readonly\n */\n programDefinitionId?: string | null;\n /**\n * ID of the program that contains the pool.\n * @format GUID\n * @readonly\n */\n programId?: string | null;\n /**\n * Available credits.\n * @decimalValue options { gte:0, maxScale:4 }\n * @readonly\n */\n creditAmount?: string | null;\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n * @readonly\n */\n namespace?: string | null;\n}\n\nexport enum BalanceType {\n UNDEFINED = 'UNDEFINED',\n /** In a pool's balance. */\n AVAILABLE = 'AVAILABLE',\n /** Outside a pool's balance. */\n EXTERNAL = 'EXTERNAL',\n}\n\n/** @enumType */\nexport type BalanceTypeWithLiterals =\n | BalanceType\n | 'UNDEFINED'\n | 'AVAILABLE'\n | 'EXTERNAL';\n\nexport interface CommonIdentificationData\n extends CommonIdentificationDataIdOneOf {\n /**\n * ID of a site visitor that hasn't logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site member.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user.\n * @format GUID\n */\n wixUserId?: string;\n}\n\n/** @oneof */\nexport interface CommonIdentificationDataIdOneOf {\n /**\n * ID of a site visitor that hasn't logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site member.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user.\n * @format GUID\n */\n wixUserId?: string;\n}\n\nexport enum IdentityType {\n /** Unknown type. This value is not used. */\n UNKNOWN = 'UNKNOWN',\n /** A site visitor who has not logged in. */\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n /** A logged-in site member. */\n MEMBER = 'MEMBER',\n /** A Wix account holder, such as a site owner or contributor. */\n WIX_USER = 'WIX_USER',\n}\n\n/** @enumType */\nexport type IdentityTypeWithLiterals =\n | IdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER';\n\nexport enum TransactionStatus {\n UNDEFINED = 'UNDEFINED',\n /** Transaction is pending. This is the initial transaction status. */\n PENDING = 'PENDING',\n /** Transaction completed successfully. */\n COMPLETED = 'COMPLETED',\n /** Transaction failed. */\n FAILED = 'FAILED',\n}\n\n/** @enumType */\nexport type TransactionStatusWithLiterals =\n | TransactionStatus\n | 'UNDEFINED'\n | 'PENDING'\n | 'COMPLETED'\n | 'FAILED';\n\nexport interface TransactionDetails {\n /**\n * Item associated with the transaction.\n * @readonly\n */\n item?: Item;\n /** Amount of items associated with the transaction. */\n itemCount?: number | null;\n /**\n * Date and time the transaction was created.\n * @readonly\n */\n effectiveDate?: Date | null;\n /**\n * Reason for the transaction. For example, `Redemption`.\n * @readonly\n * @maxLength 256\n */\n reason?: string | null;\n}\n\nexport interface Item {\n /**\n * Item ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Item external ID.\n * @format GUID\n * @readonly\n */\n externalId?: string | null;\n /**\n * Item category.\n * @maxLength 20\n * @readonly\n */\n category?: string | null;\n /**\n * Item set ID.\n * @format GUID\n * @readonly\n */\n itemSetId?: string | null;\n /**\n * Item name.\n * @maxLength 64\n * @readonly\n */\n displayName?: string | null;\n}\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface RequestedValues {\n /**\n * Amount the balance was adjusted in this transaction.\n * @decimalValue options { gte:0, maxScale:4 }\n */\n amount?: string;\n /** Where the credits came from. */\n source?: BalanceTypeWithLiterals;\n /** Where the credits went to. */\n target?: BalanceTypeWithLiterals;\n}\n\nexport interface FailedTransactionDetails {\n /**\n * Response status\n * @maxLength 32\n */\n responseStatus?: string | null;\n /**\n * Error code.\n * @maxLength 32\n */\n errorCode?: string | null;\n /**\n * Error message\n * @maxLength 256\n */\n errorMessage?: string | null;\n}\n\nexport interface CreateTransactionRequest {\n /** Transaction to create. */\n transaction?: Transaction;\n}\n\nexport interface CreateTransactionResponse {\n /** Created transaction. */\n transaction?: Transaction;\n}\n\nexport interface BulkCreateTransactionsRequest {\n /**\n * Transactions to be created.\n * @minSize 1\n * @maxSize 100\n */\n transactions?: Transaction[];\n /**\n * Whether to return the full item entities.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\nexport interface BulkCreateTransactionsResponse {\n /**\n * List of results for each transaction.\n *\n * Includes the transaction and whether the operation was successful.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkTransactionResult[];\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkTransactionResult {\n /** Metadata for the item. */\n itemMetadata?: ItemMetadata;\n /** Created transaction. */\n transaction?: Transaction;\n}\n\nexport interface ItemMetadata {\n /**\n * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).\n * @format GUID\n */\n _id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface UpdateTransactionRequest {\n /** Transaction to update. */\n transaction?: Transaction;\n}\n\nexport interface UpdateTransactionResponse {\n /** Updated transaction. */\n transaction?: Transaction;\n}\n\nexport interface BulkUpdateTransactionsRequest {\n /**\n * Transactions to update.\n * @minSize 1\n * @maxSize 100\n */\n transactions?: MaskedTransaction[];\n /**\n * Whether to return full transaction entities.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\nexport interface MaskedTransaction {\n /** Transaction to be updated. */\n transaction?: Transaction;\n /** Explicit list of fields to update. */\n fieldMask?: string[];\n}\n\nexport interface BulkUpdateTransactionsResponse {\n /**\n * List of results for each Transaction.\n *\n * Includes the Transaction and whether the update was successful.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkTransactionResult[];\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface GetTransactionRequest {\n /**\n * ID of the transaction to retrieve.\n * @format GUID\n */\n transactionId: string;\n}\n\nexport interface GetTransactionResponse {\n /** Retrieved transaction. */\n transaction?: Transaction;\n}\n\nexport interface QueryTransactionsRequest {\n /** Filter, sort, and paging to apply to the query. */\n query: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n * See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language)\n * for more information.\n */\n filter?: Record<string, any> | null;\n /**\n * List of sort objects.\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /**\n * Sort order. Use `ASC` for ascending order or `DESC` for descending order.\n *\n * Default: `ASC`\n */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n /** Ascending sort order. */\n ASC = 'ASC',\n /** Descending sort order. */\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface QueryTransactionsResponse {\n /** List of retrieved transactions. */\n transactions?: Transaction[];\n /** Metadata for paginated results. */\n metadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface 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}\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\n/**\n * Retrieves a transaction.\n * @param transactionId - ID of the transaction to retrieve.\n * @public\n * @documentationMaturity preview\n * @requiredField transactionId\n * @permissionId BENEFIT_PROGRAMS.TRANSACTION_READ\n * @applicableIdentity APP\n * @returns Retrieved transaction.\n * @fqn wix.benefit_programs.v1.transaction.TransactionService.GetTransaction\n */\nexport async function getTransaction(\n transactionId: string\n): Promise<\n NonNullablePaths<\n Transaction,\n | `pool._id`\n | `amount`\n | `source`\n | `target`\n | `idempotencyKey`\n | `beneficiary.anonymousVisitorId`\n | `beneficiary.memberId`\n | `beneficiary.wixUserId`\n | `status`,\n 3\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 transactionId: transactionId,\n });\n\n const reqOpts =\n ambassadorWixBenefitProgramsV1Transaction.getTransaction(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.transaction!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { transactionId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['transactionId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates a query to retrieve a list of transactions.\n *\n * The Query Transactions method builds a query to retrieve a list of transactions and returns a `TransactionsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the `find()` method.\n *\n * You can refine the query by chaining `TransactionsQueryBuilder` methods onto the query. `TransactionsQueryBuilder` methods enable you to filter, sort, and control the results that Query Transactions returns.\n *\n * Query Transactions has a default paging limit of 50, which you can override.\n *\n * For a full description of the item object, see the object returned for the `items` property in `TransactionsQueryResult`.\n * @public\n * @documentationMaturity preview\n * @permissionId BENEFIT_PROGRAMS.TRANSACTION_READ\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.transaction.TransactionService.QueryTransactions\n */\nexport function queryTransactions(): TransactionsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n Transaction,\n 'CURSOR',\n QueryTransactionsRequest,\n QueryTransactionsResponse\n >({\n func: async (payload: QueryTransactionsRequest) => {\n const reqOpts =\n ambassadorWixBenefitProgramsV1Transaction.queryTransactions(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryTransactionsRequest['query']) => {\n const args = [query, {}] as [QueryTransactionsRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({\n data,\n }: HttpResponse<QueryTransactionsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.transactions,\n pagingMetadata: transformedData?.metadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface TransactionsQueryResult extends QueryCursorResult {\n items: Transaction[];\n query: TransactionsQueryBuilder;\n next: () => Promise<TransactionsQueryResult>;\n prev: () => Promise<TransactionsQueryResult>;\n}\n\nexport interface TransactionsQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n eq: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'pool.id'\n | 'relatedTransactionId'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.item.id',\n value: any\n ) => TransactionsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ne: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'pool.id'\n | 'relatedTransactionId'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.item.id',\n value: any\n ) => TransactionsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ge: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'pool.id'\n | 'relatedTransactionId'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.item.id',\n value: any\n ) => TransactionsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n gt: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'pool.id'\n | 'relatedTransactionId'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.item.id',\n value: any\n ) => TransactionsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n le: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'pool.id'\n | 'relatedTransactionId'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.item.id',\n value: any\n ) => TransactionsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n lt: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'pool.id'\n | 'relatedTransactionId'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.item.id',\n value: any\n ) => TransactionsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n * @documentationMaturity preview\n */\n startsWith: (\n propertyName:\n | '_id'\n | 'pool.id'\n | 'relatedTransactionId'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.item.id',\n value: string\n ) => TransactionsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n * @documentationMaturity preview\n */\n hasSome: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'pool.id'\n | 'relatedTransactionId'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.item.id',\n value: any[]\n ) => TransactionsQueryBuilder;\n /** @documentationMaturity preview */\n in: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'pool.id'\n | 'relatedTransactionId'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.item.id',\n value: any\n ) => TransactionsQueryBuilder;\n /** @documentationMaturity preview */\n exists: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'pool.id'\n | 'relatedTransactionId'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.item.id',\n value: boolean\n ) => TransactionsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n ascending: (\n ...propertyNames: Array<\n | '_id'\n | '_createdDate'\n | 'pool.id'\n | 'relatedTransactionId'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.item.id'\n >\n ) => TransactionsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n descending: (\n ...propertyNames: Array<\n | '_id'\n | '_createdDate'\n | 'pool.id'\n | 'relatedTransactionId'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.item.id'\n >\n ) => TransactionsQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object.\n * @documentationMaturity preview\n */\n limit: (limit: number) => TransactionsQueryBuilder;\n /** @param cursor - A pointer to specific record\n * @documentationMaturity preview\n */\n skipTo: (cursor: string) => TransactionsQueryBuilder;\n /** @documentationMaturity preview */\n find: () => Promise<TransactionsQueryResult>;\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 resolveWixBenefitProgramsV1TransactionTransactionServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/pool-transactions',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/benefit-programs/v1/transactions',\n destPath: '/v1/transactions',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/transactions',\n destPath: '/v1/bulk/transactions',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/benefit-programs/v1/transactions',\n destPath: '/v1/transactions',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/transactions',\n destPath: '/v1/bulk/transactions',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/benefit-programs/v1/transactions',\n destPath: '/v1/transactions',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/transactions',\n destPath: '/v1/bulk/transactions',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/benefit-programs/v1/transactions',\n destPath: '/v1/transactions',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/transactions',\n destPath: '/v1/bulk/transactions',\n },\n ],\n _: [\n {\n srcPath: '/_api/benefit-programs/v1/transactions',\n destPath: '/v1/transactions',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/transactions',\n destPath: '/v1/bulk/transactions',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/benefit-programs/v1/transactions',\n destPath: '/v1/transactions',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/transactions',\n destPath: '/v1/bulk/transactions',\n },\n ],\n '*.pub.wix-code.com': [\n {\n srcPath: '/_api/benefit-programs/v1/transactions',\n destPath: '/v1/transactions',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/transactions',\n destPath: '/v1/bulk/transactions',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/benefit-programs/v1/transactions',\n destPath: '/v1/transactions',\n },\n {\n srcPath: '/benefit-programs/v1/bulk/transactions',\n destPath: '/v1/bulk/transactions',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_benefit-programs_transactions';\n\n/** Retrieves a transaction. */\nexport function getTransaction(payload: object): RequestOptionsFactory<any> {\n function __getTransaction({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.transaction',\n method: 'GET' as any,\n methodFqn:\n 'wix.benefit_programs.v1.transaction.TransactionService.GetTransaction',\n packageName: PACKAGE_NAME,\n url: resolveWixBenefitProgramsV1TransactionTransactionServiceUrl({\n protoPath: '/v1/transactions/{transactionId}',\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: 'transaction.createdDate' },\n { path: 'transaction.updatedDate' },\n { path: 'transaction.details.effectiveDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getTransaction;\n}\n\n/**\n * Creates a query to retrieve a list of transactions.\n *\n * The Query Transactions method builds a query to retrieve a list of transactions and returns a `TransactionsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the `find()` method.\n *\n * You can refine the query by chaining `TransactionsQueryBuilder` methods onto the query. `TransactionsQueryBuilder` methods enable you to filter, sort, and control the results that Query Transactions returns.\n *\n * Query Transactions has a default paging limit of 50, which you can override.\n *\n * For a full description of the item object, see the object returned for the `items` property in `TransactionsQueryResult`.\n */\nexport function queryTransactions(payload: object): RequestOptionsFactory<any> {\n function __queryTransactions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.transaction',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.transaction.TransactionService.QueryTransactions',\n packageName: PACKAGE_NAME,\n url: resolveWixBenefitProgramsV1TransactionTransactionServiceUrl({\n protoPath: '/v1/transactions/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'transactions.createdDate' },\n { path: 'transactions.updatedDate' },\n { path: 'transactions.details.effectiveDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryTransactions;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n Transaction,\n TransactionsQueryBuilder,\n getTransaction as universalGetTransaction,\n queryTransactions as universalQueryTransactions,\n} from './benefit-programs-v1-transaction-transactions.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/benefit-programs' };\n\nexport function getTransaction(\n httpClient: HttpClient\n): GetTransactionSignature {\n return (transactionId: string) =>\n universalGetTransaction(\n transactionId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetTransactionSignature {\n /**\n * Retrieves a transaction.\n * @param - ID of the transaction to retrieve.\n * @returns Retrieved transaction.\n */\n (transactionId: string): Promise<\n NonNullablePaths<\n Transaction,\n | `pool._id`\n | `amount`\n | `source`\n | `target`\n | `idempotencyKey`\n | `beneficiary.anonymousVisitorId`\n | `beneficiary.memberId`\n | `beneficiary.wixUserId`\n | `status`,\n 3\n >\n >;\n}\n\nexport function queryTransactions(\n httpClient: HttpClient\n): QueryTransactionsSignature {\n return () =>\n universalQueryTransactions(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryTransactionsSignature {\n /**\n * Creates a query to retrieve a list of transactions.\n *\n * The Query Transactions method builds a query to retrieve a list of transactions and returns a `TransactionsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the `find()` method.\n *\n * You can refine the query by chaining `TransactionsQueryBuilder` methods onto the query. `TransactionsQueryBuilder` methods enable you to filter, sort, and control the results that Query Transactions returns.\n *\n * Query Transactions has a default paging limit of 50, which you can override.\n *\n * For a full description of the item object, see the object returned for the `items` property in `TransactionsQueryResult`.\n */\n (): TransactionsQueryBuilder;\n}\n\nexport {\n ActionEvent,\n ApplicationError,\n BalanceType,\n BulkActionMetadata,\n BulkCreateTransactionsRequest,\n BulkCreateTransactionsResponse,\n BulkTransactionResult,\n BulkUpdateTransactionsRequest,\n BulkUpdateTransactionsResponse,\n CommonIdentificationData,\n CommonIdentificationDataIdOneOf,\n CreateTransactionRequest,\n CreateTransactionResponse,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n ExtendedFields,\n FailedTransactionDetails,\n GetTransactionRequest,\n GetTransactionResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n IdentityType,\n Item,\n ItemMetadata,\n MaskedTransaction,\n MessageEnvelope,\n PoolInfo,\n QueryTransactionsRequest,\n QueryTransactionsResponse,\n RequestedValues,\n RestoreInfo,\n SortOrder,\n Sorting,\n Transaction,\n TransactionDetails,\n TransactionStatus,\n TransactionStatusDetailsOneOf,\n TransactionsQueryBuilder,\n TransactionsQueryResult,\n UpdateTransactionRequest,\n UpdateTransactionResponse,\n WebhookIdentityType,\n} from './benefit-programs-v1-transaction-transactions.universal.js';\n","import {\n getTransaction as publicGetTransaction,\n queryTransactions as publicQueryTransactions,\n} from './benefit-programs-v1-transaction-transactions.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getTransaction: MaybeContext<\n BuildRESTFunction<typeof publicGetTransaction> & typeof publicGetTransaction\n> = /*#__PURE__*/ createRESTModule(publicGetTransaction);\nexport const queryTransactions: MaybeContext<\n BuildRESTFunction<typeof publicQueryTransactions> &\n typeof publicQueryTransactions\n> = /*#__PURE__*/ createRESTModule(publicQueryTransactions);\n\nexport {\n BalanceType,\n IdentityType,\n TransactionStatus,\n SortOrder,\n WebhookIdentityType,\n} from './benefit-programs-v1-transaction-transactions.universal.js';\nexport {\n Transaction,\n TransactionStatusDetailsOneOf,\n PoolInfo,\n CommonIdentificationData,\n CommonIdentificationDataIdOneOf,\n TransactionDetails,\n Item,\n ExtendedFields,\n RequestedValues,\n FailedTransactionDetails,\n CreateTransactionRequest,\n CreateTransactionResponse,\n BulkCreateTransactionsRequest,\n BulkCreateTransactionsResponse,\n BulkTransactionResult,\n ItemMetadata,\n ApplicationError,\n BulkActionMetadata,\n UpdateTransactionRequest,\n UpdateTransactionResponse,\n BulkUpdateTransactionsRequest,\n MaskedTransaction,\n BulkUpdateTransactionsResponse,\n GetTransactionRequest,\n GetTransactionResponse,\n QueryTransactionsRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n CursorPaging,\n QueryTransactionsResponse,\n CursorPagingMetadata,\n Cursors,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n TransactionsQueryResult,\n TransactionsQueryBuilder,\n} from './benefit-programs-v1-transaction-transactions.universal.js';\nexport {\n BalanceTypeWithLiterals,\n IdentityTypeWithLiterals,\n TransactionStatusWithLiterals,\n SortOrderWithLiterals,\n WebhookIdentityTypeWithLiterals,\n} from './benefit-programs-v1-transaction-transactions.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAAA;AAAA,EAAA,yBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,0BAAkC;AAClC,uBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,4DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,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,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AA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CAAC,OAAO,CAAC,CAAC;AACvB,iBAAO,qEAAsC;AAAA,QAC3C,GAAG,OAAO,CAAC;AAAA,QACX,OAAO,OAAO,CAAC;AAAA,MACjB,CAAC;AAAA,IACH;AAAA,IACA,qBAAqB,CAAC;AAAA,MACpB;AAAA,IACF,MAA+C;AAC7C,YAAM,sBAAkB;AAAA,YACtB,wCAAe,MAAM,CAAC,CAAC;AAAA,MACzB;AAEA,aAAO;AAAA,QACL,OAAO,iBAAiB;AAAA,QACxB,gBAAgB,iBAAiB;AAAA,MACnC;AAAA,IACF;AAAA,IACA,kBAAkB,CAAC,QAAiB;AAClC,YAAM,uBAAmB,uBAAAD,gBAAkB,KAAK;AAAA,QAC9C,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,OAAO,OAAO;AAAA,QAC1C,yBAAyB;AAAA,MAC3B,CAAC;AAED,YAAM;AAAA,IACR;AAAA,IACA,cAAc;AAAA,IACd,qBAAqB,CAAC;AAAA,EACxB,CAAC;AACH;;;AEj0BO,SAASE,gBACd,YACyB;AACzB,SAAO,CAAC,kBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAyBO,SAASC,mBACd,YAC4B;AAC5B,SAAO,MACLA;AAAA;AAAA,IAEE,EAAE,WAAW;AAAA,EACf;AACJ;;;AChDA,IAAAC,uBAAiC;AAG1B,IAAMC,kBAEK,2DAAiBA,eAAoB;AAChD,IAAMC,qBAGK,2DAAiBA,kBAAuB;","names":["getTransaction","queryTransactions","import_rest_modules","payload","import_transform_paths","BalanceType","IdentityType","TransactionStatus","SortOrder","WebhookIdentityType","getTransaction","sdkTransformError","queryTransactions","getTransaction","queryTransactions","import_rest_modules","getTransaction","queryTransactions"]}
@@ -1,4 +1,6 @@
1
- interface Transaction {
1
+ import { NonNullablePaths } from '@wix/sdk-types';
2
+
3
+ interface Transaction extends TransactionStatusDetailsOneOf {
2
4
  /**
3
5
  * Transaction ID.
4
6
  * @format GUID
@@ -73,6 +75,9 @@ interface Transaction {
73
75
  */
74
76
  extendedFields?: ExtendedFields;
75
77
  }
78
+ /** @oneof */
79
+ interface TransactionStatusDetailsOneOf {
80
+ }
76
81
  interface PoolInfo {
77
82
  /**
78
83
  * Pool ID.
@@ -166,6 +171,8 @@ declare enum IdentityType {
166
171
  /** A Wix account holder, such as a site owner or contributor. */
167
172
  WIX_USER = "WIX_USER"
168
173
  }
174
+ /** @enumType */
175
+ type IdentityTypeWithLiterals = IdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER';
169
176
  declare enum TransactionStatus {
170
177
  UNDEFINED = "UNDEFINED",
171
178
  /** Transaction is pending. This is the initial transaction status. */
@@ -251,6 +258,23 @@ interface RequestedValues {
251
258
  /** Where the credits went to. */
252
259
  target?: BalanceTypeWithLiterals;
253
260
  }
261
+ interface FailedTransactionDetails {
262
+ /**
263
+ * Response status
264
+ * @maxLength 32
265
+ */
266
+ responseStatus?: string | null;
267
+ /**
268
+ * Error code.
269
+ * @maxLength 32
270
+ */
271
+ errorCode?: string | null;
272
+ /**
273
+ * Error message
274
+ * @maxLength 256
275
+ */
276
+ errorMessage?: string | null;
277
+ }
254
278
  interface CreateTransactionRequest {
255
279
  /** Transaction to create. */
256
280
  transaction?: Transaction;
@@ -596,6 +620,37 @@ declare enum WebhookIdentityType {
596
620
  }
597
621
  /** @enumType */
598
622
  type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
623
+ /**
624
+ * Retrieves a transaction.
625
+ * @param transactionId - ID of the transaction to retrieve.
626
+ * @public
627
+ * @documentationMaturity preview
628
+ * @requiredField transactionId
629
+ * @permissionId BENEFIT_PROGRAMS.TRANSACTION_READ
630
+ * @applicableIdentity APP
631
+ * @returns Retrieved transaction.
632
+ * @fqn wix.benefit_programs.v1.transaction.TransactionService.GetTransaction
633
+ */
634
+ declare function getTransaction(transactionId: string): Promise<NonNullablePaths<Transaction, `pool._id` | `amount` | `source` | `target` | `idempotencyKey` | `beneficiary.anonymousVisitorId` | `beneficiary.memberId` | `beneficiary.wixUserId` | `status`, 3>>;
635
+ /**
636
+ * Creates a query to retrieve a list of transactions.
637
+ *
638
+ * The Query Transactions method builds a query to retrieve a list of transactions and returns a `TransactionsQueryBuilder` object.
639
+ *
640
+ * The returned object contains the query definition, which is used to run the query using the `find()` method.
641
+ *
642
+ * You can refine the query by chaining `TransactionsQueryBuilder` methods onto the query. `TransactionsQueryBuilder` methods enable you to filter, sort, and control the results that Query Transactions returns.
643
+ *
644
+ * Query Transactions has a default paging limit of 50, which you can override.
645
+ *
646
+ * For a full description of the item object, see the object returned for the `items` property in `TransactionsQueryResult`.
647
+ * @public
648
+ * @documentationMaturity preview
649
+ * @permissionId BENEFIT_PROGRAMS.TRANSACTION_READ
650
+ * @applicableIdentity APP
651
+ * @fqn wix.benefit_programs.v1.transaction.TransactionService.QueryTransactions
652
+ */
653
+ declare function queryTransactions(): TransactionsQueryBuilder;
599
654
  interface QueryCursorResult {
600
655
  cursors: Cursors;
601
656
  hasNext: () => boolean;
@@ -674,4 +729,4 @@ interface TransactionsQueryBuilder {
674
729
  find: () => Promise<TransactionsQueryResult>;
675
730
  }
676
731
 
677
- export { type ApplicationError as A, BalanceType as B, type CommonIdentificationData as C, type DomainEvent as D, type ExtendedFields as E, type EntityUpdatedEvent as F, type GetTransactionRequest as G, type EntityDeletedEvent as H, IdentityType as I, type ActionEvent as J, type MessageEnvelope as K, type IdentificationData as L, type MaskedTransaction as M, type IdentificationDataIdOneOf as N, type TransactionsQueryResult as O, type PoolInfo as P, type QueryTransactionsRequest as Q, type RequestedValues as R, SortOrder as S, type Transaction as T, type UpdateTransactionRequest as U, WebhookIdentityType as W, type TransactionsQueryBuilder as a, TransactionStatus as b, type CommonIdentificationDataIdOneOf as c, type TransactionDetails as d, type Item as e, type CreateTransactionRequest as f, type CreateTransactionResponse as g, type BulkCreateTransactionsRequest as h, type BulkCreateTransactionsResponse as i, type BulkTransactionResult as j, type ItemMetadata as k, type BulkActionMetadata as l, type UpdateTransactionResponse as m, type BulkUpdateTransactionsRequest as n, type BulkUpdateTransactionsResponse as o, type GetTransactionResponse as p, type CursorQuery as q, type CursorQueryPagingMethodOneOf as r, type Sorting as s, type CursorPaging as t, type QueryTransactionsResponse as u, type CursorPagingMetadata as v, type Cursors as w, type DomainEventBodyOneOf as x, type EntityCreatedEvent as y, type RestoreInfo as z };
732
+ export { type ActionEvent, type ApplicationError, BalanceType, type BalanceTypeWithLiterals, type BulkActionMetadata, type BulkCreateTransactionsRequest, type BulkCreateTransactionsResponse, type BulkTransactionResult, type BulkUpdateTransactionsRequest, type BulkUpdateTransactionsResponse, type CommonIdentificationData, type CommonIdentificationDataIdOneOf, type CreateTransactionRequest, type CreateTransactionResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type FailedTransactionDetails, type GetTransactionRequest, type GetTransactionResponse, type IdentificationData, type IdentificationDataIdOneOf, IdentityType, type IdentityTypeWithLiterals, type Item, type ItemMetadata, type MaskedTransaction, type MessageEnvelope, type PoolInfo, type QueryTransactionsRequest, type QueryTransactionsResponse, type RequestedValues, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, type Transaction, type TransactionDetails, TransactionStatus, type TransactionStatusDetailsOneOf, type TransactionStatusWithLiterals, type TransactionsQueryBuilder, type TransactionsQueryResult, type UpdateTransactionRequest, type UpdateTransactionResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, getTransaction, queryTransactions };