@shoplygg/node 0.12.0 → 0.12.2
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 +97 -23
- package/index.js +1 -1
- package/package.json +1 -1
package/generated/api.d.ts
CHANGED
|
@@ -298,6 +298,7 @@ export type StoreEmailSettingsResult = {
|
|
|
298
298
|
emailResellersEnabled: boolean;
|
|
299
299
|
emailPaymentSetupEnabled: boolean;
|
|
300
300
|
emailDiscordSetupEnabled: boolean;
|
|
301
|
+
emailDomainEnabled: boolean;
|
|
301
302
|
emailDisputeOpenedEnabled: boolean;
|
|
302
303
|
emailDisputeClosedEnabled: boolean;
|
|
303
304
|
testEmailEvery: {
|
|
@@ -392,6 +393,7 @@ export type PaymentMethodsListResult = Array<{
|
|
|
392
393
|
}>;
|
|
393
394
|
unpaidHours: unknown;
|
|
394
395
|
updatedAt: unknown;
|
|
396
|
+
version: unknown;
|
|
395
397
|
}>;
|
|
396
398
|
|
|
397
399
|
/** What switch a payment method on or off takes: `paymentMethods.setEnabled`. */
|
|
@@ -467,6 +469,7 @@ export type PaymentMethodsSetBalanceResult = Array<{
|
|
|
467
469
|
}>;
|
|
468
470
|
unpaidHours: unknown;
|
|
469
471
|
updatedAt: unknown;
|
|
472
|
+
version: unknown;
|
|
470
473
|
}>;
|
|
471
474
|
|
|
472
475
|
/** What set how long an unpaid order is kept takes: `paymentMethods.setUnpaidHours`. */
|
|
@@ -524,6 +527,7 @@ export type PaymentMethodsSetUnpaidHoursResult = Array<{
|
|
|
524
527
|
}>;
|
|
525
528
|
unpaidHours: unknown;
|
|
526
529
|
updatedAt: string;
|
|
530
|
+
version: string;
|
|
527
531
|
}>;
|
|
528
532
|
|
|
529
533
|
/** What set a payment method's own time for an unpaid order takes: `paymentMethods.setMethodUnpaidHours`. */
|
|
@@ -581,6 +585,7 @@ export type PaymentMethodsSetMethodUnpaidHoursResult = Array<{
|
|
|
581
585
|
}>;
|
|
582
586
|
unpaidHours: number;
|
|
583
587
|
updatedAt: string;
|
|
588
|
+
version: string;
|
|
584
589
|
}>;
|
|
585
590
|
|
|
586
591
|
/** What get the overview takes: `analytics.overview`. */
|
|
@@ -1641,6 +1646,8 @@ export interface RoutingUpdateParams {
|
|
|
1641
1646
|
guardWindow?: number;
|
|
1642
1647
|
/** The percent of a processor's paid orders disputed that the store is told of, once a week at most, above 0 and up to 100. Empty or null for none. Nothing is moved for it. */
|
|
1643
1648
|
disputeAlert?: number;
|
|
1649
|
+
/** The `settings.version` you last read. Sent, the change is refused with `stale_write` if what this saves has changed since. Left out, it is saved whatever happened in between. */
|
|
1650
|
+
expectedVersion?: string;
|
|
1644
1651
|
}
|
|
1645
1652
|
|
|
1646
1653
|
/** What change Payment Routing answers: `routing.update`. */
|
|
@@ -1782,6 +1789,8 @@ export interface RoutingUpdateProcessorParams {
|
|
|
1782
1789
|
minOrder?: number;
|
|
1783
1790
|
/** The largest order it is given. At least `minOrder`. */
|
|
1784
1791
|
maxOrder?: number;
|
|
1792
|
+
/** The processor's `version` (in `processors`) you last read. Sent, the change is refused with `stale_write` if that processor has changed since. Left out, it is saved whatever happened in between. */
|
|
1793
|
+
expectedVersion?: string;
|
|
1785
1794
|
}
|
|
1786
1795
|
|
|
1787
1796
|
/** What change a processor answers: `routing.updateProcessor`. */
|
|
@@ -2112,6 +2121,8 @@ export interface RoutingUpdateRuleParams {
|
|
|
2112
2121
|
action: "only" | "never";
|
|
2113
2122
|
/** The processor the rule is about, one in the routing. */
|
|
2114
2123
|
provider: string;
|
|
2124
|
+
/** The rule's `version` (in `rules`) you last read. Sent, the change is refused with `stale_write` if the rule has changed since. Left out, it is saved whatever happened in between. */
|
|
2125
|
+
expectedVersion?: string;
|
|
2115
2126
|
}
|
|
2116
2127
|
|
|
2117
2128
|
/** What change a rule answers: `routing.updateRule`. */
|
|
@@ -2368,6 +2379,8 @@ export interface CustomMethodsUpdateParams {
|
|
|
2368
2379
|
requiresPicture?: boolean;
|
|
2369
2380
|
/** Whether the checkout offers it. */
|
|
2370
2381
|
enabled?: boolean;
|
|
2382
|
+
/** The method's `version` you last read. Sent, the change is refused with `stale_write` if the method has changed since. Left out, it is saved whatever happened in between. */
|
|
2383
|
+
expectedVersion?: string;
|
|
2371
2384
|
}
|
|
2372
2385
|
|
|
2373
2386
|
/** What update a custom payment method answers: `customMethods.update`. */
|
|
@@ -5523,6 +5536,8 @@ export interface BlogCategoriesUpdateParams {
|
|
|
5523
5536
|
description?: string;
|
|
5524
5537
|
/** The part of its address after `/blog/`. Left out, it is made from the name. A post and a category cannot share one. */
|
|
5525
5538
|
slug?: string;
|
|
5539
|
+
/** The category's `version` you last read. Sent, the change is refused with `stale_write` if the category has changed since. Left out, it is saved whatever happened in between. */
|
|
5540
|
+
expectedVersion?: string;
|
|
5526
5541
|
}
|
|
5527
5542
|
|
|
5528
5543
|
/** What update a blog category answers: `blogCategories.update`. */
|
|
@@ -5643,6 +5658,8 @@ export interface BlogPostsUpdateParams {
|
|
|
5643
5658
|
seoTitle?: string;
|
|
5644
5659
|
/** Its own description in search results. Empty is the start of its text. */
|
|
5645
5660
|
seoDescription?: string;
|
|
5661
|
+
/** The post's `version` you last read. Sent, the change is refused with `stale_write` if the post has changed since. Left out, it is saved whatever happened in between. */
|
|
5662
|
+
expectedVersion?: string;
|
|
5646
5663
|
}
|
|
5647
5664
|
|
|
5648
5665
|
/** What update a blog post answers: `blogPosts.update`. */
|
|
@@ -5749,6 +5766,8 @@ export interface SeoUpdateParams {
|
|
|
5749
5766
|
measurementId?: string;
|
|
5750
5767
|
/** That property's Measurement Protocol API secret. It is never answered back. */
|
|
5751
5768
|
apiSecret?: string;
|
|
5769
|
+
/** The `version` you last read. Sent, the change is refused with `stale_write` if any of these settings has changed since. Left out, it is saved whatever happened in between. */
|
|
5770
|
+
expectedVersion?: string;
|
|
5752
5771
|
}
|
|
5753
5772
|
|
|
5754
5773
|
/** What update search settings answers: `seo.update`. */
|
|
@@ -5800,6 +5819,8 @@ export interface RedirectsUpdateParams {
|
|
|
5800
5819
|
from: string;
|
|
5801
5820
|
/** Where it leads, as a path on the store. A redirect never leaves the store, and never leads to an address that is itself redirected. */
|
|
5802
5821
|
to: string;
|
|
5822
|
+
/** The redirect's `version` you last read. Sent, the change is refused with `stale_write` if the redirect has changed since. Left out, it is saved whatever happened in between. */
|
|
5823
|
+
expectedVersion?: string;
|
|
5803
5824
|
}
|
|
5804
5825
|
|
|
5805
5826
|
/** What update a redirect answers: `redirects.update`. */
|
|
@@ -5860,6 +5881,8 @@ export interface SitemapUpdateKindParams {
|
|
|
5860
5881
|
priority?: string;
|
|
5861
5882
|
/** How often it changes. */
|
|
5862
5883
|
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | "never";
|
|
5884
|
+
/** The kind's `version` (in `kinds`) you last read. Sent, the change is refused with `stale_write` if that kind's rule has changed since. Left out, it is saved whatever happened in between. */
|
|
5885
|
+
expectedVersion?: string;
|
|
5863
5886
|
}
|
|
5864
5887
|
|
|
5865
5888
|
/** What update a kind of address answers: `sitemap.updateKind`. */
|
|
@@ -5895,6 +5918,8 @@ export interface SitemapUpdateEntryParams {
|
|
|
5895
5918
|
kind: "pages" | "categories" | "products" | "blog";
|
|
5896
5919
|
/** Which address of that kind, as "Get the sitemap" names it. */
|
|
5897
5920
|
ref: string;
|
|
5921
|
+
/** The entry's `version` (in its kind's `entries`) you last read. Sent, the change is refused with `stale_write` if the entry has changed since. Left out, it is saved whatever happened in between. */
|
|
5922
|
+
expectedVersion?: string;
|
|
5898
5923
|
/** Whether the sitemap lists it. */
|
|
5899
5924
|
listed?: boolean;
|
|
5900
5925
|
/** Its priority, from `0.1` to `1.0`. */
|
|
@@ -5962,6 +5987,8 @@ export interface CartRecoveryUpdateParams {
|
|
|
5962
5987
|
secondSubject?: string;
|
|
5963
5988
|
/** The percent off its coupon. One of 0, 5, 10, 15, 20, 25. 0 sends it with no coupon. */
|
|
5964
5989
|
secondPercent?: number;
|
|
5990
|
+
/** The `version` you last read. Sent, the change is refused with `stale_write` if any of these settings has changed since. Left out, it is saved whatever happened in between. */
|
|
5991
|
+
expectedVersion?: string;
|
|
5965
5992
|
}
|
|
5966
5993
|
|
|
5967
5994
|
/** What change Cart Recovery answers: `cartRecovery.update`. */
|
|
@@ -6096,6 +6123,8 @@ export interface WinBackUpdateParams {
|
|
|
6096
6123
|
secondPercent?: number;
|
|
6097
6124
|
/** Who is written to: empty for every subscriber, `vip`, or the ID of one of the store's tags. */
|
|
6098
6125
|
audience?: string;
|
|
6126
|
+
/** The `version` you last read. Sent, the change is refused with `stale_write` if any of these settings has changed since. Left out, it is saved whatever happened in between. */
|
|
6127
|
+
expectedVersion?: string;
|
|
6099
6128
|
}
|
|
6100
6129
|
|
|
6101
6130
|
/** What change Win-Back answers: `winBack.update`. */
|
|
@@ -6346,6 +6375,7 @@ export type EmailTemplatesShowResult = {
|
|
|
6346
6375
|
css: unknown;
|
|
6347
6376
|
subject: unknown;
|
|
6348
6377
|
updatedAt: unknown;
|
|
6378
|
+
version: string;
|
|
6349
6379
|
shared: unknown;
|
|
6350
6380
|
baseCss: string;
|
|
6351
6381
|
accent: string;
|
|
@@ -6359,6 +6389,8 @@ export interface EmailTemplatesUpdateParams {
|
|
|
6359
6389
|
css?: string;
|
|
6360
6390
|
/** Its subject, or null for the original. */
|
|
6361
6391
|
subject?: string;
|
|
6392
|
+
/** The `version` you read. Sent, the change is refused with `stale_write` if its HTML, CSS or subject has changed since, a subject set by Change Cart Recovery or Change Win-Back included. Use it rather than `expectedUpdatedAt`, which neither of those moves. */
|
|
6393
|
+
expectedVersion?: string;
|
|
6362
6394
|
/** The `updatedAt` you read; a template changed since is refused with `stale_write`. */
|
|
6363
6395
|
expectedUpdatedAt?: string;
|
|
6364
6396
|
}
|
|
@@ -6386,6 +6418,7 @@ export type EmailTemplatesUpdateResult = {
|
|
|
6386
6418
|
css: string;
|
|
6387
6419
|
subject: string;
|
|
6388
6420
|
updatedAt: string;
|
|
6421
|
+
version: string;
|
|
6389
6422
|
shared: unknown;
|
|
6390
6423
|
baseCss: string;
|
|
6391
6424
|
accent: string;
|
|
@@ -6458,6 +6491,7 @@ export type EmailTemplatesRevertResult = {
|
|
|
6458
6491
|
css: unknown;
|
|
6459
6492
|
subject: unknown;
|
|
6460
6493
|
updatedAt: unknown;
|
|
6494
|
+
version: string;
|
|
6461
6495
|
shared: unknown;
|
|
6462
6496
|
baseCss: string;
|
|
6463
6497
|
accent: string;
|
|
@@ -6903,6 +6937,8 @@ export interface CustomerTagsUpdateParams {
|
|
|
6903
6937
|
name?: string;
|
|
6904
6938
|
/** Its colour. */
|
|
6905
6939
|
tone?: "neutral" | "primary" | "success" | "warning" | "danger";
|
|
6940
|
+
/** The tag's `version` you last read. Sent, the change is refused with `stale_write` if the tag has changed since. Left out, it is saved whatever happened in between. */
|
|
6941
|
+
expectedVersion?: string;
|
|
6906
6942
|
}
|
|
6907
6943
|
|
|
6908
6944
|
/** What change a customer tag answers: `customerTags.update`. */
|
|
@@ -7020,6 +7056,8 @@ export interface AffiliatesUpdateParams {
|
|
|
7020
7056
|
discount?: number;
|
|
7021
7057
|
/** Whether their link works. Switched off, it takes nothing off and earns nothing. */
|
|
7022
7058
|
active?: boolean;
|
|
7059
|
+
/** The affiliate's `version` you last read. Sent, the change is refused with `stale_write` if what this saves of them has changed since. Left out, it is saved whatever happened in between. */
|
|
7060
|
+
expectedVersion?: string;
|
|
7023
7061
|
}
|
|
7024
7062
|
|
|
7025
7063
|
/** What update an affiliate answers: `affiliates.update`. */
|
|
@@ -7220,6 +7258,8 @@ export interface AffiliateProgrammeUpdateParams {
|
|
|
7220
7258
|
toStore?: boolean;
|
|
7221
7259
|
/** Whether an affiliate may ask for a payout. */
|
|
7222
7260
|
payouts?: boolean;
|
|
7261
|
+
/** The programme's `version` (`meta.version`) you last read. Sent, the change is refused with `stale_write` if any of its settings has changed since. Left out, it is saved whatever happened in between. */
|
|
7262
|
+
expectedVersion?: string;
|
|
7223
7263
|
}
|
|
7224
7264
|
|
|
7225
7265
|
/** What update the affiliate programme answers: `affiliateProgramme.update`. */
|
|
@@ -7621,15 +7661,12 @@ export interface TeamActivityParams {
|
|
|
7621
7661
|
export type TeamActivityItem = {
|
|
7622
7662
|
id: string;
|
|
7623
7663
|
userId: string;
|
|
7624
|
-
name:
|
|
7664
|
+
name: unknown;
|
|
7625
7665
|
email: string;
|
|
7626
|
-
team:
|
|
7666
|
+
team: unknown;
|
|
7627
7667
|
area: string;
|
|
7628
7668
|
summary: string;
|
|
7629
|
-
subject:
|
|
7630
|
-
kind: string;
|
|
7631
|
-
id: string;
|
|
7632
|
-
};
|
|
7669
|
+
subject: unknown;
|
|
7633
7670
|
at: string;
|
|
7634
7671
|
};
|
|
7635
7672
|
|
|
@@ -7661,6 +7698,8 @@ export interface TeamsUpdateParams {
|
|
|
7661
7698
|
name: string;
|
|
7662
7699
|
/** What its people may do, by name (List the team answers every permission in `permissions`). What a permission leans on is added with it: `stock.edit` brings `stock.view` and `products.view`. */
|
|
7663
7700
|
permissions: string[];
|
|
7701
|
+
/** The team's `version` (in `teams`) you last read. Sent, the change is refused with `stale_write` if the team has changed since. Left out, it is saved whatever happened in between. */
|
|
7702
|
+
expectedVersion?: string;
|
|
7664
7703
|
}
|
|
7665
7704
|
|
|
7666
7705
|
/** What update a team answers: `teams.update`. */
|
|
@@ -7818,6 +7857,8 @@ export interface ResellersUpdateSettingsParams {
|
|
|
7818
7857
|
currency?: string;
|
|
7819
7858
|
/** The smallest top-up a reseller can make, 5.00 to 100,000.00. */
|
|
7820
7859
|
minTopup?: number;
|
|
7860
|
+
/** The settings' `version` (`meta.version`) you last read. Sent, the change is refused with `stale_write` if any of them has changed since. Left out, it is saved whatever happened in between. */
|
|
7861
|
+
expectedVersion?: string;
|
|
7821
7862
|
}
|
|
7822
7863
|
|
|
7823
7864
|
/** What update the panel's settings answers: `resellers.updateSettings`. */
|
|
@@ -7911,7 +7952,7 @@ export interface ResellerProductsBadgesParams {
|
|
|
7911
7952
|
|
|
7912
7953
|
/** What set a product's status and labels on the panel answers: `resellerProducts.badges`. */
|
|
7913
7954
|
export type ResellerProductsBadgesResult = {
|
|
7914
|
-
"
|
|
7955
|
+
"e4d31280-6335-4561-8cd8-312acfcdde7f": {
|
|
7915
7956
|
label: string;
|
|
7916
7957
|
color: string;
|
|
7917
7958
|
kind: string;
|
|
@@ -8033,6 +8074,8 @@ export interface ResellerInvitesUpdateParams {
|
|
|
8033
8074
|
* Left out, it is true.
|
|
8034
8075
|
*/
|
|
8035
8076
|
enabled?: boolean;
|
|
8077
|
+
/** The link's `version` you last read. Sent, the change is refused with `stale_write` if the link has changed since. Left out, it is saved whatever happened in between. */
|
|
8078
|
+
expectedVersion?: string;
|
|
8036
8079
|
}
|
|
8037
8080
|
|
|
8038
8081
|
/** What update an invite link answers: `resellerInvites.update`. */
|
|
@@ -8103,6 +8146,8 @@ export interface ResellerAnnouncementsUpdateParams {
|
|
|
8103
8146
|
* Left out, it is false.
|
|
8104
8147
|
*/
|
|
8105
8148
|
pinned?: boolean;
|
|
8149
|
+
/** The announcement's `version` you last read. Sent, the change is refused with `stale_write` if the announcement has changed since. Left out, it is saved whatever happened in between. */
|
|
8150
|
+
expectedVersion?: string;
|
|
8106
8151
|
}
|
|
8107
8152
|
|
|
8108
8153
|
/** What update an announcement answers: `resellerAnnouncements.update`. */
|
|
@@ -8352,6 +8397,8 @@ export interface ResellersUpdateParams {
|
|
|
8352
8397
|
discount?: number;
|
|
8353
8398
|
/** Whether they can buy and top up. */
|
|
8354
8399
|
status?: "active" | "paused";
|
|
8400
|
+
/** The reseller's `version` you last read. Sent, the change is refused with `stale_write` if what this saves of them has changed since. Left out, it is saved whatever happened in between. */
|
|
8401
|
+
expectedVersion?: string;
|
|
8355
8402
|
}
|
|
8356
8403
|
|
|
8357
8404
|
/** What update a reseller answers: `resellers.update`. */
|
|
@@ -8471,6 +8518,8 @@ export type ResellersSetBalanceResult = {
|
|
|
8471
8518
|
export interface ResellersUpdateMemberParams {
|
|
8472
8519
|
/** What they may do, by name: `products.view`, `products.buy`, `orders.view`, `orders.keys`, `balance.view`, `balance.topup`, `api.keys`, `api.urls`, `team.view`, `team.manage`, `alerts.manage`. */
|
|
8473
8520
|
permissions: string[];
|
|
8521
|
+
/** The member's `version` (in the reseller's `team`) you last read. Sent, the change is refused with `stale_write` if the member has changed since. Left out, it is saved whatever happened in between. */
|
|
8522
|
+
expectedVersion?: string;
|
|
8474
8523
|
}
|
|
8475
8524
|
|
|
8476
8525
|
/** What change what a reseller's member may do answers: `resellers.updateMember`. */
|
|
@@ -8669,6 +8718,8 @@ export interface BlacklistUpdateParams {
|
|
|
8669
8718
|
* Left out, it is true.
|
|
8670
8719
|
*/
|
|
8671
8720
|
enabled?: boolean;
|
|
8721
|
+
/** The rule's `updatedAt` you last read. Sent, the change is refused with `stale_write` if the rule has changed since. Left out, it is saved whatever happened in between. */
|
|
8722
|
+
expectedUpdatedAt?: string;
|
|
8672
8723
|
}
|
|
8673
8724
|
|
|
8674
8725
|
/** What update a blacklist rule answers: `blacklist.update`. */
|
|
@@ -8810,6 +8861,8 @@ export interface AllowlistUpdateParams {
|
|
|
8810
8861
|
* Left out, it is true.
|
|
8811
8862
|
*/
|
|
8812
8863
|
enabled?: boolean;
|
|
8864
|
+
/** The entry's `updatedAt` you last read. Sent, the change is refused with `stale_write` if the entry has changed since. Left out, it is saved whatever happened in between. */
|
|
8865
|
+
expectedUpdatedAt?: string;
|
|
8813
8866
|
}
|
|
8814
8867
|
|
|
8815
8868
|
/** What update an allowlist entry answers: `allowlist.update`. */
|
|
@@ -9506,6 +9559,8 @@ export interface DisputesUpdateSettingsParams {
|
|
|
9506
9559
|
discordRoles?: "keep" | "take" | "kick" | "ban";
|
|
9507
9560
|
/** Whether a dispute closed in the store's favour gives the roles back, adds a kicked buyer again and lifts a ban. */
|
|
9508
9561
|
discordRolesBack?: boolean;
|
|
9562
|
+
/** The `version` you last read. Sent, the change is refused with `stale_write` if any of these settings has changed since. Left out, it is saved whatever happened in between. */
|
|
9563
|
+
expectedVersion?: string;
|
|
9509
9564
|
}
|
|
9510
9565
|
|
|
9511
9566
|
/** What change dispute settings answers: `disputes.updateSettings`. */
|
|
@@ -9787,6 +9842,8 @@ export interface FinanceSetPaymentCostsParams {
|
|
|
9787
9842
|
/** The fixed amount it keeps of each payment, in the store's currency. */
|
|
9788
9843
|
fixed?: number;
|
|
9789
9844
|
}[];
|
|
9845
|
+
/** The `version` of the payment costs you last read. Sent, the change is refused with `stale_write` if any of them has changed since. Left out, it is saved whatever happened in between. */
|
|
9846
|
+
expectedVersion?: string;
|
|
9790
9847
|
}
|
|
9791
9848
|
|
|
9792
9849
|
/** What set payment fee rates answers: `finance.setPaymentCosts`. */
|
|
@@ -10088,6 +10145,8 @@ export interface TaxUpdateParams {
|
|
|
10088
10145
|
included?: boolean;
|
|
10089
10146
|
/** Whether a business buyer's VAT number takes the tax off, when the EU's register confirms it and it is from another country than the store's. */
|
|
10090
10147
|
business?: boolean;
|
|
10148
|
+
/** The `version` you last read. Sent, the change is refused with `stale_write` if any of these settings has changed since; the rates have a `ratesVersion` of their own. Left out, it is saved whatever happened in between. */
|
|
10149
|
+
expectedVersion?: string;
|
|
10091
10150
|
}
|
|
10092
10151
|
|
|
10093
10152
|
/** What update tax settings answers: `tax.update`. */
|
|
@@ -10376,6 +10435,8 @@ export interface TaxSetRatesParams {
|
|
|
10376
10435
|
/** The rate, in percent. Left out for a whole country, its built-in rate. A state's rate is always sent. */
|
|
10377
10436
|
rate?: number;
|
|
10378
10437
|
}[];
|
|
10438
|
+
/** The `ratesVersion` you last read. Sent, the change is refused with `stale_write` if a rate has changed since. Left out, it is saved whatever happened in between. */
|
|
10439
|
+
expectedVersion?: string;
|
|
10379
10440
|
}
|
|
10380
10441
|
|
|
10381
10442
|
/** What add or change tax rates answers: `tax.setRates`. */
|
|
@@ -11192,6 +11253,8 @@ export interface ExpensesUpdateParams {
|
|
|
11192
11253
|
productId?: string;
|
|
11193
11254
|
/** With its amount as it was, the currency that amount is in: for an expense whose currency is not known (`currency` null), or to put right one that is wrong. Nothing is converted. With a new `amount` it is not read: a new amount is in the store's currency today. */
|
|
11194
11255
|
amountCurrency?: string;
|
|
11256
|
+
/** The expense's `updatedAt` you last read. Sent, the change is refused with `stale_write` if the expense has changed since. Left out, it is saved whatever happened in between. */
|
|
11257
|
+
expectedUpdatedAt?: string;
|
|
11195
11258
|
}
|
|
11196
11259
|
|
|
11197
11260
|
/** What update an expense answers: `expenses.update`. */
|
|
@@ -11278,6 +11341,8 @@ export interface ExpenseCategoriesUpdateParams {
|
|
|
11278
11341
|
name: string;
|
|
11279
11342
|
/** Its icon. Left out, it stays as it is. */
|
|
11280
11343
|
icon?: string;
|
|
11344
|
+
/** The category's `updatedAt` you last read. Sent, the change is refused with `stale_write` if the category has changed since. Left out, it is saved whatever happened in between. */
|
|
11345
|
+
expectedUpdatedAt?: string;
|
|
11281
11346
|
}
|
|
11282
11347
|
|
|
11283
11348
|
/** What update an expense category answers: `expenseCategories.update`. */
|
|
@@ -11384,6 +11449,8 @@ export interface RecurringExpensesUpdateParams {
|
|
|
11384
11449
|
reference?: string;
|
|
11385
11450
|
/** With its amount as it was, the currency that amount is in: for one whose currency is not known (`currency` null), or to put right one that is wrong. Nothing is converted. The expenses it writes from then on are in it; those it has written keep theirs. */
|
|
11386
11451
|
amountCurrency?: string;
|
|
11452
|
+
/** The recurring expense's `updatedAt` you last read. Sent, the change is refused with `stale_write` if it has changed since. Left out, it is saved whatever happened in between. */
|
|
11453
|
+
expectedUpdatedAt?: string;
|
|
11387
11454
|
}
|
|
11388
11455
|
|
|
11389
11456
|
/** What update a recurring expense answers: `recurringExpenses.update`. */
|
|
@@ -11536,6 +11603,7 @@ export type RequestsShowResult = {
|
|
|
11536
11603
|
createdAt: string;
|
|
11537
11604
|
requestBody: unknown;
|
|
11538
11605
|
responseBody: string;
|
|
11606
|
+
bodiesWithheld: boolean;
|
|
11539
11607
|
};
|
|
11540
11608
|
|
|
11541
11609
|
/** What list webhook endpoints answers: `webhooks.list`. */
|
|
@@ -11551,6 +11619,7 @@ export type WebhooksListResult = Array<{
|
|
|
11551
11619
|
lastStatus: unknown;
|
|
11552
11620
|
dateCreated: string;
|
|
11553
11621
|
updatedAt: string;
|
|
11622
|
+
version: string;
|
|
11554
11623
|
recentDeliveries: unknown[] | Record<string, unknown>;
|
|
11555
11624
|
}>;
|
|
11556
11625
|
|
|
@@ -11577,6 +11646,7 @@ export type WebhooksCreateResult = {
|
|
|
11577
11646
|
lastStatus: unknown;
|
|
11578
11647
|
dateCreated: string;
|
|
11579
11648
|
updatedAt: string;
|
|
11649
|
+
version: string;
|
|
11580
11650
|
secret: string;
|
|
11581
11651
|
};
|
|
11582
11652
|
|
|
@@ -11593,6 +11663,7 @@ export type WebhooksShowResult = {
|
|
|
11593
11663
|
lastStatus: unknown;
|
|
11594
11664
|
dateCreated: string;
|
|
11595
11665
|
updatedAt: string;
|
|
11666
|
+
version: string;
|
|
11596
11667
|
};
|
|
11597
11668
|
|
|
11598
11669
|
/** What update a webhook endpoint takes: `webhooks.update`. */
|
|
@@ -11605,6 +11676,8 @@ export interface WebhooksUpdateParams {
|
|
|
11605
11676
|
description?: string;
|
|
11606
11677
|
/** Whether events are sent to it. Switched off, nothing is sent, and what happens meanwhile is not kept for it. */
|
|
11607
11678
|
enabled?: boolean;
|
|
11679
|
+
/** The endpoint's `version` you last read. Sent, the change is refused with `stale_write` if its address, events, note or switch has changed since. Left out, it is saved whatever happened in between. */
|
|
11680
|
+
expectedVersion?: string;
|
|
11608
11681
|
}
|
|
11609
11682
|
|
|
11610
11683
|
/** What update a webhook endpoint answers: `webhooks.update`. */
|
|
@@ -11620,6 +11693,7 @@ export type WebhooksUpdateResult = {
|
|
|
11620
11693
|
lastStatus: unknown;
|
|
11621
11694
|
dateCreated: string;
|
|
11622
11695
|
updatedAt: string;
|
|
11696
|
+
version: string;
|
|
11623
11697
|
};
|
|
11624
11698
|
|
|
11625
11699
|
/** What delete a webhook endpoint answers: `webhooks.delete`. */
|
|
@@ -12888,7 +12962,7 @@ export interface ShoplyResourcesStorefronts {
|
|
|
12888
12962
|
/**
|
|
12889
12963
|
* **Publish a storefront's code**
|
|
12890
12964
|
*
|
|
12891
|
-
* Puts the draft live, its files and its design together, and makes this storefront the one buyers see, as Publish in the code studio does. Send `rev` and `version` from "Get a storefront's code" as you last read it: if either has moved since (somebody saved in the meantime) it is refused with `draft_conflict`, so you never publish what you have not seen. A mistake in a template refuses it with `code_problems`, the mistakes listed in `problems`.
|
|
12965
|
+
* Puts the draft live, its files and its design together, and makes this storefront the one buyers see, as Publish in the code studio does. Send `rev` and `version` from "Get a storefront's code" as you last read it: if either has moved since (somebody saved in the meantime) it is refused with `draft_conflict`, so you never publish what you have not seen. A mistake in a template refuses it with `code_problems`, the mistakes listed in `problems`. Making another storefront the one buyers see is the owner's: a key or a CLI sign-in somebody on the store's team made publishes only the storefront that is live already, and is refused another with `team_permission`.
|
|
12892
12966
|
*
|
|
12893
12967
|
* Needs the `storefronts.write` permission (Change Storefronts).
|
|
12894
12968
|
*
|
|
@@ -14980,7 +15054,7 @@ export interface ShoplyResourcesTeam {
|
|
|
14980
15054
|
/**
|
|
14981
15055
|
* **List activity**
|
|
14982
15056
|
*
|
|
14983
|
-
* Who did what at the store on the dashboard, the newest first, fifty a page: each line's `summary` ("Refunded order ..."), who did it as they were then (`name`, `email`, `team`, which is null for the owner), its `area` of the dashboard, and what it was about (`subject`). Every change and every export is a line, the owner's included
|
|
15057
|
+
* Who did what at the store on the dashboard, the newest first, fifty a page: each line's `summary` ("Refunded order ..."), who did it as they were then (`name`, `email`, `team`, which is null for the owner), its `area` of the dashboard, and what it was about (`subject`). Every change and every export is a line, the owner's included. What a key does is not, and is in List API requests, except a change to the team, which is a line under whoever made the key, saying which key. Kept 365 days.
|
|
14984
15058
|
*
|
|
14985
15059
|
* Needs the `team.read` permission (Read the Team).
|
|
14986
15060
|
*
|
|
@@ -15020,7 +15094,7 @@ export interface ShoplyResourcesTeam {
|
|
|
15020
15094
|
/**
|
|
15021
15095
|
* **Move somebody to another team**
|
|
15022
15096
|
*
|
|
15023
|
-
* They can do what the other team can from their next request. Not onto a team that holds a sensitive permission: do that on the dashboard.
|
|
15097
|
+
* They can do what the other team can from their next request. The API keys and CLI sign-ins a person on the team made lose what their team no longer holds, and are revoked when nothing is left or the team does not hold `dev.keys`; an app they connected is disconnected when the team does not hold all it was given, or `dev.apps`. Not onto a team that holds a sensitive permission: do that on the dashboard.
|
|
15024
15098
|
*
|
|
15025
15099
|
* Needs the `team.write` permission (Manage the Team).
|
|
15026
15100
|
*
|
|
@@ -15030,7 +15104,7 @@ export interface ShoplyResourcesTeam {
|
|
|
15030
15104
|
/**
|
|
15031
15105
|
* **Remove somebody from the team**
|
|
15032
15106
|
*
|
|
15033
|
-
* They can no longer reach the store. The API keys they made and the apps they connected stop working with them (`keysStopped` says how many),
|
|
15107
|
+
* They can no longer reach the store. The API keys they made and the apps they connected stop working with them (`keysStopped` says how many), the webhooks those made and the ones they added on the dashboard are deleted, and the invites they sent and nobody has taken up are cancelled.
|
|
15034
15108
|
*
|
|
15035
15109
|
* Needs the `team.write` permission (Manage the Team).
|
|
15036
15110
|
*
|
|
@@ -15043,7 +15117,7 @@ export interface ShoplyResourcesTeams {
|
|
|
15043
15117
|
/**
|
|
15044
15118
|
* **Create a team**
|
|
15045
15119
|
*
|
|
15046
|
-
* A store holds as many teams as its plan does (`limits.teams` in Get the team). A permission marked `sensitive` that the team did not hold before cannot be given with a key: give it on the dashboard, which asks the person to confirm it is them.
|
|
15120
|
+
* A store holds as many teams as its plan does (`limits.teams` in Get the team). A key does this as whoever made it: a key somebody on the store's team made gives, takes away and changes only what their own team holds, as they can on the dashboard, and is refused with `team_beyond` otherwise. A permission marked `sensitive` that the team did not hold before cannot be given with a key: give it on the dashboard, which asks the person to confirm it is them.
|
|
15047
15121
|
*
|
|
15048
15122
|
* Needs the `team.write` permission (Manage the Team).
|
|
15049
15123
|
*
|
|
@@ -15053,7 +15127,7 @@ export interface ShoplyResourcesTeams {
|
|
|
15053
15127
|
/**
|
|
15054
15128
|
* **Update a team**
|
|
15055
15129
|
*
|
|
15056
|
-
* Saves the team whole: its name and its permissions. Its people can do what it now holds from their next request. A permission marked `sensitive` that the team did not hold before cannot be given with a key: give it on the dashboard, which asks the person to confirm it is them.
|
|
15130
|
+
* Saves the team whole: its name and its permissions. Its people can do what it now holds from their next request. The API keys and CLI sign-ins a person on the team made lose what their team no longer holds, and are revoked when nothing is left or the team does not hold `dev.keys`; an app they connected is disconnected when the team does not hold all it was given, or `dev.apps`. A key does this as whoever made it: a key somebody on the store's team made gives, takes away and changes only what their own team holds, as they can on the dashboard, and is refused with `team_beyond` otherwise. A permission marked `sensitive` that the team did not hold before cannot be given with a key: give it on the dashboard, which asks the person to confirm it is them.
|
|
15057
15131
|
*
|
|
15058
15132
|
* Needs the `team.write` permission (Manage the Team).
|
|
15059
15133
|
*
|
|
@@ -15411,7 +15485,7 @@ export interface ShoplyResourcesResellerOrders {
|
|
|
15411
15485
|
/**
|
|
15412
15486
|
* **Get a reseller order**
|
|
15413
15487
|
*
|
|
15414
|
-
* One reseller order whole, as the dashboard's page for it shows it: who bought it (`reseller`, and `boughtBy`, the member of their team), how (`via`), the `total` taken off their balance, `listTotal` (what it came to at the panel's list prices when bought) and `discount` (what their price took off it), both null for an order from before those were kept, and `balanceAfter`. Each of `lines` is an option it bought, with its `unitPrice` and `quantity` and what it delivered: `keys`, `items` (what a dynamic delivery's server handed back, a line each), `instructions`, and `waiting` while a dynamic line is still being fetched. A store's own order or a top-up answers 404.
|
|
15488
|
+
* One reseller order whole, as the dashboard's page for it shows it: who bought it (`reseller`, and `boughtBy`, the member of their team), how (`via`), the `total` taken off their balance, `listTotal` (what it came to at the panel's list prices when bought) and `discount` (what their price took off it), both null for an order from before those were kept, and `balanceAfter`. Each of `lines` is an option it bought, with its `unitPrice` and `quantity` and what it delivered: `keys`, `items` (what a dynamic delivery's server handed back, a line each), `instructions`, and `waiting` while a dynamic line is still being fetched. What it delivered is answered only to a key that also holds `orders.read`, as a store order's is: to any other, `keys` and `items` are empty, `instructions` is empty, `delivered` says how many, and `goodsShown` is false. A store's own order or a top-up answers 404.
|
|
15415
15489
|
*
|
|
15416
15490
|
* Needs the `resellers.read` permission (Read Resellers).
|
|
15417
15491
|
*
|
|
@@ -16220,7 +16294,7 @@ export interface ShoplyResourcesRequests {
|
|
|
16220
16294
|
/**
|
|
16221
16295
|
* **Get an API request**
|
|
16222
16296
|
*
|
|
16223
|
-
* One request, with what was sent and what came back. Long bodies are cut short,
|
|
16297
|
+
* One request, with what was sent and what came back. Long bodies are cut short. A secret is never kept, in what was sent, what came back or the query: a value under a name that says it is one (a password, a signing secret, a token) and a value shaped like one under any name (an API key, a join link) is `[not kept]`. Nor are license keys going into stock. The two bodies are answered only to a key that holds the scope of what the request did, and `bodiesWithheld` is true where they were kept back. A request's ID is the `X-Request-Id` header of its answer.
|
|
16224
16298
|
*
|
|
16225
16299
|
* Needs the `logs.read` permission (Read API Requests).
|
|
16226
16300
|
*
|
|
@@ -16642,7 +16716,7 @@ export interface ShoplyCustomerResources {
|
|
|
16642
16716
|
*
|
|
16643
16717
|
* Emails a six-digit code to the address a buyer typed, for them to type back with Sign in with the code. The code works for 10 minutes, five tries.
|
|
16644
16718
|
*
|
|
16645
|
-
* The answer is the same for any address, and a code is only mailed to an address that has orders at the store, so this cannot be used to find out who has bought there. One address is sent a code a minute at most, five an hour and ten a day: past that the answer is `code_cooldown` with `resendIn`, the seconds to wait. A store sends 60 codes an hour at most, and past that
|
|
16719
|
+
* The answer is the same for any address, and a code is only mailed to an address that has orders at the store, so this cannot be used to find out who has bought there. One address is sent a code a minute at most, five an hour and ten a day: past that the answer is `code_cooldown` with `resendIn`, the seconds to wait. A store sends 60 codes an hour at most, and past that the answer is `store_busy`. Other stores' codes never count against it.
|
|
16646
16720
|
*
|
|
16647
16721
|
* Call it from the buyer's own device. It is counted for the address that asks, 10 an hour, so a server asking for every buyer would run out at once.
|
|
16648
16722
|
*
|
|
@@ -17151,37 +17225,37 @@ export interface WebhookEventData {
|
|
|
17151
17225
|
/**
|
|
17152
17226
|
* A team was made at the store, with what its people may do.
|
|
17153
17227
|
*
|
|
17154
|
-
* `data`: For `team.created` and `team.updated` the team as [Get the team](https://docs.shoply.gg/api-reference/teams/get-the-team) answers it in `teams`, without its `people`; `team.deleted` has its `id` and `name`. The three `team.member_` events have the person as Get the team answers them on a team (`id`, `teamId`, `name`, `email`, `joinedAt`), with `team`, the team they are on now or were on, by `id` and `name`; `team.member_moved` adds `from`, the team they left, and `team.member_left` adds `reason` (`removed` or `
|
|
17228
|
+
* `data`: For `team.created` and `team.updated` the team as [Get the team](https://docs.shoply.gg/api-reference/teams/get-the-team) answers it in `teams`, without its `people`; `team.deleted` has its `id` and `name`. The three `team.member_` events have the person as Get the team answers them on a team (`id`, `teamId`, `name`, `email`, `joinedAt`), with `team`, the team they are on now or were on, by `id` and `name`; `team.member_moved` adds `from`, the team they left, and `team.member_left` adds `reason` (`removed`, `left`, or `account_deleted` when their Shoply account was deleted, 30 days after it was closed) and `keysStopped`.
|
|
17155
17229
|
*/
|
|
17156
17230
|
"team.created": Record<string, unknown>;
|
|
17157
17231
|
/**
|
|
17158
17232
|
* A team was renamed or given other permissions. Its people can do what it now holds from their next request.
|
|
17159
17233
|
*
|
|
17160
|
-
* `data`: For `team.created` and `team.updated` the team as [Get the team](https://docs.shoply.gg/api-reference/teams/get-the-team) answers it in `teams`, without its `people`; `team.deleted` has its `id` and `name`. The three `team.member_` events have the person as Get the team answers them on a team (`id`, `teamId`, `name`, `email`, `joinedAt`), with `team`, the team they are on now or were on, by `id` and `name`; `team.member_moved` adds `from`, the team they left, and `team.member_left` adds `reason` (`removed` or `
|
|
17234
|
+
* `data`: For `team.created` and `team.updated` the team as [Get the team](https://docs.shoply.gg/api-reference/teams/get-the-team) answers it in `teams`, without its `people`; `team.deleted` has its `id` and `name`. The three `team.member_` events have the person as Get the team answers them on a team (`id`, `teamId`, `name`, `email`, `joinedAt`), with `team`, the team they are on now or were on, by `id` and `name`; `team.member_moved` adds `from`, the team they left, and `team.member_left` adds `reason` (`removed`, `left`, or `account_deleted` when their Shoply account was deleted, 30 days after it was closed) and `keysStopped`.
|
|
17161
17235
|
*/
|
|
17162
17236
|
"team.updated": Record<string, unknown>;
|
|
17163
17237
|
/**
|
|
17164
17238
|
* A team with nobody on it was deleted, with its invites not yet taken up.
|
|
17165
17239
|
*
|
|
17166
|
-
* `data`: For `team.created` and `team.updated` the team as [Get the team](https://docs.shoply.gg/api-reference/teams/get-the-team) answers it in `teams`, without its `people`; `team.deleted` has its `id` and `name`. The three `team.member_` events have the person as Get the team answers them on a team (`id`, `teamId`, `name`, `email`, `joinedAt`), with `team`, the team they are on now or were on, by `id` and `name`; `team.member_moved` adds `from`, the team they left, and `team.member_left` adds `reason` (`removed` or `
|
|
17240
|
+
* `data`: For `team.created` and `team.updated` the team as [Get the team](https://docs.shoply.gg/api-reference/teams/get-the-team) answers it in `teams`, without its `people`; `team.deleted` has its `id` and `name`. The three `team.member_` events have the person as Get the team answers them on a team (`id`, `teamId`, `name`, `email`, `joinedAt`), with `team`, the team they are on now or were on, by `id` and `name`; `team.member_moved` adds `from`, the team they left, and `team.member_left` adds `reason` (`removed`, `left`, or `account_deleted` when their Shoply account was deleted, 30 days after it was closed) and `keysStopped`.
|
|
17167
17241
|
*/
|
|
17168
17242
|
"team.deleted": Record<string, unknown>;
|
|
17169
17243
|
/**
|
|
17170
17244
|
* Somebody took up an invite and can now reach the store from their store switcher.
|
|
17171
17245
|
*
|
|
17172
|
-
* `data`: For `team.created` and `team.updated` the team as [Get the team](https://docs.shoply.gg/api-reference/teams/get-the-team) answers it in `teams`, without its `people`; `team.deleted` has its `id` and `name`. The three `team.member_` events have the person as Get the team answers them on a team (`id`, `teamId`, `name`, `email`, `joinedAt`), with `team`, the team they are on now or were on, by `id` and `name`; `team.member_moved` adds `from`, the team they left, and `team.member_left` adds `reason` (`removed` or `
|
|
17246
|
+
* `data`: For `team.created` and `team.updated` the team as [Get the team](https://docs.shoply.gg/api-reference/teams/get-the-team) answers it in `teams`, without its `people`; `team.deleted` has its `id` and `name`. The three `team.member_` events have the person as Get the team answers them on a team (`id`, `teamId`, `name`, `email`, `joinedAt`), with `team`, the team they are on now or were on, by `id` and `name`; `team.member_moved` adds `from`, the team they left, and `team.member_left` adds `reason` (`removed`, `left`, or `account_deleted` when their Shoply account was deleted, 30 days after it was closed) and `keysStopped`.
|
|
17173
17247
|
*/
|
|
17174
17248
|
"team.member_joined": Record<string, unknown>;
|
|
17175
17249
|
/**
|
|
17176
17250
|
* Somebody on the team was moved to another team, and can do what that team holds.
|
|
17177
17251
|
*
|
|
17178
|
-
* `data`: For `team.created` and `team.updated` the team as [Get the team](https://docs.shoply.gg/api-reference/teams/get-the-team) answers it in `teams`, without its `people`; `team.deleted` has its `id` and `name`. The three `team.member_` events have the person as Get the team answers them on a team (`id`, `teamId`, `name`, `email`, `joinedAt`), with `team`, the team they are on now or were on, by `id` and `name`; `team.member_moved` adds `from`, the team they left, and `team.member_left` adds `reason` (`removed` or `
|
|
17252
|
+
* `data`: For `team.created` and `team.updated` the team as [Get the team](https://docs.shoply.gg/api-reference/teams/get-the-team) answers it in `teams`, without its `people`; `team.deleted` has its `id` and `name`. The three `team.member_` events have the person as Get the team answers them on a team (`id`, `teamId`, `name`, `email`, `joinedAt`), with `team`, the team they are on now or were on, by `id` and `name`; `team.member_moved` adds `from`, the team they left, and `team.member_left` adds `reason` (`removed`, `left`, or `account_deleted` when their Shoply account was deleted, 30 days after it was closed) and `keysStopped`.
|
|
17179
17253
|
*/
|
|
17180
17254
|
"team.member_moved": Record<string, unknown>;
|
|
17181
17255
|
/**
|
|
17182
|
-
* Somebody can no longer reach the store: they were removed, or
|
|
17256
|
+
* Somebody can no longer reach the store: they were removed, they left, or their Shoply account was deleted. The API keys they made and the apps they connected stopped working with them.
|
|
17183
17257
|
*
|
|
17184
|
-
* `data`: For `team.created` and `team.updated` the team as [Get the team](https://docs.shoply.gg/api-reference/teams/get-the-team) answers it in `teams`, without its `people`; `team.deleted` has its `id` and `name`. The three `team.member_` events have the person as Get the team answers them on a team (`id`, `teamId`, `name`, `email`, `joinedAt`), with `team`, the team they are on now or were on, by `id` and `name`; `team.member_moved` adds `from`, the team they left, and `team.member_left` adds `reason` (`removed` or `
|
|
17258
|
+
* `data`: For `team.created` and `team.updated` the team as [Get the team](https://docs.shoply.gg/api-reference/teams/get-the-team) answers it in `teams`, without its `people`; `team.deleted` has its `id` and `name`. The three `team.member_` events have the person as Get the team answers them on a team (`id`, `teamId`, `name`, `email`, `joinedAt`), with `team`, the team they are on now or were on, by `id` and `name`; `team.member_moved` adds `from`, the team they left, and `team.member_left` adds `reason` (`removed`, `left`, or `account_deleted` when their Shoply account was deleted, 30 days after it was closed) and `keysStopped`.
|
|
17185
17259
|
*/
|
|
17186
17260
|
"team.member_left": Record<string, unknown>;
|
|
17187
17261
|
/**
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shoplygg/node",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.2",
|
|
4
4
|
"description": "Shoply's API from your own server: every route as a typed method, safe retries, pages, checking webhooks, and OAuth for apps.",
|
|
5
5
|
"keywords": ["shoply", "api", "sdk", "ecommerce", "webhooks", "digital-goods"],
|
|
6
6
|
"homepage": "https://docs.shoply.gg/api-reference/node",
|