@delopay/sdk 0.255.0 → 0.261.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-U3KDAIWB.js → chunk-BPDN5AIB.js} +214 -1
- package/dist/chunk-BPDN5AIB.js.map +1 -0
- package/dist/index.cjs +214 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +644 -1
- package/dist/index.d.ts +644 -1
- package/dist/index.js +3 -1
- package/dist/internal.cjs +214 -0
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +3 -1
- package/dist/internal.js.map +1 -1
- package/package.json +18 -17
- package/dist/chunk-U3KDAIWB.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
BRANDING_EXPORT_VERSION,
|
|
23
23
|
BUILTIN_PAYMENT_ICON_KEYS,
|
|
24
24
|
BuyerBlocklist,
|
|
25
|
+
BuyerConversations,
|
|
25
26
|
CARD_FIELD_CHROMES,
|
|
26
27
|
CARD_FIELD_FONT_SIZES,
|
|
27
28
|
CARD_FIELD_WEIGHTS,
|
|
@@ -248,7 +249,7 @@ import {
|
|
|
248
249
|
visibleCustomFields,
|
|
249
250
|
whopAccentSwatch,
|
|
250
251
|
whopCardElement
|
|
251
|
-
} from "./chunk-
|
|
252
|
+
} from "./chunk-BPDN5AIB.js";
|
|
252
253
|
export {
|
|
253
254
|
AIRWALLEX_AUTOFILL_TREATMENTS,
|
|
254
255
|
AIRWALLEX_CARD_LAYOUTS,
|
|
@@ -273,6 +274,7 @@ export {
|
|
|
273
274
|
BRANDING_EXPORT_VERSION,
|
|
274
275
|
BUILTIN_PAYMENT_ICON_KEYS,
|
|
275
276
|
BuyerBlocklist,
|
|
277
|
+
BuyerConversations,
|
|
276
278
|
CARD_FIELD_CHROMES,
|
|
277
279
|
CARD_FIELD_FONT_SIZES,
|
|
278
280
|
CARD_FIELD_WEIGHTS,
|
package/dist/internal.cjs
CHANGED
|
@@ -46,6 +46,7 @@ __export(internal_exports, {
|
|
|
46
46
|
BRANDING_EXPORT_VERSION: () => BRANDING_EXPORT_VERSION,
|
|
47
47
|
BUILTIN_PAYMENT_ICON_KEYS: () => BUILTIN_PAYMENT_ICON_KEYS,
|
|
48
48
|
BuyerBlocklist: () => BuyerBlocklist,
|
|
49
|
+
BuyerConversations: () => BuyerConversations,
|
|
49
50
|
CARD_FIELD_CHROMES: () => CARD_FIELD_CHROMES,
|
|
50
51
|
CARD_FIELD_FONT_SIZES: () => CARD_FIELD_FONT_SIZES,
|
|
51
52
|
CARD_FIELD_WEIGHTS: () => CARD_FIELD_WEIGHTS,
|
|
@@ -5843,6 +5844,73 @@ var BuyerBlocklist = class {
|
|
|
5843
5844
|
}
|
|
5844
5845
|
};
|
|
5845
5846
|
|
|
5847
|
+
// src/resources/buyerConversations.ts
|
|
5848
|
+
var BuyerConversations = class {
|
|
5849
|
+
constructor(request) {
|
|
5850
|
+
this.request = request;
|
|
5851
|
+
}
|
|
5852
|
+
/**
|
|
5853
|
+
* One page of the inbox, the latest message first, filtered by shop,
|
|
5854
|
+
* status, assignee, mode or buyer. `GET /buyer-conversations`
|
|
5855
|
+
*/
|
|
5856
|
+
async list(params) {
|
|
5857
|
+
return this.request("GET", "/buyer-conversations", {
|
|
5858
|
+
query: params
|
|
5859
|
+
});
|
|
5860
|
+
}
|
|
5861
|
+
/**
|
|
5862
|
+
* Starts the conversation with a buyer at one shop, or adds to the one that
|
|
5863
|
+
* exists, with a first message. `POST /buyer-conversations`
|
|
5864
|
+
*/
|
|
5865
|
+
async start(params) {
|
|
5866
|
+
return this.request("POST", "/buyer-conversations", { body: params });
|
|
5867
|
+
}
|
|
5868
|
+
/**
|
|
5869
|
+
* One conversation and its newest messages, oldest first; `before` pages
|
|
5870
|
+
* back. `GET /buyer-conversations/{id}`
|
|
5871
|
+
*/
|
|
5872
|
+
async retrieve(id, params) {
|
|
5873
|
+
return this.request("GET", `/buyer-conversations/${encodeURIComponent(id)}`, {
|
|
5874
|
+
query: params
|
|
5875
|
+
});
|
|
5876
|
+
}
|
|
5877
|
+
/**
|
|
5878
|
+
* A team member's answer. A closed conversation refuses it.
|
|
5879
|
+
* `POST /buyer-conversations/{id}/messages`
|
|
5880
|
+
*/
|
|
5881
|
+
async reply(id, params) {
|
|
5882
|
+
return this.request("POST", `/buyer-conversations/${encodeURIComponent(id)}/messages`, {
|
|
5883
|
+
body: params
|
|
5884
|
+
});
|
|
5885
|
+
}
|
|
5886
|
+
/**
|
|
5887
|
+
* The team has read the conversation up to its last accepted message.
|
|
5888
|
+
* `POST /buyer-conversations/{id}/read`
|
|
5889
|
+
*/
|
|
5890
|
+
async markRead(id) {
|
|
5891
|
+
return this.request("POST", `/buyer-conversations/${encodeURIComponent(id)}/read`);
|
|
5892
|
+
}
|
|
5893
|
+
/**
|
|
5894
|
+
* Hands the conversation to a team member, to the caller with `me`, or to
|
|
5895
|
+
* nobody with `null`. `POST /buyer-conversations/{id}/assign`
|
|
5896
|
+
*/
|
|
5897
|
+
async assign(id, params) {
|
|
5898
|
+
return this.request("POST", `/buyer-conversations/${encodeURIComponent(id)}/assign`, {
|
|
5899
|
+
body: params
|
|
5900
|
+
});
|
|
5901
|
+
}
|
|
5902
|
+
/**
|
|
5903
|
+
* Closes or reopens the conversation. Closing moves no money and decides
|
|
5904
|
+
* no case; it stops new messages until reopened.
|
|
5905
|
+
* `POST /buyer-conversations/{id}/status`
|
|
5906
|
+
*/
|
|
5907
|
+
async setStatus(id, params) {
|
|
5908
|
+
return this.request("POST", `/buyer-conversations/${encodeURIComponent(id)}/status`, {
|
|
5909
|
+
body: params
|
|
5910
|
+
});
|
|
5911
|
+
}
|
|
5912
|
+
};
|
|
5913
|
+
|
|
5846
5914
|
// src/resources/checkoutRecovery.ts
|
|
5847
5915
|
var CheckoutRecovery = class {
|
|
5848
5916
|
constructor(request) {
|
|
@@ -7428,6 +7496,108 @@ var BuyerAccount = class {
|
|
|
7428
7496
|
...options
|
|
7429
7497
|
});
|
|
7430
7498
|
}
|
|
7499
|
+
/**
|
|
7500
|
+
* The shops the buyer has purchases at, once each and by name. Pass a
|
|
7501
|
+
* shop's `shop` to `listPurchases` to list only that shop's purchases.
|
|
7502
|
+
*/
|
|
7503
|
+
async listShops(options) {
|
|
7504
|
+
return this.request("GET", "/buyer-account/shops", { ...options });
|
|
7505
|
+
}
|
|
7506
|
+
/**
|
|
7507
|
+
* The buyer's subscriptions across shops, newest first. A record the buyer
|
|
7508
|
+
* has not confirmed shows what a receipt carries, without its period or
|
|
7509
|
+
* cancellation.
|
|
7510
|
+
*/
|
|
7511
|
+
async listSubscriptions(query, options) {
|
|
7512
|
+
return this.request("GET", "/buyer-account/subscriptions", {
|
|
7513
|
+
query,
|
|
7514
|
+
...options
|
|
7515
|
+
});
|
|
7516
|
+
}
|
|
7517
|
+
/**
|
|
7518
|
+
* The issued invoices of the records the buyer has confirmed through a
|
|
7519
|
+
* shop's own link, newest first. `unconfirmed_records` says when records
|
|
7520
|
+
* were left out.
|
|
7521
|
+
*/
|
|
7522
|
+
async listInvoices(query, options) {
|
|
7523
|
+
return this.request("GET", "/buyer-account/invoices", {
|
|
7524
|
+
query,
|
|
7525
|
+
...options
|
|
7526
|
+
});
|
|
7527
|
+
}
|
|
7528
|
+
/** The refund requests of the records the buyer has confirmed, newest first, with the shop's decision. */
|
|
7529
|
+
async listRefundRequests(query, options) {
|
|
7530
|
+
return this.request("GET", "/buyer-account/refund-requests", {
|
|
7531
|
+
query,
|
|
7532
|
+
...options
|
|
7533
|
+
});
|
|
7534
|
+
}
|
|
7535
|
+
/**
|
|
7536
|
+
* The cases of the records the buyer has confirmed: the refund requests
|
|
7537
|
+
* they sent and the disputes about their purchases, newest first, with
|
|
7538
|
+
* where each stands, who acts next, the outcome and the recorded steps.
|
|
7539
|
+
*/
|
|
7540
|
+
async listCases(query, options) {
|
|
7541
|
+
return this.request("GET", "/buyer-account/cases", {
|
|
7542
|
+
query,
|
|
7543
|
+
...options
|
|
7544
|
+
});
|
|
7545
|
+
}
|
|
7546
|
+
/**
|
|
7547
|
+
* The conversations of the records the buyer has confirmed, the latest
|
|
7548
|
+
* message first. `unconfirmed_records` says when other records were left out.
|
|
7549
|
+
*/
|
|
7550
|
+
async listConversations(query, options) {
|
|
7551
|
+
return this.request("GET", "/buyer-account/conversations", {
|
|
7552
|
+
query,
|
|
7553
|
+
...options
|
|
7554
|
+
});
|
|
7555
|
+
}
|
|
7556
|
+
/**
|
|
7557
|
+
* The conversation of a confirmed record with one shop, and its newest
|
|
7558
|
+
* messages, oldest first; `before` pages back. `shop` is required here.
|
|
7559
|
+
*/
|
|
7560
|
+
async listRecordMessages(record, query, options) {
|
|
7561
|
+
return this.request("GET", `/buyer-account/records/${encodeURIComponent(record)}/messages`, {
|
|
7562
|
+
query,
|
|
7563
|
+
...options
|
|
7564
|
+
});
|
|
7565
|
+
}
|
|
7566
|
+
/**
|
|
7567
|
+
* A message from a confirmed record to one of its shops. Sending again with
|
|
7568
|
+
* the same `client_message_id` returns the message the first send stored.
|
|
7569
|
+
*/
|
|
7570
|
+
async sendRecordMessage(record, message, options) {
|
|
7571
|
+
return this.request("POST", `/buyer-account/records/${encodeURIComponent(record)}/messages`, {
|
|
7572
|
+
body: message,
|
|
7573
|
+
...options
|
|
7574
|
+
});
|
|
7575
|
+
}
|
|
7576
|
+
/**
|
|
7577
|
+
* The buyer has read a record's conversation with one shop up to its last
|
|
7578
|
+
* accepted message. Answers with the buyer's conversations as they now stand.
|
|
7579
|
+
*/
|
|
7580
|
+
async markRecordMessagesRead(record, query, options) {
|
|
7581
|
+
return this.request(
|
|
7582
|
+
"POST",
|
|
7583
|
+
`/buyer-account/records/${encodeURIComponent(record)}/messages/read`,
|
|
7584
|
+
{
|
|
7585
|
+
query,
|
|
7586
|
+
...options
|
|
7587
|
+
}
|
|
7588
|
+
);
|
|
7589
|
+
}
|
|
7590
|
+
/**
|
|
7591
|
+
* What the buyer spent in a period: paid purchases summed per currency,
|
|
7592
|
+
* never converted, for the whole period, per day, week or month, per shop
|
|
7593
|
+
* and per kind of purchase.
|
|
7594
|
+
*/
|
|
7595
|
+
async analytics(query, options) {
|
|
7596
|
+
return this.request("GET", "/buyer-account/analytics", {
|
|
7597
|
+
query,
|
|
7598
|
+
...options
|
|
7599
|
+
});
|
|
7600
|
+
}
|
|
7431
7601
|
/**
|
|
7432
7602
|
* Confirm the record of a shop's customer portal link for the signed-in
|
|
7433
7603
|
* buyer. The link's customer must carry the address the buyer signed in
|
|
@@ -7456,6 +7626,48 @@ var BuyerPortal = class {
|
|
|
7456
7626
|
async getSession(options) {
|
|
7457
7627
|
return this.request("GET", "/buyer-portal/session", { ...options });
|
|
7458
7628
|
}
|
|
7629
|
+
/**
|
|
7630
|
+
* The buyer's cases at the shop: the refund requests they sent and the
|
|
7631
|
+
* disputes about their purchases, newest first, with where each stands, who
|
|
7632
|
+
* acts next, the outcome and the recorded steps.
|
|
7633
|
+
*/
|
|
7634
|
+
async listCases(options) {
|
|
7635
|
+
return this.request("GET", "/buyer-portal/cases", { ...options });
|
|
7636
|
+
}
|
|
7637
|
+
/**
|
|
7638
|
+
* The buyer's conversations with the shop, the latest message first. A
|
|
7639
|
+
* portal link for the whole merchant lists one per shop and mode.
|
|
7640
|
+
*/
|
|
7641
|
+
async listConversations(options) {
|
|
7642
|
+
return this.request("GET", "/buyer-portal/conversations", { ...options });
|
|
7643
|
+
}
|
|
7644
|
+
/**
|
|
7645
|
+
* The conversation with one shop and its newest messages, oldest first;
|
|
7646
|
+
* `before` pages back. A link issued for one shop may leave `shop` out.
|
|
7647
|
+
*/
|
|
7648
|
+
async listMessages(query, options) {
|
|
7649
|
+
return this.request("GET", "/buyer-portal/messages", {
|
|
7650
|
+
query,
|
|
7651
|
+
...options
|
|
7652
|
+
});
|
|
7653
|
+
}
|
|
7654
|
+
/**
|
|
7655
|
+
* A message to the shop. Sending again with the same `client_message_id`
|
|
7656
|
+
* returns the message the first send stored; a closed conversation refuses it.
|
|
7657
|
+
*/
|
|
7658
|
+
async sendMessage(message, options) {
|
|
7659
|
+
return this.request("POST", "/buyer-portal/messages", { body: message, ...options });
|
|
7660
|
+
}
|
|
7661
|
+
/**
|
|
7662
|
+
* The buyer has read the conversation with the shop up to its last accepted
|
|
7663
|
+
* message. Answers with the buyer's conversations as they now stand.
|
|
7664
|
+
*/
|
|
7665
|
+
async markMessagesRead(query, options) {
|
|
7666
|
+
return this.request("POST", "/buyer-portal/messages/read", {
|
|
7667
|
+
query,
|
|
7668
|
+
...options
|
|
7669
|
+
});
|
|
7670
|
+
}
|
|
7459
7671
|
/** The buyer's contact and billing details, and what they may change. */
|
|
7460
7672
|
async getProfile(options) {
|
|
7461
7673
|
return this.request("GET", "/buyer-portal/profile", { ...options });
|
|
@@ -8583,6 +8795,7 @@ var Delopay = class {
|
|
|
8583
8795
|
this.availabilityOverrides = new AvailabilityOverrides(request);
|
|
8584
8796
|
this.sellToRestrictions = new SellToRestrictions(request);
|
|
8585
8797
|
this.buyerBlocklist = new BuyerBlocklist(request);
|
|
8798
|
+
this.buyerConversations = new BuyerConversations(request);
|
|
8586
8799
|
this.checkoutRecovery = new CheckoutRecovery(request);
|
|
8587
8800
|
this.costRules = new CostRules(request);
|
|
8588
8801
|
this.externalRecords = new ExternalRecords(request);
|
|
@@ -15031,6 +15244,7 @@ var DelopayInternal = class extends Delopay {
|
|
|
15031
15244
|
BRANDING_EXPORT_VERSION,
|
|
15032
15245
|
BUILTIN_PAYMENT_ICON_KEYS,
|
|
15033
15246
|
BuyerBlocklist,
|
|
15247
|
+
BuyerConversations,
|
|
15034
15248
|
CARD_FIELD_CHROMES,
|
|
15035
15249
|
CARD_FIELD_FONT_SIZES,
|
|
15036
15250
|
CARD_FIELD_WEIGHTS,
|