@shoplygg/node 0.4.1 → 0.6.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.
@@ -659,6 +659,7 @@ export type AnalyticsOverviewResult = {
659
659
  refunded: number;
660
660
  cancelled: number;
661
661
  chargeback: number;
662
+ imported: number;
662
663
  };
663
664
  statusTotals: {
664
665
  completed: {
@@ -681,6 +682,10 @@ export type AnalyticsOverviewResult = {
681
682
  orders: number;
682
683
  amount: number;
683
684
  };
685
+ imported: {
686
+ orders: number;
687
+ amount: number;
688
+ };
684
689
  };
685
690
  week: number[][];
686
691
  topCountries: {
@@ -2357,13 +2362,25 @@ export type CustomMethodsDeleteIconResult = unknown;
2357
2362
  /** What list products takes: `products.list`. */
2358
2363
  export interface ProductsListParams {
2359
2364
  /** Only products with this visibility. */
2360
- visibility?: "public" | "unlisted" | "private";
2365
+ visibility?: "public" | "unlisted" | "private" | "on_hold";
2361
2366
  /** Only products whose name contains this. */
2362
2367
  search?: string;
2368
+ /**
2369
+ * Which page of the list. The first is 1.
2370
+ *
2371
+ * Left out, it is 1.
2372
+ */
2373
+ page?: number;
2374
+ /**
2375
+ * How many a page holds, up to 100. Asking for a page and not saying is 50.
2376
+ *
2377
+ * Left out, it is 50.
2378
+ */
2379
+ perPage?: number;
2363
2380
  }
2364
2381
 
2365
- /** What list products answers: `products.list`. */
2366
- export type ProductsListResult = Array<{
2382
+ /** A row of what list products lists: `products.list`. */
2383
+ export type ProductsListItem = {
2367
2384
  id: string;
2368
2385
  storeId: string;
2369
2386
  name: string;
@@ -2425,7 +2442,7 @@ export type ProductsListResult = Array<{
2425
2442
  blockedPaymentMethods: unknown[] | Record<string, unknown>;
2426
2443
  }>;
2427
2444
  runningSubscriptions: number;
2428
- }>;
2445
+ };
2429
2446
 
2430
2447
  /** What create a product takes: `products.create`. */
2431
2448
  export interface ProductsCreateParams {
@@ -2436,11 +2453,11 @@ export interface ProductsCreateParams {
2436
2453
  /** What the product page says. Plain text with a few marks: a line that starts with `#` is a heading, one that starts with `-` is a point of a list, a blank line ends a paragraph, and `**bold**` and backticks for code work inside a line. */
2437
2454
  description?: string;
2438
2455
  /**
2439
- * `public` is listed and can be bought. `unlisted` can be bought by whoever has its link. `private` cannot be bought.
2456
+ * `public` is listed and can be bought. `unlisted` can be bought by whoever has its link. `private` cannot be bought. `on_hold` is listed as a public product is and cannot be bought: its page says it is on hold, and every checkout refuses it.
2440
2457
  *
2441
2458
  * Left out, it is "public".
2442
2459
  */
2443
- visibility?: "public" | "unlisted" | "private";
2460
+ visibility?: "public" | "unlisted" | "private" | "on_hold";
2444
2461
  /** The product's options, 1 to 100 of them, in the order buyers see them. A variant of the product that is not in this list is removed. */
2445
2462
  variants: Array<{
2446
2463
  /** An existing variant's ID, to keep it and change it. Left out, the entry is a new variant. */
@@ -2696,11 +2713,11 @@ export interface ProductsUpdateParams {
2696
2713
  /** What the product page says. Plain text with a few marks: a line that starts with `#` is a heading, one that starts with `-` is a point of a list, a blank line ends a paragraph, and `**bold**` and backticks for code work inside a line. */
2697
2714
  description?: string;
2698
2715
  /**
2699
- * `public` is listed and can be bought. `unlisted` can be bought by whoever has its link. `private` cannot be bought.
2716
+ * `public` is listed and can be bought. `unlisted` can be bought by whoever has its link. `private` cannot be bought. `on_hold` is listed as a public product is and cannot be bought: its page says it is on hold, and every checkout refuses it.
2700
2717
  *
2701
2718
  * Left out, it is "public".
2702
2719
  */
2703
- visibility?: "public" | "unlisted" | "private";
2720
+ visibility?: "public" | "unlisted" | "private" | "on_hold";
2704
2721
  /** The product's options, 1 to 100 of them, in the order buyers see them. A variant of the product that is not in this list is removed. */
2705
2722
  variants: Array<{
2706
2723
  /** An existing variant's ID, to keep it and change it. Left out, the entry is a new variant. */
@@ -2890,7 +2907,7 @@ export type ProductsDeleteResult = unknown;
2890
2907
  /** What set a product's visibility takes: `products.setVisibility`. */
2891
2908
  export interface ProductsSetVisibilityParams {
2892
2909
  /** The new visibility. */
2893
- visibility: "public" | "unlisted" | "private";
2910
+ visibility: "public" | "unlisted" | "private" | "on_hold";
2894
2911
  }
2895
2912
 
2896
2913
  /** What set a product's visibility answers: `products.setVisibility`. */
@@ -2915,7 +2932,7 @@ export interface ProductsBulkUpdateParams {
2915
2932
  /** The products, by ID. Up to 250. */
2916
2933
  productIds: string[];
2917
2934
  /** A visibility for all of them. */
2918
- visibility?: "public" | "unlisted" | "private";
2935
+ visibility?: "public" | "unlisted" | "private" | "on_hold";
2919
2936
  /** Whether all of them are marked as best sellers. */
2920
2937
  isBestSeller?: boolean;
2921
2938
  /** A payment method's name, and `block` or `allow`. `block` adds the method to each product's blocked list. `allow` takes it off the product and off every variant of it. */
@@ -3999,10 +4016,10 @@ export interface OrdersListParams {
3999
4016
  */
4000
4017
  perPage?: number;
4001
4018
  /** Only orders in this status. */
4002
- status?: "pending" | "completed" | "refunded" | "cancelled" | "chargeback";
4019
+ status?: "pending" | "completed" | "refunded" | "cancelled" | "chargeback" | "imported";
4003
4020
  /** Only orders paid with this payment method, by its name in the payment methods list. */
4004
4021
  gateway?: string;
4005
- /** An order's ID, or part of a buyer's email. */
4022
+ /** An order's ID, an imported order's ID on the platform it came from, or part of a buyer's email. */
4006
4023
  search?: string;
4007
4024
  /**
4008
4025
  * What the list is ordered by.
@@ -4067,6 +4084,7 @@ export type OrdersListItem = {
4067
4084
  paidAt: unknown;
4068
4085
  note: string;
4069
4086
  customFields: unknown[] | Record<string, unknown>;
4087
+ imported: unknown;
4070
4088
  emailState: string;
4071
4089
  emailError: string;
4072
4090
  emailAttempts: number;
@@ -4106,10 +4124,10 @@ export type OrdersListItem = {
4106
4124
  /** What export orders takes: `orders.export`. */
4107
4125
  export interface OrdersExportParams {
4108
4126
  /** Only orders in this status. */
4109
- status?: "pending" | "completed" | "refunded" | "cancelled" | "chargeback";
4127
+ status?: "pending" | "completed" | "refunded" | "cancelled" | "chargeback" | "imported";
4110
4128
  /** Only orders paid with this payment method, by its name in the payment methods list. */
4111
4129
  gateway?: string;
4112
- /** An order's ID, or part of a buyer's email. */
4130
+ /** An order's ID, an imported order's ID on the platform it came from, or part of a buyer's email. */
4113
4131
  search?: string;
4114
4132
  /**
4115
4133
  * What the list is ordered by.
@@ -4182,6 +4200,7 @@ export type OrdersShowResult = {
4182
4200
  paidAt: string;
4183
4201
  note: string;
4184
4202
  customFields: unknown[] | Record<string, unknown>;
4203
+ imported: unknown;
4185
4204
  emailState: string;
4186
4205
  emailError: string;
4187
4206
  emailAttempts: number;
@@ -4252,6 +4271,10 @@ export type OrdersShowResult = {
4252
4271
  kind: string;
4253
4272
  detail: string;
4254
4273
  actor: string;
4274
+ by: {
4275
+ name: string;
4276
+ kind: string;
4277
+ };
4255
4278
  at: string;
4256
4279
  }[];
4257
4280
  testPayment: boolean;
@@ -4564,6 +4587,7 @@ export type ReviewsListItem = {
4564
4587
  rating: number;
4565
4588
  message: string;
4566
4589
  automatic: boolean;
4590
+ imported: boolean;
4567
4591
  dateCreated: string;
4568
4592
  items: {
4569
4593
  productId: string;
@@ -4625,6 +4649,7 @@ export type CouponsListItem = {
4625
4649
  active: boolean;
4626
4650
  appliesTo: string;
4627
4651
  targets: unknown[] | Record<string, unknown>;
4652
+ customerTag: unknown;
4628
4653
  sort: number;
4629
4654
  discountGiven: number;
4630
4655
  revenue: number;
@@ -4681,6 +4706,8 @@ export interface CouponsCreateParams {
4681
4706
  /** One variant of it. Left out, every variant. */
4682
4707
  variantId?: string;
4683
4708
  }[];
4709
+ /** Who may use it: empty for anybody with the code, `vip`, or the ID of one of the store's tags. The buyer's email has to wear the tag when the code is applied and when they pay. */
4710
+ customerTag?: string;
4684
4711
  }
4685
4712
 
4686
4713
  /** What create a coupon answers: `coupons.create`. */
@@ -4699,6 +4726,7 @@ export type CouponsCreateResult = {
4699
4726
  active: boolean;
4700
4727
  appliesTo: string;
4701
4728
  targets: unknown[] | Record<string, unknown>;
4729
+ customerTag: unknown;
4702
4730
  sort: number;
4703
4731
  discountGiven: number;
4704
4732
  revenue: number;
@@ -4755,6 +4783,8 @@ export interface CouponsUpdateParams {
4755
4783
  /** One variant of it. Left out, every variant. */
4756
4784
  variantId?: string;
4757
4785
  }[];
4786
+ /** Who may use it: empty for anybody with the code, `vip`, or the ID of one of the store's tags. The buyer's email has to wear the tag when the code is applied and when they pay. */
4787
+ customerTag?: string;
4758
4788
  /** 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. */
4759
4789
  expectedUpdatedAt?: string;
4760
4790
  }
@@ -4775,6 +4805,7 @@ export type CouponsUpdateResult = {
4775
4805
  active: boolean;
4776
4806
  appliesTo: string;
4777
4807
  targets: unknown[] | Record<string, unknown>;
4808
+ customerTag: unknown;
4778
4809
  sort: number;
4779
4810
  discountGiven: number;
4780
4811
  revenue: number;
@@ -5633,19 +5664,19 @@ export interface CartRecoveryUpdateParams {
5633
5664
  firstOn?: boolean;
5634
5665
  /** Minutes after the buyer left. One of 30, 60, 120, 240. */
5635
5666
  firstMinutes?: number;
5636
- /** Its subject, up to 150 characters. */
5667
+ /** Its subject, up to 150 characters. It may hold the email's variables, such as `{{ store.name }}`; one whose marks cannot be read is refused. */
5637
5668
  firstSubject?: string;
5638
5669
  /** Whether the declined card email takes the first one's place after a card was turned down. */
5639
5670
  declinedOn?: boolean;
5640
5671
  /** Minutes after the decline. One of 5, 15, 30, 60. */
5641
5672
  declinedMinutes?: number;
5642
- /** Its subject, up to 150 characters. */
5673
+ /** Its subject, up to 150 characters. It may hold the email's variables, such as `{{ store.name }}`; one whose marks cannot be read is refused. */
5643
5674
  declinedSubject?: string;
5644
5675
  /** Whether the second email is sent. */
5645
5676
  secondOn?: boolean;
5646
5677
  /** Minutes after the buyer left. One of 720, 1200, 1440, 2880. */
5647
5678
  secondMinutes?: number;
5648
- /** Its subject, up to 150 characters. */
5679
+ /** Its subject, up to 150 characters. It may hold the email's variables, such as `{{ store.name }}`; one whose marks cannot be read is refused. */
5649
5680
  secondSubject?: string;
5650
5681
  /** The percent off its coupon. One of 0, 5, 10, 15, 20, 25. 0 sends it with no coupon. */
5651
5682
  secondPercent?: number;
@@ -5769,13 +5800,13 @@ export interface WinBackUpdateParams {
5769
5800
  firstOn?: boolean;
5770
5801
  /** Days after a buyer's last order. One of 14, 21, 30, 45, 60, 90. */
5771
5802
  firstDays?: number;
5772
- /** Its subject, up to 150 characters. */
5803
+ /** Its subject, up to 150 characters. It may hold the email's variables, such as `{{ store.name }}`; one whose marks cannot be read is refused. */
5773
5804
  firstSubject?: string;
5774
5805
  /** Whether the second email is sent. */
5775
5806
  secondOn?: boolean;
5776
5807
  /** Days after the first. One of 3, 7, 14, 21, 30. */
5777
5808
  secondDays?: number;
5778
- /** Its subject, up to 150 characters. */
5809
+ /** Its subject, up to 150 characters. It may hold the email's variables, such as `{{ store.name }}`; one whose marks cannot be read is refused. */
5779
5810
  secondSubject?: string;
5780
5811
  /** The percent off its coupon. One of 0, 5, 10, 15, 20, 25. 0 sends it with no coupon. */
5781
5812
  secondPercent?: number;
@@ -5972,6 +6003,181 @@ export type SubscribersUnsubscribeResult = {
5972
6003
  unsubscribedBy: string;
5973
6004
  };
5974
6005
 
6006
+ /** What list email templates answers: `emailTemplates.list`. */
6007
+ export type EmailTemplatesListResult = {
6008
+ kind: string;
6009
+ group: string;
6010
+ name: string;
6011
+ when: string;
6012
+ edited: boolean;
6013
+ html: boolean;
6014
+ css: boolean;
6015
+ subject: boolean;
6016
+ updatedAt: unknown;
6017
+ }[];
6018
+
6019
+ /** What get the shared email CSS answers: `emailTemplates.shared`. */
6020
+ export type EmailTemplatesSharedResult = {
6021
+ css: string;
6022
+ updatedAt: string;
6023
+ baseCss: string;
6024
+ };
6025
+
6026
+ /** What change the shared email CSS takes: `emailTemplates.saveShared`. */
6027
+ export interface EmailTemplatesSaveSharedParams {
6028
+ /** The whole look, or null for Shoply's. */
6029
+ css: string;
6030
+ /** The `updatedAt` you read; one changed since is refused with `stale_write`. */
6031
+ expectedUpdatedAt?: string;
6032
+ }
6033
+
6034
+ /** What change the shared email CSS answers: `emailTemplates.saveShared`. */
6035
+ export type EmailTemplatesSaveSharedResult = {
6036
+ css: string;
6037
+ updatedAt: string;
6038
+ baseCss: string;
6039
+ };
6040
+
6041
+ /** What get an email template answers: `emailTemplates.show`. */
6042
+ export type EmailTemplatesShowResult = {
6043
+ kind: string;
6044
+ group: string;
6045
+ name: string;
6046
+ when: string;
6047
+ marketing: boolean;
6048
+ required: string[];
6049
+ variables: {
6050
+ name: string;
6051
+ about: string;
6052
+ }[];
6053
+ parts: {
6054
+ name: string;
6055
+ about: string;
6056
+ }[];
6057
+ original: string;
6058
+ originalSubject: string;
6059
+ originalSubjectSource: string;
6060
+ html: unknown;
6061
+ css: unknown;
6062
+ subject: unknown;
6063
+ updatedAt: unknown;
6064
+ shared: unknown;
6065
+ baseCss: string;
6066
+ accent: string;
6067
+ };
6068
+
6069
+ /** What change an email template takes: `emailTemplates.update`. */
6070
+ export interface EmailTemplatesUpdateParams {
6071
+ /** The email's HTML, or null for the original. */
6072
+ html?: string;
6073
+ /** Its whole look, or null to follow the shared CSS. The look it would get anyway is saved as null. */
6074
+ css?: string;
6075
+ /** Its subject, or null for the original. */
6076
+ subject?: string;
6077
+ /** The `updatedAt` you read; a template changed since is refused with `stale_write`. */
6078
+ expectedUpdatedAt?: string;
6079
+ }
6080
+
6081
+ /** What change an email template answers: `emailTemplates.update`. */
6082
+ export type EmailTemplatesUpdateResult = {
6083
+ kind: string;
6084
+ group: string;
6085
+ name: string;
6086
+ when: string;
6087
+ marketing: boolean;
6088
+ required: string[];
6089
+ variables: {
6090
+ name: string;
6091
+ about: string;
6092
+ }[];
6093
+ parts: {
6094
+ name: string;
6095
+ about: string;
6096
+ }[];
6097
+ original: string;
6098
+ originalSubject: string;
6099
+ originalSubjectSource: string;
6100
+ html: unknown;
6101
+ css: string;
6102
+ subject: string;
6103
+ updatedAt: string;
6104
+ shared: unknown;
6105
+ baseCss: string;
6106
+ accent: string;
6107
+ };
6108
+
6109
+ /** What preview an email template takes: `emailTemplates.preview`. */
6110
+ export interface EmailTemplatesPreviewParams {
6111
+ /** HTML to preview in place of what is saved; null for the original. */
6112
+ html?: string;
6113
+ /** Its whole look, to preview in place of what is saved. */
6114
+ css?: string;
6115
+ /** A subject to preview in place of what is saved. */
6116
+ subject?: string;
6117
+ /** The look every email gets, in place of what is saved. */
6118
+ shared?: string;
6119
+ }
6120
+
6121
+ /** What preview an email template answers: `emailTemplates.preview`. */
6122
+ export type EmailTemplatesPreviewResult = {
6123
+ subject: string;
6124
+ html: string;
6125
+ text: string;
6126
+ parts: {
6127
+ delivery: string;
6128
+ buttons: string;
6129
+ summary: string;
6130
+ reply_note: string;
6131
+ };
6132
+ values: {
6133
+ "store.name": string;
6134
+ "store.url": string;
6135
+ "store.panel_url": string;
6136
+ "buyer.email": string;
6137
+ "order.id": string;
6138
+ "order.paid_at": string;
6139
+ "order.total": string;
6140
+ "order.paid_with": string;
6141
+ "order.invoice_attached": boolean;
6142
+ "links.order": string;
6143
+ "links.review": string;
6144
+ year: string;
6145
+ };
6146
+ problems: {
6147
+ html: unknown[] | Record<string, unknown>;
6148
+ css: unknown[] | Record<string, unknown>;
6149
+ subject: unknown[] | Record<string, unknown>;
6150
+ };
6151
+ };
6152
+
6153
+ /** What revert an email template answers: `emailTemplates.revert`. */
6154
+ export type EmailTemplatesRevertResult = {
6155
+ kind: string;
6156
+ group: string;
6157
+ name: string;
6158
+ when: string;
6159
+ marketing: boolean;
6160
+ required: string[];
6161
+ variables: {
6162
+ name: string;
6163
+ about: string;
6164
+ }[];
6165
+ parts: {
6166
+ name: string;
6167
+ about: string;
6168
+ }[];
6169
+ original: string;
6170
+ originalSubject: string;
6171
+ originalSubjectSource: string;
6172
+ html: unknown;
6173
+ css: unknown;
6174
+ subject: unknown;
6175
+ updatedAt: unknown;
6176
+ shared: unknown;
6177
+ baseCss: string;
6178
+ accent: string;
6179
+ };
6180
+
5975
6181
  /** What list customers takes: `customers.list`. */
5976
6182
  export interface CustomersListParams {
5977
6183
  /**
@@ -6282,6 +6488,7 @@ export type CustomerTagsListResult = {
6282
6488
  tone: string;
6283
6489
  automatic: boolean;
6284
6490
  customers: number;
6491
+ coupons: number;
6285
6492
  }[];
6286
6493
 
6287
6494
  /** What add a customer tag takes: `customerTags.create`. */
@@ -6325,6 +6532,7 @@ export type CustomerTagsAutomaticResult = {
6325
6532
  tone: string;
6326
6533
  automatic: boolean;
6327
6534
  customers: number;
6535
+ coupons: number;
6328
6536
  }[];
6329
6537
 
6330
6538
  /** What change a customer tag takes: `customerTags.update`. */
@@ -6950,6 +7158,236 @@ export type TicketsReopenResult = {
6950
7158
  on: boolean;
6951
7159
  };
6952
7160
 
7161
+ /** What get the team answers: `team.get`. */
7162
+ export type TeamGetResult = {
7163
+ teams: {
7164
+ id: string;
7165
+ name: string;
7166
+ permissions: string[];
7167
+ sensitive: number;
7168
+ reach: string[];
7169
+ people: {
7170
+ id: string;
7171
+ userId: string;
7172
+ teamId: string;
7173
+ name: string;
7174
+ email: string;
7175
+ avatarUrl: unknown;
7176
+ invitedBy: string;
7177
+ joinedAt: string;
7178
+ lastSeenAt: unknown;
7179
+ keys: number;
7180
+ me: boolean;
7181
+ }[];
7182
+ waiting: number;
7183
+ createdAt: string;
7184
+ updatedAt: string;
7185
+ }[];
7186
+ invites: {
7187
+ id: string;
7188
+ kind: string;
7189
+ email: string;
7190
+ teamId: string;
7191
+ team: string;
7192
+ invitedBy: string;
7193
+ sends: number;
7194
+ sentAt: string;
7195
+ expiresAt: string;
7196
+ expired: boolean;
7197
+ }[];
7198
+ owner: {
7199
+ userId: string;
7200
+ name: unknown;
7201
+ email: string;
7202
+ avatarUrl: unknown;
7203
+ };
7204
+ me: {
7205
+ role: string;
7206
+ teamId: unknown;
7207
+ permissions: string[];
7208
+ };
7209
+ permissions: {
7210
+ groups: {
7211
+ id: string;
7212
+ title: string;
7213
+ permissions: {
7214
+ id: unknown;
7215
+ label: unknown;
7216
+ about: unknown;
7217
+ sensitive: unknown;
7218
+ needs: unknown;
7219
+ }[];
7220
+ }[];
7221
+ presets: {
7222
+ id: string;
7223
+ name: string;
7224
+ about: string;
7225
+ permissions: string[];
7226
+ }[];
7227
+ };
7228
+ limits: {
7229
+ teams: number;
7230
+ people: number;
7231
+ name: number;
7232
+ perInvite: number;
7233
+ inviteDays: number;
7234
+ };
7235
+ };
7236
+
7237
+ /** What list activity takes: `team.activity`. */
7238
+ export interface TeamActivityParams {
7239
+ /** Only one person's, by their `userId`. */
7240
+ person?: string;
7241
+ /** Only one part of the dashboard, by its group's `id` in Get the team's `permissions`. */
7242
+ area?: string;
7243
+ /**
7244
+ * Which page of the list. The first is 1.
7245
+ *
7246
+ * Left out, it is 1.
7247
+ */
7248
+ page?: number;
7249
+ }
7250
+
7251
+ /** A row of what list activity lists: `team.activity`. */
7252
+ export type TeamActivityItem = {
7253
+ id: string;
7254
+ userId: string;
7255
+ name: string;
7256
+ email: string;
7257
+ team: string;
7258
+ area: string;
7259
+ summary: string;
7260
+ subject: {
7261
+ kind: string;
7262
+ id: string;
7263
+ };
7264
+ at: string;
7265
+ };
7266
+
7267
+ /** What create a team takes: `teams.create`. */
7268
+ export interface TeamsCreateParams {
7269
+ /** What the team is called, up to 40 characters, once a store. */
7270
+ name: string;
7271
+ /** 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`. */
7272
+ permissions: string[];
7273
+ }
7274
+
7275
+ /** What create a team answers: `teams.create`. */
7276
+ export type TeamsCreateResult = {
7277
+ id: string;
7278
+ name: string;
7279
+ permissions: string[];
7280
+ sensitive: number;
7281
+ reach: string[];
7282
+ people: unknown[] | Record<string, unknown>;
7283
+ waiting: number;
7284
+ createdAt: string;
7285
+ updatedAt: string;
7286
+ };
7287
+
7288
+ /** What update a team takes: `teams.update`. */
7289
+ export interface TeamsUpdateParams {
7290
+ /** What the team is called, up to 40 characters, once a store. */
7291
+ name: string;
7292
+ /** 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`. */
7293
+ permissions: string[];
7294
+ }
7295
+
7296
+ /** What update a team answers: `teams.update`. */
7297
+ export type TeamsUpdateResult = {
7298
+ id: string;
7299
+ name: string;
7300
+ permissions: string[];
7301
+ sensitive: number;
7302
+ reach: string[];
7303
+ people: unknown[] | Record<string, unknown>;
7304
+ waiting: number;
7305
+ createdAt: string;
7306
+ updatedAt: string;
7307
+ };
7308
+
7309
+ /** What delete a team answers: `teams.delete`. */
7310
+ export type TeamsDeleteResult = {
7311
+ deleted: string;
7312
+ };
7313
+
7314
+ /** What invite people takes: `team.invite`. */
7315
+ export interface TeamInviteParams {
7316
+ /** The team they join. */
7317
+ teamId: string;
7318
+ /** The addresses to invite. */
7319
+ emails?: string[];
7320
+ /**
7321
+ * `link` for a one-time link in place of emails.
7322
+ *
7323
+ * Left out, it is "email".
7324
+ */
7325
+ kind?: "email" | "link";
7326
+ }
7327
+
7328
+ /** What invite people answers: `team.invite`. */
7329
+ export type TeamInviteResult = {
7330
+ invites: {
7331
+ id: string;
7332
+ kind: string;
7333
+ email: string;
7334
+ teamId: string;
7335
+ team: string;
7336
+ invitedBy: string;
7337
+ sends: number;
7338
+ sentAt: string;
7339
+ expiresAt: string;
7340
+ expired: boolean;
7341
+ }[];
7342
+ skipped: unknown[] | Record<string, unknown>;
7343
+ };
7344
+
7345
+ /** What send an invite again answers: `team.resendInvite`. */
7346
+ export type TeamResendInviteResult = {
7347
+ id: string;
7348
+ kind: string;
7349
+ email: string;
7350
+ teamId: string;
7351
+ team: string;
7352
+ invitedBy: string;
7353
+ sends: number;
7354
+ sentAt: string;
7355
+ expiresAt: string;
7356
+ expired: boolean;
7357
+ };
7358
+
7359
+ /** What cancel an invite answers: `team.cancelInvite`. */
7360
+ export type TeamCancelInviteResult = {
7361
+ deleted: string;
7362
+ };
7363
+
7364
+ /** What move somebody to another team takes: `team.moveMember`. */
7365
+ export interface TeamMoveMemberParams {
7366
+ /** The team they move to. */
7367
+ teamId: string;
7368
+ }
7369
+
7370
+ /** What move somebody to another team answers: `team.moveMember`. */
7371
+ export type TeamMoveMemberResult = {
7372
+ id: string;
7373
+ userId: string;
7374
+ teamId: string;
7375
+ name: string;
7376
+ email: string;
7377
+ avatarUrl: unknown;
7378
+ invitedBy: string;
7379
+ joinedAt: string;
7380
+ lastSeenAt: unknown;
7381
+ keys: number;
7382
+ me: boolean;
7383
+ };
7384
+
7385
+ /** What remove somebody from the team answers: `team.removeMember`. */
7386
+ export type TeamRemoveMemberResult = {
7387
+ deleted: string;
7388
+ keysStopped: number;
7389
+ };
7390
+
6953
7391
  /** What list blacklist rules takes: `blacklist.list`. */
6954
7392
  export interface BlacklistListParams {
6955
7393
  /**
@@ -10826,7 +11264,7 @@ export interface ShoplyResourcesPaymentMethods {
10826
11264
  *
10827
11265
  * Takes a connected method off the checkout, or puts it back. Off keeps its credentials. On is refused for a method that is missing something it needs, which is put right in the dashboard. Answers the list again.
10828
11266
  *
10829
- * Needs the `payments.write` permission (Change Payment Methods).
11267
+ * Needs the `payments.write` permission (Change Payment Methods). Only a key the store's owner made, or an app the owner connected, can call it: one made by somebody on the store's team is refused (`owner_only`).
10830
11268
  *
10831
11269
  * @see https://docs.shoply.gg/api-reference/payment-methods/switch-a-payment-method-on-or-off
10832
11270
  */
@@ -10836,7 +11274,7 @@ export interface ShoplyResourcesPaymentMethods {
10836
11274
  *
10837
11275
  * Sets the order the checkout offers payment methods in. The first is the one most buyers take. Name some of them and they are put in this order in the places they hold now, and the rest stay where they are: a custom payment method between two connected ones stays between them. A custom method is named by its id in `meta.order`. Answers the list again.
10838
11276
  *
10839
- * Needs the `payments.write` permission (Change Payment Methods).
11277
+ * Needs the `payments.write` permission (Change Payment Methods). Only a key the store's owner made, or an app the owner connected, can call it: one made by somebody on the store's team is refused (`owner_only`).
10840
11278
  *
10841
11279
  * @see https://docs.shoply.gg/api-reference/payment-methods/sort-payment-methods
10842
11280
  */
@@ -10846,7 +11284,7 @@ export interface ShoplyResourcesPaymentMethods {
10846
11284
  *
10847
11285
  * Whether the checkout offers buyers their balance at the store. Answers the list again.
10848
11286
  *
10849
- * Needs the `payments.write` permission (Change Payment Methods).
11287
+ * Needs the `payments.write` permission (Change Payment Methods). Only a key the store's owner made, or an app the owner connected, can call it: one made by somebody on the store's team is refused (`owner_only`).
10850
11288
  *
10851
11289
  * @see https://docs.shoply.gg/api-reference/payment-methods/switch-paying-with-balance-on-or-off
10852
11290
  */
@@ -10930,7 +11368,7 @@ export interface ShoplyResourcesStorefronts {
10930
11368
  /**
10931
11369
  * **List storefronts**
10932
11370
  *
10933
- * The store's storefronts: each a design of its site, on a theme. One of them is live (`meta.liveId`), which is the one buyers see. A store holds up to 10. `meta.themes` is the themes a new one can start from.
11371
+ * The store's storefronts: each a design of its site, on a theme. One of them is live (`meta.liveId`), which is the one buyers see. A store holds as many as its plan does. `meta.themes` is the themes a new one can start from.
10934
11372
  *
10935
11373
  * Needs the `storefronts.read` permission (Read Storefronts).
10936
11374
  *
@@ -10942,7 +11380,7 @@ export interface ShoplyResourcesStorefronts {
10942
11380
  *
10943
11381
  * Adds a storefront as a draft: a theme's starting design, or a copy of one the store already has. Answers the store's storefronts with the new one among them.
10944
11382
  *
10945
- * Needs the `storefronts.write` permission (Change Storefronts).
11383
+ * Needs the `storefronts.write` permission (Change Storefronts). Only a key the store's owner made, or an app the owner connected, can call it: one made by somebody on the store's team is refused (`owner_only`).
10946
11384
  *
10947
11385
  * @see https://docs.shoply.gg/api-reference/storefronts/create-a-storefront
10948
11386
  */
@@ -10950,9 +11388,9 @@ export interface ShoplyResourcesStorefronts {
10950
11388
  /**
10951
11389
  * **Import a storefront**
10952
11390
  *
10953
- * Makes a new storefront, as a draft, from one that was exported: the JSON document "Export a storefront" answers under `storefront`, sent as `multipart/form-data` in a field called `file`. Nothing in it is trusted: its design is rebuilt from the theme, and each of its files is checked. One thing wrong refuses all of it, and the refusal names the file. `meta.imported` says which storefront it became and how many problems its code has to be fixed before it can be published.
11391
+ * Makes a new storefront, as a draft, from one that was exported: the JSON document "Export a storefront" answers under `storefront`, sent as `multipart/form-data` in a field called `file`. Nothing in it is trusted: its design is rebuilt from the theme, and each of its files is checked. One thing wrong refuses all of it, and the refusal names the file. The document can be up to 50 MB, `import_too_large` past it; a storefront whose files are more than that is imported with fewer, and the rest saved after. `meta.imported` says which storefront it became and how many problems its code has to be fixed before it can be published.
10954
11392
  *
10955
- * Needs the `storefronts.write` permission (Change Storefronts).
11393
+ * Needs the `storefronts.write` permission (Change Storefronts). Only a key the store's owner made, or an app the owner connected, can call it: one made by somebody on the store's team is refused (`owner_only`).
10956
11394
  *
10957
11395
  * @see https://docs.shoply.gg/api-reference/storefronts/import-a-storefront
10958
11396
  */
@@ -10982,7 +11420,7 @@ export interface ShoplyResourcesStorefronts {
10982
11420
  *
10983
11421
  * Removes a storefront that is not the live one. Answers the storefronts that are left.
10984
11422
  *
10985
- * Needs the `storefronts.write` permission (Change Storefronts).
11423
+ * Needs the `storefronts.write` permission (Change Storefronts). Only a key the store's owner made, or an app the owner connected, can call it: one made by somebody on the store's team is refused (`owner_only`).
10986
11424
  *
10987
11425
  * @see https://docs.shoply.gg/api-reference/storefronts/delete-a-storefront
10988
11426
  */
@@ -10992,7 +11430,7 @@ export interface ShoplyResourcesStorefronts {
10992
11430
  *
10993
11431
  * Makes this storefront the one buyers see, as it was last published. Answers the store's storefronts again.
10994
11432
  *
10995
- * Needs the `storefronts.write` permission (Change Storefronts).
11433
+ * Needs the `storefronts.write` permission (Change Storefronts). Only a key the store's owner made, or an app the owner connected, can call it: one made by somebody on the store's team is refused (`owner_only`).
10996
11434
  *
10997
11435
  * @see https://docs.shoply.gg/api-reference/storefronts/make-a-storefront-live
10998
11436
  */
@@ -11208,7 +11646,7 @@ export interface ShoplyResourcesCustomMethods {
11208
11646
  *
11209
11647
  * Adds a method, after every other at checkout. A store holds up to 10. Answers the new method.
11210
11648
  *
11211
- * Needs the `payments.write` permission (Change Payment Methods).
11649
+ * Needs the `payments.write` permission (Change Payment Methods). Only a key the store's owner made, or an app the owner connected, can call it: one made by somebody on the store's team is refused (`owner_only`).
11212
11650
  *
11213
11651
  * @see https://docs.shoply.gg/api-reference/custom-payment-methods/create-a-custom-payment-method
11214
11652
  */
@@ -11218,7 +11656,7 @@ export interface ShoplyResourcesCustomMethods {
11218
11656
  *
11219
11657
  * Changes what is sent and keeps the rest. A payment already opened keeps what its buyer was told. Answers the store's custom methods again, as "List custom payment methods" does.
11220
11658
  *
11221
- * Needs the `payments.write` permission (Change Payment Methods).
11659
+ * Needs the `payments.write` permission (Change Payment Methods). Only a key the store's owner made, or an app the owner connected, can call it: one made by somebody on the store's team is refused (`owner_only`).
11222
11660
  *
11223
11661
  * @see https://docs.shoply.gg/api-reference/custom-payment-methods/update-a-custom-payment-method
11224
11662
  */
@@ -11228,7 +11666,7 @@ export interface ShoplyResourcesCustomMethods {
11228
11666
  *
11229
11667
  * Its orders keep its name. Its ID is never used again. Answers the store's custom methods again, as "List custom payment methods" does.
11230
11668
  *
11231
- * Needs the `payments.write` permission (Change Payment Methods).
11669
+ * Needs the `payments.write` permission (Change Payment Methods). Only a key the store's owner made, or an app the owner connected, can call it: one made by somebody on the store's team is refused (`owner_only`).
11232
11670
  *
11233
11671
  * @see https://docs.shoply.gg/api-reference/custom-payment-methods/delete-a-custom-payment-method
11234
11672
  */
@@ -11238,7 +11676,7 @@ export interface ShoplyResourcesCustomMethods {
11238
11676
  *
11239
11677
  * Answers the store's custom methods again, as "List custom payment methods" does.
11240
11678
  *
11241
- * Needs the `payments.write` permission (Change Payment Methods).
11679
+ * Needs the `payments.write` permission (Change Payment Methods). Only a key the store's owner made, or an app the owner connected, can call it: one made by somebody on the store's team is refused (`owner_only`).
11242
11680
  *
11243
11681
  * @see https://docs.shoply.gg/api-reference/custom-payment-methods/switch-a-custom-payment-method-on-or-off
11244
11682
  */
@@ -11248,7 +11686,7 @@ export interface ShoplyResourcesCustomMethods {
11248
11686
  *
11249
11687
  * Puts the methods named in this order, in the places they hold now among the connected ones. To move one between connected methods, use "Sort payment methods" with its ID. Answers the store's custom methods again, as "List custom payment methods" does.
11250
11688
  *
11251
- * Needs the `payments.write` permission (Change Payment Methods).
11689
+ * Needs the `payments.write` permission (Change Payment Methods). Only a key the store's owner made, or an app the owner connected, can call it: one made by somebody on the store's team is refused (`owner_only`).
11252
11690
  *
11253
11691
  * @see https://docs.shoply.gg/api-reference/custom-payment-methods/sort-custom-payment-methods
11254
11692
  */
@@ -11258,7 +11696,7 @@ export interface ShoplyResourcesCustomMethods {
11258
11696
  *
11259
11697
  * Sent as `multipart/form-data` in a field called `image`. It replaces the one it had. Answers the store's custom methods again, as "List custom payment methods" does.
11260
11698
  *
11261
- * Needs the `payments.write` permission (Change Payment Methods).
11699
+ * Needs the `payments.write` permission (Change Payment Methods). Only a key the store's owner made, or an app the owner connected, can call it: one made by somebody on the store's team is refused (`owner_only`).
11262
11700
  *
11263
11701
  * @see https://docs.shoply.gg/api-reference/custom-payment-methods/upload-a-custom-payment-methods-icon
11264
11702
  */
@@ -11268,7 +11706,7 @@ export interface ShoplyResourcesCustomMethods {
11268
11706
  *
11269
11707
  * Answers the store's custom methods again, as "List custom payment methods" does.
11270
11708
  *
11271
- * Needs the `payments.write` permission (Change Payment Methods).
11709
+ * Needs the `payments.write` permission (Change Payment Methods). Only a key the store's owner made, or an app the owner connected, can call it: one made by somebody on the store's team is refused (`owner_only`).
11272
11710
  *
11273
11711
  * @see https://docs.shoply.gg/api-reference/custom-payment-methods/remove-a-custom-payment-methods-icon
11274
11712
  */
@@ -11279,17 +11717,17 @@ export interface ShoplyResourcesProducts {
11279
11717
  /**
11280
11718
  * **List products**
11281
11719
  *
11282
- * Every product the store has, in the store's own order, each with its variants, pictures, categories and stock counts. A store holds up to 250 products, so the list is not paged.
11720
+ * The store's products, in the store's own order, each with its variants, pictures, categories and stock counts. A store holds as many as its plan does, up to 1,000: ask for them a page at a time with `page` or `perPage`, and `pages` and `total` say how many there are. With neither, every product, in one answer.
11283
11721
  *
11284
11722
  * Needs the `products.read` permission (Read Products).
11285
11723
  *
11286
11724
  * @see https://docs.shoply.gg/api-reference/products/list-products
11287
11725
  */
11288
- list(params?: ProductsListParams, options?: RequestOptions): Promise<ProductsListResult>;
11726
+ list(params?: ProductsListParams, options?: RequestOptions): PagePromise<ProductsListItem>;
11289
11727
  /**
11290
11728
  * **Create a product**
11291
11729
  *
11292
- * Adds a product with its variants. A store holds up to 250 products. Stock is added afterwards, a variant at a time, with the variant IDs in the answer.
11730
+ * Adds a product with its variants. A store holds as many products as its plan does. Stock is added afterwards, a variant at a time, with the variant IDs in the answer.
11293
11731
  *
11294
11732
  * A refusal names the field, and for a variant its place in the list: `variants.0.price`.
11295
11733
  *
@@ -11376,7 +11814,7 @@ export interface ShoplyResourcesProductImages {
11376
11814
  /**
11377
11815
  * **Upload a product picture**
11378
11816
  *
11379
- * Adds a picture to the product, sent as `multipart/form-data` in a field called `image`. A product holds up to 10. The first one uploaded is the one listings show.
11817
+ * Adds a picture to the product, sent as `multipart/form-data` in a field called `image`. A product holds as many as its store's plan does. The first one uploaded is the one listings show.
11380
11818
  *
11381
11819
  * Needs the `products.write` permission (Change Products).
11382
11820
  *
@@ -11419,7 +11857,7 @@ export interface ShoplyResourcesStock {
11419
11857
  /**
11420
11858
  * **Add license keys**
11421
11859
  *
11422
- * Adds license keys to a variant's stock, up to 5,000 in one request. A variant holds up to 5,000 unsold keys and a store 100,000.
11860
+ * Adds license keys to a variant's stock, up to 5,000 in one request. A variant and a store each hold as many unsold keys as the store's plan does.
11423
11861
  *
11424
11862
  * A key sent twice is stocked twice, which is how one key is sold to several buyers. `duplicates` in the answer counts the ones that matched stock the variant already had, so sending the same batch a second time by mistake shows.
11425
11863
  *
@@ -11431,7 +11869,7 @@ export interface ShoplyResourcesStock {
11431
11869
  /**
11432
11870
  * **Replace a variant's license keys**
11433
11871
  *
11434
- * Makes the variant's unsold stock exactly the keys sent. Keys already delivered are not touched: they are order history, not stock.
11872
+ * Makes the variant's unsold stock exactly the keys sent. Keys already delivered are not touched: they are order history, not stock. Up to 5,000 keys, and only for a variant with no more than that in stock: one with more is refused with `validation_error`, and its keys are added and deleted instead.
11435
11873
  *
11436
11874
  * Needs the `stock.write` permission (Change Stock).
11437
11875
  *
@@ -11473,7 +11911,7 @@ export interface ShoplyResourcesStock {
11473
11911
  *
11474
11912
  * The first of three steps to give a variant a file to deliver. This one says what the file is and answers a signed address to send it to. Then send the file itself to that address with a `PUT`. Then call "Finish a file upload".
11475
11913
  *
11476
- * A variant holds up to 3 files of up to 100 MB each, and a store up to 100 files and 5 GB. Accepted: ZIP, RAR, 7z, PDF, MP4, MP3, WAV, EPUB, EXE, DMG, MSI and APK.
11914
+ * How many files a variant and a store hold, how large one may be and how much a store holds in all are the store's plan's. Accepted: ZIP, RAR, 7z, PDF, MP4, MP3, WAV, EPUB, EXE, DMG, MSI and APK.
11477
11915
  *
11478
11916
  * Needs the `stock.write` permission (Change Stock).
11479
11917
  *
@@ -11506,7 +11944,7 @@ export interface ShoplyResourcesCategories {
11506
11944
  /**
11507
11945
  * **List categories**
11508
11946
  *
11509
- * Every category the store has, in the store's own order, each with the products in it. A store holds up to 150, so the list is not paged.
11947
+ * Every category the store has, in the store's own order, each with the products in it. A store holds as many as its plan does, 500 at most, so the list is not paged.
11510
11948
  *
11511
11949
  * Needs the `categories.read` permission (Read Categories).
11512
11950
  *
@@ -11516,7 +11954,7 @@ export interface ShoplyResourcesCategories {
11516
11954
  /**
11517
11955
  * **Create a category**
11518
11956
  *
11519
- * Adds a category, with the products that go in it. A store holds up to 150.
11957
+ * Adds a category, with the products that go in it. A store holds as many as its plan does.
11520
11958
  *
11521
11959
  * Needs the `categories.write` permission (Change Categories).
11522
11960
  *
@@ -11579,7 +12017,7 @@ export interface ShoplyResourcesUpsells {
11579
12017
  /**
11580
12018
  * **List upsells**
11581
12019
  *
11582
- * Every upsell the store has, a kind at a time in the store's order, with the times each was shown, the paid orders that took it and what those lines came to over a period. A store holds up to 200.
12020
+ * Every upsell the store has, a kind at a time in the store's order, with the times each was shown, the paid orders that took it and what those lines came to over a period. A store holds as many as its plan does.
11583
12021
  *
11584
12022
  * Needs the `upsells.read` permission (Read Upsells).
11585
12023
  *
@@ -11589,7 +12027,7 @@ export interface ShoplyResourcesUpsells {
11589
12027
  /**
11590
12028
  * **Create an upsell**
11591
12029
  *
11592
- * Adds an upsell of one kind. What it needs depends on the kind: see each field. A store holds up to 200.
12030
+ * Adds an upsell of one kind. What it needs depends on the kind: see each field. A store holds as many as its plan does.
11593
12031
  *
11594
12032
  * Needs the `upsells.write` permission (Change Upsells).
11595
12033
  *
@@ -11692,7 +12130,7 @@ export interface ShoplyResourcesSubscriptions {
11692
12130
  /**
11693
12131
  * **Sell options as subscriptions**
11694
12132
  *
11695
- * Makes options subscriptions, or changes how often one renews. A change reaches new subscriptions only: a running one renews as it started. A store has up to 200 plans. The answer is every plan the store has.
12133
+ * Makes options subscriptions, or changes how often one renews. A change reaches new subscriptions only: a running one renews as it started. A store has as many subscription options as its plan does. The answer is every plan the store has.
11696
12134
  *
11697
12135
  * Needs the `subscriptions.write` permission (Change Subscriptions).
11698
12136
  *
@@ -11805,7 +12243,7 @@ export interface ShoplyResourcesOrders {
11805
12243
  /**
11806
12244
  * **Get an order**
11807
12245
  *
11808
- * One order with everything its page shows: its lines and what each delivered, its payments, the buyer, its timeline, where it came from, `refund`, which says which ways it can be refunded, and `requests`: what Shoply sent your servers about it, each try of each webhook about the order and each line's dynamic delivery, newest first, with the first 300 characters of what came back. `customPayment` is for an order paid with one of your custom payment methods, and null for any other: the method's name, `status` (`open`, `review` while it waits for you to approve or reject it, `paid` or `rejected`), the amount, and `proof`, what the buyer sent when they said they paid (the reference, whether a proof of payment was sent, and when).
12246
+ * One order with everything its page shows: its lines and what each delivered, its payments, the buyer, its timeline, where it came from, `refund`, which says which ways it can be refunded, and `requests`: what Shoply sent your servers about it, each try of each webhook about the order and each line's dynamic delivery, newest first, with the first 300 characters of what came back. `customPayment` is for an order paid with one of your custom payment methods, and null for any other: the method's name, `status` (`open`, `review` while it waits for you to approve or reject it, `paid` or `rejected`), the amount, and `proof`, what the buyer sent when they said they paid (the reference, whether a proof of payment was sent, and when). An order brought across by Platform Migration is found by its ID on the platform it came from as well, and answers with its own `id`; what it delivered there is in its items' `deliveredKeys`, a line of it each, where that platform says.
11809
12247
  *
11810
12248
  * Needs the `orders.read` permission (Read Orders).
11811
12249
  *
@@ -12042,7 +12480,7 @@ export interface ShoplyResourcesCoupons {
12042
12480
  /**
12043
12481
  * **Update a coupon**
12044
12482
  *
12045
- * Saves the coupon whole: send every field as it should be, not only what changed. A field left out goes back to its default. The exceptions are `appliesTo` and `targets`, which stay as they are when `appliesTo` is left out.
12483
+ * Saves the coupon whole: send every field as it should be, not only what changed. A field left out goes back to its default. The exceptions are `appliesTo` and `targets`, which stay as they are when `appliesTo` is left out, and `customerTag`, which stays as it is when left out.
12046
12484
  *
12047
12485
  * Needs the `coupons.write` permission (Change Coupons).
12048
12486
  *
@@ -12151,7 +12589,7 @@ export interface ShoplyResourcesSales {
12151
12589
  /**
12152
12590
  * **List sales**
12153
12591
  *
12154
- * Every sale the store has, newest first. A store holds up to 30, so the list is not paged.
12592
+ * Every sale the store has, newest first. A store holds as many as its plan does, 150 at most, so the list is not paged.
12155
12593
  *
12156
12594
  * Needs the `sales.read` permission (Read Sales).
12157
12595
  *
@@ -12161,7 +12599,7 @@ export interface ShoplyResourcesSales {
12161
12599
  /**
12162
12600
  * **Create a sale**
12163
12601
  *
12164
- * Adds a sale. A store holds up to 30.
12602
+ * Adds a sale. A store holds as many as its plan does.
12165
12603
  *
12166
12604
  * Needs the `sales.write` permission (Change Sales).
12167
12605
  *
@@ -12630,6 +13068,79 @@ export interface ShoplyResourcesSubscribers {
12630
13068
  unsubscribe(params: SubscribersUnsubscribeParams, options?: RequestOptions): Promise<SubscribersUnsubscribeResult>;
12631
13069
  }
12632
13070
 
13071
+ export interface ShoplyResourcesEmailTemplates {
13072
+ /**
13073
+ * **List email templates**
13074
+ *
13075
+ * Every email a store can write, in the order the dashboard lists them: its `kind`, `group`, `name`, `when` it is sent, whether the store has `edited` it (and which of `html`, `css` and `subject`), and `updatedAt`. `meta.shared` is the CSS every email gets (`css`, null where it is Shoply's look, `baseCss`), and `meta.sendable` whether the store can send email at all.
13076
+ *
13077
+ * Needs the `emails.read` permission (Read Email Templates).
13078
+ *
13079
+ * @see https://docs.shoply.gg/api-reference/email-templates/list-email-templates
13080
+ */
13081
+ list(options?: RequestOptions): Promise<EmailTemplatesListResult>;
13082
+ /**
13083
+ * **Get the shared email CSS**
13084
+ *
13085
+ * The look every email gets but one with a `css` of its own, as `css` (null where it is Shoply's look), `updatedAt`, and Shoply's look as `baseCss`, `var(--accent)` in it for the shop's colour.
13086
+ *
13087
+ * Needs the `emails.read` permission (Read Email Templates).
13088
+ *
13089
+ * @see https://docs.shoply.gg/api-reference/email-templates/get-the-shared-email-css
13090
+ */
13091
+ shared(options?: RequestOptions): Promise<EmailTemplatesSharedResult>;
13092
+ /**
13093
+ * **Change the shared email CSS**
13094
+ *
13095
+ * The look every email gets but one with a `css` of its own, a whole sheet, checked as an email's own is; empty, null or `baseCss` as it is for none, which is Shoply's look. Saving one draws every email from its template, Shoply's original where the store has not written one.
13096
+ *
13097
+ * Needs the `emails.write` permission (Change Email Templates).
13098
+ *
13099
+ * @see https://docs.shoply.gg/api-reference/email-templates/change-the-shared-email-css
13100
+ */
13101
+ saveShared(params: EmailTemplatesSaveSharedParams, options?: RequestOptions): Promise<EmailTemplatesSaveSharedResult>;
13102
+ /**
13103
+ * **Get an email template**
13104
+ *
13105
+ * One email: what it is, its `variables` and `parts` (each a `name` and what it is), the marks it must hold (`required`), its `original` HTML, what the store has saved, `shared` (the CSS every email gets), `baseCss` (Shoply's look for the classes the originals are written with) and `accent` (the shop's colour, which `var(--accent)` is). The email is drawn with `css`, else `shared`, else `baseCss`. Each of `html`, `css` and `subject` is the store's own, or null where it is Shoply's original. A CSS is a whole look, never rules over another: an email is drawn with its own `css`, else the shared CSS, else Shoply's look (`baseCss`), where `var(--accent)` is the shop's colour. The HTML is the email's card and the lines under it, with Liquid's marks for what changes from one buyer to the next: `{{ order.id }}` prints a value, escaped, and `{{ parts.delivery }}` a part only Shoply writes. `variables` and `parts` say which an email has. Shoply writes the page round it, its dark look, and a last line under it, "Sent with Shoply", which no template changes. `originalSubject` is the original subject as a sample buyer would get it, and `originalSubjectSource` the same written with its variables.
13106
+ *
13107
+ * Needs the `emails.read` permission (Read Email Templates).
13108
+ *
13109
+ * @see https://docs.shoply.gg/api-reference/email-templates/get-an-email-template
13110
+ */
13111
+ show(kind: string, options?: RequestOptions): Promise<EmailTemplatesShowResult>;
13112
+ /**
13113
+ * **Change an email template**
13114
+ *
13115
+ * Changes each of `html`, `css` and `subject` sent, and keeps the rest; null, an empty string, or the original's own HTML puts that one back to the original. Answers the email as Get an email template does. Refused with `template_problems` while anything would stop it, `problems` saying what and on which line, for `html`, `css` and `subject`. The HTML may hold the tags an email is made of, never a script, a form, a frame or <style>, and its links go to https, http, mailto or #, its pictures to https; up to 64 KB. Comments are taken out when it is sent, which `problems` says as a warning. The CSS is the email's whole look, and the shared CSS no longer changes an email that has one: start from `shared`, or `baseCss` where it is null. It sets how things look, with type, class, id and attribute selectors, and @media; no url(), no position, and no < or backslash; up to 32 KB. A subject is one line of up to 150 characters, and may hold the email's variables. Before it is saved the email is drawn for a sample buyer, and refused where it closes a <div> it never opened, where a mark it must hold is in its code but not in what it draws (inside a comment, or under a condition that is false), or where its subject comes out empty. Cart Recovery's and Win-Back's emails must hold `{{ links.unsubscribe }}`, and their subjects are those Change Cart Recovery and Change Win-Back set.
13116
+ *
13117
+ * Needs the `emails.write` permission (Change Email Templates).
13118
+ *
13119
+ * @see https://docs.shoply.gg/api-reference/email-templates/change-an-email-template
13120
+ */
13121
+ update(kind: string, params?: EmailTemplatesUpdateParams, options?: RequestOptions): Promise<EmailTemplatesUpdateResult>;
13122
+ /**
13123
+ * **Preview an email template**
13124
+ *
13125
+ * The email for a sample buyer as it would be sent with what you send in place of what is saved: its `subject`, the whole page as `html`, its plain `text`, the `values` its variables had, and `problems` as Change an email template would say them. Nothing is saved and nothing is sent.
13126
+ *
13127
+ * Needs the `emails.read` permission (Read Email Templates).
13128
+ *
13129
+ * @see https://docs.shoply.gg/api-reference/email-templates/preview-an-email-template
13130
+ */
13131
+ preview(kind: string, params?: EmailTemplatesPreviewParams, options?: RequestOptions): Promise<EmailTemplatesPreviewResult>;
13132
+ /**
13133
+ * **Revert an email template**
13134
+ *
13135
+ * Puts the email back as Shoply wrote it: its HTML, CSS and subject. Answers it as Get an email template does.
13136
+ *
13137
+ * Needs the `emails.write` permission (Change Email Templates).
13138
+ *
13139
+ * @see https://docs.shoply.gg/api-reference/email-templates/revert-an-email-template
13140
+ */
13141
+ revert(kind: string, options?: RequestOptions): Promise<EmailTemplatesRevertResult>;
13142
+ }
13143
+
12633
13144
  export interface ShoplyResourcesCustomers {
12634
13145
  /**
12635
13146
  * **List customers**
@@ -13017,6 +13528,112 @@ export interface ShoplyResourcesTickets {
13017
13528
  picture(ticketId: string, name: string, options?: RequestOptions): Promise<Response>;
13018
13529
  }
13019
13530
 
13531
+ export interface ShoplyResourcesTeam {
13532
+ /**
13533
+ * **Get the team**
13534
+ *
13535
+ * The store's teams, each with its `permissions`, how many of them are `sensitive`, the parts of the dashboard it `reach`es, its `people` and how many invites are `waiting`; every `invite` not yet taken up; the store's `owner`, who is on no team and can do everything; and `permissions`, every permission there is in its `groups`, each with its `label`, what it lets a person do (`about`), whether it is `sensitive` and what it `needs`, and the `presets` a team can start from. `limits` says how many teams the store and people a team may have on its plan (invites not yet taken up counted among the people), how long a team's `name` may be, how many addresses one invite takes (`perInvite`) and how many days an invite lasts (`inviteDays`).
13536
+ *
13537
+ * Needs the `team.read` permission (Read the Team).
13538
+ *
13539
+ * @see https://docs.shoply.gg/api-reference/teams/get-the-team
13540
+ */
13541
+ get(options?: RequestOptions): Promise<TeamGetResult>;
13542
+ /**
13543
+ * **List activity**
13544
+ *
13545
+ * 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. Kept 365 days.
13546
+ *
13547
+ * Needs the `team.read` permission (Read the Team).
13548
+ *
13549
+ * @see https://docs.shoply.gg/api-reference/teams/list-activity
13550
+ */
13551
+ activity(params?: TeamActivityParams, options?: RequestOptions): PagePromise<TeamActivityItem>;
13552
+ /**
13553
+ * **Invite people**
13554
+ *
13555
+ * Emails an invite to each address in `emails`, up to 10 at a time, from Shoply. An invite is taken up only by an account with that address, which they sign in with or make, and the store is then in their store switcher. Each runs out in 7 days. `skipped` names an address left out and why: the owner's, one on the team already, or one invited already. With `kind` set to `link` instead, it makes a one-time link anybody can take up, answered in `url` here and never again. Not to a team that holds a sensitive permission: invite to one of those on the dashboard. The store's owner is emailed when somebody joins.
13556
+ *
13557
+ * Needs the `team.write` permission (Manage the Team). It sends an email, and is counted against a budget of its own: 60 in ten minutes for each key.
13558
+ *
13559
+ * @see https://docs.shoply.gg/api-reference/teams/invite-people
13560
+ */
13561
+ invite(params: TeamInviteParams, options?: RequestOptions): Promise<TeamInviteResult>;
13562
+ /**
13563
+ * **Send an invite again**
13564
+ *
13565
+ * Sends an email invite again, or makes a link again (answered in `meta.url`), with 7 days from now. The address or link sent before stops working.
13566
+ *
13567
+ * Needs the `team.write` permission (Manage the Team). It sends an email, and is counted against a budget of its own: 60 in ten minutes for each key.
13568
+ *
13569
+ * @see https://docs.shoply.gg/api-reference/teams/send-an-invite-again
13570
+ */
13571
+ resendInvite(inviteId: string, options?: RequestOptions): Promise<TeamResendInviteResult>;
13572
+ /**
13573
+ * **Cancel an invite**
13574
+ *
13575
+ * Takes an invite back. Its email or link stops working.
13576
+ *
13577
+ * Needs the `team.write` permission (Manage the Team).
13578
+ *
13579
+ * @see https://docs.shoply.gg/api-reference/teams/cancel-an-invite
13580
+ */
13581
+ cancelInvite(inviteId: string, options?: RequestOptions): Promise<TeamCancelInviteResult>;
13582
+ /**
13583
+ * **Move somebody to another team**
13584
+ *
13585
+ * 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.
13586
+ *
13587
+ * Needs the `team.write` permission (Manage the Team).
13588
+ *
13589
+ * @see https://docs.shoply.gg/api-reference/teams/move-somebody-to-another-team
13590
+ */
13591
+ moveMember(memberId: string, params: TeamMoveMemberParams, options?: RequestOptions): Promise<TeamMoveMemberResult>;
13592
+ /**
13593
+ * **Remove somebody from the team**
13594
+ *
13595
+ * 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), and the webhooks those made are deleted.
13596
+ *
13597
+ * Needs the `team.write` permission (Manage the Team).
13598
+ *
13599
+ * @see https://docs.shoply.gg/api-reference/teams/remove-somebody-from-the-team
13600
+ */
13601
+ removeMember(memberId: string, options?: RequestOptions): Promise<TeamRemoveMemberResult>;
13602
+ }
13603
+
13604
+ export interface ShoplyResourcesTeams {
13605
+ /**
13606
+ * **Create a team**
13607
+ *
13608
+ * 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.
13609
+ *
13610
+ * Needs the `team.write` permission (Manage the Team).
13611
+ *
13612
+ * @see https://docs.shoply.gg/api-reference/teams/create-a-team
13613
+ */
13614
+ create(params: TeamsCreateParams, options?: RequestOptions): Promise<TeamsCreateResult>;
13615
+ /**
13616
+ * **Update a team**
13617
+ *
13618
+ * 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.
13619
+ *
13620
+ * Needs the `team.write` permission (Manage the Team).
13621
+ *
13622
+ * @see https://docs.shoply.gg/api-reference/teams/update-a-team
13623
+ */
13624
+ update(teamId: string, params: TeamsUpdateParams, options?: RequestOptions): Promise<TeamsUpdateResult>;
13625
+ /**
13626
+ * **Delete a team**
13627
+ *
13628
+ * Refused with `team_not_empty` while anybody is on it: move or remove them first. Its invites not yet taken up go with it.
13629
+ *
13630
+ * Needs the `team.write` permission (Manage the Team).
13631
+ *
13632
+ * @see https://docs.shoply.gg/api-reference/teams/delete-a-team
13633
+ */
13634
+ delete(teamId: string, options?: RequestOptions): Promise<TeamsDeleteResult>;
13635
+ }
13636
+
13020
13637
  export interface ShoplyResourcesBlacklist {
13021
13638
  /**
13022
13639
  * **List blacklist rules**
@@ -13828,11 +14445,14 @@ export interface ShoplyResources {
13828
14445
  cartRecovery: ShoplyResourcesCartRecovery;
13829
14446
  winBack: ShoplyResourcesWinBack;
13830
14447
  subscribers: ShoplyResourcesSubscribers;
14448
+ emailTemplates: ShoplyResourcesEmailTemplates;
13831
14449
  customers: ShoplyResourcesCustomers;
13832
14450
  customerTags: ShoplyResourcesCustomerTags;
13833
14451
  affiliates: ShoplyResourcesAffiliates;
13834
14452
  affiliateProgramme: ShoplyResourcesAffiliateProgramme;
13835
14453
  tickets: ShoplyResourcesTickets;
14454
+ team: ShoplyResourcesTeam;
14455
+ teams: ShoplyResourcesTeams;
13836
14456
  blacklist: ShoplyResourcesBlacklist;
13837
14457
  fraudEvents: ShoplyResourcesFraudEvents;
13838
14458
  fraudSettings: ShoplyResourcesFraudSettings;
@@ -14214,6 +14834,12 @@ export type WebhookEventName =
14214
14834
  | "ticket.message"
14215
14835
  | "ticket.resolved"
14216
14836
  | "ticket.reopened"
14837
+ | "team.created"
14838
+ | "team.updated"
14839
+ | "team.deleted"
14840
+ | "team.member_joined"
14841
+ | "team.member_moved"
14842
+ | "team.member_left"
14217
14843
  | "fraud.checkout_blocked"
14218
14844
  | "webhook.test";
14219
14845
 
@@ -14549,6 +15175,42 @@ export interface WebhookEventData {
14549
15175
  * `data`: The ticket, as [Get a support ticket](https://docs.shoply.gg/api-reference/support-tickets/get-a-support-ticket) answers it without its conversation: `status` is `open` (the buyer wrote last), `answered` or `resolved`, and `resolvedBy` says who resolved it (`store`, `buyer` or `auto`). `ticket.message` adds `message`: its `id`, `from` (`buyer` or `store`), `body`, `pictures` (each one's `name`, read with a key) and `createdAt`.
14550
15176
  */
14551
15177
  "ticket.reopened": TicketsGetResult & Record<string, unknown>;
15178
+ /**
15179
+ * A team was made at the store, with what its people may do.
15180
+ *
15181
+ * `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 `left`) and `keysStopped`.
15182
+ */
15183
+ "team.created": Record<string, unknown>;
15184
+ /**
15185
+ * A team was renamed or given other permissions. Its people can do what it now holds from their next request.
15186
+ *
15187
+ * `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 `left`) and `keysStopped`.
15188
+ */
15189
+ "team.updated": Record<string, unknown>;
15190
+ /**
15191
+ * A team with nobody on it was deleted, with its invites not yet taken up.
15192
+ *
15193
+ * `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 `left`) and `keysStopped`.
15194
+ */
15195
+ "team.deleted": Record<string, unknown>;
15196
+ /**
15197
+ * Somebody took up an invite and can now reach the store from their store switcher.
15198
+ *
15199
+ * `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 `left`) and `keysStopped`.
15200
+ */
15201
+ "team.member_joined": Record<string, unknown>;
15202
+ /**
15203
+ * Somebody on the team was moved to another team, and can do what that team holds.
15204
+ *
15205
+ * `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 `left`) and `keysStopped`.
15206
+ */
15207
+ "team.member_moved": Record<string, unknown>;
15208
+ /**
15209
+ * Somebody can no longer reach the store: they were removed, or they left. The API keys they made and the apps they connected stopped working with them.
15210
+ *
15211
+ * `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 `left`) and `keysStopped`.
15212
+ */
15213
+ "team.member_left": Record<string, unknown>;
14552
15214
  /**
14553
15215
  * 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.
14554
15216
  *
@@ -57,7 +57,7 @@ export const OPERATIONS = [
57
57
  {"id":"customMethods.sort","name":"customMethods.sort","method":"POST","path":"/stores/{storeId}/custom-payment-methods/reorder","params":[],"query":[],"body":true,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":true},
58
58
  {"id":"customMethods.uploadIcon","name":"customMethods.uploadIcon","method":"POST","path":"/stores/{storeId}/custom-payment-methods/{methodId}/icon","params":["methodId"],"query":[],"body":false,"upload":"image","file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":false},
59
59
  {"id":"customMethods.deleteIcon","name":"customMethods.deleteIcon","method":"DELETE","path":"/stores/{storeId}/custom-payment-methods/{methodId}/icon","params":["methodId"],"query":[],"body":false,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":true},
60
- {"id":"products.list","name":"products.list","method":"GET","path":"/stores/{storeId}/products","params":[],"query":["visibility","search"],"body":false,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":false},
60
+ {"id":"products.list","name":"products.list","method":"GET","path":"/stores/{storeId}/products","params":[],"query":["visibility","search","page","perPage"],"body":false,"upload":null,"file":false,"paged":true,"customer":false,"signedIn":true,"idempotent":false},
61
61
  {"id":"products.create","name":"products.create","method":"POST","path":"/stores/{storeId}/products","params":[],"query":[],"body":true,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":true},
62
62
  {"id":"products.show","name":"products.show","method":"GET","path":"/stores/{storeId}/products/{productId}","params":["productId"],"query":[],"body":false,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":false},
63
63
  {"id":"products.update","name":"products.update","method":"PUT","path":"/stores/{storeId}/products/{productId}","params":["productId"],"query":[],"body":true,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":true},
@@ -182,6 +182,13 @@ export const OPERATIONS = [
182
182
  {"id":"subscribers.list","name":"subscribers.list","method":"GET","path":"/stores/{storeId}/subscribers","params":[],"query":["show","search","page"],"body":false,"upload":null,"file":false,"paged":true,"customer":false,"signedIn":true,"idempotent":false},
183
183
  {"id":"subscribers.export","name":"subscribers.export","method":"GET","path":"/stores/{storeId}/subscribers/export","params":[],"query":["show","search","check"],"body":false,"upload":null,"file":true,"paged":false,"customer":false,"signedIn":true,"idempotent":false},
184
184
  {"id":"subscribers.unsubscribe","name":"subscribers.unsubscribe","method":"POST","path":"/stores/{storeId}/subscribers/unsubscribe","params":[],"query":[],"body":true,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":true},
185
+ {"id":"emailTemplates.list","name":"emailTemplates.list","method":"GET","path":"/stores/{storeId}/email-templates","params":[],"query":[],"body":false,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":false},
186
+ {"id":"emailTemplates.shared","name":"emailTemplates.shared","method":"GET","path":"/stores/{storeId}/email-templates/shared","params":[],"query":[],"body":false,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":false},
187
+ {"id":"emailTemplates.saveShared","name":"emailTemplates.saveShared","method":"PUT","path":"/stores/{storeId}/email-templates/shared","params":[],"query":[],"body":true,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":true},
188
+ {"id":"emailTemplates.show","name":"emailTemplates.show","method":"GET","path":"/stores/{storeId}/email-templates/{kind}","params":["kind"],"query":[],"body":false,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":false},
189
+ {"id":"emailTemplates.update","name":"emailTemplates.update","method":"PUT","path":"/stores/{storeId}/email-templates/{kind}","params":["kind"],"query":[],"body":true,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":true},
190
+ {"id":"emailTemplates.preview","name":"emailTemplates.preview","method":"POST","path":"/stores/{storeId}/email-templates/{kind}/preview","params":["kind"],"query":[],"body":true,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":true},
191
+ {"id":"emailTemplates.revert","name":"emailTemplates.revert","method":"POST","path":"/stores/{storeId}/email-templates/{kind}/revert","params":["kind"],"query":[],"body":false,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":true},
185
192
  {"id":"customers.list","name":"customers.list","method":"GET","path":"/stores/{storeId}/customers","params":[],"query":["page","perPage","search","sort","only","tag","range","from","to","tz"],"body":false,"upload":null,"file":false,"paged":true,"customer":false,"signedIn":true,"idempotent":false},
186
193
  {"id":"customers.create","name":"customers.create","method":"POST","path":"/stores/{storeId}/customers","params":[],"query":[],"body":true,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":true},
187
194
  {"id":"customers.export","name":"customers.export","method":"GET","path":"/stores/{storeId}/customers/export","params":[],"query":["search","sort","only","tag","check","range","from","to","tz"],"body":false,"upload":null,"file":true,"paged":false,"customer":false,"signedIn":true,"idempotent":false},
@@ -219,6 +226,16 @@ export const OPERATIONS = [
219
226
  {"id":"tickets.resolve","name":"tickets.resolve","method":"POST","path":"/stores/{storeId}/support-tickets/{ticketId}/resolve","params":["ticketId"],"query":[],"body":false,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":true},
220
227
  {"id":"tickets.reopen","name":"tickets.reopen","method":"POST","path":"/stores/{storeId}/support-tickets/{ticketId}/reopen","params":["ticketId"],"query":[],"body":false,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":true},
221
228
  {"id":"tickets.picture","name":"tickets.picture","method":"GET","path":"/stores/{storeId}/support-tickets/{ticketId}/pictures/{name}","params":["ticketId","name"],"query":[],"body":false,"upload":null,"file":true,"paged":false,"customer":false,"signedIn":true,"idempotent":false},
229
+ {"id":"team.get","name":"team.get","method":"GET","path":"/stores/{storeId}/team","params":[],"query":[],"body":false,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":false},
230
+ {"id":"team.activity","name":"team.activity","method":"GET","path":"/stores/{storeId}/team/activity","params":[],"query":["person","area","page"],"body":false,"upload":null,"file":false,"paged":true,"customer":false,"signedIn":true,"idempotent":false},
231
+ {"id":"teams.create","name":"teams.create","method":"POST","path":"/stores/{storeId}/teams","params":[],"query":[],"body":true,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":true},
232
+ {"id":"teams.update","name":"teams.update","method":"PUT","path":"/stores/{storeId}/teams/{teamId}","params":["teamId"],"query":[],"body":true,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":true},
233
+ {"id":"teams.delete","name":"teams.delete","method":"DELETE","path":"/stores/{storeId}/teams/{teamId}","params":["teamId"],"query":[],"body":false,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":true},
234
+ {"id":"team.invite","name":"team.invite","method":"POST","path":"/stores/{storeId}/team/invites","params":[],"query":[],"body":true,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":true},
235
+ {"id":"team.resendInvite","name":"team.resendInvite","method":"POST","path":"/stores/{storeId}/team/invites/{inviteId}/resend","params":["inviteId"],"query":[],"body":false,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":true},
236
+ {"id":"team.cancelInvite","name":"team.cancelInvite","method":"DELETE","path":"/stores/{storeId}/team/invites/{inviteId}","params":["inviteId"],"query":[],"body":false,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":true},
237
+ {"id":"team.moveMember","name":"team.moveMember","method":"PUT","path":"/stores/{storeId}/team/members/{memberId}","params":["memberId"],"query":[],"body":true,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":true},
238
+ {"id":"team.removeMember","name":"team.removeMember","method":"DELETE","path":"/stores/{storeId}/team/members/{memberId}","params":["memberId"],"query":[],"body":false,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":true},
222
239
  {"id":"blacklist.list","name":"blacklist.list","method":"GET","path":"/stores/{storeId}/blacklist","params":[],"query":["page","perPage","status","type","search"],"body":false,"upload":null,"file":false,"paged":true,"customer":false,"signedIn":true,"idempotent":false},
223
240
  {"id":"blacklist.create","name":"blacklist.create","method":"POST","path":"/stores/{storeId}/blacklist","params":[],"query":[],"body":true,"upload":null,"file":false,"paged":false,"customer":false,"signedIn":true,"idempotent":true},
224
241
  {"id":"blacklist.export","name":"blacklist.export","method":"GET","path":"/stores/{storeId}/blacklist/export","params":[],"query":["status","type","search","check"],"body":false,"upload":null,"file":true,"paged":false,"customer":false,"signedIn":true,"idempotent":false},
@@ -319,4 +336,4 @@ export const OPERATIONS = [
319
336
  ];
320
337
 
321
338
  /** Every webhook event, by name. */
322
- export const EVENTS = ["order.created","order.payment_started","order.paid","order.delivered","order.redelivered","order.email_failed","order.cancelled","order.refunded","order.disputed","order.chargeback","order.payment_submitted","order.rerouted","review.created","review.removed","review.flag_declined","stock.low","stock.out","product.created","product.updated","product.deleted","customer.created","customer.balance_changed","customer.tagged","customer.untagged","affiliate.created","affiliate.payout_requested","affiliate.payout_answered","affiliate.balance_changed","subscription.started","subscription.renewed","subscription.cancelled","subscription.ended","subscription.paused","subscription.resumed","subscription.charge_failed","cart.email_sent","cart.recovered","cart.unsubscribed","winback.email_sent","winback.won_back","subscriber.subscribed","subscriber.unsubscribed","routing.processor_paused","routing.processor_resumed","dispute.opened","dispute.updated","dispute.won","dispute.lost","dispute.closed","app.connected","app.disconnected","ticket.opened","ticket.message","ticket.resolved","ticket.reopened","fraud.checkout_blocked","webhook.test"];
339
+ export const EVENTS = ["order.created","order.payment_started","order.paid","order.delivered","order.redelivered","order.email_failed","order.cancelled","order.refunded","order.disputed","order.chargeback","order.payment_submitted","order.rerouted","review.created","review.removed","review.flag_declined","stock.low","stock.out","product.created","product.updated","product.deleted","customer.created","customer.balance_changed","customer.tagged","customer.untagged","affiliate.created","affiliate.payout_requested","affiliate.payout_answered","affiliate.balance_changed","subscription.started","subscription.renewed","subscription.cancelled","subscription.ended","subscription.paused","subscription.resumed","subscription.charge_failed","cart.email_sent","cart.recovered","cart.unsubscribed","winback.email_sent","winback.won_back","subscriber.subscribed","subscriber.unsubscribed","routing.processor_paused","routing.processor_resumed","dispute.opened","dispute.updated","dispute.won","dispute.lost","dispute.closed","app.connected","app.disconnected","ticket.opened","ticket.message","ticket.resolved","ticket.reopened","team.created","team.updated","team.deleted","team.member_joined","team.member_moved","team.member_left","fraud.checkout_blocked","webhook.test"];
package/index.js CHANGED
@@ -14,7 +14,7 @@
14
14
 
15
15
  import { EVENTS, OPERATIONS } from "./generated/operations.js";
16
16
 
17
- export const VERSION = "0.4.1";
17
+ export const VERSION = "0.6.0";
18
18
 
19
19
  const API = "https://api.shoply.gg/v1";
20
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shoplygg/node",
3
- "version": "0.4.1",
3
+ "version": "0.6.0",
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",