@onefivecommerce/sdk 0.11.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -230,7 +230,7 @@ interface components {
230
230
  tax_calculation: "disabled" | "automatic" | "manual";
231
231
  /** @example false */
232
232
  tax_inclusive: boolean;
233
- /** @example https://cdn.onefivejs.dev/img_abc123/logo.png */
233
+ /** @example https://cdn.onefive.dev/img_abc123/logo.png */
234
234
  brand_logo_url: string | null;
235
235
  /** @example #2563eb */
236
236
  brand_primary_color: string | null;
@@ -527,6 +527,8 @@ interface components {
527
527
  min_order?: number;
528
528
  po_required?: boolean;
529
529
  };
530
+ /** @example null */
531
+ default_price_key: string | null;
530
532
  /**
531
533
  * Format: date-time
532
534
  * @example 2026-08-28T12:00:00.000Z
@@ -975,6 +977,8 @@ interface components {
975
977
  * @enum {string|null}
976
978
  */
977
979
  weight_unit: "g" | "kg" | "oz" | "lb" | null;
980
+ /** @example 0 */
981
+ position: number;
978
982
  /**
979
983
  * @example {
980
984
  * "Color": "Black",
@@ -1019,7 +1023,7 @@ interface components {
1019
1023
  id: string;
1020
1024
  /** @example prod_abc123 */
1021
1025
  product_id: string | null;
1022
- /** @example https://cdn.onefivejs.dev/images/classic-cotton-t-shirt.webp */
1026
+ /** @example https://cdn.onefive.dev/images/classic-cotton-t-shirt.webp */
1023
1027
  src: string;
1024
1028
  /** @example Classic Cotton T-Shirt in black, front view */
1025
1029
  alt: string | null;
@@ -1046,7 +1050,7 @@ interface components {
1046
1050
  slug: string | null;
1047
1051
  /** @example false */
1048
1052
  slug_locked: boolean;
1049
- /** @example https://cdn.onefivejs.dev/classic-cotton-t-shirt.webp */
1053
+ /** @example https://cdn.onefive.dev/classic-cotton-t-shirt.webp */
1050
1054
  slug_url: string | null;
1051
1055
  /** @example false */
1052
1056
  duplicate?: boolean;
@@ -1070,7 +1074,7 @@ interface components {
1070
1074
  title: string;
1071
1075
  /** @example Polished Titanium */
1072
1076
  link_label: string | null;
1073
- /** @example https://cdn.onefivejs.dev/... */
1077
+ /** @example https://cdn.onefive.dev/... */
1074
1078
  image_src: string | null;
1075
1079
  /** @example 0 */
1076
1080
  position: number;
@@ -1194,7 +1198,7 @@ interface components {
1194
1198
  image: {
1195
1199
  /** @example img_abc123 */
1196
1200
  id: string;
1197
- /** @example https://cdn.onefivejs.dev/images/summer-essentials.webp */
1201
+ /** @example https://cdn.onefive.dev/images/summer-essentials.webp */
1198
1202
  src: string;
1199
1203
  /** @example Summer essentials collection */
1200
1204
  alt: string | null;
@@ -1225,7 +1229,7 @@ interface components {
1225
1229
  status: "active" | "draft" | "archived" | "preorder" | "coming_soon" | "discontinued";
1226
1230
  /** @description Primary product image */
1227
1231
  image: {
1228
- /** @example https://cdn.onefivejs.dev/images/product.webp */
1232
+ /** @example https://cdn.onefive.dev/images/product.webp */
1229
1233
  src: string;
1230
1234
  /** @example Product image */
1231
1235
  alt: string | null;
@@ -2011,7 +2015,7 @@ interface components {
2011
2015
  title: string;
2012
2016
  /** @example Black / M */
2013
2017
  variant_title: string;
2014
- /** @example https://cdn.onefivejs.dev/images/classic-cotton-t-shirt.webp */
2018
+ /** @example https://cdn.onefive.dev/images/classic-cotton-t-shirt.webp */
2015
2019
  image: string | null;
2016
2020
  /** @example 2 */
2017
2021
  quantity: number;
@@ -2043,7 +2047,7 @@ interface components {
2043
2047
  /** @example USD */
2044
2048
  currency: string;
2045
2049
  /** @example pi_abc123_secret_xyz */
2046
- client_secret: string;
2050
+ client_secret: string | null;
2047
2051
  /** @example true */
2048
2052
  requires_shipping: boolean;
2049
2053
  /** @example 5998 */
@@ -2084,7 +2088,7 @@ interface components {
2084
2088
  /** @example 7032 */
2085
2089
  total: number;
2086
2090
  /** @example pk_live_xxx */
2087
- publishable_key: string;
2091
+ publishable_key: string | null;
2088
2092
  /** @example Acme Store */
2089
2093
  store_name: string;
2090
2094
  /**
@@ -2098,7 +2102,7 @@ interface components {
2098
2102
  items: {
2099
2103
  /** @example Classic T-Shirt — Black / M */
2100
2104
  label: string;
2101
- /** @example https://cdn.onefivejs.dev/img.jpg */
2105
+ /** @example https://cdn.onefive.dev/img.jpg */
2102
2106
  image: string | null;
2103
2107
  /** @example Qty: 2 */
2104
2108
  detail: string;
@@ -2204,7 +2208,7 @@ interface components {
2204
2208
  /** @example jane@example.com */
2205
2209
  customer_email: string;
2206
2210
  /** @example pk_live_xxx */
2207
- publishable_key: string;
2211
+ publishable_key: string | null;
2208
2212
  /** @example Acme Store */
2209
2213
  store_name: string;
2210
2214
  /**
@@ -2218,7 +2222,7 @@ interface components {
2218
2222
  items: {
2219
2223
  /** @example Classic T-Shirt — Black / M */
2220
2224
  label: string;
2221
- /** @example https://cdn.onefivejs.dev/img.jpg */
2225
+ /** @example https://cdn.onefive.dev/img.jpg */
2222
2226
  image: string | null;
2223
2227
  /** @example Qty: 2 */
2224
2228
  detail: string;
@@ -2627,7 +2631,7 @@ interface components {
2627
2631
  /** @example true */
2628
2632
  in_stock: boolean;
2629
2633
  image: {
2630
- /** @example https://cdn.onefivejs.dev/images/classic-cotton-t-shirt.webp */
2634
+ /** @example https://cdn.onefive.dev/images/classic-cotton-t-shirt.webp */
2631
2635
  src: string;
2632
2636
  /** @example Classic Cotton T-Shirt in black */
2633
2637
  alt: string | null;
@@ -2652,7 +2656,7 @@ interface components {
2652
2656
  handle: string;
2653
2657
  /** @example Lightweight picks for warm weather. */
2654
2658
  description: string | null;
2655
- /** @example https://cdn.onefivejs.dev/images/summer-essentials.webp */
2659
+ /** @example https://cdn.onefive.dev/images/summer-essentials.webp */
2656
2660
  image: string | null;
2657
2661
  };
2658
2662
  SearchSuggestions: {
@@ -2668,7 +2672,7 @@ interface components {
2668
2672
  id?: string;
2669
2673
  /** @example classic-cotton-t-shirt */
2670
2674
  handle?: string;
2671
- /** @example https://cdn.onefivejs.dev/images/product.webp */
2675
+ /** @example https://cdn.onefive.dev/images/product.webp */
2672
2676
  image?: string;
2673
2677
  }[];
2674
2678
  };
@@ -3905,9 +3909,9 @@ interface components {
3905
3909
  description: string | null;
3906
3910
  /** @example Helix piercing stack with gold hoops */
3907
3911
  alt_text: string | null;
3908
- /** @example https://cdn.onefivejs.dev/store_abc/lookbooks/abc123.webp */
3912
+ /** @example https://cdn.onefive.dev/store_abc/lookbooks/abc123.webp */
3909
3913
  image_url: string | null;
3910
- /** @example https://cdn.onefivejs.dev/store_abc/lookbooks/def456.webp */
3914
+ /** @example https://cdn.onefive.dev/store_abc/lookbooks/def456.webp */
3911
3915
  image_color_url: string | null;
3912
3916
  /**
3913
3917
  * @example [
@@ -4072,7 +4076,7 @@ interface components {
4072
4076
  featured_image: {
4073
4077
  /** @example img_abc123 */
4074
4078
  id: string;
4075
- /** @example https://cdn.onefivejs.dev/images/post-hero.webp */
4079
+ /** @example https://cdn.onefive.dev/images/post-hero.webp */
4076
4080
  src: string;
4077
4081
  /** @example Post hero image */
4078
4082
  alt: string | null;
@@ -4857,7 +4861,7 @@ interface operations {
4857
4861
  tax_inclusive?: boolean;
4858
4862
  /**
4859
4863
  * Format: uri
4860
- * @example https://cdn.onefivejs.dev/img_abc123/logo.png
4864
+ * @example https://cdn.onefive.dev/img_abc123/logo.png
4861
4865
  */
4862
4866
  brand_logo_url?: string | null;
4863
4867
  /** @example #2563eb */
@@ -5092,7 +5096,7 @@ interface operations {
5092
5096
  };
5093
5097
  content?: never;
5094
5098
  };
5095
- /** @description No payment account connected */
5099
+ /** @description No payment account or BYO mode active */
5096
5100
  400: {
5097
5101
  headers: {
5098
5102
  [name: string]: unknown;
@@ -5101,46 +5105,7 @@ interface operations {
5101
5105
  };
5102
5106
  };
5103
5107
  };
5104
- connectByoPaymentAccount: {
5105
- parameters: {
5106
- query?: never;
5107
- header?: never;
5108
- path?: never;
5109
- cookie?: never;
5110
- };
5111
- requestBody?: {
5112
- content: {
5113
- "application/json": {
5114
- secret_key: string;
5115
- publishable_key: string;
5116
- };
5117
- };
5118
- };
5119
- responses: {
5120
- /** @description BYO keys connected */
5121
- 200: {
5122
- headers: {
5123
- [name: string]: unknown;
5124
- };
5125
- content?: never;
5126
- };
5127
- /** @description Invalid keys */
5128
- 400: {
5129
- headers: {
5130
- [name: string]: unknown;
5131
- };
5132
- content?: never;
5133
- };
5134
- /** @description Payment account already connected via Connect */
5135
- 409: {
5136
- headers: {
5137
- [name: string]: unknown;
5138
- };
5139
- content?: never;
5140
- };
5141
- };
5142
- };
5143
- disconnectByoPaymentAccount: {
5108
+ enableByoCheckout: {
5144
5109
  parameters: {
5145
5110
  query?: never;
5146
5111
  header?: never;
@@ -5149,20 +5114,13 @@ interface operations {
5149
5114
  };
5150
5115
  requestBody?: never;
5151
5116
  responses: {
5152
- /** @description BYO keys removed */
5117
+ /** @description BYO checkout enabled */
5153
5118
  200: {
5154
5119
  headers: {
5155
5120
  [name: string]: unknown;
5156
5121
  };
5157
5122
  content?: never;
5158
5123
  };
5159
- /** @description Store is not in BYO mode */
5160
- 400: {
5161
- headers: {
5162
- [name: string]: unknown;
5163
- };
5164
- content?: never;
5165
- };
5166
5124
  };
5167
5125
  };
5168
5126
  getBillingStatus: {
@@ -5426,6 +5384,26 @@ interface operations {
5426
5384
  };
5427
5385
  };
5428
5386
  };
5387
+ deletePriceKey: {
5388
+ parameters: {
5389
+ query?: never;
5390
+ header?: never;
5391
+ path: {
5392
+ slug: string;
5393
+ };
5394
+ cookie?: never;
5395
+ };
5396
+ requestBody?: never;
5397
+ responses: {
5398
+ /** @description Price key deleted */
5399
+ 204: {
5400
+ headers: {
5401
+ [name: string]: unknown;
5402
+ };
5403
+ content?: never;
5404
+ };
5405
+ };
5406
+ };
5429
5407
  updatePriceKey: {
5430
5408
  parameters: {
5431
5409
  query?: never;
@@ -5980,6 +5958,7 @@ interface operations {
5980
5958
  min_order?: number;
5981
5959
  po_required?: boolean;
5982
5960
  };
5961
+ default_price_key?: string;
5983
5962
  };
5984
5963
  };
5985
5964
  };
@@ -6067,6 +6046,7 @@ interface operations {
6067
6046
  min_order?: number | null;
6068
6047
  po_required?: boolean | null;
6069
6048
  };
6049
+ default_price_key?: string | null;
6070
6050
  };
6071
6051
  };
6072
6052
  };
@@ -8850,6 +8830,33 @@ interface operations {
8850
8830
  };
8851
8831
  };
8852
8832
  };
8833
+ reorderVariants: {
8834
+ parameters: {
8835
+ query?: never;
8836
+ header?: never;
8837
+ path?: never;
8838
+ cookie?: never;
8839
+ };
8840
+ requestBody?: {
8841
+ content: {
8842
+ "application/json": {
8843
+ variants: {
8844
+ id: string;
8845
+ position: number;
8846
+ }[];
8847
+ };
8848
+ };
8849
+ };
8850
+ responses: {
8851
+ /** @description Variants reordered */
8852
+ 204: {
8853
+ headers: {
8854
+ [name: string]: unknown;
8855
+ };
8856
+ content?: never;
8857
+ };
8858
+ };
8859
+ };
8853
8860
  getVariant: {
8854
8861
  parameters: {
8855
8862
  query?: {
@@ -12468,6 +12475,47 @@ interface operations {
12468
12475
  };
12469
12476
  };
12470
12477
  };
12478
+ confirmCheckout: {
12479
+ parameters: {
12480
+ query?: never;
12481
+ header?: never;
12482
+ path: {
12483
+ id: string;
12484
+ };
12485
+ cookie?: never;
12486
+ };
12487
+ requestBody?: {
12488
+ content: {
12489
+ "application/json": {
12490
+ /** @description External payment reference (e.g. Paddle transaction ID, Lemonsqueezy order ID) */
12491
+ external_reference?: string;
12492
+ };
12493
+ };
12494
+ };
12495
+ responses: {
12496
+ /** @description Order created */
12497
+ 201: {
12498
+ headers: {
12499
+ [name: string]: unknown;
12500
+ };
12501
+ content?: never;
12502
+ };
12503
+ /** @description Store is not in BYO mode or checkout is not pending */
12504
+ 400: {
12505
+ headers: {
12506
+ [name: string]: unknown;
12507
+ };
12508
+ content?: never;
12509
+ };
12510
+ /** @description Checkout not found */
12511
+ 404: {
12512
+ headers: {
12513
+ [name: string]: unknown;
12514
+ };
12515
+ content?: never;
12516
+ };
12517
+ };
12518
+ };
12471
12519
  listCheckouts: {
12472
12520
  parameters: {
12473
12521
  query?: {
@@ -23243,7 +23291,10 @@ declare class WebhooksResource {
23243
23291
  }
23244
23292
 
23245
23293
  type Store = components['schemas']['Store'];
23294
+ type PriceKeyDetail = components['schemas']['PriceKeyDetail'];
23246
23295
  type UpdateBody$c = NonNullable<operations['updateStore']['requestBody']>['content']['application/json'];
23296
+ type CreatePriceKeyBody = NonNullable<operations['createPriceKey']['requestBody']>['content']['application/json'];
23297
+ type UpdatePriceKeyBody = NonNullable<operations['updatePriceKey']['requestBody']>['content']['application/json'];
23247
23298
  declare class StoreResource {
23248
23299
  private client;
23249
23300
  constructor(client: OneFive);
@@ -23259,6 +23310,10 @@ declare class StoreResource {
23259
23310
  previous_published_at: string | null;
23260
23311
  changes_count: number;
23261
23312
  }>>;
23313
+ listPriceKeys(): Promise<DataResponse<PriceKeyDetail[]>>;
23314
+ createPriceKey(body: CreatePriceKeyBody): Promise<DataResponse<PriceKeyDetail>>;
23315
+ updatePriceKey(slug: string, body: UpdatePriceKeyBody): Promise<DataResponse<PriceKeyDetail>>;
23316
+ deletePriceKey(slug: string): Promise<void>;
23262
23317
  }
23263
23318
 
23264
23319
  type Tag = components['schemas']['Tag'];
package/dist/index.js CHANGED
@@ -940,6 +940,19 @@ var StoreResource = class {
940
940
  async publish() {
941
941
  return this.client.request("POST", "/v1/store/publish");
942
942
  }
943
+ // Price Keys
944
+ async listPriceKeys() {
945
+ return this.client.request("GET", "/v1/store/price-keys");
946
+ }
947
+ async createPriceKey(body) {
948
+ return this.client.request("POST", "/v1/store/price-keys", { body });
949
+ }
950
+ async updatePriceKey(slug, body) {
951
+ return this.client.request("PATCH", `/v1/store/price-keys/${slug}`, { body });
952
+ }
953
+ async deletePriceKey(slug) {
954
+ return this.client.request("DELETE", `/v1/store/price-keys/${slug}`);
955
+ }
943
956
  };
944
957
 
945
958
  // src/resources/tags.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onefivecommerce/sdk",
3
- "version": "0.11.0",
3
+ "version": "0.13.0",
4
4
  "description": "Official TypeScript SDK for the OneFive Commerce API",
5
5
  "license": "MIT",
6
6
  "author": "Grant Capital Group",