@gethydra/sdk 0.1.5 → 0.1.7
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 +286 -204
- package/dist/index.js +35 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2863,6 +2863,10 @@ interface components {
|
|
|
2863
2863
|
plan?: components["schemas"]["MembershipPlan"] & unknown;
|
|
2864
2864
|
/** @example cus_abc123 */
|
|
2865
2865
|
customer_id: string;
|
|
2866
|
+
/** @example john@example.com */
|
|
2867
|
+
customer_email: string | null;
|
|
2868
|
+
/** @example John Doe */
|
|
2869
|
+
customer_name: string | null;
|
|
2866
2870
|
/** @example sub_1abc */
|
|
2867
2871
|
stripe_subscription_id: string | null;
|
|
2868
2872
|
/** @example active */
|
|
@@ -6838,6 +6842,38 @@ interface operations {
|
|
|
6838
6842
|
};
|
|
6839
6843
|
};
|
|
6840
6844
|
};
|
|
6845
|
+
reorderProductLinks: {
|
|
6846
|
+
parameters: {
|
|
6847
|
+
query?: never;
|
|
6848
|
+
header?: never;
|
|
6849
|
+
path: {
|
|
6850
|
+
id: string;
|
|
6851
|
+
};
|
|
6852
|
+
cookie?: never;
|
|
6853
|
+
};
|
|
6854
|
+
requestBody?: {
|
|
6855
|
+
content: {
|
|
6856
|
+
"application/json": {
|
|
6857
|
+
/**
|
|
6858
|
+
* @example [
|
|
6859
|
+
* "prod_abc123",
|
|
6860
|
+
* "prod_def456"
|
|
6861
|
+
* ]
|
|
6862
|
+
*/
|
|
6863
|
+
product_ids: string[];
|
|
6864
|
+
};
|
|
6865
|
+
};
|
|
6866
|
+
};
|
|
6867
|
+
responses: {
|
|
6868
|
+
/** @description Positions updated */
|
|
6869
|
+
204: {
|
|
6870
|
+
headers: {
|
|
6871
|
+
[name: string]: unknown;
|
|
6872
|
+
};
|
|
6873
|
+
content?: never;
|
|
6874
|
+
};
|
|
6875
|
+
};
|
|
6876
|
+
};
|
|
6841
6877
|
listProductMetafieldValues: {
|
|
6842
6878
|
parameters: {
|
|
6843
6879
|
query?: never;
|
|
@@ -14911,6 +14947,8 @@ interface operations {
|
|
|
14911
14947
|
fields?: string;
|
|
14912
14948
|
sort?: "created_at" | "updated_at" | "title" | "relevance";
|
|
14913
14949
|
order?: "asc" | "desc";
|
|
14950
|
+
/** @description Filter by exact handle (URL slug) */
|
|
14951
|
+
handle?: string;
|
|
14914
14952
|
type?: "page" | "post";
|
|
14915
14953
|
status?: "draft" | "published" | "archived";
|
|
14916
14954
|
category_id?: string;
|
|
@@ -16795,6 +16833,26 @@ interface operations {
|
|
|
16795
16833
|
};
|
|
16796
16834
|
};
|
|
16797
16835
|
};
|
|
16836
|
+
getCustomerOrderInvoice: {
|
|
16837
|
+
parameters: {
|
|
16838
|
+
query?: never;
|
|
16839
|
+
header?: never;
|
|
16840
|
+
path: {
|
|
16841
|
+
id: string;
|
|
16842
|
+
};
|
|
16843
|
+
cookie?: never;
|
|
16844
|
+
};
|
|
16845
|
+
requestBody?: never;
|
|
16846
|
+
responses: {
|
|
16847
|
+
/** @description PDF invoice binary */
|
|
16848
|
+
200: {
|
|
16849
|
+
headers: {
|
|
16850
|
+
[name: string]: unknown;
|
|
16851
|
+
};
|
|
16852
|
+
content?: never;
|
|
16853
|
+
};
|
|
16854
|
+
};
|
|
16855
|
+
};
|
|
16798
16856
|
getAnalyticsSummary: {
|
|
16799
16857
|
parameters: {
|
|
16800
16858
|
query?: {
|
|
@@ -17073,6 +17131,8 @@ type AnalyticsTopProduct$1 = components['schemas']['AnalyticsTopProduct'];
|
|
|
17073
17131
|
type AnalyticsActionItems$1 = components['schemas']['AnalyticsActionItems'];
|
|
17074
17132
|
type Post$1 = components['schemas']['Post'];
|
|
17075
17133
|
type ContentCategory$1 = components['schemas']['ContentCategory'];
|
|
17134
|
+
type MembershipPlan$1 = components['schemas']['MembershipPlan'];
|
|
17135
|
+
type CustomerMembership$1 = components['schemas']['CustomerMembership'];
|
|
17076
17136
|
interface Pagination {
|
|
17077
17137
|
cursor: string | null;
|
|
17078
17138
|
has_more: boolean;
|
|
@@ -17117,9 +17177,9 @@ type ProductStats = components['schemas']['ProductStats'];
|
|
|
17117
17177
|
type Variant$1 = components['schemas']['Variant'];
|
|
17118
17178
|
type Image$1 = components['schemas']['Image'];
|
|
17119
17179
|
type GenerateVariantsResult = components['schemas']['GenerateVariantsResult'];
|
|
17120
|
-
type ListParams$
|
|
17121
|
-
type CreateBody$
|
|
17122
|
-
type UpdateBody$
|
|
17180
|
+
type ListParams$r = NonNullable<operations['listProducts']['parameters']['query']>;
|
|
17181
|
+
type CreateBody$n = NonNullable<operations['createProduct']['requestBody']>['content']['application/json'];
|
|
17182
|
+
type UpdateBody$n = NonNullable<operations['updateProduct']['requestBody']>['content']['application/json'];
|
|
17123
17183
|
type DuplicateBody = NonNullable<operations['duplicateProduct']['requestBody']>['content']['application/json'];
|
|
17124
17184
|
type CreateVariantBody = NonNullable<operations['createProductVariant']['requestBody']>['content']['application/json'];
|
|
17125
17185
|
type GenerateVariantsBody = NonNullable<operations['generateProductVariants']['requestBody']>['content']['application/json'];
|
|
@@ -17129,17 +17189,17 @@ type CreateProductLinkBody = NonNullable<operations['createProductLink']['reques
|
|
|
17129
17189
|
declare class ProductsResource {
|
|
17130
17190
|
private client;
|
|
17131
17191
|
constructor(client: Hydra);
|
|
17132
|
-
list(params?: ListParams$
|
|
17133
|
-
iterate(params?: Omit<ListParams$
|
|
17134
|
-
toArray(params?: Omit<ListParams$
|
|
17192
|
+
list(params?: ListParams$r): Promise<ListResponse<Product>>;
|
|
17193
|
+
iterate(params?: Omit<ListParams$r, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Product, void, undefined>;
|
|
17194
|
+
toArray(params?: Omit<ListParams$r, 'cursor'>, options?: PaginateOptions & {
|
|
17135
17195
|
limit?: number;
|
|
17136
17196
|
}): Promise<Product[]>;
|
|
17137
|
-
get(id: string, params?: Pick<ListParams$
|
|
17138
|
-
create(body: CreateBody$
|
|
17139
|
-
update(id: string, body: UpdateBody$
|
|
17197
|
+
get(id: string, params?: Pick<ListParams$r, 'expand' | 'currency' | 'fields'>): Promise<DataResponse<Product>>;
|
|
17198
|
+
create(body: CreateBody$n, options?: ResourceRequestOptions): Promise<DataResponse<Product>>;
|
|
17199
|
+
update(id: string, body: UpdateBody$n): Promise<DataResponse<Product>>;
|
|
17140
17200
|
delete(id: string): Promise<void>;
|
|
17141
17201
|
batchCreate(body: {
|
|
17142
|
-
products: CreateBody$
|
|
17202
|
+
products: CreateBody$n[];
|
|
17143
17203
|
}, options?: ResourceRequestOptions): Promise<DataResponse<Product[]>>;
|
|
17144
17204
|
duplicate(id: string, body: DuplicateBody): Promise<DataResponse<Product>>;
|
|
17145
17205
|
getStats(id: string): Promise<DataResponse<ProductStats>>;
|
|
@@ -17160,7 +17220,7 @@ declare class ProductsResource {
|
|
|
17160
17220
|
|
|
17161
17221
|
type Variant = components['schemas']['Variant'];
|
|
17162
17222
|
type VariantPrice = components['schemas']['VariantPrice'];
|
|
17163
|
-
type UpdateBody$
|
|
17223
|
+
type UpdateBody$m = NonNullable<operations['updateVariant']['requestBody']>['content']['application/json'];
|
|
17164
17224
|
type UpsertPriceBody = NonNullable<operations['upsertVariantPrice']['requestBody']>['content']['application/json'];
|
|
17165
17225
|
declare class VariantsResource {
|
|
17166
17226
|
private client;
|
|
@@ -17170,7 +17230,7 @@ declare class VariantsResource {
|
|
|
17170
17230
|
currency?: string;
|
|
17171
17231
|
fields?: string;
|
|
17172
17232
|
}): Promise<DataResponse<Variant>>;
|
|
17173
|
-
update(id: string, body: UpdateBody$
|
|
17233
|
+
update(id: string, body: UpdateBody$m): Promise<DataResponse<Variant>>;
|
|
17174
17234
|
delete(id: string): Promise<void>;
|
|
17175
17235
|
listPrices(variantId: string): Promise<DataResponse<Record<string, VariantPrice>>>;
|
|
17176
17236
|
upsertPrice(variantId: string, priceKeySlug: string, body: UpsertPriceBody): Promise<DataResponse<VariantPrice>>;
|
|
@@ -17182,23 +17242,23 @@ declare class VariantsResource {
|
|
|
17182
17242
|
}
|
|
17183
17243
|
|
|
17184
17244
|
type Collection = components['schemas']['Collection'];
|
|
17185
|
-
type ListParams$
|
|
17186
|
-
type CreateBody$
|
|
17187
|
-
type UpdateBody$
|
|
17245
|
+
type ListParams$q = NonNullable<operations['listCollections']['parameters']['query']>;
|
|
17246
|
+
type CreateBody$m = NonNullable<operations['createCollection']['requestBody']>['content']['application/json'];
|
|
17247
|
+
type UpdateBody$l = NonNullable<operations['updateCollection']['requestBody']>['content']['application/json'];
|
|
17188
17248
|
type AddProductsBody = NonNullable<operations['addCollectionProducts']['requestBody']>['content']['application/json'];
|
|
17189
17249
|
type ReorderProductsBody = NonNullable<operations['reorderCollectionProducts']['requestBody']>['content']['application/json'];
|
|
17190
17250
|
type ReorderCollectionsBody = NonNullable<operations['reorderCollections']['requestBody']>['content']['application/json'];
|
|
17191
17251
|
declare class CollectionsResource {
|
|
17192
17252
|
private client;
|
|
17193
17253
|
constructor(client: Hydra);
|
|
17194
|
-
list(params?: ListParams$
|
|
17195
|
-
iterate(params?: Omit<ListParams$
|
|
17196
|
-
toArray(params?: Omit<ListParams$
|
|
17254
|
+
list(params?: ListParams$q): Promise<ListResponse<Collection>>;
|
|
17255
|
+
iterate(params?: Omit<ListParams$q, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Collection, void, undefined>;
|
|
17256
|
+
toArray(params?: Omit<ListParams$q, 'cursor'>, options?: PaginateOptions & {
|
|
17197
17257
|
limit?: number;
|
|
17198
17258
|
}): Promise<Collection[]>;
|
|
17199
|
-
get(id: string, params?: Pick<ListParams$
|
|
17200
|
-
create(body: CreateBody$
|
|
17201
|
-
update(id: string, body: UpdateBody$
|
|
17259
|
+
get(id: string, params?: Pick<ListParams$q, 'expand' | 'fields'>): Promise<DataResponse<Collection>>;
|
|
17260
|
+
create(body: CreateBody$m, options?: ResourceRequestOptions): Promise<DataResponse<Collection>>;
|
|
17261
|
+
update(id: string, body: UpdateBody$l): Promise<DataResponse<Collection>>;
|
|
17202
17262
|
delete(id: string): Promise<void>;
|
|
17203
17263
|
tree(): Promise<DataResponse<unknown>>;
|
|
17204
17264
|
reorder(body: ReorderCollectionsBody): Promise<void>;
|
|
@@ -17228,13 +17288,13 @@ declare class CartResource {
|
|
|
17228
17288
|
|
|
17229
17289
|
type CheckoutCreate = components['schemas']['CheckoutCreate'];
|
|
17230
17290
|
type CheckoutGet = components['schemas']['CheckoutGet'];
|
|
17231
|
-
type CreateBody$
|
|
17291
|
+
type CreateBody$l = NonNullable<operations['createCheckout']['requestBody']>['content']['application/json'];
|
|
17232
17292
|
type ApplyDiscountBody = NonNullable<operations['applyCheckoutDiscount']['requestBody']>['content']['application/json'];
|
|
17233
17293
|
type ApplyCreditBody = NonNullable<operations['applyCheckoutCredit']['requestBody']>['content']['application/json'];
|
|
17234
17294
|
declare class CheckoutResource {
|
|
17235
17295
|
private client;
|
|
17236
17296
|
constructor(client: Hydra);
|
|
17237
|
-
create(body: CreateBody$
|
|
17297
|
+
create(body: CreateBody$l, options?: ResourceRequestOptions): Promise<DataResponse<CheckoutCreate>>;
|
|
17238
17298
|
get(id: string): Promise<DataResponse<CheckoutGet>>;
|
|
17239
17299
|
applyDiscount(checkoutId: string, body: ApplyDiscountBody): Promise<DataResponse<CheckoutGet>>;
|
|
17240
17300
|
removeDiscount(checkoutId: string): Promise<DataResponse<CheckoutGet>>;
|
|
@@ -17245,15 +17305,15 @@ declare class CheckoutResource {
|
|
|
17245
17305
|
|
|
17246
17306
|
type Order$1 = components['schemas']['Order'];
|
|
17247
17307
|
type FulfillmentOrder$1 = components['schemas']['FulfillmentOrder'];
|
|
17248
|
-
type ListParams$
|
|
17249
|
-
type CreateBody$
|
|
17250
|
-
type UpdateBody$
|
|
17308
|
+
type ListParams$p = NonNullable<operations['listOrders']['parameters']['query']>;
|
|
17309
|
+
type CreateBody$k = NonNullable<operations['createOrder']['requestBody']>['content']['application/json'];
|
|
17310
|
+
type UpdateBody$k = NonNullable<operations['updateOrder']['requestBody']>['content']['application/json'];
|
|
17251
17311
|
declare class OrdersResource {
|
|
17252
17312
|
private client;
|
|
17253
17313
|
constructor(client: Hydra);
|
|
17254
|
-
list(params?: ListParams$
|
|
17255
|
-
iterate(params?: Omit<ListParams$
|
|
17256
|
-
toArray(params?: Omit<ListParams$
|
|
17314
|
+
list(params?: ListParams$p): Promise<ListResponse<Order$1>>;
|
|
17315
|
+
iterate(params?: Omit<ListParams$p, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Order$1, void, undefined>;
|
|
17316
|
+
toArray(params?: Omit<ListParams$p, 'cursor'>, options?: PaginateOptions & {
|
|
17257
17317
|
limit?: number;
|
|
17258
17318
|
}): Promise<Order$1[]>;
|
|
17259
17319
|
get(id: string, params?: {
|
|
@@ -17261,8 +17321,8 @@ declare class OrdersResource {
|
|
|
17261
17321
|
currency?: string;
|
|
17262
17322
|
fields?: string;
|
|
17263
17323
|
}): Promise<DataResponse<Order$1>>;
|
|
17264
|
-
create(body: CreateBody$
|
|
17265
|
-
update(id: string, body: UpdateBody$
|
|
17324
|
+
create(body: CreateBody$k, options?: ResourceRequestOptions): Promise<DataResponse<Order$1>>;
|
|
17325
|
+
update(id: string, body: UpdateBody$k): Promise<DataResponse<Order$1>>;
|
|
17266
17326
|
listFulfillmentOrders(orderId: string): Promise<DataResponse<FulfillmentOrder$1[]>>;
|
|
17267
17327
|
/**
|
|
17268
17328
|
* Returns the API path for downloading the invoice PDF for an order.
|
|
@@ -17276,34 +17336,34 @@ declare class OrdersResource {
|
|
|
17276
17336
|
}
|
|
17277
17337
|
|
|
17278
17338
|
type Fulfillment = components['schemas']['Fulfillment'];
|
|
17279
|
-
type CreateBody$
|
|
17280
|
-
type UpdateBody$
|
|
17339
|
+
type CreateBody$j = NonNullable<operations['createFulfillment']['requestBody']>['content']['application/json'];
|
|
17340
|
+
type UpdateBody$j = NonNullable<operations['updateFulfillment']['requestBody']>['content']['application/json'];
|
|
17281
17341
|
type CancelBody = NonNullable<operations['cancelFulfillment']['requestBody']>['content']['application/json'];
|
|
17282
17342
|
declare class FulfillmentsResource {
|
|
17283
17343
|
private client;
|
|
17284
17344
|
constructor(client: Hydra);
|
|
17285
17345
|
/** Create a fulfillment for a fulfillment order */
|
|
17286
|
-
create(fulfillmentOrderId: string, body: CreateBody$
|
|
17287
|
-
update(id: string, body: UpdateBody$
|
|
17346
|
+
create(fulfillmentOrderId: string, body: CreateBody$j, options?: ResourceRequestOptions): Promise<DataResponse<Fulfillment>>;
|
|
17347
|
+
update(id: string, body: UpdateBody$j): Promise<DataResponse<Fulfillment>>;
|
|
17288
17348
|
cancel(id: string, body?: CancelBody): Promise<DataResponse<Fulfillment>>;
|
|
17289
17349
|
}
|
|
17290
17350
|
|
|
17291
17351
|
type Refund = components['schemas']['Refund'];
|
|
17292
|
-
type ListParams$
|
|
17293
|
-
type CreateBody$
|
|
17352
|
+
type ListParams$o = NonNullable<operations['listRefunds']['parameters']['query']>;
|
|
17353
|
+
type CreateBody$i = NonNullable<operations['createOrderRefund']['requestBody']>['content']['application/json'];
|
|
17294
17354
|
declare class RefundsResource {
|
|
17295
17355
|
private client;
|
|
17296
17356
|
constructor(client: Hydra);
|
|
17297
|
-
list(params?: ListParams$
|
|
17298
|
-
iterate(params?: Omit<ListParams$
|
|
17299
|
-
toArray(params?: Omit<ListParams$
|
|
17357
|
+
list(params?: ListParams$o): Promise<ListResponse<Refund>>;
|
|
17358
|
+
iterate(params?: Omit<ListParams$o, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Refund, void, undefined>;
|
|
17359
|
+
toArray(params?: Omit<ListParams$o, 'cursor'>, options?: PaginateOptions & {
|
|
17300
17360
|
limit?: number;
|
|
17301
17361
|
}): Promise<Refund[]>;
|
|
17302
17362
|
get(id: string, params?: {
|
|
17303
17363
|
expand?: string;
|
|
17304
17364
|
fields?: string;
|
|
17305
17365
|
}): Promise<DataResponse<Refund>>;
|
|
17306
|
-
create(orderId: string, body: CreateBody$
|
|
17366
|
+
create(orderId: string, body: CreateBody$i, options?: ResourceRequestOptions): Promise<DataResponse<Refund>>;
|
|
17307
17367
|
listByOrder(orderId: string): Promise<DataResponse<Refund[]>>;
|
|
17308
17368
|
retry(id: string): Promise<DataResponse<Refund>>;
|
|
17309
17369
|
/**
|
|
@@ -17314,24 +17374,24 @@ declare class RefundsResource {
|
|
|
17314
17374
|
}
|
|
17315
17375
|
|
|
17316
17376
|
type Return = components['schemas']['Return'];
|
|
17317
|
-
type ListParams$
|
|
17318
|
-
type CreateBody$
|
|
17377
|
+
type ListParams$n = NonNullable<operations['listReturns']['parameters']['query']>;
|
|
17378
|
+
type CreateBody$h = NonNullable<operations['createOrderReturn']['requestBody']>['content']['application/json'];
|
|
17319
17379
|
type ApproveBody = NonNullable<operations['approveReturn']['requestBody']>['content']['application/json'];
|
|
17320
17380
|
type ReceiveBody$1 = NonNullable<operations['receiveReturn']['requestBody']>['content']['application/json'];
|
|
17321
17381
|
type RejectBody = NonNullable<operations['rejectReturn']['requestBody']>['content']['application/json'];
|
|
17322
17382
|
declare class ReturnsResource {
|
|
17323
17383
|
private client;
|
|
17324
17384
|
constructor(client: Hydra);
|
|
17325
|
-
list(params?: ListParams$
|
|
17326
|
-
iterate(params?: Omit<ListParams$
|
|
17327
|
-
toArray(params?: Omit<ListParams$
|
|
17385
|
+
list(params?: ListParams$n): Promise<ListResponse<Return>>;
|
|
17386
|
+
iterate(params?: Omit<ListParams$n, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Return, void, undefined>;
|
|
17387
|
+
toArray(params?: Omit<ListParams$n, 'cursor'>, options?: PaginateOptions & {
|
|
17328
17388
|
limit?: number;
|
|
17329
17389
|
}): Promise<Return[]>;
|
|
17330
17390
|
get(id: string, params?: {
|
|
17331
17391
|
expand?: string;
|
|
17332
17392
|
fields?: string;
|
|
17333
17393
|
}): Promise<DataResponse<Return>>;
|
|
17334
|
-
create(orderId: string, body: CreateBody$
|
|
17394
|
+
create(orderId: string, body: CreateBody$h, options?: ResourceRequestOptions): Promise<DataResponse<Return>>;
|
|
17335
17395
|
listByOrder(orderId: string): Promise<DataResponse<Return[]>>;
|
|
17336
17396
|
approve(id: string, body?: ApproveBody): Promise<DataResponse<Return>>;
|
|
17337
17397
|
receive(id: string, body?: ReceiveBody$1): Promise<DataResponse<Return>>;
|
|
@@ -17343,17 +17403,17 @@ declare class ReturnsResource {
|
|
|
17343
17403
|
type DraftOrder = components['schemas']['DraftOrder'];
|
|
17344
17404
|
type DraftOrderLineItem = components['schemas']['DraftOrderLineItem'];
|
|
17345
17405
|
type Order = components['schemas']['Order'];
|
|
17346
|
-
type ListParams$
|
|
17347
|
-
type CreateBody$
|
|
17348
|
-
type UpdateBody$
|
|
17406
|
+
type ListParams$m = NonNullable<operations['listDraftOrders']['parameters']['query']>;
|
|
17407
|
+
type CreateBody$g = NonNullable<operations['createDraftOrder']['requestBody']>['content']['application/json'];
|
|
17408
|
+
type UpdateBody$i = NonNullable<operations['updateDraftOrder']['requestBody']>['content']['application/json'];
|
|
17349
17409
|
type AddItemsBody = NonNullable<operations['addDraftOrderItems']['requestBody']>['content']['application/json'];
|
|
17350
17410
|
type UpdateItemBody$2 = NonNullable<operations['updateDraftOrderItem']['requestBody']>['content']['application/json'];
|
|
17351
17411
|
declare class DraftOrdersResource {
|
|
17352
17412
|
private client;
|
|
17353
17413
|
constructor(client: Hydra);
|
|
17354
|
-
list(params?: ListParams$
|
|
17355
|
-
iterate(params?: Omit<ListParams$
|
|
17356
|
-
toArray(params?: Omit<ListParams$
|
|
17414
|
+
list(params?: ListParams$m): Promise<ListResponse<DraftOrder>>;
|
|
17415
|
+
iterate(params?: Omit<ListParams$m, 'cursor'>, options?: PaginateOptions): AsyncGenerator<DraftOrder, void, undefined>;
|
|
17416
|
+
toArray(params?: Omit<ListParams$m, 'cursor'>, options?: PaginateOptions & {
|
|
17357
17417
|
limit?: number;
|
|
17358
17418
|
}): Promise<DraftOrder[]>;
|
|
17359
17419
|
get(id: string, params?: {
|
|
@@ -17361,8 +17421,8 @@ declare class DraftOrdersResource {
|
|
|
17361
17421
|
currency?: string;
|
|
17362
17422
|
fields?: string;
|
|
17363
17423
|
}): Promise<DataResponse<DraftOrder>>;
|
|
17364
|
-
create(body: CreateBody$
|
|
17365
|
-
update(id: string, body: UpdateBody$
|
|
17424
|
+
create(body: CreateBody$g, options?: ResourceRequestOptions): Promise<DataResponse<DraftOrder>>;
|
|
17425
|
+
update(id: string, body: UpdateBody$i): Promise<DataResponse<DraftOrder>>;
|
|
17366
17426
|
delete(id: string): Promise<void>;
|
|
17367
17427
|
addItems(draftOrderId: string, body: AddItemsBody): Promise<DataResponse<DraftOrderLineItem[]>>;
|
|
17368
17428
|
updateItem(draftOrderId: string, itemId: string, body: UpdateItemBody$2): Promise<DataResponse<DraftOrderLineItem>>;
|
|
@@ -17377,22 +17437,22 @@ declare class DraftOrdersResource {
|
|
|
17377
17437
|
}
|
|
17378
17438
|
|
|
17379
17439
|
type Customer = components['schemas']['Customer'];
|
|
17380
|
-
type ListParams$
|
|
17381
|
-
type CreateBody$
|
|
17382
|
-
type UpdateBody$
|
|
17440
|
+
type ListParams$l = NonNullable<operations['listCustomers']['parameters']['query']>;
|
|
17441
|
+
type CreateBody$f = NonNullable<operations['createCustomer']['requestBody']>['content']['application/json'];
|
|
17442
|
+
type UpdateBody$h = NonNullable<operations['updateCustomer']['requestBody']>['content']['application/json'];
|
|
17383
17443
|
type CreateAddressBody$1 = NonNullable<operations['createCustomerAddress']['requestBody']>['content']['application/json'];
|
|
17384
17444
|
type CreateNoteBody$1 = NonNullable<operations['createCustomerNote']['requestBody']>['content']['application/json'];
|
|
17385
17445
|
declare class CustomersResource {
|
|
17386
17446
|
private client;
|
|
17387
17447
|
constructor(client: Hydra);
|
|
17388
|
-
list(params?: ListParams$
|
|
17389
|
-
iterate(params?: Omit<ListParams$
|
|
17390
|
-
toArray(params?: Omit<ListParams$
|
|
17448
|
+
list(params?: ListParams$l): Promise<ListResponse<Customer>>;
|
|
17449
|
+
iterate(params?: Omit<ListParams$l, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Customer, void, undefined>;
|
|
17450
|
+
toArray(params?: Omit<ListParams$l, 'cursor'>, options?: PaginateOptions & {
|
|
17391
17451
|
limit?: number;
|
|
17392
17452
|
}): Promise<Customer[]>;
|
|
17393
|
-
get(id: string, params?: Pick<ListParams$
|
|
17394
|
-
create(body: CreateBody$
|
|
17395
|
-
update(id: string, body: UpdateBody$
|
|
17453
|
+
get(id: string, params?: Pick<ListParams$l, 'expand' | 'fields'>): Promise<DataResponse<Customer>>;
|
|
17454
|
+
create(body: CreateBody$f, options?: ResourceRequestOptions): Promise<DataResponse<Customer>>;
|
|
17455
|
+
update(id: string, body: UpdateBody$h): Promise<DataResponse<Customer>>;
|
|
17396
17456
|
delete(id: string): Promise<void>;
|
|
17397
17457
|
listAddresses(customerId: string): Promise<DataResponse<unknown[]>>;
|
|
17398
17458
|
createAddress(customerId: string, body: CreateAddressBody$1): Promise<DataResponse<unknown>>;
|
|
@@ -17406,38 +17466,38 @@ declare class CustomersResource {
|
|
|
17406
17466
|
}
|
|
17407
17467
|
|
|
17408
17468
|
type CustomerGroup = components['schemas']['CustomerGroup'];
|
|
17409
|
-
type ListParams$
|
|
17410
|
-
type CreateBody$
|
|
17411
|
-
type UpdateBody$
|
|
17469
|
+
type ListParams$k = NonNullable<operations['listCustomerGroups']['parameters']['query']>;
|
|
17470
|
+
type CreateBody$e = NonNullable<operations['createCustomerGroup']['requestBody']>['content']['application/json'];
|
|
17471
|
+
type UpdateBody$g = NonNullable<operations['updateCustomerGroup']['requestBody']>['content']['application/json'];
|
|
17412
17472
|
type AddMembersBody = NonNullable<operations['addCustomerGroupMembers']['requestBody']>['content']['application/json'];
|
|
17413
17473
|
declare class CustomerGroupsResource {
|
|
17414
17474
|
private client;
|
|
17415
17475
|
constructor(client: Hydra);
|
|
17416
|
-
list(params?: ListParams$
|
|
17417
|
-
iterate(params?: Omit<ListParams$
|
|
17418
|
-
toArray(params?: Omit<ListParams$
|
|
17476
|
+
list(params?: ListParams$k): Promise<ListResponse<CustomerGroup>>;
|
|
17477
|
+
iterate(params?: Omit<ListParams$k, 'cursor'>, options?: PaginateOptions): AsyncGenerator<CustomerGroup, void, undefined>;
|
|
17478
|
+
toArray(params?: Omit<ListParams$k, 'cursor'>, options?: PaginateOptions & {
|
|
17419
17479
|
limit?: number;
|
|
17420
17480
|
}): Promise<CustomerGroup[]>;
|
|
17421
17481
|
get(id: string): Promise<DataResponse<CustomerGroup>>;
|
|
17422
|
-
create(body: CreateBody$
|
|
17423
|
-
update(id: string, body: UpdateBody$
|
|
17482
|
+
create(body: CreateBody$e, options?: ResourceRequestOptions): Promise<DataResponse<CustomerGroup>>;
|
|
17483
|
+
update(id: string, body: UpdateBody$g): Promise<DataResponse<CustomerGroup>>;
|
|
17424
17484
|
delete(id: string): Promise<void>;
|
|
17425
17485
|
addMembers(groupId: string, body: AddMembersBody): Promise<void>;
|
|
17426
17486
|
removeMember(groupId: string, customerId: string): Promise<void>;
|
|
17427
17487
|
}
|
|
17428
17488
|
|
|
17429
|
-
type UpdateBody$
|
|
17489
|
+
type UpdateBody$f = NonNullable<operations['updateAddress']['requestBody']>['content']['application/json'];
|
|
17430
17490
|
declare class AddressesResource {
|
|
17431
17491
|
private client;
|
|
17432
17492
|
constructor(client: Hydra);
|
|
17433
|
-
update(id: string, body: UpdateBody$
|
|
17493
|
+
update(id: string, body: UpdateBody$f): Promise<DataResponse<unknown>>;
|
|
17434
17494
|
delete(id: string): Promise<void>;
|
|
17435
17495
|
}
|
|
17436
17496
|
|
|
17437
17497
|
type InventoryLevel = components['schemas']['InventoryLevel'];
|
|
17438
17498
|
type InventoryAdjustment = components['schemas']['InventoryAdjustment'];
|
|
17439
17499
|
type ProductAdjustment = components['schemas']['ProductAdjustment'];
|
|
17440
|
-
type ListParams$
|
|
17500
|
+
type ListParams$j = NonNullable<operations['listInventory']['parameters']['query']>;
|
|
17441
17501
|
type SetBody = NonNullable<operations['setInventory']['requestBody']>['content']['application/json'];
|
|
17442
17502
|
type AdjustBody = NonNullable<operations['adjustInventory']['requestBody']>['content']['application/json'];
|
|
17443
17503
|
type InventoryResult = InventoryLevel & {
|
|
@@ -17446,9 +17506,9 @@ type InventoryResult = InventoryLevel & {
|
|
|
17446
17506
|
declare class InventoryResource {
|
|
17447
17507
|
private client;
|
|
17448
17508
|
constructor(client: Hydra);
|
|
17449
|
-
list(params?: ListParams$
|
|
17450
|
-
iterate(params?: Omit<ListParams$
|
|
17451
|
-
toArray(params?: Omit<ListParams$
|
|
17509
|
+
list(params?: ListParams$j): Promise<ListResponse<InventoryLevel>>;
|
|
17510
|
+
iterate(params?: Omit<ListParams$j, 'cursor'>, options?: PaginateOptions): AsyncGenerator<InventoryLevel, void, undefined>;
|
|
17511
|
+
toArray(params?: Omit<ListParams$j, 'cursor'>, options?: PaginateOptions & {
|
|
17452
17512
|
limit?: number;
|
|
17453
17513
|
}): Promise<InventoryLevel[]>;
|
|
17454
17514
|
listAdjustments(params: {
|
|
@@ -17520,56 +17580,56 @@ declare class ShippingResource {
|
|
|
17520
17580
|
}
|
|
17521
17581
|
|
|
17522
17582
|
type Promotion = components['schemas']['Promotion'];
|
|
17523
|
-
type ListParams$
|
|
17524
|
-
type CreateBody$
|
|
17525
|
-
type UpdateBody$
|
|
17583
|
+
type ListParams$i = NonNullable<operations['listPromotions']['parameters']['query']>;
|
|
17584
|
+
type CreateBody$d = NonNullable<operations['createPromotion']['requestBody']>['content']['application/json'];
|
|
17585
|
+
type UpdateBody$e = NonNullable<operations['updatePromotion']['requestBody']>['content']['application/json'];
|
|
17526
17586
|
declare class PromotionsResource {
|
|
17527
17587
|
private client;
|
|
17528
17588
|
constructor(client: Hydra);
|
|
17529
|
-
list(params?: ListParams$
|
|
17530
|
-
iterate(params?: Omit<ListParams$
|
|
17531
|
-
toArray(params?: Omit<ListParams$
|
|
17589
|
+
list(params?: ListParams$i): Promise<ListResponse<Promotion>>;
|
|
17590
|
+
iterate(params?: Omit<ListParams$i, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Promotion, void, undefined>;
|
|
17591
|
+
toArray(params?: Omit<ListParams$i, 'cursor'>, options?: PaginateOptions & {
|
|
17532
17592
|
limit?: number;
|
|
17533
17593
|
}): Promise<Promotion[]>;
|
|
17534
17594
|
get(id: string): Promise<DataResponse<Promotion>>;
|
|
17535
|
-
create(body: CreateBody$
|
|
17536
|
-
update(id: string, body: UpdateBody$
|
|
17595
|
+
create(body: CreateBody$d, options?: ResourceRequestOptions): Promise<DataResponse<Promotion>>;
|
|
17596
|
+
update(id: string, body: UpdateBody$e): Promise<DataResponse<Promotion>>;
|
|
17537
17597
|
delete(id: string): Promise<void>;
|
|
17538
17598
|
}
|
|
17539
17599
|
|
|
17540
17600
|
type Discount = components['schemas']['Discount'];
|
|
17541
|
-
type ListParams$
|
|
17542
|
-
type CreateBody$
|
|
17543
|
-
type UpdateBody$
|
|
17601
|
+
type ListParams$h = NonNullable<operations['listDiscounts']['parameters']['query']>;
|
|
17602
|
+
type CreateBody$c = NonNullable<operations['createDiscount']['requestBody']>['content']['application/json'];
|
|
17603
|
+
type UpdateBody$d = NonNullable<operations['updateDiscount']['requestBody']>['content']['application/json'];
|
|
17544
17604
|
declare class DiscountsResource {
|
|
17545
17605
|
private client;
|
|
17546
17606
|
constructor(client: Hydra);
|
|
17547
|
-
list(params?: ListParams$
|
|
17548
|
-
iterate(params?: Omit<ListParams$
|
|
17549
|
-
toArray(params?: Omit<ListParams$
|
|
17607
|
+
list(params?: ListParams$h): Promise<ListResponse<Discount>>;
|
|
17608
|
+
iterate(params?: Omit<ListParams$h, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Discount, void, undefined>;
|
|
17609
|
+
toArray(params?: Omit<ListParams$h, 'cursor'>, options?: PaginateOptions & {
|
|
17550
17610
|
limit?: number;
|
|
17551
17611
|
}): Promise<Discount[]>;
|
|
17552
17612
|
get(id: string): Promise<DataResponse<Discount>>;
|
|
17553
|
-
create(body: CreateBody$
|
|
17554
|
-
update(id: string, body: UpdateBody$
|
|
17613
|
+
create(body: CreateBody$c, options?: ResourceRequestOptions): Promise<DataResponse<Discount>>;
|
|
17614
|
+
update(id: string, body: UpdateBody$d): Promise<DataResponse<Discount>>;
|
|
17555
17615
|
delete(id: string): Promise<void>;
|
|
17556
17616
|
}
|
|
17557
17617
|
|
|
17558
17618
|
type Image = components['schemas']['Image'];
|
|
17559
|
-
type ListParams$
|
|
17560
|
-
type UpdateBody$
|
|
17619
|
+
type ListParams$g = NonNullable<operations['listImages']['parameters']['query']>;
|
|
17620
|
+
type UpdateBody$c = NonNullable<operations['updateImage']['requestBody']>['content']['application/json'];
|
|
17561
17621
|
type ReorderBody$2 = NonNullable<operations['reorderImages']['requestBody']>['content']['application/json'];
|
|
17562
17622
|
declare class ImagesResource {
|
|
17563
17623
|
private client;
|
|
17564
17624
|
constructor(client: Hydra);
|
|
17565
|
-
list(params?: ListParams$
|
|
17566
|
-
iterate(params?: Omit<ListParams$
|
|
17567
|
-
toArray(params?: Omit<ListParams$
|
|
17625
|
+
list(params?: ListParams$g): Promise<ListResponse<Image>>;
|
|
17626
|
+
iterate(params?: Omit<ListParams$g, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Image, void, undefined>;
|
|
17627
|
+
toArray(params?: Omit<ListParams$g, 'cursor'>, options?: PaginateOptions & {
|
|
17568
17628
|
limit?: number;
|
|
17569
17629
|
}): Promise<Image[]>;
|
|
17570
17630
|
/** Upload an image to the store library */
|
|
17571
17631
|
upload(formData: FormData): Promise<DataResponse<Image>>;
|
|
17572
|
-
update(id: string, body: UpdateBody$
|
|
17632
|
+
update(id: string, body: UpdateBody$c): Promise<DataResponse<Image>>;
|
|
17573
17633
|
delete(id: string): Promise<void>;
|
|
17574
17634
|
detach(id: string): Promise<void>;
|
|
17575
17635
|
batchDelete(imageIds: string[]): Promise<void>;
|
|
@@ -17578,32 +17638,32 @@ declare class ImagesResource {
|
|
|
17578
17638
|
}
|
|
17579
17639
|
|
|
17580
17640
|
type Webhook = components['schemas']['Webhook'];
|
|
17581
|
-
type ListParams$
|
|
17582
|
-
type CreateBody$
|
|
17583
|
-
type UpdateBody$
|
|
17641
|
+
type ListParams$f = NonNullable<operations['listWebhooks']['parameters']['query']>;
|
|
17642
|
+
type CreateBody$b = NonNullable<operations['createWebhook']['requestBody']>['content']['application/json'];
|
|
17643
|
+
type UpdateBody$b = NonNullable<operations['updateWebhook']['requestBody']>['content']['application/json'];
|
|
17584
17644
|
declare class WebhooksResource {
|
|
17585
17645
|
private client;
|
|
17586
17646
|
constructor(client: Hydra);
|
|
17587
|
-
list(params?: ListParams$
|
|
17588
|
-
iterate(params?: Omit<ListParams$
|
|
17589
|
-
toArray(params?: Omit<ListParams$
|
|
17647
|
+
list(params?: ListParams$f): Promise<ListResponse<Webhook>>;
|
|
17648
|
+
iterate(params?: Omit<ListParams$f, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Webhook, void, undefined>;
|
|
17649
|
+
toArray(params?: Omit<ListParams$f, 'cursor'>, options?: PaginateOptions & {
|
|
17590
17650
|
limit?: number;
|
|
17591
17651
|
}): Promise<Webhook[]>;
|
|
17592
17652
|
get(id: string): Promise<DataResponse<Webhook>>;
|
|
17593
|
-
create(body: CreateBody$
|
|
17594
|
-
update(id: string, body: UpdateBody$
|
|
17653
|
+
create(body: CreateBody$b, options?: ResourceRequestOptions): Promise<DataResponse<Webhook>>;
|
|
17654
|
+
update(id: string, body: UpdateBody$b): Promise<DataResponse<Webhook>>;
|
|
17595
17655
|
delete(id: string): Promise<void>;
|
|
17596
17656
|
}
|
|
17597
17657
|
|
|
17598
17658
|
type Store = components['schemas']['Store'];
|
|
17599
|
-
type UpdateBody$
|
|
17659
|
+
type UpdateBody$a = NonNullable<operations['updateStore']['requestBody']>['content']['application/json'];
|
|
17600
17660
|
declare class StoreResource {
|
|
17601
17661
|
private client;
|
|
17602
17662
|
constructor(client: Hydra);
|
|
17603
17663
|
get(params?: {
|
|
17604
17664
|
fields?: string;
|
|
17605
17665
|
}): Promise<DataResponse<Store>>;
|
|
17606
|
-
update(body: UpdateBody$
|
|
17666
|
+
update(body: UpdateBody$a): Promise<DataResponse<Store>>;
|
|
17607
17667
|
getDomainRecord(): Promise<DataResponse<unknown>>;
|
|
17608
17668
|
verifyDomain(): Promise<DataResponse<unknown>>;
|
|
17609
17669
|
publish(): Promise<DataResponse<{
|
|
@@ -17615,42 +17675,42 @@ declare class StoreResource {
|
|
|
17615
17675
|
}
|
|
17616
17676
|
|
|
17617
17677
|
type Tag = components['schemas']['Tag'];
|
|
17618
|
-
type ListParams$
|
|
17619
|
-
type CreateBody$
|
|
17620
|
-
type UpdateBody$
|
|
17678
|
+
type ListParams$e = NonNullable<operations['listTags']['parameters']['query']>;
|
|
17679
|
+
type CreateBody$a = NonNullable<operations['createTag']['requestBody']>['content']['application/json'];
|
|
17680
|
+
type UpdateBody$9 = NonNullable<operations['updateTag']['requestBody']>['content']['application/json'];
|
|
17621
17681
|
declare class TagsResource {
|
|
17622
17682
|
private client;
|
|
17623
17683
|
constructor(client: Hydra);
|
|
17624
|
-
list(params?: ListParams$
|
|
17625
|
-
iterate(params?: Omit<ListParams$
|
|
17626
|
-
toArray(params?: Omit<ListParams$
|
|
17684
|
+
list(params?: ListParams$e): Promise<ListResponse<Tag>>;
|
|
17685
|
+
iterate(params?: Omit<ListParams$e, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Tag, void, undefined>;
|
|
17686
|
+
toArray(params?: Omit<ListParams$e, 'cursor'>, options?: PaginateOptions & {
|
|
17627
17687
|
limit?: number;
|
|
17628
17688
|
}): Promise<Tag[]>;
|
|
17629
|
-
create(body: CreateBody$
|
|
17630
|
-
update(id: string, body: UpdateBody$
|
|
17689
|
+
create(body: CreateBody$a, options?: ResourceRequestOptions): Promise<DataResponse<Tag>>;
|
|
17690
|
+
update(id: string, body: UpdateBody$9): Promise<DataResponse<Tag>>;
|
|
17631
17691
|
delete(id: string): Promise<void>;
|
|
17632
17692
|
}
|
|
17633
17693
|
|
|
17634
17694
|
type Redirect = components['schemas']['Redirect'];
|
|
17635
|
-
type ListParams$
|
|
17636
|
-
type CreateBody$
|
|
17695
|
+
type ListParams$d = NonNullable<operations['listRedirects']['parameters']['query']>;
|
|
17696
|
+
type CreateBody$9 = NonNullable<operations['createRedirect']['requestBody']>['content']['application/json'];
|
|
17637
17697
|
declare class RedirectsResource {
|
|
17638
17698
|
private client;
|
|
17639
17699
|
constructor(client: Hydra);
|
|
17640
|
-
list(params?: ListParams$
|
|
17641
|
-
iterate(params?: Omit<ListParams$
|
|
17642
|
-
toArray(params?: Omit<ListParams$
|
|
17700
|
+
list(params?: ListParams$d): Promise<ListResponse<Redirect>>;
|
|
17701
|
+
iterate(params?: Omit<ListParams$d, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Redirect, void, undefined>;
|
|
17702
|
+
toArray(params?: Omit<ListParams$d, 'cursor'>, options?: PaginateOptions & {
|
|
17643
17703
|
limit?: number;
|
|
17644
17704
|
}): Promise<Redirect[]>;
|
|
17645
|
-
create(body: CreateBody$
|
|
17705
|
+
create(body: CreateBody$9, options?: ResourceRequestOptions): Promise<DataResponse<Redirect>>;
|
|
17646
17706
|
lookup(path: string): Promise<DataResponse<Redirect>>;
|
|
17647
17707
|
delete(id: string): Promise<void>;
|
|
17648
17708
|
}
|
|
17649
17709
|
|
|
17650
17710
|
type Company = components['schemas']['Company'];
|
|
17651
|
-
type ListParams$
|
|
17652
|
-
type CreateBody$
|
|
17653
|
-
type UpdateBody$
|
|
17711
|
+
type ListParams$c = NonNullable<operations['listCompanies']['parameters']['query']>;
|
|
17712
|
+
type CreateBody$8 = NonNullable<operations['createCompany']['requestBody']>['content']['application/json'];
|
|
17713
|
+
type UpdateBody$8 = NonNullable<operations['updateCompany']['requestBody']>['content']['application/json'];
|
|
17654
17714
|
type CreateAddressBody = NonNullable<operations['createCompanyAddress']['requestBody']>['content']['application/json'];
|
|
17655
17715
|
type UpdateAddressBody = NonNullable<operations['updateCompanyAddress']['requestBody']>['content']['application/json'];
|
|
17656
17716
|
type CreateContactBody = NonNullable<operations['createCompanyContact']['requestBody']>['content']['application/json'];
|
|
@@ -17659,14 +17719,14 @@ type CreateNoteBody = NonNullable<operations['createCompanyNote']['requestBody']
|
|
|
17659
17719
|
declare class CompaniesResource {
|
|
17660
17720
|
private client;
|
|
17661
17721
|
constructor(client: Hydra);
|
|
17662
|
-
list(params?: ListParams$
|
|
17663
|
-
iterate(params?: Omit<ListParams$
|
|
17664
|
-
toArray(params?: Omit<ListParams$
|
|
17722
|
+
list(params?: ListParams$c): Promise<ListResponse<Company>>;
|
|
17723
|
+
iterate(params?: Omit<ListParams$c, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Company, void, undefined>;
|
|
17724
|
+
toArray(params?: Omit<ListParams$c, 'cursor'>, options?: PaginateOptions & {
|
|
17665
17725
|
limit?: number;
|
|
17666
17726
|
}): Promise<Company[]>;
|
|
17667
|
-
get(id: string, params?: Pick<ListParams$
|
|
17668
|
-
create(body: CreateBody$
|
|
17669
|
-
update(id: string, body: UpdateBody$
|
|
17727
|
+
get(id: string, params?: Pick<ListParams$c, 'expand' | 'fields'>): Promise<DataResponse<Company>>;
|
|
17728
|
+
create(body: CreateBody$8, options?: ResourceRequestOptions): Promise<DataResponse<Company>>;
|
|
17729
|
+
update(id: string, body: UpdateBody$8): Promise<DataResponse<Company>>;
|
|
17670
17730
|
delete(id: string): Promise<void>;
|
|
17671
17731
|
listAddresses(companyId: string): Promise<DataResponse<unknown[]>>;
|
|
17672
17732
|
createAddress(companyId: string, body: CreateAddressBody): Promise<DataResponse<unknown>>;
|
|
@@ -17682,23 +17742,23 @@ declare class CompaniesResource {
|
|
|
17682
17742
|
}
|
|
17683
17743
|
|
|
17684
17744
|
type PurchaseOrder = components['schemas']['PurchaseOrder'];
|
|
17685
|
-
type ListParams$
|
|
17686
|
-
type CreateBody$
|
|
17687
|
-
type UpdateBody$
|
|
17745
|
+
type ListParams$b = NonNullable<operations['listPurchaseOrders']['parameters']['query']>;
|
|
17746
|
+
type CreateBody$7 = NonNullable<operations['createPurchaseOrder']['requestBody']>['content']['application/json'];
|
|
17747
|
+
type UpdateBody$7 = NonNullable<operations['updatePurchaseOrder']['requestBody']>['content']['application/json'];
|
|
17688
17748
|
type AddItemBody = NonNullable<operations['addPurchaseOrderItems']['requestBody']>['content']['application/json'];
|
|
17689
17749
|
type UpdateItemBody$1 = NonNullable<operations['updatePurchaseOrderItem']['requestBody']>['content']['application/json'];
|
|
17690
17750
|
type ReceiveBody = NonNullable<operations['receivePurchaseOrderItems']['requestBody']>['content']['application/json'];
|
|
17691
17751
|
declare class PurchaseOrdersResource {
|
|
17692
17752
|
private client;
|
|
17693
17753
|
constructor(client: Hydra);
|
|
17694
|
-
list(params?: ListParams$
|
|
17695
|
-
iterate(params?: Omit<ListParams$
|
|
17696
|
-
toArray(params?: Omit<ListParams$
|
|
17754
|
+
list(params?: ListParams$b): Promise<ListResponse<PurchaseOrder>>;
|
|
17755
|
+
iterate(params?: Omit<ListParams$b, 'cursor'>, options?: PaginateOptions): AsyncGenerator<PurchaseOrder, void, undefined>;
|
|
17756
|
+
toArray(params?: Omit<ListParams$b, 'cursor'>, options?: PaginateOptions & {
|
|
17697
17757
|
limit?: number;
|
|
17698
17758
|
}): Promise<PurchaseOrder[]>;
|
|
17699
|
-
get(id: string, params?: Pick<ListParams$
|
|
17700
|
-
create(body: CreateBody$
|
|
17701
|
-
update(id: string, body: UpdateBody$
|
|
17759
|
+
get(id: string, params?: Pick<ListParams$b, 'expand' | 'fields'>): Promise<DataResponse<PurchaseOrder>>;
|
|
17760
|
+
create(body: CreateBody$7, options?: ResourceRequestOptions): Promise<DataResponse<PurchaseOrder>>;
|
|
17761
|
+
update(id: string, body: UpdateBody$7): Promise<DataResponse<PurchaseOrder>>;
|
|
17702
17762
|
delete(id: string): Promise<void>;
|
|
17703
17763
|
addItem(purchaseOrderId: string, body: AddItemBody): Promise<DataResponse<unknown>>;
|
|
17704
17764
|
updateItem(purchaseOrderId: string, itemId: string, body: UpdateItemBody$1): Promise<DataResponse<unknown>>;
|
|
@@ -17721,17 +17781,17 @@ declare class FulfillmentOrdersResource {
|
|
|
17721
17781
|
listForOrder(orderId: string): Promise<DataResponse<FulfillmentOrder[]>>;
|
|
17722
17782
|
}
|
|
17723
17783
|
|
|
17724
|
-
type ListParams$
|
|
17725
|
-
type CreateBody$
|
|
17726
|
-
type UpdateBody$
|
|
17784
|
+
type ListParams$a = NonNullable<operations['listMetafieldDefinitions']['parameters']['query']>;
|
|
17785
|
+
type CreateBody$6 = NonNullable<operations['createMetafieldDefinition']['requestBody']>['content']['application/json'];
|
|
17786
|
+
type UpdateBody$6 = NonNullable<operations['updateMetafieldDefinition']['requestBody']>['content']['application/json'];
|
|
17727
17787
|
type ReorderBody$1 = NonNullable<operations['reorderMetafieldDefinitions']['requestBody']>['content']['application/json'];
|
|
17728
17788
|
declare class MetafieldsResource {
|
|
17729
17789
|
private client;
|
|
17730
17790
|
constructor(client: Hydra);
|
|
17731
17791
|
/** List metafield definitions for the store */
|
|
17732
|
-
listDefinitions(params?: ListParams$
|
|
17733
|
-
createDefinition(body: CreateBody$
|
|
17734
|
-
updateDefinition(ownerType: string, slug: string, body: UpdateBody$
|
|
17792
|
+
listDefinitions(params?: ListParams$a): Promise<DataResponse<unknown[]>>;
|
|
17793
|
+
createDefinition(body: CreateBody$6): Promise<DataResponse<unknown>>;
|
|
17794
|
+
updateDefinition(ownerType: string, slug: string, body: UpdateBody$6): Promise<DataResponse<unknown>>;
|
|
17735
17795
|
archiveDefinition(ownerType: string, slug: string): Promise<void>;
|
|
17736
17796
|
reorderDefinitions(ownerType: string, body: ReorderBody$1): Promise<void>;
|
|
17737
17797
|
}
|
|
@@ -17777,30 +17837,30 @@ declare class TaxResource {
|
|
|
17777
17837
|
}
|
|
17778
17838
|
|
|
17779
17839
|
type ExchangeRate = components['schemas']['ExchangeRate'];
|
|
17780
|
-
type ListParams$
|
|
17840
|
+
type ListParams$9 = NonNullable<operations['listExchangeRates']['parameters']['query']>;
|
|
17781
17841
|
declare class ExchangeRatesResource {
|
|
17782
17842
|
private client;
|
|
17783
17843
|
constructor(client: Hydra);
|
|
17784
|
-
list(params?: ListParams$
|
|
17844
|
+
list(params?: ListParams$9): Promise<DataResponse<ExchangeRate[]>>;
|
|
17785
17845
|
refresh(): Promise<DataResponse<unknown>>;
|
|
17786
17846
|
}
|
|
17787
17847
|
|
|
17788
17848
|
type FilterAttribute = components['schemas']['FilterAttribute'];
|
|
17789
|
-
type ListParams$
|
|
17790
|
-
type CreateBody$
|
|
17791
|
-
type UpdateBody$
|
|
17849
|
+
type ListParams$8 = NonNullable<operations['listFilterAttributes']['parameters']['query']>;
|
|
17850
|
+
type CreateBody$5 = NonNullable<operations['createFilterAttribute']['requestBody']>['content']['application/json'];
|
|
17851
|
+
type UpdateBody$5 = NonNullable<operations['updateFilterAttribute']['requestBody']>['content']['application/json'];
|
|
17792
17852
|
type ReorderBody = NonNullable<operations['reorderFilterAttributes']['requestBody']>['content']['application/json'];
|
|
17793
17853
|
declare class FilterAttributesResource {
|
|
17794
17854
|
private client;
|
|
17795
17855
|
constructor(client: Hydra);
|
|
17796
|
-
list(params?: ListParams$
|
|
17797
|
-
iterate(params?: Omit<ListParams$
|
|
17798
|
-
toArray(params?: Omit<ListParams$
|
|
17856
|
+
list(params?: ListParams$8): Promise<ListResponse<FilterAttribute>>;
|
|
17857
|
+
iterate(params?: Omit<ListParams$8, 'cursor'>, options?: PaginateOptions): AsyncGenerator<FilterAttribute, void, undefined>;
|
|
17858
|
+
toArray(params?: Omit<ListParams$8, 'cursor'>, options?: PaginateOptions & {
|
|
17799
17859
|
limit?: number;
|
|
17800
17860
|
}): Promise<FilterAttribute[]>;
|
|
17801
17861
|
get(id: string): Promise<DataResponse<FilterAttribute>>;
|
|
17802
|
-
create(body: CreateBody$
|
|
17803
|
-
update(id: string, body: UpdateBody$
|
|
17862
|
+
create(body: CreateBody$5, options?: ResourceRequestOptions): Promise<DataResponse<FilterAttribute>>;
|
|
17863
|
+
update(id: string, body: UpdateBody$5): Promise<DataResponse<FilterAttribute>>;
|
|
17804
17864
|
delete(id: string): Promise<void>;
|
|
17805
17865
|
reorder(body: ReorderBody): Promise<ListResponse<FilterAttribute>>;
|
|
17806
17866
|
discover(): Promise<DataResponse<unknown[]>>;
|
|
@@ -17808,23 +17868,23 @@ declare class FilterAttributesResource {
|
|
|
17808
17868
|
|
|
17809
17869
|
type NavigationMenu = components['schemas']['NavigationMenu'];
|
|
17810
17870
|
type NavigationItem = components['schemas']['NavigationItem'];
|
|
17811
|
-
type ListParams$
|
|
17812
|
-
type CreateBody$
|
|
17813
|
-
type UpdateBody$
|
|
17871
|
+
type ListParams$7 = NonNullable<operations['listNavigationMenus']['parameters']['query']>;
|
|
17872
|
+
type CreateBody$4 = NonNullable<operations['createNavigationMenu']['requestBody']>['content']['application/json'];
|
|
17873
|
+
type UpdateBody$4 = NonNullable<operations['updateNavigationMenu']['requestBody']>['content']['application/json'];
|
|
17814
17874
|
type CreateItemBody = NonNullable<operations['addNavigationItem']['requestBody']>['content']['application/json'];
|
|
17815
17875
|
type UpdateItemBody = NonNullable<operations['updateNavigationItem']['requestBody']>['content']['application/json'];
|
|
17816
17876
|
type ReorderItemsBody = NonNullable<operations['reorderNavigationItems']['requestBody']>['content']['application/json'];
|
|
17817
17877
|
declare class NavigationResource {
|
|
17818
17878
|
private client;
|
|
17819
17879
|
constructor(client: Hydra);
|
|
17820
|
-
list(params?: ListParams$
|
|
17821
|
-
iterate(params?: Omit<ListParams$
|
|
17822
|
-
toArray(params?: Omit<ListParams$
|
|
17880
|
+
list(params?: ListParams$7): Promise<ListResponse<NavigationMenu>>;
|
|
17881
|
+
iterate(params?: Omit<ListParams$7, 'cursor'>, options?: PaginateOptions): AsyncGenerator<NavigationMenu, void, undefined>;
|
|
17882
|
+
toArray(params?: Omit<ListParams$7, 'cursor'>, options?: PaginateOptions & {
|
|
17823
17883
|
limit?: number;
|
|
17824
17884
|
}): Promise<NavigationMenu[]>;
|
|
17825
17885
|
get(id: string): Promise<DataResponse<NavigationMenu>>;
|
|
17826
|
-
create(body: CreateBody$
|
|
17827
|
-
update(id: string, body: UpdateBody$
|
|
17886
|
+
create(body: CreateBody$4, options?: ResourceRequestOptions): Promise<DataResponse<NavigationMenu>>;
|
|
17887
|
+
update(id: string, body: UpdateBody$4): Promise<DataResponse<NavigationMenu>>;
|
|
17828
17888
|
delete(id: string): Promise<void>;
|
|
17829
17889
|
addItem(menuId: string, body: CreateItemBody): Promise<DataResponse<NavigationItem>>;
|
|
17830
17890
|
updateItem(menuId: string, itemId: string, body: UpdateItemBody): Promise<DataResponse<NavigationItem>>;
|
|
@@ -17833,26 +17893,26 @@ declare class NavigationResource {
|
|
|
17833
17893
|
}
|
|
17834
17894
|
|
|
17835
17895
|
type NotificationLog = components['schemas']['NotificationLog'];
|
|
17836
|
-
type ListParams$
|
|
17896
|
+
type ListParams$6 = NonNullable<operations['listNotifications']['parameters']['query']>;
|
|
17837
17897
|
declare class NotificationsResource {
|
|
17838
17898
|
private client;
|
|
17839
17899
|
constructor(client: Hydra);
|
|
17840
|
-
list(params?: ListParams$
|
|
17841
|
-
iterate(params?: Omit<ListParams$
|
|
17842
|
-
toArray(params?: Omit<ListParams$
|
|
17900
|
+
list(params?: ListParams$6): Promise<ListResponse<NotificationLog>>;
|
|
17901
|
+
iterate(params?: Omit<ListParams$6, 'cursor'>, options?: PaginateOptions): AsyncGenerator<NotificationLog, void, undefined>;
|
|
17902
|
+
toArray(params?: Omit<ListParams$6, 'cursor'>, options?: PaginateOptions & {
|
|
17843
17903
|
limit?: number;
|
|
17844
17904
|
}): Promise<NotificationLog[]>;
|
|
17845
17905
|
get(id: string): Promise<DataResponse<NotificationLog>>;
|
|
17846
17906
|
}
|
|
17847
17907
|
|
|
17848
17908
|
type CheckoutListItem = components['schemas']['CheckoutListItem'];
|
|
17849
|
-
type ListParams$
|
|
17909
|
+
type ListParams$5 = NonNullable<operations['listCheckouts']['parameters']['query']>;
|
|
17850
17910
|
declare class CheckoutsResource {
|
|
17851
17911
|
private client;
|
|
17852
17912
|
constructor(client: Hydra);
|
|
17853
|
-
list(params?: ListParams$
|
|
17854
|
-
iterate(params?: Omit<ListParams$
|
|
17855
|
-
toArray(params?: Omit<ListParams$
|
|
17913
|
+
list(params?: ListParams$5): Promise<ListResponse<CheckoutListItem>>;
|
|
17914
|
+
iterate(params?: Omit<ListParams$5, 'cursor'>, options?: PaginateOptions): AsyncGenerator<CheckoutListItem, void, undefined>;
|
|
17915
|
+
toArray(params?: Omit<ListParams$5, 'cursor'>, options?: PaginateOptions & {
|
|
17856
17916
|
limit?: number;
|
|
17857
17917
|
}): Promise<CheckoutListItem[]>;
|
|
17858
17918
|
}
|
|
@@ -17878,16 +17938,16 @@ declare class AnalyticsResource {
|
|
|
17878
17938
|
|
|
17879
17939
|
type CreditTransaction = NonNullable<operations['issueCustomerCredit']['responses']['201']['content']['application/json']['data']>;
|
|
17880
17940
|
type CreditBalance = NonNullable<operations['getCustomerCredit']['responses']['200']['content']['application/json']['data']>;
|
|
17881
|
-
type ListParams$
|
|
17941
|
+
type ListParams$4 = NonNullable<operations['listCustomerCreditTransactions']['parameters']['query']>;
|
|
17882
17942
|
type IssueCreditBody = NonNullable<operations['issueCustomerCredit']['requestBody']>['content']['application/json'];
|
|
17883
17943
|
declare class StoreCreditResource {
|
|
17884
17944
|
private client;
|
|
17885
17945
|
constructor(client: Hydra);
|
|
17886
17946
|
getBalance(customerId: string): Promise<DataResponse<CreditBalance>>;
|
|
17887
17947
|
issue(customerId: string, body: IssueCreditBody, options?: ResourceRequestOptions): Promise<DataResponse<CreditTransaction>>;
|
|
17888
|
-
listTransactions(customerId: string, params?: ListParams$
|
|
17889
|
-
iterateTransactions(customerId: string, params?: Omit<ListParams$
|
|
17890
|
-
transactionsToArray(customerId: string, params?: Omit<ListParams$
|
|
17948
|
+
listTransactions(customerId: string, params?: ListParams$4): Promise<ListResponse<CreditTransaction>>;
|
|
17949
|
+
iterateTransactions(customerId: string, params?: Omit<ListParams$4, 'cursor'>, options?: PaginateOptions): AsyncGenerator<CreditTransaction, void, undefined>;
|
|
17950
|
+
transactionsToArray(customerId: string, params?: Omit<ListParams$4, 'cursor'>, options?: PaginateOptions & {
|
|
17891
17951
|
limit?: number;
|
|
17892
17952
|
}): Promise<CreditTransaction[]>;
|
|
17893
17953
|
}
|
|
@@ -17905,21 +17965,21 @@ declare class SearchResource {
|
|
|
17905
17965
|
|
|
17906
17966
|
type Location = components['schemas']['Location'];
|
|
17907
17967
|
type TransferResult = components['schemas']['TransferResult'];
|
|
17908
|
-
type ListParams$
|
|
17909
|
-
type CreateBody$
|
|
17910
|
-
type UpdateBody$
|
|
17968
|
+
type ListParams$3 = NonNullable<operations['listLocations']['parameters']['query']>;
|
|
17969
|
+
type CreateBody$3 = NonNullable<operations['createLocation']['requestBody']>['content']['application/json'];
|
|
17970
|
+
type UpdateBody$3 = NonNullable<operations['updateLocation']['requestBody']>['content']['application/json'];
|
|
17911
17971
|
type TransferBody = NonNullable<operations['transferLocationInventory']['requestBody']>['content']['application/json'];
|
|
17912
17972
|
declare class LocationsResource {
|
|
17913
17973
|
private client;
|
|
17914
17974
|
constructor(client: Hydra);
|
|
17915
|
-
list(params?: ListParams$
|
|
17916
|
-
iterate(params?: Omit<ListParams$
|
|
17917
|
-
toArray(params?: Omit<ListParams$
|
|
17975
|
+
list(params?: ListParams$3): Promise<ListResponse<Location>>;
|
|
17976
|
+
iterate(params?: Omit<ListParams$3, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Location, void, undefined>;
|
|
17977
|
+
toArray(params?: Omit<ListParams$3, 'cursor'>, options?: PaginateOptions & {
|
|
17918
17978
|
limit?: number;
|
|
17919
17979
|
}): Promise<Location[]>;
|
|
17920
17980
|
get(id: string): Promise<DataResponse<Location>>;
|
|
17921
|
-
create(body: CreateBody$
|
|
17922
|
-
update(id: string, body: UpdateBody$
|
|
17981
|
+
create(body: CreateBody$3, options?: ResourceRequestOptions): Promise<DataResponse<Location>>;
|
|
17982
|
+
update(id: string, body: UpdateBody$3): Promise<DataResponse<Location>>;
|
|
17923
17983
|
delete(id: string): Promise<void>;
|
|
17924
17984
|
setDefault(id: string): Promise<DataResponse<Location>>;
|
|
17925
17985
|
transfer(id: string, body: TransferBody): Promise<DataResponse<TransferResult>>;
|
|
@@ -17985,42 +18045,63 @@ declare class IntegrationsResource {
|
|
|
17985
18045
|
}
|
|
17986
18046
|
|
|
17987
18047
|
type Post = components['schemas']['Post'];
|
|
17988
|
-
type ListParams$
|
|
17989
|
-
type CreateBody$
|
|
17990
|
-
type UpdateBody$
|
|
18048
|
+
type ListParams$2 = NonNullable<operations['listPosts']['parameters']['query']>;
|
|
18049
|
+
type CreateBody$2 = NonNullable<operations['createPost']['requestBody']>['content']['application/json'];
|
|
18050
|
+
type UpdateBody$2 = NonNullable<operations['updatePost']['requestBody']>['content']['application/json'];
|
|
17991
18051
|
type AddCategoriesBody = NonNullable<operations['addPostCategories']['requestBody']>['content']['application/json'];
|
|
17992
18052
|
declare class PostsResource {
|
|
17993
18053
|
private client;
|
|
17994
18054
|
constructor(client: Hydra);
|
|
17995
|
-
list(params?: ListParams$
|
|
17996
|
-
iterate(params?: Omit<ListParams$
|
|
17997
|
-
toArray(params?: Omit<ListParams$
|
|
18055
|
+
list(params?: ListParams$2): Promise<ListResponse<Post>>;
|
|
18056
|
+
iterate(params?: Omit<ListParams$2, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Post, void, undefined>;
|
|
18057
|
+
toArray(params?: Omit<ListParams$2, 'cursor'>, options?: PaginateOptions & {
|
|
17998
18058
|
limit?: number;
|
|
17999
18059
|
}): Promise<Post[]>;
|
|
18000
|
-
get(id: string, params?: Pick<ListParams$
|
|
18001
|
-
create(body: CreateBody$
|
|
18002
|
-
update(id: string, body: UpdateBody$
|
|
18060
|
+
get(id: string, params?: Pick<ListParams$2, 'expand' | 'fields'>): Promise<DataResponse<Post>>;
|
|
18061
|
+
create(body: CreateBody$2, options?: ResourceRequestOptions): Promise<DataResponse<Post>>;
|
|
18062
|
+
update(id: string, body: UpdateBody$2): Promise<DataResponse<Post>>;
|
|
18003
18063
|
delete(id: string): Promise<void>;
|
|
18004
18064
|
addCategories(postId: string, body: AddCategoriesBody): Promise<DataResponse<Post>>;
|
|
18005
18065
|
removeCategory(postId: string, categoryId: string): Promise<void>;
|
|
18006
18066
|
}
|
|
18007
18067
|
|
|
18008
18068
|
type ContentCategory = components['schemas']['ContentCategory'];
|
|
18009
|
-
type ListParams = NonNullable<operations['listContentCategories']['parameters']['query']>;
|
|
18010
|
-
type CreateBody = NonNullable<operations['createContentCategory']['requestBody']>['content']['application/json'];
|
|
18011
|
-
type UpdateBody = NonNullable<operations['updateContentCategory']['requestBody']>['content']['application/json'];
|
|
18069
|
+
type ListParams$1 = NonNullable<operations['listContentCategories']['parameters']['query']>;
|
|
18070
|
+
type CreateBody$1 = NonNullable<operations['createContentCategory']['requestBody']>['content']['application/json'];
|
|
18071
|
+
type UpdateBody$1 = NonNullable<operations['updateContentCategory']['requestBody']>['content']['application/json'];
|
|
18012
18072
|
declare class ContentCategoriesResource {
|
|
18013
18073
|
private client;
|
|
18014
18074
|
constructor(client: Hydra);
|
|
18015
|
-
list(params?: ListParams): Promise<ListResponse<ContentCategory>>;
|
|
18016
|
-
iterate(params?: Omit<ListParams, 'cursor'>, options?: PaginateOptions): AsyncGenerator<ContentCategory, void, undefined>;
|
|
18017
|
-
toArray(params?: Omit<ListParams, 'cursor'>, options?: PaginateOptions & {
|
|
18075
|
+
list(params?: ListParams$1): Promise<ListResponse<ContentCategory>>;
|
|
18076
|
+
iterate(params?: Omit<ListParams$1, 'cursor'>, options?: PaginateOptions): AsyncGenerator<ContentCategory, void, undefined>;
|
|
18077
|
+
toArray(params?: Omit<ListParams$1, 'cursor'>, options?: PaginateOptions & {
|
|
18018
18078
|
limit?: number;
|
|
18019
18079
|
}): Promise<ContentCategory[]>;
|
|
18020
18080
|
get(id: string): Promise<DataResponse<ContentCategory>>;
|
|
18021
|
-
create(body: CreateBody, options?: ResourceRequestOptions): Promise<DataResponse<ContentCategory>>;
|
|
18022
|
-
update(id: string, body: UpdateBody): Promise<DataResponse<ContentCategory>>;
|
|
18081
|
+
create(body: CreateBody$1, options?: ResourceRequestOptions): Promise<DataResponse<ContentCategory>>;
|
|
18082
|
+
update(id: string, body: UpdateBody$1): Promise<DataResponse<ContentCategory>>;
|
|
18083
|
+
delete(id: string): Promise<void>;
|
|
18084
|
+
}
|
|
18085
|
+
|
|
18086
|
+
type MembershipPlan = components['schemas']['MembershipPlan'];
|
|
18087
|
+
type CustomerMembership = components['schemas']['CustomerMembership'];
|
|
18088
|
+
type ListParams = NonNullable<operations['listMembershipPlans']['parameters']['query']>;
|
|
18089
|
+
type CreateBody = NonNullable<operations['createMembershipPlan']['requestBody']>['content']['application/json'];
|
|
18090
|
+
type UpdateBody = NonNullable<operations['updateMembershipPlan']['requestBody']>['content']['application/json'];
|
|
18091
|
+
type SubscriptionListParams = NonNullable<operations['listMembershipSubscriptions']['parameters']['query']>;
|
|
18092
|
+
declare class MembershipPlansResource {
|
|
18093
|
+
private client;
|
|
18094
|
+
constructor(client: Hydra);
|
|
18095
|
+
list(params?: ListParams): Promise<ListResponse<MembershipPlan>>;
|
|
18096
|
+
iterate(params?: Omit<ListParams, 'cursor'>, options?: PaginateOptions): AsyncGenerator<MembershipPlan, void, undefined>;
|
|
18097
|
+
toArray(params?: Omit<ListParams, 'cursor'>, options?: PaginateOptions & {
|
|
18098
|
+
limit?: number;
|
|
18099
|
+
}): Promise<MembershipPlan[]>;
|
|
18100
|
+
get(id: string): Promise<DataResponse<MembershipPlan>>;
|
|
18101
|
+
create(body: CreateBody, options?: ResourceRequestOptions): Promise<DataResponse<MembershipPlan>>;
|
|
18102
|
+
update(id: string, body: UpdateBody): Promise<DataResponse<MembershipPlan>>;
|
|
18023
18103
|
delete(id: string): Promise<void>;
|
|
18104
|
+
listSubscriptions(params?: SubscriptionListParams): Promise<ListResponse<CustomerMembership>>;
|
|
18024
18105
|
}
|
|
18025
18106
|
|
|
18026
18107
|
interface AppInfo {
|
|
@@ -18101,6 +18182,7 @@ declare class Hydra {
|
|
|
18101
18182
|
readonly integrations: IntegrationsResource;
|
|
18102
18183
|
readonly posts: PostsResource;
|
|
18103
18184
|
readonly contentCategories: ContentCategoriesResource;
|
|
18185
|
+
readonly membershipPlans: MembershipPlansResource;
|
|
18104
18186
|
constructor(config: HydraConfig);
|
|
18105
18187
|
request<T>(method: string, path: string, options?: RequestOptions): Promise<T>;
|
|
18106
18188
|
/** Multipart upload for file-based endpoints (e.g. images) */
|
|
@@ -18182,4 +18264,4 @@ declare class HydraIdempotencyError extends HydraError {
|
|
|
18182
18264
|
constructor(body: HydraErrorBody, headers: Headers);
|
|
18183
18265
|
}
|
|
18184
18266
|
|
|
18185
|
-
export { AddressesResource, type AnalyticsActionItems$1 as AnalyticsActionItems, type AnalyticsOrdersSeries$1 as AnalyticsOrdersSeries, AnalyticsResource, type AnalyticsSummary$1 as AnalyticsSummary, type AnalyticsTimeSeries$1 as AnalyticsTimeSeries, type AnalyticsTopProduct$1 as AnalyticsTopProduct, type AppInfo, type Cart$1 as Cart, type CartItem, CartResource, type CheckoutCreate$1 as CheckoutCreate, type CheckoutGet$1 as CheckoutGet, type CheckoutListItem$1 as CheckoutListItem, CheckoutResource, CheckoutsResource, type Collection$1 as Collection, CollectionsResource, CompaniesResource, type Company$1 as Company, ContentCategoriesResource, type ContentCategory$1 as ContentCategory, type Customer$1 as Customer, type CustomerGroup$1 as CustomerGroup, CustomerGroupsResource, CustomersResource, type DataResponse, type Discount$1 as Discount, DiscountsResource, type DraftOrder$1 as DraftOrder, DraftOrdersResource, type ExchangeRate$1 as ExchangeRate, ExchangeRatesResource, type Fulfillment$1 as Fulfillment, type FulfillmentOrder$2 as FulfillmentOrder, FulfillmentOrdersResource, FulfillmentsResource, type GenerateVariantsResult$1 as GenerateVariantsResult, Hydra, HydraAuthenticationError, type HydraConfig, HydraConnectionError, HydraError, type HydraErrorBody, HydraIdempotencyError, HydraNotFoundError, HydraPermissionError, HydraRateLimitError, HydraValidationError, type Image$2 as Image, ImagesResource, IntegrationsResource, type InventoryLevel$1 as InventoryLevel, InventoryResource, type ListResponse, type Location$1 as Location, LocationsResource, MetafieldsResource, type NotificationLog$1 as NotificationLog, NotificationsResource, type Order$2 as Order, OrdersResource, type PaginateOptions, type Pagination, type Post$1 as Post, PostsResource, type Product$1 as Product, type ProductStats$1 as ProductStats, ProductsResource, type Promotion$1 as Promotion, PromotionsResource, type PurchaseOrder$1 as PurchaseOrder, PurchaseOrdersResource, type Redirect$1 as Redirect, RedirectsResource, type Refund$1 as Refund, RefundsResource, type RequestOptions, type ResourceRequestOptions, type Return$1 as Return, ReturnsResource, SearchResource, type ShippingRate$1 as ShippingRate, ShippingResource, type ShippingZone$1 as ShippingZone, type Store$1 as Store, StoreCreditResource, StoreResource, type Tag$1 as Tag, TagsResource, type TaxExemption$1 as TaxExemption, type TaxGroup$1 as TaxGroup, type TaxRate$1 as TaxRate, TaxResource, type Variant$2 as Variant, type VariantPrice$1 as VariantPrice, VariantsResource, type Webhook$1 as Webhook, WebhooksResource, paginate, toArray };
|
|
18267
|
+
export { AddressesResource, type AnalyticsActionItems$1 as AnalyticsActionItems, type AnalyticsOrdersSeries$1 as AnalyticsOrdersSeries, AnalyticsResource, type AnalyticsSummary$1 as AnalyticsSummary, type AnalyticsTimeSeries$1 as AnalyticsTimeSeries, type AnalyticsTopProduct$1 as AnalyticsTopProduct, type AppInfo, type Cart$1 as Cart, type CartItem, CartResource, type CheckoutCreate$1 as CheckoutCreate, type CheckoutGet$1 as CheckoutGet, type CheckoutListItem$1 as CheckoutListItem, CheckoutResource, CheckoutsResource, type Collection$1 as Collection, CollectionsResource, CompaniesResource, type Company$1 as Company, ContentCategoriesResource, type ContentCategory$1 as ContentCategory, type Customer$1 as Customer, type CustomerGroup$1 as CustomerGroup, CustomerGroupsResource, type CustomerMembership$1 as CustomerMembership, CustomersResource, type DataResponse, type Discount$1 as Discount, DiscountsResource, type DraftOrder$1 as DraftOrder, DraftOrdersResource, type ExchangeRate$1 as ExchangeRate, ExchangeRatesResource, type Fulfillment$1 as Fulfillment, type FulfillmentOrder$2 as FulfillmentOrder, FulfillmentOrdersResource, FulfillmentsResource, type GenerateVariantsResult$1 as GenerateVariantsResult, Hydra, HydraAuthenticationError, type HydraConfig, HydraConnectionError, HydraError, type HydraErrorBody, HydraIdempotencyError, HydraNotFoundError, HydraPermissionError, HydraRateLimitError, HydraValidationError, type Image$2 as Image, ImagesResource, IntegrationsResource, type InventoryLevel$1 as InventoryLevel, InventoryResource, type ListResponse, type Location$1 as Location, LocationsResource, type MembershipPlan$1 as MembershipPlan, MembershipPlansResource, MetafieldsResource, type NotificationLog$1 as NotificationLog, NotificationsResource, type Order$2 as Order, OrdersResource, type PaginateOptions, type Pagination, type Post$1 as Post, PostsResource, type Product$1 as Product, type ProductStats$1 as ProductStats, ProductsResource, type Promotion$1 as Promotion, PromotionsResource, type PurchaseOrder$1 as PurchaseOrder, PurchaseOrdersResource, type Redirect$1 as Redirect, RedirectsResource, type Refund$1 as Refund, RefundsResource, type RequestOptions, type ResourceRequestOptions, type Return$1 as Return, ReturnsResource, SearchResource, type ShippingRate$1 as ShippingRate, ShippingResource, type ShippingZone$1 as ShippingZone, type Store$1 as Store, StoreCreditResource, StoreResource, type Tag$1 as Tag, TagsResource, type TaxExemption$1 as TaxExemption, type TaxGroup$1 as TaxGroup, type TaxRate$1 as TaxRate, TaxResource, type Variant$2 as Variant, type VariantPrice$1 as VariantPrice, VariantsResource, type Webhook$1 as Webhook, WebhooksResource, paginate, toArray };
|
package/dist/index.js
CHANGED
|
@@ -1478,6 +1478,38 @@ var ContentCategoriesResource = class {
|
|
|
1478
1478
|
}
|
|
1479
1479
|
};
|
|
1480
1480
|
|
|
1481
|
+
// src/resources/membership-plans.ts
|
|
1482
|
+
var MembershipPlansResource = class {
|
|
1483
|
+
constructor(client) {
|
|
1484
|
+
this.client = client;
|
|
1485
|
+
}
|
|
1486
|
+
client;
|
|
1487
|
+
async list(params) {
|
|
1488
|
+
return this.client.request("GET", "/v1/membership-plans", { params });
|
|
1489
|
+
}
|
|
1490
|
+
iterate(params, options) {
|
|
1491
|
+
return paginate((cursor) => this.list({ ...params, cursor }), options);
|
|
1492
|
+
}
|
|
1493
|
+
async toArray(params, options) {
|
|
1494
|
+
return toArray(this.iterate(params, options), options);
|
|
1495
|
+
}
|
|
1496
|
+
async get(id) {
|
|
1497
|
+
return this.client.request("GET", `/v1/membership-plans/${id}`);
|
|
1498
|
+
}
|
|
1499
|
+
async create(body, options) {
|
|
1500
|
+
return this.client.request("POST", "/v1/membership-plans", { body, ...options });
|
|
1501
|
+
}
|
|
1502
|
+
async update(id, body) {
|
|
1503
|
+
return this.client.request("PATCH", `/v1/membership-plans/${id}`, { body });
|
|
1504
|
+
}
|
|
1505
|
+
async delete(id) {
|
|
1506
|
+
return this.client.request("DELETE", `/v1/membership-plans/${id}`);
|
|
1507
|
+
}
|
|
1508
|
+
async listSubscriptions(params) {
|
|
1509
|
+
return this.client.request("GET", "/v1/membership-plans/subscriptions", { params });
|
|
1510
|
+
}
|
|
1511
|
+
};
|
|
1512
|
+
|
|
1481
1513
|
// src/client.ts
|
|
1482
1514
|
var SDK_VERSION = "0.1.0";
|
|
1483
1515
|
var INITIAL_RETRY_DELAY = 0.5;
|
|
@@ -1554,6 +1586,8 @@ var Hydra = class {
|
|
|
1554
1586
|
// P7: Content
|
|
1555
1587
|
posts = new PostsResource(this);
|
|
1556
1588
|
contentCategories = new ContentCategoriesResource(this);
|
|
1589
|
+
// P8: Subscriptions
|
|
1590
|
+
membershipPlans = new MembershipPlansResource(this);
|
|
1557
1591
|
constructor(config) {
|
|
1558
1592
|
for (const key of Object.keys(config)) {
|
|
1559
1593
|
if (!VALID_CONFIG_KEYS.has(key)) {
|
|
@@ -1788,6 +1822,7 @@ export {
|
|
|
1788
1822
|
IntegrationsResource,
|
|
1789
1823
|
InventoryResource,
|
|
1790
1824
|
LocationsResource,
|
|
1825
|
+
MembershipPlansResource,
|
|
1791
1826
|
MetafieldsResource,
|
|
1792
1827
|
NotificationsResource,
|
|
1793
1828
|
OrdersResource,
|