@shoplygg/node 0.2.0 → 0.4.1
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/generated/api.d.ts +1311 -45
- package/generated/operations.js +32 -3
- package/index.js +1 -1
- package/package.json +1 -1
package/generated/api.d.ts
CHANGED
|
@@ -90,6 +90,7 @@ export type StoreShowResult = {
|
|
|
90
90
|
hasDynamicSecret: boolean;
|
|
91
91
|
dynamicSecretEnd: string;
|
|
92
92
|
updatedAt: string;
|
|
93
|
+
settingsVersion: string;
|
|
93
94
|
};
|
|
94
95
|
|
|
95
96
|
/** What update the store takes: `store.update`. */
|
|
@@ -169,6 +170,8 @@ export interface StoreUpdateParams {
|
|
|
169
170
|
businessCountry?: string;
|
|
170
171
|
/** A line printed at the foot of every invoice. */
|
|
171
172
|
invoiceFooter?: string;
|
|
173
|
+
/** The `settingsVersion` you last read. Sent, the change is refused with `stale_write` only if something this route saves has changed since; the store's other settings (Support Tickets on or off, its tax, its payment options and the like) changing is not that. Use it rather than `expectedUpdatedAt`, which every one of them moves. */
|
|
174
|
+
expectedVersion?: string;
|
|
172
175
|
/** The `updatedAt` you last read. Sent, the change is refused with `stale_write` if the record has changed since. Left out, it is saved whatever happened in between. */
|
|
173
176
|
expectedUpdatedAt?: string;
|
|
174
177
|
}
|
|
@@ -232,6 +235,7 @@ export type StoreUpdateResult = {
|
|
|
232
235
|
hasDynamicSecret: boolean;
|
|
233
236
|
dynamicSecretEnd: string;
|
|
234
237
|
updatedAt: string;
|
|
238
|
+
settingsVersion: string;
|
|
235
239
|
};
|
|
236
240
|
|
|
237
241
|
/** What change the store's address takes: `store.setAddress`. */
|
|
@@ -273,6 +277,7 @@ export type StoreEmailSettingsResult = {
|
|
|
273
277
|
emailStockThreshold: number;
|
|
274
278
|
emailPayoutsEnabled: boolean;
|
|
275
279
|
emailCustomPaidEnabled: boolean;
|
|
280
|
+
emailTicketsEnabled: boolean;
|
|
276
281
|
emailDisputeOpenedEnabled: boolean;
|
|
277
282
|
emailDisputeClosedEnabled: boolean;
|
|
278
283
|
testEmailEvery: {
|
|
@@ -287,12 +292,14 @@ export type StoreEmailSettingsResult = {
|
|
|
287
292
|
discordReviewsEnabled: boolean;
|
|
288
293
|
discordPayoutsEnabled: boolean;
|
|
289
294
|
discordCustomPaidEnabled: boolean;
|
|
295
|
+
discordTicketsEnabled: boolean;
|
|
290
296
|
discordDisputesEnabled: boolean;
|
|
291
297
|
discordStockThreshold: number;
|
|
292
298
|
discordFailure: unknown;
|
|
293
299
|
storeName: string;
|
|
294
300
|
emailAccent: string;
|
|
295
301
|
updatedAt: string;
|
|
302
|
+
version: string;
|
|
296
303
|
};
|
|
297
304
|
|
|
298
305
|
/** What get the store's domain answers: `domain.show`. */
|
|
@@ -5725,6 +5732,246 @@ export type CartRecoveryCartResult = {
|
|
|
5725
5732
|
recoveredAt: unknown;
|
|
5726
5733
|
};
|
|
5727
5734
|
|
|
5735
|
+
/** What get Win-Back takes: `winBack.show`. */
|
|
5736
|
+
export interface WinBackShowParams {
|
|
5737
|
+
/**
|
|
5738
|
+
* The period.
|
|
5739
|
+
*
|
|
5740
|
+
* Left out, it is "30d".
|
|
5741
|
+
*/
|
|
5742
|
+
range?: "today" | "yesterday" | "7d" | "30d" | "this_week" | "last_week" | "this_month" | "last_month" | "this_year";
|
|
5743
|
+
/** The first day of a period of your own, as `YYYY-MM-DD`. With `to`, in place of `range`. */
|
|
5744
|
+
from?: string;
|
|
5745
|
+
/** Its last day, as `YYYY-MM-DD`. */
|
|
5746
|
+
to?: string;
|
|
5747
|
+
/** The time zone those days are in, as an IANA name. Left out, UTC. */
|
|
5748
|
+
tz?: string;
|
|
5749
|
+
}
|
|
5750
|
+
|
|
5751
|
+
/** What get Win-Back answers: `winBack.show`. */
|
|
5752
|
+
export type WinBackShowResult = {
|
|
5753
|
+
enabled: boolean;
|
|
5754
|
+
firstOn: boolean;
|
|
5755
|
+
firstDays: number;
|
|
5756
|
+
firstSubject: string;
|
|
5757
|
+
secondOn: boolean;
|
|
5758
|
+
secondDays: number;
|
|
5759
|
+
secondSubject: string;
|
|
5760
|
+
secondPercent: number;
|
|
5761
|
+
audience: string;
|
|
5762
|
+
};
|
|
5763
|
+
|
|
5764
|
+
/** What change Win-Back takes: `winBack.update`. */
|
|
5765
|
+
export interface WinBackUpdateParams {
|
|
5766
|
+
/** Whether Win-Back writes to anybody. */
|
|
5767
|
+
enabled?: boolean;
|
|
5768
|
+
/** Whether the first email is sent. */
|
|
5769
|
+
firstOn?: boolean;
|
|
5770
|
+
/** Days after a buyer's last order. One of 14, 21, 30, 45, 60, 90. */
|
|
5771
|
+
firstDays?: number;
|
|
5772
|
+
/** Its subject, up to 150 characters. */
|
|
5773
|
+
firstSubject?: string;
|
|
5774
|
+
/** Whether the second email is sent. */
|
|
5775
|
+
secondOn?: boolean;
|
|
5776
|
+
/** Days after the first. One of 3, 7, 14, 21, 30. */
|
|
5777
|
+
secondDays?: number;
|
|
5778
|
+
/** Its subject, up to 150 characters. */
|
|
5779
|
+
secondSubject?: string;
|
|
5780
|
+
/** The percent off its coupon. One of 0, 5, 10, 15, 20, 25. 0 sends it with no coupon. */
|
|
5781
|
+
secondPercent?: number;
|
|
5782
|
+
/** Who is written to: empty for every subscriber, `vip`, or the ID of one of the store's tags. */
|
|
5783
|
+
audience?: string;
|
|
5784
|
+
}
|
|
5785
|
+
|
|
5786
|
+
/** What change Win-Back answers: `winBack.update`. */
|
|
5787
|
+
export type WinBackUpdateResult = {
|
|
5788
|
+
enabled: boolean;
|
|
5789
|
+
firstOn: boolean;
|
|
5790
|
+
firstDays: number;
|
|
5791
|
+
firstSubject: string;
|
|
5792
|
+
secondOn: boolean;
|
|
5793
|
+
secondDays: number;
|
|
5794
|
+
secondSubject: string;
|
|
5795
|
+
secondPercent: number;
|
|
5796
|
+
audience: string;
|
|
5797
|
+
};
|
|
5798
|
+
|
|
5799
|
+
/** What list Win-Back buyers takes: `winBack.buyers`. */
|
|
5800
|
+
export interface WinBackBuyersParams {
|
|
5801
|
+
/**
|
|
5802
|
+
* Only these.
|
|
5803
|
+
*
|
|
5804
|
+
* Left out, it is "all".
|
|
5805
|
+
*/
|
|
5806
|
+
show?: "all" | "due" | "emailed" | "won" | "unsubscribed" | "clicked";
|
|
5807
|
+
/** Part of a buyer's email. */
|
|
5808
|
+
search?: string;
|
|
5809
|
+
/**
|
|
5810
|
+
* Which page of the list. The first is 1.
|
|
5811
|
+
*
|
|
5812
|
+
* Left out, it is 1.
|
|
5813
|
+
*/
|
|
5814
|
+
page?: number;
|
|
5815
|
+
}
|
|
5816
|
+
|
|
5817
|
+
/** A row of what list Win-Back buyers lists: `winBack.buyers`. */
|
|
5818
|
+
export type WinBackBuyersItem = {
|
|
5819
|
+
id: string;
|
|
5820
|
+
email: string;
|
|
5821
|
+
customerId: string;
|
|
5822
|
+
orders: number;
|
|
5823
|
+
spent: number;
|
|
5824
|
+
tags: unknown[] | Record<string, unknown>;
|
|
5825
|
+
state: string;
|
|
5826
|
+
stopped: unknown;
|
|
5827
|
+
lastOrderId: string;
|
|
5828
|
+
lastOrderAt: string;
|
|
5829
|
+
what: string;
|
|
5830
|
+
nextStep: string;
|
|
5831
|
+
dueAt: string;
|
|
5832
|
+
emailedAt: unknown;
|
|
5833
|
+
secondEmailAt: unknown;
|
|
5834
|
+
clickedAt: unknown;
|
|
5835
|
+
couponCode: unknown;
|
|
5836
|
+
couponExpiresAt: unknown;
|
|
5837
|
+
wonOrderId: unknown;
|
|
5838
|
+
wonAt: unknown;
|
|
5839
|
+
wonAfter: unknown;
|
|
5840
|
+
quietDays: unknown;
|
|
5841
|
+
unsubscribedAt: unknown;
|
|
5842
|
+
};
|
|
5843
|
+
|
|
5844
|
+
/** What get a Win-Back buyer answers: `winBack.buyer`. */
|
|
5845
|
+
export type WinBackBuyerResult = {
|
|
5846
|
+
id: string;
|
|
5847
|
+
email: string;
|
|
5848
|
+
customerId: string;
|
|
5849
|
+
orders: number;
|
|
5850
|
+
spent: number;
|
|
5851
|
+
tags: unknown[] | Record<string, unknown>;
|
|
5852
|
+
state: string;
|
|
5853
|
+
stopped: unknown;
|
|
5854
|
+
lastOrderId: string;
|
|
5855
|
+
lastOrderAt: string;
|
|
5856
|
+
what: string;
|
|
5857
|
+
nextStep: string;
|
|
5858
|
+
dueAt: string;
|
|
5859
|
+
emailedAt: unknown;
|
|
5860
|
+
secondEmailAt: unknown;
|
|
5861
|
+
clickedAt: unknown;
|
|
5862
|
+
couponCode: unknown;
|
|
5863
|
+
couponExpiresAt: unknown;
|
|
5864
|
+
wonOrderId: unknown;
|
|
5865
|
+
wonAt: unknown;
|
|
5866
|
+
wonAfter: unknown;
|
|
5867
|
+
quietDays: unknown;
|
|
5868
|
+
unsubscribedAt: unknown;
|
|
5869
|
+
};
|
|
5870
|
+
|
|
5871
|
+
/** What get subscriber figures takes: `subscribers.summary`. */
|
|
5872
|
+
export interface SubscribersSummaryParams {
|
|
5873
|
+
/**
|
|
5874
|
+
* The period.
|
|
5875
|
+
*
|
|
5876
|
+
* Left out, it is "30d".
|
|
5877
|
+
*/
|
|
5878
|
+
range?: "today" | "yesterday" | "7d" | "30d" | "this_week" | "last_week" | "this_month" | "last_month" | "this_year";
|
|
5879
|
+
/** The first day of a period of your own, as `YYYY-MM-DD`. With `to`, in place of `range`. */
|
|
5880
|
+
from?: string;
|
|
5881
|
+
/** Its last day, as `YYYY-MM-DD`. */
|
|
5882
|
+
to?: string;
|
|
5883
|
+
/** The time zone those days are in, as an IANA name. Left out, UTC. */
|
|
5884
|
+
tz?: string;
|
|
5885
|
+
}
|
|
5886
|
+
|
|
5887
|
+
/** What get subscriber figures answers: `subscribers.summary`. */
|
|
5888
|
+
export type SubscribersSummaryResult = {
|
|
5889
|
+
asking: boolean;
|
|
5890
|
+
figures: {
|
|
5891
|
+
subscribed: number;
|
|
5892
|
+
joined: number;
|
|
5893
|
+
asked: number;
|
|
5894
|
+
rate: number;
|
|
5895
|
+
unsubscribed: number;
|
|
5896
|
+
sent: number;
|
|
5897
|
+
};
|
|
5898
|
+
};
|
|
5899
|
+
|
|
5900
|
+
/** What change asking at checkout takes: `subscribers.asking`. */
|
|
5901
|
+
export interface SubscribersAskingParams {
|
|
5902
|
+
/** Ask, or not. */
|
|
5903
|
+
on: boolean;
|
|
5904
|
+
}
|
|
5905
|
+
|
|
5906
|
+
/** What change asking at checkout answers: `subscribers.asking`. */
|
|
5907
|
+
export type SubscribersAskingResult = {
|
|
5908
|
+
asking: boolean;
|
|
5909
|
+
};
|
|
5910
|
+
|
|
5911
|
+
/** What list subscribers takes: `subscribers.list`. */
|
|
5912
|
+
export interface SubscribersListParams {
|
|
5913
|
+
/**
|
|
5914
|
+
* Only these.
|
|
5915
|
+
*
|
|
5916
|
+
* Left out, it is "all".
|
|
5917
|
+
*/
|
|
5918
|
+
show?: "all" | "subscribed" | "unsubscribed";
|
|
5919
|
+
/** Part of an email address. */
|
|
5920
|
+
search?: string;
|
|
5921
|
+
/**
|
|
5922
|
+
* Which page of the list. The first is 1.
|
|
5923
|
+
*
|
|
5924
|
+
* Left out, it is 1.
|
|
5925
|
+
*/
|
|
5926
|
+
page?: number;
|
|
5927
|
+
}
|
|
5928
|
+
|
|
5929
|
+
/** A row of what list subscribers lists: `subscribers.list`. */
|
|
5930
|
+
export type SubscribersListItem = {
|
|
5931
|
+
email: string;
|
|
5932
|
+
customerId: string;
|
|
5933
|
+
subscribed: boolean;
|
|
5934
|
+
subscribedAt: string;
|
|
5935
|
+
source: string;
|
|
5936
|
+
where: string;
|
|
5937
|
+
orderId: string;
|
|
5938
|
+
unsubscribedAt: unknown;
|
|
5939
|
+
unsubscribedBy: unknown;
|
|
5940
|
+
};
|
|
5941
|
+
|
|
5942
|
+
/** What export subscribers takes: `subscribers.export`. */
|
|
5943
|
+
export interface SubscribersExportParams {
|
|
5944
|
+
/**
|
|
5945
|
+
* Only these.
|
|
5946
|
+
*
|
|
5947
|
+
* Left out, it is "all".
|
|
5948
|
+
*/
|
|
5949
|
+
show?: "all" | "subscribed" | "unsubscribed";
|
|
5950
|
+
/** Part of an email address. */
|
|
5951
|
+
search?: string;
|
|
5952
|
+
/** `1` for how many rows the file would have, as `{ rows }`, in place of the file. */
|
|
5953
|
+
check?: "1";
|
|
5954
|
+
}
|
|
5955
|
+
|
|
5956
|
+
/** What unsubscribe a subscriber takes: `subscribers.unsubscribe`. */
|
|
5957
|
+
export interface SubscribersUnsubscribeParams {
|
|
5958
|
+
/** Their email address. */
|
|
5959
|
+
email: string;
|
|
5960
|
+
}
|
|
5961
|
+
|
|
5962
|
+
/** What unsubscribe a subscriber answers: `subscribers.unsubscribe`. */
|
|
5963
|
+
export type SubscribersUnsubscribeResult = {
|
|
5964
|
+
email: string;
|
|
5965
|
+
customerId: unknown;
|
|
5966
|
+
subscribed: boolean;
|
|
5967
|
+
subscribedAt: string;
|
|
5968
|
+
source: string;
|
|
5969
|
+
where: string;
|
|
5970
|
+
orderId: string;
|
|
5971
|
+
unsubscribedAt: string;
|
|
5972
|
+
unsubscribedBy: string;
|
|
5973
|
+
};
|
|
5974
|
+
|
|
5728
5975
|
/** What list customers takes: `customers.list`. */
|
|
5729
5976
|
export interface CustomersListParams {
|
|
5730
5977
|
/**
|
|
@@ -5747,8 +5994,10 @@ export interface CustomersListParams {
|
|
|
5747
5994
|
* Left out, it is "newest".
|
|
5748
5995
|
*/
|
|
5749
5996
|
sort?: "newest" | "spent" | "orders" | "recent" | "balance";
|
|
5750
|
-
/** Only customers who are affiliates. */
|
|
5751
|
-
only?: "affiliates";
|
|
5997
|
+
/** Only customers who are affiliates, or who are subscribed to the store's news and offers. */
|
|
5998
|
+
only?: "affiliates" | "subscribed";
|
|
5999
|
+
/** Only customers wearing this tag: `vip`, `disputed`, or the ID of one of the store's own. */
|
|
6000
|
+
tag?: string;
|
|
5752
6001
|
/** Only customers first seen in this period. */
|
|
5753
6002
|
range?: "today" | "yesterday" | "7d" | "30d" | "this_week" | "last_week" | "this_month" | "last_month" | "this_year";
|
|
5754
6003
|
/** Only customers first seen on or after this day, as `YYYY-MM-DD`. With `to`, in place of `range`. */
|
|
@@ -5770,6 +6019,12 @@ export type CustomersListItem = {
|
|
|
5770
6019
|
lastOrderAt: unknown;
|
|
5771
6020
|
balance: number;
|
|
5772
6021
|
affiliateState: unknown;
|
|
6022
|
+
tags: {
|
|
6023
|
+
id: string;
|
|
6024
|
+
name: string;
|
|
6025
|
+
tone: string;
|
|
6026
|
+
automatic: boolean;
|
|
6027
|
+
}[];
|
|
5773
6028
|
};
|
|
5774
6029
|
|
|
5775
6030
|
/** What create a customer takes: `customers.create`. */
|
|
@@ -5801,8 +6056,10 @@ export interface CustomersExportParams {
|
|
|
5801
6056
|
* Left out, it is "newest".
|
|
5802
6057
|
*/
|
|
5803
6058
|
sort?: "newest" | "spent" | "orders" | "recent" | "balance";
|
|
5804
|
-
/** Only customers who are affiliates. */
|
|
5805
|
-
only?: "affiliates";
|
|
6059
|
+
/** Only customers who are affiliates, or who are subscribed to the store's news and offers. */
|
|
6060
|
+
only?: "affiliates" | "subscribed";
|
|
6061
|
+
/** Only customers wearing this tag: `vip`, `disputed`, or the ID of one of the store's own. */
|
|
6062
|
+
tag?: string;
|
|
5806
6063
|
/** `1` for how many rows the file would have, as `{ rows }`, in place of the file. Not counted against the store's exports, and refused with 429 where none are left. */
|
|
5807
6064
|
check?: "1";
|
|
5808
6065
|
/** Only customers first seen in this period. */
|
|
@@ -5861,6 +6118,12 @@ export type CustomersStatsResult = {
|
|
|
5861
6118
|
export type CustomersShowResult = {
|
|
5862
6119
|
balance: number;
|
|
5863
6120
|
balanceAtCheckout: boolean;
|
|
6121
|
+
tags: {
|
|
6122
|
+
id: string;
|
|
6123
|
+
name: string;
|
|
6124
|
+
tone: string;
|
|
6125
|
+
automatic: boolean;
|
|
6126
|
+
}[];
|
|
5864
6127
|
balanceHistory: {
|
|
5865
6128
|
id: string;
|
|
5866
6129
|
kind: string;
|
|
@@ -5903,6 +6166,12 @@ export interface CustomersSetBalanceParams {
|
|
|
5903
6166
|
export type CustomersSetBalanceResult = {
|
|
5904
6167
|
balance: number;
|
|
5905
6168
|
balanceAtCheckout: boolean;
|
|
6169
|
+
tags: {
|
|
6170
|
+
id: string;
|
|
6171
|
+
name: string;
|
|
6172
|
+
tone: string;
|
|
6173
|
+
automatic: boolean;
|
|
6174
|
+
}[];
|
|
5906
6175
|
balanceHistory: {
|
|
5907
6176
|
id: string;
|
|
5908
6177
|
kind: string;
|
|
@@ -5937,6 +6206,12 @@ export interface CustomersBlacklistParams {
|
|
|
5937
6206
|
export type CustomersBlacklistResult = {
|
|
5938
6207
|
balance: number;
|
|
5939
6208
|
balanceAtCheckout: boolean;
|
|
6209
|
+
tags: {
|
|
6210
|
+
id: string;
|
|
6211
|
+
name: string;
|
|
6212
|
+
tone: string;
|
|
6213
|
+
automatic: boolean;
|
|
6214
|
+
}[];
|
|
5940
6215
|
balanceHistory: {
|
|
5941
6216
|
id: string;
|
|
5942
6217
|
kind: string;
|
|
@@ -5975,6 +6250,12 @@ export interface CustomersUnblacklistParams {
|
|
|
5975
6250
|
export type CustomersUnblacklistResult = {
|
|
5976
6251
|
balance: number;
|
|
5977
6252
|
balanceAtCheckout: boolean;
|
|
6253
|
+
tags: {
|
|
6254
|
+
id: string;
|
|
6255
|
+
name: string;
|
|
6256
|
+
tone: string;
|
|
6257
|
+
automatic: boolean;
|
|
6258
|
+
}[];
|
|
5978
6259
|
balanceHistory: {
|
|
5979
6260
|
id: string;
|
|
5980
6261
|
kind: string;
|
|
@@ -5994,6 +6275,102 @@ export type CustomersUnblacklistResult = {
|
|
|
5994
6275
|
removed: number;
|
|
5995
6276
|
};
|
|
5996
6277
|
|
|
6278
|
+
/** What list customer tags answers: `customerTags.list`. */
|
|
6279
|
+
export type CustomerTagsListResult = {
|
|
6280
|
+
id: string;
|
|
6281
|
+
name: string;
|
|
6282
|
+
tone: string;
|
|
6283
|
+
automatic: boolean;
|
|
6284
|
+
customers: number;
|
|
6285
|
+
}[];
|
|
6286
|
+
|
|
6287
|
+
/** What add a customer tag takes: `customerTags.create`. */
|
|
6288
|
+
export interface CustomerTagsCreateParams {
|
|
6289
|
+
/** Its name, up to 32 characters. */
|
|
6290
|
+
name: string;
|
|
6291
|
+
/**
|
|
6292
|
+
* Its colour.
|
|
6293
|
+
*
|
|
6294
|
+
* Left out, it is "neutral".
|
|
6295
|
+
*/
|
|
6296
|
+
tone?: "neutral" | "primary" | "success" | "warning" | "danger";
|
|
6297
|
+
}
|
|
6298
|
+
|
|
6299
|
+
/** What add a customer tag answers: `customerTags.create`. */
|
|
6300
|
+
export type CustomerTagsCreateResult = {
|
|
6301
|
+
id: string;
|
|
6302
|
+
name: string;
|
|
6303
|
+
tone: string;
|
|
6304
|
+
automatic: boolean;
|
|
6305
|
+
};
|
|
6306
|
+
|
|
6307
|
+
/** What change VIP and Disputed Before takes: `customerTags.automatic`. */
|
|
6308
|
+
export interface CustomerTagsAutomaticParams {
|
|
6309
|
+
/** Whether VIP is put on. */
|
|
6310
|
+
vipOn?: boolean;
|
|
6311
|
+
/** A VIP has spent at least this, in the store's currency, on completed orders. 0 leaves it out. */
|
|
6312
|
+
vipSpent?: number;
|
|
6313
|
+
/** Or paid for at least this many orders. 0 leaves it out. */
|
|
6314
|
+
vipOrders?: number;
|
|
6315
|
+
/** Over this many days back, 0 for all time. */
|
|
6316
|
+
vipDays?: 0 | 365 | 180 | 90 | 30;
|
|
6317
|
+
/** Whether Disputed Before is put on: a dispute on any of their orders, won or lost. */
|
|
6318
|
+
disputedOn?: boolean;
|
|
6319
|
+
}
|
|
6320
|
+
|
|
6321
|
+
/** What change VIP and Disputed Before answers: `customerTags.automatic`. */
|
|
6322
|
+
export type CustomerTagsAutomaticResult = {
|
|
6323
|
+
id: string;
|
|
6324
|
+
name: string;
|
|
6325
|
+
tone: string;
|
|
6326
|
+
automatic: boolean;
|
|
6327
|
+
customers: number;
|
|
6328
|
+
}[];
|
|
6329
|
+
|
|
6330
|
+
/** What change a customer tag takes: `customerTags.update`. */
|
|
6331
|
+
export interface CustomerTagsUpdateParams {
|
|
6332
|
+
/** Its name, up to 32 characters. */
|
|
6333
|
+
name?: string;
|
|
6334
|
+
/** Its colour. */
|
|
6335
|
+
tone?: "neutral" | "primary" | "success" | "warning" | "danger";
|
|
6336
|
+
}
|
|
6337
|
+
|
|
6338
|
+
/** What change a customer tag answers: `customerTags.update`. */
|
|
6339
|
+
export type CustomerTagsUpdateResult = {
|
|
6340
|
+
id: string;
|
|
6341
|
+
name: string;
|
|
6342
|
+
tone: string;
|
|
6343
|
+
automatic: boolean;
|
|
6344
|
+
};
|
|
6345
|
+
|
|
6346
|
+
/** What delete a customer tag answers: `customerTags.delete`. */
|
|
6347
|
+
export type CustomerTagsDeleteResult = unknown[] | Record<string, unknown>;
|
|
6348
|
+
|
|
6349
|
+
/** What set a customer's tags takes: `customers.setTags`. */
|
|
6350
|
+
export interface CustomersSetTagsParams {
|
|
6351
|
+
/** The IDs of the store's tags they wear. */
|
|
6352
|
+
tags: string[];
|
|
6353
|
+
}
|
|
6354
|
+
|
|
6355
|
+
/** What set a customer's tags answers: `customers.setTags`. */
|
|
6356
|
+
export type CustomersSetTagsResult = {
|
|
6357
|
+
id: string;
|
|
6358
|
+
name: string;
|
|
6359
|
+
tone: string;
|
|
6360
|
+
automatic: boolean;
|
|
6361
|
+
}[];
|
|
6362
|
+
|
|
6363
|
+
/** What put a tag on a customer answers: `customers.tag`. */
|
|
6364
|
+
export type CustomersTagResult = {
|
|
6365
|
+
id: string;
|
|
6366
|
+
name: string;
|
|
6367
|
+
tone: string;
|
|
6368
|
+
automatic: boolean;
|
|
6369
|
+
}[];
|
|
6370
|
+
|
|
6371
|
+
/** What take a tag off a customer answers: `customers.untag`. */
|
|
6372
|
+
export type CustomersUntagResult = unknown[] | Record<string, unknown>;
|
|
6373
|
+
|
|
5997
6374
|
/** What list affiliates answers: `affiliates.list`. */
|
|
5998
6375
|
export type AffiliatesListResult = {
|
|
5999
6376
|
id: string;
|
|
@@ -6280,6 +6657,299 @@ export type AffiliateProgrammeUpdateResult = {
|
|
|
6280
6657
|
payouts: boolean;
|
|
6281
6658
|
};
|
|
6282
6659
|
|
|
6660
|
+
/** What list support tickets takes: `tickets.list`. */
|
|
6661
|
+
export interface TicketsListParams {
|
|
6662
|
+
/**
|
|
6663
|
+
* Only these: `unresolved` is `open` and `answered` together.
|
|
6664
|
+
*
|
|
6665
|
+
* Left out, it is "all".
|
|
6666
|
+
*/
|
|
6667
|
+
show?: "all" | "unresolved" | "open" | "answered" | "resolved";
|
|
6668
|
+
/** Part of the subject, the buyer's email or the latest message, or the start of the ticket's or the order's ID. */
|
|
6669
|
+
search?: string;
|
|
6670
|
+
/**
|
|
6671
|
+
* Which page of the list. The first is 1.
|
|
6672
|
+
*
|
|
6673
|
+
* Left out, it is 1.
|
|
6674
|
+
*/
|
|
6675
|
+
page?: number;
|
|
6676
|
+
/**
|
|
6677
|
+
* How many a page holds, up to 100.
|
|
6678
|
+
*
|
|
6679
|
+
* Left out, it is 25.
|
|
6680
|
+
*/
|
|
6681
|
+
perPage?: number;
|
|
6682
|
+
}
|
|
6683
|
+
|
|
6684
|
+
/** A row of what list support tickets lists: `tickets.list`. */
|
|
6685
|
+
export type TicketsListItem = {
|
|
6686
|
+
id: string;
|
|
6687
|
+
email: string;
|
|
6688
|
+
customerId: unknown;
|
|
6689
|
+
orderId: string;
|
|
6690
|
+
subject: string;
|
|
6691
|
+
status: string;
|
|
6692
|
+
messages: number;
|
|
6693
|
+
pictures: number;
|
|
6694
|
+
lastMessageAt: string;
|
|
6695
|
+
lastFrom: string;
|
|
6696
|
+
lastLine: string;
|
|
6697
|
+
unread: boolean;
|
|
6698
|
+
firstReplyAt: unknown;
|
|
6699
|
+
answeredAt: unknown;
|
|
6700
|
+
resolvedAt: unknown;
|
|
6701
|
+
resolvedBy: unknown;
|
|
6702
|
+
createdAt: string;
|
|
6703
|
+
updatedAt: string;
|
|
6704
|
+
};
|
|
6705
|
+
|
|
6706
|
+
/** What switch Support Tickets on or off takes: `tickets.settings`. */
|
|
6707
|
+
export interface TicketsSettingsParams {
|
|
6708
|
+
/** Whether buyers can open tickets. */
|
|
6709
|
+
on: boolean;
|
|
6710
|
+
}
|
|
6711
|
+
|
|
6712
|
+
/** What switch Support Tickets on or off answers: `tickets.settings`. */
|
|
6713
|
+
export type TicketsSettingsResult = {
|
|
6714
|
+
on: boolean;
|
|
6715
|
+
};
|
|
6716
|
+
|
|
6717
|
+
/** What get a support ticket answers: `tickets.get`. */
|
|
6718
|
+
export type TicketsGetResult = {
|
|
6719
|
+
id: string;
|
|
6720
|
+
email: string;
|
|
6721
|
+
customerId: unknown;
|
|
6722
|
+
orderId: string;
|
|
6723
|
+
subject: string;
|
|
6724
|
+
status: string;
|
|
6725
|
+
messages: number;
|
|
6726
|
+
pictures: number;
|
|
6727
|
+
lastMessageAt: string;
|
|
6728
|
+
lastFrom: string;
|
|
6729
|
+
lastLine: string;
|
|
6730
|
+
unread: boolean;
|
|
6731
|
+
firstReplyAt: unknown;
|
|
6732
|
+
answeredAt: unknown;
|
|
6733
|
+
resolvedAt: unknown;
|
|
6734
|
+
resolvedBy: unknown;
|
|
6735
|
+
createdAt: string;
|
|
6736
|
+
updatedAt: string;
|
|
6737
|
+
conversation: Array<{
|
|
6738
|
+
id: string;
|
|
6739
|
+
from: string;
|
|
6740
|
+
body: string;
|
|
6741
|
+
html: string;
|
|
6742
|
+
pictures: unknown[] | Record<string, unknown>;
|
|
6743
|
+
createdAt: string;
|
|
6744
|
+
}>;
|
|
6745
|
+
canReopenUntil: unknown;
|
|
6746
|
+
limits: {
|
|
6747
|
+
body: number;
|
|
6748
|
+
subject: number;
|
|
6749
|
+
picturesPerMessage: number;
|
|
6750
|
+
picturesPerTicket: number;
|
|
6751
|
+
pictureBytes: number;
|
|
6752
|
+
};
|
|
6753
|
+
customer: {
|
|
6754
|
+
id: unknown;
|
|
6755
|
+
email: string;
|
|
6756
|
+
tags: unknown[] | Record<string, unknown>;
|
|
6757
|
+
};
|
|
6758
|
+
order: {
|
|
6759
|
+
id: string;
|
|
6760
|
+
status: string;
|
|
6761
|
+
amount: string;
|
|
6762
|
+
};
|
|
6763
|
+
orders: {
|
|
6764
|
+
id: string;
|
|
6765
|
+
status: string;
|
|
6766
|
+
amount: string;
|
|
6767
|
+
products: string[];
|
|
6768
|
+
createdAt: string;
|
|
6769
|
+
}[];
|
|
6770
|
+
on: boolean;
|
|
6771
|
+
};
|
|
6772
|
+
|
|
6773
|
+
/** What reply to a support ticket takes: `tickets.reply`. */
|
|
6774
|
+
export interface TicketsReplyParams {
|
|
6775
|
+
/** The reply, up to 500 characters. */
|
|
6776
|
+
message: string;
|
|
6777
|
+
/**
|
|
6778
|
+
* Mark the ticket resolved with the reply.
|
|
6779
|
+
*
|
|
6780
|
+
* Left out, it is false.
|
|
6781
|
+
*/
|
|
6782
|
+
resolve?: boolean;
|
|
6783
|
+
}
|
|
6784
|
+
|
|
6785
|
+
/** What reply to a support ticket answers: `tickets.reply`. */
|
|
6786
|
+
export type TicketsReplyResult = {
|
|
6787
|
+
id: string;
|
|
6788
|
+
email: string;
|
|
6789
|
+
customerId: unknown;
|
|
6790
|
+
orderId: string;
|
|
6791
|
+
subject: string;
|
|
6792
|
+
status: string;
|
|
6793
|
+
messages: number;
|
|
6794
|
+
pictures: number;
|
|
6795
|
+
lastMessageAt: string;
|
|
6796
|
+
lastFrom: string;
|
|
6797
|
+
lastLine: string;
|
|
6798
|
+
unread: boolean;
|
|
6799
|
+
firstReplyAt: string;
|
|
6800
|
+
answeredAt: string;
|
|
6801
|
+
resolvedAt: unknown;
|
|
6802
|
+
resolvedBy: unknown;
|
|
6803
|
+
createdAt: string;
|
|
6804
|
+
updatedAt: string;
|
|
6805
|
+
conversation: Array<{
|
|
6806
|
+
id: string;
|
|
6807
|
+
from: string;
|
|
6808
|
+
body: string;
|
|
6809
|
+
html: string;
|
|
6810
|
+
pictures: unknown[] | Record<string, unknown>;
|
|
6811
|
+
createdAt: string;
|
|
6812
|
+
}>;
|
|
6813
|
+
canReopenUntil: unknown;
|
|
6814
|
+
limits: {
|
|
6815
|
+
body: number;
|
|
6816
|
+
subject: number;
|
|
6817
|
+
picturesPerMessage: number;
|
|
6818
|
+
picturesPerTicket: number;
|
|
6819
|
+
pictureBytes: number;
|
|
6820
|
+
};
|
|
6821
|
+
customer: {
|
|
6822
|
+
id: unknown;
|
|
6823
|
+
email: string;
|
|
6824
|
+
tags: unknown[] | Record<string, unknown>;
|
|
6825
|
+
};
|
|
6826
|
+
order: {
|
|
6827
|
+
id: string;
|
|
6828
|
+
status: string;
|
|
6829
|
+
amount: string;
|
|
6830
|
+
};
|
|
6831
|
+
orders: {
|
|
6832
|
+
id: string;
|
|
6833
|
+
status: string;
|
|
6834
|
+
amount: string;
|
|
6835
|
+
products: string[];
|
|
6836
|
+
createdAt: string;
|
|
6837
|
+
}[];
|
|
6838
|
+
on: boolean;
|
|
6839
|
+
};
|
|
6840
|
+
|
|
6841
|
+
/** What resolve a support ticket answers: `tickets.resolve`. */
|
|
6842
|
+
export type TicketsResolveResult = {
|
|
6843
|
+
id: string;
|
|
6844
|
+
email: string;
|
|
6845
|
+
customerId: unknown;
|
|
6846
|
+
orderId: string;
|
|
6847
|
+
subject: string;
|
|
6848
|
+
status: string;
|
|
6849
|
+
messages: number;
|
|
6850
|
+
pictures: number;
|
|
6851
|
+
lastMessageAt: string;
|
|
6852
|
+
lastFrom: string;
|
|
6853
|
+
lastLine: string;
|
|
6854
|
+
unread: boolean;
|
|
6855
|
+
firstReplyAt: string;
|
|
6856
|
+
answeredAt: string;
|
|
6857
|
+
resolvedAt: string;
|
|
6858
|
+
resolvedBy: string;
|
|
6859
|
+
createdAt: string;
|
|
6860
|
+
updatedAt: string;
|
|
6861
|
+
conversation: Array<{
|
|
6862
|
+
id: string;
|
|
6863
|
+
from: string;
|
|
6864
|
+
body: string;
|
|
6865
|
+
html: string;
|
|
6866
|
+
pictures: unknown[] | Record<string, unknown>;
|
|
6867
|
+
createdAt: string;
|
|
6868
|
+
}>;
|
|
6869
|
+
canReopenUntil: string;
|
|
6870
|
+
limits: {
|
|
6871
|
+
body: number;
|
|
6872
|
+
subject: number;
|
|
6873
|
+
picturesPerMessage: number;
|
|
6874
|
+
picturesPerTicket: number;
|
|
6875
|
+
pictureBytes: number;
|
|
6876
|
+
};
|
|
6877
|
+
customer: {
|
|
6878
|
+
id: unknown;
|
|
6879
|
+
email: string;
|
|
6880
|
+
tags: unknown[] | Record<string, unknown>;
|
|
6881
|
+
};
|
|
6882
|
+
order: {
|
|
6883
|
+
id: string;
|
|
6884
|
+
status: string;
|
|
6885
|
+
amount: string;
|
|
6886
|
+
};
|
|
6887
|
+
orders: {
|
|
6888
|
+
id: string;
|
|
6889
|
+
status: string;
|
|
6890
|
+
amount: string;
|
|
6891
|
+
products: string[];
|
|
6892
|
+
createdAt: string;
|
|
6893
|
+
}[];
|
|
6894
|
+
on: boolean;
|
|
6895
|
+
};
|
|
6896
|
+
|
|
6897
|
+
/** What reopen a support ticket answers: `tickets.reopen`. */
|
|
6898
|
+
export type TicketsReopenResult = {
|
|
6899
|
+
id: string;
|
|
6900
|
+
email: string;
|
|
6901
|
+
customerId: unknown;
|
|
6902
|
+
orderId: string;
|
|
6903
|
+
subject: string;
|
|
6904
|
+
status: string;
|
|
6905
|
+
messages: number;
|
|
6906
|
+
pictures: number;
|
|
6907
|
+
lastMessageAt: string;
|
|
6908
|
+
lastFrom: string;
|
|
6909
|
+
lastLine: string;
|
|
6910
|
+
unread: boolean;
|
|
6911
|
+
firstReplyAt: string;
|
|
6912
|
+
answeredAt: string;
|
|
6913
|
+
resolvedAt: unknown;
|
|
6914
|
+
resolvedBy: unknown;
|
|
6915
|
+
createdAt: string;
|
|
6916
|
+
updatedAt: string;
|
|
6917
|
+
conversation: Array<{
|
|
6918
|
+
id: string;
|
|
6919
|
+
from: string;
|
|
6920
|
+
body: string;
|
|
6921
|
+
html: string;
|
|
6922
|
+
pictures: unknown[] | Record<string, unknown>;
|
|
6923
|
+
createdAt: string;
|
|
6924
|
+
}>;
|
|
6925
|
+
canReopenUntil: unknown;
|
|
6926
|
+
limits: {
|
|
6927
|
+
body: number;
|
|
6928
|
+
subject: number;
|
|
6929
|
+
picturesPerMessage: number;
|
|
6930
|
+
picturesPerTicket: number;
|
|
6931
|
+
pictureBytes: number;
|
|
6932
|
+
};
|
|
6933
|
+
customer: {
|
|
6934
|
+
id: unknown;
|
|
6935
|
+
email: string;
|
|
6936
|
+
tags: unknown[] | Record<string, unknown>;
|
|
6937
|
+
};
|
|
6938
|
+
order: {
|
|
6939
|
+
id: string;
|
|
6940
|
+
status: string;
|
|
6941
|
+
amount: string;
|
|
6942
|
+
};
|
|
6943
|
+
orders: {
|
|
6944
|
+
id: string;
|
|
6945
|
+
status: string;
|
|
6946
|
+
amount: string;
|
|
6947
|
+
products: string[];
|
|
6948
|
+
createdAt: string;
|
|
6949
|
+
}[];
|
|
6950
|
+
on: boolean;
|
|
6951
|
+
};
|
|
6952
|
+
|
|
6283
6953
|
/** What list blacklist rules takes: `blacklist.list`. */
|
|
6284
6954
|
export interface BlacklistListParams {
|
|
6285
6955
|
/**
|
|
@@ -7055,11 +7725,11 @@ export interface DisputesUpdateSettingsParams {
|
|
|
7055
7725
|
blacklist?: boolean;
|
|
7056
7726
|
/** Hide what the order delivered from its buyer while a dispute is open, shown again if it is won. */
|
|
7057
7727
|
takeBackAccess?: boolean;
|
|
7058
|
-
/** Accept a
|
|
7728
|
+
/** Accept a dispute answered from Shoply under `acceptUnder` rather than fight it. */
|
|
7059
7729
|
acceptSmall?: boolean;
|
|
7060
7730
|
/** The amount, above 0. */
|
|
7061
7731
|
acceptUnder?: number;
|
|
7062
|
-
/** Submit a
|
|
7732
|
+
/** Submit the answer of a dispute answered from Shoply with a day left. */
|
|
7063
7733
|
autoSubmit?: boolean;
|
|
7064
7734
|
/** Never send or accept one over `askAbove` by itself. */
|
|
7065
7735
|
askAboveOn?: boolean;
|
|
@@ -9254,12 +9924,29 @@ export type CustomerShowResult = {
|
|
|
9254
9924
|
imageUrl: unknown;
|
|
9255
9925
|
}[];
|
|
9256
9926
|
subscriptions: boolean;
|
|
9927
|
+
support: boolean;
|
|
9257
9928
|
downloads: {
|
|
9258
9929
|
buttons: unknown[] | Record<string, unknown>;
|
|
9259
9930
|
guideUrl: string;
|
|
9260
9931
|
files: unknown[] | Record<string, unknown>;
|
|
9261
|
-
instructions:
|
|
9932
|
+
instructions: {
|
|
9933
|
+
productName: string;
|
|
9934
|
+
variantName: string;
|
|
9935
|
+
text: string;
|
|
9936
|
+
}[];
|
|
9262
9937
|
general: string;
|
|
9938
|
+
orders: Array<{
|
|
9939
|
+
id: string;
|
|
9940
|
+
dateCreated: string;
|
|
9941
|
+
products: string[];
|
|
9942
|
+
imageUrl: unknown;
|
|
9943
|
+
files: unknown[] | Record<string, unknown>;
|
|
9944
|
+
instructions: {
|
|
9945
|
+
productName: unknown;
|
|
9946
|
+
variantName: unknown;
|
|
9947
|
+
text: unknown;
|
|
9948
|
+
}[];
|
|
9949
|
+
}>;
|
|
9263
9950
|
};
|
|
9264
9951
|
supportUrl: string;
|
|
9265
9952
|
};
|
|
@@ -9788,38 +10475,225 @@ export type CustomerSubscriptionsPauseResult = {
|
|
|
9788
10475
|
pausesLeft: number;
|
|
9789
10476
|
}[];
|
|
9790
10477
|
|
|
9791
|
-
/** What resume a subscription answers: `customer.subscriptions.resume`. */
|
|
9792
|
-
export type CustomerSubscriptionsResumeResult = {
|
|
10478
|
+
/** What resume a subscription answers: `customer.subscriptions.resume`. */
|
|
10479
|
+
export type CustomerSubscriptionsResumeResult = {
|
|
10480
|
+
id: string;
|
|
10481
|
+
email: string;
|
|
10482
|
+
productName: string;
|
|
10483
|
+
variantName: string;
|
|
10484
|
+
quantity: number;
|
|
10485
|
+
price: number;
|
|
10486
|
+
currency: string;
|
|
10487
|
+
every: number;
|
|
10488
|
+
unit: string;
|
|
10489
|
+
status: string;
|
|
10490
|
+
periodEnd: string;
|
|
10491
|
+
graceEnd: unknown;
|
|
10492
|
+
renewalOrderId: unknown;
|
|
10493
|
+
renewalUrl: unknown;
|
|
10494
|
+
firstOrderId: string;
|
|
10495
|
+
endedAt: unknown;
|
|
10496
|
+
revoked: boolean;
|
|
10497
|
+
pausedAt: unknown;
|
|
10498
|
+
resumeAt: unknown;
|
|
10499
|
+
pausedBy: unknown;
|
|
10500
|
+
renewsWith: unknown;
|
|
10501
|
+
autoRenews: boolean;
|
|
10502
|
+
chargeTried: number;
|
|
10503
|
+
chargeNextAt: unknown;
|
|
10504
|
+
createdAt: string;
|
|
10505
|
+
pausesLeft: number;
|
|
10506
|
+
}[];
|
|
10507
|
+
|
|
10508
|
+
/** What give another card answers: `customer.subscriptions.card`. */
|
|
10509
|
+
export type CustomerSubscriptionsCardResult = unknown;
|
|
10510
|
+
|
|
10511
|
+
/** What list support tickets answers: `customer.tickets.list`. */
|
|
10512
|
+
export type CustomerTicketsListResult = {
|
|
10513
|
+
id: string;
|
|
10514
|
+
orderId: string;
|
|
10515
|
+
subject: string;
|
|
10516
|
+
status: string;
|
|
10517
|
+
messages: number;
|
|
10518
|
+
pictures: number;
|
|
10519
|
+
lastMessageAt: string;
|
|
10520
|
+
lastFrom: string;
|
|
10521
|
+
lastLine: string;
|
|
10522
|
+
firstReplyAt: string;
|
|
10523
|
+
answeredAt: string;
|
|
10524
|
+
resolvedAt: unknown;
|
|
10525
|
+
resolvedBy: unknown;
|
|
10526
|
+
createdAt: string;
|
|
10527
|
+
updatedAt: string;
|
|
10528
|
+
}[];
|
|
10529
|
+
|
|
10530
|
+
/** What open a support ticket takes: `customer.tickets.create`. */
|
|
10531
|
+
export interface CustomerTicketsCreateParams {
|
|
10532
|
+
/** What it is about, up to 100 characters. */
|
|
10533
|
+
subject: string;
|
|
10534
|
+
/** The first message, up to 500 characters. */
|
|
10535
|
+
message: string;
|
|
10536
|
+
/** The order it is about, one of `meta.orders` on List support tickets. Left out, something else. */
|
|
10537
|
+
order?: string;
|
|
10538
|
+
}
|
|
10539
|
+
|
|
10540
|
+
/** What open a support ticket answers: `customer.tickets.create`. */
|
|
10541
|
+
export type CustomerTicketsCreateResult = {
|
|
10542
|
+
id: string;
|
|
10543
|
+
orderId: string;
|
|
10544
|
+
subject: string;
|
|
10545
|
+
status: string;
|
|
10546
|
+
messages: number;
|
|
10547
|
+
pictures: number;
|
|
10548
|
+
lastMessageAt: string;
|
|
10549
|
+
lastFrom: string;
|
|
10550
|
+
lastLine: string;
|
|
10551
|
+
firstReplyAt: unknown;
|
|
10552
|
+
answeredAt: unknown;
|
|
10553
|
+
resolvedAt: unknown;
|
|
10554
|
+
resolvedBy: unknown;
|
|
10555
|
+
createdAt: string;
|
|
10556
|
+
updatedAt: string;
|
|
10557
|
+
conversation: Array<{
|
|
10558
|
+
id: string;
|
|
10559
|
+
from: string;
|
|
10560
|
+
body: string;
|
|
10561
|
+
html: string;
|
|
10562
|
+
pictures: unknown[] | Record<string, unknown>;
|
|
10563
|
+
createdAt: string;
|
|
10564
|
+
}>;
|
|
10565
|
+
canReopenUntil: unknown;
|
|
10566
|
+
limits: {
|
|
10567
|
+
body: number;
|
|
10568
|
+
subject: number;
|
|
10569
|
+
picturesPerMessage: number;
|
|
10570
|
+
picturesPerTicket: number;
|
|
10571
|
+
pictureBytes: number;
|
|
10572
|
+
};
|
|
10573
|
+
orderLabel: string;
|
|
10574
|
+
orderProducts: string[];
|
|
10575
|
+
orderMore: number;
|
|
10576
|
+
};
|
|
10577
|
+
|
|
10578
|
+
/** What get a support ticket answers: `customer.tickets.show`. */
|
|
10579
|
+
export type CustomerTicketsShowResult = {
|
|
10580
|
+
id: string;
|
|
10581
|
+
orderId: string;
|
|
10582
|
+
subject: string;
|
|
10583
|
+
status: string;
|
|
10584
|
+
messages: number;
|
|
10585
|
+
pictures: number;
|
|
10586
|
+
lastMessageAt: string;
|
|
10587
|
+
lastFrom: string;
|
|
10588
|
+
lastLine: string;
|
|
10589
|
+
firstReplyAt: string;
|
|
10590
|
+
answeredAt: string;
|
|
10591
|
+
resolvedAt: unknown;
|
|
10592
|
+
resolvedBy: unknown;
|
|
10593
|
+
createdAt: string;
|
|
10594
|
+
updatedAt: string;
|
|
10595
|
+
conversation: Array<{
|
|
10596
|
+
id: string;
|
|
10597
|
+
from: string;
|
|
10598
|
+
body: string;
|
|
10599
|
+
html: string;
|
|
10600
|
+
pictures: unknown[] | Record<string, unknown>;
|
|
10601
|
+
createdAt: string;
|
|
10602
|
+
}>;
|
|
10603
|
+
canReopenUntil: unknown;
|
|
10604
|
+
limits: {
|
|
10605
|
+
body: number;
|
|
10606
|
+
subject: number;
|
|
10607
|
+
picturesPerMessage: number;
|
|
10608
|
+
picturesPerTicket: number;
|
|
10609
|
+
pictureBytes: number;
|
|
10610
|
+
};
|
|
10611
|
+
orderLabel: string;
|
|
10612
|
+
orderProducts: string[];
|
|
10613
|
+
orderMore: number;
|
|
10614
|
+
};
|
|
10615
|
+
|
|
10616
|
+
/** What write on a support ticket takes: `customer.tickets.reply`. */
|
|
10617
|
+
export interface CustomerTicketsReplyParams {
|
|
10618
|
+
/** The message, up to 500 characters. */
|
|
10619
|
+
message: string;
|
|
10620
|
+
}
|
|
10621
|
+
|
|
10622
|
+
/** What write on a support ticket answers: `customer.tickets.reply`. */
|
|
10623
|
+
export type CustomerTicketsReplyResult = {
|
|
9793
10624
|
id: string;
|
|
9794
|
-
|
|
9795
|
-
|
|
9796
|
-
variantName: string;
|
|
9797
|
-
quantity: number;
|
|
9798
|
-
price: number;
|
|
9799
|
-
currency: string;
|
|
9800
|
-
every: number;
|
|
9801
|
-
unit: string;
|
|
10625
|
+
orderId: string;
|
|
10626
|
+
subject: string;
|
|
9802
10627
|
status: string;
|
|
9803
|
-
|
|
9804
|
-
|
|
9805
|
-
|
|
9806
|
-
|
|
9807
|
-
|
|
9808
|
-
|
|
9809
|
-
|
|
9810
|
-
|
|
9811
|
-
|
|
9812
|
-
pausedBy: unknown;
|
|
9813
|
-
renewsWith: unknown;
|
|
9814
|
-
autoRenews: boolean;
|
|
9815
|
-
chargeTried: number;
|
|
9816
|
-
chargeNextAt: unknown;
|
|
10628
|
+
messages: number;
|
|
10629
|
+
pictures: number;
|
|
10630
|
+
lastMessageAt: string;
|
|
10631
|
+
lastFrom: string;
|
|
10632
|
+
lastLine: string;
|
|
10633
|
+
firstReplyAt: string;
|
|
10634
|
+
answeredAt: string;
|
|
10635
|
+
resolvedAt: unknown;
|
|
10636
|
+
resolvedBy: unknown;
|
|
9817
10637
|
createdAt: string;
|
|
9818
|
-
|
|
9819
|
-
|
|
10638
|
+
updatedAt: string;
|
|
10639
|
+
conversation: Array<{
|
|
10640
|
+
id: string;
|
|
10641
|
+
from: string;
|
|
10642
|
+
body: string;
|
|
10643
|
+
html: string;
|
|
10644
|
+
pictures: unknown[] | Record<string, unknown>;
|
|
10645
|
+
createdAt: string;
|
|
10646
|
+
}>;
|
|
10647
|
+
canReopenUntil: unknown;
|
|
10648
|
+
limits: {
|
|
10649
|
+
body: number;
|
|
10650
|
+
subject: number;
|
|
10651
|
+
picturesPerMessage: number;
|
|
10652
|
+
picturesPerTicket: number;
|
|
10653
|
+
pictureBytes: number;
|
|
10654
|
+
};
|
|
10655
|
+
orderLabel: string;
|
|
10656
|
+
orderProducts: string[];
|
|
10657
|
+
orderMore: number;
|
|
10658
|
+
};
|
|
9820
10659
|
|
|
9821
|
-
/** What
|
|
9822
|
-
export type
|
|
10660
|
+
/** What resolve a support ticket answers: `customer.tickets.resolve`. */
|
|
10661
|
+
export type CustomerTicketsResolveResult = {
|
|
10662
|
+
id: string;
|
|
10663
|
+
orderId: string;
|
|
10664
|
+
subject: string;
|
|
10665
|
+
status: string;
|
|
10666
|
+
messages: number;
|
|
10667
|
+
pictures: number;
|
|
10668
|
+
lastMessageAt: string;
|
|
10669
|
+
lastFrom: string;
|
|
10670
|
+
lastLine: string;
|
|
10671
|
+
firstReplyAt: string;
|
|
10672
|
+
answeredAt: string;
|
|
10673
|
+
resolvedAt: string;
|
|
10674
|
+
resolvedBy: string;
|
|
10675
|
+
createdAt: string;
|
|
10676
|
+
updatedAt: string;
|
|
10677
|
+
conversation: Array<{
|
|
10678
|
+
id: string;
|
|
10679
|
+
from: string;
|
|
10680
|
+
body: string;
|
|
10681
|
+
html: string;
|
|
10682
|
+
pictures: unknown[] | Record<string, unknown>;
|
|
10683
|
+
createdAt: string;
|
|
10684
|
+
}>;
|
|
10685
|
+
canReopenUntil: string;
|
|
10686
|
+
limits: {
|
|
10687
|
+
body: number;
|
|
10688
|
+
subject: number;
|
|
10689
|
+
picturesPerMessage: number;
|
|
10690
|
+
picturesPerTicket: number;
|
|
10691
|
+
pictureBytes: number;
|
|
10692
|
+
};
|
|
10693
|
+
orderLabel: string;
|
|
10694
|
+
orderProducts: string[];
|
|
10695
|
+
orderMore: number;
|
|
10696
|
+
};
|
|
9823
10697
|
|
|
9824
10698
|
export interface ShoplyResourcesKey {
|
|
9825
10699
|
/**
|
|
@@ -11660,11 +12534,107 @@ export interface ShoplyResourcesCartRecovery {
|
|
|
11660
12534
|
cart(cartId: string, options?: RequestOptions): Promise<CartRecoveryCartResult>;
|
|
11661
12535
|
}
|
|
11662
12536
|
|
|
12537
|
+
export interface ShoplyResourcesWinBack {
|
|
12538
|
+
/**
|
|
12539
|
+
* **Get Win-Back**
|
|
12540
|
+
*
|
|
12541
|
+
* Win-Back's settings as `data`. `meta.figures` is the period's four figures: the revenue it won back (and the period before's), subscribers and the share of buyers asked who said yes, the share of buyers emailed who came back, and the emails sent with how many buyers clicked and unsubscribed. `meta.set` is false where the store has never set it up, `meta.asking` whether the checkout asks buyers for leave, `meta.sendable` whether the store can send email at all, `meta.audiences` the tags it may be narrowed to, and `meta.choices` what each setting may take.
|
|
12542
|
+
*
|
|
12543
|
+
* Needs the `marketing.read` permission (Read Email Marketing).
|
|
12544
|
+
*
|
|
12545
|
+
* @see https://docs.shoply.gg/api-reference/email-marketing/get-win-back
|
|
12546
|
+
*/
|
|
12547
|
+
show(params?: WinBackShowParams, options?: RequestOptions): Promise<WinBackShowResult>;
|
|
12548
|
+
/**
|
|
12549
|
+
* **Change Win-Back**
|
|
12550
|
+
*
|
|
12551
|
+
* Changes the settings named and keeps the rest. Win-Back writes only to subscribers: buyers who ticked "Email me news and offers" at checkout on an order they paid, and have not said no since. The first email goes the set number of days after a buyer's last completed order, if they have not ordered since; the second, days after the first, carries a coupon made for that buyer, good for 7 days. A buyer with a dispute on record is not written to. Switching it on also switches on asking at checkout, and `meta.askingTurnedOn` says so. An empty subject is the email's own.
|
|
12552
|
+
*
|
|
12553
|
+
* Needs the `marketing.write` permission (Change Email Marketing).
|
|
12554
|
+
*
|
|
12555
|
+
* @see https://docs.shoply.gg/api-reference/email-marketing/change-win-back
|
|
12556
|
+
*/
|
|
12557
|
+
update(params?: WinBackUpdateParams, options?: RequestOptions): Promise<WinBackUpdateResult>;
|
|
12558
|
+
/**
|
|
12559
|
+
* **List Win-Back buyers**
|
|
12560
|
+
*
|
|
12561
|
+
* The buyers Win-Back has written to or will within 7 days, the latest to have moved first, 25 a page. A buyer is here once for each time they go quiet. `state` is `due` (`dueAt` says when its first email goes), `first` or `second` (the email it last had), `won` (they ordered within 14 days of an email: `wonOrderId`, `wonAt`, `wonAfter`, `quietDays`), `unsubscribed`, or `stopped` (`stopped` says why: `ordered`, `off`, `audience`, `disputed`, `failed`). `orders` and `spent` are their completed orders at the store, `tags` theirs as on Get a customer, `couponCode` and `couponExpiresAt` the second email's coupon, and `clickedAt` when a browser first opened an email's button.
|
|
12562
|
+
*
|
|
12563
|
+
* Needs the `marketing.read` permission (Read Email Marketing).
|
|
12564
|
+
*
|
|
12565
|
+
* @see https://docs.shoply.gg/api-reference/email-marketing/list-win-back-buyers
|
|
12566
|
+
*/
|
|
12567
|
+
buyers(params?: WinBackBuyersParams, options?: RequestOptions): PagePromise<WinBackBuyersItem>;
|
|
12568
|
+
/**
|
|
12569
|
+
* **Get a Win-Back buyer**
|
|
12570
|
+
*
|
|
12571
|
+
* One buyer as "List Win-Back buyers" has them. What the `winback.` webhooks send.
|
|
12572
|
+
*
|
|
12573
|
+
* Needs the `marketing.read` permission (Read Email Marketing).
|
|
12574
|
+
*
|
|
12575
|
+
* @see https://docs.shoply.gg/api-reference/email-marketing/get-a-win-back-buyer
|
|
12576
|
+
*/
|
|
12577
|
+
buyer(buyerId: string, options?: RequestOptions): Promise<WinBackBuyerResult>;
|
|
12578
|
+
}
|
|
12579
|
+
|
|
12580
|
+
export interface ShoplyResourcesSubscribers {
|
|
12581
|
+
/**
|
|
12582
|
+
* **Get subscriber figures**
|
|
12583
|
+
*
|
|
12584
|
+
* `asking`, whether the checkout asks buyers "Email me news and offers", and `figures` for the period: `subscribed` now, `joined` in the period, `asked` (paid orders whose box was shown) and `rate` (the share of those ticked), `unsubscribed` in the period, and `sent`, the emails Cart Recovery and Win-Back sent in it.
|
|
12585
|
+
*
|
|
12586
|
+
* Needs the `marketing.read` permission (Read Email Marketing).
|
|
12587
|
+
*
|
|
12588
|
+
* @see https://docs.shoply.gg/api-reference/email-marketing/get-subscriber-figures
|
|
12589
|
+
*/
|
|
12590
|
+
summary(params?: SubscribersSummaryParams, options?: RequestOptions): Promise<SubscribersSummaryResult>;
|
|
12591
|
+
/**
|
|
12592
|
+
* **Change asking at checkout**
|
|
12593
|
+
*
|
|
12594
|
+
* Whether the checkout shows buyers an unticked box above Pay, "Email me news and offers from" the store, on checkouts they start on the store, in the embed and in the Checkout Kit. Never on an invoice or a payment link. Switched off, nobody new subscribes, and everybody subscribed stays so.
|
|
12595
|
+
*
|
|
12596
|
+
* Needs the `marketing.write` permission (Change Email Marketing).
|
|
12597
|
+
*
|
|
12598
|
+
* @see https://docs.shoply.gg/api-reference/email-marketing/change-asking-at-checkout
|
|
12599
|
+
*/
|
|
12600
|
+
asking(params: SubscribersAskingParams, options?: RequestOptions): Promise<SubscribersAskingResult>;
|
|
12601
|
+
/**
|
|
12602
|
+
* **List subscribers**
|
|
12603
|
+
*
|
|
12604
|
+
* Who said yes to the store's news and offers, newest first, 25 a page: `subscribedAt`, `source` and `where` (the store's checkout, the embed or the Checkout Kit), `orderId` (the order whose box was ticked; they became a subscriber when it was paid), and for one who said no since, `unsubscribedAt` and `unsubscribedBy` (`email`, a link in an email; `seller`; `key`).
|
|
12605
|
+
*
|
|
12606
|
+
* Needs the `marketing.read` permission (Read Email Marketing).
|
|
12607
|
+
*
|
|
12608
|
+
* @see https://docs.shoply.gg/api-reference/email-marketing/list-subscribers
|
|
12609
|
+
*/
|
|
12610
|
+
list(params?: SubscribersListParams, options?: RequestOptions): PagePromise<SubscribersListItem>;
|
|
12611
|
+
/**
|
|
12612
|
+
* **Export subscribers**
|
|
12613
|
+
*
|
|
12614
|
+
* The subscribers the same filters would list, as a CSV file. Add `check=1` for `{ rows }`, how many it would have, which is not counted. A store exports at most 30 files every 10 minutes, every kind together, whoever asks: after that the answer is 429.
|
|
12615
|
+
*
|
|
12616
|
+
* Needs the `marketing.read` permission (Read Email Marketing). It is one of the heavier reads, and is counted against a smaller budget of its own: 60 a minute for each key.
|
|
12617
|
+
*
|
|
12618
|
+
* @see https://docs.shoply.gg/api-reference/email-marketing/export-subscribers
|
|
12619
|
+
*/
|
|
12620
|
+
export(params?: SubscribersExportParams, options?: RequestOptions): Promise<Response>;
|
|
12621
|
+
/**
|
|
12622
|
+
* **Unsubscribe a subscriber**
|
|
12623
|
+
*
|
|
12624
|
+
* No more Win-Back to this address. They become a subscriber again only by ticking the box on another order they pay. 404 for an address that never said yes. Answers the subscriber.
|
|
12625
|
+
*
|
|
12626
|
+
* Needs the `marketing.write` permission (Change Email Marketing).
|
|
12627
|
+
*
|
|
12628
|
+
* @see https://docs.shoply.gg/api-reference/email-marketing/unsubscribe-a-subscriber
|
|
12629
|
+
*/
|
|
12630
|
+
unsubscribe(params: SubscribersUnsubscribeParams, options?: RequestOptions): Promise<SubscribersUnsubscribeResult>;
|
|
12631
|
+
}
|
|
12632
|
+
|
|
11663
12633
|
export interface ShoplyResourcesCustomers {
|
|
11664
12634
|
/**
|
|
11665
12635
|
* **List customers**
|
|
11666
12636
|
*
|
|
11667
|
-
* The store's customers, a page at a time, each with how many orders they have paid for, what they have spent and their
|
|
12637
|
+
* The store's customers, a page at a time, each with how many orders they have paid for, what they have spent, their balance and their `tags`: Shoply's two first (`vip` and `disputed`, worked out from their orders as they are read), then the store's own.
|
|
11668
12638
|
*
|
|
11669
12639
|
* Needs the `customers.read` permission (Read Customers).
|
|
11670
12640
|
*
|
|
@@ -11684,7 +12654,7 @@ export interface ShoplyResourcesCustomers {
|
|
|
11684
12654
|
/**
|
|
11685
12655
|
* **Export customers**
|
|
11686
12656
|
*
|
|
11687
|
-
* The customers the same filters would list, as a CSV file: each one's email, when they were first seen, the orders they paid for and what they spent, their first and last paid order, their store balance,
|
|
12657
|
+
* The customers the same filters would list, as a CSV file: each one's email, when they were first seen, the orders they paid for and what they spent, their first and last paid order, their store balance, their affiliate code and balance where they have one, their tags, and whether they are subscribed to the store's news and offers. Every customer the filters match is in the file, however many: it is sent as it is read. Add `check=1` for `{ rows }`, how many it would have, which is not counted. A store exports at most 30 files every 10 minutes, orders, customers, fraud events and blacklist rules together, whoever asks: after that the answer is 429.
|
|
11688
12658
|
*
|
|
11689
12659
|
* Needs the `customers.read` permission (Read Customers). It is one of the heavier reads, and is counted against a smaller budget of its own: 60 a minute for each key.
|
|
11690
12660
|
*
|
|
@@ -11704,7 +12674,7 @@ export interface ShoplyResourcesCustomers {
|
|
|
11704
12674
|
/**
|
|
11705
12675
|
* **Get a customer**
|
|
11706
12676
|
*
|
|
11707
|
-
* One customer: their orders, their balance and its history, whether they are blacklisted, and their affiliate figures if they are one.
|
|
12677
|
+
* One customer: their orders, their balance and its history, their `tags`, whether they are blacklisted, and their affiliate figures if they are one.
|
|
11708
12678
|
*
|
|
11709
12679
|
* Needs the `customers.read` permission (Read Customers).
|
|
11710
12680
|
*
|
|
@@ -11741,6 +12711,89 @@ export interface ShoplyResourcesCustomers {
|
|
|
11741
12711
|
* @see https://docs.shoply.gg/api-reference/customers/clear-a-customer-from-the-blacklist
|
|
11742
12712
|
*/
|
|
11743
12713
|
unblacklist(customerId: string, params?: CustomersUnblacklistParams, options?: RequestOptions): Promise<CustomersUnblacklistResult>;
|
|
12714
|
+
/**
|
|
12715
|
+
* **Set a customer's tags**
|
|
12716
|
+
*
|
|
12717
|
+
* The customer's own tags become exactly these: any not listed is taken off, any new one is put on, and each is sent as `customer.tagged` or `customer.untagged`. Shoply's two are not set here. Answers their tags.
|
|
12718
|
+
*
|
|
12719
|
+
* Needs the `customers.tags` permission (Change Tags).
|
|
12720
|
+
*
|
|
12721
|
+
* @see https://docs.shoply.gg/api-reference/customers/set-a-customers-tags
|
|
12722
|
+
*/
|
|
12723
|
+
setTags(customerId: string, params: CustomersSetTagsParams, options?: RequestOptions): Promise<CustomersSetTagsResult>;
|
|
12724
|
+
/**
|
|
12725
|
+
* **Put a tag on a customer**
|
|
12726
|
+
*
|
|
12727
|
+
* One of the store's tags on the customer. One they already wear changes nothing. Answers their tags.
|
|
12728
|
+
*
|
|
12729
|
+
* Needs the `customers.tags` permission (Change Tags).
|
|
12730
|
+
*
|
|
12731
|
+
* @see https://docs.shoply.gg/api-reference/customers/put-a-tag-on-a-customer
|
|
12732
|
+
*/
|
|
12733
|
+
tag(customerId: string, tagId: string, options?: RequestOptions): Promise<CustomersTagResult>;
|
|
12734
|
+
/**
|
|
12735
|
+
* **Take a tag off a customer**
|
|
12736
|
+
*
|
|
12737
|
+
* One of the store's tags off the customer. One they do not wear changes nothing. Answers their tags.
|
|
12738
|
+
*
|
|
12739
|
+
* Needs the `customers.tags` permission (Change Tags).
|
|
12740
|
+
*
|
|
12741
|
+
* @see https://docs.shoply.gg/api-reference/customers/take-a-tag-off-a-customer
|
|
12742
|
+
*/
|
|
12743
|
+
untag(customerId: string, tagId: string, options?: RequestOptions): Promise<CustomersUntagResult>;
|
|
12744
|
+
}
|
|
12745
|
+
|
|
12746
|
+
export interface ShoplyResourcesCustomerTags {
|
|
12747
|
+
/**
|
|
12748
|
+
* **List customer tags**
|
|
12749
|
+
*
|
|
12750
|
+
* The store's own tags as `data`, by name, each with `customers`, how many wear it. `meta.automatic` is Shoply's two: VIP's rule (`vipOn`, `vipSpent` in the store's currency, `vipOrders` completed orders, `vipDays` the period, 0 for all time; either number 0 leaves that half out) and `disputedOn`, with `vipCustomers` and `disputedCustomers`, how many wear each today.
|
|
12751
|
+
*
|
|
12752
|
+
* Needs the `customers.read` permission (Read Customers).
|
|
12753
|
+
*
|
|
12754
|
+
* @see https://docs.shoply.gg/api-reference/customers/list-customer-tags
|
|
12755
|
+
*/
|
|
12756
|
+
list(options?: RequestOptions): Promise<CustomerTagsListResult>;
|
|
12757
|
+
/**
|
|
12758
|
+
* **Add a customer tag**
|
|
12759
|
+
*
|
|
12760
|
+
* A tag of the store's own. A store has at most 50. Names are told apart without regard to case, and VIP and Disputed Before are Shoply's.
|
|
12761
|
+
*
|
|
12762
|
+
* Needs the `customers.tags` permission (Change Tags).
|
|
12763
|
+
*
|
|
12764
|
+
* @see https://docs.shoply.gg/api-reference/customers/add-a-customer-tag
|
|
12765
|
+
*/
|
|
12766
|
+
create(params: CustomerTagsCreateParams, options?: RequestOptions): Promise<CustomerTagsCreateResult>;
|
|
12767
|
+
/**
|
|
12768
|
+
* **Change VIP and Disputed Before**
|
|
12769
|
+
*
|
|
12770
|
+
* Shoply's two tags: whether each is put on, and who is a VIP. Both are worked out from a customer's orders whenever they are read, so a change reaches every customer at once. Answers as List customer tags does.
|
|
12771
|
+
*
|
|
12772
|
+
* Needs the `customers.tags` permission (Change Tags).
|
|
12773
|
+
*
|
|
12774
|
+
* @see https://docs.shoply.gg/api-reference/customers/change-vip-and-disputed-before
|
|
12775
|
+
*/
|
|
12776
|
+
automatic(params?: CustomerTagsAutomaticParams, options?: RequestOptions): Promise<CustomerTagsAutomaticResult>;
|
|
12777
|
+
/**
|
|
12778
|
+
* **Change a customer tag**
|
|
12779
|
+
*
|
|
12780
|
+
* Renames a tag or changes its colour, keeping what is not sent. Everybody wearing it keeps it.
|
|
12781
|
+
*
|
|
12782
|
+
* Needs the `customers.tags` permission (Change Tags).
|
|
12783
|
+
*
|
|
12784
|
+
* @see https://docs.shoply.gg/api-reference/customers/change-a-customer-tag
|
|
12785
|
+
*/
|
|
12786
|
+
update(tagId: string, params?: CustomerTagsUpdateParams, options?: RequestOptions): Promise<CustomerTagsUpdateResult>;
|
|
12787
|
+
/**
|
|
12788
|
+
* **Delete a customer tag**
|
|
12789
|
+
*
|
|
12790
|
+
* Deletes a tag and takes it off everybody wearing it. No `customer.untagged` is sent for each. Win-Back narrowed to this tag writes to everybody subscribed again. Answers the tags left.
|
|
12791
|
+
*
|
|
12792
|
+
* Needs the `customers.tags` permission (Change Tags).
|
|
12793
|
+
*
|
|
12794
|
+
* @see https://docs.shoply.gg/api-reference/customers/delete-a-customer-tag
|
|
12795
|
+
*/
|
|
12796
|
+
delete(tagId: string, options?: RequestOptions): Promise<CustomerTagsDeleteResult>;
|
|
11744
12797
|
}
|
|
11745
12798
|
|
|
11746
12799
|
export interface ShoplyResourcesAffiliates {
|
|
@@ -11891,6 +12944,79 @@ export interface ShoplyResourcesAffiliateProgramme {
|
|
|
11891
12944
|
update(params?: AffiliateProgrammeUpdateParams, options?: RequestOptions): Promise<AffiliateProgrammeUpdateResult>;
|
|
11892
12945
|
}
|
|
11893
12946
|
|
|
12947
|
+
export interface ShoplyResourcesTickets {
|
|
12948
|
+
/**
|
|
12949
|
+
* **List support tickets**
|
|
12950
|
+
*
|
|
12951
|
+
* The store's tickets, the latest message first. `status` is `open` (the buyer wrote last: Waiting on You on the dashboard), `answered` (the store did) or `resolved`, with `resolvedBy`: `store`, `buyer`, or `auto` (48 hours after the store's reply with no word from the buyer). `lastFrom` and `lastLine` are the latest message's author and first words, `unread` whether the store has opened it since the buyer last wrote, and `orderId` the order it is about, where the buyer picked one. `meta.on` is whether the store takes tickets (off, buyers can open none and the panel shows no Support), and `meta.figures` the dashboard's four: tickets waiting on the store and when the oldest was written, open ones, the average minutes to a first reply over the last 30 days and the 30 before, and how many were resolved in the last 30 days.
|
|
12952
|
+
*
|
|
12953
|
+
* Needs the `tickets.read` permission (Read Support Tickets).
|
|
12954
|
+
*
|
|
12955
|
+
* @see https://docs.shoply.gg/api-reference/support-tickets/list-support-tickets
|
|
12956
|
+
*/
|
|
12957
|
+
list(params?: TicketsListParams, options?: RequestOptions): PagePromise<TicketsListItem>;
|
|
12958
|
+
/**
|
|
12959
|
+
* **Switch Support Tickets on or off**
|
|
12960
|
+
*
|
|
12961
|
+
* Off for every store until switched on. Off, buyers can open no ticket and write on none, the customer panel shows no Support, and the store can resolve and reopen but not reply. The tickets are kept.
|
|
12962
|
+
*
|
|
12963
|
+
* Needs the `tickets.write` permission (Answer Support Tickets).
|
|
12964
|
+
*
|
|
12965
|
+
* @see https://docs.shoply.gg/api-reference/support-tickets/switch-support-tickets-on-or-off
|
|
12966
|
+
*/
|
|
12967
|
+
settings(params: TicketsSettingsParams, options?: RequestOptions): Promise<TicketsSettingsResult>;
|
|
12968
|
+
/**
|
|
12969
|
+
* **Get a support ticket**
|
|
12970
|
+
*
|
|
12971
|
+
* A ticket with its `conversation`, oldest first: each message's `from` (`buyer` or `store`), `body` (Markdown, as written), `html` (the body as Markdown draws it, escaped: links only to the web or an email, each opening in a new tab, and a picture written in Markdown a link, never loaded), `pictures` (each one's `name` and the `url` the dashboard reads it at; read it with Get a ticket's picture) and `createdAt`. `customer` is who wrote it, with their tags, `order` the order it is about, `orders` their five latest, and `canReopenUntil` the last moment the buyer can open a resolved ticket again by writing on it. Reading a ticket marks it read, as opening it on the dashboard does.
|
|
12972
|
+
*
|
|
12973
|
+
* Needs the `tickets.read` permission (Read Support Tickets).
|
|
12974
|
+
*
|
|
12975
|
+
* @see https://docs.shoply.gg/api-reference/support-tickets/get-a-support-ticket
|
|
12976
|
+
*/
|
|
12977
|
+
get(ticketId: string, options?: RequestOptions): Promise<TicketsGetResult>;
|
|
12978
|
+
/**
|
|
12979
|
+
* **Reply to a support ticket**
|
|
12980
|
+
*
|
|
12981
|
+
* Writes on the ticket as the store, which the buyer reads in their customer panel and is emailed (at most once a ticket in 15 minutes; what is written meanwhile follows when they are over). A reply to a resolved ticket opens it again, unless `resolve` is true. Refused with `tickets_off` while the store takes no tickets, since the buyer could not read it. Answers the ticket as Get a support ticket does.
|
|
12982
|
+
*
|
|
12983
|
+
* Needs the `tickets.write` permission (Answer Support Tickets).
|
|
12984
|
+
*
|
|
12985
|
+
* @see https://docs.shoply.gg/api-reference/support-tickets/reply-to-a-support-ticket
|
|
12986
|
+
*/
|
|
12987
|
+
reply(ticketId: string, params: TicketsReplyParams, options?: RequestOptions): Promise<TicketsReplyResult>;
|
|
12988
|
+
/**
|
|
12989
|
+
* **Resolve a support ticket**
|
|
12990
|
+
*
|
|
12991
|
+
* Marks it resolved, by the store. The buyer can still write on it for 30 days, which opens it again. One already resolved is left as it is.
|
|
12992
|
+
*
|
|
12993
|
+
* Needs the `tickets.write` permission (Answer Support Tickets).
|
|
12994
|
+
*
|
|
12995
|
+
* @see https://docs.shoply.gg/api-reference/support-tickets/resolve-a-support-ticket
|
|
12996
|
+
*/
|
|
12997
|
+
resolve(ticketId: string, options?: RequestOptions): Promise<TicketsResolveResult>;
|
|
12998
|
+
/**
|
|
12999
|
+
* **Reopen a support ticket**
|
|
13000
|
+
*
|
|
13001
|
+
* Opens a resolved ticket again: `open` where the buyer wrote last, else `answered`. One that is not resolved is left as it is.
|
|
13002
|
+
*
|
|
13003
|
+
* Needs the `tickets.write` permission (Answer Support Tickets).
|
|
13004
|
+
*
|
|
13005
|
+
* @see https://docs.shoply.gg/api-reference/support-tickets/reopen-a-support-ticket
|
|
13006
|
+
*/
|
|
13007
|
+
reopen(ticketId: string, options?: RequestOptions): Promise<TicketsReopenResult>;
|
|
13008
|
+
/**
|
|
13009
|
+
* **Get a ticket's picture**
|
|
13010
|
+
*
|
|
13011
|
+
* A picture sent in the conversation: a PNG, JPEG or WebP of up to 5 MB, read out of the picture itself when it was sent.
|
|
13012
|
+
*
|
|
13013
|
+
* Needs the `tickets.read` permission (Read Support Tickets).
|
|
13014
|
+
*
|
|
13015
|
+
* @see https://docs.shoply.gg/api-reference/support-tickets/get-a-tickets-picture
|
|
13016
|
+
*/
|
|
13017
|
+
picture(ticketId: string, name: string, options?: RequestOptions): Promise<Response>;
|
|
13018
|
+
}
|
|
13019
|
+
|
|
11894
13020
|
export interface ShoplyResourcesBlacklist {
|
|
11895
13021
|
/**
|
|
11896
13022
|
* **List blacklist rules**
|
|
@@ -12014,7 +13140,7 @@ export interface ShoplyResourcesDisputes {
|
|
|
12014
13140
|
/**
|
|
12015
13141
|
* **List disputes**
|
|
12016
13142
|
*
|
|
12017
|
-
* The disputes buyers opened on the store's payments, as their payment providers reported them: the ones that need an answer first, soonest deadline first, then the rest newest first. `status` is how it reads on the dashboard: `needs_response`, `under_review`, `won`, `lost`, `accepted` or `closed` (ended with no chargeback). `providerStatus` is the provider's own last word, `stage` is `inquiry`, `chargeback`, `claim` (a PayPal case), `pre_arbitration` or `arbitration`, and `dueAt` when the provider stops taking an answer, where it says. `answeredFrom` is where it is answered: `here` (Stripe's,
|
|
13143
|
+
* The disputes buyers opened on the store's payments, as their payment providers reported them: the ones that need an answer first, soonest deadline first, then the rest newest first. `status` is how it reads on the dashboard: `needs_response`, `under_review`, `won`, `lost`, `accepted` or `closed` (ended with no chargeback). `providerStatus` is the provider's own last word, `stage` is `inquiry`, `chargeback`, `claim` (a PayPal case), `pre_arbitration` or `arbitration`, and `dueAt` when the provider stops taking an answer, where it says. `answeredFrom` is where it is answered: `here` (through this API: Stripe's, Revolut's, Adyen's, and PayPal's where PayPal is connected with API keys), `provider` (in the provider's own dashboard, named in `answerPlace`) or `none`. `meta.figures` is the dashboard's four: how many need an answer and how many are due within three days, the money in the open ones in the store's currency, how many ended won and lost in the last 90 days, and the orders disputed beside those that took money in that time.
|
|
12018
13144
|
*
|
|
12019
13145
|
* Needs the `disputes.read` permission (Read Disputes).
|
|
12020
13146
|
*
|
|
@@ -12064,7 +13190,7 @@ export interface ShoplyResourcesDisputes {
|
|
|
12064
13190
|
/**
|
|
12065
13191
|
* **Submit a dispute's answer**
|
|
12066
13192
|
*
|
|
12067
|
-
* Sends a
|
|
13193
|
+
* Sends a dispute's answer to its provider, once: what Shoply recorded, Shoply's PDF of it, the store's own files, and the statement, in each provider's own shape. Stripe's evidence fields; Revolut's files and a challenge whose comment is the statement's first 250 characters; PayPal's evidence, appeal or supporting information, whichever the dispute takes now, with the statement as its notes; Adyen's documents under a defense reason, the statement in the PDF. It cannot be taken back. Any draft fields in the body are saved first. Answers 409 `answered_elsewhere` for a dispute answered in its provider's own dashboard, `not_answerable` for one not waiting on an answer, `past_due` once its deadline has passed, and `file_not_taken` for one of the store's files the provider does not take (Adyen takes no PNG, and a PDF of up to 2 MB). The provider refusing it is 502, with `stripe_key` or `provider_key` where the store's key or app may not answer disputes, and `provider_refused` otherwise, the dispute back to a draft with `answer.note` saying why. A store sends at most 20 answers or acceptances every 10 minutes.
|
|
12068
13194
|
*
|
|
12069
13195
|
* Needs the `disputes.write` permission (Answer Disputes).
|
|
12070
13196
|
*
|
|
@@ -12074,7 +13200,7 @@ export interface ShoplyResourcesDisputes {
|
|
|
12074
13200
|
/**
|
|
12075
13201
|
* **Accept a dispute**
|
|
12076
13202
|
*
|
|
12077
|
-
* Concedes a
|
|
13203
|
+
* Concedes a dispute in its provider (Stripe, Revolut, Adyen, or PayPal's claim, which PayPal refunds from the store's account): the buyer keeps the money and the order becomes a chargeback. Cannot be undone. Answers as Submit does when it cannot be done, and counts toward the same 20 every 10 minutes.
|
|
12078
13204
|
*
|
|
12079
13205
|
* Needs the `disputes.write` permission (Answer Disputes).
|
|
12080
13206
|
*
|
|
@@ -12104,7 +13230,7 @@ export interface ShoplyResourcesDisputes {
|
|
|
12104
13230
|
/**
|
|
12105
13231
|
* **Add a file to a dispute's answer**
|
|
12106
13232
|
*
|
|
12107
|
-
* One of the store's own files for the answer, sent as `multipart/form-data` in a field called `file`: a PDF, a PNG or a JPEG, its type read from the file itself. One of each `kind`, a new one in place of the one there was, and all of a dispute's files together up to 4 MB, which with Shoply's PDF is within Stripe's limit. Sent to Stripe as `customer_communication`, `receipt` and `service_documentation
|
|
13233
|
+
* One of the store's own files for the answer, sent as `multipart/form-data` in a field called `file`: a PDF, a PNG or a JPEG, its type read from the file itself. One of each `kind`, a new one in place of the one there was, and all of a dispute's files together up to 4 MB, which with Shoply's PDF is within Stripe's limit. Sent to Stripe as `customer_communication`, `receipt` and `service_documentation`, and to Revolut, PayPal and Adyen beside Shoply's PDF. For a dispute answered to Adyen, a PNG is refused as `invalid_type`, and a PDF over 2 MB as `too_large`: Adyen takes neither. A store adds at most 30 files every 10 minutes.
|
|
12108
13234
|
*
|
|
12109
13235
|
* Needs the `disputes.write` permission (Answer Disputes).
|
|
12110
13236
|
*
|
|
@@ -12154,7 +13280,7 @@ export interface ShoplyResourcesDisputes {
|
|
|
12154
13280
|
/**
|
|
12155
13281
|
* **Change dispute settings**
|
|
12156
13282
|
*
|
|
12157
|
-
* Changes the settings named and keeps the rest. Accepting small ones and submitting before the deadline are Stripe's
|
|
13283
|
+
* Changes the settings named and keeps the rest. Accepting small ones and submitting before the deadline are for disputes answered from Shoply (Stripe's, Revolut's, Adyen's, and PayPal's with API keys), and run every few minutes: a dispute under `acceptUnder` that nobody has started an answer for is accepted, and with a day left an answer is submitted as it stands, or where there is none, only when the buyer opened their order or took a file from the address they paid from. Nothing over `askAbove` is sent or accepted by itself where `askAboveOn` is on.
|
|
12158
13284
|
*
|
|
12159
13285
|
* Needs the `disputes.write` permission (Answer Disputes).
|
|
12160
13286
|
*
|
|
@@ -12700,9 +13826,13 @@ export interface ShoplyResources {
|
|
|
12700
13826
|
brokenLinks: ShoplyResourcesBrokenLinks;
|
|
12701
13827
|
sitemap: ShoplyResourcesSitemap;
|
|
12702
13828
|
cartRecovery: ShoplyResourcesCartRecovery;
|
|
13829
|
+
winBack: ShoplyResourcesWinBack;
|
|
13830
|
+
subscribers: ShoplyResourcesSubscribers;
|
|
12703
13831
|
customers: ShoplyResourcesCustomers;
|
|
13832
|
+
customerTags: ShoplyResourcesCustomerTags;
|
|
12704
13833
|
affiliates: ShoplyResourcesAffiliates;
|
|
12705
13834
|
affiliateProgramme: ShoplyResourcesAffiliateProgramme;
|
|
13835
|
+
tickets: ShoplyResourcesTickets;
|
|
12706
13836
|
blacklist: ShoplyResourcesBlacklist;
|
|
12707
13837
|
fraudEvents: ShoplyResourcesFraudEvents;
|
|
12708
13838
|
fraudSettings: ShoplyResourcesFraudSettings;
|
|
@@ -12889,10 +14019,74 @@ export interface ShoplyCustomerResourcesSubscriptions {
|
|
|
12889
14019
|
card(subscriptionId: string, options?: RequestOptions): Promise<CustomerSubscriptionsCardResult>;
|
|
12890
14020
|
}
|
|
12891
14021
|
|
|
14022
|
+
export interface ShoplyCustomerResourcesTickets {
|
|
14023
|
+
/**
|
|
14024
|
+
* **List support tickets**
|
|
14025
|
+
*
|
|
14026
|
+
* The buyer's support tickets at the store, the latest message first. `status` is `open` (waiting on the store), `answered` or `resolved`. `meta.on` is whether the store takes tickets (off, the list is empty and nothing can be opened), `meta.canOpen` whether the buyer may open one now (one open ticket at a time), `meta.orders` the orders a ticket can be about, each with its `label`, and `meta.limits` what a message may hold.
|
|
14027
|
+
*
|
|
14028
|
+
* Needs the buyer's token: `Authorization: Bearer shoply_ct_...`, from Sign in with the code.
|
|
14029
|
+
*
|
|
14030
|
+
* It is counted for the buyer's token: 300 reads in ten minutes.
|
|
14031
|
+
*
|
|
14032
|
+
* @see https://docs.shoply.gg/api-reference/customer-api/list-support-tickets
|
|
14033
|
+
*/
|
|
14034
|
+
list(options?: RequestOptions): Promise<CustomerTicketsListResult>;
|
|
14035
|
+
/**
|
|
14036
|
+
* **Open a support ticket**
|
|
14037
|
+
*
|
|
14038
|
+
* Opens a ticket with its first message, which the store is told of. One open ticket a buyer at a time (`ticket_open`), 250 open at a store (`store_full`), and 100 messages a day a buyer (`daily_limit`). Refused with `tickets_off` where the store takes none. Pictures are sent from the customer panel. Answers the ticket as Get a support ticket does, and the list in `meta`.
|
|
14039
|
+
*
|
|
14040
|
+
* Needs the buyer's token: `Authorization: Bearer shoply_ct_...`, from Sign in with the code.
|
|
14041
|
+
*
|
|
14042
|
+
* It is counted for the buyer's token: 30 changes in ten minutes.
|
|
14043
|
+
*
|
|
14044
|
+
* @see https://docs.shoply.gg/api-reference/customer-api/open-a-support-ticket
|
|
14045
|
+
*/
|
|
14046
|
+
create(params: CustomerTicketsCreateParams, options?: RequestOptions): Promise<CustomerTicketsCreateResult>;
|
|
14047
|
+
/**
|
|
14048
|
+
* **Get a support ticket**
|
|
14049
|
+
*
|
|
14050
|
+
* A ticket with its `conversation`, oldest first: each message's `from` (`buyer` or `store`), `body` (Markdown, as written), `html` (the body as Markdown draws it, escaped, which is safe to show as it is), `pictures` and `createdAt`. A picture is named here and shown in the customer panel. `canReopenUntil` is the last moment writing on a resolved ticket opens it again.
|
|
14051
|
+
*
|
|
14052
|
+
* Needs the buyer's token: `Authorization: Bearer shoply_ct_...`, from Sign in with the code.
|
|
14053
|
+
*
|
|
14054
|
+
* It is counted for the buyer's token: 300 reads in ten minutes.
|
|
14055
|
+
*
|
|
14056
|
+
* @see https://docs.shoply.gg/api-reference/customer-api/get-a-support-ticket
|
|
14057
|
+
*/
|
|
14058
|
+
show(ticketId: string, options?: RequestOptions): Promise<CustomerTicketsShowResult>;
|
|
14059
|
+
/**
|
|
14060
|
+
* **Write on a support ticket**
|
|
14061
|
+
*
|
|
14062
|
+
* Writes on the ticket as the buyer, which the store is told of. On a resolved ticket within 30 days it opens it again, if the buyer has no other open ticket; after that, `too_old`. Answers the ticket.
|
|
14063
|
+
*
|
|
14064
|
+
* Needs the buyer's token: `Authorization: Bearer shoply_ct_...`, from Sign in with the code.
|
|
14065
|
+
*
|
|
14066
|
+
* It is counted for the buyer's token: 30 changes in ten minutes.
|
|
14067
|
+
*
|
|
14068
|
+
* @see https://docs.shoply.gg/api-reference/customer-api/write-on-a-support-ticket
|
|
14069
|
+
*/
|
|
14070
|
+
reply(ticketId: string, params: CustomerTicketsReplyParams, options?: RequestOptions): Promise<CustomerTicketsReplyResult>;
|
|
14071
|
+
/**
|
|
14072
|
+
* **Resolve a support ticket**
|
|
14073
|
+
*
|
|
14074
|
+
* Marks the buyer's ticket resolved, as their "Mark as Resolved" does. Answers the ticket.
|
|
14075
|
+
*
|
|
14076
|
+
* Needs the buyer's token: `Authorization: Bearer shoply_ct_...`, from Sign in with the code.
|
|
14077
|
+
*
|
|
14078
|
+
* It is counted for the buyer's token: 30 changes in ten minutes.
|
|
14079
|
+
*
|
|
14080
|
+
* @see https://docs.shoply.gg/api-reference/customer-api/resolve-a-support-ticket
|
|
14081
|
+
*/
|
|
14082
|
+
resolve(ticketId: string, options?: RequestOptions): Promise<CustomerTicketsResolveResult>;
|
|
14083
|
+
}
|
|
14084
|
+
|
|
12892
14085
|
export interface ShoplyCustomerResources {
|
|
12893
14086
|
orders: ShoplyCustomerResourcesOrders;
|
|
12894
14087
|
affiliate: ShoplyCustomerResourcesAffiliate;
|
|
12895
14088
|
subscriptions: ShoplyCustomerResourcesSubscriptions;
|
|
14089
|
+
tickets: ShoplyCustomerResourcesTickets;
|
|
12896
14090
|
/**
|
|
12897
14091
|
* **Send a sign-in code**
|
|
12898
14092
|
*
|
|
@@ -12926,6 +14120,8 @@ export interface ShoplyCustomerResources {
|
|
|
12926
14120
|
*
|
|
12927
14121
|
* Everything the customer panel's first page shows: the buyer's email, what they have spent, their store balance, their 200 newest orders, and the downloads, files and setup instructions their paid orders hand over.
|
|
12928
14122
|
*
|
|
14123
|
+
* `downloads.files` and `downloads.instructions` are every paid order's together. `downloads.orders` is the same an order at a time, newest first, as the customer panel shows it: each with what it bought, its own files and its own instructions. The store's `buttons` and `general` notes go with every order.
|
|
14124
|
+
*
|
|
12929
14125
|
* `affiliate` is null unless the store has an affiliate programme the buyer is in or may join, and `subscriptions` says whether they have ever had one. Keys are not listed here: Get an order has them.
|
|
12930
14126
|
*
|
|
12931
14127
|
* Needs the buyer's token: `Authorization: Bearer shoply_ct_...`, from Sign in with the code.
|
|
@@ -12985,6 +14181,8 @@ export type WebhookEventName =
|
|
|
12985
14181
|
| "product.deleted"
|
|
12986
14182
|
| "customer.created"
|
|
12987
14183
|
| "customer.balance_changed"
|
|
14184
|
+
| "customer.tagged"
|
|
14185
|
+
| "customer.untagged"
|
|
12988
14186
|
| "affiliate.created"
|
|
12989
14187
|
| "affiliate.payout_requested"
|
|
12990
14188
|
| "affiliate.payout_answered"
|
|
@@ -12999,6 +14197,10 @@ export type WebhookEventName =
|
|
|
12999
14197
|
| "cart.email_sent"
|
|
13000
14198
|
| "cart.recovered"
|
|
13001
14199
|
| "cart.unsubscribed"
|
|
14200
|
+
| "winback.email_sent"
|
|
14201
|
+
| "winback.won_back"
|
|
14202
|
+
| "subscriber.subscribed"
|
|
14203
|
+
| "subscriber.unsubscribed"
|
|
13002
14204
|
| "routing.processor_paused"
|
|
13003
14205
|
| "routing.processor_resumed"
|
|
13004
14206
|
| "dispute.opened"
|
|
@@ -13008,6 +14210,10 @@ export type WebhookEventName =
|
|
|
13008
14210
|
| "dispute.closed"
|
|
13009
14211
|
| "app.connected"
|
|
13010
14212
|
| "app.disconnected"
|
|
14213
|
+
| "ticket.opened"
|
|
14214
|
+
| "ticket.message"
|
|
14215
|
+
| "ticket.resolved"
|
|
14216
|
+
| "ticket.reopened"
|
|
13011
14217
|
| "fraud.checkout_blocked"
|
|
13012
14218
|
| "webhook.test";
|
|
13013
14219
|
|
|
@@ -13136,15 +14342,27 @@ export interface WebhookEventData {
|
|
|
13136
14342
|
/**
|
|
13137
14343
|
* An email address became a customer of the store.
|
|
13138
14344
|
*
|
|
13139
|
-
* `data`: `id`, `emailAddress`, `balance` and `dateCreated`.
|
|
14345
|
+
* `data`: `id`, `emailAddress`, `balance`, `tags` and `dateCreated`. `customer.tagged` and `customer.untagged` add `tag`, the one put on or taken off: `id`, `name`, `tone` and `automatic` (Shoply's own two are `vip` and `disputed`).
|
|
13140
14346
|
*/
|
|
13141
14347
|
"customer.created": Record<string, unknown>;
|
|
13142
14348
|
/**
|
|
13143
14349
|
* A customer's store balance changed: it was spent, credited, refunded to or set.
|
|
13144
14350
|
*
|
|
13145
|
-
* `data`: `id`, `emailAddress`, `balance` and `dateCreated`.
|
|
14351
|
+
* `data`: `id`, `emailAddress`, `balance`, `tags` and `dateCreated`. `customer.tagged` and `customer.untagged` add `tag`, the one put on or taken off: `id`, `name`, `tone` and `automatic` (Shoply's own two are `vip` and `disputed`).
|
|
13146
14352
|
*/
|
|
13147
14353
|
"customer.balance_changed": Record<string, unknown>;
|
|
14354
|
+
/**
|
|
14355
|
+
* A tag was put on a customer: one of the store's own, by hand or by a key; VIP, by the sale that made them one; or Disputed Before, by their first dispute.
|
|
14356
|
+
*
|
|
14357
|
+
* `data`: `id`, `emailAddress`, `balance`, `tags` and `dateCreated`. `customer.tagged` and `customer.untagged` add `tag`, the one put on or taken off: `id`, `name`, `tone` and `automatic` (Shoply's own two are `vip` and `disputed`).
|
|
14358
|
+
*/
|
|
14359
|
+
"customer.tagged": Record<string, unknown>;
|
|
14360
|
+
/**
|
|
14361
|
+
* One of the store's own tags was taken off a customer, by hand or by a key. A tag deleted, and VIP ending because its period moved on, are not sent.
|
|
14362
|
+
*
|
|
14363
|
+
* `data`: `id`, `emailAddress`, `balance`, `tags` and `dateCreated`. `customer.tagged` and `customer.untagged` add `tag`, the one put on or taken off: `id`, `name`, `tone` and `automatic` (Shoply's own two are `vip` and `disputed`).
|
|
14364
|
+
*/
|
|
14365
|
+
"customer.untagged": Record<string, unknown>;
|
|
13148
14366
|
/**
|
|
13149
14367
|
* A customer became an affiliate, added by the store or by joining.
|
|
13150
14368
|
*
|
|
@@ -13229,6 +14447,30 @@ export interface WebhookEventData {
|
|
|
13229
14447
|
* `data`: The checkout that was left, as [List carts](https://docs.shoply.gg/api-reference/cart-recovery/list-carts) answers it: `state` says which email it last had, and `recoveredOrderId` the order that paid.
|
|
13230
14448
|
*/
|
|
13231
14449
|
"cart.unsubscribed": CartRecoveryCartsItem & Record<string, unknown>;
|
|
14450
|
+
/**
|
|
14451
|
+
* Win-Back emailed a subscriber who has not ordered in a while: the first email or the second.
|
|
14452
|
+
*
|
|
14453
|
+
* `data`: The buyer, as [List Win-Back buyers](https://docs.shoply.gg/api-reference/email-marketing/list-win-back-buyers) answers it: `state` says which email they last had, and `wonOrderId` the order that brought them back.
|
|
14454
|
+
*/
|
|
14455
|
+
"winback.email_sent": WinBackBuyersItem & Record<string, unknown>;
|
|
14456
|
+
/**
|
|
14457
|
+
* A buyer Win-Back emailed placed an order within 14 days of the email, and it was paid.
|
|
14458
|
+
*
|
|
14459
|
+
* `data`: The buyer, as [List Win-Back buyers](https://docs.shoply.gg/api-reference/email-marketing/list-win-back-buyers) answers it: `state` says which email they last had, and `wonOrderId` the order that brought them back.
|
|
14460
|
+
*/
|
|
14461
|
+
"winback.won_back": WinBackBuyersItem & Record<string, unknown>;
|
|
14462
|
+
/**
|
|
14463
|
+
* A buyer who ticked the store's box at checkout, "Email me news and offers", paid that order, and is a subscriber.
|
|
14464
|
+
*
|
|
14465
|
+
* `data`: The subscriber, as [List subscribers](https://docs.shoply.gg/api-reference/email-marketing/list-subscribers) answers it: `email`, `customerId`, `subscribed`, `subscribedAt`, `source`, `orderId` (the order whose box was ticked), `unsubscribedAt` and `unsubscribedBy`.
|
|
14466
|
+
*/
|
|
14467
|
+
"subscriber.subscribed": SubscribersListItem & Record<string, unknown>;
|
|
14468
|
+
/**
|
|
14469
|
+
* A subscriber is one no longer: they unsubscribed from a Win-Back or Cart Recovery email, or the store or a key took them off.
|
|
14470
|
+
*
|
|
14471
|
+
* `data`: The subscriber, as [List subscribers](https://docs.shoply.gg/api-reference/email-marketing/list-subscribers) answers it: `email`, `customerId`, `subscribed`, `subscribedAt`, `source`, `orderId` (the order whose box was ticked), `unsubscribedAt` and `unsubscribedBy`.
|
|
14472
|
+
*/
|
|
14473
|
+
"subscriber.unsubscribed": SubscribersListItem & Record<string, unknown>;
|
|
13232
14474
|
/**
|
|
13233
14475
|
* Payment Routing stopped giving checkouts to one of the store's card processors: its keys stopped working, or too many of its last payments were declined.
|
|
13234
14476
|
*
|
|
@@ -13283,6 +14525,30 @@ export interface WebhookEventData {
|
|
|
13283
14525
|
* `data`: `id` (the connection), `appId`, `name`, `maker`, `website`, `scopes` (what the owner approved), `connectedAt`, and for `app.disconnected` `disconnectedAt` and `reason`: `seller`, `app`, `deleted`, or `code_reused` (the app's approval was offered twice, so its token was ended).
|
|
13284
14526
|
*/
|
|
13285
14527
|
"app.disconnected": Record<string, unknown>;
|
|
14528
|
+
/**
|
|
14529
|
+
* A buyer opened a support ticket from the customer panel, or the store's own site through the customer API.
|
|
14530
|
+
*
|
|
14531
|
+
* `data`: The ticket, as [Get a support ticket](https://docs.shoply.gg/api-reference/support-tickets/get-a-support-ticket) answers it without its conversation: `status` is `open` (the buyer wrote last), `answered` or `resolved`, and `resolvedBy` says who resolved it (`store`, `buyer` or `auto`). `ticket.message` adds `message`: its `id`, `from` (`buyer` or `store`), `body`, `pictures` (each one's `name`, read with a key) and `createdAt`.
|
|
14532
|
+
*/
|
|
14533
|
+
"ticket.opened": TicketsGetResult & Record<string, unknown>;
|
|
14534
|
+
/**
|
|
14535
|
+
* A message was written on a ticket, by the buyer or the store. Not sent for the message a ticket is opened with: that is `ticket.opened`.
|
|
14536
|
+
*
|
|
14537
|
+
* `data`: The ticket, as [Get a support ticket](https://docs.shoply.gg/api-reference/support-tickets/get-a-support-ticket) answers it without its conversation: `status` is `open` (the buyer wrote last), `answered` or `resolved`, and `resolvedBy` says who resolved it (`store`, `buyer` or `auto`). `ticket.message` adds `message`: its `id`, `from` (`buyer` or `store`), `body`, `pictures` (each one's `name`, read with a key) and `createdAt`.
|
|
14538
|
+
*/
|
|
14539
|
+
"ticket.message": Record<string, unknown>;
|
|
14540
|
+
/**
|
|
14541
|
+
* A ticket was marked resolved: by the store, by the buyer, or by itself 48 hours after the store's reply with no word from the buyer.
|
|
14542
|
+
*
|
|
14543
|
+
* `data`: The ticket, as [Get a support ticket](https://docs.shoply.gg/api-reference/support-tickets/get-a-support-ticket) answers it without its conversation: `status` is `open` (the buyer wrote last), `answered` or `resolved`, and `resolvedBy` says who resolved it (`store`, `buyer` or `auto`). `ticket.message` adds `message`: its `id`, `from` (`buyer` or `store`), `body`, `pictures` (each one's `name`, read with a key) and `createdAt`.
|
|
14544
|
+
*/
|
|
14545
|
+
"ticket.resolved": TicketsGetResult & Record<string, unknown>;
|
|
14546
|
+
/**
|
|
14547
|
+
* A resolved ticket was opened again: the buyer wrote on it within 30 days, or the store reopened it.
|
|
14548
|
+
*
|
|
14549
|
+
* `data`: The ticket, as [Get a support ticket](https://docs.shoply.gg/api-reference/support-tickets/get-a-support-ticket) answers it without its conversation: `status` is `open` (the buyer wrote last), `answered` or `resolved`, and `resolvedBy` says who resolved it (`store`, `buyer` or `auto`). `ticket.message` adds `message`: its `id`, `from` (`buyer` or `store`), `body`, `pictures` (each one's `name`, read with a key) and `createdAt`.
|
|
14550
|
+
*/
|
|
14551
|
+
"ticket.reopened": TicketsGetResult & Record<string, unknown>;
|
|
13286
14552
|
/**
|
|
13287
14553
|
* A checkout was turned away by the blacklist, a blocked country, the VPN rule or the limit on unpaid orders. The same buyer turned away again for the same reason within ten minutes is not sent again.
|
|
13288
14554
|
*
|