@shoplygg/node 0.2.0 → 0.4.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/generated/api.d.ts +1284 -44
- 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,295 @@ 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
|
+
pictures: unknown[] | Record<string, unknown>;
|
|
6742
|
+
createdAt: string;
|
|
6743
|
+
}>;
|
|
6744
|
+
canReopenUntil: unknown;
|
|
6745
|
+
limits: {
|
|
6746
|
+
body: number;
|
|
6747
|
+
subject: number;
|
|
6748
|
+
picturesPerMessage: number;
|
|
6749
|
+
picturesPerTicket: number;
|
|
6750
|
+
pictureBytes: number;
|
|
6751
|
+
};
|
|
6752
|
+
customer: {
|
|
6753
|
+
id: unknown;
|
|
6754
|
+
email: string;
|
|
6755
|
+
tags: unknown[] | Record<string, unknown>;
|
|
6756
|
+
};
|
|
6757
|
+
order: {
|
|
6758
|
+
id: string;
|
|
6759
|
+
status: string;
|
|
6760
|
+
amount: string;
|
|
6761
|
+
};
|
|
6762
|
+
orders: {
|
|
6763
|
+
id: string;
|
|
6764
|
+
status: string;
|
|
6765
|
+
amount: string;
|
|
6766
|
+
products: string[];
|
|
6767
|
+
createdAt: string;
|
|
6768
|
+
}[];
|
|
6769
|
+
on: boolean;
|
|
6770
|
+
};
|
|
6771
|
+
|
|
6772
|
+
/** What reply to a support ticket takes: `tickets.reply`. */
|
|
6773
|
+
export interface TicketsReplyParams {
|
|
6774
|
+
/** The reply, up to 500 characters. */
|
|
6775
|
+
message: string;
|
|
6776
|
+
/**
|
|
6777
|
+
* Mark the ticket resolved with the reply.
|
|
6778
|
+
*
|
|
6779
|
+
* Left out, it is false.
|
|
6780
|
+
*/
|
|
6781
|
+
resolve?: boolean;
|
|
6782
|
+
}
|
|
6783
|
+
|
|
6784
|
+
/** What reply to a support ticket answers: `tickets.reply`. */
|
|
6785
|
+
export type TicketsReplyResult = {
|
|
6786
|
+
id: string;
|
|
6787
|
+
email: string;
|
|
6788
|
+
customerId: unknown;
|
|
6789
|
+
orderId: string;
|
|
6790
|
+
subject: string;
|
|
6791
|
+
status: string;
|
|
6792
|
+
messages: number;
|
|
6793
|
+
pictures: number;
|
|
6794
|
+
lastMessageAt: string;
|
|
6795
|
+
lastFrom: string;
|
|
6796
|
+
lastLine: string;
|
|
6797
|
+
unread: boolean;
|
|
6798
|
+
firstReplyAt: string;
|
|
6799
|
+
answeredAt: string;
|
|
6800
|
+
resolvedAt: unknown;
|
|
6801
|
+
resolvedBy: unknown;
|
|
6802
|
+
createdAt: string;
|
|
6803
|
+
updatedAt: string;
|
|
6804
|
+
conversation: Array<{
|
|
6805
|
+
id: string;
|
|
6806
|
+
from: string;
|
|
6807
|
+
body: string;
|
|
6808
|
+
pictures: unknown[] | Record<string, unknown>;
|
|
6809
|
+
createdAt: string;
|
|
6810
|
+
}>;
|
|
6811
|
+
canReopenUntil: unknown;
|
|
6812
|
+
limits: {
|
|
6813
|
+
body: number;
|
|
6814
|
+
subject: number;
|
|
6815
|
+
picturesPerMessage: number;
|
|
6816
|
+
picturesPerTicket: number;
|
|
6817
|
+
pictureBytes: number;
|
|
6818
|
+
};
|
|
6819
|
+
customer: {
|
|
6820
|
+
id: unknown;
|
|
6821
|
+
email: string;
|
|
6822
|
+
tags: unknown[] | Record<string, unknown>;
|
|
6823
|
+
};
|
|
6824
|
+
order: {
|
|
6825
|
+
id: string;
|
|
6826
|
+
status: string;
|
|
6827
|
+
amount: string;
|
|
6828
|
+
};
|
|
6829
|
+
orders: {
|
|
6830
|
+
id: string;
|
|
6831
|
+
status: string;
|
|
6832
|
+
amount: string;
|
|
6833
|
+
products: string[];
|
|
6834
|
+
createdAt: string;
|
|
6835
|
+
}[];
|
|
6836
|
+
on: boolean;
|
|
6837
|
+
};
|
|
6838
|
+
|
|
6839
|
+
/** What resolve a support ticket answers: `tickets.resolve`. */
|
|
6840
|
+
export type TicketsResolveResult = {
|
|
6841
|
+
id: string;
|
|
6842
|
+
email: string;
|
|
6843
|
+
customerId: unknown;
|
|
6844
|
+
orderId: string;
|
|
6845
|
+
subject: string;
|
|
6846
|
+
status: string;
|
|
6847
|
+
messages: number;
|
|
6848
|
+
pictures: number;
|
|
6849
|
+
lastMessageAt: string;
|
|
6850
|
+
lastFrom: string;
|
|
6851
|
+
lastLine: string;
|
|
6852
|
+
unread: boolean;
|
|
6853
|
+
firstReplyAt: string;
|
|
6854
|
+
answeredAt: string;
|
|
6855
|
+
resolvedAt: string;
|
|
6856
|
+
resolvedBy: string;
|
|
6857
|
+
createdAt: string;
|
|
6858
|
+
updatedAt: string;
|
|
6859
|
+
conversation: Array<{
|
|
6860
|
+
id: string;
|
|
6861
|
+
from: string;
|
|
6862
|
+
body: string;
|
|
6863
|
+
pictures: unknown[] | Record<string, unknown>;
|
|
6864
|
+
createdAt: string;
|
|
6865
|
+
}>;
|
|
6866
|
+
canReopenUntil: string;
|
|
6867
|
+
limits: {
|
|
6868
|
+
body: number;
|
|
6869
|
+
subject: number;
|
|
6870
|
+
picturesPerMessage: number;
|
|
6871
|
+
picturesPerTicket: number;
|
|
6872
|
+
pictureBytes: number;
|
|
6873
|
+
};
|
|
6874
|
+
customer: {
|
|
6875
|
+
id: unknown;
|
|
6876
|
+
email: string;
|
|
6877
|
+
tags: unknown[] | Record<string, unknown>;
|
|
6878
|
+
};
|
|
6879
|
+
order: {
|
|
6880
|
+
id: string;
|
|
6881
|
+
status: string;
|
|
6882
|
+
amount: string;
|
|
6883
|
+
};
|
|
6884
|
+
orders: {
|
|
6885
|
+
id: string;
|
|
6886
|
+
status: string;
|
|
6887
|
+
amount: string;
|
|
6888
|
+
products: string[];
|
|
6889
|
+
createdAt: string;
|
|
6890
|
+
}[];
|
|
6891
|
+
on: boolean;
|
|
6892
|
+
};
|
|
6893
|
+
|
|
6894
|
+
/** What reopen a support ticket answers: `tickets.reopen`. */
|
|
6895
|
+
export type TicketsReopenResult = {
|
|
6896
|
+
id: string;
|
|
6897
|
+
email: string;
|
|
6898
|
+
customerId: unknown;
|
|
6899
|
+
orderId: string;
|
|
6900
|
+
subject: string;
|
|
6901
|
+
status: string;
|
|
6902
|
+
messages: number;
|
|
6903
|
+
pictures: number;
|
|
6904
|
+
lastMessageAt: string;
|
|
6905
|
+
lastFrom: string;
|
|
6906
|
+
lastLine: string;
|
|
6907
|
+
unread: boolean;
|
|
6908
|
+
firstReplyAt: string;
|
|
6909
|
+
answeredAt: string;
|
|
6910
|
+
resolvedAt: unknown;
|
|
6911
|
+
resolvedBy: unknown;
|
|
6912
|
+
createdAt: string;
|
|
6913
|
+
updatedAt: string;
|
|
6914
|
+
conversation: Array<{
|
|
6915
|
+
id: string;
|
|
6916
|
+
from: string;
|
|
6917
|
+
body: string;
|
|
6918
|
+
pictures: unknown[] | Record<string, unknown>;
|
|
6919
|
+
createdAt: string;
|
|
6920
|
+
}>;
|
|
6921
|
+
canReopenUntil: unknown;
|
|
6922
|
+
limits: {
|
|
6923
|
+
body: number;
|
|
6924
|
+
subject: number;
|
|
6925
|
+
picturesPerMessage: number;
|
|
6926
|
+
picturesPerTicket: number;
|
|
6927
|
+
pictureBytes: number;
|
|
6928
|
+
};
|
|
6929
|
+
customer: {
|
|
6930
|
+
id: unknown;
|
|
6931
|
+
email: string;
|
|
6932
|
+
tags: unknown[] | Record<string, unknown>;
|
|
6933
|
+
};
|
|
6934
|
+
order: {
|
|
6935
|
+
id: string;
|
|
6936
|
+
status: string;
|
|
6937
|
+
amount: string;
|
|
6938
|
+
};
|
|
6939
|
+
orders: {
|
|
6940
|
+
id: string;
|
|
6941
|
+
status: string;
|
|
6942
|
+
amount: string;
|
|
6943
|
+
products: string[];
|
|
6944
|
+
createdAt: string;
|
|
6945
|
+
}[];
|
|
6946
|
+
on: boolean;
|
|
6947
|
+
};
|
|
6948
|
+
|
|
6283
6949
|
/** What list blacklist rules takes: `blacklist.list`. */
|
|
6284
6950
|
export interface BlacklistListParams {
|
|
6285
6951
|
/**
|
|
@@ -7055,11 +7721,11 @@ export interface DisputesUpdateSettingsParams {
|
|
|
7055
7721
|
blacklist?: boolean;
|
|
7056
7722
|
/** Hide what the order delivered from its buyer while a dispute is open, shown again if it is won. */
|
|
7057
7723
|
takeBackAccess?: boolean;
|
|
7058
|
-
/** Accept a
|
|
7724
|
+
/** Accept a dispute answered from Shoply under `acceptUnder` rather than fight it. */
|
|
7059
7725
|
acceptSmall?: boolean;
|
|
7060
7726
|
/** The amount, above 0. */
|
|
7061
7727
|
acceptUnder?: number;
|
|
7062
|
-
/** Submit a
|
|
7728
|
+
/** Submit the answer of a dispute answered from Shoply with a day left. */
|
|
7063
7729
|
autoSubmit?: boolean;
|
|
7064
7730
|
/** Never send or accept one over `askAbove` by itself. */
|
|
7065
7731
|
askAboveOn?: boolean;
|
|
@@ -9254,6 +9920,7 @@ export type CustomerShowResult = {
|
|
|
9254
9920
|
imageUrl: unknown;
|
|
9255
9921
|
}[];
|
|
9256
9922
|
subscriptions: boolean;
|
|
9923
|
+
support: boolean;
|
|
9257
9924
|
downloads: {
|
|
9258
9925
|
buttons: unknown[] | Record<string, unknown>;
|
|
9259
9926
|
guideUrl: string;
|
|
@@ -9788,38 +10455,221 @@ export type CustomerSubscriptionsPauseResult = {
|
|
|
9788
10455
|
pausesLeft: number;
|
|
9789
10456
|
}[];
|
|
9790
10457
|
|
|
9791
|
-
/** What resume a subscription answers: `customer.subscriptions.resume`. */
|
|
9792
|
-
export type CustomerSubscriptionsResumeResult = {
|
|
10458
|
+
/** What resume a subscription answers: `customer.subscriptions.resume`. */
|
|
10459
|
+
export type CustomerSubscriptionsResumeResult = {
|
|
10460
|
+
id: string;
|
|
10461
|
+
email: string;
|
|
10462
|
+
productName: string;
|
|
10463
|
+
variantName: string;
|
|
10464
|
+
quantity: number;
|
|
10465
|
+
price: number;
|
|
10466
|
+
currency: string;
|
|
10467
|
+
every: number;
|
|
10468
|
+
unit: string;
|
|
10469
|
+
status: string;
|
|
10470
|
+
periodEnd: string;
|
|
10471
|
+
graceEnd: unknown;
|
|
10472
|
+
renewalOrderId: unknown;
|
|
10473
|
+
renewalUrl: unknown;
|
|
10474
|
+
firstOrderId: string;
|
|
10475
|
+
endedAt: unknown;
|
|
10476
|
+
revoked: boolean;
|
|
10477
|
+
pausedAt: unknown;
|
|
10478
|
+
resumeAt: unknown;
|
|
10479
|
+
pausedBy: unknown;
|
|
10480
|
+
renewsWith: unknown;
|
|
10481
|
+
autoRenews: boolean;
|
|
10482
|
+
chargeTried: number;
|
|
10483
|
+
chargeNextAt: unknown;
|
|
10484
|
+
createdAt: string;
|
|
10485
|
+
pausesLeft: number;
|
|
10486
|
+
}[];
|
|
10487
|
+
|
|
10488
|
+
/** What give another card answers: `customer.subscriptions.card`. */
|
|
10489
|
+
export type CustomerSubscriptionsCardResult = unknown;
|
|
10490
|
+
|
|
10491
|
+
/** What list support tickets answers: `customer.tickets.list`. */
|
|
10492
|
+
export type CustomerTicketsListResult = {
|
|
10493
|
+
id: string;
|
|
10494
|
+
orderId: string;
|
|
10495
|
+
subject: string;
|
|
10496
|
+
status: string;
|
|
10497
|
+
messages: number;
|
|
10498
|
+
pictures: number;
|
|
10499
|
+
lastMessageAt: string;
|
|
10500
|
+
lastFrom: string;
|
|
10501
|
+
lastLine: string;
|
|
10502
|
+
firstReplyAt: string;
|
|
10503
|
+
answeredAt: string;
|
|
10504
|
+
resolvedAt: unknown;
|
|
10505
|
+
resolvedBy: unknown;
|
|
10506
|
+
createdAt: string;
|
|
10507
|
+
updatedAt: string;
|
|
10508
|
+
}[];
|
|
10509
|
+
|
|
10510
|
+
/** What open a support ticket takes: `customer.tickets.create`. */
|
|
10511
|
+
export interface CustomerTicketsCreateParams {
|
|
10512
|
+
/** What it is about, up to 100 characters. */
|
|
10513
|
+
subject: string;
|
|
10514
|
+
/** The first message, up to 500 characters. */
|
|
10515
|
+
message: string;
|
|
10516
|
+
/** The order it is about, one of `meta.orders` on List support tickets. Left out, something else. */
|
|
10517
|
+
order?: string;
|
|
10518
|
+
}
|
|
10519
|
+
|
|
10520
|
+
/** What open a support ticket answers: `customer.tickets.create`. */
|
|
10521
|
+
export type CustomerTicketsCreateResult = {
|
|
10522
|
+
id: string;
|
|
10523
|
+
orderId: string;
|
|
10524
|
+
subject: string;
|
|
10525
|
+
status: string;
|
|
10526
|
+
messages: number;
|
|
10527
|
+
pictures: number;
|
|
10528
|
+
lastMessageAt: string;
|
|
10529
|
+
lastFrom: string;
|
|
10530
|
+
lastLine: string;
|
|
10531
|
+
firstReplyAt: unknown;
|
|
10532
|
+
answeredAt: unknown;
|
|
10533
|
+
resolvedAt: unknown;
|
|
10534
|
+
resolvedBy: unknown;
|
|
10535
|
+
createdAt: string;
|
|
10536
|
+
updatedAt: string;
|
|
10537
|
+
conversation: Array<{
|
|
10538
|
+
id: string;
|
|
10539
|
+
from: string;
|
|
10540
|
+
body: string;
|
|
10541
|
+
pictures: unknown[] | Record<string, unknown>;
|
|
10542
|
+
createdAt: string;
|
|
10543
|
+
}>;
|
|
10544
|
+
canReopenUntil: unknown;
|
|
10545
|
+
limits: {
|
|
10546
|
+
body: number;
|
|
10547
|
+
subject: number;
|
|
10548
|
+
picturesPerMessage: number;
|
|
10549
|
+
picturesPerTicket: number;
|
|
10550
|
+
pictureBytes: number;
|
|
10551
|
+
};
|
|
10552
|
+
orderLabel: string;
|
|
10553
|
+
orderProducts: string[];
|
|
10554
|
+
orderMore: number;
|
|
10555
|
+
};
|
|
10556
|
+
|
|
10557
|
+
/** What get a support ticket answers: `customer.tickets.show`. */
|
|
10558
|
+
export type CustomerTicketsShowResult = {
|
|
10559
|
+
id: string;
|
|
10560
|
+
orderId: string;
|
|
10561
|
+
subject: string;
|
|
10562
|
+
status: string;
|
|
10563
|
+
messages: number;
|
|
10564
|
+
pictures: number;
|
|
10565
|
+
lastMessageAt: string;
|
|
10566
|
+
lastFrom: string;
|
|
10567
|
+
lastLine: string;
|
|
10568
|
+
firstReplyAt: string;
|
|
10569
|
+
answeredAt: string;
|
|
10570
|
+
resolvedAt: unknown;
|
|
10571
|
+
resolvedBy: unknown;
|
|
10572
|
+
createdAt: string;
|
|
10573
|
+
updatedAt: string;
|
|
10574
|
+
conversation: Array<{
|
|
10575
|
+
id: string;
|
|
10576
|
+
from: string;
|
|
10577
|
+
body: string;
|
|
10578
|
+
pictures: unknown[] | Record<string, unknown>;
|
|
10579
|
+
createdAt: string;
|
|
10580
|
+
}>;
|
|
10581
|
+
canReopenUntil: unknown;
|
|
10582
|
+
limits: {
|
|
10583
|
+
body: number;
|
|
10584
|
+
subject: number;
|
|
10585
|
+
picturesPerMessage: number;
|
|
10586
|
+
picturesPerTicket: number;
|
|
10587
|
+
pictureBytes: number;
|
|
10588
|
+
};
|
|
10589
|
+
orderLabel: string;
|
|
10590
|
+
orderProducts: string[];
|
|
10591
|
+
orderMore: number;
|
|
10592
|
+
};
|
|
10593
|
+
|
|
10594
|
+
/** What write on a support ticket takes: `customer.tickets.reply`. */
|
|
10595
|
+
export interface CustomerTicketsReplyParams {
|
|
10596
|
+
/** The message, up to 500 characters. */
|
|
10597
|
+
message: string;
|
|
10598
|
+
}
|
|
10599
|
+
|
|
10600
|
+
/** What write on a support ticket answers: `customer.tickets.reply`. */
|
|
10601
|
+
export type CustomerTicketsReplyResult = {
|
|
9793
10602
|
id: string;
|
|
9794
|
-
|
|
9795
|
-
|
|
9796
|
-
variantName: string;
|
|
9797
|
-
quantity: number;
|
|
9798
|
-
price: number;
|
|
9799
|
-
currency: string;
|
|
9800
|
-
every: number;
|
|
9801
|
-
unit: string;
|
|
10603
|
+
orderId: string;
|
|
10604
|
+
subject: string;
|
|
9802
10605
|
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;
|
|
10606
|
+
messages: number;
|
|
10607
|
+
pictures: number;
|
|
10608
|
+
lastMessageAt: string;
|
|
10609
|
+
lastFrom: string;
|
|
10610
|
+
lastLine: string;
|
|
10611
|
+
firstReplyAt: string;
|
|
10612
|
+
answeredAt: string;
|
|
10613
|
+
resolvedAt: unknown;
|
|
10614
|
+
resolvedBy: unknown;
|
|
9817
10615
|
createdAt: string;
|
|
9818
|
-
|
|
9819
|
-
|
|
10616
|
+
updatedAt: string;
|
|
10617
|
+
conversation: Array<{
|
|
10618
|
+
id: string;
|
|
10619
|
+
from: string;
|
|
10620
|
+
body: string;
|
|
10621
|
+
pictures: unknown[] | Record<string, unknown>;
|
|
10622
|
+
createdAt: string;
|
|
10623
|
+
}>;
|
|
10624
|
+
canReopenUntil: unknown;
|
|
10625
|
+
limits: {
|
|
10626
|
+
body: number;
|
|
10627
|
+
subject: number;
|
|
10628
|
+
picturesPerMessage: number;
|
|
10629
|
+
picturesPerTicket: number;
|
|
10630
|
+
pictureBytes: number;
|
|
10631
|
+
};
|
|
10632
|
+
orderLabel: string;
|
|
10633
|
+
orderProducts: string[];
|
|
10634
|
+
orderMore: number;
|
|
10635
|
+
};
|
|
9820
10636
|
|
|
9821
|
-
/** What
|
|
9822
|
-
export type
|
|
10637
|
+
/** What resolve a support ticket answers: `customer.tickets.resolve`. */
|
|
10638
|
+
export type CustomerTicketsResolveResult = {
|
|
10639
|
+
id: string;
|
|
10640
|
+
orderId: string;
|
|
10641
|
+
subject: string;
|
|
10642
|
+
status: string;
|
|
10643
|
+
messages: number;
|
|
10644
|
+
pictures: number;
|
|
10645
|
+
lastMessageAt: string;
|
|
10646
|
+
lastFrom: string;
|
|
10647
|
+
lastLine: string;
|
|
10648
|
+
firstReplyAt: string;
|
|
10649
|
+
answeredAt: string;
|
|
10650
|
+
resolvedAt: string;
|
|
10651
|
+
resolvedBy: string;
|
|
10652
|
+
createdAt: string;
|
|
10653
|
+
updatedAt: string;
|
|
10654
|
+
conversation: Array<{
|
|
10655
|
+
id: string;
|
|
10656
|
+
from: string;
|
|
10657
|
+
body: string;
|
|
10658
|
+
pictures: unknown[] | Record<string, unknown>;
|
|
10659
|
+
createdAt: string;
|
|
10660
|
+
}>;
|
|
10661
|
+
canReopenUntil: string;
|
|
10662
|
+
limits: {
|
|
10663
|
+
body: number;
|
|
10664
|
+
subject: number;
|
|
10665
|
+
picturesPerMessage: number;
|
|
10666
|
+
picturesPerTicket: number;
|
|
10667
|
+
pictureBytes: number;
|
|
10668
|
+
};
|
|
10669
|
+
orderLabel: string;
|
|
10670
|
+
orderProducts: string[];
|
|
10671
|
+
orderMore: number;
|
|
10672
|
+
};
|
|
9823
10673
|
|
|
9824
10674
|
export interface ShoplyResourcesKey {
|
|
9825
10675
|
/**
|
|
@@ -11660,11 +12510,107 @@ export interface ShoplyResourcesCartRecovery {
|
|
|
11660
12510
|
cart(cartId: string, options?: RequestOptions): Promise<CartRecoveryCartResult>;
|
|
11661
12511
|
}
|
|
11662
12512
|
|
|
12513
|
+
export interface ShoplyResourcesWinBack {
|
|
12514
|
+
/**
|
|
12515
|
+
* **Get Win-Back**
|
|
12516
|
+
*
|
|
12517
|
+
* 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.
|
|
12518
|
+
*
|
|
12519
|
+
* Needs the `marketing.read` permission (Read Email Marketing).
|
|
12520
|
+
*
|
|
12521
|
+
* @see https://docs.shoply.gg/api-reference/email-marketing/get-win-back
|
|
12522
|
+
*/
|
|
12523
|
+
show(params?: WinBackShowParams, options?: RequestOptions): Promise<WinBackShowResult>;
|
|
12524
|
+
/**
|
|
12525
|
+
* **Change Win-Back**
|
|
12526
|
+
*
|
|
12527
|
+
* 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.
|
|
12528
|
+
*
|
|
12529
|
+
* Needs the `marketing.write` permission (Change Email Marketing).
|
|
12530
|
+
*
|
|
12531
|
+
* @see https://docs.shoply.gg/api-reference/email-marketing/change-win-back
|
|
12532
|
+
*/
|
|
12533
|
+
update(params?: WinBackUpdateParams, options?: RequestOptions): Promise<WinBackUpdateResult>;
|
|
12534
|
+
/**
|
|
12535
|
+
* **List Win-Back buyers**
|
|
12536
|
+
*
|
|
12537
|
+
* 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.
|
|
12538
|
+
*
|
|
12539
|
+
* Needs the `marketing.read` permission (Read Email Marketing).
|
|
12540
|
+
*
|
|
12541
|
+
* @see https://docs.shoply.gg/api-reference/email-marketing/list-win-back-buyers
|
|
12542
|
+
*/
|
|
12543
|
+
buyers(params?: WinBackBuyersParams, options?: RequestOptions): PagePromise<WinBackBuyersItem>;
|
|
12544
|
+
/**
|
|
12545
|
+
* **Get a Win-Back buyer**
|
|
12546
|
+
*
|
|
12547
|
+
* One buyer as "List Win-Back buyers" has them. What the `winback.` webhooks send.
|
|
12548
|
+
*
|
|
12549
|
+
* Needs the `marketing.read` permission (Read Email Marketing).
|
|
12550
|
+
*
|
|
12551
|
+
* @see https://docs.shoply.gg/api-reference/email-marketing/get-a-win-back-buyer
|
|
12552
|
+
*/
|
|
12553
|
+
buyer(buyerId: string, options?: RequestOptions): Promise<WinBackBuyerResult>;
|
|
12554
|
+
}
|
|
12555
|
+
|
|
12556
|
+
export interface ShoplyResourcesSubscribers {
|
|
12557
|
+
/**
|
|
12558
|
+
* **Get subscriber figures**
|
|
12559
|
+
*
|
|
12560
|
+
* `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.
|
|
12561
|
+
*
|
|
12562
|
+
* Needs the `marketing.read` permission (Read Email Marketing).
|
|
12563
|
+
*
|
|
12564
|
+
* @see https://docs.shoply.gg/api-reference/email-marketing/get-subscriber-figures
|
|
12565
|
+
*/
|
|
12566
|
+
summary(params?: SubscribersSummaryParams, options?: RequestOptions): Promise<SubscribersSummaryResult>;
|
|
12567
|
+
/**
|
|
12568
|
+
* **Change asking at checkout**
|
|
12569
|
+
*
|
|
12570
|
+
* 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.
|
|
12571
|
+
*
|
|
12572
|
+
* Needs the `marketing.write` permission (Change Email Marketing).
|
|
12573
|
+
*
|
|
12574
|
+
* @see https://docs.shoply.gg/api-reference/email-marketing/change-asking-at-checkout
|
|
12575
|
+
*/
|
|
12576
|
+
asking(params: SubscribersAskingParams, options?: RequestOptions): Promise<SubscribersAskingResult>;
|
|
12577
|
+
/**
|
|
12578
|
+
* **List subscribers**
|
|
12579
|
+
*
|
|
12580
|
+
* 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`).
|
|
12581
|
+
*
|
|
12582
|
+
* Needs the `marketing.read` permission (Read Email Marketing).
|
|
12583
|
+
*
|
|
12584
|
+
* @see https://docs.shoply.gg/api-reference/email-marketing/list-subscribers
|
|
12585
|
+
*/
|
|
12586
|
+
list(params?: SubscribersListParams, options?: RequestOptions): PagePromise<SubscribersListItem>;
|
|
12587
|
+
/**
|
|
12588
|
+
* **Export subscribers**
|
|
12589
|
+
*
|
|
12590
|
+
* 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.
|
|
12591
|
+
*
|
|
12592
|
+
* 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.
|
|
12593
|
+
*
|
|
12594
|
+
* @see https://docs.shoply.gg/api-reference/email-marketing/export-subscribers
|
|
12595
|
+
*/
|
|
12596
|
+
export(params?: SubscribersExportParams, options?: RequestOptions): Promise<Response>;
|
|
12597
|
+
/**
|
|
12598
|
+
* **Unsubscribe a subscriber**
|
|
12599
|
+
*
|
|
12600
|
+
* 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.
|
|
12601
|
+
*
|
|
12602
|
+
* Needs the `marketing.write` permission (Change Email Marketing).
|
|
12603
|
+
*
|
|
12604
|
+
* @see https://docs.shoply.gg/api-reference/email-marketing/unsubscribe-a-subscriber
|
|
12605
|
+
*/
|
|
12606
|
+
unsubscribe(params: SubscribersUnsubscribeParams, options?: RequestOptions): Promise<SubscribersUnsubscribeResult>;
|
|
12607
|
+
}
|
|
12608
|
+
|
|
11663
12609
|
export interface ShoplyResourcesCustomers {
|
|
11664
12610
|
/**
|
|
11665
12611
|
* **List customers**
|
|
11666
12612
|
*
|
|
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
|
|
12613
|
+
* 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
12614
|
*
|
|
11669
12615
|
* Needs the `customers.read` permission (Read Customers).
|
|
11670
12616
|
*
|
|
@@ -11684,7 +12630,7 @@ export interface ShoplyResourcesCustomers {
|
|
|
11684
12630
|
/**
|
|
11685
12631
|
* **Export customers**
|
|
11686
12632
|
*
|
|
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,
|
|
12633
|
+
* 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
12634
|
*
|
|
11689
12635
|
* 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
12636
|
*
|
|
@@ -11704,7 +12650,7 @@ export interface ShoplyResourcesCustomers {
|
|
|
11704
12650
|
/**
|
|
11705
12651
|
* **Get a customer**
|
|
11706
12652
|
*
|
|
11707
|
-
* One customer: their orders, their balance and its history, whether they are blacklisted, and their affiliate figures if they are one.
|
|
12653
|
+
* One customer: their orders, their balance and its history, their `tags`, whether they are blacklisted, and their affiliate figures if they are one.
|
|
11708
12654
|
*
|
|
11709
12655
|
* Needs the `customers.read` permission (Read Customers).
|
|
11710
12656
|
*
|
|
@@ -11741,6 +12687,89 @@ export interface ShoplyResourcesCustomers {
|
|
|
11741
12687
|
* @see https://docs.shoply.gg/api-reference/customers/clear-a-customer-from-the-blacklist
|
|
11742
12688
|
*/
|
|
11743
12689
|
unblacklist(customerId: string, params?: CustomersUnblacklistParams, options?: RequestOptions): Promise<CustomersUnblacklistResult>;
|
|
12690
|
+
/**
|
|
12691
|
+
* **Set a customer's tags**
|
|
12692
|
+
*
|
|
12693
|
+
* 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.
|
|
12694
|
+
*
|
|
12695
|
+
* Needs the `customers.tags` permission (Change Tags).
|
|
12696
|
+
*
|
|
12697
|
+
* @see https://docs.shoply.gg/api-reference/customers/set-a-customers-tags
|
|
12698
|
+
*/
|
|
12699
|
+
setTags(customerId: string, params: CustomersSetTagsParams, options?: RequestOptions): Promise<CustomersSetTagsResult>;
|
|
12700
|
+
/**
|
|
12701
|
+
* **Put a tag on a customer**
|
|
12702
|
+
*
|
|
12703
|
+
* One of the store's tags on the customer. One they already wear changes nothing. Answers their tags.
|
|
12704
|
+
*
|
|
12705
|
+
* Needs the `customers.tags` permission (Change Tags).
|
|
12706
|
+
*
|
|
12707
|
+
* @see https://docs.shoply.gg/api-reference/customers/put-a-tag-on-a-customer
|
|
12708
|
+
*/
|
|
12709
|
+
tag(customerId: string, tagId: string, options?: RequestOptions): Promise<CustomersTagResult>;
|
|
12710
|
+
/**
|
|
12711
|
+
* **Take a tag off a customer**
|
|
12712
|
+
*
|
|
12713
|
+
* One of the store's tags off the customer. One they do not wear changes nothing. Answers their tags.
|
|
12714
|
+
*
|
|
12715
|
+
* Needs the `customers.tags` permission (Change Tags).
|
|
12716
|
+
*
|
|
12717
|
+
* @see https://docs.shoply.gg/api-reference/customers/take-a-tag-off-a-customer
|
|
12718
|
+
*/
|
|
12719
|
+
untag(customerId: string, tagId: string, options?: RequestOptions): Promise<CustomersUntagResult>;
|
|
12720
|
+
}
|
|
12721
|
+
|
|
12722
|
+
export interface ShoplyResourcesCustomerTags {
|
|
12723
|
+
/**
|
|
12724
|
+
* **List customer tags**
|
|
12725
|
+
*
|
|
12726
|
+
* 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.
|
|
12727
|
+
*
|
|
12728
|
+
* Needs the `customers.read` permission (Read Customers).
|
|
12729
|
+
*
|
|
12730
|
+
* @see https://docs.shoply.gg/api-reference/customers/list-customer-tags
|
|
12731
|
+
*/
|
|
12732
|
+
list(options?: RequestOptions): Promise<CustomerTagsListResult>;
|
|
12733
|
+
/**
|
|
12734
|
+
* **Add a customer tag**
|
|
12735
|
+
*
|
|
12736
|
+
* 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.
|
|
12737
|
+
*
|
|
12738
|
+
* Needs the `customers.tags` permission (Change Tags).
|
|
12739
|
+
*
|
|
12740
|
+
* @see https://docs.shoply.gg/api-reference/customers/add-a-customer-tag
|
|
12741
|
+
*/
|
|
12742
|
+
create(params: CustomerTagsCreateParams, options?: RequestOptions): Promise<CustomerTagsCreateResult>;
|
|
12743
|
+
/**
|
|
12744
|
+
* **Change VIP and Disputed Before**
|
|
12745
|
+
*
|
|
12746
|
+
* 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.
|
|
12747
|
+
*
|
|
12748
|
+
* Needs the `customers.tags` permission (Change Tags).
|
|
12749
|
+
*
|
|
12750
|
+
* @see https://docs.shoply.gg/api-reference/customers/change-vip-and-disputed-before
|
|
12751
|
+
*/
|
|
12752
|
+
automatic(params?: CustomerTagsAutomaticParams, options?: RequestOptions): Promise<CustomerTagsAutomaticResult>;
|
|
12753
|
+
/**
|
|
12754
|
+
* **Change a customer tag**
|
|
12755
|
+
*
|
|
12756
|
+
* Renames a tag or changes its colour, keeping what is not sent. Everybody wearing it keeps it.
|
|
12757
|
+
*
|
|
12758
|
+
* Needs the `customers.tags` permission (Change Tags).
|
|
12759
|
+
*
|
|
12760
|
+
* @see https://docs.shoply.gg/api-reference/customers/change-a-customer-tag
|
|
12761
|
+
*/
|
|
12762
|
+
update(tagId: string, params?: CustomerTagsUpdateParams, options?: RequestOptions): Promise<CustomerTagsUpdateResult>;
|
|
12763
|
+
/**
|
|
12764
|
+
* **Delete a customer tag**
|
|
12765
|
+
*
|
|
12766
|
+
* 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.
|
|
12767
|
+
*
|
|
12768
|
+
* Needs the `customers.tags` permission (Change Tags).
|
|
12769
|
+
*
|
|
12770
|
+
* @see https://docs.shoply.gg/api-reference/customers/delete-a-customer-tag
|
|
12771
|
+
*/
|
|
12772
|
+
delete(tagId: string, options?: RequestOptions): Promise<CustomerTagsDeleteResult>;
|
|
11744
12773
|
}
|
|
11745
12774
|
|
|
11746
12775
|
export interface ShoplyResourcesAffiliates {
|
|
@@ -11891,6 +12920,79 @@ export interface ShoplyResourcesAffiliateProgramme {
|
|
|
11891
12920
|
update(params?: AffiliateProgrammeUpdateParams, options?: RequestOptions): Promise<AffiliateProgrammeUpdateResult>;
|
|
11892
12921
|
}
|
|
11893
12922
|
|
|
12923
|
+
export interface ShoplyResourcesTickets {
|
|
12924
|
+
/**
|
|
12925
|
+
* **List support tickets**
|
|
12926
|
+
*
|
|
12927
|
+
* 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.
|
|
12928
|
+
*
|
|
12929
|
+
* Needs the `tickets.read` permission (Read Support Tickets).
|
|
12930
|
+
*
|
|
12931
|
+
* @see https://docs.shoply.gg/api-reference/support-tickets/list-support-tickets
|
|
12932
|
+
*/
|
|
12933
|
+
list(params?: TicketsListParams, options?: RequestOptions): PagePromise<TicketsListItem>;
|
|
12934
|
+
/**
|
|
12935
|
+
* **Switch Support Tickets on or off**
|
|
12936
|
+
*
|
|
12937
|
+
* 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.
|
|
12938
|
+
*
|
|
12939
|
+
* Needs the `tickets.write` permission (Answer Support Tickets).
|
|
12940
|
+
*
|
|
12941
|
+
* @see https://docs.shoply.gg/api-reference/support-tickets/switch-support-tickets-on-or-off
|
|
12942
|
+
*/
|
|
12943
|
+
settings(params: TicketsSettingsParams, options?: RequestOptions): Promise<TicketsSettingsResult>;
|
|
12944
|
+
/**
|
|
12945
|
+
* **Get a support ticket**
|
|
12946
|
+
*
|
|
12947
|
+
* A ticket with its `conversation`, oldest first: each message's `from` (`buyer` or `store`), `body`, `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.
|
|
12948
|
+
*
|
|
12949
|
+
* Needs the `tickets.read` permission (Read Support Tickets).
|
|
12950
|
+
*
|
|
12951
|
+
* @see https://docs.shoply.gg/api-reference/support-tickets/get-a-support-ticket
|
|
12952
|
+
*/
|
|
12953
|
+
get(ticketId: string, options?: RequestOptions): Promise<TicketsGetResult>;
|
|
12954
|
+
/**
|
|
12955
|
+
* **Reply to a support ticket**
|
|
12956
|
+
*
|
|
12957
|
+
* 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.
|
|
12958
|
+
*
|
|
12959
|
+
* Needs the `tickets.write` permission (Answer Support Tickets).
|
|
12960
|
+
*
|
|
12961
|
+
* @see https://docs.shoply.gg/api-reference/support-tickets/reply-to-a-support-ticket
|
|
12962
|
+
*/
|
|
12963
|
+
reply(ticketId: string, params: TicketsReplyParams, options?: RequestOptions): Promise<TicketsReplyResult>;
|
|
12964
|
+
/**
|
|
12965
|
+
* **Resolve a support ticket**
|
|
12966
|
+
*
|
|
12967
|
+
* 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.
|
|
12968
|
+
*
|
|
12969
|
+
* Needs the `tickets.write` permission (Answer Support Tickets).
|
|
12970
|
+
*
|
|
12971
|
+
* @see https://docs.shoply.gg/api-reference/support-tickets/resolve-a-support-ticket
|
|
12972
|
+
*/
|
|
12973
|
+
resolve(ticketId: string, options?: RequestOptions): Promise<TicketsResolveResult>;
|
|
12974
|
+
/**
|
|
12975
|
+
* **Reopen a support ticket**
|
|
12976
|
+
*
|
|
12977
|
+
* Opens a resolved ticket again: `open` where the buyer wrote last, else `answered`. One that is not resolved is left as it is.
|
|
12978
|
+
*
|
|
12979
|
+
* Needs the `tickets.write` permission (Answer Support Tickets).
|
|
12980
|
+
*
|
|
12981
|
+
* @see https://docs.shoply.gg/api-reference/support-tickets/reopen-a-support-ticket
|
|
12982
|
+
*/
|
|
12983
|
+
reopen(ticketId: string, options?: RequestOptions): Promise<TicketsReopenResult>;
|
|
12984
|
+
/**
|
|
12985
|
+
* **Get a ticket's picture**
|
|
12986
|
+
*
|
|
12987
|
+
* 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.
|
|
12988
|
+
*
|
|
12989
|
+
* Needs the `tickets.read` permission (Read Support Tickets).
|
|
12990
|
+
*
|
|
12991
|
+
* @see https://docs.shoply.gg/api-reference/support-tickets/get-a-tickets-picture
|
|
12992
|
+
*/
|
|
12993
|
+
picture(ticketId: string, name: string, options?: RequestOptions): Promise<Response>;
|
|
12994
|
+
}
|
|
12995
|
+
|
|
11894
12996
|
export interface ShoplyResourcesBlacklist {
|
|
11895
12997
|
/**
|
|
11896
12998
|
* **List blacklist rules**
|
|
@@ -12014,7 +13116,7 @@ export interface ShoplyResourcesDisputes {
|
|
|
12014
13116
|
/**
|
|
12015
13117
|
* **List disputes**
|
|
12016
13118
|
*
|
|
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,
|
|
13119
|
+
* 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
13120
|
*
|
|
12019
13121
|
* Needs the `disputes.read` permission (Read Disputes).
|
|
12020
13122
|
*
|
|
@@ -12064,7 +13166,7 @@ export interface ShoplyResourcesDisputes {
|
|
|
12064
13166
|
/**
|
|
12065
13167
|
* **Submit a dispute's answer**
|
|
12066
13168
|
*
|
|
12067
|
-
* Sends a
|
|
13169
|
+
* 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
13170
|
*
|
|
12069
13171
|
* Needs the `disputes.write` permission (Answer Disputes).
|
|
12070
13172
|
*
|
|
@@ -12074,7 +13176,7 @@ export interface ShoplyResourcesDisputes {
|
|
|
12074
13176
|
/**
|
|
12075
13177
|
* **Accept a dispute**
|
|
12076
13178
|
*
|
|
12077
|
-
* Concedes a
|
|
13179
|
+
* 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
13180
|
*
|
|
12079
13181
|
* Needs the `disputes.write` permission (Answer Disputes).
|
|
12080
13182
|
*
|
|
@@ -12104,7 +13206,7 @@ export interface ShoplyResourcesDisputes {
|
|
|
12104
13206
|
/**
|
|
12105
13207
|
* **Add a file to a dispute's answer**
|
|
12106
13208
|
*
|
|
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
|
|
13209
|
+
* 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
13210
|
*
|
|
12109
13211
|
* Needs the `disputes.write` permission (Answer Disputes).
|
|
12110
13212
|
*
|
|
@@ -12154,7 +13256,7 @@ export interface ShoplyResourcesDisputes {
|
|
|
12154
13256
|
/**
|
|
12155
13257
|
* **Change dispute settings**
|
|
12156
13258
|
*
|
|
12157
|
-
* Changes the settings named and keeps the rest. Accepting small ones and submitting before the deadline are Stripe's
|
|
13259
|
+
* 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
13260
|
*
|
|
12159
13261
|
* Needs the `disputes.write` permission (Answer Disputes).
|
|
12160
13262
|
*
|
|
@@ -12700,9 +13802,13 @@ export interface ShoplyResources {
|
|
|
12700
13802
|
brokenLinks: ShoplyResourcesBrokenLinks;
|
|
12701
13803
|
sitemap: ShoplyResourcesSitemap;
|
|
12702
13804
|
cartRecovery: ShoplyResourcesCartRecovery;
|
|
13805
|
+
winBack: ShoplyResourcesWinBack;
|
|
13806
|
+
subscribers: ShoplyResourcesSubscribers;
|
|
12703
13807
|
customers: ShoplyResourcesCustomers;
|
|
13808
|
+
customerTags: ShoplyResourcesCustomerTags;
|
|
12704
13809
|
affiliates: ShoplyResourcesAffiliates;
|
|
12705
13810
|
affiliateProgramme: ShoplyResourcesAffiliateProgramme;
|
|
13811
|
+
tickets: ShoplyResourcesTickets;
|
|
12706
13812
|
blacklist: ShoplyResourcesBlacklist;
|
|
12707
13813
|
fraudEvents: ShoplyResourcesFraudEvents;
|
|
12708
13814
|
fraudSettings: ShoplyResourcesFraudSettings;
|
|
@@ -12889,10 +13995,74 @@ export interface ShoplyCustomerResourcesSubscriptions {
|
|
|
12889
13995
|
card(subscriptionId: string, options?: RequestOptions): Promise<CustomerSubscriptionsCardResult>;
|
|
12890
13996
|
}
|
|
12891
13997
|
|
|
13998
|
+
export interface ShoplyCustomerResourcesTickets {
|
|
13999
|
+
/**
|
|
14000
|
+
* **List support tickets**
|
|
14001
|
+
*
|
|
14002
|
+
* 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.
|
|
14003
|
+
*
|
|
14004
|
+
* Needs the buyer's token: `Authorization: Bearer shoply_ct_...`, from Sign in with the code.
|
|
14005
|
+
*
|
|
14006
|
+
* It is counted for the buyer's token: 300 reads in ten minutes.
|
|
14007
|
+
*
|
|
14008
|
+
* @see https://docs.shoply.gg/api-reference/customer-api/list-support-tickets
|
|
14009
|
+
*/
|
|
14010
|
+
list(options?: RequestOptions): Promise<CustomerTicketsListResult>;
|
|
14011
|
+
/**
|
|
14012
|
+
* **Open a support ticket**
|
|
14013
|
+
*
|
|
14014
|
+
* 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`.
|
|
14015
|
+
*
|
|
14016
|
+
* Needs the buyer's token: `Authorization: Bearer shoply_ct_...`, from Sign in with the code.
|
|
14017
|
+
*
|
|
14018
|
+
* It is counted for the buyer's token: 30 changes in ten minutes.
|
|
14019
|
+
*
|
|
14020
|
+
* @see https://docs.shoply.gg/api-reference/customer-api/open-a-support-ticket
|
|
14021
|
+
*/
|
|
14022
|
+
create(params: CustomerTicketsCreateParams, options?: RequestOptions): Promise<CustomerTicketsCreateResult>;
|
|
14023
|
+
/**
|
|
14024
|
+
* **Get a support ticket**
|
|
14025
|
+
*
|
|
14026
|
+
* A ticket with its `conversation`, oldest first: each message's `from` (`buyer` or `store`), `body`, `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.
|
|
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/get-a-support-ticket
|
|
14033
|
+
*/
|
|
14034
|
+
show(ticketId: string, options?: RequestOptions): Promise<CustomerTicketsShowResult>;
|
|
14035
|
+
/**
|
|
14036
|
+
* **Write on a support ticket**
|
|
14037
|
+
*
|
|
14038
|
+
* 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.
|
|
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/write-on-a-support-ticket
|
|
14045
|
+
*/
|
|
14046
|
+
reply(ticketId: string, params: CustomerTicketsReplyParams, options?: RequestOptions): Promise<CustomerTicketsReplyResult>;
|
|
14047
|
+
/**
|
|
14048
|
+
* **Resolve a support ticket**
|
|
14049
|
+
*
|
|
14050
|
+
* Marks the buyer's ticket resolved, as their "Mark as Resolved" does. Answers the ticket.
|
|
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: 30 changes in ten minutes.
|
|
14055
|
+
*
|
|
14056
|
+
* @see https://docs.shoply.gg/api-reference/customer-api/resolve-a-support-ticket
|
|
14057
|
+
*/
|
|
14058
|
+
resolve(ticketId: string, options?: RequestOptions): Promise<CustomerTicketsResolveResult>;
|
|
14059
|
+
}
|
|
14060
|
+
|
|
12892
14061
|
export interface ShoplyCustomerResources {
|
|
12893
14062
|
orders: ShoplyCustomerResourcesOrders;
|
|
12894
14063
|
affiliate: ShoplyCustomerResourcesAffiliate;
|
|
12895
14064
|
subscriptions: ShoplyCustomerResourcesSubscriptions;
|
|
14065
|
+
tickets: ShoplyCustomerResourcesTickets;
|
|
12896
14066
|
/**
|
|
12897
14067
|
* **Send a sign-in code**
|
|
12898
14068
|
*
|
|
@@ -12985,6 +14155,8 @@ export type WebhookEventName =
|
|
|
12985
14155
|
| "product.deleted"
|
|
12986
14156
|
| "customer.created"
|
|
12987
14157
|
| "customer.balance_changed"
|
|
14158
|
+
| "customer.tagged"
|
|
14159
|
+
| "customer.untagged"
|
|
12988
14160
|
| "affiliate.created"
|
|
12989
14161
|
| "affiliate.payout_requested"
|
|
12990
14162
|
| "affiliate.payout_answered"
|
|
@@ -12999,6 +14171,10 @@ export type WebhookEventName =
|
|
|
12999
14171
|
| "cart.email_sent"
|
|
13000
14172
|
| "cart.recovered"
|
|
13001
14173
|
| "cart.unsubscribed"
|
|
14174
|
+
| "winback.email_sent"
|
|
14175
|
+
| "winback.won_back"
|
|
14176
|
+
| "subscriber.subscribed"
|
|
14177
|
+
| "subscriber.unsubscribed"
|
|
13002
14178
|
| "routing.processor_paused"
|
|
13003
14179
|
| "routing.processor_resumed"
|
|
13004
14180
|
| "dispute.opened"
|
|
@@ -13008,6 +14184,10 @@ export type WebhookEventName =
|
|
|
13008
14184
|
| "dispute.closed"
|
|
13009
14185
|
| "app.connected"
|
|
13010
14186
|
| "app.disconnected"
|
|
14187
|
+
| "ticket.opened"
|
|
14188
|
+
| "ticket.message"
|
|
14189
|
+
| "ticket.resolved"
|
|
14190
|
+
| "ticket.reopened"
|
|
13011
14191
|
| "fraud.checkout_blocked"
|
|
13012
14192
|
| "webhook.test";
|
|
13013
14193
|
|
|
@@ -13136,15 +14316,27 @@ export interface WebhookEventData {
|
|
|
13136
14316
|
/**
|
|
13137
14317
|
* An email address became a customer of the store.
|
|
13138
14318
|
*
|
|
13139
|
-
* `data`: `id`, `emailAddress`, `balance` and `dateCreated`.
|
|
14319
|
+
* `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
14320
|
*/
|
|
13141
14321
|
"customer.created": Record<string, unknown>;
|
|
13142
14322
|
/**
|
|
13143
14323
|
* A customer's store balance changed: it was spent, credited, refunded to or set.
|
|
13144
14324
|
*
|
|
13145
|
-
* `data`: `id`, `emailAddress`, `balance` and `dateCreated`.
|
|
14325
|
+
* `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
14326
|
*/
|
|
13147
14327
|
"customer.balance_changed": Record<string, unknown>;
|
|
14328
|
+
/**
|
|
14329
|
+
* 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.
|
|
14330
|
+
*
|
|
14331
|
+
* `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`).
|
|
14332
|
+
*/
|
|
14333
|
+
"customer.tagged": Record<string, unknown>;
|
|
14334
|
+
/**
|
|
14335
|
+
* 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.
|
|
14336
|
+
*
|
|
14337
|
+
* `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`).
|
|
14338
|
+
*/
|
|
14339
|
+
"customer.untagged": Record<string, unknown>;
|
|
13148
14340
|
/**
|
|
13149
14341
|
* A customer became an affiliate, added by the store or by joining.
|
|
13150
14342
|
*
|
|
@@ -13229,6 +14421,30 @@ export interface WebhookEventData {
|
|
|
13229
14421
|
* `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
14422
|
*/
|
|
13231
14423
|
"cart.unsubscribed": CartRecoveryCartsItem & Record<string, unknown>;
|
|
14424
|
+
/**
|
|
14425
|
+
* Win-Back emailed a subscriber who has not ordered in a while: the first email or the second.
|
|
14426
|
+
*
|
|
14427
|
+
* `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.
|
|
14428
|
+
*/
|
|
14429
|
+
"winback.email_sent": WinBackBuyersItem & Record<string, unknown>;
|
|
14430
|
+
/**
|
|
14431
|
+
* A buyer Win-Back emailed placed an order within 14 days of the email, and it was paid.
|
|
14432
|
+
*
|
|
14433
|
+
* `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.
|
|
14434
|
+
*/
|
|
14435
|
+
"winback.won_back": WinBackBuyersItem & Record<string, unknown>;
|
|
14436
|
+
/**
|
|
14437
|
+
* A buyer who ticked the store's box at checkout, "Email me news and offers", paid that order, and is a subscriber.
|
|
14438
|
+
*
|
|
14439
|
+
* `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`.
|
|
14440
|
+
*/
|
|
14441
|
+
"subscriber.subscribed": SubscribersListItem & Record<string, unknown>;
|
|
14442
|
+
/**
|
|
14443
|
+
* 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.
|
|
14444
|
+
*
|
|
14445
|
+
* `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`.
|
|
14446
|
+
*/
|
|
14447
|
+
"subscriber.unsubscribed": SubscribersListItem & Record<string, unknown>;
|
|
13232
14448
|
/**
|
|
13233
14449
|
* 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
14450
|
*
|
|
@@ -13283,6 +14499,30 @@ export interface WebhookEventData {
|
|
|
13283
14499
|
* `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
14500
|
*/
|
|
13285
14501
|
"app.disconnected": Record<string, unknown>;
|
|
14502
|
+
/**
|
|
14503
|
+
* A buyer opened a support ticket from the customer panel, or the store's own site through the customer API.
|
|
14504
|
+
*
|
|
14505
|
+
* `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`.
|
|
14506
|
+
*/
|
|
14507
|
+
"ticket.opened": TicketsGetResult & Record<string, unknown>;
|
|
14508
|
+
/**
|
|
14509
|
+
* 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`.
|
|
14510
|
+
*
|
|
14511
|
+
* `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`.
|
|
14512
|
+
*/
|
|
14513
|
+
"ticket.message": Record<string, unknown>;
|
|
14514
|
+
/**
|
|
14515
|
+
* 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.
|
|
14516
|
+
*
|
|
14517
|
+
* `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`.
|
|
14518
|
+
*/
|
|
14519
|
+
"ticket.resolved": TicketsGetResult & Record<string, unknown>;
|
|
14520
|
+
/**
|
|
14521
|
+
* A resolved ticket was opened again: the buyer wrote on it within 30 days, or the store reopened it.
|
|
14522
|
+
*
|
|
14523
|
+
* `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`.
|
|
14524
|
+
*/
|
|
14525
|
+
"ticket.reopened": TicketsGetResult & Record<string, unknown>;
|
|
13286
14526
|
/**
|
|
13287
14527
|
* 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
14528
|
*
|