@gethydra/sdk 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -6838,6 +6838,38 @@ interface operations {
6838
6838
  };
6839
6839
  };
6840
6840
  };
6841
+ reorderProductLinks: {
6842
+ parameters: {
6843
+ query?: never;
6844
+ header?: never;
6845
+ path: {
6846
+ id: string;
6847
+ };
6848
+ cookie?: never;
6849
+ };
6850
+ requestBody?: {
6851
+ content: {
6852
+ "application/json": {
6853
+ /**
6854
+ * @example [
6855
+ * "prod_abc123",
6856
+ * "prod_def456"
6857
+ * ]
6858
+ */
6859
+ product_ids: string[];
6860
+ };
6861
+ };
6862
+ };
6863
+ responses: {
6864
+ /** @description Positions updated */
6865
+ 204: {
6866
+ headers: {
6867
+ [name: string]: unknown;
6868
+ };
6869
+ content?: never;
6870
+ };
6871
+ };
6872
+ };
6841
6873
  listProductMetafieldValues: {
6842
6874
  parameters: {
6843
6875
  query?: never;
@@ -14911,6 +14943,8 @@ interface operations {
14911
14943
  fields?: string;
14912
14944
  sort?: "created_at" | "updated_at" | "title" | "relevance";
14913
14945
  order?: "asc" | "desc";
14946
+ /** @description Filter by exact handle (URL slug) */
14947
+ handle?: string;
14914
14948
  type?: "page" | "post";
14915
14949
  status?: "draft" | "published" | "archived";
14916
14950
  category_id?: string;
@@ -17071,6 +17105,8 @@ type AnalyticsTimeSeries$1 = components['schemas']['AnalyticsTimeSeries'];
17071
17105
  type AnalyticsOrdersSeries$1 = components['schemas']['AnalyticsOrdersSeries'];
17072
17106
  type AnalyticsTopProduct$1 = components['schemas']['AnalyticsTopProduct'];
17073
17107
  type AnalyticsActionItems$1 = components['schemas']['AnalyticsActionItems'];
17108
+ type Post$1 = components['schemas']['Post'];
17109
+ type ContentCategory$1 = components['schemas']['ContentCategory'];
17074
17110
  interface Pagination {
17075
17111
  cursor: string | null;
17076
17112
  has_more: boolean;
@@ -17115,9 +17151,9 @@ type ProductStats = components['schemas']['ProductStats'];
17115
17151
  type Variant$1 = components['schemas']['Variant'];
17116
17152
  type Image$1 = components['schemas']['Image'];
17117
17153
  type GenerateVariantsResult = components['schemas']['GenerateVariantsResult'];
17118
- type ListParams$o = NonNullable<operations['listProducts']['parameters']['query']>;
17119
- type CreateBody$k = NonNullable<operations['createProduct']['requestBody']>['content']['application/json'];
17120
- type UpdateBody$k = NonNullable<operations['updateProduct']['requestBody']>['content']['application/json'];
17154
+ type ListParams$q = NonNullable<operations['listProducts']['parameters']['query']>;
17155
+ type CreateBody$m = NonNullable<operations['createProduct']['requestBody']>['content']['application/json'];
17156
+ type UpdateBody$m = NonNullable<operations['updateProduct']['requestBody']>['content']['application/json'];
17121
17157
  type DuplicateBody = NonNullable<operations['duplicateProduct']['requestBody']>['content']['application/json'];
17122
17158
  type CreateVariantBody = NonNullable<operations['createProductVariant']['requestBody']>['content']['application/json'];
17123
17159
  type GenerateVariantsBody = NonNullable<operations['generateProductVariants']['requestBody']>['content']['application/json'];
@@ -17127,17 +17163,17 @@ type CreateProductLinkBody = NonNullable<operations['createProductLink']['reques
17127
17163
  declare class ProductsResource {
17128
17164
  private client;
17129
17165
  constructor(client: Hydra);
17130
- list(params?: ListParams$o): Promise<ListResponse<Product>>;
17131
- iterate(params?: Omit<ListParams$o, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Product, void, undefined>;
17132
- toArray(params?: Omit<ListParams$o, 'cursor'>, options?: PaginateOptions & {
17166
+ list(params?: ListParams$q): Promise<ListResponse<Product>>;
17167
+ iterate(params?: Omit<ListParams$q, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Product, void, undefined>;
17168
+ toArray(params?: Omit<ListParams$q, 'cursor'>, options?: PaginateOptions & {
17133
17169
  limit?: number;
17134
17170
  }): Promise<Product[]>;
17135
- get(id: string, params?: Pick<ListParams$o, 'expand' | 'currency' | 'fields'>): Promise<DataResponse<Product>>;
17136
- create(body: CreateBody$k, options?: ResourceRequestOptions): Promise<DataResponse<Product>>;
17137
- update(id: string, body: UpdateBody$k): Promise<DataResponse<Product>>;
17171
+ get(id: string, params?: Pick<ListParams$q, 'expand' | 'currency' | 'fields'>): Promise<DataResponse<Product>>;
17172
+ create(body: CreateBody$m, options?: ResourceRequestOptions): Promise<DataResponse<Product>>;
17173
+ update(id: string, body: UpdateBody$m): Promise<DataResponse<Product>>;
17138
17174
  delete(id: string): Promise<void>;
17139
17175
  batchCreate(body: {
17140
- products: CreateBody$k[];
17176
+ products: CreateBody$m[];
17141
17177
  }, options?: ResourceRequestOptions): Promise<DataResponse<Product[]>>;
17142
17178
  duplicate(id: string, body: DuplicateBody): Promise<DataResponse<Product>>;
17143
17179
  getStats(id: string): Promise<DataResponse<ProductStats>>;
@@ -17158,7 +17194,7 @@ declare class ProductsResource {
17158
17194
 
17159
17195
  type Variant = components['schemas']['Variant'];
17160
17196
  type VariantPrice = components['schemas']['VariantPrice'];
17161
- type UpdateBody$j = NonNullable<operations['updateVariant']['requestBody']>['content']['application/json'];
17197
+ type UpdateBody$l = NonNullable<operations['updateVariant']['requestBody']>['content']['application/json'];
17162
17198
  type UpsertPriceBody = NonNullable<operations['upsertVariantPrice']['requestBody']>['content']['application/json'];
17163
17199
  declare class VariantsResource {
17164
17200
  private client;
@@ -17168,7 +17204,7 @@ declare class VariantsResource {
17168
17204
  currency?: string;
17169
17205
  fields?: string;
17170
17206
  }): Promise<DataResponse<Variant>>;
17171
- update(id: string, body: UpdateBody$j): Promise<DataResponse<Variant>>;
17207
+ update(id: string, body: UpdateBody$l): Promise<DataResponse<Variant>>;
17172
17208
  delete(id: string): Promise<void>;
17173
17209
  listPrices(variantId: string): Promise<DataResponse<Record<string, VariantPrice>>>;
17174
17210
  upsertPrice(variantId: string, priceKeySlug: string, body: UpsertPriceBody): Promise<DataResponse<VariantPrice>>;
@@ -17180,23 +17216,23 @@ declare class VariantsResource {
17180
17216
  }
17181
17217
 
17182
17218
  type Collection = components['schemas']['Collection'];
17183
- type ListParams$n = NonNullable<operations['listCollections']['parameters']['query']>;
17184
- type CreateBody$j = NonNullable<operations['createCollection']['requestBody']>['content']['application/json'];
17185
- type UpdateBody$i = NonNullable<operations['updateCollection']['requestBody']>['content']['application/json'];
17219
+ type ListParams$p = NonNullable<operations['listCollections']['parameters']['query']>;
17220
+ type CreateBody$l = NonNullable<operations['createCollection']['requestBody']>['content']['application/json'];
17221
+ type UpdateBody$k = NonNullable<operations['updateCollection']['requestBody']>['content']['application/json'];
17186
17222
  type AddProductsBody = NonNullable<operations['addCollectionProducts']['requestBody']>['content']['application/json'];
17187
17223
  type ReorderProductsBody = NonNullable<operations['reorderCollectionProducts']['requestBody']>['content']['application/json'];
17188
17224
  type ReorderCollectionsBody = NonNullable<operations['reorderCollections']['requestBody']>['content']['application/json'];
17189
17225
  declare class CollectionsResource {
17190
17226
  private client;
17191
17227
  constructor(client: Hydra);
17192
- list(params?: ListParams$n): Promise<ListResponse<Collection>>;
17193
- iterate(params?: Omit<ListParams$n, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Collection, void, undefined>;
17194
- toArray(params?: Omit<ListParams$n, 'cursor'>, options?: PaginateOptions & {
17228
+ list(params?: ListParams$p): Promise<ListResponse<Collection>>;
17229
+ iterate(params?: Omit<ListParams$p, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Collection, void, undefined>;
17230
+ toArray(params?: Omit<ListParams$p, 'cursor'>, options?: PaginateOptions & {
17195
17231
  limit?: number;
17196
17232
  }): Promise<Collection[]>;
17197
- get(id: string, params?: Pick<ListParams$n, 'expand' | 'fields'>): Promise<DataResponse<Collection>>;
17198
- create(body: CreateBody$j, options?: ResourceRequestOptions): Promise<DataResponse<Collection>>;
17199
- update(id: string, body: UpdateBody$i): Promise<DataResponse<Collection>>;
17233
+ get(id: string, params?: Pick<ListParams$p, 'expand' | 'fields'>): Promise<DataResponse<Collection>>;
17234
+ create(body: CreateBody$l, options?: ResourceRequestOptions): Promise<DataResponse<Collection>>;
17235
+ update(id: string, body: UpdateBody$k): Promise<DataResponse<Collection>>;
17200
17236
  delete(id: string): Promise<void>;
17201
17237
  tree(): Promise<DataResponse<unknown>>;
17202
17238
  reorder(body: ReorderCollectionsBody): Promise<void>;
@@ -17226,13 +17262,13 @@ declare class CartResource {
17226
17262
 
17227
17263
  type CheckoutCreate = components['schemas']['CheckoutCreate'];
17228
17264
  type CheckoutGet = components['schemas']['CheckoutGet'];
17229
- type CreateBody$i = NonNullable<operations['createCheckout']['requestBody']>['content']['application/json'];
17265
+ type CreateBody$k = NonNullable<operations['createCheckout']['requestBody']>['content']['application/json'];
17230
17266
  type ApplyDiscountBody = NonNullable<operations['applyCheckoutDiscount']['requestBody']>['content']['application/json'];
17231
17267
  type ApplyCreditBody = NonNullable<operations['applyCheckoutCredit']['requestBody']>['content']['application/json'];
17232
17268
  declare class CheckoutResource {
17233
17269
  private client;
17234
17270
  constructor(client: Hydra);
17235
- create(body: CreateBody$i, options?: ResourceRequestOptions): Promise<DataResponse<CheckoutCreate>>;
17271
+ create(body: CreateBody$k, options?: ResourceRequestOptions): Promise<DataResponse<CheckoutCreate>>;
17236
17272
  get(id: string): Promise<DataResponse<CheckoutGet>>;
17237
17273
  applyDiscount(checkoutId: string, body: ApplyDiscountBody): Promise<DataResponse<CheckoutGet>>;
17238
17274
  removeDiscount(checkoutId: string): Promise<DataResponse<CheckoutGet>>;
@@ -17243,15 +17279,15 @@ declare class CheckoutResource {
17243
17279
 
17244
17280
  type Order$1 = components['schemas']['Order'];
17245
17281
  type FulfillmentOrder$1 = components['schemas']['FulfillmentOrder'];
17246
- type ListParams$m = NonNullable<operations['listOrders']['parameters']['query']>;
17247
- type CreateBody$h = NonNullable<operations['createOrder']['requestBody']>['content']['application/json'];
17248
- type UpdateBody$h = NonNullable<operations['updateOrder']['requestBody']>['content']['application/json'];
17282
+ type ListParams$o = NonNullable<operations['listOrders']['parameters']['query']>;
17283
+ type CreateBody$j = NonNullable<operations['createOrder']['requestBody']>['content']['application/json'];
17284
+ type UpdateBody$j = NonNullable<operations['updateOrder']['requestBody']>['content']['application/json'];
17249
17285
  declare class OrdersResource {
17250
17286
  private client;
17251
17287
  constructor(client: Hydra);
17252
- list(params?: ListParams$m): Promise<ListResponse<Order$1>>;
17253
- iterate(params?: Omit<ListParams$m, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Order$1, void, undefined>;
17254
- toArray(params?: Omit<ListParams$m, 'cursor'>, options?: PaginateOptions & {
17288
+ list(params?: ListParams$o): Promise<ListResponse<Order$1>>;
17289
+ iterate(params?: Omit<ListParams$o, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Order$1, void, undefined>;
17290
+ toArray(params?: Omit<ListParams$o, 'cursor'>, options?: PaginateOptions & {
17255
17291
  limit?: number;
17256
17292
  }): Promise<Order$1[]>;
17257
17293
  get(id: string, params?: {
@@ -17259,8 +17295,8 @@ declare class OrdersResource {
17259
17295
  currency?: string;
17260
17296
  fields?: string;
17261
17297
  }): Promise<DataResponse<Order$1>>;
17262
- create(body: CreateBody$h, options?: ResourceRequestOptions): Promise<DataResponse<Order$1>>;
17263
- update(id: string, body: UpdateBody$h): Promise<DataResponse<Order$1>>;
17298
+ create(body: CreateBody$j, options?: ResourceRequestOptions): Promise<DataResponse<Order$1>>;
17299
+ update(id: string, body: UpdateBody$j): Promise<DataResponse<Order$1>>;
17264
17300
  listFulfillmentOrders(orderId: string): Promise<DataResponse<FulfillmentOrder$1[]>>;
17265
17301
  /**
17266
17302
  * Returns the API path for downloading the invoice PDF for an order.
@@ -17274,34 +17310,34 @@ declare class OrdersResource {
17274
17310
  }
17275
17311
 
17276
17312
  type Fulfillment = components['schemas']['Fulfillment'];
17277
- type CreateBody$g = NonNullable<operations['createFulfillment']['requestBody']>['content']['application/json'];
17278
- type UpdateBody$g = NonNullable<operations['updateFulfillment']['requestBody']>['content']['application/json'];
17313
+ type CreateBody$i = NonNullable<operations['createFulfillment']['requestBody']>['content']['application/json'];
17314
+ type UpdateBody$i = NonNullable<operations['updateFulfillment']['requestBody']>['content']['application/json'];
17279
17315
  type CancelBody = NonNullable<operations['cancelFulfillment']['requestBody']>['content']['application/json'];
17280
17316
  declare class FulfillmentsResource {
17281
17317
  private client;
17282
17318
  constructor(client: Hydra);
17283
17319
  /** Create a fulfillment for a fulfillment order */
17284
- create(fulfillmentOrderId: string, body: CreateBody$g, options?: ResourceRequestOptions): Promise<DataResponse<Fulfillment>>;
17285
- update(id: string, body: UpdateBody$g): Promise<DataResponse<Fulfillment>>;
17320
+ create(fulfillmentOrderId: string, body: CreateBody$i, options?: ResourceRequestOptions): Promise<DataResponse<Fulfillment>>;
17321
+ update(id: string, body: UpdateBody$i): Promise<DataResponse<Fulfillment>>;
17286
17322
  cancel(id: string, body?: CancelBody): Promise<DataResponse<Fulfillment>>;
17287
17323
  }
17288
17324
 
17289
17325
  type Refund = components['schemas']['Refund'];
17290
- type ListParams$l = NonNullable<operations['listRefunds']['parameters']['query']>;
17291
- type CreateBody$f = NonNullable<operations['createOrderRefund']['requestBody']>['content']['application/json'];
17326
+ type ListParams$n = NonNullable<operations['listRefunds']['parameters']['query']>;
17327
+ type CreateBody$h = NonNullable<operations['createOrderRefund']['requestBody']>['content']['application/json'];
17292
17328
  declare class RefundsResource {
17293
17329
  private client;
17294
17330
  constructor(client: Hydra);
17295
- list(params?: ListParams$l): Promise<ListResponse<Refund>>;
17296
- iterate(params?: Omit<ListParams$l, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Refund, void, undefined>;
17297
- toArray(params?: Omit<ListParams$l, 'cursor'>, options?: PaginateOptions & {
17331
+ list(params?: ListParams$n): Promise<ListResponse<Refund>>;
17332
+ iterate(params?: Omit<ListParams$n, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Refund, void, undefined>;
17333
+ toArray(params?: Omit<ListParams$n, 'cursor'>, options?: PaginateOptions & {
17298
17334
  limit?: number;
17299
17335
  }): Promise<Refund[]>;
17300
17336
  get(id: string, params?: {
17301
17337
  expand?: string;
17302
17338
  fields?: string;
17303
17339
  }): Promise<DataResponse<Refund>>;
17304
- create(orderId: string, body: CreateBody$f, options?: ResourceRequestOptions): Promise<DataResponse<Refund>>;
17340
+ create(orderId: string, body: CreateBody$h, options?: ResourceRequestOptions): Promise<DataResponse<Refund>>;
17305
17341
  listByOrder(orderId: string): Promise<DataResponse<Refund[]>>;
17306
17342
  retry(id: string): Promise<DataResponse<Refund>>;
17307
17343
  /**
@@ -17312,24 +17348,24 @@ declare class RefundsResource {
17312
17348
  }
17313
17349
 
17314
17350
  type Return = components['schemas']['Return'];
17315
- type ListParams$k = NonNullable<operations['listReturns']['parameters']['query']>;
17316
- type CreateBody$e = NonNullable<operations['createOrderReturn']['requestBody']>['content']['application/json'];
17351
+ type ListParams$m = NonNullable<operations['listReturns']['parameters']['query']>;
17352
+ type CreateBody$g = NonNullable<operations['createOrderReturn']['requestBody']>['content']['application/json'];
17317
17353
  type ApproveBody = NonNullable<operations['approveReturn']['requestBody']>['content']['application/json'];
17318
17354
  type ReceiveBody$1 = NonNullable<operations['receiveReturn']['requestBody']>['content']['application/json'];
17319
17355
  type RejectBody = NonNullable<operations['rejectReturn']['requestBody']>['content']['application/json'];
17320
17356
  declare class ReturnsResource {
17321
17357
  private client;
17322
17358
  constructor(client: Hydra);
17323
- list(params?: ListParams$k): Promise<ListResponse<Return>>;
17324
- iterate(params?: Omit<ListParams$k, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Return, void, undefined>;
17325
- toArray(params?: Omit<ListParams$k, 'cursor'>, options?: PaginateOptions & {
17359
+ list(params?: ListParams$m): Promise<ListResponse<Return>>;
17360
+ iterate(params?: Omit<ListParams$m, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Return, void, undefined>;
17361
+ toArray(params?: Omit<ListParams$m, 'cursor'>, options?: PaginateOptions & {
17326
17362
  limit?: number;
17327
17363
  }): Promise<Return[]>;
17328
17364
  get(id: string, params?: {
17329
17365
  expand?: string;
17330
17366
  fields?: string;
17331
17367
  }): Promise<DataResponse<Return>>;
17332
- create(orderId: string, body: CreateBody$e, options?: ResourceRequestOptions): Promise<DataResponse<Return>>;
17368
+ create(orderId: string, body: CreateBody$g, options?: ResourceRequestOptions): Promise<DataResponse<Return>>;
17333
17369
  listByOrder(orderId: string): Promise<DataResponse<Return[]>>;
17334
17370
  approve(id: string, body?: ApproveBody): Promise<DataResponse<Return>>;
17335
17371
  receive(id: string, body?: ReceiveBody$1): Promise<DataResponse<Return>>;
@@ -17341,17 +17377,17 @@ declare class ReturnsResource {
17341
17377
  type DraftOrder = components['schemas']['DraftOrder'];
17342
17378
  type DraftOrderLineItem = components['schemas']['DraftOrderLineItem'];
17343
17379
  type Order = components['schemas']['Order'];
17344
- type ListParams$j = NonNullable<operations['listDraftOrders']['parameters']['query']>;
17345
- type CreateBody$d = NonNullable<operations['createDraftOrder']['requestBody']>['content']['application/json'];
17346
- type UpdateBody$f = NonNullable<operations['updateDraftOrder']['requestBody']>['content']['application/json'];
17380
+ type ListParams$l = NonNullable<operations['listDraftOrders']['parameters']['query']>;
17381
+ type CreateBody$f = NonNullable<operations['createDraftOrder']['requestBody']>['content']['application/json'];
17382
+ type UpdateBody$h = NonNullable<operations['updateDraftOrder']['requestBody']>['content']['application/json'];
17347
17383
  type AddItemsBody = NonNullable<operations['addDraftOrderItems']['requestBody']>['content']['application/json'];
17348
17384
  type UpdateItemBody$2 = NonNullable<operations['updateDraftOrderItem']['requestBody']>['content']['application/json'];
17349
17385
  declare class DraftOrdersResource {
17350
17386
  private client;
17351
17387
  constructor(client: Hydra);
17352
- list(params?: ListParams$j): Promise<ListResponse<DraftOrder>>;
17353
- iterate(params?: Omit<ListParams$j, 'cursor'>, options?: PaginateOptions): AsyncGenerator<DraftOrder, void, undefined>;
17354
- toArray(params?: Omit<ListParams$j, 'cursor'>, options?: PaginateOptions & {
17388
+ list(params?: ListParams$l): Promise<ListResponse<DraftOrder>>;
17389
+ iterate(params?: Omit<ListParams$l, 'cursor'>, options?: PaginateOptions): AsyncGenerator<DraftOrder, void, undefined>;
17390
+ toArray(params?: Omit<ListParams$l, 'cursor'>, options?: PaginateOptions & {
17355
17391
  limit?: number;
17356
17392
  }): Promise<DraftOrder[]>;
17357
17393
  get(id: string, params?: {
@@ -17359,8 +17395,8 @@ declare class DraftOrdersResource {
17359
17395
  currency?: string;
17360
17396
  fields?: string;
17361
17397
  }): Promise<DataResponse<DraftOrder>>;
17362
- create(body: CreateBody$d, options?: ResourceRequestOptions): Promise<DataResponse<DraftOrder>>;
17363
- update(id: string, body: UpdateBody$f): Promise<DataResponse<DraftOrder>>;
17398
+ create(body: CreateBody$f, options?: ResourceRequestOptions): Promise<DataResponse<DraftOrder>>;
17399
+ update(id: string, body: UpdateBody$h): Promise<DataResponse<DraftOrder>>;
17364
17400
  delete(id: string): Promise<void>;
17365
17401
  addItems(draftOrderId: string, body: AddItemsBody): Promise<DataResponse<DraftOrderLineItem[]>>;
17366
17402
  updateItem(draftOrderId: string, itemId: string, body: UpdateItemBody$2): Promise<DataResponse<DraftOrderLineItem>>;
@@ -17375,22 +17411,22 @@ declare class DraftOrdersResource {
17375
17411
  }
17376
17412
 
17377
17413
  type Customer = components['schemas']['Customer'];
17378
- type ListParams$i = NonNullable<operations['listCustomers']['parameters']['query']>;
17379
- type CreateBody$c = NonNullable<operations['createCustomer']['requestBody']>['content']['application/json'];
17380
- type UpdateBody$e = NonNullable<operations['updateCustomer']['requestBody']>['content']['application/json'];
17414
+ type ListParams$k = NonNullable<operations['listCustomers']['parameters']['query']>;
17415
+ type CreateBody$e = NonNullable<operations['createCustomer']['requestBody']>['content']['application/json'];
17416
+ type UpdateBody$g = NonNullable<operations['updateCustomer']['requestBody']>['content']['application/json'];
17381
17417
  type CreateAddressBody$1 = NonNullable<operations['createCustomerAddress']['requestBody']>['content']['application/json'];
17382
17418
  type CreateNoteBody$1 = NonNullable<operations['createCustomerNote']['requestBody']>['content']['application/json'];
17383
17419
  declare class CustomersResource {
17384
17420
  private client;
17385
17421
  constructor(client: Hydra);
17386
- list(params?: ListParams$i): Promise<ListResponse<Customer>>;
17387
- iterate(params?: Omit<ListParams$i, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Customer, void, undefined>;
17388
- toArray(params?: Omit<ListParams$i, 'cursor'>, options?: PaginateOptions & {
17422
+ list(params?: ListParams$k): Promise<ListResponse<Customer>>;
17423
+ iterate(params?: Omit<ListParams$k, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Customer, void, undefined>;
17424
+ toArray(params?: Omit<ListParams$k, 'cursor'>, options?: PaginateOptions & {
17389
17425
  limit?: number;
17390
17426
  }): Promise<Customer[]>;
17391
- get(id: string, params?: Pick<ListParams$i, 'expand' | 'fields'>): Promise<DataResponse<Customer>>;
17392
- create(body: CreateBody$c, options?: ResourceRequestOptions): Promise<DataResponse<Customer>>;
17393
- update(id: string, body: UpdateBody$e): Promise<DataResponse<Customer>>;
17427
+ get(id: string, params?: Pick<ListParams$k, 'expand' | 'fields'>): Promise<DataResponse<Customer>>;
17428
+ create(body: CreateBody$e, options?: ResourceRequestOptions): Promise<DataResponse<Customer>>;
17429
+ update(id: string, body: UpdateBody$g): Promise<DataResponse<Customer>>;
17394
17430
  delete(id: string): Promise<void>;
17395
17431
  listAddresses(customerId: string): Promise<DataResponse<unknown[]>>;
17396
17432
  createAddress(customerId: string, body: CreateAddressBody$1): Promise<DataResponse<unknown>>;
@@ -17404,38 +17440,38 @@ declare class CustomersResource {
17404
17440
  }
17405
17441
 
17406
17442
  type CustomerGroup = components['schemas']['CustomerGroup'];
17407
- type ListParams$h = NonNullable<operations['listCustomerGroups']['parameters']['query']>;
17408
- type CreateBody$b = NonNullable<operations['createCustomerGroup']['requestBody']>['content']['application/json'];
17409
- type UpdateBody$d = NonNullable<operations['updateCustomerGroup']['requestBody']>['content']['application/json'];
17443
+ type ListParams$j = NonNullable<operations['listCustomerGroups']['parameters']['query']>;
17444
+ type CreateBody$d = NonNullable<operations['createCustomerGroup']['requestBody']>['content']['application/json'];
17445
+ type UpdateBody$f = NonNullable<operations['updateCustomerGroup']['requestBody']>['content']['application/json'];
17410
17446
  type AddMembersBody = NonNullable<operations['addCustomerGroupMembers']['requestBody']>['content']['application/json'];
17411
17447
  declare class CustomerGroupsResource {
17412
17448
  private client;
17413
17449
  constructor(client: Hydra);
17414
- list(params?: ListParams$h): Promise<ListResponse<CustomerGroup>>;
17415
- iterate(params?: Omit<ListParams$h, 'cursor'>, options?: PaginateOptions): AsyncGenerator<CustomerGroup, void, undefined>;
17416
- toArray(params?: Omit<ListParams$h, 'cursor'>, options?: PaginateOptions & {
17450
+ list(params?: ListParams$j): Promise<ListResponse<CustomerGroup>>;
17451
+ iterate(params?: Omit<ListParams$j, 'cursor'>, options?: PaginateOptions): AsyncGenerator<CustomerGroup, void, undefined>;
17452
+ toArray(params?: Omit<ListParams$j, 'cursor'>, options?: PaginateOptions & {
17417
17453
  limit?: number;
17418
17454
  }): Promise<CustomerGroup[]>;
17419
17455
  get(id: string): Promise<DataResponse<CustomerGroup>>;
17420
- create(body: CreateBody$b, options?: ResourceRequestOptions): Promise<DataResponse<CustomerGroup>>;
17421
- update(id: string, body: UpdateBody$d): Promise<DataResponse<CustomerGroup>>;
17456
+ create(body: CreateBody$d, options?: ResourceRequestOptions): Promise<DataResponse<CustomerGroup>>;
17457
+ update(id: string, body: UpdateBody$f): Promise<DataResponse<CustomerGroup>>;
17422
17458
  delete(id: string): Promise<void>;
17423
17459
  addMembers(groupId: string, body: AddMembersBody): Promise<void>;
17424
17460
  removeMember(groupId: string, customerId: string): Promise<void>;
17425
17461
  }
17426
17462
 
17427
- type UpdateBody$c = NonNullable<operations['updateAddress']['requestBody']>['content']['application/json'];
17463
+ type UpdateBody$e = NonNullable<operations['updateAddress']['requestBody']>['content']['application/json'];
17428
17464
  declare class AddressesResource {
17429
17465
  private client;
17430
17466
  constructor(client: Hydra);
17431
- update(id: string, body: UpdateBody$c): Promise<DataResponse<unknown>>;
17467
+ update(id: string, body: UpdateBody$e): Promise<DataResponse<unknown>>;
17432
17468
  delete(id: string): Promise<void>;
17433
17469
  }
17434
17470
 
17435
17471
  type InventoryLevel = components['schemas']['InventoryLevel'];
17436
17472
  type InventoryAdjustment = components['schemas']['InventoryAdjustment'];
17437
17473
  type ProductAdjustment = components['schemas']['ProductAdjustment'];
17438
- type ListParams$g = NonNullable<operations['listInventory']['parameters']['query']>;
17474
+ type ListParams$i = NonNullable<operations['listInventory']['parameters']['query']>;
17439
17475
  type SetBody = NonNullable<operations['setInventory']['requestBody']>['content']['application/json'];
17440
17476
  type AdjustBody = NonNullable<operations['adjustInventory']['requestBody']>['content']['application/json'];
17441
17477
  type InventoryResult = InventoryLevel & {
@@ -17444,9 +17480,9 @@ type InventoryResult = InventoryLevel & {
17444
17480
  declare class InventoryResource {
17445
17481
  private client;
17446
17482
  constructor(client: Hydra);
17447
- list(params?: ListParams$g): Promise<ListResponse<InventoryLevel>>;
17448
- iterate(params?: Omit<ListParams$g, 'cursor'>, options?: PaginateOptions): AsyncGenerator<InventoryLevel, void, undefined>;
17449
- toArray(params?: Omit<ListParams$g, 'cursor'>, options?: PaginateOptions & {
17483
+ list(params?: ListParams$i): Promise<ListResponse<InventoryLevel>>;
17484
+ iterate(params?: Omit<ListParams$i, 'cursor'>, options?: PaginateOptions): AsyncGenerator<InventoryLevel, void, undefined>;
17485
+ toArray(params?: Omit<ListParams$i, 'cursor'>, options?: PaginateOptions & {
17450
17486
  limit?: number;
17451
17487
  }): Promise<InventoryLevel[]>;
17452
17488
  listAdjustments(params: {
@@ -17518,56 +17554,56 @@ declare class ShippingResource {
17518
17554
  }
17519
17555
 
17520
17556
  type Promotion = components['schemas']['Promotion'];
17521
- type ListParams$f = NonNullable<operations['listPromotions']['parameters']['query']>;
17522
- type CreateBody$a = NonNullable<operations['createPromotion']['requestBody']>['content']['application/json'];
17523
- type UpdateBody$b = NonNullable<operations['updatePromotion']['requestBody']>['content']['application/json'];
17557
+ type ListParams$h = NonNullable<operations['listPromotions']['parameters']['query']>;
17558
+ type CreateBody$c = NonNullable<operations['createPromotion']['requestBody']>['content']['application/json'];
17559
+ type UpdateBody$d = NonNullable<operations['updatePromotion']['requestBody']>['content']['application/json'];
17524
17560
  declare class PromotionsResource {
17525
17561
  private client;
17526
17562
  constructor(client: Hydra);
17527
- list(params?: ListParams$f): Promise<ListResponse<Promotion>>;
17528
- iterate(params?: Omit<ListParams$f, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Promotion, void, undefined>;
17529
- toArray(params?: Omit<ListParams$f, 'cursor'>, options?: PaginateOptions & {
17563
+ list(params?: ListParams$h): Promise<ListResponse<Promotion>>;
17564
+ iterate(params?: Omit<ListParams$h, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Promotion, void, undefined>;
17565
+ toArray(params?: Omit<ListParams$h, 'cursor'>, options?: PaginateOptions & {
17530
17566
  limit?: number;
17531
17567
  }): Promise<Promotion[]>;
17532
17568
  get(id: string): Promise<DataResponse<Promotion>>;
17533
- create(body: CreateBody$a, options?: ResourceRequestOptions): Promise<DataResponse<Promotion>>;
17534
- update(id: string, body: UpdateBody$b): Promise<DataResponse<Promotion>>;
17569
+ create(body: CreateBody$c, options?: ResourceRequestOptions): Promise<DataResponse<Promotion>>;
17570
+ update(id: string, body: UpdateBody$d): Promise<DataResponse<Promotion>>;
17535
17571
  delete(id: string): Promise<void>;
17536
17572
  }
17537
17573
 
17538
17574
  type Discount = components['schemas']['Discount'];
17539
- type ListParams$e = NonNullable<operations['listDiscounts']['parameters']['query']>;
17540
- type CreateBody$9 = NonNullable<operations['createDiscount']['requestBody']>['content']['application/json'];
17541
- type UpdateBody$a = NonNullable<operations['updateDiscount']['requestBody']>['content']['application/json'];
17575
+ type ListParams$g = NonNullable<operations['listDiscounts']['parameters']['query']>;
17576
+ type CreateBody$b = NonNullable<operations['createDiscount']['requestBody']>['content']['application/json'];
17577
+ type UpdateBody$c = NonNullable<operations['updateDiscount']['requestBody']>['content']['application/json'];
17542
17578
  declare class DiscountsResource {
17543
17579
  private client;
17544
17580
  constructor(client: Hydra);
17545
- list(params?: ListParams$e): Promise<ListResponse<Discount>>;
17546
- iterate(params?: Omit<ListParams$e, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Discount, void, undefined>;
17547
- toArray(params?: Omit<ListParams$e, 'cursor'>, options?: PaginateOptions & {
17581
+ list(params?: ListParams$g): Promise<ListResponse<Discount>>;
17582
+ iterate(params?: Omit<ListParams$g, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Discount, void, undefined>;
17583
+ toArray(params?: Omit<ListParams$g, 'cursor'>, options?: PaginateOptions & {
17548
17584
  limit?: number;
17549
17585
  }): Promise<Discount[]>;
17550
17586
  get(id: string): Promise<DataResponse<Discount>>;
17551
- create(body: CreateBody$9, options?: ResourceRequestOptions): Promise<DataResponse<Discount>>;
17552
- update(id: string, body: UpdateBody$a): Promise<DataResponse<Discount>>;
17587
+ create(body: CreateBody$b, options?: ResourceRequestOptions): Promise<DataResponse<Discount>>;
17588
+ update(id: string, body: UpdateBody$c): Promise<DataResponse<Discount>>;
17553
17589
  delete(id: string): Promise<void>;
17554
17590
  }
17555
17591
 
17556
17592
  type Image = components['schemas']['Image'];
17557
- type ListParams$d = NonNullable<operations['listImages']['parameters']['query']>;
17558
- type UpdateBody$9 = NonNullable<operations['updateImage']['requestBody']>['content']['application/json'];
17593
+ type ListParams$f = NonNullable<operations['listImages']['parameters']['query']>;
17594
+ type UpdateBody$b = NonNullable<operations['updateImage']['requestBody']>['content']['application/json'];
17559
17595
  type ReorderBody$2 = NonNullable<operations['reorderImages']['requestBody']>['content']['application/json'];
17560
17596
  declare class ImagesResource {
17561
17597
  private client;
17562
17598
  constructor(client: Hydra);
17563
- list(params?: ListParams$d): Promise<ListResponse<Image>>;
17564
- iterate(params?: Omit<ListParams$d, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Image, void, undefined>;
17565
- toArray(params?: Omit<ListParams$d, 'cursor'>, options?: PaginateOptions & {
17599
+ list(params?: ListParams$f): Promise<ListResponse<Image>>;
17600
+ iterate(params?: Omit<ListParams$f, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Image, void, undefined>;
17601
+ toArray(params?: Omit<ListParams$f, 'cursor'>, options?: PaginateOptions & {
17566
17602
  limit?: number;
17567
17603
  }): Promise<Image[]>;
17568
17604
  /** Upload an image to the store library */
17569
17605
  upload(formData: FormData): Promise<DataResponse<Image>>;
17570
- update(id: string, body: UpdateBody$9): Promise<DataResponse<Image>>;
17606
+ update(id: string, body: UpdateBody$b): Promise<DataResponse<Image>>;
17571
17607
  delete(id: string): Promise<void>;
17572
17608
  detach(id: string): Promise<void>;
17573
17609
  batchDelete(imageIds: string[]): Promise<void>;
@@ -17576,32 +17612,32 @@ declare class ImagesResource {
17576
17612
  }
17577
17613
 
17578
17614
  type Webhook = components['schemas']['Webhook'];
17579
- type ListParams$c = NonNullable<operations['listWebhooks']['parameters']['query']>;
17580
- type CreateBody$8 = NonNullable<operations['createWebhook']['requestBody']>['content']['application/json'];
17581
- type UpdateBody$8 = NonNullable<operations['updateWebhook']['requestBody']>['content']['application/json'];
17615
+ type ListParams$e = NonNullable<operations['listWebhooks']['parameters']['query']>;
17616
+ type CreateBody$a = NonNullable<operations['createWebhook']['requestBody']>['content']['application/json'];
17617
+ type UpdateBody$a = NonNullable<operations['updateWebhook']['requestBody']>['content']['application/json'];
17582
17618
  declare class WebhooksResource {
17583
17619
  private client;
17584
17620
  constructor(client: Hydra);
17585
- list(params?: ListParams$c): Promise<ListResponse<Webhook>>;
17586
- iterate(params?: Omit<ListParams$c, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Webhook, void, undefined>;
17587
- toArray(params?: Omit<ListParams$c, 'cursor'>, options?: PaginateOptions & {
17621
+ list(params?: ListParams$e): Promise<ListResponse<Webhook>>;
17622
+ iterate(params?: Omit<ListParams$e, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Webhook, void, undefined>;
17623
+ toArray(params?: Omit<ListParams$e, 'cursor'>, options?: PaginateOptions & {
17588
17624
  limit?: number;
17589
17625
  }): Promise<Webhook[]>;
17590
17626
  get(id: string): Promise<DataResponse<Webhook>>;
17591
- create(body: CreateBody$8, options?: ResourceRequestOptions): Promise<DataResponse<Webhook>>;
17592
- update(id: string, body: UpdateBody$8): Promise<DataResponse<Webhook>>;
17627
+ create(body: CreateBody$a, options?: ResourceRequestOptions): Promise<DataResponse<Webhook>>;
17628
+ update(id: string, body: UpdateBody$a): Promise<DataResponse<Webhook>>;
17593
17629
  delete(id: string): Promise<void>;
17594
17630
  }
17595
17631
 
17596
17632
  type Store = components['schemas']['Store'];
17597
- type UpdateBody$7 = NonNullable<operations['updateStore']['requestBody']>['content']['application/json'];
17633
+ type UpdateBody$9 = NonNullable<operations['updateStore']['requestBody']>['content']['application/json'];
17598
17634
  declare class StoreResource {
17599
17635
  private client;
17600
17636
  constructor(client: Hydra);
17601
17637
  get(params?: {
17602
17638
  fields?: string;
17603
17639
  }): Promise<DataResponse<Store>>;
17604
- update(body: UpdateBody$7): Promise<DataResponse<Store>>;
17640
+ update(body: UpdateBody$9): Promise<DataResponse<Store>>;
17605
17641
  getDomainRecord(): Promise<DataResponse<unknown>>;
17606
17642
  verifyDomain(): Promise<DataResponse<unknown>>;
17607
17643
  publish(): Promise<DataResponse<{
@@ -17613,42 +17649,42 @@ declare class StoreResource {
17613
17649
  }
17614
17650
 
17615
17651
  type Tag = components['schemas']['Tag'];
17616
- type ListParams$b = NonNullable<operations['listTags']['parameters']['query']>;
17617
- type CreateBody$7 = NonNullable<operations['createTag']['requestBody']>['content']['application/json'];
17618
- type UpdateBody$6 = NonNullable<operations['updateTag']['requestBody']>['content']['application/json'];
17652
+ type ListParams$d = NonNullable<operations['listTags']['parameters']['query']>;
17653
+ type CreateBody$9 = NonNullable<operations['createTag']['requestBody']>['content']['application/json'];
17654
+ type UpdateBody$8 = NonNullable<operations['updateTag']['requestBody']>['content']['application/json'];
17619
17655
  declare class TagsResource {
17620
17656
  private client;
17621
17657
  constructor(client: Hydra);
17622
- list(params?: ListParams$b): Promise<ListResponse<Tag>>;
17623
- iterate(params?: Omit<ListParams$b, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Tag, void, undefined>;
17624
- toArray(params?: Omit<ListParams$b, 'cursor'>, options?: PaginateOptions & {
17658
+ list(params?: ListParams$d): Promise<ListResponse<Tag>>;
17659
+ iterate(params?: Omit<ListParams$d, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Tag, void, undefined>;
17660
+ toArray(params?: Omit<ListParams$d, 'cursor'>, options?: PaginateOptions & {
17625
17661
  limit?: number;
17626
17662
  }): Promise<Tag[]>;
17627
- create(body: CreateBody$7, options?: ResourceRequestOptions): Promise<DataResponse<Tag>>;
17628
- update(id: string, body: UpdateBody$6): Promise<DataResponse<Tag>>;
17663
+ create(body: CreateBody$9, options?: ResourceRequestOptions): Promise<DataResponse<Tag>>;
17664
+ update(id: string, body: UpdateBody$8): Promise<DataResponse<Tag>>;
17629
17665
  delete(id: string): Promise<void>;
17630
17666
  }
17631
17667
 
17632
17668
  type Redirect = components['schemas']['Redirect'];
17633
- type ListParams$a = NonNullable<operations['listRedirects']['parameters']['query']>;
17634
- type CreateBody$6 = NonNullable<operations['createRedirect']['requestBody']>['content']['application/json'];
17669
+ type ListParams$c = NonNullable<operations['listRedirects']['parameters']['query']>;
17670
+ type CreateBody$8 = NonNullable<operations['createRedirect']['requestBody']>['content']['application/json'];
17635
17671
  declare class RedirectsResource {
17636
17672
  private client;
17637
17673
  constructor(client: Hydra);
17638
- list(params?: ListParams$a): Promise<ListResponse<Redirect>>;
17639
- iterate(params?: Omit<ListParams$a, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Redirect, void, undefined>;
17640
- toArray(params?: Omit<ListParams$a, 'cursor'>, options?: PaginateOptions & {
17674
+ list(params?: ListParams$c): Promise<ListResponse<Redirect>>;
17675
+ iterate(params?: Omit<ListParams$c, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Redirect, void, undefined>;
17676
+ toArray(params?: Omit<ListParams$c, 'cursor'>, options?: PaginateOptions & {
17641
17677
  limit?: number;
17642
17678
  }): Promise<Redirect[]>;
17643
- create(body: CreateBody$6, options?: ResourceRequestOptions): Promise<DataResponse<Redirect>>;
17679
+ create(body: CreateBody$8, options?: ResourceRequestOptions): Promise<DataResponse<Redirect>>;
17644
17680
  lookup(path: string): Promise<DataResponse<Redirect>>;
17645
17681
  delete(id: string): Promise<void>;
17646
17682
  }
17647
17683
 
17648
17684
  type Company = components['schemas']['Company'];
17649
- type ListParams$9 = NonNullable<operations['listCompanies']['parameters']['query']>;
17650
- type CreateBody$5 = NonNullable<operations['createCompany']['requestBody']>['content']['application/json'];
17651
- type UpdateBody$5 = NonNullable<operations['updateCompany']['requestBody']>['content']['application/json'];
17685
+ type ListParams$b = NonNullable<operations['listCompanies']['parameters']['query']>;
17686
+ type CreateBody$7 = NonNullable<operations['createCompany']['requestBody']>['content']['application/json'];
17687
+ type UpdateBody$7 = NonNullable<operations['updateCompany']['requestBody']>['content']['application/json'];
17652
17688
  type CreateAddressBody = NonNullable<operations['createCompanyAddress']['requestBody']>['content']['application/json'];
17653
17689
  type UpdateAddressBody = NonNullable<operations['updateCompanyAddress']['requestBody']>['content']['application/json'];
17654
17690
  type CreateContactBody = NonNullable<operations['createCompanyContact']['requestBody']>['content']['application/json'];
@@ -17657,14 +17693,14 @@ type CreateNoteBody = NonNullable<operations['createCompanyNote']['requestBody']
17657
17693
  declare class CompaniesResource {
17658
17694
  private client;
17659
17695
  constructor(client: Hydra);
17660
- list(params?: ListParams$9): Promise<ListResponse<Company>>;
17661
- iterate(params?: Omit<ListParams$9, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Company, void, undefined>;
17662
- toArray(params?: Omit<ListParams$9, 'cursor'>, options?: PaginateOptions & {
17696
+ list(params?: ListParams$b): Promise<ListResponse<Company>>;
17697
+ iterate(params?: Omit<ListParams$b, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Company, void, undefined>;
17698
+ toArray(params?: Omit<ListParams$b, 'cursor'>, options?: PaginateOptions & {
17663
17699
  limit?: number;
17664
17700
  }): Promise<Company[]>;
17665
- get(id: string, params?: Pick<ListParams$9, 'expand' | 'fields'>): Promise<DataResponse<Company>>;
17666
- create(body: CreateBody$5, options?: ResourceRequestOptions): Promise<DataResponse<Company>>;
17667
- update(id: string, body: UpdateBody$5): Promise<DataResponse<Company>>;
17701
+ get(id: string, params?: Pick<ListParams$b, 'expand' | 'fields'>): Promise<DataResponse<Company>>;
17702
+ create(body: CreateBody$7, options?: ResourceRequestOptions): Promise<DataResponse<Company>>;
17703
+ update(id: string, body: UpdateBody$7): Promise<DataResponse<Company>>;
17668
17704
  delete(id: string): Promise<void>;
17669
17705
  listAddresses(companyId: string): Promise<DataResponse<unknown[]>>;
17670
17706
  createAddress(companyId: string, body: CreateAddressBody): Promise<DataResponse<unknown>>;
@@ -17680,23 +17716,23 @@ declare class CompaniesResource {
17680
17716
  }
17681
17717
 
17682
17718
  type PurchaseOrder = components['schemas']['PurchaseOrder'];
17683
- type ListParams$8 = NonNullable<operations['listPurchaseOrders']['parameters']['query']>;
17684
- type CreateBody$4 = NonNullable<operations['createPurchaseOrder']['requestBody']>['content']['application/json'];
17685
- type UpdateBody$4 = NonNullable<operations['updatePurchaseOrder']['requestBody']>['content']['application/json'];
17719
+ type ListParams$a = NonNullable<operations['listPurchaseOrders']['parameters']['query']>;
17720
+ type CreateBody$6 = NonNullable<operations['createPurchaseOrder']['requestBody']>['content']['application/json'];
17721
+ type UpdateBody$6 = NonNullable<operations['updatePurchaseOrder']['requestBody']>['content']['application/json'];
17686
17722
  type AddItemBody = NonNullable<operations['addPurchaseOrderItems']['requestBody']>['content']['application/json'];
17687
17723
  type UpdateItemBody$1 = NonNullable<operations['updatePurchaseOrderItem']['requestBody']>['content']['application/json'];
17688
17724
  type ReceiveBody = NonNullable<operations['receivePurchaseOrderItems']['requestBody']>['content']['application/json'];
17689
17725
  declare class PurchaseOrdersResource {
17690
17726
  private client;
17691
17727
  constructor(client: Hydra);
17692
- list(params?: ListParams$8): Promise<ListResponse<PurchaseOrder>>;
17693
- iterate(params?: Omit<ListParams$8, 'cursor'>, options?: PaginateOptions): AsyncGenerator<PurchaseOrder, void, undefined>;
17694
- toArray(params?: Omit<ListParams$8, 'cursor'>, options?: PaginateOptions & {
17728
+ list(params?: ListParams$a): Promise<ListResponse<PurchaseOrder>>;
17729
+ iterate(params?: Omit<ListParams$a, 'cursor'>, options?: PaginateOptions): AsyncGenerator<PurchaseOrder, void, undefined>;
17730
+ toArray(params?: Omit<ListParams$a, 'cursor'>, options?: PaginateOptions & {
17695
17731
  limit?: number;
17696
17732
  }): Promise<PurchaseOrder[]>;
17697
- get(id: string, params?: Pick<ListParams$8, 'expand' | 'fields'>): Promise<DataResponse<PurchaseOrder>>;
17698
- create(body: CreateBody$4, options?: ResourceRequestOptions): Promise<DataResponse<PurchaseOrder>>;
17699
- update(id: string, body: UpdateBody$4): Promise<DataResponse<PurchaseOrder>>;
17733
+ get(id: string, params?: Pick<ListParams$a, 'expand' | 'fields'>): Promise<DataResponse<PurchaseOrder>>;
17734
+ create(body: CreateBody$6, options?: ResourceRequestOptions): Promise<DataResponse<PurchaseOrder>>;
17735
+ update(id: string, body: UpdateBody$6): Promise<DataResponse<PurchaseOrder>>;
17700
17736
  delete(id: string): Promise<void>;
17701
17737
  addItem(purchaseOrderId: string, body: AddItemBody): Promise<DataResponse<unknown>>;
17702
17738
  updateItem(purchaseOrderId: string, itemId: string, body: UpdateItemBody$1): Promise<DataResponse<unknown>>;
@@ -17719,17 +17755,17 @@ declare class FulfillmentOrdersResource {
17719
17755
  listForOrder(orderId: string): Promise<DataResponse<FulfillmentOrder[]>>;
17720
17756
  }
17721
17757
 
17722
- type ListParams$7 = NonNullable<operations['listMetafieldDefinitions']['parameters']['query']>;
17723
- type CreateBody$3 = NonNullable<operations['createMetafieldDefinition']['requestBody']>['content']['application/json'];
17724
- type UpdateBody$3 = NonNullable<operations['updateMetafieldDefinition']['requestBody']>['content']['application/json'];
17758
+ type ListParams$9 = NonNullable<operations['listMetafieldDefinitions']['parameters']['query']>;
17759
+ type CreateBody$5 = NonNullable<operations['createMetafieldDefinition']['requestBody']>['content']['application/json'];
17760
+ type UpdateBody$5 = NonNullable<operations['updateMetafieldDefinition']['requestBody']>['content']['application/json'];
17725
17761
  type ReorderBody$1 = NonNullable<operations['reorderMetafieldDefinitions']['requestBody']>['content']['application/json'];
17726
17762
  declare class MetafieldsResource {
17727
17763
  private client;
17728
17764
  constructor(client: Hydra);
17729
17765
  /** List metafield definitions for the store */
17730
- listDefinitions(params?: ListParams$7): Promise<DataResponse<unknown[]>>;
17731
- createDefinition(body: CreateBody$3): Promise<DataResponse<unknown>>;
17732
- updateDefinition(ownerType: string, slug: string, body: UpdateBody$3): Promise<DataResponse<unknown>>;
17766
+ listDefinitions(params?: ListParams$9): Promise<DataResponse<unknown[]>>;
17767
+ createDefinition(body: CreateBody$5): Promise<DataResponse<unknown>>;
17768
+ updateDefinition(ownerType: string, slug: string, body: UpdateBody$5): Promise<DataResponse<unknown>>;
17733
17769
  archiveDefinition(ownerType: string, slug: string): Promise<void>;
17734
17770
  reorderDefinitions(ownerType: string, body: ReorderBody$1): Promise<void>;
17735
17771
  }
@@ -17775,30 +17811,30 @@ declare class TaxResource {
17775
17811
  }
17776
17812
 
17777
17813
  type ExchangeRate = components['schemas']['ExchangeRate'];
17778
- type ListParams$6 = NonNullable<operations['listExchangeRates']['parameters']['query']>;
17814
+ type ListParams$8 = NonNullable<operations['listExchangeRates']['parameters']['query']>;
17779
17815
  declare class ExchangeRatesResource {
17780
17816
  private client;
17781
17817
  constructor(client: Hydra);
17782
- list(params?: ListParams$6): Promise<DataResponse<ExchangeRate[]>>;
17818
+ list(params?: ListParams$8): Promise<DataResponse<ExchangeRate[]>>;
17783
17819
  refresh(): Promise<DataResponse<unknown>>;
17784
17820
  }
17785
17821
 
17786
17822
  type FilterAttribute = components['schemas']['FilterAttribute'];
17787
- type ListParams$5 = NonNullable<operations['listFilterAttributes']['parameters']['query']>;
17788
- type CreateBody$2 = NonNullable<operations['createFilterAttribute']['requestBody']>['content']['application/json'];
17789
- type UpdateBody$2 = NonNullable<operations['updateFilterAttribute']['requestBody']>['content']['application/json'];
17823
+ type ListParams$7 = NonNullable<operations['listFilterAttributes']['parameters']['query']>;
17824
+ type CreateBody$4 = NonNullable<operations['createFilterAttribute']['requestBody']>['content']['application/json'];
17825
+ type UpdateBody$4 = NonNullable<operations['updateFilterAttribute']['requestBody']>['content']['application/json'];
17790
17826
  type ReorderBody = NonNullable<operations['reorderFilterAttributes']['requestBody']>['content']['application/json'];
17791
17827
  declare class FilterAttributesResource {
17792
17828
  private client;
17793
17829
  constructor(client: Hydra);
17794
- list(params?: ListParams$5): Promise<ListResponse<FilterAttribute>>;
17795
- iterate(params?: Omit<ListParams$5, 'cursor'>, options?: PaginateOptions): AsyncGenerator<FilterAttribute, void, undefined>;
17796
- toArray(params?: Omit<ListParams$5, 'cursor'>, options?: PaginateOptions & {
17830
+ list(params?: ListParams$7): Promise<ListResponse<FilterAttribute>>;
17831
+ iterate(params?: Omit<ListParams$7, 'cursor'>, options?: PaginateOptions): AsyncGenerator<FilterAttribute, void, undefined>;
17832
+ toArray(params?: Omit<ListParams$7, 'cursor'>, options?: PaginateOptions & {
17797
17833
  limit?: number;
17798
17834
  }): Promise<FilterAttribute[]>;
17799
17835
  get(id: string): Promise<DataResponse<FilterAttribute>>;
17800
- create(body: CreateBody$2, options?: ResourceRequestOptions): Promise<DataResponse<FilterAttribute>>;
17801
- update(id: string, body: UpdateBody$2): Promise<DataResponse<FilterAttribute>>;
17836
+ create(body: CreateBody$4, options?: ResourceRequestOptions): Promise<DataResponse<FilterAttribute>>;
17837
+ update(id: string, body: UpdateBody$4): Promise<DataResponse<FilterAttribute>>;
17802
17838
  delete(id: string): Promise<void>;
17803
17839
  reorder(body: ReorderBody): Promise<ListResponse<FilterAttribute>>;
17804
17840
  discover(): Promise<DataResponse<unknown[]>>;
@@ -17806,23 +17842,23 @@ declare class FilterAttributesResource {
17806
17842
 
17807
17843
  type NavigationMenu = components['schemas']['NavigationMenu'];
17808
17844
  type NavigationItem = components['schemas']['NavigationItem'];
17809
- type ListParams$4 = NonNullable<operations['listNavigationMenus']['parameters']['query']>;
17810
- type CreateBody$1 = NonNullable<operations['createNavigationMenu']['requestBody']>['content']['application/json'];
17811
- type UpdateBody$1 = NonNullable<operations['updateNavigationMenu']['requestBody']>['content']['application/json'];
17845
+ type ListParams$6 = NonNullable<operations['listNavigationMenus']['parameters']['query']>;
17846
+ type CreateBody$3 = NonNullable<operations['createNavigationMenu']['requestBody']>['content']['application/json'];
17847
+ type UpdateBody$3 = NonNullable<operations['updateNavigationMenu']['requestBody']>['content']['application/json'];
17812
17848
  type CreateItemBody = NonNullable<operations['addNavigationItem']['requestBody']>['content']['application/json'];
17813
17849
  type UpdateItemBody = NonNullable<operations['updateNavigationItem']['requestBody']>['content']['application/json'];
17814
17850
  type ReorderItemsBody = NonNullable<operations['reorderNavigationItems']['requestBody']>['content']['application/json'];
17815
17851
  declare class NavigationResource {
17816
17852
  private client;
17817
17853
  constructor(client: Hydra);
17818
- list(params?: ListParams$4): Promise<ListResponse<NavigationMenu>>;
17819
- iterate(params?: Omit<ListParams$4, 'cursor'>, options?: PaginateOptions): AsyncGenerator<NavigationMenu, void, undefined>;
17820
- toArray(params?: Omit<ListParams$4, 'cursor'>, options?: PaginateOptions & {
17854
+ list(params?: ListParams$6): Promise<ListResponse<NavigationMenu>>;
17855
+ iterate(params?: Omit<ListParams$6, 'cursor'>, options?: PaginateOptions): AsyncGenerator<NavigationMenu, void, undefined>;
17856
+ toArray(params?: Omit<ListParams$6, 'cursor'>, options?: PaginateOptions & {
17821
17857
  limit?: number;
17822
17858
  }): Promise<NavigationMenu[]>;
17823
17859
  get(id: string): Promise<DataResponse<NavigationMenu>>;
17824
- create(body: CreateBody$1, options?: ResourceRequestOptions): Promise<DataResponse<NavigationMenu>>;
17825
- update(id: string, body: UpdateBody$1): Promise<DataResponse<NavigationMenu>>;
17860
+ create(body: CreateBody$3, options?: ResourceRequestOptions): Promise<DataResponse<NavigationMenu>>;
17861
+ update(id: string, body: UpdateBody$3): Promise<DataResponse<NavigationMenu>>;
17826
17862
  delete(id: string): Promise<void>;
17827
17863
  addItem(menuId: string, body: CreateItemBody): Promise<DataResponse<NavigationItem>>;
17828
17864
  updateItem(menuId: string, itemId: string, body: UpdateItemBody): Promise<DataResponse<NavigationItem>>;
@@ -17831,26 +17867,26 @@ declare class NavigationResource {
17831
17867
  }
17832
17868
 
17833
17869
  type NotificationLog = components['schemas']['NotificationLog'];
17834
- type ListParams$3 = NonNullable<operations['listNotifications']['parameters']['query']>;
17870
+ type ListParams$5 = NonNullable<operations['listNotifications']['parameters']['query']>;
17835
17871
  declare class NotificationsResource {
17836
17872
  private client;
17837
17873
  constructor(client: Hydra);
17838
- list(params?: ListParams$3): Promise<ListResponse<NotificationLog>>;
17839
- iterate(params?: Omit<ListParams$3, 'cursor'>, options?: PaginateOptions): AsyncGenerator<NotificationLog, void, undefined>;
17840
- toArray(params?: Omit<ListParams$3, 'cursor'>, options?: PaginateOptions & {
17874
+ list(params?: ListParams$5): Promise<ListResponse<NotificationLog>>;
17875
+ iterate(params?: Omit<ListParams$5, 'cursor'>, options?: PaginateOptions): AsyncGenerator<NotificationLog, void, undefined>;
17876
+ toArray(params?: Omit<ListParams$5, 'cursor'>, options?: PaginateOptions & {
17841
17877
  limit?: number;
17842
17878
  }): Promise<NotificationLog[]>;
17843
17879
  get(id: string): Promise<DataResponse<NotificationLog>>;
17844
17880
  }
17845
17881
 
17846
17882
  type CheckoutListItem = components['schemas']['CheckoutListItem'];
17847
- type ListParams$2 = NonNullable<operations['listCheckouts']['parameters']['query']>;
17883
+ type ListParams$4 = NonNullable<operations['listCheckouts']['parameters']['query']>;
17848
17884
  declare class CheckoutsResource {
17849
17885
  private client;
17850
17886
  constructor(client: Hydra);
17851
- list(params?: ListParams$2): Promise<ListResponse<CheckoutListItem>>;
17852
- iterate(params?: Omit<ListParams$2, 'cursor'>, options?: PaginateOptions): AsyncGenerator<CheckoutListItem, void, undefined>;
17853
- toArray(params?: Omit<ListParams$2, 'cursor'>, options?: PaginateOptions & {
17887
+ list(params?: ListParams$4): Promise<ListResponse<CheckoutListItem>>;
17888
+ iterate(params?: Omit<ListParams$4, 'cursor'>, options?: PaginateOptions): AsyncGenerator<CheckoutListItem, void, undefined>;
17889
+ toArray(params?: Omit<ListParams$4, 'cursor'>, options?: PaginateOptions & {
17854
17890
  limit?: number;
17855
17891
  }): Promise<CheckoutListItem[]>;
17856
17892
  }
@@ -17876,16 +17912,16 @@ declare class AnalyticsResource {
17876
17912
 
17877
17913
  type CreditTransaction = NonNullable<operations['issueCustomerCredit']['responses']['201']['content']['application/json']['data']>;
17878
17914
  type CreditBalance = NonNullable<operations['getCustomerCredit']['responses']['200']['content']['application/json']['data']>;
17879
- type ListParams$1 = NonNullable<operations['listCustomerCreditTransactions']['parameters']['query']>;
17915
+ type ListParams$3 = NonNullable<operations['listCustomerCreditTransactions']['parameters']['query']>;
17880
17916
  type IssueCreditBody = NonNullable<operations['issueCustomerCredit']['requestBody']>['content']['application/json'];
17881
17917
  declare class StoreCreditResource {
17882
17918
  private client;
17883
17919
  constructor(client: Hydra);
17884
17920
  getBalance(customerId: string): Promise<DataResponse<CreditBalance>>;
17885
17921
  issue(customerId: string, body: IssueCreditBody, options?: ResourceRequestOptions): Promise<DataResponse<CreditTransaction>>;
17886
- listTransactions(customerId: string, params?: ListParams$1): Promise<ListResponse<CreditTransaction>>;
17887
- iterateTransactions(customerId: string, params?: Omit<ListParams$1, 'cursor'>, options?: PaginateOptions): AsyncGenerator<CreditTransaction, void, undefined>;
17888
- transactionsToArray(customerId: string, params?: Omit<ListParams$1, 'cursor'>, options?: PaginateOptions & {
17922
+ listTransactions(customerId: string, params?: ListParams$3): Promise<ListResponse<CreditTransaction>>;
17923
+ iterateTransactions(customerId: string, params?: Omit<ListParams$3, 'cursor'>, options?: PaginateOptions): AsyncGenerator<CreditTransaction, void, undefined>;
17924
+ transactionsToArray(customerId: string, params?: Omit<ListParams$3, 'cursor'>, options?: PaginateOptions & {
17889
17925
  limit?: number;
17890
17926
  }): Promise<CreditTransaction[]>;
17891
17927
  }
@@ -17903,21 +17939,21 @@ declare class SearchResource {
17903
17939
 
17904
17940
  type Location = components['schemas']['Location'];
17905
17941
  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'];
17942
+ type ListParams$2 = NonNullable<operations['listLocations']['parameters']['query']>;
17943
+ type CreateBody$2 = NonNullable<operations['createLocation']['requestBody']>['content']['application/json'];
17944
+ type UpdateBody$2 = NonNullable<operations['updateLocation']['requestBody']>['content']['application/json'];
17909
17945
  type TransferBody = NonNullable<operations['transferLocationInventory']['requestBody']>['content']['application/json'];
17910
17946
  declare class LocationsResource {
17911
17947
  private client;
17912
17948
  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 & {
17949
+ list(params?: ListParams$2): Promise<ListResponse<Location>>;
17950
+ iterate(params?: Omit<ListParams$2, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Location, void, undefined>;
17951
+ toArray(params?: Omit<ListParams$2, 'cursor'>, options?: PaginateOptions & {
17916
17952
  limit?: number;
17917
17953
  }): Promise<Location[]>;
17918
17954
  get(id: string): Promise<DataResponse<Location>>;
17919
- create(body: CreateBody, options?: ResourceRequestOptions): Promise<DataResponse<Location>>;
17920
- update(id: string, body: UpdateBody): Promise<DataResponse<Location>>;
17955
+ create(body: CreateBody$2, options?: ResourceRequestOptions): Promise<DataResponse<Location>>;
17956
+ update(id: string, body: UpdateBody$2): Promise<DataResponse<Location>>;
17921
17957
  delete(id: string): Promise<void>;
17922
17958
  setDefault(id: string): Promise<DataResponse<Location>>;
17923
17959
  transfer(id: string, body: TransferBody): Promise<DataResponse<TransferResult>>;
@@ -17982,6 +18018,45 @@ declare class IntegrationsResource {
17982
18018
  }): Promise<SyncLogEntry[]>;
17983
18019
  }
17984
18020
 
18021
+ type Post = components['schemas']['Post'];
18022
+ type ListParams$1 = NonNullable<operations['listPosts']['parameters']['query']>;
18023
+ type CreateBody$1 = NonNullable<operations['createPost']['requestBody']>['content']['application/json'];
18024
+ type UpdateBody$1 = NonNullable<operations['updatePost']['requestBody']>['content']['application/json'];
18025
+ type AddCategoriesBody = NonNullable<operations['addPostCategories']['requestBody']>['content']['application/json'];
18026
+ declare class PostsResource {
18027
+ private client;
18028
+ constructor(client: Hydra);
18029
+ list(params?: ListParams$1): Promise<ListResponse<Post>>;
18030
+ iterate(params?: Omit<ListParams$1, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Post, void, undefined>;
18031
+ toArray(params?: Omit<ListParams$1, 'cursor'>, options?: PaginateOptions & {
18032
+ limit?: number;
18033
+ }): Promise<Post[]>;
18034
+ get(id: string, params?: Pick<ListParams$1, 'expand' | 'fields'>): Promise<DataResponse<Post>>;
18035
+ create(body: CreateBody$1, options?: ResourceRequestOptions): Promise<DataResponse<Post>>;
18036
+ update(id: string, body: UpdateBody$1): Promise<DataResponse<Post>>;
18037
+ delete(id: string): Promise<void>;
18038
+ addCategories(postId: string, body: AddCategoriesBody): Promise<DataResponse<Post>>;
18039
+ removeCategory(postId: string, categoryId: string): Promise<void>;
18040
+ }
18041
+
18042
+ 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'];
18046
+ declare class ContentCategoriesResource {
18047
+ private client;
18048
+ 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 & {
18052
+ limit?: number;
18053
+ }): Promise<ContentCategory[]>;
18054
+ get(id: string): Promise<DataResponse<ContentCategory>>;
18055
+ create(body: CreateBody, options?: ResourceRequestOptions): Promise<DataResponse<ContentCategory>>;
18056
+ update(id: string, body: UpdateBody): Promise<DataResponse<ContentCategory>>;
18057
+ delete(id: string): Promise<void>;
18058
+ }
18059
+
17985
18060
  interface AppInfo {
17986
18061
  /** Integration/plugin name (e.g. "MyShopTheme") */
17987
18062
  name: string;
@@ -18058,6 +18133,8 @@ declare class Hydra {
18058
18133
  readonly notifications: NotificationsResource;
18059
18134
  readonly analytics: AnalyticsResource;
18060
18135
  readonly integrations: IntegrationsResource;
18136
+ readonly posts: PostsResource;
18137
+ readonly contentCategories: ContentCategoriesResource;
18061
18138
  constructor(config: HydraConfig);
18062
18139
  request<T>(method: string, path: string, options?: RequestOptions): Promise<T>;
18063
18140
  /** Multipart upload for file-based endpoints (e.g. images) */
@@ -18139,4 +18216,4 @@ declare class HydraIdempotencyError extends HydraError {
18139
18216
  constructor(body: HydraErrorBody, headers: Headers);
18140
18217
  }
18141
18218
 
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 };
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 };
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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gethydra/sdk",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Official TypeScript SDK for the Hydra Commerce API",
5
5
  "license": "MIT",
6
6
  "author": "Grant Capital Group",