@gethydra/sdk 0.1.4 → 0.1.5
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 +230 -187
- package/dist/index.js +72 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -17071,6 +17071,8 @@ type AnalyticsTimeSeries$1 = components['schemas']['AnalyticsTimeSeries'];
|
|
|
17071
17071
|
type AnalyticsOrdersSeries$1 = components['schemas']['AnalyticsOrdersSeries'];
|
|
17072
17072
|
type AnalyticsTopProduct$1 = components['schemas']['AnalyticsTopProduct'];
|
|
17073
17073
|
type AnalyticsActionItems$1 = components['schemas']['AnalyticsActionItems'];
|
|
17074
|
+
type Post$1 = components['schemas']['Post'];
|
|
17075
|
+
type ContentCategory$1 = components['schemas']['ContentCategory'];
|
|
17074
17076
|
interface Pagination {
|
|
17075
17077
|
cursor: string | null;
|
|
17076
17078
|
has_more: boolean;
|
|
@@ -17115,9 +17117,9 @@ type ProductStats = components['schemas']['ProductStats'];
|
|
|
17115
17117
|
type Variant$1 = components['schemas']['Variant'];
|
|
17116
17118
|
type Image$1 = components['schemas']['Image'];
|
|
17117
17119
|
type GenerateVariantsResult = components['schemas']['GenerateVariantsResult'];
|
|
17118
|
-
type ListParams$
|
|
17119
|
-
type CreateBody$
|
|
17120
|
-
type UpdateBody$
|
|
17120
|
+
type ListParams$q = NonNullable<operations['listProducts']['parameters']['query']>;
|
|
17121
|
+
type CreateBody$m = NonNullable<operations['createProduct']['requestBody']>['content']['application/json'];
|
|
17122
|
+
type UpdateBody$m = NonNullable<operations['updateProduct']['requestBody']>['content']['application/json'];
|
|
17121
17123
|
type DuplicateBody = NonNullable<operations['duplicateProduct']['requestBody']>['content']['application/json'];
|
|
17122
17124
|
type CreateVariantBody = NonNullable<operations['createProductVariant']['requestBody']>['content']['application/json'];
|
|
17123
17125
|
type GenerateVariantsBody = NonNullable<operations['generateProductVariants']['requestBody']>['content']['application/json'];
|
|
@@ -17127,17 +17129,17 @@ type CreateProductLinkBody = NonNullable<operations['createProductLink']['reques
|
|
|
17127
17129
|
declare class ProductsResource {
|
|
17128
17130
|
private client;
|
|
17129
17131
|
constructor(client: Hydra);
|
|
17130
|
-
list(params?: ListParams$
|
|
17131
|
-
iterate(params?: Omit<ListParams$
|
|
17132
|
-
toArray(params?: Omit<ListParams$
|
|
17132
|
+
list(params?: ListParams$q): Promise<ListResponse<Product>>;
|
|
17133
|
+
iterate(params?: Omit<ListParams$q, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Product, void, undefined>;
|
|
17134
|
+
toArray(params?: Omit<ListParams$q, 'cursor'>, options?: PaginateOptions & {
|
|
17133
17135
|
limit?: number;
|
|
17134
17136
|
}): Promise<Product[]>;
|
|
17135
|
-
get(id: string, params?: Pick<ListParams$
|
|
17136
|
-
create(body: CreateBody$
|
|
17137
|
-
update(id: string, body: UpdateBody$
|
|
17137
|
+
get(id: string, params?: Pick<ListParams$q, 'expand' | 'currency' | 'fields'>): Promise<DataResponse<Product>>;
|
|
17138
|
+
create(body: CreateBody$m, options?: ResourceRequestOptions): Promise<DataResponse<Product>>;
|
|
17139
|
+
update(id: string, body: UpdateBody$m): Promise<DataResponse<Product>>;
|
|
17138
17140
|
delete(id: string): Promise<void>;
|
|
17139
17141
|
batchCreate(body: {
|
|
17140
|
-
products: CreateBody$
|
|
17142
|
+
products: CreateBody$m[];
|
|
17141
17143
|
}, options?: ResourceRequestOptions): Promise<DataResponse<Product[]>>;
|
|
17142
17144
|
duplicate(id: string, body: DuplicateBody): Promise<DataResponse<Product>>;
|
|
17143
17145
|
getStats(id: string): Promise<DataResponse<ProductStats>>;
|
|
@@ -17158,7 +17160,7 @@ declare class ProductsResource {
|
|
|
17158
17160
|
|
|
17159
17161
|
type Variant = components['schemas']['Variant'];
|
|
17160
17162
|
type VariantPrice = components['schemas']['VariantPrice'];
|
|
17161
|
-
type UpdateBody$
|
|
17163
|
+
type UpdateBody$l = NonNullable<operations['updateVariant']['requestBody']>['content']['application/json'];
|
|
17162
17164
|
type UpsertPriceBody = NonNullable<operations['upsertVariantPrice']['requestBody']>['content']['application/json'];
|
|
17163
17165
|
declare class VariantsResource {
|
|
17164
17166
|
private client;
|
|
@@ -17168,7 +17170,7 @@ declare class VariantsResource {
|
|
|
17168
17170
|
currency?: string;
|
|
17169
17171
|
fields?: string;
|
|
17170
17172
|
}): Promise<DataResponse<Variant>>;
|
|
17171
|
-
update(id: string, body: UpdateBody$
|
|
17173
|
+
update(id: string, body: UpdateBody$l): Promise<DataResponse<Variant>>;
|
|
17172
17174
|
delete(id: string): Promise<void>;
|
|
17173
17175
|
listPrices(variantId: string): Promise<DataResponse<Record<string, VariantPrice>>>;
|
|
17174
17176
|
upsertPrice(variantId: string, priceKeySlug: string, body: UpsertPriceBody): Promise<DataResponse<VariantPrice>>;
|
|
@@ -17180,23 +17182,23 @@ declare class VariantsResource {
|
|
|
17180
17182
|
}
|
|
17181
17183
|
|
|
17182
17184
|
type Collection = components['schemas']['Collection'];
|
|
17183
|
-
type ListParams$
|
|
17184
|
-
type CreateBody$
|
|
17185
|
-
type UpdateBody$
|
|
17185
|
+
type ListParams$p = NonNullable<operations['listCollections']['parameters']['query']>;
|
|
17186
|
+
type CreateBody$l = NonNullable<operations['createCollection']['requestBody']>['content']['application/json'];
|
|
17187
|
+
type UpdateBody$k = NonNullable<operations['updateCollection']['requestBody']>['content']['application/json'];
|
|
17186
17188
|
type AddProductsBody = NonNullable<operations['addCollectionProducts']['requestBody']>['content']['application/json'];
|
|
17187
17189
|
type ReorderProductsBody = NonNullable<operations['reorderCollectionProducts']['requestBody']>['content']['application/json'];
|
|
17188
17190
|
type ReorderCollectionsBody = NonNullable<operations['reorderCollections']['requestBody']>['content']['application/json'];
|
|
17189
17191
|
declare class CollectionsResource {
|
|
17190
17192
|
private client;
|
|
17191
17193
|
constructor(client: Hydra);
|
|
17192
|
-
list(params?: ListParams$
|
|
17193
|
-
iterate(params?: Omit<ListParams$
|
|
17194
|
-
toArray(params?: Omit<ListParams$
|
|
17194
|
+
list(params?: ListParams$p): Promise<ListResponse<Collection>>;
|
|
17195
|
+
iterate(params?: Omit<ListParams$p, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Collection, void, undefined>;
|
|
17196
|
+
toArray(params?: Omit<ListParams$p, 'cursor'>, options?: PaginateOptions & {
|
|
17195
17197
|
limit?: number;
|
|
17196
17198
|
}): Promise<Collection[]>;
|
|
17197
|
-
get(id: string, params?: Pick<ListParams$
|
|
17198
|
-
create(body: CreateBody$
|
|
17199
|
-
update(id: string, body: UpdateBody$
|
|
17199
|
+
get(id: string, params?: Pick<ListParams$p, 'expand' | 'fields'>): Promise<DataResponse<Collection>>;
|
|
17200
|
+
create(body: CreateBody$l, options?: ResourceRequestOptions): Promise<DataResponse<Collection>>;
|
|
17201
|
+
update(id: string, body: UpdateBody$k): Promise<DataResponse<Collection>>;
|
|
17200
17202
|
delete(id: string): Promise<void>;
|
|
17201
17203
|
tree(): Promise<DataResponse<unknown>>;
|
|
17202
17204
|
reorder(body: ReorderCollectionsBody): Promise<void>;
|
|
@@ -17226,13 +17228,13 @@ declare class CartResource {
|
|
|
17226
17228
|
|
|
17227
17229
|
type CheckoutCreate = components['schemas']['CheckoutCreate'];
|
|
17228
17230
|
type CheckoutGet = components['schemas']['CheckoutGet'];
|
|
17229
|
-
type CreateBody$
|
|
17231
|
+
type CreateBody$k = NonNullable<operations['createCheckout']['requestBody']>['content']['application/json'];
|
|
17230
17232
|
type ApplyDiscountBody = NonNullable<operations['applyCheckoutDiscount']['requestBody']>['content']['application/json'];
|
|
17231
17233
|
type ApplyCreditBody = NonNullable<operations['applyCheckoutCredit']['requestBody']>['content']['application/json'];
|
|
17232
17234
|
declare class CheckoutResource {
|
|
17233
17235
|
private client;
|
|
17234
17236
|
constructor(client: Hydra);
|
|
17235
|
-
create(body: CreateBody$
|
|
17237
|
+
create(body: CreateBody$k, options?: ResourceRequestOptions): Promise<DataResponse<CheckoutCreate>>;
|
|
17236
17238
|
get(id: string): Promise<DataResponse<CheckoutGet>>;
|
|
17237
17239
|
applyDiscount(checkoutId: string, body: ApplyDiscountBody): Promise<DataResponse<CheckoutGet>>;
|
|
17238
17240
|
removeDiscount(checkoutId: string): Promise<DataResponse<CheckoutGet>>;
|
|
@@ -17243,15 +17245,15 @@ declare class CheckoutResource {
|
|
|
17243
17245
|
|
|
17244
17246
|
type Order$1 = components['schemas']['Order'];
|
|
17245
17247
|
type FulfillmentOrder$1 = components['schemas']['FulfillmentOrder'];
|
|
17246
|
-
type ListParams$
|
|
17247
|
-
type CreateBody$
|
|
17248
|
-
type UpdateBody$
|
|
17248
|
+
type ListParams$o = NonNullable<operations['listOrders']['parameters']['query']>;
|
|
17249
|
+
type CreateBody$j = NonNullable<operations['createOrder']['requestBody']>['content']['application/json'];
|
|
17250
|
+
type UpdateBody$j = NonNullable<operations['updateOrder']['requestBody']>['content']['application/json'];
|
|
17249
17251
|
declare class OrdersResource {
|
|
17250
17252
|
private client;
|
|
17251
17253
|
constructor(client: Hydra);
|
|
17252
|
-
list(params?: ListParams$
|
|
17253
|
-
iterate(params?: Omit<ListParams$
|
|
17254
|
-
toArray(params?: Omit<ListParams$
|
|
17254
|
+
list(params?: ListParams$o): Promise<ListResponse<Order$1>>;
|
|
17255
|
+
iterate(params?: Omit<ListParams$o, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Order$1, void, undefined>;
|
|
17256
|
+
toArray(params?: Omit<ListParams$o, 'cursor'>, options?: PaginateOptions & {
|
|
17255
17257
|
limit?: number;
|
|
17256
17258
|
}): Promise<Order$1[]>;
|
|
17257
17259
|
get(id: string, params?: {
|
|
@@ -17259,8 +17261,8 @@ declare class OrdersResource {
|
|
|
17259
17261
|
currency?: string;
|
|
17260
17262
|
fields?: string;
|
|
17261
17263
|
}): Promise<DataResponse<Order$1>>;
|
|
17262
|
-
create(body: CreateBody$
|
|
17263
|
-
update(id: string, body: UpdateBody$
|
|
17264
|
+
create(body: CreateBody$j, options?: ResourceRequestOptions): Promise<DataResponse<Order$1>>;
|
|
17265
|
+
update(id: string, body: UpdateBody$j): Promise<DataResponse<Order$1>>;
|
|
17264
17266
|
listFulfillmentOrders(orderId: string): Promise<DataResponse<FulfillmentOrder$1[]>>;
|
|
17265
17267
|
/**
|
|
17266
17268
|
* Returns the API path for downloading the invoice PDF for an order.
|
|
@@ -17274,34 +17276,34 @@ declare class OrdersResource {
|
|
|
17274
17276
|
}
|
|
17275
17277
|
|
|
17276
17278
|
type Fulfillment = components['schemas']['Fulfillment'];
|
|
17277
|
-
type CreateBody$
|
|
17278
|
-
type UpdateBody$
|
|
17279
|
+
type CreateBody$i = NonNullable<operations['createFulfillment']['requestBody']>['content']['application/json'];
|
|
17280
|
+
type UpdateBody$i = NonNullable<operations['updateFulfillment']['requestBody']>['content']['application/json'];
|
|
17279
17281
|
type CancelBody = NonNullable<operations['cancelFulfillment']['requestBody']>['content']['application/json'];
|
|
17280
17282
|
declare class FulfillmentsResource {
|
|
17281
17283
|
private client;
|
|
17282
17284
|
constructor(client: Hydra);
|
|
17283
17285
|
/** Create a fulfillment for a fulfillment order */
|
|
17284
|
-
create(fulfillmentOrderId: string, body: CreateBody$
|
|
17285
|
-
update(id: string, body: UpdateBody$
|
|
17286
|
+
create(fulfillmentOrderId: string, body: CreateBody$i, options?: ResourceRequestOptions): Promise<DataResponse<Fulfillment>>;
|
|
17287
|
+
update(id: string, body: UpdateBody$i): Promise<DataResponse<Fulfillment>>;
|
|
17286
17288
|
cancel(id: string, body?: CancelBody): Promise<DataResponse<Fulfillment>>;
|
|
17287
17289
|
}
|
|
17288
17290
|
|
|
17289
17291
|
type Refund = components['schemas']['Refund'];
|
|
17290
|
-
type ListParams$
|
|
17291
|
-
type CreateBody$
|
|
17292
|
+
type ListParams$n = NonNullable<operations['listRefunds']['parameters']['query']>;
|
|
17293
|
+
type CreateBody$h = NonNullable<operations['createOrderRefund']['requestBody']>['content']['application/json'];
|
|
17292
17294
|
declare class RefundsResource {
|
|
17293
17295
|
private client;
|
|
17294
17296
|
constructor(client: Hydra);
|
|
17295
|
-
list(params?: ListParams$
|
|
17296
|
-
iterate(params?: Omit<ListParams$
|
|
17297
|
-
toArray(params?: Omit<ListParams$
|
|
17297
|
+
list(params?: ListParams$n): Promise<ListResponse<Refund>>;
|
|
17298
|
+
iterate(params?: Omit<ListParams$n, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Refund, void, undefined>;
|
|
17299
|
+
toArray(params?: Omit<ListParams$n, 'cursor'>, options?: PaginateOptions & {
|
|
17298
17300
|
limit?: number;
|
|
17299
17301
|
}): Promise<Refund[]>;
|
|
17300
17302
|
get(id: string, params?: {
|
|
17301
17303
|
expand?: string;
|
|
17302
17304
|
fields?: string;
|
|
17303
17305
|
}): Promise<DataResponse<Refund>>;
|
|
17304
|
-
create(orderId: string, body: CreateBody$
|
|
17306
|
+
create(orderId: string, body: CreateBody$h, options?: ResourceRequestOptions): Promise<DataResponse<Refund>>;
|
|
17305
17307
|
listByOrder(orderId: string): Promise<DataResponse<Refund[]>>;
|
|
17306
17308
|
retry(id: string): Promise<DataResponse<Refund>>;
|
|
17307
17309
|
/**
|
|
@@ -17312,24 +17314,24 @@ declare class RefundsResource {
|
|
|
17312
17314
|
}
|
|
17313
17315
|
|
|
17314
17316
|
type Return = components['schemas']['Return'];
|
|
17315
|
-
type ListParams$
|
|
17316
|
-
type CreateBody$
|
|
17317
|
+
type ListParams$m = NonNullable<operations['listReturns']['parameters']['query']>;
|
|
17318
|
+
type CreateBody$g = NonNullable<operations['createOrderReturn']['requestBody']>['content']['application/json'];
|
|
17317
17319
|
type ApproveBody = NonNullable<operations['approveReturn']['requestBody']>['content']['application/json'];
|
|
17318
17320
|
type ReceiveBody$1 = NonNullable<operations['receiveReturn']['requestBody']>['content']['application/json'];
|
|
17319
17321
|
type RejectBody = NonNullable<operations['rejectReturn']['requestBody']>['content']['application/json'];
|
|
17320
17322
|
declare class ReturnsResource {
|
|
17321
17323
|
private client;
|
|
17322
17324
|
constructor(client: Hydra);
|
|
17323
|
-
list(params?: ListParams$
|
|
17324
|
-
iterate(params?: Omit<ListParams$
|
|
17325
|
-
toArray(params?: Omit<ListParams$
|
|
17325
|
+
list(params?: ListParams$m): Promise<ListResponse<Return>>;
|
|
17326
|
+
iterate(params?: Omit<ListParams$m, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Return, void, undefined>;
|
|
17327
|
+
toArray(params?: Omit<ListParams$m, 'cursor'>, options?: PaginateOptions & {
|
|
17326
17328
|
limit?: number;
|
|
17327
17329
|
}): Promise<Return[]>;
|
|
17328
17330
|
get(id: string, params?: {
|
|
17329
17331
|
expand?: string;
|
|
17330
17332
|
fields?: string;
|
|
17331
17333
|
}): Promise<DataResponse<Return>>;
|
|
17332
|
-
create(orderId: string, body: CreateBody$
|
|
17334
|
+
create(orderId: string, body: CreateBody$g, options?: ResourceRequestOptions): Promise<DataResponse<Return>>;
|
|
17333
17335
|
listByOrder(orderId: string): Promise<DataResponse<Return[]>>;
|
|
17334
17336
|
approve(id: string, body?: ApproveBody): Promise<DataResponse<Return>>;
|
|
17335
17337
|
receive(id: string, body?: ReceiveBody$1): Promise<DataResponse<Return>>;
|
|
@@ -17341,17 +17343,17 @@ declare class ReturnsResource {
|
|
|
17341
17343
|
type DraftOrder = components['schemas']['DraftOrder'];
|
|
17342
17344
|
type DraftOrderLineItem = components['schemas']['DraftOrderLineItem'];
|
|
17343
17345
|
type Order = components['schemas']['Order'];
|
|
17344
|
-
type ListParams$
|
|
17345
|
-
type CreateBody$
|
|
17346
|
-
type UpdateBody$
|
|
17346
|
+
type ListParams$l = NonNullable<operations['listDraftOrders']['parameters']['query']>;
|
|
17347
|
+
type CreateBody$f = NonNullable<operations['createDraftOrder']['requestBody']>['content']['application/json'];
|
|
17348
|
+
type UpdateBody$h = NonNullable<operations['updateDraftOrder']['requestBody']>['content']['application/json'];
|
|
17347
17349
|
type AddItemsBody = NonNullable<operations['addDraftOrderItems']['requestBody']>['content']['application/json'];
|
|
17348
17350
|
type UpdateItemBody$2 = NonNullable<operations['updateDraftOrderItem']['requestBody']>['content']['application/json'];
|
|
17349
17351
|
declare class DraftOrdersResource {
|
|
17350
17352
|
private client;
|
|
17351
17353
|
constructor(client: Hydra);
|
|
17352
|
-
list(params?: ListParams$
|
|
17353
|
-
iterate(params?: Omit<ListParams$
|
|
17354
|
-
toArray(params?: Omit<ListParams$
|
|
17354
|
+
list(params?: ListParams$l): Promise<ListResponse<DraftOrder>>;
|
|
17355
|
+
iterate(params?: Omit<ListParams$l, 'cursor'>, options?: PaginateOptions): AsyncGenerator<DraftOrder, void, undefined>;
|
|
17356
|
+
toArray(params?: Omit<ListParams$l, 'cursor'>, options?: PaginateOptions & {
|
|
17355
17357
|
limit?: number;
|
|
17356
17358
|
}): Promise<DraftOrder[]>;
|
|
17357
17359
|
get(id: string, params?: {
|
|
@@ -17359,8 +17361,8 @@ declare class DraftOrdersResource {
|
|
|
17359
17361
|
currency?: string;
|
|
17360
17362
|
fields?: string;
|
|
17361
17363
|
}): Promise<DataResponse<DraftOrder>>;
|
|
17362
|
-
create(body: CreateBody$
|
|
17363
|
-
update(id: string, body: UpdateBody$
|
|
17364
|
+
create(body: CreateBody$f, options?: ResourceRequestOptions): Promise<DataResponse<DraftOrder>>;
|
|
17365
|
+
update(id: string, body: UpdateBody$h): Promise<DataResponse<DraftOrder>>;
|
|
17364
17366
|
delete(id: string): Promise<void>;
|
|
17365
17367
|
addItems(draftOrderId: string, body: AddItemsBody): Promise<DataResponse<DraftOrderLineItem[]>>;
|
|
17366
17368
|
updateItem(draftOrderId: string, itemId: string, body: UpdateItemBody$2): Promise<DataResponse<DraftOrderLineItem>>;
|
|
@@ -17375,22 +17377,22 @@ declare class DraftOrdersResource {
|
|
|
17375
17377
|
}
|
|
17376
17378
|
|
|
17377
17379
|
type Customer = components['schemas']['Customer'];
|
|
17378
|
-
type ListParams$
|
|
17379
|
-
type CreateBody$
|
|
17380
|
-
type UpdateBody$
|
|
17380
|
+
type ListParams$k = NonNullable<operations['listCustomers']['parameters']['query']>;
|
|
17381
|
+
type CreateBody$e = NonNullable<operations['createCustomer']['requestBody']>['content']['application/json'];
|
|
17382
|
+
type UpdateBody$g = NonNullable<operations['updateCustomer']['requestBody']>['content']['application/json'];
|
|
17381
17383
|
type CreateAddressBody$1 = NonNullable<operations['createCustomerAddress']['requestBody']>['content']['application/json'];
|
|
17382
17384
|
type CreateNoteBody$1 = NonNullable<operations['createCustomerNote']['requestBody']>['content']['application/json'];
|
|
17383
17385
|
declare class CustomersResource {
|
|
17384
17386
|
private client;
|
|
17385
17387
|
constructor(client: Hydra);
|
|
17386
|
-
list(params?: ListParams$
|
|
17387
|
-
iterate(params?: Omit<ListParams$
|
|
17388
|
-
toArray(params?: Omit<ListParams$
|
|
17388
|
+
list(params?: ListParams$k): Promise<ListResponse<Customer>>;
|
|
17389
|
+
iterate(params?: Omit<ListParams$k, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Customer, void, undefined>;
|
|
17390
|
+
toArray(params?: Omit<ListParams$k, 'cursor'>, options?: PaginateOptions & {
|
|
17389
17391
|
limit?: number;
|
|
17390
17392
|
}): Promise<Customer[]>;
|
|
17391
|
-
get(id: string, params?: Pick<ListParams$
|
|
17392
|
-
create(body: CreateBody$
|
|
17393
|
-
update(id: string, body: UpdateBody$
|
|
17393
|
+
get(id: string, params?: Pick<ListParams$k, 'expand' | 'fields'>): Promise<DataResponse<Customer>>;
|
|
17394
|
+
create(body: CreateBody$e, options?: ResourceRequestOptions): Promise<DataResponse<Customer>>;
|
|
17395
|
+
update(id: string, body: UpdateBody$g): Promise<DataResponse<Customer>>;
|
|
17394
17396
|
delete(id: string): Promise<void>;
|
|
17395
17397
|
listAddresses(customerId: string): Promise<DataResponse<unknown[]>>;
|
|
17396
17398
|
createAddress(customerId: string, body: CreateAddressBody$1): Promise<DataResponse<unknown>>;
|
|
@@ -17404,38 +17406,38 @@ declare class CustomersResource {
|
|
|
17404
17406
|
}
|
|
17405
17407
|
|
|
17406
17408
|
type CustomerGroup = components['schemas']['CustomerGroup'];
|
|
17407
|
-
type ListParams$
|
|
17408
|
-
type CreateBody$
|
|
17409
|
-
type UpdateBody$
|
|
17409
|
+
type ListParams$j = NonNullable<operations['listCustomerGroups']['parameters']['query']>;
|
|
17410
|
+
type CreateBody$d = NonNullable<operations['createCustomerGroup']['requestBody']>['content']['application/json'];
|
|
17411
|
+
type UpdateBody$f = NonNullable<operations['updateCustomerGroup']['requestBody']>['content']['application/json'];
|
|
17410
17412
|
type AddMembersBody = NonNullable<operations['addCustomerGroupMembers']['requestBody']>['content']['application/json'];
|
|
17411
17413
|
declare class CustomerGroupsResource {
|
|
17412
17414
|
private client;
|
|
17413
17415
|
constructor(client: Hydra);
|
|
17414
|
-
list(params?: ListParams$
|
|
17415
|
-
iterate(params?: Omit<ListParams$
|
|
17416
|
-
toArray(params?: Omit<ListParams$
|
|
17416
|
+
list(params?: ListParams$j): Promise<ListResponse<CustomerGroup>>;
|
|
17417
|
+
iterate(params?: Omit<ListParams$j, 'cursor'>, options?: PaginateOptions): AsyncGenerator<CustomerGroup, void, undefined>;
|
|
17418
|
+
toArray(params?: Omit<ListParams$j, 'cursor'>, options?: PaginateOptions & {
|
|
17417
17419
|
limit?: number;
|
|
17418
17420
|
}): Promise<CustomerGroup[]>;
|
|
17419
17421
|
get(id: string): Promise<DataResponse<CustomerGroup>>;
|
|
17420
|
-
create(body: CreateBody$
|
|
17421
|
-
update(id: string, body: UpdateBody$
|
|
17422
|
+
create(body: CreateBody$d, options?: ResourceRequestOptions): Promise<DataResponse<CustomerGroup>>;
|
|
17423
|
+
update(id: string, body: UpdateBody$f): Promise<DataResponse<CustomerGroup>>;
|
|
17422
17424
|
delete(id: string): Promise<void>;
|
|
17423
17425
|
addMembers(groupId: string, body: AddMembersBody): Promise<void>;
|
|
17424
17426
|
removeMember(groupId: string, customerId: string): Promise<void>;
|
|
17425
17427
|
}
|
|
17426
17428
|
|
|
17427
|
-
type UpdateBody$
|
|
17429
|
+
type UpdateBody$e = NonNullable<operations['updateAddress']['requestBody']>['content']['application/json'];
|
|
17428
17430
|
declare class AddressesResource {
|
|
17429
17431
|
private client;
|
|
17430
17432
|
constructor(client: Hydra);
|
|
17431
|
-
update(id: string, body: UpdateBody$
|
|
17433
|
+
update(id: string, body: UpdateBody$e): Promise<DataResponse<unknown>>;
|
|
17432
17434
|
delete(id: string): Promise<void>;
|
|
17433
17435
|
}
|
|
17434
17436
|
|
|
17435
17437
|
type InventoryLevel = components['schemas']['InventoryLevel'];
|
|
17436
17438
|
type InventoryAdjustment = components['schemas']['InventoryAdjustment'];
|
|
17437
17439
|
type ProductAdjustment = components['schemas']['ProductAdjustment'];
|
|
17438
|
-
type ListParams$
|
|
17440
|
+
type ListParams$i = NonNullable<operations['listInventory']['parameters']['query']>;
|
|
17439
17441
|
type SetBody = NonNullable<operations['setInventory']['requestBody']>['content']['application/json'];
|
|
17440
17442
|
type AdjustBody = NonNullable<operations['adjustInventory']['requestBody']>['content']['application/json'];
|
|
17441
17443
|
type InventoryResult = InventoryLevel & {
|
|
@@ -17444,9 +17446,9 @@ type InventoryResult = InventoryLevel & {
|
|
|
17444
17446
|
declare class InventoryResource {
|
|
17445
17447
|
private client;
|
|
17446
17448
|
constructor(client: Hydra);
|
|
17447
|
-
list(params?: ListParams$
|
|
17448
|
-
iterate(params?: Omit<ListParams$
|
|
17449
|
-
toArray(params?: Omit<ListParams$
|
|
17449
|
+
list(params?: ListParams$i): Promise<ListResponse<InventoryLevel>>;
|
|
17450
|
+
iterate(params?: Omit<ListParams$i, 'cursor'>, options?: PaginateOptions): AsyncGenerator<InventoryLevel, void, undefined>;
|
|
17451
|
+
toArray(params?: Omit<ListParams$i, 'cursor'>, options?: PaginateOptions & {
|
|
17450
17452
|
limit?: number;
|
|
17451
17453
|
}): Promise<InventoryLevel[]>;
|
|
17452
17454
|
listAdjustments(params: {
|
|
@@ -17518,56 +17520,56 @@ declare class ShippingResource {
|
|
|
17518
17520
|
}
|
|
17519
17521
|
|
|
17520
17522
|
type Promotion = components['schemas']['Promotion'];
|
|
17521
|
-
type ListParams$
|
|
17522
|
-
type CreateBody$
|
|
17523
|
-
type UpdateBody$
|
|
17523
|
+
type ListParams$h = NonNullable<operations['listPromotions']['parameters']['query']>;
|
|
17524
|
+
type CreateBody$c = NonNullable<operations['createPromotion']['requestBody']>['content']['application/json'];
|
|
17525
|
+
type UpdateBody$d = NonNullable<operations['updatePromotion']['requestBody']>['content']['application/json'];
|
|
17524
17526
|
declare class PromotionsResource {
|
|
17525
17527
|
private client;
|
|
17526
17528
|
constructor(client: Hydra);
|
|
17527
|
-
list(params?: ListParams$
|
|
17528
|
-
iterate(params?: Omit<ListParams$
|
|
17529
|
-
toArray(params?: Omit<ListParams$
|
|
17529
|
+
list(params?: ListParams$h): Promise<ListResponse<Promotion>>;
|
|
17530
|
+
iterate(params?: Omit<ListParams$h, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Promotion, void, undefined>;
|
|
17531
|
+
toArray(params?: Omit<ListParams$h, 'cursor'>, options?: PaginateOptions & {
|
|
17530
17532
|
limit?: number;
|
|
17531
17533
|
}): Promise<Promotion[]>;
|
|
17532
17534
|
get(id: string): Promise<DataResponse<Promotion>>;
|
|
17533
|
-
create(body: CreateBody$
|
|
17534
|
-
update(id: string, body: UpdateBody$
|
|
17535
|
+
create(body: CreateBody$c, options?: ResourceRequestOptions): Promise<DataResponse<Promotion>>;
|
|
17536
|
+
update(id: string, body: UpdateBody$d): Promise<DataResponse<Promotion>>;
|
|
17535
17537
|
delete(id: string): Promise<void>;
|
|
17536
17538
|
}
|
|
17537
17539
|
|
|
17538
17540
|
type Discount = components['schemas']['Discount'];
|
|
17539
|
-
type ListParams$
|
|
17540
|
-
type CreateBody$
|
|
17541
|
-
type UpdateBody$
|
|
17541
|
+
type ListParams$g = NonNullable<operations['listDiscounts']['parameters']['query']>;
|
|
17542
|
+
type CreateBody$b = NonNullable<operations['createDiscount']['requestBody']>['content']['application/json'];
|
|
17543
|
+
type UpdateBody$c = NonNullable<operations['updateDiscount']['requestBody']>['content']['application/json'];
|
|
17542
17544
|
declare class DiscountsResource {
|
|
17543
17545
|
private client;
|
|
17544
17546
|
constructor(client: Hydra);
|
|
17545
|
-
list(params?: ListParams$
|
|
17546
|
-
iterate(params?: Omit<ListParams$
|
|
17547
|
-
toArray(params?: Omit<ListParams$
|
|
17547
|
+
list(params?: ListParams$g): Promise<ListResponse<Discount>>;
|
|
17548
|
+
iterate(params?: Omit<ListParams$g, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Discount, void, undefined>;
|
|
17549
|
+
toArray(params?: Omit<ListParams$g, 'cursor'>, options?: PaginateOptions & {
|
|
17548
17550
|
limit?: number;
|
|
17549
17551
|
}): Promise<Discount[]>;
|
|
17550
17552
|
get(id: string): Promise<DataResponse<Discount>>;
|
|
17551
|
-
create(body: CreateBody$
|
|
17552
|
-
update(id: string, body: UpdateBody$
|
|
17553
|
+
create(body: CreateBody$b, options?: ResourceRequestOptions): Promise<DataResponse<Discount>>;
|
|
17554
|
+
update(id: string, body: UpdateBody$c): Promise<DataResponse<Discount>>;
|
|
17553
17555
|
delete(id: string): Promise<void>;
|
|
17554
17556
|
}
|
|
17555
17557
|
|
|
17556
17558
|
type Image = components['schemas']['Image'];
|
|
17557
|
-
type ListParams$
|
|
17558
|
-
type UpdateBody$
|
|
17559
|
+
type ListParams$f = NonNullable<operations['listImages']['parameters']['query']>;
|
|
17560
|
+
type UpdateBody$b = NonNullable<operations['updateImage']['requestBody']>['content']['application/json'];
|
|
17559
17561
|
type ReorderBody$2 = NonNullable<operations['reorderImages']['requestBody']>['content']['application/json'];
|
|
17560
17562
|
declare class ImagesResource {
|
|
17561
17563
|
private client;
|
|
17562
17564
|
constructor(client: Hydra);
|
|
17563
|
-
list(params?: ListParams$
|
|
17564
|
-
iterate(params?: Omit<ListParams$
|
|
17565
|
-
toArray(params?: Omit<ListParams$
|
|
17565
|
+
list(params?: ListParams$f): Promise<ListResponse<Image>>;
|
|
17566
|
+
iterate(params?: Omit<ListParams$f, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Image, void, undefined>;
|
|
17567
|
+
toArray(params?: Omit<ListParams$f, 'cursor'>, options?: PaginateOptions & {
|
|
17566
17568
|
limit?: number;
|
|
17567
17569
|
}): Promise<Image[]>;
|
|
17568
17570
|
/** Upload an image to the store library */
|
|
17569
17571
|
upload(formData: FormData): Promise<DataResponse<Image>>;
|
|
17570
|
-
update(id: string, body: UpdateBody$
|
|
17572
|
+
update(id: string, body: UpdateBody$b): Promise<DataResponse<Image>>;
|
|
17571
17573
|
delete(id: string): Promise<void>;
|
|
17572
17574
|
detach(id: string): Promise<void>;
|
|
17573
17575
|
batchDelete(imageIds: string[]): Promise<void>;
|
|
@@ -17576,32 +17578,32 @@ declare class ImagesResource {
|
|
|
17576
17578
|
}
|
|
17577
17579
|
|
|
17578
17580
|
type Webhook = components['schemas']['Webhook'];
|
|
17579
|
-
type ListParams$
|
|
17580
|
-
type CreateBody$
|
|
17581
|
-
type UpdateBody$
|
|
17581
|
+
type ListParams$e = NonNullable<operations['listWebhooks']['parameters']['query']>;
|
|
17582
|
+
type CreateBody$a = NonNullable<operations['createWebhook']['requestBody']>['content']['application/json'];
|
|
17583
|
+
type UpdateBody$a = NonNullable<operations['updateWebhook']['requestBody']>['content']['application/json'];
|
|
17582
17584
|
declare class WebhooksResource {
|
|
17583
17585
|
private client;
|
|
17584
17586
|
constructor(client: Hydra);
|
|
17585
|
-
list(params?: ListParams$
|
|
17586
|
-
iterate(params?: Omit<ListParams$
|
|
17587
|
-
toArray(params?: Omit<ListParams$
|
|
17587
|
+
list(params?: ListParams$e): Promise<ListResponse<Webhook>>;
|
|
17588
|
+
iterate(params?: Omit<ListParams$e, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Webhook, void, undefined>;
|
|
17589
|
+
toArray(params?: Omit<ListParams$e, 'cursor'>, options?: PaginateOptions & {
|
|
17588
17590
|
limit?: number;
|
|
17589
17591
|
}): Promise<Webhook[]>;
|
|
17590
17592
|
get(id: string): Promise<DataResponse<Webhook>>;
|
|
17591
|
-
create(body: CreateBody$
|
|
17592
|
-
update(id: string, body: UpdateBody$
|
|
17593
|
+
create(body: CreateBody$a, options?: ResourceRequestOptions): Promise<DataResponse<Webhook>>;
|
|
17594
|
+
update(id: string, body: UpdateBody$a): Promise<DataResponse<Webhook>>;
|
|
17593
17595
|
delete(id: string): Promise<void>;
|
|
17594
17596
|
}
|
|
17595
17597
|
|
|
17596
17598
|
type Store = components['schemas']['Store'];
|
|
17597
|
-
type UpdateBody$
|
|
17599
|
+
type UpdateBody$9 = NonNullable<operations['updateStore']['requestBody']>['content']['application/json'];
|
|
17598
17600
|
declare class StoreResource {
|
|
17599
17601
|
private client;
|
|
17600
17602
|
constructor(client: Hydra);
|
|
17601
17603
|
get(params?: {
|
|
17602
17604
|
fields?: string;
|
|
17603
17605
|
}): Promise<DataResponse<Store>>;
|
|
17604
|
-
update(body: UpdateBody$
|
|
17606
|
+
update(body: UpdateBody$9): Promise<DataResponse<Store>>;
|
|
17605
17607
|
getDomainRecord(): Promise<DataResponse<unknown>>;
|
|
17606
17608
|
verifyDomain(): Promise<DataResponse<unknown>>;
|
|
17607
17609
|
publish(): Promise<DataResponse<{
|
|
@@ -17613,42 +17615,42 @@ declare class StoreResource {
|
|
|
17613
17615
|
}
|
|
17614
17616
|
|
|
17615
17617
|
type Tag = components['schemas']['Tag'];
|
|
17616
|
-
type ListParams$
|
|
17617
|
-
type CreateBody$
|
|
17618
|
-
type UpdateBody$
|
|
17618
|
+
type ListParams$d = NonNullable<operations['listTags']['parameters']['query']>;
|
|
17619
|
+
type CreateBody$9 = NonNullable<operations['createTag']['requestBody']>['content']['application/json'];
|
|
17620
|
+
type UpdateBody$8 = NonNullable<operations['updateTag']['requestBody']>['content']['application/json'];
|
|
17619
17621
|
declare class TagsResource {
|
|
17620
17622
|
private client;
|
|
17621
17623
|
constructor(client: Hydra);
|
|
17622
|
-
list(params?: ListParams$
|
|
17623
|
-
iterate(params?: Omit<ListParams$
|
|
17624
|
-
toArray(params?: Omit<ListParams$
|
|
17624
|
+
list(params?: ListParams$d): Promise<ListResponse<Tag>>;
|
|
17625
|
+
iterate(params?: Omit<ListParams$d, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Tag, void, undefined>;
|
|
17626
|
+
toArray(params?: Omit<ListParams$d, 'cursor'>, options?: PaginateOptions & {
|
|
17625
17627
|
limit?: number;
|
|
17626
17628
|
}): Promise<Tag[]>;
|
|
17627
|
-
create(body: CreateBody$
|
|
17628
|
-
update(id: string, body: UpdateBody$
|
|
17629
|
+
create(body: CreateBody$9, options?: ResourceRequestOptions): Promise<DataResponse<Tag>>;
|
|
17630
|
+
update(id: string, body: UpdateBody$8): Promise<DataResponse<Tag>>;
|
|
17629
17631
|
delete(id: string): Promise<void>;
|
|
17630
17632
|
}
|
|
17631
17633
|
|
|
17632
17634
|
type Redirect = components['schemas']['Redirect'];
|
|
17633
|
-
type ListParams$
|
|
17634
|
-
type CreateBody$
|
|
17635
|
+
type ListParams$c = NonNullable<operations['listRedirects']['parameters']['query']>;
|
|
17636
|
+
type CreateBody$8 = NonNullable<operations['createRedirect']['requestBody']>['content']['application/json'];
|
|
17635
17637
|
declare class RedirectsResource {
|
|
17636
17638
|
private client;
|
|
17637
17639
|
constructor(client: Hydra);
|
|
17638
|
-
list(params?: ListParams$
|
|
17639
|
-
iterate(params?: Omit<ListParams$
|
|
17640
|
-
toArray(params?: Omit<ListParams$
|
|
17640
|
+
list(params?: ListParams$c): Promise<ListResponse<Redirect>>;
|
|
17641
|
+
iterate(params?: Omit<ListParams$c, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Redirect, void, undefined>;
|
|
17642
|
+
toArray(params?: Omit<ListParams$c, 'cursor'>, options?: PaginateOptions & {
|
|
17641
17643
|
limit?: number;
|
|
17642
17644
|
}): Promise<Redirect[]>;
|
|
17643
|
-
create(body: CreateBody$
|
|
17645
|
+
create(body: CreateBody$8, options?: ResourceRequestOptions): Promise<DataResponse<Redirect>>;
|
|
17644
17646
|
lookup(path: string): Promise<DataResponse<Redirect>>;
|
|
17645
17647
|
delete(id: string): Promise<void>;
|
|
17646
17648
|
}
|
|
17647
17649
|
|
|
17648
17650
|
type Company = components['schemas']['Company'];
|
|
17649
|
-
type ListParams$
|
|
17650
|
-
type CreateBody$
|
|
17651
|
-
type UpdateBody$
|
|
17651
|
+
type ListParams$b = NonNullable<operations['listCompanies']['parameters']['query']>;
|
|
17652
|
+
type CreateBody$7 = NonNullable<operations['createCompany']['requestBody']>['content']['application/json'];
|
|
17653
|
+
type UpdateBody$7 = NonNullable<operations['updateCompany']['requestBody']>['content']['application/json'];
|
|
17652
17654
|
type CreateAddressBody = NonNullable<operations['createCompanyAddress']['requestBody']>['content']['application/json'];
|
|
17653
17655
|
type UpdateAddressBody = NonNullable<operations['updateCompanyAddress']['requestBody']>['content']['application/json'];
|
|
17654
17656
|
type CreateContactBody = NonNullable<operations['createCompanyContact']['requestBody']>['content']['application/json'];
|
|
@@ -17657,14 +17659,14 @@ type CreateNoteBody = NonNullable<operations['createCompanyNote']['requestBody']
|
|
|
17657
17659
|
declare class CompaniesResource {
|
|
17658
17660
|
private client;
|
|
17659
17661
|
constructor(client: Hydra);
|
|
17660
|
-
list(params?: ListParams$
|
|
17661
|
-
iterate(params?: Omit<ListParams$
|
|
17662
|
-
toArray(params?: Omit<ListParams$
|
|
17662
|
+
list(params?: ListParams$b): Promise<ListResponse<Company>>;
|
|
17663
|
+
iterate(params?: Omit<ListParams$b, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Company, void, undefined>;
|
|
17664
|
+
toArray(params?: Omit<ListParams$b, 'cursor'>, options?: PaginateOptions & {
|
|
17663
17665
|
limit?: number;
|
|
17664
17666
|
}): Promise<Company[]>;
|
|
17665
|
-
get(id: string, params?: Pick<ListParams$
|
|
17666
|
-
create(body: CreateBody$
|
|
17667
|
-
update(id: string, body: UpdateBody$
|
|
17667
|
+
get(id: string, params?: Pick<ListParams$b, 'expand' | 'fields'>): Promise<DataResponse<Company>>;
|
|
17668
|
+
create(body: CreateBody$7, options?: ResourceRequestOptions): Promise<DataResponse<Company>>;
|
|
17669
|
+
update(id: string, body: UpdateBody$7): Promise<DataResponse<Company>>;
|
|
17668
17670
|
delete(id: string): Promise<void>;
|
|
17669
17671
|
listAddresses(companyId: string): Promise<DataResponse<unknown[]>>;
|
|
17670
17672
|
createAddress(companyId: string, body: CreateAddressBody): Promise<DataResponse<unknown>>;
|
|
@@ -17680,23 +17682,23 @@ declare class CompaniesResource {
|
|
|
17680
17682
|
}
|
|
17681
17683
|
|
|
17682
17684
|
type PurchaseOrder = components['schemas']['PurchaseOrder'];
|
|
17683
|
-
type ListParams$
|
|
17684
|
-
type CreateBody$
|
|
17685
|
-
type UpdateBody$
|
|
17685
|
+
type ListParams$a = NonNullable<operations['listPurchaseOrders']['parameters']['query']>;
|
|
17686
|
+
type CreateBody$6 = NonNullable<operations['createPurchaseOrder']['requestBody']>['content']['application/json'];
|
|
17687
|
+
type UpdateBody$6 = NonNullable<operations['updatePurchaseOrder']['requestBody']>['content']['application/json'];
|
|
17686
17688
|
type AddItemBody = NonNullable<operations['addPurchaseOrderItems']['requestBody']>['content']['application/json'];
|
|
17687
17689
|
type UpdateItemBody$1 = NonNullable<operations['updatePurchaseOrderItem']['requestBody']>['content']['application/json'];
|
|
17688
17690
|
type ReceiveBody = NonNullable<operations['receivePurchaseOrderItems']['requestBody']>['content']['application/json'];
|
|
17689
17691
|
declare class PurchaseOrdersResource {
|
|
17690
17692
|
private client;
|
|
17691
17693
|
constructor(client: Hydra);
|
|
17692
|
-
list(params?: ListParams$
|
|
17693
|
-
iterate(params?: Omit<ListParams$
|
|
17694
|
-
toArray(params?: Omit<ListParams$
|
|
17694
|
+
list(params?: ListParams$a): Promise<ListResponse<PurchaseOrder>>;
|
|
17695
|
+
iterate(params?: Omit<ListParams$a, 'cursor'>, options?: PaginateOptions): AsyncGenerator<PurchaseOrder, void, undefined>;
|
|
17696
|
+
toArray(params?: Omit<ListParams$a, 'cursor'>, options?: PaginateOptions & {
|
|
17695
17697
|
limit?: number;
|
|
17696
17698
|
}): Promise<PurchaseOrder[]>;
|
|
17697
|
-
get(id: string, params?: Pick<ListParams$
|
|
17698
|
-
create(body: CreateBody$
|
|
17699
|
-
update(id: string, body: UpdateBody$
|
|
17699
|
+
get(id: string, params?: Pick<ListParams$a, 'expand' | 'fields'>): Promise<DataResponse<PurchaseOrder>>;
|
|
17700
|
+
create(body: CreateBody$6, options?: ResourceRequestOptions): Promise<DataResponse<PurchaseOrder>>;
|
|
17701
|
+
update(id: string, body: UpdateBody$6): Promise<DataResponse<PurchaseOrder>>;
|
|
17700
17702
|
delete(id: string): Promise<void>;
|
|
17701
17703
|
addItem(purchaseOrderId: string, body: AddItemBody): Promise<DataResponse<unknown>>;
|
|
17702
17704
|
updateItem(purchaseOrderId: string, itemId: string, body: UpdateItemBody$1): Promise<DataResponse<unknown>>;
|
|
@@ -17719,17 +17721,17 @@ declare class FulfillmentOrdersResource {
|
|
|
17719
17721
|
listForOrder(orderId: string): Promise<DataResponse<FulfillmentOrder[]>>;
|
|
17720
17722
|
}
|
|
17721
17723
|
|
|
17722
|
-
type ListParams$
|
|
17723
|
-
type CreateBody$
|
|
17724
|
-
type UpdateBody$
|
|
17724
|
+
type ListParams$9 = NonNullable<operations['listMetafieldDefinitions']['parameters']['query']>;
|
|
17725
|
+
type CreateBody$5 = NonNullable<operations['createMetafieldDefinition']['requestBody']>['content']['application/json'];
|
|
17726
|
+
type UpdateBody$5 = NonNullable<operations['updateMetafieldDefinition']['requestBody']>['content']['application/json'];
|
|
17725
17727
|
type ReorderBody$1 = NonNullable<operations['reorderMetafieldDefinitions']['requestBody']>['content']['application/json'];
|
|
17726
17728
|
declare class MetafieldsResource {
|
|
17727
17729
|
private client;
|
|
17728
17730
|
constructor(client: Hydra);
|
|
17729
17731
|
/** List metafield definitions for the store */
|
|
17730
|
-
listDefinitions(params?: ListParams$
|
|
17731
|
-
createDefinition(body: CreateBody$
|
|
17732
|
-
updateDefinition(ownerType: string, slug: string, body: UpdateBody$
|
|
17732
|
+
listDefinitions(params?: ListParams$9): Promise<DataResponse<unknown[]>>;
|
|
17733
|
+
createDefinition(body: CreateBody$5): Promise<DataResponse<unknown>>;
|
|
17734
|
+
updateDefinition(ownerType: string, slug: string, body: UpdateBody$5): Promise<DataResponse<unknown>>;
|
|
17733
17735
|
archiveDefinition(ownerType: string, slug: string): Promise<void>;
|
|
17734
17736
|
reorderDefinitions(ownerType: string, body: ReorderBody$1): Promise<void>;
|
|
17735
17737
|
}
|
|
@@ -17775,30 +17777,30 @@ declare class TaxResource {
|
|
|
17775
17777
|
}
|
|
17776
17778
|
|
|
17777
17779
|
type ExchangeRate = components['schemas']['ExchangeRate'];
|
|
17778
|
-
type ListParams$
|
|
17780
|
+
type ListParams$8 = NonNullable<operations['listExchangeRates']['parameters']['query']>;
|
|
17779
17781
|
declare class ExchangeRatesResource {
|
|
17780
17782
|
private client;
|
|
17781
17783
|
constructor(client: Hydra);
|
|
17782
|
-
list(params?: ListParams$
|
|
17784
|
+
list(params?: ListParams$8): Promise<DataResponse<ExchangeRate[]>>;
|
|
17783
17785
|
refresh(): Promise<DataResponse<unknown>>;
|
|
17784
17786
|
}
|
|
17785
17787
|
|
|
17786
17788
|
type FilterAttribute = components['schemas']['FilterAttribute'];
|
|
17787
|
-
type ListParams$
|
|
17788
|
-
type CreateBody$
|
|
17789
|
-
type UpdateBody$
|
|
17789
|
+
type ListParams$7 = NonNullable<operations['listFilterAttributes']['parameters']['query']>;
|
|
17790
|
+
type CreateBody$4 = NonNullable<operations['createFilterAttribute']['requestBody']>['content']['application/json'];
|
|
17791
|
+
type UpdateBody$4 = NonNullable<operations['updateFilterAttribute']['requestBody']>['content']['application/json'];
|
|
17790
17792
|
type ReorderBody = NonNullable<operations['reorderFilterAttributes']['requestBody']>['content']['application/json'];
|
|
17791
17793
|
declare class FilterAttributesResource {
|
|
17792
17794
|
private client;
|
|
17793
17795
|
constructor(client: Hydra);
|
|
17794
|
-
list(params?: ListParams$
|
|
17795
|
-
iterate(params?: Omit<ListParams$
|
|
17796
|
-
toArray(params?: Omit<ListParams$
|
|
17796
|
+
list(params?: ListParams$7): Promise<ListResponse<FilterAttribute>>;
|
|
17797
|
+
iterate(params?: Omit<ListParams$7, 'cursor'>, options?: PaginateOptions): AsyncGenerator<FilterAttribute, void, undefined>;
|
|
17798
|
+
toArray(params?: Omit<ListParams$7, 'cursor'>, options?: PaginateOptions & {
|
|
17797
17799
|
limit?: number;
|
|
17798
17800
|
}): Promise<FilterAttribute[]>;
|
|
17799
17801
|
get(id: string): Promise<DataResponse<FilterAttribute>>;
|
|
17800
|
-
create(body: CreateBody$
|
|
17801
|
-
update(id: string, body: UpdateBody$
|
|
17802
|
+
create(body: CreateBody$4, options?: ResourceRequestOptions): Promise<DataResponse<FilterAttribute>>;
|
|
17803
|
+
update(id: string, body: UpdateBody$4): Promise<DataResponse<FilterAttribute>>;
|
|
17802
17804
|
delete(id: string): Promise<void>;
|
|
17803
17805
|
reorder(body: ReorderBody): Promise<ListResponse<FilterAttribute>>;
|
|
17804
17806
|
discover(): Promise<DataResponse<unknown[]>>;
|
|
@@ -17806,23 +17808,23 @@ declare class FilterAttributesResource {
|
|
|
17806
17808
|
|
|
17807
17809
|
type NavigationMenu = components['schemas']['NavigationMenu'];
|
|
17808
17810
|
type NavigationItem = components['schemas']['NavigationItem'];
|
|
17809
|
-
type ListParams$
|
|
17810
|
-
type CreateBody$
|
|
17811
|
-
type UpdateBody$
|
|
17811
|
+
type ListParams$6 = NonNullable<operations['listNavigationMenus']['parameters']['query']>;
|
|
17812
|
+
type CreateBody$3 = NonNullable<operations['createNavigationMenu']['requestBody']>['content']['application/json'];
|
|
17813
|
+
type UpdateBody$3 = NonNullable<operations['updateNavigationMenu']['requestBody']>['content']['application/json'];
|
|
17812
17814
|
type CreateItemBody = NonNullable<operations['addNavigationItem']['requestBody']>['content']['application/json'];
|
|
17813
17815
|
type UpdateItemBody = NonNullable<operations['updateNavigationItem']['requestBody']>['content']['application/json'];
|
|
17814
17816
|
type ReorderItemsBody = NonNullable<operations['reorderNavigationItems']['requestBody']>['content']['application/json'];
|
|
17815
17817
|
declare class NavigationResource {
|
|
17816
17818
|
private client;
|
|
17817
17819
|
constructor(client: Hydra);
|
|
17818
|
-
list(params?: ListParams$
|
|
17819
|
-
iterate(params?: Omit<ListParams$
|
|
17820
|
-
toArray(params?: Omit<ListParams$
|
|
17820
|
+
list(params?: ListParams$6): Promise<ListResponse<NavigationMenu>>;
|
|
17821
|
+
iterate(params?: Omit<ListParams$6, 'cursor'>, options?: PaginateOptions): AsyncGenerator<NavigationMenu, void, undefined>;
|
|
17822
|
+
toArray(params?: Omit<ListParams$6, 'cursor'>, options?: PaginateOptions & {
|
|
17821
17823
|
limit?: number;
|
|
17822
17824
|
}): Promise<NavigationMenu[]>;
|
|
17823
17825
|
get(id: string): Promise<DataResponse<NavigationMenu>>;
|
|
17824
|
-
create(body: CreateBody$
|
|
17825
|
-
update(id: string, body: UpdateBody$
|
|
17826
|
+
create(body: CreateBody$3, options?: ResourceRequestOptions): Promise<DataResponse<NavigationMenu>>;
|
|
17827
|
+
update(id: string, body: UpdateBody$3): Promise<DataResponse<NavigationMenu>>;
|
|
17826
17828
|
delete(id: string): Promise<void>;
|
|
17827
17829
|
addItem(menuId: string, body: CreateItemBody): Promise<DataResponse<NavigationItem>>;
|
|
17828
17830
|
updateItem(menuId: string, itemId: string, body: UpdateItemBody): Promise<DataResponse<NavigationItem>>;
|
|
@@ -17831,26 +17833,26 @@ declare class NavigationResource {
|
|
|
17831
17833
|
}
|
|
17832
17834
|
|
|
17833
17835
|
type NotificationLog = components['schemas']['NotificationLog'];
|
|
17834
|
-
type ListParams$
|
|
17836
|
+
type ListParams$5 = NonNullable<operations['listNotifications']['parameters']['query']>;
|
|
17835
17837
|
declare class NotificationsResource {
|
|
17836
17838
|
private client;
|
|
17837
17839
|
constructor(client: Hydra);
|
|
17838
|
-
list(params?: ListParams$
|
|
17839
|
-
iterate(params?: Omit<ListParams$
|
|
17840
|
-
toArray(params?: Omit<ListParams$
|
|
17840
|
+
list(params?: ListParams$5): Promise<ListResponse<NotificationLog>>;
|
|
17841
|
+
iterate(params?: Omit<ListParams$5, 'cursor'>, options?: PaginateOptions): AsyncGenerator<NotificationLog, void, undefined>;
|
|
17842
|
+
toArray(params?: Omit<ListParams$5, 'cursor'>, options?: PaginateOptions & {
|
|
17841
17843
|
limit?: number;
|
|
17842
17844
|
}): Promise<NotificationLog[]>;
|
|
17843
17845
|
get(id: string): Promise<DataResponse<NotificationLog>>;
|
|
17844
17846
|
}
|
|
17845
17847
|
|
|
17846
17848
|
type CheckoutListItem = components['schemas']['CheckoutListItem'];
|
|
17847
|
-
type ListParams$
|
|
17849
|
+
type ListParams$4 = NonNullable<operations['listCheckouts']['parameters']['query']>;
|
|
17848
17850
|
declare class CheckoutsResource {
|
|
17849
17851
|
private client;
|
|
17850
17852
|
constructor(client: Hydra);
|
|
17851
|
-
list(params?: ListParams$
|
|
17852
|
-
iterate(params?: Omit<ListParams$
|
|
17853
|
-
toArray(params?: Omit<ListParams$
|
|
17853
|
+
list(params?: ListParams$4): Promise<ListResponse<CheckoutListItem>>;
|
|
17854
|
+
iterate(params?: Omit<ListParams$4, 'cursor'>, options?: PaginateOptions): AsyncGenerator<CheckoutListItem, void, undefined>;
|
|
17855
|
+
toArray(params?: Omit<ListParams$4, 'cursor'>, options?: PaginateOptions & {
|
|
17854
17856
|
limit?: number;
|
|
17855
17857
|
}): Promise<CheckoutListItem[]>;
|
|
17856
17858
|
}
|
|
@@ -17876,16 +17878,16 @@ declare class AnalyticsResource {
|
|
|
17876
17878
|
|
|
17877
17879
|
type CreditTransaction = NonNullable<operations['issueCustomerCredit']['responses']['201']['content']['application/json']['data']>;
|
|
17878
17880
|
type CreditBalance = NonNullable<operations['getCustomerCredit']['responses']['200']['content']['application/json']['data']>;
|
|
17879
|
-
type ListParams$
|
|
17881
|
+
type ListParams$3 = NonNullable<operations['listCustomerCreditTransactions']['parameters']['query']>;
|
|
17880
17882
|
type IssueCreditBody = NonNullable<operations['issueCustomerCredit']['requestBody']>['content']['application/json'];
|
|
17881
17883
|
declare class StoreCreditResource {
|
|
17882
17884
|
private client;
|
|
17883
17885
|
constructor(client: Hydra);
|
|
17884
17886
|
getBalance(customerId: string): Promise<DataResponse<CreditBalance>>;
|
|
17885
17887
|
issue(customerId: string, body: IssueCreditBody, options?: ResourceRequestOptions): Promise<DataResponse<CreditTransaction>>;
|
|
17886
|
-
listTransactions(customerId: string, params?: ListParams$
|
|
17887
|
-
iterateTransactions(customerId: string, params?: Omit<ListParams$
|
|
17888
|
-
transactionsToArray(customerId: string, params?: Omit<ListParams$
|
|
17888
|
+
listTransactions(customerId: string, params?: ListParams$3): Promise<ListResponse<CreditTransaction>>;
|
|
17889
|
+
iterateTransactions(customerId: string, params?: Omit<ListParams$3, 'cursor'>, options?: PaginateOptions): AsyncGenerator<CreditTransaction, void, undefined>;
|
|
17890
|
+
transactionsToArray(customerId: string, params?: Omit<ListParams$3, 'cursor'>, options?: PaginateOptions & {
|
|
17889
17891
|
limit?: number;
|
|
17890
17892
|
}): Promise<CreditTransaction[]>;
|
|
17891
17893
|
}
|
|
@@ -17903,21 +17905,21 @@ declare class SearchResource {
|
|
|
17903
17905
|
|
|
17904
17906
|
type Location = components['schemas']['Location'];
|
|
17905
17907
|
type TransferResult = components['schemas']['TransferResult'];
|
|
17906
|
-
type ListParams = NonNullable<operations['listLocations']['parameters']['query']>;
|
|
17907
|
-
type CreateBody = NonNullable<operations['createLocation']['requestBody']>['content']['application/json'];
|
|
17908
|
-
type UpdateBody = NonNullable<operations['updateLocation']['requestBody']>['content']['application/json'];
|
|
17908
|
+
type ListParams$2 = NonNullable<operations['listLocations']['parameters']['query']>;
|
|
17909
|
+
type CreateBody$2 = NonNullable<operations['createLocation']['requestBody']>['content']['application/json'];
|
|
17910
|
+
type UpdateBody$2 = NonNullable<operations['updateLocation']['requestBody']>['content']['application/json'];
|
|
17909
17911
|
type TransferBody = NonNullable<operations['transferLocationInventory']['requestBody']>['content']['application/json'];
|
|
17910
17912
|
declare class LocationsResource {
|
|
17911
17913
|
private client;
|
|
17912
17914
|
constructor(client: Hydra);
|
|
17913
|
-
list(params?: ListParams): Promise<ListResponse<Location>>;
|
|
17914
|
-
iterate(params?: Omit<ListParams, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Location, void, undefined>;
|
|
17915
|
-
toArray(params?: Omit<ListParams, 'cursor'>, options?: PaginateOptions & {
|
|
17915
|
+
list(params?: ListParams$2): Promise<ListResponse<Location>>;
|
|
17916
|
+
iterate(params?: Omit<ListParams$2, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Location, void, undefined>;
|
|
17917
|
+
toArray(params?: Omit<ListParams$2, 'cursor'>, options?: PaginateOptions & {
|
|
17916
17918
|
limit?: number;
|
|
17917
17919
|
}): Promise<Location[]>;
|
|
17918
17920
|
get(id: string): Promise<DataResponse<Location>>;
|
|
17919
|
-
create(body: CreateBody, options?: ResourceRequestOptions): Promise<DataResponse<Location>>;
|
|
17920
|
-
update(id: string, body: UpdateBody): Promise<DataResponse<Location>>;
|
|
17921
|
+
create(body: CreateBody$2, options?: ResourceRequestOptions): Promise<DataResponse<Location>>;
|
|
17922
|
+
update(id: string, body: UpdateBody$2): Promise<DataResponse<Location>>;
|
|
17921
17923
|
delete(id: string): Promise<void>;
|
|
17922
17924
|
setDefault(id: string): Promise<DataResponse<Location>>;
|
|
17923
17925
|
transfer(id: string, body: TransferBody): Promise<DataResponse<TransferResult>>;
|
|
@@ -17982,6 +17984,45 @@ declare class IntegrationsResource {
|
|
|
17982
17984
|
}): Promise<SyncLogEntry[]>;
|
|
17983
17985
|
}
|
|
17984
17986
|
|
|
17987
|
+
type Post = components['schemas']['Post'];
|
|
17988
|
+
type ListParams$1 = NonNullable<operations['listPosts']['parameters']['query']>;
|
|
17989
|
+
type CreateBody$1 = NonNullable<operations['createPost']['requestBody']>['content']['application/json'];
|
|
17990
|
+
type UpdateBody$1 = NonNullable<operations['updatePost']['requestBody']>['content']['application/json'];
|
|
17991
|
+
type AddCategoriesBody = NonNullable<operations['addPostCategories']['requestBody']>['content']['application/json'];
|
|
17992
|
+
declare class PostsResource {
|
|
17993
|
+
private client;
|
|
17994
|
+
constructor(client: Hydra);
|
|
17995
|
+
list(params?: ListParams$1): Promise<ListResponse<Post>>;
|
|
17996
|
+
iterate(params?: Omit<ListParams$1, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Post, void, undefined>;
|
|
17997
|
+
toArray(params?: Omit<ListParams$1, 'cursor'>, options?: PaginateOptions & {
|
|
17998
|
+
limit?: number;
|
|
17999
|
+
}): Promise<Post[]>;
|
|
18000
|
+
get(id: string, params?: Pick<ListParams$1, 'expand' | 'fields'>): Promise<DataResponse<Post>>;
|
|
18001
|
+
create(body: CreateBody$1, options?: ResourceRequestOptions): Promise<DataResponse<Post>>;
|
|
18002
|
+
update(id: string, body: UpdateBody$1): Promise<DataResponse<Post>>;
|
|
18003
|
+
delete(id: string): Promise<void>;
|
|
18004
|
+
addCategories(postId: string, body: AddCategoriesBody): Promise<DataResponse<Post>>;
|
|
18005
|
+
removeCategory(postId: string, categoryId: string): Promise<void>;
|
|
18006
|
+
}
|
|
18007
|
+
|
|
18008
|
+
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'];
|
|
18012
|
+
declare class ContentCategoriesResource {
|
|
18013
|
+
private client;
|
|
18014
|
+
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 & {
|
|
18018
|
+
limit?: number;
|
|
18019
|
+
}): Promise<ContentCategory[]>;
|
|
18020
|
+
get(id: string): Promise<DataResponse<ContentCategory>>;
|
|
18021
|
+
create(body: CreateBody, options?: ResourceRequestOptions): Promise<DataResponse<ContentCategory>>;
|
|
18022
|
+
update(id: string, body: UpdateBody): Promise<DataResponse<ContentCategory>>;
|
|
18023
|
+
delete(id: string): Promise<void>;
|
|
18024
|
+
}
|
|
18025
|
+
|
|
17985
18026
|
interface AppInfo {
|
|
17986
18027
|
/** Integration/plugin name (e.g. "MyShopTheme") */
|
|
17987
18028
|
name: string;
|
|
@@ -18058,6 +18099,8 @@ declare class Hydra {
|
|
|
18058
18099
|
readonly notifications: NotificationsResource;
|
|
18059
18100
|
readonly analytics: AnalyticsResource;
|
|
18060
18101
|
readonly integrations: IntegrationsResource;
|
|
18102
|
+
readonly posts: PostsResource;
|
|
18103
|
+
readonly contentCategories: ContentCategoriesResource;
|
|
18061
18104
|
constructor(config: HydraConfig);
|
|
18062
18105
|
request<T>(method: string, path: string, options?: RequestOptions): Promise<T>;
|
|
18063
18106
|
/** Multipart upload for file-based endpoints (e.g. images) */
|
|
@@ -18139,4 +18182,4 @@ declare class HydraIdempotencyError extends HydraError {
|
|
|
18139
18182
|
constructor(body: HydraErrorBody, headers: Headers);
|
|
18140
18183
|
}
|
|
18141
18184
|
|
|
18142
|
-
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, 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 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 };
|
|
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 };
|
package/dist/index.js
CHANGED
|
@@ -1411,6 +1411,73 @@ var IntegrationsResource = class {
|
|
|
1411
1411
|
}
|
|
1412
1412
|
};
|
|
1413
1413
|
|
|
1414
|
+
// src/resources/posts.ts
|
|
1415
|
+
var PostsResource = class {
|
|
1416
|
+
constructor(client) {
|
|
1417
|
+
this.client = client;
|
|
1418
|
+
}
|
|
1419
|
+
client;
|
|
1420
|
+
async list(params) {
|
|
1421
|
+
return this.client.request("GET", "/v1/posts", { params });
|
|
1422
|
+
}
|
|
1423
|
+
iterate(params, options) {
|
|
1424
|
+
return paginate((cursor) => this.list({ ...params, cursor }), options);
|
|
1425
|
+
}
|
|
1426
|
+
async toArray(params, options) {
|
|
1427
|
+
return toArray(this.iterate(params, options), options);
|
|
1428
|
+
}
|
|
1429
|
+
async get(id, params) {
|
|
1430
|
+
return this.client.request("GET", `/v1/posts/${id}`, { params });
|
|
1431
|
+
}
|
|
1432
|
+
async create(body, options) {
|
|
1433
|
+
return this.client.request("POST", "/v1/posts", { body, ...options });
|
|
1434
|
+
}
|
|
1435
|
+
async update(id, body) {
|
|
1436
|
+
return this.client.request("PATCH", `/v1/posts/${id}`, { body });
|
|
1437
|
+
}
|
|
1438
|
+
async delete(id) {
|
|
1439
|
+
return this.client.request("DELETE", `/v1/posts/${id}`);
|
|
1440
|
+
}
|
|
1441
|
+
async addCategories(postId, body) {
|
|
1442
|
+
return this.client.request("POST", `/v1/posts/${postId}/categories`, { body });
|
|
1443
|
+
}
|
|
1444
|
+
async removeCategory(postId, categoryId) {
|
|
1445
|
+
return this.client.request(
|
|
1446
|
+
"DELETE",
|
|
1447
|
+
`/v1/posts/${postId}/categories/${categoryId}`
|
|
1448
|
+
);
|
|
1449
|
+
}
|
|
1450
|
+
};
|
|
1451
|
+
|
|
1452
|
+
// src/resources/content-categories.ts
|
|
1453
|
+
var ContentCategoriesResource = class {
|
|
1454
|
+
constructor(client) {
|
|
1455
|
+
this.client = client;
|
|
1456
|
+
}
|
|
1457
|
+
client;
|
|
1458
|
+
async list(params) {
|
|
1459
|
+
return this.client.request("GET", "/v1/content-categories", { params });
|
|
1460
|
+
}
|
|
1461
|
+
iterate(params, options) {
|
|
1462
|
+
return paginate((cursor) => this.list({ ...params, cursor }), options);
|
|
1463
|
+
}
|
|
1464
|
+
async toArray(params, options) {
|
|
1465
|
+
return toArray(this.iterate(params, options), options);
|
|
1466
|
+
}
|
|
1467
|
+
async get(id) {
|
|
1468
|
+
return this.client.request("GET", `/v1/content-categories/${id}`);
|
|
1469
|
+
}
|
|
1470
|
+
async create(body, options) {
|
|
1471
|
+
return this.client.request("POST", "/v1/content-categories", { body, ...options });
|
|
1472
|
+
}
|
|
1473
|
+
async update(id, body) {
|
|
1474
|
+
return this.client.request("PATCH", `/v1/content-categories/${id}`, { body });
|
|
1475
|
+
}
|
|
1476
|
+
async delete(id) {
|
|
1477
|
+
return this.client.request("DELETE", `/v1/content-categories/${id}`);
|
|
1478
|
+
}
|
|
1479
|
+
};
|
|
1480
|
+
|
|
1414
1481
|
// src/client.ts
|
|
1415
1482
|
var SDK_VERSION = "0.1.0";
|
|
1416
1483
|
var INITIAL_RETRY_DELAY = 0.5;
|
|
@@ -1484,6 +1551,9 @@ var Hydra = class {
|
|
|
1484
1551
|
notifications = new NotificationsResource(this);
|
|
1485
1552
|
analytics = new AnalyticsResource(this);
|
|
1486
1553
|
integrations = new IntegrationsResource(this);
|
|
1554
|
+
// P7: Content
|
|
1555
|
+
posts = new PostsResource(this);
|
|
1556
|
+
contentCategories = new ContentCategoriesResource(this);
|
|
1487
1557
|
constructor(config) {
|
|
1488
1558
|
for (const key of Object.keys(config)) {
|
|
1489
1559
|
if (!VALID_CONFIG_KEYS.has(key)) {
|
|
@@ -1697,6 +1767,7 @@ export {
|
|
|
1697
1767
|
CheckoutsResource,
|
|
1698
1768
|
CollectionsResource,
|
|
1699
1769
|
CompaniesResource,
|
|
1770
|
+
ContentCategoriesResource,
|
|
1700
1771
|
CustomerGroupsResource,
|
|
1701
1772
|
CustomersResource,
|
|
1702
1773
|
DiscountsResource,
|
|
@@ -1720,6 +1791,7 @@ export {
|
|
|
1720
1791
|
MetafieldsResource,
|
|
1721
1792
|
NotificationsResource,
|
|
1722
1793
|
OrdersResource,
|
|
1794
|
+
PostsResource,
|
|
1723
1795
|
ProductsResource,
|
|
1724
1796
|
PromotionsResource,
|
|
1725
1797
|
PurchaseOrdersResource,
|