@wix/auto_sdk_payments_balance-records 1.0.0
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.d.ts +48 -0
- package/build/cjs/index.js +495 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1081 -0
- package/build/cjs/index.typings.js +472 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1021 -0
- package/build/cjs/meta.js +444 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/schemas.d.ts +334 -0
- package/build/cjs/schemas.js +643 -0
- package/build/cjs/schemas.js.map +1 -0
- package/build/es/index.d.mts +48 -0
- package/build/es/index.mjs +462 -0
- package/build/es/index.mjs.map +1 -0
- package/build/es/index.typings.d.mts +1081 -0
- package/build/es/index.typings.mjs +439 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +1021 -0
- package/build/es/meta.mjs +408 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/schemas.d.mts +334 -0
- package/build/es/schemas.mjs +603 -0
- package/build/es/schemas.mjs.map +1 -0
- package/build/internal/cjs/index.d.ts +48 -0
- package/build/internal/cjs/index.js +495 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1081 -0
- package/build/internal/cjs/index.typings.js +472 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1021 -0
- package/build/internal/cjs/meta.js +444 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/schemas.d.ts +334 -0
- package/build/internal/cjs/schemas.js +643 -0
- package/build/internal/cjs/schemas.js.map +1 -0
- package/build/internal/es/index.d.mts +48 -0
- package/build/internal/es/index.mjs +462 -0
- package/build/internal/es/index.mjs.map +1 -0
- package/build/internal/es/index.typings.d.mts +1081 -0
- package/build/internal/es/index.typings.mjs +439 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +1021 -0
- package/build/internal/es/meta.mjs +408 -0
- package/build/internal/es/meta.mjs.map +1 -0
- package/build/internal/es/schemas.d.mts +334 -0
- package/build/internal/es/schemas.mjs +603 -0
- package/build/internal/es/schemas.mjs.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +61 -0
- package/schemas/package.json +3 -0
|
@@ -0,0 +1,495 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
BalanceRecordStatus: () => BalanceRecordStatus,
|
|
24
|
+
BalanceRecordTag: () => BalanceRecordTag,
|
|
25
|
+
BalanceRecordType: () => BalanceRecordType,
|
|
26
|
+
BalanceRecordsSummaryItemType: () => BalanceRecordsSummaryItemType,
|
|
27
|
+
PaymentMethodType: () => PaymentMethodType,
|
|
28
|
+
PeriodUnit: () => PeriodUnit,
|
|
29
|
+
ReserveType: () => ReserveType,
|
|
30
|
+
SortOrder: () => SortOrder,
|
|
31
|
+
getBalanceRecord: () => getBalanceRecord4,
|
|
32
|
+
queryBalanceRecords: () => queryBalanceRecords4
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(index_exports);
|
|
35
|
+
|
|
36
|
+
// src/payments-balances-v5-balance-record-balance-records.universal.ts
|
|
37
|
+
var import_transform_error = require("@wix/sdk-runtime/transform-error");
|
|
38
|
+
var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
39
|
+
|
|
40
|
+
// src/payments-balances-v5-balance-record-balance-records.http.ts
|
|
41
|
+
var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
|
|
42
|
+
var import_float = require("@wix/sdk-runtime/transformations/float");
|
|
43
|
+
var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
|
|
44
|
+
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
45
|
+
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
46
|
+
function resolveWixPaymentsV5BalancesBalanceRecordsServiceUrl(opts) {
|
|
47
|
+
const domainToMappings = {
|
|
48
|
+
"cronulla-jobs._base_domain_": [
|
|
49
|
+
{
|
|
50
|
+
srcPath: "/wix-payments/wixpay-balance-service/internal-api/jobs",
|
|
51
|
+
destPath: "/internal-api/jobs"
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"bo._base_domain_": [
|
|
55
|
+
{
|
|
56
|
+
srcPath: "/_api/wixpay-balance-service/v4/bo-balance-summary",
|
|
57
|
+
destPath: "/v4/bo-balance-summary"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
srcPath: "/_api/transaction-service/v4/bo-balance-summary",
|
|
61
|
+
destPath: "/v4/bo-balance-summary"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
srcPath: "/_api/wixpay-balance-service/v5/balance-records",
|
|
65
|
+
destPath: "/v5/balance-records"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
srcPath: "/_api/wixpay-balance-service/v5/balance-summary",
|
|
69
|
+
destPath: "/v5/balance-summary"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
srcPath: "/_api/transaction-service/v5/balance-records",
|
|
73
|
+
destPath: "/v5/balance-records"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
srcPath: "/_api/transaction-service/v5/balance-summary",
|
|
77
|
+
destPath: "/v5/balance-summary"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
srcPath: "/_api/wixpay-balance-service/v1/bo-balance-reserve-transactions",
|
|
81
|
+
destPath: "/v1/bo-balance-reserve-transactions"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
srcPath: "/_api/wixpay-balance-service/v1/bulk/bo-balance-reserve-transactions/update",
|
|
85
|
+
destPath: "/v1/bulk/bo-balance-reserve-transactions/update"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
srcPath: "/_api/wixpay-balance-service/v1/bulk/bo-balance-reserve-transactions/release",
|
|
89
|
+
destPath: "/v1/bulk/bo-balance-reserve-transactions/release"
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
"wixbo.ai": [
|
|
93
|
+
{
|
|
94
|
+
srcPath: "/_api/wixpay-balance-service/v4/bo-balance-summary",
|
|
95
|
+
destPath: "/v4/bo-balance-summary"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
srcPath: "/_api/transaction-service/v4/bo-balance-summary",
|
|
99
|
+
destPath: "/v4/bo-balance-summary"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
srcPath: "/_api/wixpay-balance-service/v5/balance-records",
|
|
103
|
+
destPath: "/v5/balance-records"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
srcPath: "/_api/wixpay-balance-service/v5/balance-summary",
|
|
107
|
+
destPath: "/v5/balance-summary"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
srcPath: "/_api/transaction-service/v5/balance-records",
|
|
111
|
+
destPath: "/v5/balance-records"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
srcPath: "/_api/transaction-service/v5/balance-summary",
|
|
115
|
+
destPath: "/v5/balance-summary"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
srcPath: "/_api/wixpay-balance-service/v1/bo-balance-reserve-transactions",
|
|
119
|
+
destPath: "/v1/bo-balance-reserve-transactions"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
srcPath: "/_api/wixpay-balance-service/v1/bulk/bo-balance-reserve-transactions/update",
|
|
123
|
+
destPath: "/v1/bulk/bo-balance-reserve-transactions/update"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
srcPath: "/_api/wixpay-balance-service/v1/bulk/bo-balance-reserve-transactions/release",
|
|
127
|
+
destPath: "/v1/bulk/bo-balance-reserve-transactions/release"
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"wix-bo.com": [
|
|
131
|
+
{
|
|
132
|
+
srcPath: "/_api/wixpay-balance-service/v4/bo-balance-summary",
|
|
133
|
+
destPath: "/v4/bo-balance-summary"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
srcPath: "/_api/transaction-service/v4/bo-balance-summary",
|
|
137
|
+
destPath: "/v4/bo-balance-summary"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
srcPath: "/_api/wixpay-balance-service/v5/balance-records",
|
|
141
|
+
destPath: "/v5/balance-records"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
srcPath: "/_api/wixpay-balance-service/v5/balance-summary",
|
|
145
|
+
destPath: "/v5/balance-summary"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
srcPath: "/_api/transaction-service/v5/balance-records",
|
|
149
|
+
destPath: "/v5/balance-records"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
srcPath: "/_api/transaction-service/v5/balance-summary",
|
|
153
|
+
destPath: "/v5/balance-summary"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
srcPath: "/_api/wixpay-balance-service/v1/bo-balance-reserve-transactions",
|
|
157
|
+
destPath: "/v1/bo-balance-reserve-transactions"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
srcPath: "/_api/wixpay-balance-service/v1/bulk/bo-balance-reserve-transactions/update",
|
|
161
|
+
destPath: "/v1/bulk/bo-balance-reserve-transactions/update"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
srcPath: "/_api/wixpay-balance-service/v1/bulk/bo-balance-reserve-transactions/release",
|
|
165
|
+
destPath: "/v1/bulk/bo-balance-reserve-transactions/release"
|
|
166
|
+
}
|
|
167
|
+
],
|
|
168
|
+
"manage._base_domain_": [
|
|
169
|
+
{
|
|
170
|
+
srcPath: "/_api/wixpay-balance-service/v5/balance-records",
|
|
171
|
+
destPath: "/v5/balance-records"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
srcPath: "/_api/wixpay-balance-service/v5/balance-summary",
|
|
175
|
+
destPath: "/v5/balance-summary"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
srcPath: "/_api/transaction-service/v5/balance-summary",
|
|
179
|
+
destPath: "/v5/balance-summary"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
srcPath: "/_api/transaction-service/v5/balance-records",
|
|
183
|
+
destPath: "/v5/balance-records"
|
|
184
|
+
}
|
|
185
|
+
],
|
|
186
|
+
"www._base_domain_": [
|
|
187
|
+
{
|
|
188
|
+
srcPath: "/wix-payments/balance-callbacks/paypal",
|
|
189
|
+
destPath: "/callbacks/paypal"
|
|
190
|
+
}
|
|
191
|
+
],
|
|
192
|
+
"manage.base44.com": [
|
|
193
|
+
{
|
|
194
|
+
srcPath: "/_api/wixpay-balance-service",
|
|
195
|
+
destPath: ""
|
|
196
|
+
}
|
|
197
|
+
],
|
|
198
|
+
"payments.base44.com": [
|
|
199
|
+
{
|
|
200
|
+
srcPath: "/_api/wixpay-balance-service",
|
|
201
|
+
destPath: ""
|
|
202
|
+
}
|
|
203
|
+
],
|
|
204
|
+
"www.wixapis.com": [
|
|
205
|
+
{
|
|
206
|
+
srcPath: "/wixpay-balances/v5/balance-records",
|
|
207
|
+
destPath: "/v5/balance-records"
|
|
208
|
+
}
|
|
209
|
+
]
|
|
210
|
+
};
|
|
211
|
+
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
212
|
+
}
|
|
213
|
+
var PACKAGE_NAME = "@wix/auto_sdk_payments_balance-records";
|
|
214
|
+
function getBalanceRecord(payload) {
|
|
215
|
+
function __getBalanceRecord({ host }) {
|
|
216
|
+
const metadata = {
|
|
217
|
+
entityFqdn: "wix.payments.balances.v5.balance_record",
|
|
218
|
+
method: "GET",
|
|
219
|
+
methodFqn: "wix.payments.v5.balances.BalanceRecordsService.GetBalanceRecord",
|
|
220
|
+
packageName: PACKAGE_NAME,
|
|
221
|
+
migrationOptions: {
|
|
222
|
+
optInTransformResponse: true
|
|
223
|
+
},
|
|
224
|
+
url: resolveWixPaymentsV5BalancesBalanceRecordsServiceUrl({
|
|
225
|
+
protoPath: "/v5/balance-records/{balanceRecordId}",
|
|
226
|
+
data: payload,
|
|
227
|
+
host
|
|
228
|
+
}),
|
|
229
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
230
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
231
|
+
{
|
|
232
|
+
transformFn: import_timestamp.transformRESTTimestampToSDKTimestamp,
|
|
233
|
+
paths: [
|
|
234
|
+
{ path: "record.appliedDate" },
|
|
235
|
+
{ path: "record.createdDate" },
|
|
236
|
+
{ path: "record.updatedDate" },
|
|
237
|
+
{ path: "record.paymentInfo.createdDate" },
|
|
238
|
+
{ path: "record.payoutInfo.createdDate" },
|
|
239
|
+
{ path: "record.reserveInfo.hold.createdDate" },
|
|
240
|
+
{ path: "record.reserveInfo.release.createdDate" },
|
|
241
|
+
{ path: "record.reserveInfo.reserveHistoryItems.createdDate" },
|
|
242
|
+
{ path: "record.bookTransferInfo.createdDate" }
|
|
243
|
+
]
|
|
244
|
+
}
|
|
245
|
+
])
|
|
246
|
+
};
|
|
247
|
+
return metadata;
|
|
248
|
+
}
|
|
249
|
+
return __getBalanceRecord;
|
|
250
|
+
}
|
|
251
|
+
function queryBalanceRecords(payload) {
|
|
252
|
+
function __queryBalanceRecords({ host }) {
|
|
253
|
+
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
254
|
+
{
|
|
255
|
+
transformFn: import_float.transformSDKFloatToRESTFloat,
|
|
256
|
+
paths: [
|
|
257
|
+
{ path: "query.sort.origin.latitude" },
|
|
258
|
+
{ path: "query.sort.origin.longitude" }
|
|
259
|
+
]
|
|
260
|
+
}
|
|
261
|
+
]);
|
|
262
|
+
const metadata = {
|
|
263
|
+
entityFqdn: "wix.payments.balances.v5.balance_record",
|
|
264
|
+
method: "POST",
|
|
265
|
+
methodFqn: "wix.payments.v5.balances.BalanceRecordsService.QueryBalanceRecords",
|
|
266
|
+
packageName: PACKAGE_NAME,
|
|
267
|
+
migrationOptions: {
|
|
268
|
+
optInTransformResponse: true
|
|
269
|
+
},
|
|
270
|
+
url: resolveWixPaymentsV5BalancesBalanceRecordsServiceUrl({
|
|
271
|
+
protoPath: "/v5/balance-records/query",
|
|
272
|
+
data: serializedData,
|
|
273
|
+
host
|
|
274
|
+
}),
|
|
275
|
+
data: serializedData,
|
|
276
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
277
|
+
{
|
|
278
|
+
transformFn: import_timestamp.transformRESTTimestampToSDKTimestamp,
|
|
279
|
+
paths: [
|
|
280
|
+
{ path: "records.appliedDate" },
|
|
281
|
+
{ path: "records.createdDate" },
|
|
282
|
+
{ path: "records.updatedDate" },
|
|
283
|
+
{ path: "records.paymentInfo.createdDate" },
|
|
284
|
+
{ path: "records.payoutInfo.createdDate" },
|
|
285
|
+
{ path: "records.reserveInfo.hold.createdDate" },
|
|
286
|
+
{ path: "records.reserveInfo.release.createdDate" },
|
|
287
|
+
{ path: "records.reserveInfo.reserveHistoryItems.createdDate" },
|
|
288
|
+
{ path: "records.bookTransferInfo.createdDate" }
|
|
289
|
+
]
|
|
290
|
+
}
|
|
291
|
+
])
|
|
292
|
+
};
|
|
293
|
+
return metadata;
|
|
294
|
+
}
|
|
295
|
+
return __queryBalanceRecords;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
// src/payments-balances-v5-balance-record-balance-records.universal.ts
|
|
299
|
+
var PaymentMethodType = /* @__PURE__ */ ((PaymentMethodType2) => {
|
|
300
|
+
PaymentMethodType2["UNKNOWN"] = "UNKNOWN";
|
|
301
|
+
PaymentMethodType2["CARD"] = "CARD";
|
|
302
|
+
PaymentMethodType2["CARD_READER"] = "CARD_READER";
|
|
303
|
+
PaymentMethodType2["ACH"] = "ACH";
|
|
304
|
+
PaymentMethodType2["APPLE_PAY"] = "APPLE_PAY";
|
|
305
|
+
PaymentMethodType2["BOLETO"] = "BOLETO";
|
|
306
|
+
PaymentMethodType2["GIROPAY"] = "GIROPAY";
|
|
307
|
+
PaymentMethodType2["IDEAL"] = "IDEAL";
|
|
308
|
+
PaymentMethodType2["PIX"] = "PIX";
|
|
309
|
+
PaymentMethodType2["SEPA"] = "SEPA";
|
|
310
|
+
PaymentMethodType2["SOFORT"] = "SOFORT";
|
|
311
|
+
PaymentMethodType2["PAY_PAL"] = "PAY_PAL";
|
|
312
|
+
PaymentMethodType2["TAP_TO_PAY"] = "TAP_TO_PAY";
|
|
313
|
+
PaymentMethodType2["GOOGLE_PAY"] = "GOOGLE_PAY";
|
|
314
|
+
PaymentMethodType2["AFFIRM"] = "AFFIRM";
|
|
315
|
+
PaymentMethodType2["AFTERPAY"] = "AFTERPAY";
|
|
316
|
+
PaymentMethodType2["KLARNA"] = "KLARNA";
|
|
317
|
+
PaymentMethodType2["RAZORPAY"] = "RAZORPAY";
|
|
318
|
+
PaymentMethodType2["ALIPAY"] = "ALIPAY";
|
|
319
|
+
PaymentMethodType2["BANCONTACT"] = "BANCONTACT";
|
|
320
|
+
PaymentMethodType2["US_BANK_ACCOUNT"] = "US_BANK_ACCOUNT";
|
|
321
|
+
PaymentMethodType2["BANKFUL_CRYPTO"] = "BANKFUL_CRYPTO";
|
|
322
|
+
PaymentMethodType2["BANKFUL"] = "BANKFUL";
|
|
323
|
+
PaymentMethodType2["TWINT"] = "TWINT";
|
|
324
|
+
return PaymentMethodType2;
|
|
325
|
+
})(PaymentMethodType || {});
|
|
326
|
+
var ReserveType = /* @__PURE__ */ ((ReserveType2) => {
|
|
327
|
+
ReserveType2["ONE_TIME"] = "ONE_TIME";
|
|
328
|
+
ReserveType2["ROLLING"] = "ROLLING";
|
|
329
|
+
return ReserveType2;
|
|
330
|
+
})(ReserveType || {});
|
|
331
|
+
var BalanceRecordType = /* @__PURE__ */ ((BalanceRecordType2) => {
|
|
332
|
+
BalanceRecordType2["UNKNOWN"] = "UNKNOWN";
|
|
333
|
+
BalanceRecordType2["CREDIT"] = "CREDIT";
|
|
334
|
+
BalanceRecordType2["REFUND"] = "REFUND";
|
|
335
|
+
BalanceRecordType2["CHARGEBACK"] = "CHARGEBACK";
|
|
336
|
+
BalanceRecordType2["REFUND_REVERSAL"] = "REFUND_REVERSAL";
|
|
337
|
+
BalanceRecordType2["CHARGEBACK_REVERSAL"] = "CHARGEBACK_REVERSAL";
|
|
338
|
+
BalanceRecordType2["RESERVE_HOLD"] = "RESERVE_HOLD";
|
|
339
|
+
BalanceRecordType2["RESERVE_RELEASE"] = "RESERVE_RELEASE";
|
|
340
|
+
BalanceRecordType2["TOPUP"] = "TOPUP";
|
|
341
|
+
BalanceRecordType2["CREDIT_FAILED"] = "CREDIT_FAILED";
|
|
342
|
+
BalanceRecordType2["CHARGEBACK_FEE"] = "CHARGEBACK_FEE";
|
|
343
|
+
BalanceRecordType2["CHARGEBACK_FEE_REVERSAL"] = "CHARGEBACK_FEE_REVERSAL";
|
|
344
|
+
BalanceRecordType2["CAPITAL_CASH_ADVANCE"] = "CAPITAL_CASH_ADVANCE";
|
|
345
|
+
BalanceRecordType2["CAPITAL_AUTOMATIC_REMITTANCE"] = "CAPITAL_AUTOMATIC_REMITTANCE";
|
|
346
|
+
BalanceRecordType2["CAPITAL_ADJUSTMENT"] = "CAPITAL_ADJUSTMENT";
|
|
347
|
+
return BalanceRecordType2;
|
|
348
|
+
})(BalanceRecordType || {});
|
|
349
|
+
var BalanceRecordStatus = /* @__PURE__ */ ((BalanceRecordStatus2) => {
|
|
350
|
+
BalanceRecordStatus2["UNKNOWN"] = "UNKNOWN";
|
|
351
|
+
BalanceRecordStatus2["PENDING_CREDIT"] = "PENDING_CREDIT";
|
|
352
|
+
BalanceRecordStatus2["CREDITED"] = "CREDITED";
|
|
353
|
+
BalanceRecordStatus2["RESERVED"] = "RESERVED";
|
|
354
|
+
BalanceRecordStatus2["PENDING_DEBIT"] = "PENDING_DEBIT";
|
|
355
|
+
BalanceRecordStatus2["DEBITED"] = "DEBITED";
|
|
356
|
+
BalanceRecordStatus2["PAID_OUT"] = "PAID_OUT";
|
|
357
|
+
BalanceRecordStatus2["DEDUCTED_FROM_PAYOUT"] = "DEDUCTED_FROM_PAYOUT";
|
|
358
|
+
BalanceRecordStatus2["PAYOUT_REVERSED"] = "PAYOUT_REVERSED";
|
|
359
|
+
return BalanceRecordStatus2;
|
|
360
|
+
})(BalanceRecordStatus || {});
|
|
361
|
+
var BalanceRecordTag = /* @__PURE__ */ ((BalanceRecordTag2) => {
|
|
362
|
+
BalanceRecordTag2["UNKNOWN"] = "UNKNOWN";
|
|
363
|
+
BalanceRecordTag2["AVAILABLE"] = "AVAILABLE";
|
|
364
|
+
BalanceRecordTag2["PENDING"] = "PENDING";
|
|
365
|
+
BalanceRecordTag2["RESERVE"] = "RESERVE";
|
|
366
|
+
BalanceRecordTag2["ESTIMATED_RESERVE_HOLD"] = "ESTIMATED_RESERVE_HOLD";
|
|
367
|
+
BalanceRecordTag2["ESTIMATED_RESERVE_RELEASE"] = "ESTIMATED_RESERVE_RELEASE";
|
|
368
|
+
BalanceRecordTag2["RESERVE_RELEASED"] = "RESERVE_RELEASED";
|
|
369
|
+
BalanceRecordTag2["PENDING_TOPUP"] = "PENDING_TOPUP";
|
|
370
|
+
BalanceRecordTag2["PAID_OUT"] = "PAID_OUT";
|
|
371
|
+
BalanceRecordTag2["NOT_PAID_OUT"] = "NOT_PAID_OUT";
|
|
372
|
+
return BalanceRecordTag2;
|
|
373
|
+
})(BalanceRecordTag || {});
|
|
374
|
+
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
375
|
+
SortOrder2["ASC"] = "ASC";
|
|
376
|
+
SortOrder2["DESC"] = "DESC";
|
|
377
|
+
return SortOrder2;
|
|
378
|
+
})(SortOrder || {});
|
|
379
|
+
var BalanceRecordsSummaryItemType = /* @__PURE__ */ ((BalanceRecordsSummaryItemType2) => {
|
|
380
|
+
BalanceRecordsSummaryItemType2["UNKNOWN"] = "UNKNOWN";
|
|
381
|
+
BalanceRecordsSummaryItemType2["CREDITS"] = "CREDITS";
|
|
382
|
+
BalanceRecordsSummaryItemType2["REFUNDS"] = "REFUNDS";
|
|
383
|
+
BalanceRecordsSummaryItemType2["CHARGEBACKS"] = "CHARGEBACKS";
|
|
384
|
+
BalanceRecordsSummaryItemType2["RESERVE_HOLDS"] = "RESERVE_HOLDS";
|
|
385
|
+
BalanceRecordsSummaryItemType2["RESERVE_RELEASES"] = "RESERVE_RELEASES";
|
|
386
|
+
BalanceRecordsSummaryItemType2["FUNDS_ADDED"] = "FUNDS_ADDED";
|
|
387
|
+
BalanceRecordsSummaryItemType2["FUNDS_TRANSFERRED"] = "FUNDS_TRANSFERRED";
|
|
388
|
+
BalanceRecordsSummaryItemType2["CAPITAL"] = "CAPITAL";
|
|
389
|
+
return BalanceRecordsSummaryItemType2;
|
|
390
|
+
})(BalanceRecordsSummaryItemType || {});
|
|
391
|
+
var PeriodUnit = /* @__PURE__ */ ((PeriodUnit2) => {
|
|
392
|
+
PeriodUnit2["UNKNOWN"] = "UNKNOWN";
|
|
393
|
+
PeriodUnit2["DAY"] = "DAY";
|
|
394
|
+
PeriodUnit2["BUSINESS_DAY"] = "BUSINESS_DAY";
|
|
395
|
+
return PeriodUnit2;
|
|
396
|
+
})(PeriodUnit || {});
|
|
397
|
+
async function getBalanceRecord2(balanceRecordId, accountId) {
|
|
398
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
399
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
400
|
+
balanceRecordId,
|
|
401
|
+
accountId
|
|
402
|
+
});
|
|
403
|
+
const reqOpts = getBalanceRecord(payload);
|
|
404
|
+
sideEffects?.onSiteCall?.();
|
|
405
|
+
try {
|
|
406
|
+
const result = await httpClient.request(reqOpts);
|
|
407
|
+
sideEffects?.onSuccess?.(result);
|
|
408
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.record;
|
|
409
|
+
} catch (err) {
|
|
410
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
411
|
+
err,
|
|
412
|
+
{
|
|
413
|
+
spreadPathsToArguments: {},
|
|
414
|
+
explicitPathsToArguments: {
|
|
415
|
+
balanceRecordId: "$[0]",
|
|
416
|
+
accountId: "$[1]"
|
|
417
|
+
},
|
|
418
|
+
singleArgumentUnchanged: false
|
|
419
|
+
},
|
|
420
|
+
["balanceRecordId", "accountId"]
|
|
421
|
+
);
|
|
422
|
+
sideEffects?.onError?.(err);
|
|
423
|
+
throw transformedError;
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
async function queryBalanceRecords2(accountId, options) {
|
|
427
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
428
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
429
|
+
accountId,
|
|
430
|
+
query: options?.query,
|
|
431
|
+
includeSummary: options?.includeSummary,
|
|
432
|
+
excludeTotal: options?.excludeTotal
|
|
433
|
+
});
|
|
434
|
+
const reqOpts = queryBalanceRecords(payload);
|
|
435
|
+
sideEffects?.onSiteCall?.();
|
|
436
|
+
try {
|
|
437
|
+
const result = await httpClient.request(reqOpts);
|
|
438
|
+
sideEffects?.onSuccess?.(result);
|
|
439
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
440
|
+
} catch (err) {
|
|
441
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
442
|
+
err,
|
|
443
|
+
{
|
|
444
|
+
spreadPathsToArguments: {},
|
|
445
|
+
explicitPathsToArguments: {
|
|
446
|
+
accountId: "$[0]",
|
|
447
|
+
query: "$[1].query",
|
|
448
|
+
includeSummary: "$[1].includeSummary",
|
|
449
|
+
excludeTotal: "$[1].excludeTotal"
|
|
450
|
+
},
|
|
451
|
+
singleArgumentUnchanged: false
|
|
452
|
+
},
|
|
453
|
+
["accountId", "options"]
|
|
454
|
+
);
|
|
455
|
+
sideEffects?.onError?.(err);
|
|
456
|
+
throw transformedError;
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
// src/payments-balances-v5-balance-record-balance-records.public.ts
|
|
461
|
+
function getBalanceRecord3(httpClient) {
|
|
462
|
+
return (balanceRecordId, accountId) => getBalanceRecord2(
|
|
463
|
+
balanceRecordId,
|
|
464
|
+
accountId,
|
|
465
|
+
// @ts-ignore
|
|
466
|
+
{ httpClient }
|
|
467
|
+
);
|
|
468
|
+
}
|
|
469
|
+
function queryBalanceRecords3(httpClient) {
|
|
470
|
+
return (accountId, options) => queryBalanceRecords2(
|
|
471
|
+
accountId,
|
|
472
|
+
options,
|
|
473
|
+
// @ts-ignore
|
|
474
|
+
{ httpClient }
|
|
475
|
+
);
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
// src/payments-balances-v5-balance-record-balance-records.context.ts
|
|
479
|
+
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
480
|
+
var getBalanceRecord4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getBalanceRecord3);
|
|
481
|
+
var queryBalanceRecords4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(queryBalanceRecords3);
|
|
482
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
483
|
+
0 && (module.exports = {
|
|
484
|
+
BalanceRecordStatus,
|
|
485
|
+
BalanceRecordTag,
|
|
486
|
+
BalanceRecordType,
|
|
487
|
+
BalanceRecordsSummaryItemType,
|
|
488
|
+
PaymentMethodType,
|
|
489
|
+
PeriodUnit,
|
|
490
|
+
ReserveType,
|
|
491
|
+
SortOrder,
|
|
492
|
+
getBalanceRecord,
|
|
493
|
+
queryBalanceRecords
|
|
494
|
+
});
|
|
495
|
+
//# sourceMappingURL=index.js.map
|