@gethydra/sdk 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -2863,6 +2863,10 @@ interface components {
2863
2863
  plan?: components["schemas"]["MembershipPlan"] & unknown;
2864
2864
  /** @example cus_abc123 */
2865
2865
  customer_id: string;
2866
+ /** @example john@example.com */
2867
+ customer_email: string | null;
2868
+ /** @example John Doe */
2869
+ customer_name: string | null;
2866
2870
  /** @example sub_1abc */
2867
2871
  stripe_subscription_id: string | null;
2868
2872
  /** @example active */
@@ -16829,6 +16833,26 @@ interface operations {
16829
16833
  };
16830
16834
  };
16831
16835
  };
16836
+ getCustomerOrderInvoice: {
16837
+ parameters: {
16838
+ query?: never;
16839
+ header?: never;
16840
+ path: {
16841
+ id: string;
16842
+ };
16843
+ cookie?: never;
16844
+ };
16845
+ requestBody?: never;
16846
+ responses: {
16847
+ /** @description PDF invoice binary */
16848
+ 200: {
16849
+ headers: {
16850
+ [name: string]: unknown;
16851
+ };
16852
+ content?: never;
16853
+ };
16854
+ };
16855
+ };
16832
16856
  getAnalyticsSummary: {
16833
16857
  parameters: {
16834
16858
  query?: {
@@ -17107,6 +17131,8 @@ type AnalyticsTopProduct$1 = components['schemas']['AnalyticsTopProduct'];
17107
17131
  type AnalyticsActionItems$1 = components['schemas']['AnalyticsActionItems'];
17108
17132
  type Post$1 = components['schemas']['Post'];
17109
17133
  type ContentCategory$1 = components['schemas']['ContentCategory'];
17134
+ type MembershipPlan$1 = components['schemas']['MembershipPlan'];
17135
+ type CustomerMembership$1 = components['schemas']['CustomerMembership'];
17110
17136
  interface Pagination {
17111
17137
  cursor: string | null;
17112
17138
  has_more: boolean;
@@ -17151,9 +17177,9 @@ type ProductStats = components['schemas']['ProductStats'];
17151
17177
  type Variant$1 = components['schemas']['Variant'];
17152
17178
  type Image$1 = components['schemas']['Image'];
17153
17179
  type GenerateVariantsResult = components['schemas']['GenerateVariantsResult'];
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'];
17180
+ type ListParams$r = NonNullable<operations['listProducts']['parameters']['query']>;
17181
+ type CreateBody$n = NonNullable<operations['createProduct']['requestBody']>['content']['application/json'];
17182
+ type UpdateBody$n = NonNullable<operations['updateProduct']['requestBody']>['content']['application/json'];
17157
17183
  type DuplicateBody = NonNullable<operations['duplicateProduct']['requestBody']>['content']['application/json'];
17158
17184
  type CreateVariantBody = NonNullable<operations['createProductVariant']['requestBody']>['content']['application/json'];
17159
17185
  type GenerateVariantsBody = NonNullable<operations['generateProductVariants']['requestBody']>['content']['application/json'];
@@ -17163,17 +17189,17 @@ type CreateProductLinkBody = NonNullable<operations['createProductLink']['reques
17163
17189
  declare class ProductsResource {
17164
17190
  private client;
17165
17191
  constructor(client: Hydra);
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 & {
17192
+ list(params?: ListParams$r): Promise<ListResponse<Product>>;
17193
+ iterate(params?: Omit<ListParams$r, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Product, void, undefined>;
17194
+ toArray(params?: Omit<ListParams$r, 'cursor'>, options?: PaginateOptions & {
17169
17195
  limit?: number;
17170
17196
  }): Promise<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>>;
17197
+ get(id: string, params?: Pick<ListParams$r, 'expand' | 'currency' | 'fields'>): Promise<DataResponse<Product>>;
17198
+ create(body: CreateBody$n, options?: ResourceRequestOptions): Promise<DataResponse<Product>>;
17199
+ update(id: string, body: UpdateBody$n): Promise<DataResponse<Product>>;
17174
17200
  delete(id: string): Promise<void>;
17175
17201
  batchCreate(body: {
17176
- products: CreateBody$m[];
17202
+ products: CreateBody$n[];
17177
17203
  }, options?: ResourceRequestOptions): Promise<DataResponse<Product[]>>;
17178
17204
  duplicate(id: string, body: DuplicateBody): Promise<DataResponse<Product>>;
17179
17205
  getStats(id: string): Promise<DataResponse<ProductStats>>;
@@ -17194,7 +17220,7 @@ declare class ProductsResource {
17194
17220
 
17195
17221
  type Variant = components['schemas']['Variant'];
17196
17222
  type VariantPrice = components['schemas']['VariantPrice'];
17197
- type UpdateBody$l = NonNullable<operations['updateVariant']['requestBody']>['content']['application/json'];
17223
+ type UpdateBody$m = NonNullable<operations['updateVariant']['requestBody']>['content']['application/json'];
17198
17224
  type UpsertPriceBody = NonNullable<operations['upsertVariantPrice']['requestBody']>['content']['application/json'];
17199
17225
  declare class VariantsResource {
17200
17226
  private client;
@@ -17204,7 +17230,7 @@ declare class VariantsResource {
17204
17230
  currency?: string;
17205
17231
  fields?: string;
17206
17232
  }): Promise<DataResponse<Variant>>;
17207
- update(id: string, body: UpdateBody$l): Promise<DataResponse<Variant>>;
17233
+ update(id: string, body: UpdateBody$m): Promise<DataResponse<Variant>>;
17208
17234
  delete(id: string): Promise<void>;
17209
17235
  listPrices(variantId: string): Promise<DataResponse<Record<string, VariantPrice>>>;
17210
17236
  upsertPrice(variantId: string, priceKeySlug: string, body: UpsertPriceBody): Promise<DataResponse<VariantPrice>>;
@@ -17216,23 +17242,23 @@ declare class VariantsResource {
17216
17242
  }
17217
17243
 
17218
17244
  type Collection = components['schemas']['Collection'];
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'];
17245
+ type ListParams$q = NonNullable<operations['listCollections']['parameters']['query']>;
17246
+ type CreateBody$m = NonNullable<operations['createCollection']['requestBody']>['content']['application/json'];
17247
+ type UpdateBody$l = NonNullable<operations['updateCollection']['requestBody']>['content']['application/json'];
17222
17248
  type AddProductsBody = NonNullable<operations['addCollectionProducts']['requestBody']>['content']['application/json'];
17223
17249
  type ReorderProductsBody = NonNullable<operations['reorderCollectionProducts']['requestBody']>['content']['application/json'];
17224
17250
  type ReorderCollectionsBody = NonNullable<operations['reorderCollections']['requestBody']>['content']['application/json'];
17225
17251
  declare class CollectionsResource {
17226
17252
  private client;
17227
17253
  constructor(client: Hydra);
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 & {
17254
+ list(params?: ListParams$q): Promise<ListResponse<Collection>>;
17255
+ iterate(params?: Omit<ListParams$q, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Collection, void, undefined>;
17256
+ toArray(params?: Omit<ListParams$q, 'cursor'>, options?: PaginateOptions & {
17231
17257
  limit?: number;
17232
17258
  }): Promise<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>>;
17259
+ get(id: string, params?: Pick<ListParams$q, 'expand' | 'fields'>): Promise<DataResponse<Collection>>;
17260
+ create(body: CreateBody$m, options?: ResourceRequestOptions): Promise<DataResponse<Collection>>;
17261
+ update(id: string, body: UpdateBody$l): Promise<DataResponse<Collection>>;
17236
17262
  delete(id: string): Promise<void>;
17237
17263
  tree(): Promise<DataResponse<unknown>>;
17238
17264
  reorder(body: ReorderCollectionsBody): Promise<void>;
@@ -17262,13 +17288,13 @@ declare class CartResource {
17262
17288
 
17263
17289
  type CheckoutCreate = components['schemas']['CheckoutCreate'];
17264
17290
  type CheckoutGet = components['schemas']['CheckoutGet'];
17265
- type CreateBody$k = NonNullable<operations['createCheckout']['requestBody']>['content']['application/json'];
17291
+ type CreateBody$l = NonNullable<operations['createCheckout']['requestBody']>['content']['application/json'];
17266
17292
  type ApplyDiscountBody = NonNullable<operations['applyCheckoutDiscount']['requestBody']>['content']['application/json'];
17267
17293
  type ApplyCreditBody = NonNullable<operations['applyCheckoutCredit']['requestBody']>['content']['application/json'];
17268
17294
  declare class CheckoutResource {
17269
17295
  private client;
17270
17296
  constructor(client: Hydra);
17271
- create(body: CreateBody$k, options?: ResourceRequestOptions): Promise<DataResponse<CheckoutCreate>>;
17297
+ create(body: CreateBody$l, options?: ResourceRequestOptions): Promise<DataResponse<CheckoutCreate>>;
17272
17298
  get(id: string): Promise<DataResponse<CheckoutGet>>;
17273
17299
  applyDiscount(checkoutId: string, body: ApplyDiscountBody): Promise<DataResponse<CheckoutGet>>;
17274
17300
  removeDiscount(checkoutId: string): Promise<DataResponse<CheckoutGet>>;
@@ -17279,15 +17305,15 @@ declare class CheckoutResource {
17279
17305
 
17280
17306
  type Order$1 = components['schemas']['Order'];
17281
17307
  type FulfillmentOrder$1 = components['schemas']['FulfillmentOrder'];
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'];
17308
+ type ListParams$p = NonNullable<operations['listOrders']['parameters']['query']>;
17309
+ type CreateBody$k = NonNullable<operations['createOrder']['requestBody']>['content']['application/json'];
17310
+ type UpdateBody$k = NonNullable<operations['updateOrder']['requestBody']>['content']['application/json'];
17285
17311
  declare class OrdersResource {
17286
17312
  private client;
17287
17313
  constructor(client: Hydra);
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 & {
17314
+ list(params?: ListParams$p): Promise<ListResponse<Order$1>>;
17315
+ iterate(params?: Omit<ListParams$p, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Order$1, void, undefined>;
17316
+ toArray(params?: Omit<ListParams$p, 'cursor'>, options?: PaginateOptions & {
17291
17317
  limit?: number;
17292
17318
  }): Promise<Order$1[]>;
17293
17319
  get(id: string, params?: {
@@ -17295,8 +17321,8 @@ declare class OrdersResource {
17295
17321
  currency?: string;
17296
17322
  fields?: string;
17297
17323
  }): 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>>;
17324
+ create(body: CreateBody$k, options?: ResourceRequestOptions): Promise<DataResponse<Order$1>>;
17325
+ update(id: string, body: UpdateBody$k): Promise<DataResponse<Order$1>>;
17300
17326
  listFulfillmentOrders(orderId: string): Promise<DataResponse<FulfillmentOrder$1[]>>;
17301
17327
  /**
17302
17328
  * Returns the API path for downloading the invoice PDF for an order.
@@ -17310,34 +17336,34 @@ declare class OrdersResource {
17310
17336
  }
17311
17337
 
17312
17338
  type Fulfillment = components['schemas']['Fulfillment'];
17313
- type CreateBody$i = NonNullable<operations['createFulfillment']['requestBody']>['content']['application/json'];
17314
- type UpdateBody$i = NonNullable<operations['updateFulfillment']['requestBody']>['content']['application/json'];
17339
+ type CreateBody$j = NonNullable<operations['createFulfillment']['requestBody']>['content']['application/json'];
17340
+ type UpdateBody$j = NonNullable<operations['updateFulfillment']['requestBody']>['content']['application/json'];
17315
17341
  type CancelBody = NonNullable<operations['cancelFulfillment']['requestBody']>['content']['application/json'];
17316
17342
  declare class FulfillmentsResource {
17317
17343
  private client;
17318
17344
  constructor(client: Hydra);
17319
17345
  /** Create a fulfillment for a fulfillment order */
17320
- create(fulfillmentOrderId: string, body: CreateBody$i, options?: ResourceRequestOptions): Promise<DataResponse<Fulfillment>>;
17321
- update(id: string, body: UpdateBody$i): Promise<DataResponse<Fulfillment>>;
17346
+ create(fulfillmentOrderId: string, body: CreateBody$j, options?: ResourceRequestOptions): Promise<DataResponse<Fulfillment>>;
17347
+ update(id: string, body: UpdateBody$j): Promise<DataResponse<Fulfillment>>;
17322
17348
  cancel(id: string, body?: CancelBody): Promise<DataResponse<Fulfillment>>;
17323
17349
  }
17324
17350
 
17325
17351
  type Refund = components['schemas']['Refund'];
17326
- type ListParams$n = NonNullable<operations['listRefunds']['parameters']['query']>;
17327
- type CreateBody$h = NonNullable<operations['createOrderRefund']['requestBody']>['content']['application/json'];
17352
+ type ListParams$o = NonNullable<operations['listRefunds']['parameters']['query']>;
17353
+ type CreateBody$i = NonNullable<operations['createOrderRefund']['requestBody']>['content']['application/json'];
17328
17354
  declare class RefundsResource {
17329
17355
  private client;
17330
17356
  constructor(client: Hydra);
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 & {
17357
+ list(params?: ListParams$o): Promise<ListResponse<Refund>>;
17358
+ iterate(params?: Omit<ListParams$o, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Refund, void, undefined>;
17359
+ toArray(params?: Omit<ListParams$o, 'cursor'>, options?: PaginateOptions & {
17334
17360
  limit?: number;
17335
17361
  }): Promise<Refund[]>;
17336
17362
  get(id: string, params?: {
17337
17363
  expand?: string;
17338
17364
  fields?: string;
17339
17365
  }): Promise<DataResponse<Refund>>;
17340
- create(orderId: string, body: CreateBody$h, options?: ResourceRequestOptions): Promise<DataResponse<Refund>>;
17366
+ create(orderId: string, body: CreateBody$i, options?: ResourceRequestOptions): Promise<DataResponse<Refund>>;
17341
17367
  listByOrder(orderId: string): Promise<DataResponse<Refund[]>>;
17342
17368
  retry(id: string): Promise<DataResponse<Refund>>;
17343
17369
  /**
@@ -17348,24 +17374,24 @@ declare class RefundsResource {
17348
17374
  }
17349
17375
 
17350
17376
  type Return = components['schemas']['Return'];
17351
- type ListParams$m = NonNullable<operations['listReturns']['parameters']['query']>;
17352
- type CreateBody$g = NonNullable<operations['createOrderReturn']['requestBody']>['content']['application/json'];
17377
+ type ListParams$n = NonNullable<operations['listReturns']['parameters']['query']>;
17378
+ type CreateBody$h = NonNullable<operations['createOrderReturn']['requestBody']>['content']['application/json'];
17353
17379
  type ApproveBody = NonNullable<operations['approveReturn']['requestBody']>['content']['application/json'];
17354
17380
  type ReceiveBody$1 = NonNullable<operations['receiveReturn']['requestBody']>['content']['application/json'];
17355
17381
  type RejectBody = NonNullable<operations['rejectReturn']['requestBody']>['content']['application/json'];
17356
17382
  declare class ReturnsResource {
17357
17383
  private client;
17358
17384
  constructor(client: Hydra);
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 & {
17385
+ list(params?: ListParams$n): Promise<ListResponse<Return>>;
17386
+ iterate(params?: Omit<ListParams$n, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Return, void, undefined>;
17387
+ toArray(params?: Omit<ListParams$n, 'cursor'>, options?: PaginateOptions & {
17362
17388
  limit?: number;
17363
17389
  }): Promise<Return[]>;
17364
17390
  get(id: string, params?: {
17365
17391
  expand?: string;
17366
17392
  fields?: string;
17367
17393
  }): Promise<DataResponse<Return>>;
17368
- create(orderId: string, body: CreateBody$g, options?: ResourceRequestOptions): Promise<DataResponse<Return>>;
17394
+ create(orderId: string, body: CreateBody$h, options?: ResourceRequestOptions): Promise<DataResponse<Return>>;
17369
17395
  listByOrder(orderId: string): Promise<DataResponse<Return[]>>;
17370
17396
  approve(id: string, body?: ApproveBody): Promise<DataResponse<Return>>;
17371
17397
  receive(id: string, body?: ReceiveBody$1): Promise<DataResponse<Return>>;
@@ -17377,17 +17403,17 @@ declare class ReturnsResource {
17377
17403
  type DraftOrder = components['schemas']['DraftOrder'];
17378
17404
  type DraftOrderLineItem = components['schemas']['DraftOrderLineItem'];
17379
17405
  type Order = components['schemas']['Order'];
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'];
17406
+ type ListParams$m = NonNullable<operations['listDraftOrders']['parameters']['query']>;
17407
+ type CreateBody$g = NonNullable<operations['createDraftOrder']['requestBody']>['content']['application/json'];
17408
+ type UpdateBody$i = NonNullable<operations['updateDraftOrder']['requestBody']>['content']['application/json'];
17383
17409
  type AddItemsBody = NonNullable<operations['addDraftOrderItems']['requestBody']>['content']['application/json'];
17384
17410
  type UpdateItemBody$2 = NonNullable<operations['updateDraftOrderItem']['requestBody']>['content']['application/json'];
17385
17411
  declare class DraftOrdersResource {
17386
17412
  private client;
17387
17413
  constructor(client: Hydra);
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 & {
17414
+ list(params?: ListParams$m): Promise<ListResponse<DraftOrder>>;
17415
+ iterate(params?: Omit<ListParams$m, 'cursor'>, options?: PaginateOptions): AsyncGenerator<DraftOrder, void, undefined>;
17416
+ toArray(params?: Omit<ListParams$m, 'cursor'>, options?: PaginateOptions & {
17391
17417
  limit?: number;
17392
17418
  }): Promise<DraftOrder[]>;
17393
17419
  get(id: string, params?: {
@@ -17395,8 +17421,8 @@ declare class DraftOrdersResource {
17395
17421
  currency?: string;
17396
17422
  fields?: string;
17397
17423
  }): Promise<DataResponse<DraftOrder>>;
17398
- create(body: CreateBody$f, options?: ResourceRequestOptions): Promise<DataResponse<DraftOrder>>;
17399
- update(id: string, body: UpdateBody$h): Promise<DataResponse<DraftOrder>>;
17424
+ create(body: CreateBody$g, options?: ResourceRequestOptions): Promise<DataResponse<DraftOrder>>;
17425
+ update(id: string, body: UpdateBody$i): Promise<DataResponse<DraftOrder>>;
17400
17426
  delete(id: string): Promise<void>;
17401
17427
  addItems(draftOrderId: string, body: AddItemsBody): Promise<DataResponse<DraftOrderLineItem[]>>;
17402
17428
  updateItem(draftOrderId: string, itemId: string, body: UpdateItemBody$2): Promise<DataResponse<DraftOrderLineItem>>;
@@ -17411,22 +17437,22 @@ declare class DraftOrdersResource {
17411
17437
  }
17412
17438
 
17413
17439
  type Customer = components['schemas']['Customer'];
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'];
17440
+ type ListParams$l = NonNullable<operations['listCustomers']['parameters']['query']>;
17441
+ type CreateBody$f = NonNullable<operations['createCustomer']['requestBody']>['content']['application/json'];
17442
+ type UpdateBody$h = NonNullable<operations['updateCustomer']['requestBody']>['content']['application/json'];
17417
17443
  type CreateAddressBody$1 = NonNullable<operations['createCustomerAddress']['requestBody']>['content']['application/json'];
17418
17444
  type CreateNoteBody$1 = NonNullable<operations['createCustomerNote']['requestBody']>['content']['application/json'];
17419
17445
  declare class CustomersResource {
17420
17446
  private client;
17421
17447
  constructor(client: Hydra);
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 & {
17448
+ list(params?: ListParams$l): Promise<ListResponse<Customer>>;
17449
+ iterate(params?: Omit<ListParams$l, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Customer, void, undefined>;
17450
+ toArray(params?: Omit<ListParams$l, 'cursor'>, options?: PaginateOptions & {
17425
17451
  limit?: number;
17426
17452
  }): Promise<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>>;
17453
+ get(id: string, params?: Pick<ListParams$l, 'expand' | 'fields'>): Promise<DataResponse<Customer>>;
17454
+ create(body: CreateBody$f, options?: ResourceRequestOptions): Promise<DataResponse<Customer>>;
17455
+ update(id: string, body: UpdateBody$h): Promise<DataResponse<Customer>>;
17430
17456
  delete(id: string): Promise<void>;
17431
17457
  listAddresses(customerId: string): Promise<DataResponse<unknown[]>>;
17432
17458
  createAddress(customerId: string, body: CreateAddressBody$1): Promise<DataResponse<unknown>>;
@@ -17440,38 +17466,38 @@ declare class CustomersResource {
17440
17466
  }
17441
17467
 
17442
17468
  type CustomerGroup = components['schemas']['CustomerGroup'];
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'];
17469
+ type ListParams$k = NonNullable<operations['listCustomerGroups']['parameters']['query']>;
17470
+ type CreateBody$e = NonNullable<operations['createCustomerGroup']['requestBody']>['content']['application/json'];
17471
+ type UpdateBody$g = NonNullable<operations['updateCustomerGroup']['requestBody']>['content']['application/json'];
17446
17472
  type AddMembersBody = NonNullable<operations['addCustomerGroupMembers']['requestBody']>['content']['application/json'];
17447
17473
  declare class CustomerGroupsResource {
17448
17474
  private client;
17449
17475
  constructor(client: Hydra);
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 & {
17476
+ list(params?: ListParams$k): Promise<ListResponse<CustomerGroup>>;
17477
+ iterate(params?: Omit<ListParams$k, 'cursor'>, options?: PaginateOptions): AsyncGenerator<CustomerGroup, void, undefined>;
17478
+ toArray(params?: Omit<ListParams$k, 'cursor'>, options?: PaginateOptions & {
17453
17479
  limit?: number;
17454
17480
  }): Promise<CustomerGroup[]>;
17455
17481
  get(id: string): Promise<DataResponse<CustomerGroup>>;
17456
- create(body: CreateBody$d, options?: ResourceRequestOptions): Promise<DataResponse<CustomerGroup>>;
17457
- update(id: string, body: UpdateBody$f): Promise<DataResponse<CustomerGroup>>;
17482
+ create(body: CreateBody$e, options?: ResourceRequestOptions): Promise<DataResponse<CustomerGroup>>;
17483
+ update(id: string, body: UpdateBody$g): Promise<DataResponse<CustomerGroup>>;
17458
17484
  delete(id: string): Promise<void>;
17459
17485
  addMembers(groupId: string, body: AddMembersBody): Promise<void>;
17460
17486
  removeMember(groupId: string, customerId: string): Promise<void>;
17461
17487
  }
17462
17488
 
17463
- type UpdateBody$e = NonNullable<operations['updateAddress']['requestBody']>['content']['application/json'];
17489
+ type UpdateBody$f = NonNullable<operations['updateAddress']['requestBody']>['content']['application/json'];
17464
17490
  declare class AddressesResource {
17465
17491
  private client;
17466
17492
  constructor(client: Hydra);
17467
- update(id: string, body: UpdateBody$e): Promise<DataResponse<unknown>>;
17493
+ update(id: string, body: UpdateBody$f): Promise<DataResponse<unknown>>;
17468
17494
  delete(id: string): Promise<void>;
17469
17495
  }
17470
17496
 
17471
17497
  type InventoryLevel = components['schemas']['InventoryLevel'];
17472
17498
  type InventoryAdjustment = components['schemas']['InventoryAdjustment'];
17473
17499
  type ProductAdjustment = components['schemas']['ProductAdjustment'];
17474
- type ListParams$i = NonNullable<operations['listInventory']['parameters']['query']>;
17500
+ type ListParams$j = NonNullable<operations['listInventory']['parameters']['query']>;
17475
17501
  type SetBody = NonNullable<operations['setInventory']['requestBody']>['content']['application/json'];
17476
17502
  type AdjustBody = NonNullable<operations['adjustInventory']['requestBody']>['content']['application/json'];
17477
17503
  type InventoryResult = InventoryLevel & {
@@ -17480,9 +17506,9 @@ type InventoryResult = InventoryLevel & {
17480
17506
  declare class InventoryResource {
17481
17507
  private client;
17482
17508
  constructor(client: Hydra);
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 & {
17509
+ list(params?: ListParams$j): Promise<ListResponse<InventoryLevel>>;
17510
+ iterate(params?: Omit<ListParams$j, 'cursor'>, options?: PaginateOptions): AsyncGenerator<InventoryLevel, void, undefined>;
17511
+ toArray(params?: Omit<ListParams$j, 'cursor'>, options?: PaginateOptions & {
17486
17512
  limit?: number;
17487
17513
  }): Promise<InventoryLevel[]>;
17488
17514
  listAdjustments(params: {
@@ -17554,56 +17580,56 @@ declare class ShippingResource {
17554
17580
  }
17555
17581
 
17556
17582
  type Promotion = components['schemas']['Promotion'];
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'];
17583
+ type ListParams$i = NonNullable<operations['listPromotions']['parameters']['query']>;
17584
+ type CreateBody$d = NonNullable<operations['createPromotion']['requestBody']>['content']['application/json'];
17585
+ type UpdateBody$e = NonNullable<operations['updatePromotion']['requestBody']>['content']['application/json'];
17560
17586
  declare class PromotionsResource {
17561
17587
  private client;
17562
17588
  constructor(client: Hydra);
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 & {
17589
+ list(params?: ListParams$i): Promise<ListResponse<Promotion>>;
17590
+ iterate(params?: Omit<ListParams$i, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Promotion, void, undefined>;
17591
+ toArray(params?: Omit<ListParams$i, 'cursor'>, options?: PaginateOptions & {
17566
17592
  limit?: number;
17567
17593
  }): Promise<Promotion[]>;
17568
17594
  get(id: string): Promise<DataResponse<Promotion>>;
17569
- create(body: CreateBody$c, options?: ResourceRequestOptions): Promise<DataResponse<Promotion>>;
17570
- update(id: string, body: UpdateBody$d): Promise<DataResponse<Promotion>>;
17595
+ create(body: CreateBody$d, options?: ResourceRequestOptions): Promise<DataResponse<Promotion>>;
17596
+ update(id: string, body: UpdateBody$e): Promise<DataResponse<Promotion>>;
17571
17597
  delete(id: string): Promise<void>;
17572
17598
  }
17573
17599
 
17574
17600
  type Discount = components['schemas']['Discount'];
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'];
17601
+ type ListParams$h = NonNullable<operations['listDiscounts']['parameters']['query']>;
17602
+ type CreateBody$c = NonNullable<operations['createDiscount']['requestBody']>['content']['application/json'];
17603
+ type UpdateBody$d = NonNullable<operations['updateDiscount']['requestBody']>['content']['application/json'];
17578
17604
  declare class DiscountsResource {
17579
17605
  private client;
17580
17606
  constructor(client: Hydra);
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 & {
17607
+ list(params?: ListParams$h): Promise<ListResponse<Discount>>;
17608
+ iterate(params?: Omit<ListParams$h, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Discount, void, undefined>;
17609
+ toArray(params?: Omit<ListParams$h, 'cursor'>, options?: PaginateOptions & {
17584
17610
  limit?: number;
17585
17611
  }): Promise<Discount[]>;
17586
17612
  get(id: string): Promise<DataResponse<Discount>>;
17587
- create(body: CreateBody$b, options?: ResourceRequestOptions): Promise<DataResponse<Discount>>;
17588
- update(id: string, body: UpdateBody$c): Promise<DataResponse<Discount>>;
17613
+ create(body: CreateBody$c, options?: ResourceRequestOptions): Promise<DataResponse<Discount>>;
17614
+ update(id: string, body: UpdateBody$d): Promise<DataResponse<Discount>>;
17589
17615
  delete(id: string): Promise<void>;
17590
17616
  }
17591
17617
 
17592
17618
  type Image = components['schemas']['Image'];
17593
- type ListParams$f = NonNullable<operations['listImages']['parameters']['query']>;
17594
- type UpdateBody$b = NonNullable<operations['updateImage']['requestBody']>['content']['application/json'];
17619
+ type ListParams$g = NonNullable<operations['listImages']['parameters']['query']>;
17620
+ type UpdateBody$c = NonNullable<operations['updateImage']['requestBody']>['content']['application/json'];
17595
17621
  type ReorderBody$2 = NonNullable<operations['reorderImages']['requestBody']>['content']['application/json'];
17596
17622
  declare class ImagesResource {
17597
17623
  private client;
17598
17624
  constructor(client: Hydra);
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 & {
17625
+ list(params?: ListParams$g): Promise<ListResponse<Image>>;
17626
+ iterate(params?: Omit<ListParams$g, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Image, void, undefined>;
17627
+ toArray(params?: Omit<ListParams$g, 'cursor'>, options?: PaginateOptions & {
17602
17628
  limit?: number;
17603
17629
  }): Promise<Image[]>;
17604
17630
  /** Upload an image to the store library */
17605
17631
  upload(formData: FormData): Promise<DataResponse<Image>>;
17606
- update(id: string, body: UpdateBody$b): Promise<DataResponse<Image>>;
17632
+ update(id: string, body: UpdateBody$c): Promise<DataResponse<Image>>;
17607
17633
  delete(id: string): Promise<void>;
17608
17634
  detach(id: string): Promise<void>;
17609
17635
  batchDelete(imageIds: string[]): Promise<void>;
@@ -17612,32 +17638,32 @@ declare class ImagesResource {
17612
17638
  }
17613
17639
 
17614
17640
  type Webhook = components['schemas']['Webhook'];
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'];
17641
+ type ListParams$f = NonNullable<operations['listWebhooks']['parameters']['query']>;
17642
+ type CreateBody$b = NonNullable<operations['createWebhook']['requestBody']>['content']['application/json'];
17643
+ type UpdateBody$b = NonNullable<operations['updateWebhook']['requestBody']>['content']['application/json'];
17618
17644
  declare class WebhooksResource {
17619
17645
  private client;
17620
17646
  constructor(client: Hydra);
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 & {
17647
+ list(params?: ListParams$f): Promise<ListResponse<Webhook>>;
17648
+ iterate(params?: Omit<ListParams$f, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Webhook, void, undefined>;
17649
+ toArray(params?: Omit<ListParams$f, 'cursor'>, options?: PaginateOptions & {
17624
17650
  limit?: number;
17625
17651
  }): Promise<Webhook[]>;
17626
17652
  get(id: string): Promise<DataResponse<Webhook>>;
17627
- create(body: CreateBody$a, options?: ResourceRequestOptions): Promise<DataResponse<Webhook>>;
17628
- update(id: string, body: UpdateBody$a): Promise<DataResponse<Webhook>>;
17653
+ create(body: CreateBody$b, options?: ResourceRequestOptions): Promise<DataResponse<Webhook>>;
17654
+ update(id: string, body: UpdateBody$b): Promise<DataResponse<Webhook>>;
17629
17655
  delete(id: string): Promise<void>;
17630
17656
  }
17631
17657
 
17632
17658
  type Store = components['schemas']['Store'];
17633
- type UpdateBody$9 = NonNullable<operations['updateStore']['requestBody']>['content']['application/json'];
17659
+ type UpdateBody$a = NonNullable<operations['updateStore']['requestBody']>['content']['application/json'];
17634
17660
  declare class StoreResource {
17635
17661
  private client;
17636
17662
  constructor(client: Hydra);
17637
17663
  get(params?: {
17638
17664
  fields?: string;
17639
17665
  }): Promise<DataResponse<Store>>;
17640
- update(body: UpdateBody$9): Promise<DataResponse<Store>>;
17666
+ update(body: UpdateBody$a): Promise<DataResponse<Store>>;
17641
17667
  getDomainRecord(): Promise<DataResponse<unknown>>;
17642
17668
  verifyDomain(): Promise<DataResponse<unknown>>;
17643
17669
  publish(): Promise<DataResponse<{
@@ -17649,42 +17675,42 @@ declare class StoreResource {
17649
17675
  }
17650
17676
 
17651
17677
  type Tag = components['schemas']['Tag'];
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'];
17678
+ type ListParams$e = NonNullable<operations['listTags']['parameters']['query']>;
17679
+ type CreateBody$a = NonNullable<operations['createTag']['requestBody']>['content']['application/json'];
17680
+ type UpdateBody$9 = NonNullable<operations['updateTag']['requestBody']>['content']['application/json'];
17655
17681
  declare class TagsResource {
17656
17682
  private client;
17657
17683
  constructor(client: Hydra);
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 & {
17684
+ list(params?: ListParams$e): Promise<ListResponse<Tag>>;
17685
+ iterate(params?: Omit<ListParams$e, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Tag, void, undefined>;
17686
+ toArray(params?: Omit<ListParams$e, 'cursor'>, options?: PaginateOptions & {
17661
17687
  limit?: number;
17662
17688
  }): Promise<Tag[]>;
17663
- create(body: CreateBody$9, options?: ResourceRequestOptions): Promise<DataResponse<Tag>>;
17664
- update(id: string, body: UpdateBody$8): Promise<DataResponse<Tag>>;
17689
+ create(body: CreateBody$a, options?: ResourceRequestOptions): Promise<DataResponse<Tag>>;
17690
+ update(id: string, body: UpdateBody$9): Promise<DataResponse<Tag>>;
17665
17691
  delete(id: string): Promise<void>;
17666
17692
  }
17667
17693
 
17668
17694
  type Redirect = components['schemas']['Redirect'];
17669
- type ListParams$c = NonNullable<operations['listRedirects']['parameters']['query']>;
17670
- type CreateBody$8 = NonNullable<operations['createRedirect']['requestBody']>['content']['application/json'];
17695
+ type ListParams$d = NonNullable<operations['listRedirects']['parameters']['query']>;
17696
+ type CreateBody$9 = NonNullable<operations['createRedirect']['requestBody']>['content']['application/json'];
17671
17697
  declare class RedirectsResource {
17672
17698
  private client;
17673
17699
  constructor(client: Hydra);
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 & {
17700
+ list(params?: ListParams$d): Promise<ListResponse<Redirect>>;
17701
+ iterate(params?: Omit<ListParams$d, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Redirect, void, undefined>;
17702
+ toArray(params?: Omit<ListParams$d, 'cursor'>, options?: PaginateOptions & {
17677
17703
  limit?: number;
17678
17704
  }): Promise<Redirect[]>;
17679
- create(body: CreateBody$8, options?: ResourceRequestOptions): Promise<DataResponse<Redirect>>;
17705
+ create(body: CreateBody$9, options?: ResourceRequestOptions): Promise<DataResponse<Redirect>>;
17680
17706
  lookup(path: string): Promise<DataResponse<Redirect>>;
17681
17707
  delete(id: string): Promise<void>;
17682
17708
  }
17683
17709
 
17684
17710
  type Company = components['schemas']['Company'];
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'];
17711
+ type ListParams$c = NonNullable<operations['listCompanies']['parameters']['query']>;
17712
+ type CreateBody$8 = NonNullable<operations['createCompany']['requestBody']>['content']['application/json'];
17713
+ type UpdateBody$8 = NonNullable<operations['updateCompany']['requestBody']>['content']['application/json'];
17688
17714
  type CreateAddressBody = NonNullable<operations['createCompanyAddress']['requestBody']>['content']['application/json'];
17689
17715
  type UpdateAddressBody = NonNullable<operations['updateCompanyAddress']['requestBody']>['content']['application/json'];
17690
17716
  type CreateContactBody = NonNullable<operations['createCompanyContact']['requestBody']>['content']['application/json'];
@@ -17693,14 +17719,14 @@ type CreateNoteBody = NonNullable<operations['createCompanyNote']['requestBody']
17693
17719
  declare class CompaniesResource {
17694
17720
  private client;
17695
17721
  constructor(client: Hydra);
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 & {
17722
+ list(params?: ListParams$c): Promise<ListResponse<Company>>;
17723
+ iterate(params?: Omit<ListParams$c, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Company, void, undefined>;
17724
+ toArray(params?: Omit<ListParams$c, 'cursor'>, options?: PaginateOptions & {
17699
17725
  limit?: number;
17700
17726
  }): Promise<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>>;
17727
+ get(id: string, params?: Pick<ListParams$c, 'expand' | 'fields'>): Promise<DataResponse<Company>>;
17728
+ create(body: CreateBody$8, options?: ResourceRequestOptions): Promise<DataResponse<Company>>;
17729
+ update(id: string, body: UpdateBody$8): Promise<DataResponse<Company>>;
17704
17730
  delete(id: string): Promise<void>;
17705
17731
  listAddresses(companyId: string): Promise<DataResponse<unknown[]>>;
17706
17732
  createAddress(companyId: string, body: CreateAddressBody): Promise<DataResponse<unknown>>;
@@ -17716,23 +17742,23 @@ declare class CompaniesResource {
17716
17742
  }
17717
17743
 
17718
17744
  type PurchaseOrder = components['schemas']['PurchaseOrder'];
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'];
17745
+ type ListParams$b = NonNullable<operations['listPurchaseOrders']['parameters']['query']>;
17746
+ type CreateBody$7 = NonNullable<operations['createPurchaseOrder']['requestBody']>['content']['application/json'];
17747
+ type UpdateBody$7 = NonNullable<operations['updatePurchaseOrder']['requestBody']>['content']['application/json'];
17722
17748
  type AddItemBody = NonNullable<operations['addPurchaseOrderItems']['requestBody']>['content']['application/json'];
17723
17749
  type UpdateItemBody$1 = NonNullable<operations['updatePurchaseOrderItem']['requestBody']>['content']['application/json'];
17724
17750
  type ReceiveBody = NonNullable<operations['receivePurchaseOrderItems']['requestBody']>['content']['application/json'];
17725
17751
  declare class PurchaseOrdersResource {
17726
17752
  private client;
17727
17753
  constructor(client: Hydra);
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 & {
17754
+ list(params?: ListParams$b): Promise<ListResponse<PurchaseOrder>>;
17755
+ iterate(params?: Omit<ListParams$b, 'cursor'>, options?: PaginateOptions): AsyncGenerator<PurchaseOrder, void, undefined>;
17756
+ toArray(params?: Omit<ListParams$b, 'cursor'>, options?: PaginateOptions & {
17731
17757
  limit?: number;
17732
17758
  }): Promise<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>>;
17759
+ get(id: string, params?: Pick<ListParams$b, 'expand' | 'fields'>): Promise<DataResponse<PurchaseOrder>>;
17760
+ create(body: CreateBody$7, options?: ResourceRequestOptions): Promise<DataResponse<PurchaseOrder>>;
17761
+ update(id: string, body: UpdateBody$7): Promise<DataResponse<PurchaseOrder>>;
17736
17762
  delete(id: string): Promise<void>;
17737
17763
  addItem(purchaseOrderId: string, body: AddItemBody): Promise<DataResponse<unknown>>;
17738
17764
  updateItem(purchaseOrderId: string, itemId: string, body: UpdateItemBody$1): Promise<DataResponse<unknown>>;
@@ -17755,17 +17781,17 @@ declare class FulfillmentOrdersResource {
17755
17781
  listForOrder(orderId: string): Promise<DataResponse<FulfillmentOrder[]>>;
17756
17782
  }
17757
17783
 
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'];
17784
+ type ListParams$a = NonNullable<operations['listMetafieldDefinitions']['parameters']['query']>;
17785
+ type CreateBody$6 = NonNullable<operations['createMetafieldDefinition']['requestBody']>['content']['application/json'];
17786
+ type UpdateBody$6 = NonNullable<operations['updateMetafieldDefinition']['requestBody']>['content']['application/json'];
17761
17787
  type ReorderBody$1 = NonNullable<operations['reorderMetafieldDefinitions']['requestBody']>['content']['application/json'];
17762
17788
  declare class MetafieldsResource {
17763
17789
  private client;
17764
17790
  constructor(client: Hydra);
17765
17791
  /** List metafield definitions for the store */
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>>;
17792
+ listDefinitions(params?: ListParams$a): Promise<DataResponse<unknown[]>>;
17793
+ createDefinition(body: CreateBody$6): Promise<DataResponse<unknown>>;
17794
+ updateDefinition(ownerType: string, slug: string, body: UpdateBody$6): Promise<DataResponse<unknown>>;
17769
17795
  archiveDefinition(ownerType: string, slug: string): Promise<void>;
17770
17796
  reorderDefinitions(ownerType: string, body: ReorderBody$1): Promise<void>;
17771
17797
  }
@@ -17811,30 +17837,30 @@ declare class TaxResource {
17811
17837
  }
17812
17838
 
17813
17839
  type ExchangeRate = components['schemas']['ExchangeRate'];
17814
- type ListParams$8 = NonNullable<operations['listExchangeRates']['parameters']['query']>;
17840
+ type ListParams$9 = NonNullable<operations['listExchangeRates']['parameters']['query']>;
17815
17841
  declare class ExchangeRatesResource {
17816
17842
  private client;
17817
17843
  constructor(client: Hydra);
17818
- list(params?: ListParams$8): Promise<DataResponse<ExchangeRate[]>>;
17844
+ list(params?: ListParams$9): Promise<DataResponse<ExchangeRate[]>>;
17819
17845
  refresh(): Promise<DataResponse<unknown>>;
17820
17846
  }
17821
17847
 
17822
17848
  type FilterAttribute = components['schemas']['FilterAttribute'];
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'];
17849
+ type ListParams$8 = NonNullable<operations['listFilterAttributes']['parameters']['query']>;
17850
+ type CreateBody$5 = NonNullable<operations['createFilterAttribute']['requestBody']>['content']['application/json'];
17851
+ type UpdateBody$5 = NonNullable<operations['updateFilterAttribute']['requestBody']>['content']['application/json'];
17826
17852
  type ReorderBody = NonNullable<operations['reorderFilterAttributes']['requestBody']>['content']['application/json'];
17827
17853
  declare class FilterAttributesResource {
17828
17854
  private client;
17829
17855
  constructor(client: Hydra);
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 & {
17856
+ list(params?: ListParams$8): Promise<ListResponse<FilterAttribute>>;
17857
+ iterate(params?: Omit<ListParams$8, 'cursor'>, options?: PaginateOptions): AsyncGenerator<FilterAttribute, void, undefined>;
17858
+ toArray(params?: Omit<ListParams$8, 'cursor'>, options?: PaginateOptions & {
17833
17859
  limit?: number;
17834
17860
  }): Promise<FilterAttribute[]>;
17835
17861
  get(id: string): Promise<DataResponse<FilterAttribute>>;
17836
- create(body: CreateBody$4, options?: ResourceRequestOptions): Promise<DataResponse<FilterAttribute>>;
17837
- update(id: string, body: UpdateBody$4): Promise<DataResponse<FilterAttribute>>;
17862
+ create(body: CreateBody$5, options?: ResourceRequestOptions): Promise<DataResponse<FilterAttribute>>;
17863
+ update(id: string, body: UpdateBody$5): Promise<DataResponse<FilterAttribute>>;
17838
17864
  delete(id: string): Promise<void>;
17839
17865
  reorder(body: ReorderBody): Promise<ListResponse<FilterAttribute>>;
17840
17866
  discover(): Promise<DataResponse<unknown[]>>;
@@ -17842,23 +17868,23 @@ declare class FilterAttributesResource {
17842
17868
 
17843
17869
  type NavigationMenu = components['schemas']['NavigationMenu'];
17844
17870
  type NavigationItem = components['schemas']['NavigationItem'];
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'];
17871
+ type ListParams$7 = NonNullable<operations['listNavigationMenus']['parameters']['query']>;
17872
+ type CreateBody$4 = NonNullable<operations['createNavigationMenu']['requestBody']>['content']['application/json'];
17873
+ type UpdateBody$4 = NonNullable<operations['updateNavigationMenu']['requestBody']>['content']['application/json'];
17848
17874
  type CreateItemBody = NonNullable<operations['addNavigationItem']['requestBody']>['content']['application/json'];
17849
17875
  type UpdateItemBody = NonNullable<operations['updateNavigationItem']['requestBody']>['content']['application/json'];
17850
17876
  type ReorderItemsBody = NonNullable<operations['reorderNavigationItems']['requestBody']>['content']['application/json'];
17851
17877
  declare class NavigationResource {
17852
17878
  private client;
17853
17879
  constructor(client: Hydra);
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 & {
17880
+ list(params?: ListParams$7): Promise<ListResponse<NavigationMenu>>;
17881
+ iterate(params?: Omit<ListParams$7, 'cursor'>, options?: PaginateOptions): AsyncGenerator<NavigationMenu, void, undefined>;
17882
+ toArray(params?: Omit<ListParams$7, 'cursor'>, options?: PaginateOptions & {
17857
17883
  limit?: number;
17858
17884
  }): Promise<NavigationMenu[]>;
17859
17885
  get(id: string): Promise<DataResponse<NavigationMenu>>;
17860
- create(body: CreateBody$3, options?: ResourceRequestOptions): Promise<DataResponse<NavigationMenu>>;
17861
- update(id: string, body: UpdateBody$3): Promise<DataResponse<NavigationMenu>>;
17886
+ create(body: CreateBody$4, options?: ResourceRequestOptions): Promise<DataResponse<NavigationMenu>>;
17887
+ update(id: string, body: UpdateBody$4): Promise<DataResponse<NavigationMenu>>;
17862
17888
  delete(id: string): Promise<void>;
17863
17889
  addItem(menuId: string, body: CreateItemBody): Promise<DataResponse<NavigationItem>>;
17864
17890
  updateItem(menuId: string, itemId: string, body: UpdateItemBody): Promise<DataResponse<NavigationItem>>;
@@ -17867,26 +17893,26 @@ declare class NavigationResource {
17867
17893
  }
17868
17894
 
17869
17895
  type NotificationLog = components['schemas']['NotificationLog'];
17870
- type ListParams$5 = NonNullable<operations['listNotifications']['parameters']['query']>;
17896
+ type ListParams$6 = NonNullable<operations['listNotifications']['parameters']['query']>;
17871
17897
  declare class NotificationsResource {
17872
17898
  private client;
17873
17899
  constructor(client: Hydra);
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 & {
17900
+ list(params?: ListParams$6): Promise<ListResponse<NotificationLog>>;
17901
+ iterate(params?: Omit<ListParams$6, 'cursor'>, options?: PaginateOptions): AsyncGenerator<NotificationLog, void, undefined>;
17902
+ toArray(params?: Omit<ListParams$6, 'cursor'>, options?: PaginateOptions & {
17877
17903
  limit?: number;
17878
17904
  }): Promise<NotificationLog[]>;
17879
17905
  get(id: string): Promise<DataResponse<NotificationLog>>;
17880
17906
  }
17881
17907
 
17882
17908
  type CheckoutListItem = components['schemas']['CheckoutListItem'];
17883
- type ListParams$4 = NonNullable<operations['listCheckouts']['parameters']['query']>;
17909
+ type ListParams$5 = NonNullable<operations['listCheckouts']['parameters']['query']>;
17884
17910
  declare class CheckoutsResource {
17885
17911
  private client;
17886
17912
  constructor(client: Hydra);
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 & {
17913
+ list(params?: ListParams$5): Promise<ListResponse<CheckoutListItem>>;
17914
+ iterate(params?: Omit<ListParams$5, 'cursor'>, options?: PaginateOptions): AsyncGenerator<CheckoutListItem, void, undefined>;
17915
+ toArray(params?: Omit<ListParams$5, 'cursor'>, options?: PaginateOptions & {
17890
17916
  limit?: number;
17891
17917
  }): Promise<CheckoutListItem[]>;
17892
17918
  }
@@ -17912,16 +17938,16 @@ declare class AnalyticsResource {
17912
17938
 
17913
17939
  type CreditTransaction = NonNullable<operations['issueCustomerCredit']['responses']['201']['content']['application/json']['data']>;
17914
17940
  type CreditBalance = NonNullable<operations['getCustomerCredit']['responses']['200']['content']['application/json']['data']>;
17915
- type ListParams$3 = NonNullable<operations['listCustomerCreditTransactions']['parameters']['query']>;
17941
+ type ListParams$4 = NonNullable<operations['listCustomerCreditTransactions']['parameters']['query']>;
17916
17942
  type IssueCreditBody = NonNullable<operations['issueCustomerCredit']['requestBody']>['content']['application/json'];
17917
17943
  declare class StoreCreditResource {
17918
17944
  private client;
17919
17945
  constructor(client: Hydra);
17920
17946
  getBalance(customerId: string): Promise<DataResponse<CreditBalance>>;
17921
17947
  issue(customerId: string, body: IssueCreditBody, options?: ResourceRequestOptions): Promise<DataResponse<CreditTransaction>>;
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 & {
17948
+ listTransactions(customerId: string, params?: ListParams$4): Promise<ListResponse<CreditTransaction>>;
17949
+ iterateTransactions(customerId: string, params?: Omit<ListParams$4, 'cursor'>, options?: PaginateOptions): AsyncGenerator<CreditTransaction, void, undefined>;
17950
+ transactionsToArray(customerId: string, params?: Omit<ListParams$4, 'cursor'>, options?: PaginateOptions & {
17925
17951
  limit?: number;
17926
17952
  }): Promise<CreditTransaction[]>;
17927
17953
  }
@@ -17939,21 +17965,21 @@ declare class SearchResource {
17939
17965
 
17940
17966
  type Location = components['schemas']['Location'];
17941
17967
  type TransferResult = components['schemas']['TransferResult'];
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'];
17968
+ type ListParams$3 = NonNullable<operations['listLocations']['parameters']['query']>;
17969
+ type CreateBody$3 = NonNullable<operations['createLocation']['requestBody']>['content']['application/json'];
17970
+ type UpdateBody$3 = NonNullable<operations['updateLocation']['requestBody']>['content']['application/json'];
17945
17971
  type TransferBody = NonNullable<operations['transferLocationInventory']['requestBody']>['content']['application/json'];
17946
17972
  declare class LocationsResource {
17947
17973
  private client;
17948
17974
  constructor(client: Hydra);
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 & {
17975
+ list(params?: ListParams$3): Promise<ListResponse<Location>>;
17976
+ iterate(params?: Omit<ListParams$3, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Location, void, undefined>;
17977
+ toArray(params?: Omit<ListParams$3, 'cursor'>, options?: PaginateOptions & {
17952
17978
  limit?: number;
17953
17979
  }): Promise<Location[]>;
17954
17980
  get(id: string): Promise<DataResponse<Location>>;
17955
- create(body: CreateBody$2, options?: ResourceRequestOptions): Promise<DataResponse<Location>>;
17956
- update(id: string, body: UpdateBody$2): Promise<DataResponse<Location>>;
17981
+ create(body: CreateBody$3, options?: ResourceRequestOptions): Promise<DataResponse<Location>>;
17982
+ update(id: string, body: UpdateBody$3): Promise<DataResponse<Location>>;
17957
17983
  delete(id: string): Promise<void>;
17958
17984
  setDefault(id: string): Promise<DataResponse<Location>>;
17959
17985
  transfer(id: string, body: TransferBody): Promise<DataResponse<TransferResult>>;
@@ -18019,42 +18045,63 @@ declare class IntegrationsResource {
18019
18045
  }
18020
18046
 
18021
18047
  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'];
18048
+ type ListParams$2 = NonNullable<operations['listPosts']['parameters']['query']>;
18049
+ type CreateBody$2 = NonNullable<operations['createPost']['requestBody']>['content']['application/json'];
18050
+ type UpdateBody$2 = NonNullable<operations['updatePost']['requestBody']>['content']['application/json'];
18025
18051
  type AddCategoriesBody = NonNullable<operations['addPostCategories']['requestBody']>['content']['application/json'];
18026
18052
  declare class PostsResource {
18027
18053
  private client;
18028
18054
  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 & {
18055
+ list(params?: ListParams$2): Promise<ListResponse<Post>>;
18056
+ iterate(params?: Omit<ListParams$2, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Post, void, undefined>;
18057
+ toArray(params?: Omit<ListParams$2, 'cursor'>, options?: PaginateOptions & {
18032
18058
  limit?: number;
18033
18059
  }): 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>>;
18060
+ get(id: string, params?: Pick<ListParams$2, 'expand' | 'fields'>): Promise<DataResponse<Post>>;
18061
+ create(body: CreateBody$2, options?: ResourceRequestOptions): Promise<DataResponse<Post>>;
18062
+ update(id: string, body: UpdateBody$2): Promise<DataResponse<Post>>;
18037
18063
  delete(id: string): Promise<void>;
18038
18064
  addCategories(postId: string, body: AddCategoriesBody): Promise<DataResponse<Post>>;
18039
18065
  removeCategory(postId: string, categoryId: string): Promise<void>;
18040
18066
  }
18041
18067
 
18042
18068
  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'];
18069
+ type ListParams$1 = NonNullable<operations['listContentCategories']['parameters']['query']>;
18070
+ type CreateBody$1 = NonNullable<operations['createContentCategory']['requestBody']>['content']['application/json'];
18071
+ type UpdateBody$1 = NonNullable<operations['updateContentCategory']['requestBody']>['content']['application/json'];
18046
18072
  declare class ContentCategoriesResource {
18047
18073
  private client;
18048
18074
  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 & {
18075
+ list(params?: ListParams$1): Promise<ListResponse<ContentCategory>>;
18076
+ iterate(params?: Omit<ListParams$1, 'cursor'>, options?: PaginateOptions): AsyncGenerator<ContentCategory, void, undefined>;
18077
+ toArray(params?: Omit<ListParams$1, 'cursor'>, options?: PaginateOptions & {
18052
18078
  limit?: number;
18053
18079
  }): Promise<ContentCategory[]>;
18054
18080
  get(id: string): Promise<DataResponse<ContentCategory>>;
18055
- create(body: CreateBody, options?: ResourceRequestOptions): Promise<DataResponse<ContentCategory>>;
18056
- update(id: string, body: UpdateBody): Promise<DataResponse<ContentCategory>>;
18081
+ create(body: CreateBody$1, options?: ResourceRequestOptions): Promise<DataResponse<ContentCategory>>;
18082
+ update(id: string, body: UpdateBody$1): Promise<DataResponse<ContentCategory>>;
18083
+ delete(id: string): Promise<void>;
18084
+ }
18085
+
18086
+ type MembershipPlan = components['schemas']['MembershipPlan'];
18087
+ type CustomerMembership = components['schemas']['CustomerMembership'];
18088
+ type ListParams = NonNullable<operations['listMembershipPlans']['parameters']['query']>;
18089
+ type CreateBody = NonNullable<operations['createMembershipPlan']['requestBody']>['content']['application/json'];
18090
+ type UpdateBody = NonNullable<operations['updateMembershipPlan']['requestBody']>['content']['application/json'];
18091
+ type SubscriptionListParams = NonNullable<operations['listMembershipSubscriptions']['parameters']['query']>;
18092
+ declare class MembershipPlansResource {
18093
+ private client;
18094
+ constructor(client: Hydra);
18095
+ list(params?: ListParams): Promise<ListResponse<MembershipPlan>>;
18096
+ iterate(params?: Omit<ListParams, 'cursor'>, options?: PaginateOptions): AsyncGenerator<MembershipPlan, void, undefined>;
18097
+ toArray(params?: Omit<ListParams, 'cursor'>, options?: PaginateOptions & {
18098
+ limit?: number;
18099
+ }): Promise<MembershipPlan[]>;
18100
+ get(id: string): Promise<DataResponse<MembershipPlan>>;
18101
+ create(body: CreateBody, options?: ResourceRequestOptions): Promise<DataResponse<MembershipPlan>>;
18102
+ update(id: string, body: UpdateBody): Promise<DataResponse<MembershipPlan>>;
18057
18103
  delete(id: string): Promise<void>;
18104
+ listSubscriptions(params?: SubscriptionListParams): Promise<ListResponse<CustomerMembership>>;
18058
18105
  }
18059
18106
 
18060
18107
  interface AppInfo {
@@ -18135,6 +18182,7 @@ declare class Hydra {
18135
18182
  readonly integrations: IntegrationsResource;
18136
18183
  readonly posts: PostsResource;
18137
18184
  readonly contentCategories: ContentCategoriesResource;
18185
+ readonly membershipPlans: MembershipPlansResource;
18138
18186
  constructor(config: HydraConfig);
18139
18187
  request<T>(method: string, path: string, options?: RequestOptions): Promise<T>;
18140
18188
  /** Multipart upload for file-based endpoints (e.g. images) */
@@ -18216,4 +18264,4 @@ declare class HydraIdempotencyError extends HydraError {
18216
18264
  constructor(body: HydraErrorBody, headers: Headers);
18217
18265
  }
18218
18266
 
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 };
18267
+ export { AddressesResource, type AnalyticsActionItems$1 as AnalyticsActionItems, type AnalyticsOrdersSeries$1 as AnalyticsOrdersSeries, AnalyticsResource, type AnalyticsSummary$1 as AnalyticsSummary, type AnalyticsTimeSeries$1 as AnalyticsTimeSeries, type AnalyticsTopProduct$1 as AnalyticsTopProduct, type AppInfo, type Cart$1 as Cart, type CartItem, CartResource, type CheckoutCreate$1 as CheckoutCreate, type CheckoutGet$1 as CheckoutGet, type CheckoutListItem$1 as CheckoutListItem, CheckoutResource, CheckoutsResource, type Collection$1 as Collection, CollectionsResource, CompaniesResource, type Company$1 as Company, ContentCategoriesResource, type ContentCategory$1 as ContentCategory, type Customer$1 as Customer, type CustomerGroup$1 as CustomerGroup, CustomerGroupsResource, type CustomerMembership$1 as CustomerMembership, CustomersResource, type DataResponse, type Discount$1 as Discount, DiscountsResource, type DraftOrder$1 as DraftOrder, DraftOrdersResource, type ExchangeRate$1 as ExchangeRate, ExchangeRatesResource, type Fulfillment$1 as Fulfillment, type FulfillmentOrder$2 as FulfillmentOrder, FulfillmentOrdersResource, FulfillmentsResource, type GenerateVariantsResult$1 as GenerateVariantsResult, Hydra, HydraAuthenticationError, type HydraConfig, HydraConnectionError, HydraError, type HydraErrorBody, HydraIdempotencyError, HydraNotFoundError, HydraPermissionError, HydraRateLimitError, HydraValidationError, type Image$2 as Image, ImagesResource, IntegrationsResource, type InventoryLevel$1 as InventoryLevel, InventoryResource, type ListResponse, type Location$1 as Location, LocationsResource, type MembershipPlan$1 as MembershipPlan, MembershipPlansResource, MetafieldsResource, type NotificationLog$1 as NotificationLog, NotificationsResource, type Order$2 as Order, OrdersResource, type PaginateOptions, type Pagination, type Post$1 as Post, PostsResource, type Product$1 as Product, type ProductStats$1 as ProductStats, ProductsResource, type Promotion$1 as Promotion, PromotionsResource, type PurchaseOrder$1 as PurchaseOrder, PurchaseOrdersResource, type Redirect$1 as Redirect, RedirectsResource, type Refund$1 as Refund, RefundsResource, type RequestOptions, type ResourceRequestOptions, type Return$1 as Return, ReturnsResource, SearchResource, type ShippingRate$1 as ShippingRate, ShippingResource, type ShippingZone$1 as ShippingZone, type Store$1 as Store, StoreCreditResource, StoreResource, type Tag$1 as Tag, TagsResource, type TaxExemption$1 as TaxExemption, type TaxGroup$1 as TaxGroup, type TaxRate$1 as TaxRate, TaxResource, type Variant$2 as Variant, type VariantPrice$1 as VariantPrice, VariantsResource, type Webhook$1 as Webhook, WebhooksResource, paginate, toArray };
package/dist/index.js CHANGED
@@ -1478,6 +1478,38 @@ var ContentCategoriesResource = class {
1478
1478
  }
1479
1479
  };
1480
1480
 
1481
+ // src/resources/membership-plans.ts
1482
+ var MembershipPlansResource = class {
1483
+ constructor(client) {
1484
+ this.client = client;
1485
+ }
1486
+ client;
1487
+ async list(params) {
1488
+ return this.client.request("GET", "/v1/membership-plans", { params });
1489
+ }
1490
+ iterate(params, options) {
1491
+ return paginate((cursor) => this.list({ ...params, cursor }), options);
1492
+ }
1493
+ async toArray(params, options) {
1494
+ return toArray(this.iterate(params, options), options);
1495
+ }
1496
+ async get(id) {
1497
+ return this.client.request("GET", `/v1/membership-plans/${id}`);
1498
+ }
1499
+ async create(body, options) {
1500
+ return this.client.request("POST", "/v1/membership-plans", { body, ...options });
1501
+ }
1502
+ async update(id, body) {
1503
+ return this.client.request("PATCH", `/v1/membership-plans/${id}`, { body });
1504
+ }
1505
+ async delete(id) {
1506
+ return this.client.request("DELETE", `/v1/membership-plans/${id}`);
1507
+ }
1508
+ async listSubscriptions(params) {
1509
+ return this.client.request("GET", "/v1/membership-plans/subscriptions", { params });
1510
+ }
1511
+ };
1512
+
1481
1513
  // src/client.ts
1482
1514
  var SDK_VERSION = "0.1.0";
1483
1515
  var INITIAL_RETRY_DELAY = 0.5;
@@ -1554,6 +1586,8 @@ var Hydra = class {
1554
1586
  // P7: Content
1555
1587
  posts = new PostsResource(this);
1556
1588
  contentCategories = new ContentCategoriesResource(this);
1589
+ // P8: Subscriptions
1590
+ membershipPlans = new MembershipPlansResource(this);
1557
1591
  constructor(config) {
1558
1592
  for (const key of Object.keys(config)) {
1559
1593
  if (!VALID_CONFIG_KEYS.has(key)) {
@@ -1788,6 +1822,7 @@ export {
1788
1822
  IntegrationsResource,
1789
1823
  InventoryResource,
1790
1824
  LocationsResource,
1825
+ MembershipPlansResource,
1791
1826
  MetafieldsResource,
1792
1827
  NotificationsResource,
1793
1828
  OrdersResource,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gethydra/sdk",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Official TypeScript SDK for the Hydra Commerce API",
5
5
  "license": "MIT",
6
6
  "author": "Grant Capital Group",