@gethydra/sdk 0.1.6 → 0.1.8
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 +256 -204
- package/dist/index.js +35 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2323,6 +2323,10 @@ interface components {
|
|
|
2323
2323
|
type: "product" | "collection" | "product_type";
|
|
2324
2324
|
/** @example prod_abc123 */
|
|
2325
2325
|
id?: string;
|
|
2326
|
+
/** @example classic-cotton-t-shirt */
|
|
2327
|
+
handle?: string;
|
|
2328
|
+
/** @example https://cdn.hydrajs.dev/images/product.webp */
|
|
2329
|
+
image?: string;
|
|
2326
2330
|
}[];
|
|
2327
2331
|
};
|
|
2328
2332
|
InventoryLevel: {
|
|
@@ -2863,6 +2867,10 @@ interface components {
|
|
|
2863
2867
|
plan?: components["schemas"]["MembershipPlan"] & unknown;
|
|
2864
2868
|
/** @example cus_abc123 */
|
|
2865
2869
|
customer_id: string;
|
|
2870
|
+
/** @example john@example.com */
|
|
2871
|
+
customer_email: string | null;
|
|
2872
|
+
/** @example John Doe */
|
|
2873
|
+
customer_name: string | null;
|
|
2866
2874
|
/** @example sub_1abc */
|
|
2867
2875
|
stripe_subscription_id: string | null;
|
|
2868
2876
|
/** @example active */
|
|
@@ -16829,6 +16837,26 @@ interface operations {
|
|
|
16829
16837
|
};
|
|
16830
16838
|
};
|
|
16831
16839
|
};
|
|
16840
|
+
getCustomerOrderInvoice: {
|
|
16841
|
+
parameters: {
|
|
16842
|
+
query?: never;
|
|
16843
|
+
header?: never;
|
|
16844
|
+
path: {
|
|
16845
|
+
id: string;
|
|
16846
|
+
};
|
|
16847
|
+
cookie?: never;
|
|
16848
|
+
};
|
|
16849
|
+
requestBody?: never;
|
|
16850
|
+
responses: {
|
|
16851
|
+
/** @description PDF invoice binary */
|
|
16852
|
+
200: {
|
|
16853
|
+
headers: {
|
|
16854
|
+
[name: string]: unknown;
|
|
16855
|
+
};
|
|
16856
|
+
content?: never;
|
|
16857
|
+
};
|
|
16858
|
+
};
|
|
16859
|
+
};
|
|
16832
16860
|
getAnalyticsSummary: {
|
|
16833
16861
|
parameters: {
|
|
16834
16862
|
query?: {
|
|
@@ -17107,6 +17135,8 @@ type AnalyticsTopProduct$1 = components['schemas']['AnalyticsTopProduct'];
|
|
|
17107
17135
|
type AnalyticsActionItems$1 = components['schemas']['AnalyticsActionItems'];
|
|
17108
17136
|
type Post$1 = components['schemas']['Post'];
|
|
17109
17137
|
type ContentCategory$1 = components['schemas']['ContentCategory'];
|
|
17138
|
+
type MembershipPlan$1 = components['schemas']['MembershipPlan'];
|
|
17139
|
+
type CustomerMembership$1 = components['schemas']['CustomerMembership'];
|
|
17110
17140
|
interface Pagination {
|
|
17111
17141
|
cursor: string | null;
|
|
17112
17142
|
has_more: boolean;
|
|
@@ -17151,9 +17181,9 @@ type ProductStats = components['schemas']['ProductStats'];
|
|
|
17151
17181
|
type Variant$1 = components['schemas']['Variant'];
|
|
17152
17182
|
type Image$1 = components['schemas']['Image'];
|
|
17153
17183
|
type GenerateVariantsResult = components['schemas']['GenerateVariantsResult'];
|
|
17154
|
-
type ListParams$
|
|
17155
|
-
type CreateBody$
|
|
17156
|
-
type UpdateBody$
|
|
17184
|
+
type ListParams$r = NonNullable<operations['listProducts']['parameters']['query']>;
|
|
17185
|
+
type CreateBody$n = NonNullable<operations['createProduct']['requestBody']>['content']['application/json'];
|
|
17186
|
+
type UpdateBody$n = NonNullable<operations['updateProduct']['requestBody']>['content']['application/json'];
|
|
17157
17187
|
type DuplicateBody = NonNullable<operations['duplicateProduct']['requestBody']>['content']['application/json'];
|
|
17158
17188
|
type CreateVariantBody = NonNullable<operations['createProductVariant']['requestBody']>['content']['application/json'];
|
|
17159
17189
|
type GenerateVariantsBody = NonNullable<operations['generateProductVariants']['requestBody']>['content']['application/json'];
|
|
@@ -17163,17 +17193,17 @@ type CreateProductLinkBody = NonNullable<operations['createProductLink']['reques
|
|
|
17163
17193
|
declare class ProductsResource {
|
|
17164
17194
|
private client;
|
|
17165
17195
|
constructor(client: Hydra);
|
|
17166
|
-
list(params?: ListParams$
|
|
17167
|
-
iterate(params?: Omit<ListParams$
|
|
17168
|
-
toArray(params?: Omit<ListParams$
|
|
17196
|
+
list(params?: ListParams$r): Promise<ListResponse<Product>>;
|
|
17197
|
+
iterate(params?: Omit<ListParams$r, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Product, void, undefined>;
|
|
17198
|
+
toArray(params?: Omit<ListParams$r, 'cursor'>, options?: PaginateOptions & {
|
|
17169
17199
|
limit?: number;
|
|
17170
17200
|
}): Promise<Product[]>;
|
|
17171
|
-
get(id: string, params?: Pick<ListParams$
|
|
17172
|
-
create(body: CreateBody$
|
|
17173
|
-
update(id: string, body: UpdateBody$
|
|
17201
|
+
get(id: string, params?: Pick<ListParams$r, 'expand' | 'currency' | 'fields'>): Promise<DataResponse<Product>>;
|
|
17202
|
+
create(body: CreateBody$n, options?: ResourceRequestOptions): Promise<DataResponse<Product>>;
|
|
17203
|
+
update(id: string, body: UpdateBody$n): Promise<DataResponse<Product>>;
|
|
17174
17204
|
delete(id: string): Promise<void>;
|
|
17175
17205
|
batchCreate(body: {
|
|
17176
|
-
products: CreateBody$
|
|
17206
|
+
products: CreateBody$n[];
|
|
17177
17207
|
}, options?: ResourceRequestOptions): Promise<DataResponse<Product[]>>;
|
|
17178
17208
|
duplicate(id: string, body: DuplicateBody): Promise<DataResponse<Product>>;
|
|
17179
17209
|
getStats(id: string): Promise<DataResponse<ProductStats>>;
|
|
@@ -17194,7 +17224,7 @@ declare class ProductsResource {
|
|
|
17194
17224
|
|
|
17195
17225
|
type Variant = components['schemas']['Variant'];
|
|
17196
17226
|
type VariantPrice = components['schemas']['VariantPrice'];
|
|
17197
|
-
type UpdateBody$
|
|
17227
|
+
type UpdateBody$m = NonNullable<operations['updateVariant']['requestBody']>['content']['application/json'];
|
|
17198
17228
|
type UpsertPriceBody = NonNullable<operations['upsertVariantPrice']['requestBody']>['content']['application/json'];
|
|
17199
17229
|
declare class VariantsResource {
|
|
17200
17230
|
private client;
|
|
@@ -17204,7 +17234,7 @@ declare class VariantsResource {
|
|
|
17204
17234
|
currency?: string;
|
|
17205
17235
|
fields?: string;
|
|
17206
17236
|
}): Promise<DataResponse<Variant>>;
|
|
17207
|
-
update(id: string, body: UpdateBody$
|
|
17237
|
+
update(id: string, body: UpdateBody$m): Promise<DataResponse<Variant>>;
|
|
17208
17238
|
delete(id: string): Promise<void>;
|
|
17209
17239
|
listPrices(variantId: string): Promise<DataResponse<Record<string, VariantPrice>>>;
|
|
17210
17240
|
upsertPrice(variantId: string, priceKeySlug: string, body: UpsertPriceBody): Promise<DataResponse<VariantPrice>>;
|
|
@@ -17216,23 +17246,23 @@ declare class VariantsResource {
|
|
|
17216
17246
|
}
|
|
17217
17247
|
|
|
17218
17248
|
type Collection = components['schemas']['Collection'];
|
|
17219
|
-
type ListParams$
|
|
17220
|
-
type CreateBody$
|
|
17221
|
-
type UpdateBody$
|
|
17249
|
+
type ListParams$q = NonNullable<operations['listCollections']['parameters']['query']>;
|
|
17250
|
+
type CreateBody$m = NonNullable<operations['createCollection']['requestBody']>['content']['application/json'];
|
|
17251
|
+
type UpdateBody$l = NonNullable<operations['updateCollection']['requestBody']>['content']['application/json'];
|
|
17222
17252
|
type AddProductsBody = NonNullable<operations['addCollectionProducts']['requestBody']>['content']['application/json'];
|
|
17223
17253
|
type ReorderProductsBody = NonNullable<operations['reorderCollectionProducts']['requestBody']>['content']['application/json'];
|
|
17224
17254
|
type ReorderCollectionsBody = NonNullable<operations['reorderCollections']['requestBody']>['content']['application/json'];
|
|
17225
17255
|
declare class CollectionsResource {
|
|
17226
17256
|
private client;
|
|
17227
17257
|
constructor(client: Hydra);
|
|
17228
|
-
list(params?: ListParams$
|
|
17229
|
-
iterate(params?: Omit<ListParams$
|
|
17230
|
-
toArray(params?: Omit<ListParams$
|
|
17258
|
+
list(params?: ListParams$q): Promise<ListResponse<Collection>>;
|
|
17259
|
+
iterate(params?: Omit<ListParams$q, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Collection, void, undefined>;
|
|
17260
|
+
toArray(params?: Omit<ListParams$q, 'cursor'>, options?: PaginateOptions & {
|
|
17231
17261
|
limit?: number;
|
|
17232
17262
|
}): Promise<Collection[]>;
|
|
17233
|
-
get(id: string, params?: Pick<ListParams$
|
|
17234
|
-
create(body: CreateBody$
|
|
17235
|
-
update(id: string, body: UpdateBody$
|
|
17263
|
+
get(id: string, params?: Pick<ListParams$q, 'expand' | 'fields'>): Promise<DataResponse<Collection>>;
|
|
17264
|
+
create(body: CreateBody$m, options?: ResourceRequestOptions): Promise<DataResponse<Collection>>;
|
|
17265
|
+
update(id: string, body: UpdateBody$l): Promise<DataResponse<Collection>>;
|
|
17236
17266
|
delete(id: string): Promise<void>;
|
|
17237
17267
|
tree(): Promise<DataResponse<unknown>>;
|
|
17238
17268
|
reorder(body: ReorderCollectionsBody): Promise<void>;
|
|
@@ -17262,13 +17292,13 @@ declare class CartResource {
|
|
|
17262
17292
|
|
|
17263
17293
|
type CheckoutCreate = components['schemas']['CheckoutCreate'];
|
|
17264
17294
|
type CheckoutGet = components['schemas']['CheckoutGet'];
|
|
17265
|
-
type CreateBody$
|
|
17295
|
+
type CreateBody$l = NonNullable<operations['createCheckout']['requestBody']>['content']['application/json'];
|
|
17266
17296
|
type ApplyDiscountBody = NonNullable<operations['applyCheckoutDiscount']['requestBody']>['content']['application/json'];
|
|
17267
17297
|
type ApplyCreditBody = NonNullable<operations['applyCheckoutCredit']['requestBody']>['content']['application/json'];
|
|
17268
17298
|
declare class CheckoutResource {
|
|
17269
17299
|
private client;
|
|
17270
17300
|
constructor(client: Hydra);
|
|
17271
|
-
create(body: CreateBody$
|
|
17301
|
+
create(body: CreateBody$l, options?: ResourceRequestOptions): Promise<DataResponse<CheckoutCreate>>;
|
|
17272
17302
|
get(id: string): Promise<DataResponse<CheckoutGet>>;
|
|
17273
17303
|
applyDiscount(checkoutId: string, body: ApplyDiscountBody): Promise<DataResponse<CheckoutGet>>;
|
|
17274
17304
|
removeDiscount(checkoutId: string): Promise<DataResponse<CheckoutGet>>;
|
|
@@ -17279,15 +17309,15 @@ declare class CheckoutResource {
|
|
|
17279
17309
|
|
|
17280
17310
|
type Order$1 = components['schemas']['Order'];
|
|
17281
17311
|
type FulfillmentOrder$1 = components['schemas']['FulfillmentOrder'];
|
|
17282
|
-
type ListParams$
|
|
17283
|
-
type CreateBody$
|
|
17284
|
-
type UpdateBody$
|
|
17312
|
+
type ListParams$p = NonNullable<operations['listOrders']['parameters']['query']>;
|
|
17313
|
+
type CreateBody$k = NonNullable<operations['createOrder']['requestBody']>['content']['application/json'];
|
|
17314
|
+
type UpdateBody$k = NonNullable<operations['updateOrder']['requestBody']>['content']['application/json'];
|
|
17285
17315
|
declare class OrdersResource {
|
|
17286
17316
|
private client;
|
|
17287
17317
|
constructor(client: Hydra);
|
|
17288
|
-
list(params?: ListParams$
|
|
17289
|
-
iterate(params?: Omit<ListParams$
|
|
17290
|
-
toArray(params?: Omit<ListParams$
|
|
17318
|
+
list(params?: ListParams$p): Promise<ListResponse<Order$1>>;
|
|
17319
|
+
iterate(params?: Omit<ListParams$p, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Order$1, void, undefined>;
|
|
17320
|
+
toArray(params?: Omit<ListParams$p, 'cursor'>, options?: PaginateOptions & {
|
|
17291
17321
|
limit?: number;
|
|
17292
17322
|
}): Promise<Order$1[]>;
|
|
17293
17323
|
get(id: string, params?: {
|
|
@@ -17295,8 +17325,8 @@ declare class OrdersResource {
|
|
|
17295
17325
|
currency?: string;
|
|
17296
17326
|
fields?: string;
|
|
17297
17327
|
}): Promise<DataResponse<Order$1>>;
|
|
17298
|
-
create(body: CreateBody$
|
|
17299
|
-
update(id: string, body: UpdateBody$
|
|
17328
|
+
create(body: CreateBody$k, options?: ResourceRequestOptions): Promise<DataResponse<Order$1>>;
|
|
17329
|
+
update(id: string, body: UpdateBody$k): Promise<DataResponse<Order$1>>;
|
|
17300
17330
|
listFulfillmentOrders(orderId: string): Promise<DataResponse<FulfillmentOrder$1[]>>;
|
|
17301
17331
|
/**
|
|
17302
17332
|
* Returns the API path for downloading the invoice PDF for an order.
|
|
@@ -17310,34 +17340,34 @@ declare class OrdersResource {
|
|
|
17310
17340
|
}
|
|
17311
17341
|
|
|
17312
17342
|
type Fulfillment = components['schemas']['Fulfillment'];
|
|
17313
|
-
type CreateBody$
|
|
17314
|
-
type UpdateBody$
|
|
17343
|
+
type CreateBody$j = NonNullable<operations['createFulfillment']['requestBody']>['content']['application/json'];
|
|
17344
|
+
type UpdateBody$j = NonNullable<operations['updateFulfillment']['requestBody']>['content']['application/json'];
|
|
17315
17345
|
type CancelBody = NonNullable<operations['cancelFulfillment']['requestBody']>['content']['application/json'];
|
|
17316
17346
|
declare class FulfillmentsResource {
|
|
17317
17347
|
private client;
|
|
17318
17348
|
constructor(client: Hydra);
|
|
17319
17349
|
/** Create a fulfillment for a fulfillment order */
|
|
17320
|
-
create(fulfillmentOrderId: string, body: CreateBody$
|
|
17321
|
-
update(id: string, body: UpdateBody$
|
|
17350
|
+
create(fulfillmentOrderId: string, body: CreateBody$j, options?: ResourceRequestOptions): Promise<DataResponse<Fulfillment>>;
|
|
17351
|
+
update(id: string, body: UpdateBody$j): Promise<DataResponse<Fulfillment>>;
|
|
17322
17352
|
cancel(id: string, body?: CancelBody): Promise<DataResponse<Fulfillment>>;
|
|
17323
17353
|
}
|
|
17324
17354
|
|
|
17325
17355
|
type Refund = components['schemas']['Refund'];
|
|
17326
|
-
type ListParams$
|
|
17327
|
-
type CreateBody$
|
|
17356
|
+
type ListParams$o = NonNullable<operations['listRefunds']['parameters']['query']>;
|
|
17357
|
+
type CreateBody$i = NonNullable<operations['createOrderRefund']['requestBody']>['content']['application/json'];
|
|
17328
17358
|
declare class RefundsResource {
|
|
17329
17359
|
private client;
|
|
17330
17360
|
constructor(client: Hydra);
|
|
17331
|
-
list(params?: ListParams$
|
|
17332
|
-
iterate(params?: Omit<ListParams$
|
|
17333
|
-
toArray(params?: Omit<ListParams$
|
|
17361
|
+
list(params?: ListParams$o): Promise<ListResponse<Refund>>;
|
|
17362
|
+
iterate(params?: Omit<ListParams$o, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Refund, void, undefined>;
|
|
17363
|
+
toArray(params?: Omit<ListParams$o, 'cursor'>, options?: PaginateOptions & {
|
|
17334
17364
|
limit?: number;
|
|
17335
17365
|
}): Promise<Refund[]>;
|
|
17336
17366
|
get(id: string, params?: {
|
|
17337
17367
|
expand?: string;
|
|
17338
17368
|
fields?: string;
|
|
17339
17369
|
}): Promise<DataResponse<Refund>>;
|
|
17340
|
-
create(orderId: string, body: CreateBody$
|
|
17370
|
+
create(orderId: string, body: CreateBody$i, options?: ResourceRequestOptions): Promise<DataResponse<Refund>>;
|
|
17341
17371
|
listByOrder(orderId: string): Promise<DataResponse<Refund[]>>;
|
|
17342
17372
|
retry(id: string): Promise<DataResponse<Refund>>;
|
|
17343
17373
|
/**
|
|
@@ -17348,24 +17378,24 @@ declare class RefundsResource {
|
|
|
17348
17378
|
}
|
|
17349
17379
|
|
|
17350
17380
|
type Return = components['schemas']['Return'];
|
|
17351
|
-
type ListParams$
|
|
17352
|
-
type CreateBody$
|
|
17381
|
+
type ListParams$n = NonNullable<operations['listReturns']['parameters']['query']>;
|
|
17382
|
+
type CreateBody$h = NonNullable<operations['createOrderReturn']['requestBody']>['content']['application/json'];
|
|
17353
17383
|
type ApproveBody = NonNullable<operations['approveReturn']['requestBody']>['content']['application/json'];
|
|
17354
17384
|
type ReceiveBody$1 = NonNullable<operations['receiveReturn']['requestBody']>['content']['application/json'];
|
|
17355
17385
|
type RejectBody = NonNullable<operations['rejectReturn']['requestBody']>['content']['application/json'];
|
|
17356
17386
|
declare class ReturnsResource {
|
|
17357
17387
|
private client;
|
|
17358
17388
|
constructor(client: Hydra);
|
|
17359
|
-
list(params?: ListParams$
|
|
17360
|
-
iterate(params?: Omit<ListParams$
|
|
17361
|
-
toArray(params?: Omit<ListParams$
|
|
17389
|
+
list(params?: ListParams$n): Promise<ListResponse<Return>>;
|
|
17390
|
+
iterate(params?: Omit<ListParams$n, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Return, void, undefined>;
|
|
17391
|
+
toArray(params?: Omit<ListParams$n, 'cursor'>, options?: PaginateOptions & {
|
|
17362
17392
|
limit?: number;
|
|
17363
17393
|
}): Promise<Return[]>;
|
|
17364
17394
|
get(id: string, params?: {
|
|
17365
17395
|
expand?: string;
|
|
17366
17396
|
fields?: string;
|
|
17367
17397
|
}): Promise<DataResponse<Return>>;
|
|
17368
|
-
create(orderId: string, body: CreateBody$
|
|
17398
|
+
create(orderId: string, body: CreateBody$h, options?: ResourceRequestOptions): Promise<DataResponse<Return>>;
|
|
17369
17399
|
listByOrder(orderId: string): Promise<DataResponse<Return[]>>;
|
|
17370
17400
|
approve(id: string, body?: ApproveBody): Promise<DataResponse<Return>>;
|
|
17371
17401
|
receive(id: string, body?: ReceiveBody$1): Promise<DataResponse<Return>>;
|
|
@@ -17377,17 +17407,17 @@ declare class ReturnsResource {
|
|
|
17377
17407
|
type DraftOrder = components['schemas']['DraftOrder'];
|
|
17378
17408
|
type DraftOrderLineItem = components['schemas']['DraftOrderLineItem'];
|
|
17379
17409
|
type Order = components['schemas']['Order'];
|
|
17380
|
-
type ListParams$
|
|
17381
|
-
type CreateBody$
|
|
17382
|
-
type UpdateBody$
|
|
17410
|
+
type ListParams$m = NonNullable<operations['listDraftOrders']['parameters']['query']>;
|
|
17411
|
+
type CreateBody$g = NonNullable<operations['createDraftOrder']['requestBody']>['content']['application/json'];
|
|
17412
|
+
type UpdateBody$i = NonNullable<operations['updateDraftOrder']['requestBody']>['content']['application/json'];
|
|
17383
17413
|
type AddItemsBody = NonNullable<operations['addDraftOrderItems']['requestBody']>['content']['application/json'];
|
|
17384
17414
|
type UpdateItemBody$2 = NonNullable<operations['updateDraftOrderItem']['requestBody']>['content']['application/json'];
|
|
17385
17415
|
declare class DraftOrdersResource {
|
|
17386
17416
|
private client;
|
|
17387
17417
|
constructor(client: Hydra);
|
|
17388
|
-
list(params?: ListParams$
|
|
17389
|
-
iterate(params?: Omit<ListParams$
|
|
17390
|
-
toArray(params?: Omit<ListParams$
|
|
17418
|
+
list(params?: ListParams$m): Promise<ListResponse<DraftOrder>>;
|
|
17419
|
+
iterate(params?: Omit<ListParams$m, 'cursor'>, options?: PaginateOptions): AsyncGenerator<DraftOrder, void, undefined>;
|
|
17420
|
+
toArray(params?: Omit<ListParams$m, 'cursor'>, options?: PaginateOptions & {
|
|
17391
17421
|
limit?: number;
|
|
17392
17422
|
}): Promise<DraftOrder[]>;
|
|
17393
17423
|
get(id: string, params?: {
|
|
@@ -17395,8 +17425,8 @@ declare class DraftOrdersResource {
|
|
|
17395
17425
|
currency?: string;
|
|
17396
17426
|
fields?: string;
|
|
17397
17427
|
}): Promise<DataResponse<DraftOrder>>;
|
|
17398
|
-
create(body: CreateBody$
|
|
17399
|
-
update(id: string, body: UpdateBody$
|
|
17428
|
+
create(body: CreateBody$g, options?: ResourceRequestOptions): Promise<DataResponse<DraftOrder>>;
|
|
17429
|
+
update(id: string, body: UpdateBody$i): Promise<DataResponse<DraftOrder>>;
|
|
17400
17430
|
delete(id: string): Promise<void>;
|
|
17401
17431
|
addItems(draftOrderId: string, body: AddItemsBody): Promise<DataResponse<DraftOrderLineItem[]>>;
|
|
17402
17432
|
updateItem(draftOrderId: string, itemId: string, body: UpdateItemBody$2): Promise<DataResponse<DraftOrderLineItem>>;
|
|
@@ -17411,22 +17441,22 @@ declare class DraftOrdersResource {
|
|
|
17411
17441
|
}
|
|
17412
17442
|
|
|
17413
17443
|
type Customer = components['schemas']['Customer'];
|
|
17414
|
-
type ListParams$
|
|
17415
|
-
type CreateBody$
|
|
17416
|
-
type UpdateBody$
|
|
17444
|
+
type ListParams$l = NonNullable<operations['listCustomers']['parameters']['query']>;
|
|
17445
|
+
type CreateBody$f = NonNullable<operations['createCustomer']['requestBody']>['content']['application/json'];
|
|
17446
|
+
type UpdateBody$h = NonNullable<operations['updateCustomer']['requestBody']>['content']['application/json'];
|
|
17417
17447
|
type CreateAddressBody$1 = NonNullable<operations['createCustomerAddress']['requestBody']>['content']['application/json'];
|
|
17418
17448
|
type CreateNoteBody$1 = NonNullable<operations['createCustomerNote']['requestBody']>['content']['application/json'];
|
|
17419
17449
|
declare class CustomersResource {
|
|
17420
17450
|
private client;
|
|
17421
17451
|
constructor(client: Hydra);
|
|
17422
|
-
list(params?: ListParams$
|
|
17423
|
-
iterate(params?: Omit<ListParams$
|
|
17424
|
-
toArray(params?: Omit<ListParams$
|
|
17452
|
+
list(params?: ListParams$l): Promise<ListResponse<Customer>>;
|
|
17453
|
+
iterate(params?: Omit<ListParams$l, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Customer, void, undefined>;
|
|
17454
|
+
toArray(params?: Omit<ListParams$l, 'cursor'>, options?: PaginateOptions & {
|
|
17425
17455
|
limit?: number;
|
|
17426
17456
|
}): Promise<Customer[]>;
|
|
17427
|
-
get(id: string, params?: Pick<ListParams$
|
|
17428
|
-
create(body: CreateBody$
|
|
17429
|
-
update(id: string, body: UpdateBody$
|
|
17457
|
+
get(id: string, params?: Pick<ListParams$l, 'expand' | 'fields'>): Promise<DataResponse<Customer>>;
|
|
17458
|
+
create(body: CreateBody$f, options?: ResourceRequestOptions): Promise<DataResponse<Customer>>;
|
|
17459
|
+
update(id: string, body: UpdateBody$h): Promise<DataResponse<Customer>>;
|
|
17430
17460
|
delete(id: string): Promise<void>;
|
|
17431
17461
|
listAddresses(customerId: string): Promise<DataResponse<unknown[]>>;
|
|
17432
17462
|
createAddress(customerId: string, body: CreateAddressBody$1): Promise<DataResponse<unknown>>;
|
|
@@ -17440,38 +17470,38 @@ declare class CustomersResource {
|
|
|
17440
17470
|
}
|
|
17441
17471
|
|
|
17442
17472
|
type CustomerGroup = components['schemas']['CustomerGroup'];
|
|
17443
|
-
type ListParams$
|
|
17444
|
-
type CreateBody$
|
|
17445
|
-
type UpdateBody$
|
|
17473
|
+
type ListParams$k = NonNullable<operations['listCustomerGroups']['parameters']['query']>;
|
|
17474
|
+
type CreateBody$e = NonNullable<operations['createCustomerGroup']['requestBody']>['content']['application/json'];
|
|
17475
|
+
type UpdateBody$g = NonNullable<operations['updateCustomerGroup']['requestBody']>['content']['application/json'];
|
|
17446
17476
|
type AddMembersBody = NonNullable<operations['addCustomerGroupMembers']['requestBody']>['content']['application/json'];
|
|
17447
17477
|
declare class CustomerGroupsResource {
|
|
17448
17478
|
private client;
|
|
17449
17479
|
constructor(client: Hydra);
|
|
17450
|
-
list(params?: ListParams$
|
|
17451
|
-
iterate(params?: Omit<ListParams$
|
|
17452
|
-
toArray(params?: Omit<ListParams$
|
|
17480
|
+
list(params?: ListParams$k): Promise<ListResponse<CustomerGroup>>;
|
|
17481
|
+
iterate(params?: Omit<ListParams$k, 'cursor'>, options?: PaginateOptions): AsyncGenerator<CustomerGroup, void, undefined>;
|
|
17482
|
+
toArray(params?: Omit<ListParams$k, 'cursor'>, options?: PaginateOptions & {
|
|
17453
17483
|
limit?: number;
|
|
17454
17484
|
}): Promise<CustomerGroup[]>;
|
|
17455
17485
|
get(id: string): Promise<DataResponse<CustomerGroup>>;
|
|
17456
|
-
create(body: CreateBody$
|
|
17457
|
-
update(id: string, body: UpdateBody$
|
|
17486
|
+
create(body: CreateBody$e, options?: ResourceRequestOptions): Promise<DataResponse<CustomerGroup>>;
|
|
17487
|
+
update(id: string, body: UpdateBody$g): Promise<DataResponse<CustomerGroup>>;
|
|
17458
17488
|
delete(id: string): Promise<void>;
|
|
17459
17489
|
addMembers(groupId: string, body: AddMembersBody): Promise<void>;
|
|
17460
17490
|
removeMember(groupId: string, customerId: string): Promise<void>;
|
|
17461
17491
|
}
|
|
17462
17492
|
|
|
17463
|
-
type UpdateBody$
|
|
17493
|
+
type UpdateBody$f = NonNullable<operations['updateAddress']['requestBody']>['content']['application/json'];
|
|
17464
17494
|
declare class AddressesResource {
|
|
17465
17495
|
private client;
|
|
17466
17496
|
constructor(client: Hydra);
|
|
17467
|
-
update(id: string, body: UpdateBody$
|
|
17497
|
+
update(id: string, body: UpdateBody$f): Promise<DataResponse<unknown>>;
|
|
17468
17498
|
delete(id: string): Promise<void>;
|
|
17469
17499
|
}
|
|
17470
17500
|
|
|
17471
17501
|
type InventoryLevel = components['schemas']['InventoryLevel'];
|
|
17472
17502
|
type InventoryAdjustment = components['schemas']['InventoryAdjustment'];
|
|
17473
17503
|
type ProductAdjustment = components['schemas']['ProductAdjustment'];
|
|
17474
|
-
type ListParams$
|
|
17504
|
+
type ListParams$j = NonNullable<operations['listInventory']['parameters']['query']>;
|
|
17475
17505
|
type SetBody = NonNullable<operations['setInventory']['requestBody']>['content']['application/json'];
|
|
17476
17506
|
type AdjustBody = NonNullable<operations['adjustInventory']['requestBody']>['content']['application/json'];
|
|
17477
17507
|
type InventoryResult = InventoryLevel & {
|
|
@@ -17480,9 +17510,9 @@ type InventoryResult = InventoryLevel & {
|
|
|
17480
17510
|
declare class InventoryResource {
|
|
17481
17511
|
private client;
|
|
17482
17512
|
constructor(client: Hydra);
|
|
17483
|
-
list(params?: ListParams$
|
|
17484
|
-
iterate(params?: Omit<ListParams$
|
|
17485
|
-
toArray(params?: Omit<ListParams$
|
|
17513
|
+
list(params?: ListParams$j): Promise<ListResponse<InventoryLevel>>;
|
|
17514
|
+
iterate(params?: Omit<ListParams$j, 'cursor'>, options?: PaginateOptions): AsyncGenerator<InventoryLevel, void, undefined>;
|
|
17515
|
+
toArray(params?: Omit<ListParams$j, 'cursor'>, options?: PaginateOptions & {
|
|
17486
17516
|
limit?: number;
|
|
17487
17517
|
}): Promise<InventoryLevel[]>;
|
|
17488
17518
|
listAdjustments(params: {
|
|
@@ -17554,56 +17584,56 @@ declare class ShippingResource {
|
|
|
17554
17584
|
}
|
|
17555
17585
|
|
|
17556
17586
|
type Promotion = components['schemas']['Promotion'];
|
|
17557
|
-
type ListParams$
|
|
17558
|
-
type CreateBody$
|
|
17559
|
-
type UpdateBody$
|
|
17587
|
+
type ListParams$i = NonNullable<operations['listPromotions']['parameters']['query']>;
|
|
17588
|
+
type CreateBody$d = NonNullable<operations['createPromotion']['requestBody']>['content']['application/json'];
|
|
17589
|
+
type UpdateBody$e = NonNullable<operations['updatePromotion']['requestBody']>['content']['application/json'];
|
|
17560
17590
|
declare class PromotionsResource {
|
|
17561
17591
|
private client;
|
|
17562
17592
|
constructor(client: Hydra);
|
|
17563
|
-
list(params?: ListParams$
|
|
17564
|
-
iterate(params?: Omit<ListParams$
|
|
17565
|
-
toArray(params?: Omit<ListParams$
|
|
17593
|
+
list(params?: ListParams$i): Promise<ListResponse<Promotion>>;
|
|
17594
|
+
iterate(params?: Omit<ListParams$i, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Promotion, void, undefined>;
|
|
17595
|
+
toArray(params?: Omit<ListParams$i, 'cursor'>, options?: PaginateOptions & {
|
|
17566
17596
|
limit?: number;
|
|
17567
17597
|
}): Promise<Promotion[]>;
|
|
17568
17598
|
get(id: string): Promise<DataResponse<Promotion>>;
|
|
17569
|
-
create(body: CreateBody$
|
|
17570
|
-
update(id: string, body: UpdateBody$
|
|
17599
|
+
create(body: CreateBody$d, options?: ResourceRequestOptions): Promise<DataResponse<Promotion>>;
|
|
17600
|
+
update(id: string, body: UpdateBody$e): Promise<DataResponse<Promotion>>;
|
|
17571
17601
|
delete(id: string): Promise<void>;
|
|
17572
17602
|
}
|
|
17573
17603
|
|
|
17574
17604
|
type Discount = components['schemas']['Discount'];
|
|
17575
|
-
type ListParams$
|
|
17576
|
-
type CreateBody$
|
|
17577
|
-
type UpdateBody$
|
|
17605
|
+
type ListParams$h = NonNullable<operations['listDiscounts']['parameters']['query']>;
|
|
17606
|
+
type CreateBody$c = NonNullable<operations['createDiscount']['requestBody']>['content']['application/json'];
|
|
17607
|
+
type UpdateBody$d = NonNullable<operations['updateDiscount']['requestBody']>['content']['application/json'];
|
|
17578
17608
|
declare class DiscountsResource {
|
|
17579
17609
|
private client;
|
|
17580
17610
|
constructor(client: Hydra);
|
|
17581
|
-
list(params?: ListParams$
|
|
17582
|
-
iterate(params?: Omit<ListParams$
|
|
17583
|
-
toArray(params?: Omit<ListParams$
|
|
17611
|
+
list(params?: ListParams$h): Promise<ListResponse<Discount>>;
|
|
17612
|
+
iterate(params?: Omit<ListParams$h, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Discount, void, undefined>;
|
|
17613
|
+
toArray(params?: Omit<ListParams$h, 'cursor'>, options?: PaginateOptions & {
|
|
17584
17614
|
limit?: number;
|
|
17585
17615
|
}): Promise<Discount[]>;
|
|
17586
17616
|
get(id: string): Promise<DataResponse<Discount>>;
|
|
17587
|
-
create(body: CreateBody$
|
|
17588
|
-
update(id: string, body: UpdateBody$
|
|
17617
|
+
create(body: CreateBody$c, options?: ResourceRequestOptions): Promise<DataResponse<Discount>>;
|
|
17618
|
+
update(id: string, body: UpdateBody$d): Promise<DataResponse<Discount>>;
|
|
17589
17619
|
delete(id: string): Promise<void>;
|
|
17590
17620
|
}
|
|
17591
17621
|
|
|
17592
17622
|
type Image = components['schemas']['Image'];
|
|
17593
|
-
type ListParams$
|
|
17594
|
-
type UpdateBody$
|
|
17623
|
+
type ListParams$g = NonNullable<operations['listImages']['parameters']['query']>;
|
|
17624
|
+
type UpdateBody$c = NonNullable<operations['updateImage']['requestBody']>['content']['application/json'];
|
|
17595
17625
|
type ReorderBody$2 = NonNullable<operations['reorderImages']['requestBody']>['content']['application/json'];
|
|
17596
17626
|
declare class ImagesResource {
|
|
17597
17627
|
private client;
|
|
17598
17628
|
constructor(client: Hydra);
|
|
17599
|
-
list(params?: ListParams$
|
|
17600
|
-
iterate(params?: Omit<ListParams$
|
|
17601
|
-
toArray(params?: Omit<ListParams$
|
|
17629
|
+
list(params?: ListParams$g): Promise<ListResponse<Image>>;
|
|
17630
|
+
iterate(params?: Omit<ListParams$g, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Image, void, undefined>;
|
|
17631
|
+
toArray(params?: Omit<ListParams$g, 'cursor'>, options?: PaginateOptions & {
|
|
17602
17632
|
limit?: number;
|
|
17603
17633
|
}): Promise<Image[]>;
|
|
17604
17634
|
/** Upload an image to the store library */
|
|
17605
17635
|
upload(formData: FormData): Promise<DataResponse<Image>>;
|
|
17606
|
-
update(id: string, body: UpdateBody$
|
|
17636
|
+
update(id: string, body: UpdateBody$c): Promise<DataResponse<Image>>;
|
|
17607
17637
|
delete(id: string): Promise<void>;
|
|
17608
17638
|
detach(id: string): Promise<void>;
|
|
17609
17639
|
batchDelete(imageIds: string[]): Promise<void>;
|
|
@@ -17612,32 +17642,32 @@ declare class ImagesResource {
|
|
|
17612
17642
|
}
|
|
17613
17643
|
|
|
17614
17644
|
type Webhook = components['schemas']['Webhook'];
|
|
17615
|
-
type ListParams$
|
|
17616
|
-
type CreateBody$
|
|
17617
|
-
type UpdateBody$
|
|
17645
|
+
type ListParams$f = NonNullable<operations['listWebhooks']['parameters']['query']>;
|
|
17646
|
+
type CreateBody$b = NonNullable<operations['createWebhook']['requestBody']>['content']['application/json'];
|
|
17647
|
+
type UpdateBody$b = NonNullable<operations['updateWebhook']['requestBody']>['content']['application/json'];
|
|
17618
17648
|
declare class WebhooksResource {
|
|
17619
17649
|
private client;
|
|
17620
17650
|
constructor(client: Hydra);
|
|
17621
|
-
list(params?: ListParams$
|
|
17622
|
-
iterate(params?: Omit<ListParams$
|
|
17623
|
-
toArray(params?: Omit<ListParams$
|
|
17651
|
+
list(params?: ListParams$f): Promise<ListResponse<Webhook>>;
|
|
17652
|
+
iterate(params?: Omit<ListParams$f, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Webhook, void, undefined>;
|
|
17653
|
+
toArray(params?: Omit<ListParams$f, 'cursor'>, options?: PaginateOptions & {
|
|
17624
17654
|
limit?: number;
|
|
17625
17655
|
}): Promise<Webhook[]>;
|
|
17626
17656
|
get(id: string): Promise<DataResponse<Webhook>>;
|
|
17627
|
-
create(body: CreateBody$
|
|
17628
|
-
update(id: string, body: UpdateBody$
|
|
17657
|
+
create(body: CreateBody$b, options?: ResourceRequestOptions): Promise<DataResponse<Webhook>>;
|
|
17658
|
+
update(id: string, body: UpdateBody$b): Promise<DataResponse<Webhook>>;
|
|
17629
17659
|
delete(id: string): Promise<void>;
|
|
17630
17660
|
}
|
|
17631
17661
|
|
|
17632
17662
|
type Store = components['schemas']['Store'];
|
|
17633
|
-
type UpdateBody$
|
|
17663
|
+
type UpdateBody$a = NonNullable<operations['updateStore']['requestBody']>['content']['application/json'];
|
|
17634
17664
|
declare class StoreResource {
|
|
17635
17665
|
private client;
|
|
17636
17666
|
constructor(client: Hydra);
|
|
17637
17667
|
get(params?: {
|
|
17638
17668
|
fields?: string;
|
|
17639
17669
|
}): Promise<DataResponse<Store>>;
|
|
17640
|
-
update(body: UpdateBody$
|
|
17670
|
+
update(body: UpdateBody$a): Promise<DataResponse<Store>>;
|
|
17641
17671
|
getDomainRecord(): Promise<DataResponse<unknown>>;
|
|
17642
17672
|
verifyDomain(): Promise<DataResponse<unknown>>;
|
|
17643
17673
|
publish(): Promise<DataResponse<{
|
|
@@ -17649,42 +17679,42 @@ declare class StoreResource {
|
|
|
17649
17679
|
}
|
|
17650
17680
|
|
|
17651
17681
|
type Tag = components['schemas']['Tag'];
|
|
17652
|
-
type ListParams$
|
|
17653
|
-
type CreateBody$
|
|
17654
|
-
type UpdateBody$
|
|
17682
|
+
type ListParams$e = NonNullable<operations['listTags']['parameters']['query']>;
|
|
17683
|
+
type CreateBody$a = NonNullable<operations['createTag']['requestBody']>['content']['application/json'];
|
|
17684
|
+
type UpdateBody$9 = NonNullable<operations['updateTag']['requestBody']>['content']['application/json'];
|
|
17655
17685
|
declare class TagsResource {
|
|
17656
17686
|
private client;
|
|
17657
17687
|
constructor(client: Hydra);
|
|
17658
|
-
list(params?: ListParams$
|
|
17659
|
-
iterate(params?: Omit<ListParams$
|
|
17660
|
-
toArray(params?: Omit<ListParams$
|
|
17688
|
+
list(params?: ListParams$e): Promise<ListResponse<Tag>>;
|
|
17689
|
+
iterate(params?: Omit<ListParams$e, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Tag, void, undefined>;
|
|
17690
|
+
toArray(params?: Omit<ListParams$e, 'cursor'>, options?: PaginateOptions & {
|
|
17661
17691
|
limit?: number;
|
|
17662
17692
|
}): Promise<Tag[]>;
|
|
17663
|
-
create(body: CreateBody$
|
|
17664
|
-
update(id: string, body: UpdateBody$
|
|
17693
|
+
create(body: CreateBody$a, options?: ResourceRequestOptions): Promise<DataResponse<Tag>>;
|
|
17694
|
+
update(id: string, body: UpdateBody$9): Promise<DataResponse<Tag>>;
|
|
17665
17695
|
delete(id: string): Promise<void>;
|
|
17666
17696
|
}
|
|
17667
17697
|
|
|
17668
17698
|
type Redirect = components['schemas']['Redirect'];
|
|
17669
|
-
type ListParams$
|
|
17670
|
-
type CreateBody$
|
|
17699
|
+
type ListParams$d = NonNullable<operations['listRedirects']['parameters']['query']>;
|
|
17700
|
+
type CreateBody$9 = NonNullable<operations['createRedirect']['requestBody']>['content']['application/json'];
|
|
17671
17701
|
declare class RedirectsResource {
|
|
17672
17702
|
private client;
|
|
17673
17703
|
constructor(client: Hydra);
|
|
17674
|
-
list(params?: ListParams$
|
|
17675
|
-
iterate(params?: Omit<ListParams$
|
|
17676
|
-
toArray(params?: Omit<ListParams$
|
|
17704
|
+
list(params?: ListParams$d): Promise<ListResponse<Redirect>>;
|
|
17705
|
+
iterate(params?: Omit<ListParams$d, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Redirect, void, undefined>;
|
|
17706
|
+
toArray(params?: Omit<ListParams$d, 'cursor'>, options?: PaginateOptions & {
|
|
17677
17707
|
limit?: number;
|
|
17678
17708
|
}): Promise<Redirect[]>;
|
|
17679
|
-
create(body: CreateBody$
|
|
17709
|
+
create(body: CreateBody$9, options?: ResourceRequestOptions): Promise<DataResponse<Redirect>>;
|
|
17680
17710
|
lookup(path: string): Promise<DataResponse<Redirect>>;
|
|
17681
17711
|
delete(id: string): Promise<void>;
|
|
17682
17712
|
}
|
|
17683
17713
|
|
|
17684
17714
|
type Company = components['schemas']['Company'];
|
|
17685
|
-
type ListParams$
|
|
17686
|
-
type CreateBody$
|
|
17687
|
-
type UpdateBody$
|
|
17715
|
+
type ListParams$c = NonNullable<operations['listCompanies']['parameters']['query']>;
|
|
17716
|
+
type CreateBody$8 = NonNullable<operations['createCompany']['requestBody']>['content']['application/json'];
|
|
17717
|
+
type UpdateBody$8 = NonNullable<operations['updateCompany']['requestBody']>['content']['application/json'];
|
|
17688
17718
|
type CreateAddressBody = NonNullable<operations['createCompanyAddress']['requestBody']>['content']['application/json'];
|
|
17689
17719
|
type UpdateAddressBody = NonNullable<operations['updateCompanyAddress']['requestBody']>['content']['application/json'];
|
|
17690
17720
|
type CreateContactBody = NonNullable<operations['createCompanyContact']['requestBody']>['content']['application/json'];
|
|
@@ -17693,14 +17723,14 @@ type CreateNoteBody = NonNullable<operations['createCompanyNote']['requestBody']
|
|
|
17693
17723
|
declare class CompaniesResource {
|
|
17694
17724
|
private client;
|
|
17695
17725
|
constructor(client: Hydra);
|
|
17696
|
-
list(params?: ListParams$
|
|
17697
|
-
iterate(params?: Omit<ListParams$
|
|
17698
|
-
toArray(params?: Omit<ListParams$
|
|
17726
|
+
list(params?: ListParams$c): Promise<ListResponse<Company>>;
|
|
17727
|
+
iterate(params?: Omit<ListParams$c, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Company, void, undefined>;
|
|
17728
|
+
toArray(params?: Omit<ListParams$c, 'cursor'>, options?: PaginateOptions & {
|
|
17699
17729
|
limit?: number;
|
|
17700
17730
|
}): Promise<Company[]>;
|
|
17701
|
-
get(id: string, params?: Pick<ListParams$
|
|
17702
|
-
create(body: CreateBody$
|
|
17703
|
-
update(id: string, body: UpdateBody$
|
|
17731
|
+
get(id: string, params?: Pick<ListParams$c, 'expand' | 'fields'>): Promise<DataResponse<Company>>;
|
|
17732
|
+
create(body: CreateBody$8, options?: ResourceRequestOptions): Promise<DataResponse<Company>>;
|
|
17733
|
+
update(id: string, body: UpdateBody$8): Promise<DataResponse<Company>>;
|
|
17704
17734
|
delete(id: string): Promise<void>;
|
|
17705
17735
|
listAddresses(companyId: string): Promise<DataResponse<unknown[]>>;
|
|
17706
17736
|
createAddress(companyId: string, body: CreateAddressBody): Promise<DataResponse<unknown>>;
|
|
@@ -17716,23 +17746,23 @@ declare class CompaniesResource {
|
|
|
17716
17746
|
}
|
|
17717
17747
|
|
|
17718
17748
|
type PurchaseOrder = components['schemas']['PurchaseOrder'];
|
|
17719
|
-
type ListParams$
|
|
17720
|
-
type CreateBody$
|
|
17721
|
-
type UpdateBody$
|
|
17749
|
+
type ListParams$b = NonNullable<operations['listPurchaseOrders']['parameters']['query']>;
|
|
17750
|
+
type CreateBody$7 = NonNullable<operations['createPurchaseOrder']['requestBody']>['content']['application/json'];
|
|
17751
|
+
type UpdateBody$7 = NonNullable<operations['updatePurchaseOrder']['requestBody']>['content']['application/json'];
|
|
17722
17752
|
type AddItemBody = NonNullable<operations['addPurchaseOrderItems']['requestBody']>['content']['application/json'];
|
|
17723
17753
|
type UpdateItemBody$1 = NonNullable<operations['updatePurchaseOrderItem']['requestBody']>['content']['application/json'];
|
|
17724
17754
|
type ReceiveBody = NonNullable<operations['receivePurchaseOrderItems']['requestBody']>['content']['application/json'];
|
|
17725
17755
|
declare class PurchaseOrdersResource {
|
|
17726
17756
|
private client;
|
|
17727
17757
|
constructor(client: Hydra);
|
|
17728
|
-
list(params?: ListParams$
|
|
17729
|
-
iterate(params?: Omit<ListParams$
|
|
17730
|
-
toArray(params?: Omit<ListParams$
|
|
17758
|
+
list(params?: ListParams$b): Promise<ListResponse<PurchaseOrder>>;
|
|
17759
|
+
iterate(params?: Omit<ListParams$b, 'cursor'>, options?: PaginateOptions): AsyncGenerator<PurchaseOrder, void, undefined>;
|
|
17760
|
+
toArray(params?: Omit<ListParams$b, 'cursor'>, options?: PaginateOptions & {
|
|
17731
17761
|
limit?: number;
|
|
17732
17762
|
}): Promise<PurchaseOrder[]>;
|
|
17733
|
-
get(id: string, params?: Pick<ListParams$
|
|
17734
|
-
create(body: CreateBody$
|
|
17735
|
-
update(id: string, body: UpdateBody$
|
|
17763
|
+
get(id: string, params?: Pick<ListParams$b, 'expand' | 'fields'>): Promise<DataResponse<PurchaseOrder>>;
|
|
17764
|
+
create(body: CreateBody$7, options?: ResourceRequestOptions): Promise<DataResponse<PurchaseOrder>>;
|
|
17765
|
+
update(id: string, body: UpdateBody$7): Promise<DataResponse<PurchaseOrder>>;
|
|
17736
17766
|
delete(id: string): Promise<void>;
|
|
17737
17767
|
addItem(purchaseOrderId: string, body: AddItemBody): Promise<DataResponse<unknown>>;
|
|
17738
17768
|
updateItem(purchaseOrderId: string, itemId: string, body: UpdateItemBody$1): Promise<DataResponse<unknown>>;
|
|
@@ -17755,17 +17785,17 @@ declare class FulfillmentOrdersResource {
|
|
|
17755
17785
|
listForOrder(orderId: string): Promise<DataResponse<FulfillmentOrder[]>>;
|
|
17756
17786
|
}
|
|
17757
17787
|
|
|
17758
|
-
type ListParams$
|
|
17759
|
-
type CreateBody$
|
|
17760
|
-
type UpdateBody$
|
|
17788
|
+
type ListParams$a = NonNullable<operations['listMetafieldDefinitions']['parameters']['query']>;
|
|
17789
|
+
type CreateBody$6 = NonNullable<operations['createMetafieldDefinition']['requestBody']>['content']['application/json'];
|
|
17790
|
+
type UpdateBody$6 = NonNullable<operations['updateMetafieldDefinition']['requestBody']>['content']['application/json'];
|
|
17761
17791
|
type ReorderBody$1 = NonNullable<operations['reorderMetafieldDefinitions']['requestBody']>['content']['application/json'];
|
|
17762
17792
|
declare class MetafieldsResource {
|
|
17763
17793
|
private client;
|
|
17764
17794
|
constructor(client: Hydra);
|
|
17765
17795
|
/** List metafield definitions for the store */
|
|
17766
|
-
listDefinitions(params?: ListParams$
|
|
17767
|
-
createDefinition(body: CreateBody$
|
|
17768
|
-
updateDefinition(ownerType: string, slug: string, body: UpdateBody$
|
|
17796
|
+
listDefinitions(params?: ListParams$a): Promise<DataResponse<unknown[]>>;
|
|
17797
|
+
createDefinition(body: CreateBody$6): Promise<DataResponse<unknown>>;
|
|
17798
|
+
updateDefinition(ownerType: string, slug: string, body: UpdateBody$6): Promise<DataResponse<unknown>>;
|
|
17769
17799
|
archiveDefinition(ownerType: string, slug: string): Promise<void>;
|
|
17770
17800
|
reorderDefinitions(ownerType: string, body: ReorderBody$1): Promise<void>;
|
|
17771
17801
|
}
|
|
@@ -17811,30 +17841,30 @@ declare class TaxResource {
|
|
|
17811
17841
|
}
|
|
17812
17842
|
|
|
17813
17843
|
type ExchangeRate = components['schemas']['ExchangeRate'];
|
|
17814
|
-
type ListParams$
|
|
17844
|
+
type ListParams$9 = NonNullable<operations['listExchangeRates']['parameters']['query']>;
|
|
17815
17845
|
declare class ExchangeRatesResource {
|
|
17816
17846
|
private client;
|
|
17817
17847
|
constructor(client: Hydra);
|
|
17818
|
-
list(params?: ListParams$
|
|
17848
|
+
list(params?: ListParams$9): Promise<DataResponse<ExchangeRate[]>>;
|
|
17819
17849
|
refresh(): Promise<DataResponse<unknown>>;
|
|
17820
17850
|
}
|
|
17821
17851
|
|
|
17822
17852
|
type FilterAttribute = components['schemas']['FilterAttribute'];
|
|
17823
|
-
type ListParams$
|
|
17824
|
-
type CreateBody$
|
|
17825
|
-
type UpdateBody$
|
|
17853
|
+
type ListParams$8 = NonNullable<operations['listFilterAttributes']['parameters']['query']>;
|
|
17854
|
+
type CreateBody$5 = NonNullable<operations['createFilterAttribute']['requestBody']>['content']['application/json'];
|
|
17855
|
+
type UpdateBody$5 = NonNullable<operations['updateFilterAttribute']['requestBody']>['content']['application/json'];
|
|
17826
17856
|
type ReorderBody = NonNullable<operations['reorderFilterAttributes']['requestBody']>['content']['application/json'];
|
|
17827
17857
|
declare class FilterAttributesResource {
|
|
17828
17858
|
private client;
|
|
17829
17859
|
constructor(client: Hydra);
|
|
17830
|
-
list(params?: ListParams$
|
|
17831
|
-
iterate(params?: Omit<ListParams$
|
|
17832
|
-
toArray(params?: Omit<ListParams$
|
|
17860
|
+
list(params?: ListParams$8): Promise<ListResponse<FilterAttribute>>;
|
|
17861
|
+
iterate(params?: Omit<ListParams$8, 'cursor'>, options?: PaginateOptions): AsyncGenerator<FilterAttribute, void, undefined>;
|
|
17862
|
+
toArray(params?: Omit<ListParams$8, 'cursor'>, options?: PaginateOptions & {
|
|
17833
17863
|
limit?: number;
|
|
17834
17864
|
}): Promise<FilterAttribute[]>;
|
|
17835
17865
|
get(id: string): Promise<DataResponse<FilterAttribute>>;
|
|
17836
|
-
create(body: CreateBody$
|
|
17837
|
-
update(id: string, body: UpdateBody$
|
|
17866
|
+
create(body: CreateBody$5, options?: ResourceRequestOptions): Promise<DataResponse<FilterAttribute>>;
|
|
17867
|
+
update(id: string, body: UpdateBody$5): Promise<DataResponse<FilterAttribute>>;
|
|
17838
17868
|
delete(id: string): Promise<void>;
|
|
17839
17869
|
reorder(body: ReorderBody): Promise<ListResponse<FilterAttribute>>;
|
|
17840
17870
|
discover(): Promise<DataResponse<unknown[]>>;
|
|
@@ -17842,23 +17872,23 @@ declare class FilterAttributesResource {
|
|
|
17842
17872
|
|
|
17843
17873
|
type NavigationMenu = components['schemas']['NavigationMenu'];
|
|
17844
17874
|
type NavigationItem = components['schemas']['NavigationItem'];
|
|
17845
|
-
type ListParams$
|
|
17846
|
-
type CreateBody$
|
|
17847
|
-
type UpdateBody$
|
|
17875
|
+
type ListParams$7 = NonNullable<operations['listNavigationMenus']['parameters']['query']>;
|
|
17876
|
+
type CreateBody$4 = NonNullable<operations['createNavigationMenu']['requestBody']>['content']['application/json'];
|
|
17877
|
+
type UpdateBody$4 = NonNullable<operations['updateNavigationMenu']['requestBody']>['content']['application/json'];
|
|
17848
17878
|
type CreateItemBody = NonNullable<operations['addNavigationItem']['requestBody']>['content']['application/json'];
|
|
17849
17879
|
type UpdateItemBody = NonNullable<operations['updateNavigationItem']['requestBody']>['content']['application/json'];
|
|
17850
17880
|
type ReorderItemsBody = NonNullable<operations['reorderNavigationItems']['requestBody']>['content']['application/json'];
|
|
17851
17881
|
declare class NavigationResource {
|
|
17852
17882
|
private client;
|
|
17853
17883
|
constructor(client: Hydra);
|
|
17854
|
-
list(params?: ListParams$
|
|
17855
|
-
iterate(params?: Omit<ListParams$
|
|
17856
|
-
toArray(params?: Omit<ListParams$
|
|
17884
|
+
list(params?: ListParams$7): Promise<ListResponse<NavigationMenu>>;
|
|
17885
|
+
iterate(params?: Omit<ListParams$7, 'cursor'>, options?: PaginateOptions): AsyncGenerator<NavigationMenu, void, undefined>;
|
|
17886
|
+
toArray(params?: Omit<ListParams$7, 'cursor'>, options?: PaginateOptions & {
|
|
17857
17887
|
limit?: number;
|
|
17858
17888
|
}): Promise<NavigationMenu[]>;
|
|
17859
17889
|
get(id: string): Promise<DataResponse<NavigationMenu>>;
|
|
17860
|
-
create(body: CreateBody$
|
|
17861
|
-
update(id: string, body: UpdateBody$
|
|
17890
|
+
create(body: CreateBody$4, options?: ResourceRequestOptions): Promise<DataResponse<NavigationMenu>>;
|
|
17891
|
+
update(id: string, body: UpdateBody$4): Promise<DataResponse<NavigationMenu>>;
|
|
17862
17892
|
delete(id: string): Promise<void>;
|
|
17863
17893
|
addItem(menuId: string, body: CreateItemBody): Promise<DataResponse<NavigationItem>>;
|
|
17864
17894
|
updateItem(menuId: string, itemId: string, body: UpdateItemBody): Promise<DataResponse<NavigationItem>>;
|
|
@@ -17867,26 +17897,26 @@ declare class NavigationResource {
|
|
|
17867
17897
|
}
|
|
17868
17898
|
|
|
17869
17899
|
type NotificationLog = components['schemas']['NotificationLog'];
|
|
17870
|
-
type ListParams$
|
|
17900
|
+
type ListParams$6 = NonNullable<operations['listNotifications']['parameters']['query']>;
|
|
17871
17901
|
declare class NotificationsResource {
|
|
17872
17902
|
private client;
|
|
17873
17903
|
constructor(client: Hydra);
|
|
17874
|
-
list(params?: ListParams$
|
|
17875
|
-
iterate(params?: Omit<ListParams$
|
|
17876
|
-
toArray(params?: Omit<ListParams$
|
|
17904
|
+
list(params?: ListParams$6): Promise<ListResponse<NotificationLog>>;
|
|
17905
|
+
iterate(params?: Omit<ListParams$6, 'cursor'>, options?: PaginateOptions): AsyncGenerator<NotificationLog, void, undefined>;
|
|
17906
|
+
toArray(params?: Omit<ListParams$6, 'cursor'>, options?: PaginateOptions & {
|
|
17877
17907
|
limit?: number;
|
|
17878
17908
|
}): Promise<NotificationLog[]>;
|
|
17879
17909
|
get(id: string): Promise<DataResponse<NotificationLog>>;
|
|
17880
17910
|
}
|
|
17881
17911
|
|
|
17882
17912
|
type CheckoutListItem = components['schemas']['CheckoutListItem'];
|
|
17883
|
-
type ListParams$
|
|
17913
|
+
type ListParams$5 = NonNullable<operations['listCheckouts']['parameters']['query']>;
|
|
17884
17914
|
declare class CheckoutsResource {
|
|
17885
17915
|
private client;
|
|
17886
17916
|
constructor(client: Hydra);
|
|
17887
|
-
list(params?: ListParams$
|
|
17888
|
-
iterate(params?: Omit<ListParams$
|
|
17889
|
-
toArray(params?: Omit<ListParams$
|
|
17917
|
+
list(params?: ListParams$5): Promise<ListResponse<CheckoutListItem>>;
|
|
17918
|
+
iterate(params?: Omit<ListParams$5, 'cursor'>, options?: PaginateOptions): AsyncGenerator<CheckoutListItem, void, undefined>;
|
|
17919
|
+
toArray(params?: Omit<ListParams$5, 'cursor'>, options?: PaginateOptions & {
|
|
17890
17920
|
limit?: number;
|
|
17891
17921
|
}): Promise<CheckoutListItem[]>;
|
|
17892
17922
|
}
|
|
@@ -17912,16 +17942,16 @@ declare class AnalyticsResource {
|
|
|
17912
17942
|
|
|
17913
17943
|
type CreditTransaction = NonNullable<operations['issueCustomerCredit']['responses']['201']['content']['application/json']['data']>;
|
|
17914
17944
|
type CreditBalance = NonNullable<operations['getCustomerCredit']['responses']['200']['content']['application/json']['data']>;
|
|
17915
|
-
type ListParams$
|
|
17945
|
+
type ListParams$4 = NonNullable<operations['listCustomerCreditTransactions']['parameters']['query']>;
|
|
17916
17946
|
type IssueCreditBody = NonNullable<operations['issueCustomerCredit']['requestBody']>['content']['application/json'];
|
|
17917
17947
|
declare class StoreCreditResource {
|
|
17918
17948
|
private client;
|
|
17919
17949
|
constructor(client: Hydra);
|
|
17920
17950
|
getBalance(customerId: string): Promise<DataResponse<CreditBalance>>;
|
|
17921
17951
|
issue(customerId: string, body: IssueCreditBody, options?: ResourceRequestOptions): Promise<DataResponse<CreditTransaction>>;
|
|
17922
|
-
listTransactions(customerId: string, params?: ListParams$
|
|
17923
|
-
iterateTransactions(customerId: string, params?: Omit<ListParams$
|
|
17924
|
-
transactionsToArray(customerId: string, params?: Omit<ListParams$
|
|
17952
|
+
listTransactions(customerId: string, params?: ListParams$4): Promise<ListResponse<CreditTransaction>>;
|
|
17953
|
+
iterateTransactions(customerId: string, params?: Omit<ListParams$4, 'cursor'>, options?: PaginateOptions): AsyncGenerator<CreditTransaction, void, undefined>;
|
|
17954
|
+
transactionsToArray(customerId: string, params?: Omit<ListParams$4, 'cursor'>, options?: PaginateOptions & {
|
|
17925
17955
|
limit?: number;
|
|
17926
17956
|
}): Promise<CreditTransaction[]>;
|
|
17927
17957
|
}
|
|
@@ -17939,21 +17969,21 @@ declare class SearchResource {
|
|
|
17939
17969
|
|
|
17940
17970
|
type Location = components['schemas']['Location'];
|
|
17941
17971
|
type TransferResult = components['schemas']['TransferResult'];
|
|
17942
|
-
type ListParams$
|
|
17943
|
-
type CreateBody$
|
|
17944
|
-
type UpdateBody$
|
|
17972
|
+
type ListParams$3 = NonNullable<operations['listLocations']['parameters']['query']>;
|
|
17973
|
+
type CreateBody$3 = NonNullable<operations['createLocation']['requestBody']>['content']['application/json'];
|
|
17974
|
+
type UpdateBody$3 = NonNullable<operations['updateLocation']['requestBody']>['content']['application/json'];
|
|
17945
17975
|
type TransferBody = NonNullable<operations['transferLocationInventory']['requestBody']>['content']['application/json'];
|
|
17946
17976
|
declare class LocationsResource {
|
|
17947
17977
|
private client;
|
|
17948
17978
|
constructor(client: Hydra);
|
|
17949
|
-
list(params?: ListParams$
|
|
17950
|
-
iterate(params?: Omit<ListParams$
|
|
17951
|
-
toArray(params?: Omit<ListParams$
|
|
17979
|
+
list(params?: ListParams$3): Promise<ListResponse<Location>>;
|
|
17980
|
+
iterate(params?: Omit<ListParams$3, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Location, void, undefined>;
|
|
17981
|
+
toArray(params?: Omit<ListParams$3, 'cursor'>, options?: PaginateOptions & {
|
|
17952
17982
|
limit?: number;
|
|
17953
17983
|
}): Promise<Location[]>;
|
|
17954
17984
|
get(id: string): Promise<DataResponse<Location>>;
|
|
17955
|
-
create(body: CreateBody$
|
|
17956
|
-
update(id: string, body: UpdateBody$
|
|
17985
|
+
create(body: CreateBody$3, options?: ResourceRequestOptions): Promise<DataResponse<Location>>;
|
|
17986
|
+
update(id: string, body: UpdateBody$3): Promise<DataResponse<Location>>;
|
|
17957
17987
|
delete(id: string): Promise<void>;
|
|
17958
17988
|
setDefault(id: string): Promise<DataResponse<Location>>;
|
|
17959
17989
|
transfer(id: string, body: TransferBody): Promise<DataResponse<TransferResult>>;
|
|
@@ -18019,42 +18049,63 @@ declare class IntegrationsResource {
|
|
|
18019
18049
|
}
|
|
18020
18050
|
|
|
18021
18051
|
type Post = components['schemas']['Post'];
|
|
18022
|
-
type ListParams$
|
|
18023
|
-
type CreateBody$
|
|
18024
|
-
type UpdateBody$
|
|
18052
|
+
type ListParams$2 = NonNullable<operations['listPosts']['parameters']['query']>;
|
|
18053
|
+
type CreateBody$2 = NonNullable<operations['createPost']['requestBody']>['content']['application/json'];
|
|
18054
|
+
type UpdateBody$2 = NonNullable<operations['updatePost']['requestBody']>['content']['application/json'];
|
|
18025
18055
|
type AddCategoriesBody = NonNullable<operations['addPostCategories']['requestBody']>['content']['application/json'];
|
|
18026
18056
|
declare class PostsResource {
|
|
18027
18057
|
private client;
|
|
18028
18058
|
constructor(client: Hydra);
|
|
18029
|
-
list(params?: ListParams$
|
|
18030
|
-
iterate(params?: Omit<ListParams$
|
|
18031
|
-
toArray(params?: Omit<ListParams$
|
|
18059
|
+
list(params?: ListParams$2): Promise<ListResponse<Post>>;
|
|
18060
|
+
iterate(params?: Omit<ListParams$2, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Post, void, undefined>;
|
|
18061
|
+
toArray(params?: Omit<ListParams$2, 'cursor'>, options?: PaginateOptions & {
|
|
18032
18062
|
limit?: number;
|
|
18033
18063
|
}): Promise<Post[]>;
|
|
18034
|
-
get(id: string, params?: Pick<ListParams$
|
|
18035
|
-
create(body: CreateBody$
|
|
18036
|
-
update(id: string, body: UpdateBody$
|
|
18064
|
+
get(id: string, params?: Pick<ListParams$2, 'expand' | 'fields'>): Promise<DataResponse<Post>>;
|
|
18065
|
+
create(body: CreateBody$2, options?: ResourceRequestOptions): Promise<DataResponse<Post>>;
|
|
18066
|
+
update(id: string, body: UpdateBody$2): Promise<DataResponse<Post>>;
|
|
18037
18067
|
delete(id: string): Promise<void>;
|
|
18038
18068
|
addCategories(postId: string, body: AddCategoriesBody): Promise<DataResponse<Post>>;
|
|
18039
18069
|
removeCategory(postId: string, categoryId: string): Promise<void>;
|
|
18040
18070
|
}
|
|
18041
18071
|
|
|
18042
18072
|
type ContentCategory = components['schemas']['ContentCategory'];
|
|
18043
|
-
type ListParams = NonNullable<operations['listContentCategories']['parameters']['query']>;
|
|
18044
|
-
type CreateBody = NonNullable<operations['createContentCategory']['requestBody']>['content']['application/json'];
|
|
18045
|
-
type UpdateBody = NonNullable<operations['updateContentCategory']['requestBody']>['content']['application/json'];
|
|
18073
|
+
type ListParams$1 = NonNullable<operations['listContentCategories']['parameters']['query']>;
|
|
18074
|
+
type CreateBody$1 = NonNullable<operations['createContentCategory']['requestBody']>['content']['application/json'];
|
|
18075
|
+
type UpdateBody$1 = NonNullable<operations['updateContentCategory']['requestBody']>['content']['application/json'];
|
|
18046
18076
|
declare class ContentCategoriesResource {
|
|
18047
18077
|
private client;
|
|
18048
18078
|
constructor(client: Hydra);
|
|
18049
|
-
list(params?: ListParams): Promise<ListResponse<ContentCategory>>;
|
|
18050
|
-
iterate(params?: Omit<ListParams, 'cursor'>, options?: PaginateOptions): AsyncGenerator<ContentCategory, void, undefined>;
|
|
18051
|
-
toArray(params?: Omit<ListParams, 'cursor'>, options?: PaginateOptions & {
|
|
18079
|
+
list(params?: ListParams$1): Promise<ListResponse<ContentCategory>>;
|
|
18080
|
+
iterate(params?: Omit<ListParams$1, 'cursor'>, options?: PaginateOptions): AsyncGenerator<ContentCategory, void, undefined>;
|
|
18081
|
+
toArray(params?: Omit<ListParams$1, 'cursor'>, options?: PaginateOptions & {
|
|
18052
18082
|
limit?: number;
|
|
18053
18083
|
}): Promise<ContentCategory[]>;
|
|
18054
18084
|
get(id: string): Promise<DataResponse<ContentCategory>>;
|
|
18055
|
-
create(body: CreateBody, options?: ResourceRequestOptions): Promise<DataResponse<ContentCategory>>;
|
|
18056
|
-
update(id: string, body: UpdateBody): Promise<DataResponse<ContentCategory>>;
|
|
18085
|
+
create(body: CreateBody$1, options?: ResourceRequestOptions): Promise<DataResponse<ContentCategory>>;
|
|
18086
|
+
update(id: string, body: UpdateBody$1): Promise<DataResponse<ContentCategory>>;
|
|
18087
|
+
delete(id: string): Promise<void>;
|
|
18088
|
+
}
|
|
18089
|
+
|
|
18090
|
+
type MembershipPlan = components['schemas']['MembershipPlan'];
|
|
18091
|
+
type CustomerMembership = components['schemas']['CustomerMembership'];
|
|
18092
|
+
type ListParams = NonNullable<operations['listMembershipPlans']['parameters']['query']>;
|
|
18093
|
+
type CreateBody = NonNullable<operations['createMembershipPlan']['requestBody']>['content']['application/json'];
|
|
18094
|
+
type UpdateBody = NonNullable<operations['updateMembershipPlan']['requestBody']>['content']['application/json'];
|
|
18095
|
+
type SubscriptionListParams = NonNullable<operations['listMembershipSubscriptions']['parameters']['query']>;
|
|
18096
|
+
declare class MembershipPlansResource {
|
|
18097
|
+
private client;
|
|
18098
|
+
constructor(client: Hydra);
|
|
18099
|
+
list(params?: ListParams): Promise<ListResponse<MembershipPlan>>;
|
|
18100
|
+
iterate(params?: Omit<ListParams, 'cursor'>, options?: PaginateOptions): AsyncGenerator<MembershipPlan, void, undefined>;
|
|
18101
|
+
toArray(params?: Omit<ListParams, 'cursor'>, options?: PaginateOptions & {
|
|
18102
|
+
limit?: number;
|
|
18103
|
+
}): Promise<MembershipPlan[]>;
|
|
18104
|
+
get(id: string): Promise<DataResponse<MembershipPlan>>;
|
|
18105
|
+
create(body: CreateBody, options?: ResourceRequestOptions): Promise<DataResponse<MembershipPlan>>;
|
|
18106
|
+
update(id: string, body: UpdateBody): Promise<DataResponse<MembershipPlan>>;
|
|
18057
18107
|
delete(id: string): Promise<void>;
|
|
18108
|
+
listSubscriptions(params?: SubscriptionListParams): Promise<ListResponse<CustomerMembership>>;
|
|
18058
18109
|
}
|
|
18059
18110
|
|
|
18060
18111
|
interface AppInfo {
|
|
@@ -18135,6 +18186,7 @@ declare class Hydra {
|
|
|
18135
18186
|
readonly integrations: IntegrationsResource;
|
|
18136
18187
|
readonly posts: PostsResource;
|
|
18137
18188
|
readonly contentCategories: ContentCategoriesResource;
|
|
18189
|
+
readonly membershipPlans: MembershipPlansResource;
|
|
18138
18190
|
constructor(config: HydraConfig);
|
|
18139
18191
|
request<T>(method: string, path: string, options?: RequestOptions): Promise<T>;
|
|
18140
18192
|
/** Multipart upload for file-based endpoints (e.g. images) */
|
|
@@ -18216,4 +18268,4 @@ declare class HydraIdempotencyError extends HydraError {
|
|
|
18216
18268
|
constructor(body: HydraErrorBody, headers: Headers);
|
|
18217
18269
|
}
|
|
18218
18270
|
|
|
18219
|
-
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 };
|
|
18271
|
+
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,
|