@delopay/sdk 0.385.0 → 0.388.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/dist/{chunk-UGIHA7A6.js → chunk-A6CXJOUK.js} +209 -7
- package/dist/chunk-A6CXJOUK.js.map +1 -0
- package/dist/{index-CkiG9mc1.d.cts → index-BSd4HpQq.d.cts} +270 -3
- package/dist/{index-CkiG9mc1.d.ts → index-BSd4HpQq.d.ts} +270 -3
- package/dist/index.cjs +210 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -1
- package/dist/internal.cjs +224 -6
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +56 -3
- package/dist/internal.d.ts +56 -3
- package/dist/internal.js +19 -1
- package/dist/internal.js.map +1 -1
- package/package.json +17 -19
- package/dist/chunk-UGIHA7A6.js.map +0 -1
package/dist/internal.cjs
CHANGED
|
@@ -150,6 +150,7 @@ __export(internal_exports, {
|
|
|
150
150
|
PANES_MAX: () => PANES_MAX,
|
|
151
151
|
PANE_CATEGORY_KEYS: () => PANE_CATEGORY_KEYS,
|
|
152
152
|
PANE_ICON_KEYS: () => PANE_ICON_KEYS,
|
|
153
|
+
PAYMENT_CURRENCIES: () => PAYMENT_CURRENCIES,
|
|
153
154
|
PAYPAL_CARD_LAYOUTS: () => PAYPAL_CARD_LAYOUTS,
|
|
154
155
|
PAYPAL_LABEL_STYLES: () => PAYPAL_LABEL_STYLES,
|
|
155
156
|
PRESENTATION_CONTRACT_VERSION: () => PRESENTATION_CONTRACT_VERSION,
|
|
@@ -292,6 +293,7 @@ __export(internal_exports, {
|
|
|
292
293
|
leaf: () => leaf,
|
|
293
294
|
logoDimensions: () => logoDimensions,
|
|
294
295
|
matchWhopLook: () => matchWhopLook,
|
|
296
|
+
metadataLeaf: () => metadataLeaf,
|
|
295
297
|
nativePaneMethodInfo: () => nativePaneMethodInfo,
|
|
296
298
|
nearestWhopAccent: () => nearestWhopAccent,
|
|
297
299
|
noticeText: () => noticeText,
|
|
@@ -4495,6 +4497,33 @@ var Routing = class {
|
|
|
4495
4497
|
{ body: params }
|
|
4496
4498
|
);
|
|
4497
4499
|
}
|
|
4500
|
+
/**
|
|
4501
|
+
* A shop's recurring time plan with its revision, the band active now, the
|
|
4502
|
+
* next change and each limit the plan releases in parts.
|
|
4503
|
+
*
|
|
4504
|
+
* `GET /routing/time-plans/{profileId}`
|
|
4505
|
+
*/
|
|
4506
|
+
async timePlan(profileId) {
|
|
4507
|
+
return this.request("GET", `/routing/time-plans/${encodeURIComponent(profileId)}`);
|
|
4508
|
+
}
|
|
4509
|
+
/**
|
|
4510
|
+
* Replace a shop's whole time plan using its last-read revision; `plan`
|
|
4511
|
+
* null removes it. Usage, reservations and dated limit entries are left as
|
|
4512
|
+
* they are. Overlapping bands, shares that do not total 100 and a stale
|
|
4513
|
+
* revision are refused by the server. Capability preflight refuses a
|
|
4514
|
+
* backend that would not apply the plan before anything is sent.
|
|
4515
|
+
*
|
|
4516
|
+
* `PUT /routing/time-plans/{profileId}`
|
|
4517
|
+
*/
|
|
4518
|
+
async setTimePlan(profileId, params) {
|
|
4519
|
+
const caps = await this.connectorCaps(profileId);
|
|
4520
|
+
if (!caps.features?.includes("time_plans")) {
|
|
4521
|
+
throw new Error("Time plans are unsupported by the serving backend");
|
|
4522
|
+
}
|
|
4523
|
+
return this.request("PUT", `/routing/time-plans/${encodeURIComponent(profileId)}`, {
|
|
4524
|
+
body: { revision: params.revision, plan: params.plan }
|
|
4525
|
+
});
|
|
4526
|
+
}
|
|
4498
4527
|
/**
|
|
4499
4528
|
* The live `routing_volume` counters behind a shop's active advanced
|
|
4500
4529
|
* program: one per distinct budget the program reads, each with the window
|
|
@@ -12085,6 +12114,14 @@ function leaf(lhs, comparison, value) {
|
|
|
12085
12114
|
const tagged = typeof value === "number" ? { type: "number", value } : { type: "enum_variant", value };
|
|
12086
12115
|
return { kind: "leaf", lhs, comparison, value: tagged };
|
|
12087
12116
|
}
|
|
12117
|
+
function metadataLeaf(key, comparison, value) {
|
|
12118
|
+
return {
|
|
12119
|
+
kind: "leaf",
|
|
12120
|
+
lhs: "metadata",
|
|
12121
|
+
comparison,
|
|
12122
|
+
value: { type: "metadata_variant", value: { key, value } }
|
|
12123
|
+
};
|
|
12124
|
+
}
|
|
12088
12125
|
function allOf(...children) {
|
|
12089
12126
|
return { kind: "all", children };
|
|
12090
12127
|
}
|
|
@@ -12196,7 +12233,8 @@ function programToTree(program) {
|
|
|
12196
12233
|
rules: program.rules.map((r) => ({
|
|
12197
12234
|
name: r.name,
|
|
12198
12235
|
match: ruleMatchToTree(r.statements),
|
|
12199
|
-
fee: r.connectorSelection.fee ?? null
|
|
12236
|
+
fee: r.connectorSelection.fee ?? null,
|
|
12237
|
+
schedule: r.connectorSelection.schedule ?? null
|
|
12200
12238
|
})),
|
|
12201
12239
|
otherwise: program.defaultSelection.fee ?? null
|
|
12202
12240
|
};
|
|
@@ -12210,11 +12248,11 @@ var FeeProgramBuilder = class {
|
|
|
12210
12248
|
rule(input) {
|
|
12211
12249
|
if (input.match) assertNoEmptyAnyOf(input.match);
|
|
12212
12250
|
const statements = input.match ? encodeStatements(input.match) : [{ condition: buildConditions(input.when, input.rawConditions) }];
|
|
12213
|
-
|
|
12214
|
-
|
|
12215
|
-
|
|
12216
|
-
|
|
12217
|
-
});
|
|
12251
|
+
const connectorSelection = {
|
|
12252
|
+
fee: toFeeOutput(input.fee)
|
|
12253
|
+
};
|
|
12254
|
+
if (input.schedule !== void 0) connectorSelection.schedule = input.schedule;
|
|
12255
|
+
this.rules.push({ name: input.name, connectorSelection, statements });
|
|
12218
12256
|
return this;
|
|
12219
12257
|
}
|
|
12220
12258
|
/** Set the default selection (applied when no rule matches). */
|
|
@@ -12235,6 +12273,170 @@ function feeProgram() {
|
|
|
12235
12273
|
return new FeeProgramBuilder();
|
|
12236
12274
|
}
|
|
12237
12275
|
|
|
12276
|
+
// src/currencies.ts
|
|
12277
|
+
var PAYMENT_CURRENCIES = [
|
|
12278
|
+
"AED",
|
|
12279
|
+
"AFN",
|
|
12280
|
+
"ALL",
|
|
12281
|
+
"AMD",
|
|
12282
|
+
"ANG",
|
|
12283
|
+
"AOA",
|
|
12284
|
+
"ARS",
|
|
12285
|
+
"AUD",
|
|
12286
|
+
"AWG",
|
|
12287
|
+
"AZN",
|
|
12288
|
+
"BAM",
|
|
12289
|
+
"BBD",
|
|
12290
|
+
"BDT",
|
|
12291
|
+
"BGN",
|
|
12292
|
+
"BHD",
|
|
12293
|
+
"BIF",
|
|
12294
|
+
"BMD",
|
|
12295
|
+
"BND",
|
|
12296
|
+
"BOB",
|
|
12297
|
+
"BRL",
|
|
12298
|
+
"BSD",
|
|
12299
|
+
"BTN",
|
|
12300
|
+
"BWP",
|
|
12301
|
+
"BYN",
|
|
12302
|
+
"BZD",
|
|
12303
|
+
"CAD",
|
|
12304
|
+
"CDF",
|
|
12305
|
+
"CHF",
|
|
12306
|
+
"CLF",
|
|
12307
|
+
"CLP",
|
|
12308
|
+
"CNY",
|
|
12309
|
+
"COP",
|
|
12310
|
+
"CRC",
|
|
12311
|
+
"CUC",
|
|
12312
|
+
"CUP",
|
|
12313
|
+
"CVE",
|
|
12314
|
+
"CZK",
|
|
12315
|
+
"DJF",
|
|
12316
|
+
"DKK",
|
|
12317
|
+
"DOP",
|
|
12318
|
+
"DZD",
|
|
12319
|
+
"EGP",
|
|
12320
|
+
"ERN",
|
|
12321
|
+
"ETB",
|
|
12322
|
+
"EUR",
|
|
12323
|
+
"FJD",
|
|
12324
|
+
"FKP",
|
|
12325
|
+
"GBP",
|
|
12326
|
+
"GEL",
|
|
12327
|
+
"GHS",
|
|
12328
|
+
"GIP",
|
|
12329
|
+
"GMD",
|
|
12330
|
+
"GNF",
|
|
12331
|
+
"GTQ",
|
|
12332
|
+
"GYD",
|
|
12333
|
+
"HKD",
|
|
12334
|
+
"HNL",
|
|
12335
|
+
"HRK",
|
|
12336
|
+
"HTG",
|
|
12337
|
+
"HUF",
|
|
12338
|
+
"IDR",
|
|
12339
|
+
"ILS",
|
|
12340
|
+
"INR",
|
|
12341
|
+
"IQD",
|
|
12342
|
+
"IRR",
|
|
12343
|
+
"ISK",
|
|
12344
|
+
"JMD",
|
|
12345
|
+
"JOD",
|
|
12346
|
+
"JPY",
|
|
12347
|
+
"KES",
|
|
12348
|
+
"KGS",
|
|
12349
|
+
"KHR",
|
|
12350
|
+
"KMF",
|
|
12351
|
+
"KPW",
|
|
12352
|
+
"KRW",
|
|
12353
|
+
"KWD",
|
|
12354
|
+
"KYD",
|
|
12355
|
+
"KZT",
|
|
12356
|
+
"LAK",
|
|
12357
|
+
"LBP",
|
|
12358
|
+
"LKR",
|
|
12359
|
+
"LRD",
|
|
12360
|
+
"LSL",
|
|
12361
|
+
"LYD",
|
|
12362
|
+
"MAD",
|
|
12363
|
+
"MDL",
|
|
12364
|
+
"MGA",
|
|
12365
|
+
"MKD",
|
|
12366
|
+
"MMK",
|
|
12367
|
+
"MNT",
|
|
12368
|
+
"MOP",
|
|
12369
|
+
"MRU",
|
|
12370
|
+
"MUR",
|
|
12371
|
+
"MVR",
|
|
12372
|
+
"MWK",
|
|
12373
|
+
"MXN",
|
|
12374
|
+
"MYR",
|
|
12375
|
+
"MZN",
|
|
12376
|
+
"NAD",
|
|
12377
|
+
"NGN",
|
|
12378
|
+
"NIO",
|
|
12379
|
+
"NOK",
|
|
12380
|
+
"NPR",
|
|
12381
|
+
"NZD",
|
|
12382
|
+
"OMR",
|
|
12383
|
+
"PAB",
|
|
12384
|
+
"PEN",
|
|
12385
|
+
"PGK",
|
|
12386
|
+
"PHP",
|
|
12387
|
+
"PKR",
|
|
12388
|
+
"PLN",
|
|
12389
|
+
"PYG",
|
|
12390
|
+
"QAR",
|
|
12391
|
+
"RON",
|
|
12392
|
+
"RSD",
|
|
12393
|
+
"RUB",
|
|
12394
|
+
"RWF",
|
|
12395
|
+
"SAR",
|
|
12396
|
+
"SBD",
|
|
12397
|
+
"SCR",
|
|
12398
|
+
"SDG",
|
|
12399
|
+
"SEK",
|
|
12400
|
+
"SGD",
|
|
12401
|
+
"SHP",
|
|
12402
|
+
"SLE",
|
|
12403
|
+
"SLL",
|
|
12404
|
+
"SOS",
|
|
12405
|
+
"SRD",
|
|
12406
|
+
"SSP",
|
|
12407
|
+
"STD",
|
|
12408
|
+
"STN",
|
|
12409
|
+
"SVC",
|
|
12410
|
+
"SYP",
|
|
12411
|
+
"SZL",
|
|
12412
|
+
"THB",
|
|
12413
|
+
"TJS",
|
|
12414
|
+
"TMT",
|
|
12415
|
+
"TND",
|
|
12416
|
+
"TOP",
|
|
12417
|
+
"TRY",
|
|
12418
|
+
"TTD",
|
|
12419
|
+
"TWD",
|
|
12420
|
+
"TZS",
|
|
12421
|
+
"UAH",
|
|
12422
|
+
"UGX",
|
|
12423
|
+
"USD",
|
|
12424
|
+
"UYU",
|
|
12425
|
+
"UZS",
|
|
12426
|
+
"VES",
|
|
12427
|
+
"VND",
|
|
12428
|
+
"VUV",
|
|
12429
|
+
"WST",
|
|
12430
|
+
"XAF",
|
|
12431
|
+
"XCD",
|
|
12432
|
+
"XOF",
|
|
12433
|
+
"XPF",
|
|
12434
|
+
"YER",
|
|
12435
|
+
"ZAR",
|
|
12436
|
+
"ZMW",
|
|
12437
|
+
"ZWL"
|
|
12438
|
+
];
|
|
12439
|
+
|
|
12238
12440
|
// src/airwallexCard.ts
|
|
12239
12441
|
var AIRWALLEX_CARD_PRESETS = [
|
|
12240
12442
|
"single_row",
|
|
@@ -18948,6 +19150,20 @@ var AdminSupport = class {
|
|
|
18948
19150
|
query: query === void 0 ? void 0 : { ...query }
|
|
18949
19151
|
});
|
|
18950
19152
|
}
|
|
19153
|
+
/**
|
|
19154
|
+
* Open a conversation towards a merchant, one of its shops or one of its members,
|
|
19155
|
+
* with a first message from the support team. `POST /admin-portal/support/conversations`
|
|
19156
|
+
*/
|
|
19157
|
+
async create(body) {
|
|
19158
|
+
return this.request("POST", "/admin-portal/support/conversations", { body });
|
|
19159
|
+
}
|
|
19160
|
+
/**
|
|
19161
|
+
* The members of a merchant a message can be addressed to, with whether their role
|
|
19162
|
+
* opens the support page. `GET /admin-portal/support/recipients`
|
|
19163
|
+
*/
|
|
19164
|
+
async recipients(query) {
|
|
19165
|
+
return this.request("GET", "/admin-portal/support/recipients", { query: { ...query } });
|
|
19166
|
+
}
|
|
18951
19167
|
/** One conversation. `GET /admin-portal/support/conversations/{id}` */
|
|
18952
19168
|
async retrieve(id) {
|
|
18953
19169
|
return this.request("GET", path3(id));
|
|
@@ -19927,6 +20143,7 @@ var DelopayInternal = class extends Delopay {
|
|
|
19927
20143
|
PANES_MAX,
|
|
19928
20144
|
PANE_CATEGORY_KEYS,
|
|
19929
20145
|
PANE_ICON_KEYS,
|
|
20146
|
+
PAYMENT_CURRENCIES,
|
|
19930
20147
|
PAYPAL_CARD_LAYOUTS,
|
|
19931
20148
|
PAYPAL_LABEL_STYLES,
|
|
19932
20149
|
PRESENTATION_CONTRACT_VERSION,
|
|
@@ -20069,6 +20286,7 @@ var DelopayInternal = class extends Delopay {
|
|
|
20069
20286
|
leaf,
|
|
20070
20287
|
logoDimensions,
|
|
20071
20288
|
matchWhopLook,
|
|
20289
|
+
metadataLeaf,
|
|
20072
20290
|
nativePaneMethodInfo,
|
|
20073
20291
|
nearestWhopAccent,
|
|
20074
20292
|
noticeText,
|