@wix/auto_sdk_benefit-programs_transactions 1.0.59 → 1.0.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.js +3 -4
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +13 -20
- package/build/cjs/index.typings.js +2 -3
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.js +1 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.js +4 -4
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.mjs +3 -4
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +13 -20
- package/build/es/index.typings.mjs +2 -3
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.mjs +1 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.mjs +4 -4
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.js +3 -4
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +81 -20
- package/build/internal/cjs/index.typings.js +2 -3
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +103 -0
- package/build/internal/cjs/meta.js +1 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.js +4 -4
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.mjs +3 -4
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +81 -20
- package/build/internal/es/index.typings.mjs +2 -3
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +103 -0
- package/build/internal/es/meta.mjs +1 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.mjs +4 -4
- package/build/internal/es/schemas.mjs.map +1 -1
- package/package.json +4 -4
|
@@ -2,6 +2,11 @@ import * as _wix_sdk_types from '@wix/sdk-types';
|
|
|
2
2
|
import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types';
|
|
3
3
|
|
|
4
4
|
interface Transaction extends TransactionStatusDetailsOneOf {
|
|
5
|
+
/**
|
|
6
|
+
* Details of a failed transaction.
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
failedOptions?: FailedTransactionDetails;
|
|
5
10
|
/**
|
|
6
11
|
* Transaction ID.
|
|
7
12
|
* @format GUID
|
|
@@ -82,6 +87,13 @@ interface Transaction extends TransactionStatusDetailsOneOf {
|
|
|
82
87
|
* [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.
|
|
83
88
|
*/
|
|
84
89
|
extendedFields?: ExtendedFields;
|
|
90
|
+
/**
|
|
91
|
+
* Originally requested transaction values
|
|
92
|
+
* @internal
|
|
93
|
+
* @readonly
|
|
94
|
+
* @immutable
|
|
95
|
+
*/
|
|
96
|
+
requestedValues?: RequestedValues;
|
|
85
97
|
/**
|
|
86
98
|
* External transaction ID.
|
|
87
99
|
* @format GUID
|
|
@@ -92,6 +104,11 @@ interface Transaction extends TransactionStatusDetailsOneOf {
|
|
|
92
104
|
}
|
|
93
105
|
/** @oneof */
|
|
94
106
|
interface TransactionStatusDetailsOneOf {
|
|
107
|
+
/**
|
|
108
|
+
* Details of a failed transaction.
|
|
109
|
+
* @internal
|
|
110
|
+
*/
|
|
111
|
+
failedOptions?: FailedTransactionDetails;
|
|
95
112
|
}
|
|
96
113
|
interface PoolInfo {
|
|
97
114
|
/**
|
|
@@ -159,6 +176,11 @@ interface PoolInfo {
|
|
|
159
176
|
declare enum BalanceType {
|
|
160
177
|
/** In a pool's balance. */
|
|
161
178
|
AVAILABLE = "AVAILABLE",
|
|
179
|
+
/**
|
|
180
|
+
* Reserved balance.
|
|
181
|
+
* @internal
|
|
182
|
+
*/
|
|
183
|
+
RESERVED = "RESERVED",
|
|
162
184
|
/** Outside a pool's balance. */
|
|
163
185
|
EXTERNAL = "EXTERNAL"
|
|
164
186
|
}
|
|
@@ -180,6 +202,12 @@ interface CommonIdentificationData extends CommonIdentificationDataIdOneOf {
|
|
|
180
202
|
* @format GUID
|
|
181
203
|
*/
|
|
182
204
|
wixUserId?: string;
|
|
205
|
+
/**
|
|
206
|
+
* Identity type.
|
|
207
|
+
* @internal
|
|
208
|
+
* @readonly
|
|
209
|
+
*/
|
|
210
|
+
identityType?: IdentityTypeWithLiterals;
|
|
183
211
|
}
|
|
184
212
|
/** @oneof */
|
|
185
213
|
interface CommonIdentificationDataIdOneOf {
|
|
@@ -240,6 +268,13 @@ interface TransactionDetails {
|
|
|
240
268
|
* @maxLength 256
|
|
241
269
|
*/
|
|
242
270
|
reason?: string | null;
|
|
271
|
+
/**
|
|
272
|
+
* Transaction origin. Indicates the source of the transaction.
|
|
273
|
+
* @internal
|
|
274
|
+
* @immutable
|
|
275
|
+
* @maxLength 50
|
|
276
|
+
*/
|
|
277
|
+
origin?: string | null;
|
|
243
278
|
/**
|
|
244
279
|
* Benefit key associated with the transaction.
|
|
245
280
|
* @maxLength 64
|
|
@@ -403,6 +438,11 @@ interface BulkActionMetadata {
|
|
|
403
438
|
interface UpdateTransactionRequest {
|
|
404
439
|
/** Transaction to update. */
|
|
405
440
|
transaction?: Transaction;
|
|
441
|
+
/**
|
|
442
|
+
* The field mask to apply
|
|
443
|
+
* @internal
|
|
444
|
+
*/
|
|
445
|
+
fieldMask?: string[];
|
|
406
446
|
}
|
|
407
447
|
interface UpdateTransactionResponse {
|
|
408
448
|
/** Updated transaction. */
|
|
@@ -487,6 +527,20 @@ interface Sorting {
|
|
|
487
527
|
* Default: `ASC`
|
|
488
528
|
*/
|
|
489
529
|
order?: SortOrderWithLiterals;
|
|
530
|
+
/**
|
|
531
|
+
* When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by
|
|
532
|
+
* a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.
|
|
533
|
+
*
|
|
534
|
+
* If multiple filters are provided, they are combined with AND operator.
|
|
535
|
+
*
|
|
536
|
+
* Example:
|
|
537
|
+
* Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]}
|
|
538
|
+
* and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be
|
|
539
|
+
* { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] }
|
|
540
|
+
* @internal
|
|
541
|
+
* @maxSize 10
|
|
542
|
+
*/
|
|
543
|
+
selectItemsBy?: Record<string, any>[] | null;
|
|
490
544
|
}
|
|
491
545
|
declare enum SortOrder {
|
|
492
546
|
/** Ascending sort order. */
|
|
@@ -754,41 +808,37 @@ interface TransactionsQueryBuilder {
|
|
|
754
808
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
755
809
|
* @param value - Value to compare against.
|
|
756
810
|
*/
|
|
757
|
-
eq: (propertyName: '_id' | '_createdDate' | 'pool.id' | 'relatedTransactionId' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.item.id', value: any) => TransactionsQueryBuilder;
|
|
811
|
+
eq: (propertyName: '_id' | '_createdDate' | 'pool.id' | 'relatedTransactionId' | 'correlationId' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.item.id', value: any) => TransactionsQueryBuilder;
|
|
758
812
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
759
813
|
* @param value - Value to compare against.
|
|
760
814
|
*/
|
|
761
|
-
ne: (propertyName: '_id' | '_createdDate' | 'pool.id' | 'relatedTransactionId' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.item.id', value: any) => TransactionsQueryBuilder;
|
|
815
|
+
ne: (propertyName: '_id' | '_createdDate' | 'pool.id' | 'relatedTransactionId' | 'correlationId' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.item.id', value: any) => TransactionsQueryBuilder;
|
|
762
816
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
763
817
|
* @param value - Value to compare against.
|
|
764
818
|
*/
|
|
765
|
-
ge: (propertyName: '_id' | '_createdDate' | 'pool.id' | 'relatedTransactionId' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.item.id', value: any) => TransactionsQueryBuilder;
|
|
819
|
+
ge: (propertyName: '_id' | '_createdDate' | 'pool.id' | 'relatedTransactionId' | 'correlationId' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.item.id', value: any) => TransactionsQueryBuilder;
|
|
766
820
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
767
821
|
* @param value - Value to compare against.
|
|
768
822
|
*/
|
|
769
|
-
gt: (propertyName: '_id' | '_createdDate' | 'pool.id' | 'relatedTransactionId' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.item.id', value: any) => TransactionsQueryBuilder;
|
|
823
|
+
gt: (propertyName: '_id' | '_createdDate' | 'pool.id' | 'relatedTransactionId' | 'correlationId' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.item.id', value: any) => TransactionsQueryBuilder;
|
|
770
824
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
771
825
|
* @param value - Value to compare against.
|
|
772
826
|
*/
|
|
773
|
-
le: (propertyName: '_id' | '_createdDate' | 'pool.id' | 'relatedTransactionId' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.item.id', value: any) => TransactionsQueryBuilder;
|
|
827
|
+
le: (propertyName: '_id' | '_createdDate' | 'pool.id' | 'relatedTransactionId' | 'correlationId' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.item.id', value: any) => TransactionsQueryBuilder;
|
|
774
828
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
775
829
|
* @param value - Value to compare against.
|
|
776
830
|
*/
|
|
777
|
-
lt: (propertyName: '_id' | '_createdDate' | 'pool.id' | 'relatedTransactionId' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.item.id', value: any) => TransactionsQueryBuilder;
|
|
831
|
+
lt: (propertyName: '_id' | '_createdDate' | 'pool.id' | 'relatedTransactionId' | 'correlationId' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.item.id', value: any) => TransactionsQueryBuilder;
|
|
778
832
|
/** @param propertyName - Property whose value is compared with `string`.
|
|
779
833
|
* @param string - String to compare against. Case-insensitive.
|
|
780
834
|
*/
|
|
781
|
-
startsWith: (propertyName: '_id' | 'pool.id' | 'relatedTransactionId' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.item.id', value: string) => TransactionsQueryBuilder;
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
*/
|
|
785
|
-
hasSome: (propertyName: '_id' | '_createdDate' | 'pool.id' | 'relatedTransactionId' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.item.id', value: any[]) => TransactionsQueryBuilder;
|
|
786
|
-
in: (propertyName: '_id' | '_createdDate' | 'pool.id' | 'relatedTransactionId' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.item.id', value: any) => TransactionsQueryBuilder;
|
|
787
|
-
exists: (propertyName: '_id' | '_createdDate' | 'pool.id' | 'relatedTransactionId' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.item.id', value: boolean) => TransactionsQueryBuilder;
|
|
835
|
+
startsWith: (propertyName: '_id' | 'pool.id' | 'relatedTransactionId' | 'correlationId' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.item.id', value: string) => TransactionsQueryBuilder;
|
|
836
|
+
in: (propertyName: '_id' | '_createdDate' | 'pool.id' | 'relatedTransactionId' | 'correlationId' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.item.id', value: any) => TransactionsQueryBuilder;
|
|
837
|
+
exists: (propertyName: '_id' | '_createdDate' | 'pool.id' | 'relatedTransactionId' | 'correlationId' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.item.id', value: boolean) => TransactionsQueryBuilder;
|
|
788
838
|
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
|
|
789
|
-
ascending: (...propertyNames: Array<'_id' | '_createdDate' | 'pool.id' | 'relatedTransactionId' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.item.id'>) => TransactionsQueryBuilder;
|
|
839
|
+
ascending: (...propertyNames: Array<'_id' | '_createdDate' | 'pool.id' | 'relatedTransactionId' | 'correlationId' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.item.id'>) => TransactionsQueryBuilder;
|
|
790
840
|
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
|
|
791
|
-
descending: (...propertyNames: Array<'_id' | '_createdDate' | 'pool.id' | 'relatedTransactionId' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.item.id'>) => TransactionsQueryBuilder;
|
|
841
|
+
descending: (...propertyNames: Array<'_id' | '_createdDate' | 'pool.id' | 'relatedTransactionId' | 'correlationId' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.item.id'>) => TransactionsQueryBuilder;
|
|
792
842
|
/** @param limit - Number of items to return, which is also the `pageSize` of the results object. */
|
|
793
843
|
limit: (limit: number) => TransactionsQueryBuilder;
|
|
794
844
|
/** @param cursor - A pointer to specific record */
|
|
@@ -810,6 +860,7 @@ interface TransactionQuerySpec extends QuerySpec {
|
|
|
810
860
|
'_id',
|
|
811
861
|
'beneficiary.memberId',
|
|
812
862
|
'beneficiary.wixUserId',
|
|
863
|
+
'correlationId',
|
|
813
864
|
'details.item._id',
|
|
814
865
|
'pool._id',
|
|
815
866
|
'relatedTransactionId'
|
|
@@ -861,14 +912,24 @@ type TransactionQuery = {
|
|
|
861
912
|
Default: `ASC`
|
|
862
913
|
*/
|
|
863
914
|
order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];
|
|
915
|
+
/**
|
|
916
|
+
When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by
|
|
917
|
+
a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.
|
|
918
|
+
|
|
919
|
+
If multiple filters are provided, they are combined with AND operator.
|
|
920
|
+
|
|
921
|
+
Example:
|
|
922
|
+
Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]}
|
|
923
|
+
and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be
|
|
924
|
+
{ fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] }
|
|
925
|
+
@internal: undefined,
|
|
926
|
+
@maxSize: 10
|
|
927
|
+
*/
|
|
928
|
+
selectItemsBy?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['selectItemsBy'] | null;
|
|
864
929
|
}[];
|
|
865
930
|
};
|
|
866
931
|
declare const utils: {
|
|
867
|
-
query:
|
|
868
|
-
QueryBuilder: () => _wix_sdk_types.QueryBuilder<Transaction, TransactionQuerySpec, TransactionQuery>;
|
|
869
|
-
Filter: _wix_sdk_types.FilterFactory<Transaction, TransactionQuerySpec>;
|
|
870
|
-
Sort: _wix_sdk_types.SortFactory<TransactionQuerySpec>;
|
|
871
|
-
};
|
|
932
|
+
query: _wix_sdk_types.QueryHelpers<Transaction, TransactionQuerySpec, TransactionQuery>;
|
|
872
933
|
};
|
|
873
934
|
|
|
874
935
|
export { type AccountInfo, type ActionEvent, type ApplicationError, BalanceType, type BalanceTypeWithLiterals, type BulkActionMetadata, type BulkCreateTransactionsRequest, type BulkCreateTransactionsResponse, type BulkTransactionResult, type BulkUpdateTransactionsRequest, type BulkUpdateTransactionsResponse, type CommonIdentificationData, type CommonIdentificationDataIdOneOf, type CommonQueryWithEntityContext, type CreateTransactionRequest, type CreateTransactionResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DomainEvent, type DomainEventBodyOneOf, type DuplicateExternalIdErrorData, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type FailedTransactionDetails, type GetTransactionRequest, type GetTransactionResponse, type HealTransactionRequest, type HealTransactionResponse, type HealTransactionTenantRequest, type HealTransactionTenantResponse, type IdentificationData, type IdentificationDataIdOneOf, IdentityType, type IdentityTypeWithLiterals, type Item, type ItemMetadata, type MaskedTransaction, type MessageEnvelope, type PoolInfo, type QueryTransactionsRequest, type QueryTransactionsResponse, type RequestedValues, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, type Transaction, type TransactionDetails, type TransactionQuery, type TransactionQuerySpec, TransactionStatus, type TransactionStatusDetailsOneOf, type TransactionStatusWithLiterals, type TransactionsQueryBuilder, type TransactionsQueryResult, type UpdateTransactionRequest, type UpdateTransactionResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, getTransaction, queryTransactions, typedQueryTransactions, utils };
|
|
@@ -202,6 +202,7 @@ var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transfor
|
|
|
202
202
|
var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
|
|
203
203
|
var BalanceType = /* @__PURE__ */ ((BalanceType2) => {
|
|
204
204
|
BalanceType2["AVAILABLE"] = "AVAILABLE";
|
|
205
|
+
BalanceType2["RESERVED"] = "RESERVED";
|
|
205
206
|
BalanceType2["EXTERNAL"] = "EXTERNAL";
|
|
206
207
|
return BalanceType2;
|
|
207
208
|
})(BalanceType || {});
|
|
@@ -325,9 +326,7 @@ async function typedQueryTransactions(query) {
|
|
|
325
326
|
}
|
|
326
327
|
}
|
|
327
328
|
var utils = {
|
|
328
|
-
query:
|
|
329
|
-
...(0, import_query_builder_utils.createQueryUtils)()
|
|
330
|
-
}
|
|
329
|
+
query: /* @__PURE__ */ (0, import_query_builder_utils.createQueryUtils)()
|
|
331
330
|
};
|
|
332
331
|
// Annotate the CommonJS export names for ESM import in node:
|
|
333
332
|
0 && (module.exports = {
|
|
@@ -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 {\n HttpClient,\n HttpResponse,\n NonNullablePaths,\n QuerySpec,\n Query as QuerySdkType,\n} 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';\nimport { createQueryUtils } from '@wix/sdk-runtime/query-builder-utils';\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 * ID used to correlate this transaction with other related transactions.\n * @internal\n * @format GUID\n * @readonly\n */\n correlationId?: 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 * External transaction ID.\n * @format GUID\n * @readonly\n * @immutable\n */\n externalId?: string | null;\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 * External ID of the program definition the pool was created from.\n * @format GUID\n * @readonly\n */\n externalProgramDefinitionId?: string | null;\n /**\n * ID of the program that contains the pool.\n * @format GUID\n * @readonly\n */\n programId?: string | null;\n /**\n * External ID of the program that contains the pool.\n * @format GUID\n * @readonly\n */\n externalProgramId?: 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 * Pool name\n * @maxLength 64\n * @readonly\n */\n displayName?: string | null;\n /**\n * Benefit name\n * @maxLength 40\n * @readonly\n */\n benefitDisplayName?: string | null;\n}\n\nexport enum BalanceType {\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 = BalanceType | 'AVAILABLE' | '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 /** 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 | '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 DuplicateExternalIdErrorData {\n /**\n * The external id of the transaction\n * @format GUID\n */\n externalId?: string;\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 HealTransactionRequest {\n /**\n * ID of the transaction whose enrichments should be re-materialized.\n * @format GUID\n */\n transactionId?: string;\n}\n\nexport interface HealTransactionResponse {}\n\nexport interface HealTransactionTenantRequest {}\n\nexport interface HealTransactionTenantResponse {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/**\n * Retrieves a transaction.\n * @param transactionId - ID of the transaction to retrieve.\n * @public\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 * @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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 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 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 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 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 limit: (limit: number) => TransactionsQueryBuilder;\n /** @param cursor - A pointer to specific record */\n skipTo: (cursor: string) => TransactionsQueryBuilder;\n find: () => Promise<TransactionsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.benefit_programs.v1.transaction.TransactionService.QueryTransactions\n * @requiredField query\n */\nexport async function typedQueryTransactions(\n query: TransactionQuery\n): Promise<\n NonNullablePaths<\n QueryTransactionsResponse,\n | `transactions`\n | `transactions.${number}.pool._id`\n | `transactions.${number}.amount`\n | `transactions.${number}.source`\n | `transactions.${number}.target`\n | `transactions.${number}.idempotencyKey`\n | `transactions.${number}.beneficiary.anonymousVisitorId`\n | `transactions.${number}.beneficiary.memberId`\n | `transactions.${number}.beneficiary.wixUserId`\n | `transactions.${number}.status`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ query: query });\n\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\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface TransactionQuerySpec extends QuerySpec {\n paging: 'cursor';\n wql: [\n {\n fields: [\n '_createdDate',\n '_id',\n 'beneficiary.memberId',\n 'beneficiary.wixUserId',\n 'details.item._id',\n 'pool._id',\n 'relatedTransactionId'\n ];\n operators: '*';\n sort: 'BOTH';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n Transaction,\n TransactionQuerySpec\n>;\nexport type TransactionQuery = {\n /** \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 */\n cursorPaging?: {\n /** \n Maximum number of items to return. \n @max: 100 \n */\n limit?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit']\n | 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?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\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?: CommonQueryWithEntityContext['filter'] | null;\n /** \n List of sort objects. \n @maxSize: 5 \n */\n sort?: {\n /** \n Field to sort by. \n @maxLength: 512 \n */\n fieldName?: NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order. Use `ASC` for ascending order or `DESC` for descending order.\n\n Default: `ASC` \n */\n order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n }[];\n};\n\nexport const utils = {\n query: {\n ...createQueryUtils<Transaction, TransactionQuerySpec, TransactionQuery>(),\n },\n};\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction 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 migrationOptions: {\n optInTransformResponse: true,\n },\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 migrationOptions: {\n optInTransformResponse: true,\n },\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,EAAA;AAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,0BAAkC;AAClC,uBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,4DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SA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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;AA2LA,eAAsB,uBACpB,OAgBA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC,EAAE,MAAa,CAAC;AAEtE,QAAM,UACsC,kBAAkB,OAAO;AAErE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAA;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,OAAO,OAAO;AAAA,QAC1C,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,OAAO;AAAA,IACV;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AA2EO,IAAM,QAAQ;AAAA,EACnB,OAAO;AAAA,IACL,OAAG,6CAAsE;AAAA,EAC3E;AACF;","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 {\n HttpClient,\n HttpResponse,\n NonNullablePaths,\n QuerySpec,\n Query as QuerySdkType,\n} 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';\nimport { createQueryUtils } from '@wix/sdk-runtime/query-builder-utils';\n\nexport interface Transaction extends TransactionStatusDetailsOneOf {\n /**\n * Details of a failed transaction.\n * @internal\n */\n failedOptions?: FailedTransactionDetails;\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 * ID used to correlate this transaction with other related transactions.\n * @internal\n * @format GUID\n * @readonly\n */\n correlationId?: 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 * Originally requested transaction values\n * @internal\n * @readonly\n * @immutable\n */\n requestedValues?: RequestedValues;\n /**\n * External transaction ID.\n * @format GUID\n * @readonly\n * @immutable\n */\n externalId?: string | null;\n}\n\n/** @oneof */\nexport interface TransactionStatusDetailsOneOf {\n /**\n * Details of a failed transaction.\n * @internal\n */\n failedOptions?: FailedTransactionDetails;\n}\n\nexport interface PoolInfo {\n /**\n * Pool ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * ID of the pool definition the pool was created from.\n * @format GUID\n * @readonly\n */\n poolDefinitionId?: string | null;\n /**\n * ID of the program definition containing the pool definition the pool was created from.\n * @format GUID\n * @readonly\n */\n programDefinitionId?: string | null;\n /**\n * External ID of the program definition the pool was created from.\n * @format GUID\n * @readonly\n */\n externalProgramDefinitionId?: string | null;\n /**\n * ID of the program that contains the pool.\n * @format GUID\n * @readonly\n */\n programId?: string | null;\n /**\n * External ID of the program that contains the pool.\n * @format GUID\n * @readonly\n */\n externalProgramId?: 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 * Pool name\n * @maxLength 64\n * @readonly\n */\n displayName?: string | null;\n /**\n * Benefit name\n * @maxLength 40\n * @readonly\n */\n benefitDisplayName?: string | null;\n}\n\nexport enum BalanceType {\n /** In a pool's balance. */\n AVAILABLE = 'AVAILABLE',\n /**\n * Reserved balance.\n * @internal\n */\n RESERVED = 'RESERVED',\n /** Outside a pool's balance. */\n EXTERNAL = 'EXTERNAL',\n}\n\n/** @enumType */\nexport type BalanceTypeWithLiterals = BalanceType | 'AVAILABLE' | '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 * Identity type.\n * @internal\n * @readonly\n */\n identityType?: IdentityTypeWithLiterals;\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 /** 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 | '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 * Transaction origin. Indicates the source of the transaction.\n * @internal\n * @immutable\n * @maxLength 50\n */\n origin?: 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 DuplicateExternalIdErrorData {\n /**\n * The external id of the transaction\n * @format GUID\n */\n externalId?: string;\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 * The field mask to apply\n * @internal\n */\n fieldMask?: string[];\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 * When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by\n * a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.\n *\n * If multiple filters are provided, they are combined with AND operator.\n *\n * Example:\n * Given we have document like {\"id\": \"1\", \"nestedField\": [{\"price\": 10, \"region\": \"EU\"}, {\"price\": 20, \"region\": \"US\"}]}\n * and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be\n * { fieldName: \"nestedField.price\", \"select_items_by\": [{\"nestedField.region\": \"US\"}] }\n * @internal\n * @maxSize 10\n */\n selectItemsBy?: Record<string, any>[] | null;\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 HealTransactionRequest {\n /**\n * ID of the transaction whose enrichments should be re-materialized.\n * @format GUID\n */\n transactionId?: string;\n}\n\nexport interface HealTransactionResponse {}\n\nexport interface HealTransactionTenantRequest {}\n\nexport interface HealTransactionTenantResponse {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/**\n * Retrieves a transaction.\n * @param transactionId - ID of the transaction to retrieve.\n * @public\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 * @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 */\n eq: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'pool.id'\n | 'relatedTransactionId'\n | 'correlationId'\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 */\n ne: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'pool.id'\n | 'relatedTransactionId'\n | 'correlationId'\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 */\n ge: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'pool.id'\n | 'relatedTransactionId'\n | 'correlationId'\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 */\n gt: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'pool.id'\n | 'relatedTransactionId'\n | 'correlationId'\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 */\n le: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'pool.id'\n | 'relatedTransactionId'\n | 'correlationId'\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 */\n lt: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'pool.id'\n | 'relatedTransactionId'\n | 'correlationId'\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 */\n startsWith: (\n propertyName:\n | '_id'\n | 'pool.id'\n | 'relatedTransactionId'\n | 'correlationId'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.item.id',\n value: string\n ) => TransactionsQueryBuilder;\n in: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'pool.id'\n | 'relatedTransactionId'\n | 'correlationId'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.item.id',\n value: any\n ) => TransactionsQueryBuilder;\n exists: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'pool.id'\n | 'relatedTransactionId'\n | 'correlationId'\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 ascending: (\n ...propertyNames: Array<\n | '_id'\n | '_createdDate'\n | 'pool.id'\n | 'relatedTransactionId'\n | 'correlationId'\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 descending: (\n ...propertyNames: Array<\n | '_id'\n | '_createdDate'\n | 'pool.id'\n | 'relatedTransactionId'\n | 'correlationId'\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 limit: (limit: number) => TransactionsQueryBuilder;\n /** @param cursor - A pointer to specific record */\n skipTo: (cursor: string) => TransactionsQueryBuilder;\n find: () => Promise<TransactionsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.benefit_programs.v1.transaction.TransactionService.QueryTransactions\n * @requiredField query\n */\nexport async function typedQueryTransactions(\n query: TransactionQuery\n): Promise<\n NonNullablePaths<\n QueryTransactionsResponse,\n | `transactions`\n | `transactions.${number}.pool._id`\n | `transactions.${number}.amount`\n | `transactions.${number}.source`\n | `transactions.${number}.target`\n | `transactions.${number}.idempotencyKey`\n | `transactions.${number}.beneficiary.anonymousVisitorId`\n | `transactions.${number}.beneficiary.memberId`\n | `transactions.${number}.beneficiary.wixUserId`\n | `transactions.${number}.status`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ query: query });\n\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\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface TransactionQuerySpec extends QuerySpec {\n paging: 'cursor';\n wql: [\n {\n fields: [\n '_createdDate',\n '_id',\n 'beneficiary.memberId',\n 'beneficiary.wixUserId',\n 'correlationId',\n 'details.item._id',\n 'pool._id',\n 'relatedTransactionId'\n ];\n operators: '*';\n sort: 'BOTH';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n Transaction,\n TransactionQuerySpec\n>;\nexport type TransactionQuery = {\n /** \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 */\n cursorPaging?: {\n /** \n Maximum number of items to return. \n @max: 100 \n */\n limit?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit']\n | 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?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\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?: CommonQueryWithEntityContext['filter'] | null;\n /** \n List of sort objects. \n @maxSize: 5 \n */\n sort?: {\n /** \n Field to sort by. \n @maxLength: 512 \n */\n fieldName?: NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order. Use `ASC` for ascending order or `DESC` for descending order.\n\n Default: `ASC` \n */\n order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n /** \n When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by\n a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.\n\n If multiple filters are provided, they are combined with AND operator.\n\n Example:\n Given we have document like {\"id\": \"1\", \"nestedField\": [{\"price\": 10, \"region\": \"EU\"}, {\"price\": 20, \"region\": \"US\"}]}\n and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be\n { fieldName: \"nestedField.price\", \"select_items_by\": [{\"nestedField.region\": \"US\"}] } \n @internal: undefined,\n @maxSize: 10 \n */\n selectItemsBy?:\n | NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['selectItemsBy']\n | null;\n }[];\n};\n\nexport const utils = {\n query: /*#__PURE__*/ createQueryUtils<\n Transaction,\n TransactionQuerySpec,\n TransactionQuery\n >(),\n};\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction 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 migrationOptions: {\n optInTransformResponse: true,\n },\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 migrationOptions: {\n optInTransformResponse: true,\n },\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,EAAA;AAAA;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,U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sC;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;AAwLA,eAAsB,uBACpB,OAgBA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC,EAAE,MAAa,CAAC;AAEtE,QAAM,UACsC,kBAAkB,OAAO;AAErE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAA;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,OAAO,OAAO;AAAA,QAC1C,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,OAAO;AAAA,IACV;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AA8FO,IAAM,QAAQ;AAAA,EACnB,OAAqB,iEAInB;AACJ;","names":["getTransaction","queryTransactions","import_rest_modules","payload","import_transform_paths","BalanceType","IdentityType","TransactionStatus","SortOrder","WebhookIdentityType","getTransaction","sdkTransformError","queryTransactions"]}
|