@wix/auto_sdk_benefit-programs_transactions 1.0.26 → 1.0.27

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 +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 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,0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O,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
+ {"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 * Benefit key associated with the transaction.\n * @maxLength 64\n * @immutable\n */\n benefitKey?: 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 * Provider app id\n * @format GUID\n * @readonly\n */\n providerAppId?: 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;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,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AAM,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;;;AE70BO,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"]}
@@ -203,6 +203,12 @@ interface TransactionDetails {
203
203
  * @maxLength 256
204
204
  */
205
205
  reason?: string | null;
206
+ /**
207
+ * Benefit key associated with the transaction.
208
+ * @maxLength 64
209
+ * @immutable
210
+ */
211
+ benefitKey?: string | null;
206
212
  }
207
213
  interface Item {
208
214
  /**
@@ -235,6 +241,12 @@ interface Item {
235
241
  * @readonly
236
242
  */
237
243
  displayName?: string | null;
244
+ /**
245
+ * Provider app id
246
+ * @format GUID
247
+ * @readonly
248
+ */
249
+ providerAppId?: string | null;
238
250
  }
239
251
  interface ExtendedFields {
240
252
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.typings.ts","../../src/benefit-programs-v1-transaction-transactions.universal.ts","../../src/benefit-programs-v1-transaction-transactions.http.ts"],"sourcesContent":["export * from './src/benefit-programs-v1-transaction-transactions.universal.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"],"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;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C7C,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;","names":["getTransaction","queryTransactions","import_rest_modules","payload","import_transform_paths","BalanceType","IdentityType","TransactionStatus","SortOrder","WebhookIdentityType","getTransaction","sdkTransformError","queryTransactions"]}
1
+ {"version":3,"sources":["../../index.typings.ts","../../src/benefit-programs-v1-transaction-transactions.universal.ts","../../src/benefit-programs-v1-transaction-transactions.http.ts"],"sourcesContent":["export * from './src/benefit-programs-v1-transaction-transactions.universal.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 * Benefit key associated with the transaction.\n * @maxLength 64\n * @immutable\n */\n benefitKey?: 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 * Provider app id\n * @format GUID\n * @readonly\n */\n providerAppId?: 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"],"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;A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AG;AAE1B,UAAM;AAAA,EACR;AACF;AAoBO,SAASC,qBAA8C;AAE5D,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,aAAO,mCAKL;AAAA,IACA,MAAM,OAAO,YAAsC;AACjD,YAAM,UACsC,kBAAkB,OAAO;AAErE,mBAAa,aAAa;AAC1B,UAAI;AACF,cAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,qBAAa,YAAY,MAAM;AAC/B,eAAO;AAAA,MACT,SAAS,KAAK;AACZ,qBAAa,UAAU,GAAG;AAC1B,cAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,oBAAoB,CAAC,UAA6C;AAChE,YAAM,OAAO,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;","names":["getTransaction","queryTransactions","import_rest_modules","payload","import_transform_paths","BalanceType","IdentityType","TransactionStatus","SortOrder","WebhookIdentityType","getTransaction","sdkTransformError","queryTransactions"]}
@@ -192,6 +192,12 @@ interface TransactionDetails {
192
192
  * @maxLength 256
193
193
  */
194
194
  reason?: string | null;
195
+ /**
196
+ * Benefit key associated with the transaction.
197
+ * @maxLength 64
198
+ * @immutable
199
+ */
200
+ benefitKey?: string | null;
195
201
  }
196
202
  interface Item {
197
203
  /**
@@ -224,6 +230,12 @@ interface Item {
224
230
  * @readonly
225
231
  */
226
232
  displayName?: string | null;
233
+ /**
234
+ * Provider app id
235
+ * @format GUID
236
+ * @readonly
237
+ */
238
+ providerAppId?: string | null;
227
239
  }
228
240
  interface ExtendedFields {
229
241
  /**