@onefivecommerce/sdk 0.10.1 → 0.12.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 +94 -68
- package/dist/index.js +13 -0
- package/package.json +1 -1
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.
|
|
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
|
|
@@ -1019,7 +1021,7 @@ interface components {
|
|
|
1019
1021
|
id: string;
|
|
1020
1022
|
/** @example prod_abc123 */
|
|
1021
1023
|
product_id: string | null;
|
|
1022
|
-
/** @example https://cdn.
|
|
1024
|
+
/** @example https://cdn.onefive.dev/images/classic-cotton-t-shirt.webp */
|
|
1023
1025
|
src: string;
|
|
1024
1026
|
/** @example Classic Cotton T-Shirt in black, front view */
|
|
1025
1027
|
alt: string | null;
|
|
@@ -1046,7 +1048,7 @@ interface components {
|
|
|
1046
1048
|
slug: string | null;
|
|
1047
1049
|
/** @example false */
|
|
1048
1050
|
slug_locked: boolean;
|
|
1049
|
-
/** @example https://cdn.
|
|
1051
|
+
/** @example https://cdn.onefive.dev/classic-cotton-t-shirt.webp */
|
|
1050
1052
|
slug_url: string | null;
|
|
1051
1053
|
/** @example false */
|
|
1052
1054
|
duplicate?: boolean;
|
|
@@ -1070,7 +1072,7 @@ interface components {
|
|
|
1070
1072
|
title: string;
|
|
1071
1073
|
/** @example Polished Titanium */
|
|
1072
1074
|
link_label: string | null;
|
|
1073
|
-
/** @example https://cdn.
|
|
1075
|
+
/** @example https://cdn.onefive.dev/... */
|
|
1074
1076
|
image_src: string | null;
|
|
1075
1077
|
/** @example 0 */
|
|
1076
1078
|
position: number;
|
|
@@ -1194,7 +1196,7 @@ interface components {
|
|
|
1194
1196
|
image: {
|
|
1195
1197
|
/** @example img_abc123 */
|
|
1196
1198
|
id: string;
|
|
1197
|
-
/** @example https://cdn.
|
|
1199
|
+
/** @example https://cdn.onefive.dev/images/summer-essentials.webp */
|
|
1198
1200
|
src: string;
|
|
1199
1201
|
/** @example Summer essentials collection */
|
|
1200
1202
|
alt: string | null;
|
|
@@ -1225,7 +1227,7 @@ interface components {
|
|
|
1225
1227
|
status: "active" | "draft" | "archived" | "preorder" | "coming_soon" | "discontinued";
|
|
1226
1228
|
/** @description Primary product image */
|
|
1227
1229
|
image: {
|
|
1228
|
-
/** @example https://cdn.
|
|
1230
|
+
/** @example https://cdn.onefive.dev/images/product.webp */
|
|
1229
1231
|
src: string;
|
|
1230
1232
|
/** @example Product image */
|
|
1231
1233
|
alt: string | null;
|
|
@@ -2011,7 +2013,7 @@ interface components {
|
|
|
2011
2013
|
title: string;
|
|
2012
2014
|
/** @example Black / M */
|
|
2013
2015
|
variant_title: string;
|
|
2014
|
-
/** @example https://cdn.
|
|
2016
|
+
/** @example https://cdn.onefive.dev/images/classic-cotton-t-shirt.webp */
|
|
2015
2017
|
image: string | null;
|
|
2016
2018
|
/** @example 2 */
|
|
2017
2019
|
quantity: number;
|
|
@@ -2043,7 +2045,7 @@ interface components {
|
|
|
2043
2045
|
/** @example USD */
|
|
2044
2046
|
currency: string;
|
|
2045
2047
|
/** @example pi_abc123_secret_xyz */
|
|
2046
|
-
client_secret: string;
|
|
2048
|
+
client_secret: string | null;
|
|
2047
2049
|
/** @example true */
|
|
2048
2050
|
requires_shipping: boolean;
|
|
2049
2051
|
/** @example 5998 */
|
|
@@ -2084,7 +2086,7 @@ interface components {
|
|
|
2084
2086
|
/** @example 7032 */
|
|
2085
2087
|
total: number;
|
|
2086
2088
|
/** @example pk_live_xxx */
|
|
2087
|
-
publishable_key: string;
|
|
2089
|
+
publishable_key: string | null;
|
|
2088
2090
|
/** @example Acme Store */
|
|
2089
2091
|
store_name: string;
|
|
2090
2092
|
/**
|
|
@@ -2098,7 +2100,7 @@ interface components {
|
|
|
2098
2100
|
items: {
|
|
2099
2101
|
/** @example Classic T-Shirt — Black / M */
|
|
2100
2102
|
label: string;
|
|
2101
|
-
/** @example https://cdn.
|
|
2103
|
+
/** @example https://cdn.onefive.dev/img.jpg */
|
|
2102
2104
|
image: string | null;
|
|
2103
2105
|
/** @example Qty: 2 */
|
|
2104
2106
|
detail: string;
|
|
@@ -2204,7 +2206,7 @@ interface components {
|
|
|
2204
2206
|
/** @example jane@example.com */
|
|
2205
2207
|
customer_email: string;
|
|
2206
2208
|
/** @example pk_live_xxx */
|
|
2207
|
-
publishable_key: string;
|
|
2209
|
+
publishable_key: string | null;
|
|
2208
2210
|
/** @example Acme Store */
|
|
2209
2211
|
store_name: string;
|
|
2210
2212
|
/**
|
|
@@ -2218,7 +2220,7 @@ interface components {
|
|
|
2218
2220
|
items: {
|
|
2219
2221
|
/** @example Classic T-Shirt — Black / M */
|
|
2220
2222
|
label: string;
|
|
2221
|
-
/** @example https://cdn.
|
|
2223
|
+
/** @example https://cdn.onefive.dev/img.jpg */
|
|
2222
2224
|
image: string | null;
|
|
2223
2225
|
/** @example Qty: 2 */
|
|
2224
2226
|
detail: string;
|
|
@@ -2627,7 +2629,7 @@ interface components {
|
|
|
2627
2629
|
/** @example true */
|
|
2628
2630
|
in_stock: boolean;
|
|
2629
2631
|
image: {
|
|
2630
|
-
/** @example https://cdn.
|
|
2632
|
+
/** @example https://cdn.onefive.dev/images/classic-cotton-t-shirt.webp */
|
|
2631
2633
|
src: string;
|
|
2632
2634
|
/** @example Classic Cotton T-Shirt in black */
|
|
2633
2635
|
alt: string | null;
|
|
@@ -2652,7 +2654,7 @@ interface components {
|
|
|
2652
2654
|
handle: string;
|
|
2653
2655
|
/** @example Lightweight picks for warm weather. */
|
|
2654
2656
|
description: string | null;
|
|
2655
|
-
/** @example https://cdn.
|
|
2657
|
+
/** @example https://cdn.onefive.dev/images/summer-essentials.webp */
|
|
2656
2658
|
image: string | null;
|
|
2657
2659
|
};
|
|
2658
2660
|
SearchSuggestions: {
|
|
@@ -2668,7 +2670,7 @@ interface components {
|
|
|
2668
2670
|
id?: string;
|
|
2669
2671
|
/** @example classic-cotton-t-shirt */
|
|
2670
2672
|
handle?: string;
|
|
2671
|
-
/** @example https://cdn.
|
|
2673
|
+
/** @example https://cdn.onefive.dev/images/product.webp */
|
|
2672
2674
|
image?: string;
|
|
2673
2675
|
}[];
|
|
2674
2676
|
};
|
|
@@ -3905,9 +3907,9 @@ interface components {
|
|
|
3905
3907
|
description: string | null;
|
|
3906
3908
|
/** @example Helix piercing stack with gold hoops */
|
|
3907
3909
|
alt_text: string | null;
|
|
3908
|
-
/** @example https://cdn.
|
|
3910
|
+
/** @example https://cdn.onefive.dev/store_abc/lookbooks/abc123.webp */
|
|
3909
3911
|
image_url: string | null;
|
|
3910
|
-
/** @example https://cdn.
|
|
3912
|
+
/** @example https://cdn.onefive.dev/store_abc/lookbooks/def456.webp */
|
|
3911
3913
|
image_color_url: string | null;
|
|
3912
3914
|
/**
|
|
3913
3915
|
* @example [
|
|
@@ -4072,7 +4074,7 @@ interface components {
|
|
|
4072
4074
|
featured_image: {
|
|
4073
4075
|
/** @example img_abc123 */
|
|
4074
4076
|
id: string;
|
|
4075
|
-
/** @example https://cdn.
|
|
4077
|
+
/** @example https://cdn.onefive.dev/images/post-hero.webp */
|
|
4076
4078
|
src: string;
|
|
4077
4079
|
/** @example Post hero image */
|
|
4078
4080
|
alt: string | null;
|
|
@@ -4857,7 +4859,7 @@ interface operations {
|
|
|
4857
4859
|
tax_inclusive?: boolean;
|
|
4858
4860
|
/**
|
|
4859
4861
|
* Format: uri
|
|
4860
|
-
* @example https://cdn.
|
|
4862
|
+
* @example https://cdn.onefive.dev/img_abc123/logo.png
|
|
4861
4863
|
*/
|
|
4862
4864
|
brand_logo_url?: string | null;
|
|
4863
4865
|
/** @example #2563eb */
|
|
@@ -5092,55 +5094,16 @@ interface operations {
|
|
|
5092
5094
|
};
|
|
5093
5095
|
content?: never;
|
|
5094
5096
|
};
|
|
5095
|
-
/** @description No payment account
|
|
5096
|
-
400: {
|
|
5097
|
-
headers: {
|
|
5098
|
-
[name: string]: unknown;
|
|
5099
|
-
};
|
|
5100
|
-
content?: never;
|
|
5101
|
-
};
|
|
5102
|
-
};
|
|
5103
|
-
};
|
|
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 */
|
|
5097
|
+
/** @description No payment account or BYO mode active */
|
|
5128
5098
|
400: {
|
|
5129
5099
|
headers: {
|
|
5130
5100
|
[name: string]: unknown;
|
|
5131
5101
|
};
|
|
5132
5102
|
content?: never;
|
|
5133
5103
|
};
|
|
5134
|
-
/** @description Payment account already connected via Connect */
|
|
5135
|
-
409: {
|
|
5136
|
-
headers: {
|
|
5137
|
-
[name: string]: unknown;
|
|
5138
|
-
};
|
|
5139
|
-
content?: never;
|
|
5140
|
-
};
|
|
5141
5104
|
};
|
|
5142
5105
|
};
|
|
5143
|
-
|
|
5106
|
+
enableByoCheckout: {
|
|
5144
5107
|
parameters: {
|
|
5145
5108
|
query?: never;
|
|
5146
5109
|
header?: never;
|
|
@@ -5149,20 +5112,13 @@ interface operations {
|
|
|
5149
5112
|
};
|
|
5150
5113
|
requestBody?: never;
|
|
5151
5114
|
responses: {
|
|
5152
|
-
/** @description BYO
|
|
5115
|
+
/** @description BYO checkout enabled */
|
|
5153
5116
|
200: {
|
|
5154
5117
|
headers: {
|
|
5155
5118
|
[name: string]: unknown;
|
|
5156
5119
|
};
|
|
5157
5120
|
content?: never;
|
|
5158
5121
|
};
|
|
5159
|
-
/** @description Store is not in BYO mode */
|
|
5160
|
-
400: {
|
|
5161
|
-
headers: {
|
|
5162
|
-
[name: string]: unknown;
|
|
5163
|
-
};
|
|
5164
|
-
content?: never;
|
|
5165
|
-
};
|
|
5166
5122
|
};
|
|
5167
5123
|
};
|
|
5168
5124
|
getBillingStatus: {
|
|
@@ -5426,6 +5382,26 @@ interface operations {
|
|
|
5426
5382
|
};
|
|
5427
5383
|
};
|
|
5428
5384
|
};
|
|
5385
|
+
deletePriceKey: {
|
|
5386
|
+
parameters: {
|
|
5387
|
+
query?: never;
|
|
5388
|
+
header?: never;
|
|
5389
|
+
path: {
|
|
5390
|
+
slug: string;
|
|
5391
|
+
};
|
|
5392
|
+
cookie?: never;
|
|
5393
|
+
};
|
|
5394
|
+
requestBody?: never;
|
|
5395
|
+
responses: {
|
|
5396
|
+
/** @description Price key deleted */
|
|
5397
|
+
204: {
|
|
5398
|
+
headers: {
|
|
5399
|
+
[name: string]: unknown;
|
|
5400
|
+
};
|
|
5401
|
+
content?: never;
|
|
5402
|
+
};
|
|
5403
|
+
};
|
|
5404
|
+
};
|
|
5429
5405
|
updatePriceKey: {
|
|
5430
5406
|
parameters: {
|
|
5431
5407
|
query?: never;
|
|
@@ -5980,6 +5956,7 @@ interface operations {
|
|
|
5980
5956
|
min_order?: number;
|
|
5981
5957
|
po_required?: boolean;
|
|
5982
5958
|
};
|
|
5959
|
+
default_price_key?: string;
|
|
5983
5960
|
};
|
|
5984
5961
|
};
|
|
5985
5962
|
};
|
|
@@ -6067,6 +6044,7 @@ interface operations {
|
|
|
6067
6044
|
min_order?: number | null;
|
|
6068
6045
|
po_required?: boolean | null;
|
|
6069
6046
|
};
|
|
6047
|
+
default_price_key?: string | null;
|
|
6070
6048
|
};
|
|
6071
6049
|
};
|
|
6072
6050
|
};
|
|
@@ -12468,6 +12446,47 @@ interface operations {
|
|
|
12468
12446
|
};
|
|
12469
12447
|
};
|
|
12470
12448
|
};
|
|
12449
|
+
confirmCheckout: {
|
|
12450
|
+
parameters: {
|
|
12451
|
+
query?: never;
|
|
12452
|
+
header?: never;
|
|
12453
|
+
path: {
|
|
12454
|
+
id: string;
|
|
12455
|
+
};
|
|
12456
|
+
cookie?: never;
|
|
12457
|
+
};
|
|
12458
|
+
requestBody?: {
|
|
12459
|
+
content: {
|
|
12460
|
+
"application/json": {
|
|
12461
|
+
/** @description External payment reference (e.g. Paddle transaction ID, Lemonsqueezy order ID) */
|
|
12462
|
+
external_reference?: string;
|
|
12463
|
+
};
|
|
12464
|
+
};
|
|
12465
|
+
};
|
|
12466
|
+
responses: {
|
|
12467
|
+
/** @description Order created */
|
|
12468
|
+
201: {
|
|
12469
|
+
headers: {
|
|
12470
|
+
[name: string]: unknown;
|
|
12471
|
+
};
|
|
12472
|
+
content?: never;
|
|
12473
|
+
};
|
|
12474
|
+
/** @description Store is not in BYO mode or checkout is not pending */
|
|
12475
|
+
400: {
|
|
12476
|
+
headers: {
|
|
12477
|
+
[name: string]: unknown;
|
|
12478
|
+
};
|
|
12479
|
+
content?: never;
|
|
12480
|
+
};
|
|
12481
|
+
/** @description Checkout not found */
|
|
12482
|
+
404: {
|
|
12483
|
+
headers: {
|
|
12484
|
+
[name: string]: unknown;
|
|
12485
|
+
};
|
|
12486
|
+
content?: never;
|
|
12487
|
+
};
|
|
12488
|
+
};
|
|
12489
|
+
};
|
|
12471
12490
|
listCheckouts: {
|
|
12472
12491
|
parameters: {
|
|
12473
12492
|
query?: {
|
|
@@ -23243,7 +23262,10 @@ declare class WebhooksResource {
|
|
|
23243
23262
|
}
|
|
23244
23263
|
|
|
23245
23264
|
type Store = components['schemas']['Store'];
|
|
23265
|
+
type PriceKeyDetail = components['schemas']['PriceKeyDetail'];
|
|
23246
23266
|
type UpdateBody$c = NonNullable<operations['updateStore']['requestBody']>['content']['application/json'];
|
|
23267
|
+
type CreatePriceKeyBody = NonNullable<operations['createPriceKey']['requestBody']>['content']['application/json'];
|
|
23268
|
+
type UpdatePriceKeyBody = NonNullable<operations['updatePriceKey']['requestBody']>['content']['application/json'];
|
|
23247
23269
|
declare class StoreResource {
|
|
23248
23270
|
private client;
|
|
23249
23271
|
constructor(client: OneFive);
|
|
@@ -23259,6 +23281,10 @@ declare class StoreResource {
|
|
|
23259
23281
|
previous_published_at: string | null;
|
|
23260
23282
|
changes_count: number;
|
|
23261
23283
|
}>>;
|
|
23284
|
+
listPriceKeys(): Promise<DataResponse<PriceKeyDetail[]>>;
|
|
23285
|
+
createPriceKey(body: CreatePriceKeyBody): Promise<DataResponse<PriceKeyDetail>>;
|
|
23286
|
+
updatePriceKey(slug: string, body: UpdatePriceKeyBody): Promise<DataResponse<PriceKeyDetail>>;
|
|
23287
|
+
deletePriceKey(slug: string): Promise<void>;
|
|
23262
23288
|
}
|
|
23263
23289
|
|
|
23264
23290
|
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
|