@gethydra/sdk 0.1.10 → 0.1.11

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
@@ -833,6 +833,31 @@ interface components {
833
833
  GenerateVariantsResult: {
834
834
  variants: components["schemas"]["Variant"][];
835
835
  };
836
+ CustomerPhoto: {
837
+ id: string;
838
+ product_id: string;
839
+ image_url: string;
840
+ bucket_path: string;
841
+ width: number;
842
+ height: number;
843
+ /** @enum {string} */
844
+ aspect_ratio: "1:1" | "4:5";
845
+ file_size: number;
846
+ credit: string | null;
847
+ link_url: string | null;
848
+ link_text: string | null;
849
+ customer_id: string | null;
850
+ customer_email: string | null;
851
+ alt_text: string | null;
852
+ show_in_gallery: boolean;
853
+ /** @enum {string} */
854
+ status: "pending" | "approved" | "rejected";
855
+ moderated_at: string | null;
856
+ moderated_by: string | null;
857
+ moderation_notes: string | null;
858
+ created_at: string;
859
+ updated_at: string;
860
+ };
836
861
  VariantPrice: {
837
862
  /** @example wholesale */
838
863
  slug: string;
@@ -6779,6 +6804,26 @@ interface operations {
6779
6804
  };
6780
6805
  };
6781
6806
  };
6807
+ getProductCustomerPhotos: {
6808
+ parameters: {
6809
+ query?: never;
6810
+ header?: never;
6811
+ path: {
6812
+ id: string;
6813
+ };
6814
+ cookie?: never;
6815
+ };
6816
+ requestBody?: never;
6817
+ responses: {
6818
+ /** @description List of approved customer photos */
6819
+ 200: {
6820
+ headers: {
6821
+ [name: string]: unknown;
6822
+ };
6823
+ content?: never;
6824
+ };
6825
+ };
6826
+ };
6782
6827
  listProductLinks: {
6783
6828
  parameters: {
6784
6829
  query?: never;
@@ -6985,6 +7030,223 @@ interface operations {
6985
7030
  };
6986
7031
  };
6987
7032
  };
7033
+ listCustomerPhotos: {
7034
+ parameters: {
7035
+ query?: {
7036
+ limit?: number;
7037
+ cursor?: string;
7038
+ fields?: string;
7039
+ product_id?: string;
7040
+ status?: "pending" | "approved" | "rejected";
7041
+ };
7042
+ header?: never;
7043
+ path?: never;
7044
+ cookie?: never;
7045
+ };
7046
+ requestBody?: never;
7047
+ responses: {
7048
+ /** @description List of customer photos */
7049
+ 200: {
7050
+ headers: {
7051
+ [name: string]: unknown;
7052
+ };
7053
+ content: {
7054
+ "application/json": {
7055
+ data: components["schemas"]["CustomerPhoto"][];
7056
+ pagination: {
7057
+ cursor: string | null;
7058
+ has_more: boolean;
7059
+ total: number;
7060
+ };
7061
+ };
7062
+ };
7063
+ };
7064
+ };
7065
+ };
7066
+ uploadCustomerPhoto: {
7067
+ parameters: {
7068
+ query?: never;
7069
+ header?: never;
7070
+ path?: never;
7071
+ cookie?: never;
7072
+ };
7073
+ requestBody?: {
7074
+ content: {
7075
+ "multipart/form-data": {
7076
+ /** Format: binary */
7077
+ image?: string;
7078
+ product_id: string;
7079
+ credit?: string;
7080
+ /** Format: uri */
7081
+ link_url?: string;
7082
+ link_text?: string;
7083
+ /** Format: email */
7084
+ customer_email?: string;
7085
+ };
7086
+ };
7087
+ };
7088
+ responses: {
7089
+ /** @description Photo uploaded successfully */
7090
+ 201: {
7091
+ headers: {
7092
+ [name: string]: unknown;
7093
+ };
7094
+ content: {
7095
+ "application/json": {
7096
+ data: components["schemas"]["CustomerPhoto"];
7097
+ };
7098
+ };
7099
+ };
7100
+ };
7101
+ };
7102
+ getCustomerPhoto: {
7103
+ parameters: {
7104
+ query?: never;
7105
+ header?: never;
7106
+ path: {
7107
+ id: {
7108
+ /** @example prod_abc123 */
7109
+ id: string;
7110
+ };
7111
+ };
7112
+ cookie?: never;
7113
+ };
7114
+ requestBody?: never;
7115
+ responses: {
7116
+ /** @description Customer photo details */
7117
+ 200: {
7118
+ headers: {
7119
+ [name: string]: unknown;
7120
+ };
7121
+ content: {
7122
+ "application/json": {
7123
+ data: components["schemas"]["CustomerPhoto"];
7124
+ };
7125
+ };
7126
+ };
7127
+ };
7128
+ };
7129
+ deleteCustomerPhoto: {
7130
+ parameters: {
7131
+ query?: never;
7132
+ header?: never;
7133
+ path: {
7134
+ id: {
7135
+ /** @example prod_abc123 */
7136
+ id: string;
7137
+ };
7138
+ };
7139
+ cookie?: never;
7140
+ };
7141
+ requestBody?: never;
7142
+ responses: {
7143
+ /** @description Photo deleted successfully */
7144
+ 204: {
7145
+ headers: {
7146
+ [name: string]: unknown;
7147
+ };
7148
+ content?: never;
7149
+ };
7150
+ };
7151
+ };
7152
+ updateCustomerPhoto: {
7153
+ parameters: {
7154
+ query?: never;
7155
+ header?: never;
7156
+ path: {
7157
+ id: {
7158
+ /** @example prod_abc123 */
7159
+ id: string;
7160
+ };
7161
+ };
7162
+ cookie?: never;
7163
+ };
7164
+ requestBody?: {
7165
+ content: {
7166
+ "application/json": {
7167
+ credit?: string | null;
7168
+ /** Format: uri */
7169
+ link_url?: string | null;
7170
+ link_text?: string | null;
7171
+ alt_text?: string | null;
7172
+ show_in_gallery?: boolean;
7173
+ };
7174
+ };
7175
+ };
7176
+ responses: {
7177
+ /** @description Photo updated successfully */
7178
+ 200: {
7179
+ headers: {
7180
+ [name: string]: unknown;
7181
+ };
7182
+ content: {
7183
+ "application/json": {
7184
+ data: components["schemas"]["CustomerPhoto"];
7185
+ };
7186
+ };
7187
+ };
7188
+ };
7189
+ };
7190
+ approveCustomerPhoto: {
7191
+ parameters: {
7192
+ query?: never;
7193
+ header?: never;
7194
+ path: {
7195
+ id: {
7196
+ /** @example prod_abc123 */
7197
+ id: string;
7198
+ };
7199
+ };
7200
+ cookie?: never;
7201
+ };
7202
+ requestBody?: never;
7203
+ responses: {
7204
+ /** @description Photo approved successfully */
7205
+ 200: {
7206
+ headers: {
7207
+ [name: string]: unknown;
7208
+ };
7209
+ content: {
7210
+ "application/json": {
7211
+ data: components["schemas"]["CustomerPhoto"];
7212
+ };
7213
+ };
7214
+ };
7215
+ };
7216
+ };
7217
+ rejectCustomerPhoto: {
7218
+ parameters: {
7219
+ query?: never;
7220
+ header?: never;
7221
+ path: {
7222
+ id: {
7223
+ /** @example prod_abc123 */
7224
+ id: string;
7225
+ };
7226
+ };
7227
+ cookie?: never;
7228
+ };
7229
+ requestBody?: {
7230
+ content: {
7231
+ "application/json": {
7232
+ notes?: string;
7233
+ };
7234
+ };
7235
+ };
7236
+ responses: {
7237
+ /** @description Photo rejected successfully */
7238
+ 200: {
7239
+ headers: {
7240
+ [name: string]: unknown;
7241
+ };
7242
+ content: {
7243
+ "application/json": {
7244
+ data: components["schemas"]["CustomerPhoto"];
7245
+ };
7246
+ };
7247
+ };
7248
+ };
7249
+ };
6988
7250
  getVariant: {
6989
7251
  parameters: {
6990
7252
  query?: {
@@ -12081,7 +12343,7 @@ interface operations {
12081
12343
  * "order.paid"
12082
12344
  * ]
12083
12345
  */
12084
- events: ("product.created" | "product.updated" | "product.deleted" | "order.created" | "order.paid" | "order.fulfilled" | "order.cancelled" | "order.refunded" | "company.created" | "company.updated" | "company.deleted" | "customer.created" | "customer.updated" | "discount.created" | "discount.updated" | "discount.deleted" | "draft_order.created" | "draft_order.updated" | "draft_order.completed" | "draft_order.deleted" | "filter_attribute.created" | "filter_attribute.updated" | "filter_attribute.deleted" | "fulfillment.created" | "fulfillment.updated" | "fulfillment.cancelled" | "fulfillment_order.created" | "inventory.low" | "location.created" | "location.updated" | "location.deleted" | "navigation.created" | "navigation.updated" | "navigation.deleted" | "shipping.zone.created" | "shipping.zone.updated" | "shipping.zone.deleted" | "post.created" | "post.updated" | "post.deleted" | "post.published" | "post.unpublished" | "promotion.created" | "promotion.updated" | "promotion.deleted" | "purchase_order.created" | "purchase_order.updated" | "purchase_order.received" | "purchase_order.cancelled" | "refund.created" | "refund.succeeded" | "refund.failed" | "return.requested" | "return.approved" | "return.received" | "return.rejected" | "return.cancelled" | "return.closed" | "store.published" | "store_credit.issued" | "store_credit.used" | "store_credit.expired" | "membership.created" | "membership.updated" | "membership.cancelled" | "membership.expired" | "usage.warning")[];
12346
+ events: ("product.created" | "product.updated" | "product.deleted" | "order.created" | "order.paid" | "order.fulfilled" | "order.cancelled" | "order.refunded" | "company.created" | "company.updated" | "company.deleted" | "customer.created" | "customer.updated" | "customer_photo.submitted" | "customer_photo.approved" | "customer_photo.rejected" | "discount.created" | "discount.updated" | "discount.deleted" | "draft_order.created" | "draft_order.updated" | "draft_order.completed" | "draft_order.deleted" | "filter_attribute.created" | "filter_attribute.updated" | "filter_attribute.deleted" | "fulfillment.created" | "fulfillment.updated" | "fulfillment.cancelled" | "fulfillment_order.created" | "inventory.low" | "location.created" | "location.updated" | "location.deleted" | "navigation.created" | "navigation.updated" | "navigation.deleted" | "shipping.zone.created" | "shipping.zone.updated" | "shipping.zone.deleted" | "post.created" | "post.updated" | "post.deleted" | "post.published" | "post.unpublished" | "promotion.created" | "promotion.updated" | "promotion.deleted" | "purchase_order.created" | "purchase_order.updated" | "purchase_order.received" | "purchase_order.cancelled" | "refund.created" | "refund.succeeded" | "refund.failed" | "return.requested" | "return.approved" | "return.received" | "return.rejected" | "return.cancelled" | "return.closed" | "store.published" | "store_credit.issued" | "store_credit.used" | "store_credit.expired" | "membership.created" | "membership.updated" | "membership.cancelled" | "membership.expired" | "usage.warning")[];
12085
12347
  /**
12086
12348
  * @default active
12087
12349
  * @example active
@@ -12175,7 +12437,7 @@ interface operations {
12175
12437
  * "product.updated"
12176
12438
  * ]
12177
12439
  */
12178
- events?: ("product.created" | "product.updated" | "product.deleted" | "order.created" | "order.paid" | "order.fulfilled" | "order.cancelled" | "order.refunded" | "company.created" | "company.updated" | "company.deleted" | "customer.created" | "customer.updated" | "discount.created" | "discount.updated" | "discount.deleted" | "draft_order.created" | "draft_order.updated" | "draft_order.completed" | "draft_order.deleted" | "filter_attribute.created" | "filter_attribute.updated" | "filter_attribute.deleted" | "fulfillment.created" | "fulfillment.updated" | "fulfillment.cancelled" | "fulfillment_order.created" | "inventory.low" | "location.created" | "location.updated" | "location.deleted" | "navigation.created" | "navigation.updated" | "navigation.deleted" | "shipping.zone.created" | "shipping.zone.updated" | "shipping.zone.deleted" | "post.created" | "post.updated" | "post.deleted" | "post.published" | "post.unpublished" | "promotion.created" | "promotion.updated" | "promotion.deleted" | "purchase_order.created" | "purchase_order.updated" | "purchase_order.received" | "purchase_order.cancelled" | "refund.created" | "refund.succeeded" | "refund.failed" | "return.requested" | "return.approved" | "return.received" | "return.rejected" | "return.cancelled" | "return.closed" | "store.published" | "store_credit.issued" | "store_credit.used" | "store_credit.expired" | "membership.created" | "membership.updated" | "membership.cancelled" | "membership.expired" | "usage.warning")[];
12440
+ events?: ("product.created" | "product.updated" | "product.deleted" | "order.created" | "order.paid" | "order.fulfilled" | "order.cancelled" | "order.refunded" | "company.created" | "company.updated" | "company.deleted" | "customer.created" | "customer.updated" | "customer_photo.submitted" | "customer_photo.approved" | "customer_photo.rejected" | "discount.created" | "discount.updated" | "discount.deleted" | "draft_order.created" | "draft_order.updated" | "draft_order.completed" | "draft_order.deleted" | "filter_attribute.created" | "filter_attribute.updated" | "filter_attribute.deleted" | "fulfillment.created" | "fulfillment.updated" | "fulfillment.cancelled" | "fulfillment_order.created" | "inventory.low" | "location.created" | "location.updated" | "location.deleted" | "navigation.created" | "navigation.updated" | "navigation.deleted" | "shipping.zone.created" | "shipping.zone.updated" | "shipping.zone.deleted" | "post.created" | "post.updated" | "post.deleted" | "post.published" | "post.unpublished" | "promotion.created" | "promotion.updated" | "promotion.deleted" | "purchase_order.created" | "purchase_order.updated" | "purchase_order.received" | "purchase_order.cancelled" | "refund.created" | "refund.succeeded" | "refund.failed" | "return.requested" | "return.approved" | "return.received" | "return.rejected" | "return.cancelled" | "return.closed" | "store.published" | "store_credit.issued" | "store_credit.used" | "store_credit.expired" | "membership.created" | "membership.updated" | "membership.cancelled" | "membership.expired" | "usage.warning")[];
12179
12441
  /**
12180
12442
  * @example active
12181
12443
  * @enum {string}
@@ -17107,6 +17369,7 @@ type Image$2 = components['schemas']['Image'];
17107
17369
  type Collection$1 = components['schemas']['Collection'];
17108
17370
  type Customer$1 = components['schemas']['Customer'];
17109
17371
  type CustomerGroup$1 = components['schemas']['CustomerGroup'];
17372
+ type CustomerPhoto$1 = components['schemas']['CustomerPhoto'];
17110
17373
  type Company$1 = components['schemas']['Company'];
17111
17374
  type Cart$1 = components['schemas']['Cart'];
17112
17375
  type CartItem = components['schemas']['CartItem'];
@@ -17188,9 +17451,9 @@ type ProductStats = components['schemas']['ProductStats'];
17188
17451
  type Variant$1 = components['schemas']['Variant'];
17189
17452
  type Image$1 = components['schemas']['Image'];
17190
17453
  type GenerateVariantsResult = components['schemas']['GenerateVariantsResult'];
17191
- type ListParams$r = NonNullable<operations['listProducts']['parameters']['query']>;
17454
+ type ListParams$s = NonNullable<operations['listProducts']['parameters']['query']>;
17192
17455
  type CreateBody$n = NonNullable<operations['createProduct']['requestBody']>['content']['application/json'];
17193
- type UpdateBody$n = NonNullable<operations['updateProduct']['requestBody']>['content']['application/json'];
17456
+ type UpdateBody$o = NonNullable<operations['updateProduct']['requestBody']>['content']['application/json'];
17194
17457
  type DuplicateBody = NonNullable<operations['duplicateProduct']['requestBody']>['content']['application/json'];
17195
17458
  type CreateVariantBody = NonNullable<operations['createProductVariant']['requestBody']>['content']['application/json'];
17196
17459
  type GenerateVariantsBody = NonNullable<operations['generateProductVariants']['requestBody']>['content']['application/json'];
@@ -17200,14 +17463,14 @@ type CreateProductLinkBody = NonNullable<operations['createProductLink']['reques
17200
17463
  declare class ProductsResource {
17201
17464
  private client;
17202
17465
  constructor(client: Hydra);
17203
- list(params?: ListParams$r): Promise<ListResponse<Product>>;
17204
- iterate(params?: Omit<ListParams$r, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Product, void, undefined>;
17205
- toArray(params?: Omit<ListParams$r, 'cursor'>, options?: PaginateOptions & {
17466
+ list(params?: ListParams$s): Promise<ListResponse<Product>>;
17467
+ iterate(params?: Omit<ListParams$s, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Product, void, undefined>;
17468
+ toArray(params?: Omit<ListParams$s, 'cursor'>, options?: PaginateOptions & {
17206
17469
  limit?: number;
17207
17470
  }): Promise<Product[]>;
17208
- get(id: string, params?: Pick<ListParams$r, 'expand' | 'currency' | 'fields'>): Promise<DataResponse<Product>>;
17471
+ get(id: string, params?: Pick<ListParams$s, 'expand' | 'currency' | 'fields'>): Promise<DataResponse<Product>>;
17209
17472
  create(body: CreateBody$n, options?: ResourceRequestOptions): Promise<DataResponse<Product>>;
17210
- update(id: string, body: UpdateBody$n): Promise<DataResponse<Product>>;
17473
+ update(id: string, body: UpdateBody$o): Promise<DataResponse<Product>>;
17211
17474
  delete(id: string): Promise<void>;
17212
17475
  batchCreate(body: {
17213
17476
  products: CreateBody$n[];
@@ -17231,7 +17494,7 @@ declare class ProductsResource {
17231
17494
 
17232
17495
  type Variant = components['schemas']['Variant'];
17233
17496
  type VariantPrice = components['schemas']['VariantPrice'];
17234
- type UpdateBody$m = NonNullable<operations['updateVariant']['requestBody']>['content']['application/json'];
17497
+ type UpdateBody$n = NonNullable<operations['updateVariant']['requestBody']>['content']['application/json'];
17235
17498
  type UpsertPriceBody = NonNullable<operations['upsertVariantPrice']['requestBody']>['content']['application/json'];
17236
17499
  declare class VariantsResource {
17237
17500
  private client;
@@ -17241,7 +17504,7 @@ declare class VariantsResource {
17241
17504
  currency?: string;
17242
17505
  fields?: string;
17243
17506
  }): Promise<DataResponse<Variant>>;
17244
- update(id: string, body: UpdateBody$m): Promise<DataResponse<Variant>>;
17507
+ update(id: string, body: UpdateBody$n): Promise<DataResponse<Variant>>;
17245
17508
  delete(id: string): Promise<void>;
17246
17509
  listPrices(variantId: string): Promise<DataResponse<Record<string, VariantPrice>>>;
17247
17510
  upsertPrice(variantId: string, priceKeySlug: string, body: UpsertPriceBody): Promise<DataResponse<VariantPrice>>;
@@ -17253,23 +17516,23 @@ declare class VariantsResource {
17253
17516
  }
17254
17517
 
17255
17518
  type Collection = components['schemas']['Collection'];
17256
- type ListParams$q = NonNullable<operations['listCollections']['parameters']['query']>;
17519
+ type ListParams$r = NonNullable<operations['listCollections']['parameters']['query']>;
17257
17520
  type CreateBody$m = NonNullable<operations['createCollection']['requestBody']>['content']['application/json'];
17258
- type UpdateBody$l = NonNullable<operations['updateCollection']['requestBody']>['content']['application/json'];
17521
+ type UpdateBody$m = NonNullable<operations['updateCollection']['requestBody']>['content']['application/json'];
17259
17522
  type AddProductsBody = NonNullable<operations['addCollectionProducts']['requestBody']>['content']['application/json'];
17260
17523
  type ReorderProductsBody = NonNullable<operations['reorderCollectionProducts']['requestBody']>['content']['application/json'];
17261
17524
  type ReorderCollectionsBody = NonNullable<operations['reorderCollections']['requestBody']>['content']['application/json'];
17262
17525
  declare class CollectionsResource {
17263
17526
  private client;
17264
17527
  constructor(client: Hydra);
17265
- list(params?: ListParams$q): Promise<ListResponse<Collection>>;
17266
- iterate(params?: Omit<ListParams$q, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Collection, void, undefined>;
17267
- toArray(params?: Omit<ListParams$q, 'cursor'>, options?: PaginateOptions & {
17528
+ list(params?: ListParams$r): Promise<ListResponse<Collection>>;
17529
+ iterate(params?: Omit<ListParams$r, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Collection, void, undefined>;
17530
+ toArray(params?: Omit<ListParams$r, 'cursor'>, options?: PaginateOptions & {
17268
17531
  limit?: number;
17269
17532
  }): Promise<Collection[]>;
17270
- get(id: string, params?: Pick<ListParams$q, 'expand' | 'fields'>): Promise<DataResponse<Collection>>;
17533
+ get(id: string, params?: Pick<ListParams$r, 'expand' | 'fields'>): Promise<DataResponse<Collection>>;
17271
17534
  create(body: CreateBody$m, options?: ResourceRequestOptions): Promise<DataResponse<Collection>>;
17272
- update(id: string, body: UpdateBody$l): Promise<DataResponse<Collection>>;
17535
+ update(id: string, body: UpdateBody$m): Promise<DataResponse<Collection>>;
17273
17536
  delete(id: string): Promise<void>;
17274
17537
  tree(): Promise<DataResponse<unknown>>;
17275
17538
  reorder(body: ReorderCollectionsBody): Promise<void>;
@@ -17316,15 +17579,15 @@ declare class CheckoutResource {
17316
17579
 
17317
17580
  type Order$1 = components['schemas']['Order'];
17318
17581
  type FulfillmentOrder$1 = components['schemas']['FulfillmentOrder'];
17319
- type ListParams$p = NonNullable<operations['listOrders']['parameters']['query']>;
17582
+ type ListParams$q = NonNullable<operations['listOrders']['parameters']['query']>;
17320
17583
  type CreateBody$k = NonNullable<operations['createOrder']['requestBody']>['content']['application/json'];
17321
- type UpdateBody$k = NonNullable<operations['updateOrder']['requestBody']>['content']['application/json'];
17584
+ type UpdateBody$l = NonNullable<operations['updateOrder']['requestBody']>['content']['application/json'];
17322
17585
  declare class OrdersResource {
17323
17586
  private client;
17324
17587
  constructor(client: Hydra);
17325
- list(params?: ListParams$p): Promise<ListResponse<Order$1>>;
17326
- iterate(params?: Omit<ListParams$p, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Order$1, void, undefined>;
17327
- toArray(params?: Omit<ListParams$p, 'cursor'>, options?: PaginateOptions & {
17588
+ list(params?: ListParams$q): Promise<ListResponse<Order$1>>;
17589
+ iterate(params?: Omit<ListParams$q, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Order$1, void, undefined>;
17590
+ toArray(params?: Omit<ListParams$q, 'cursor'>, options?: PaginateOptions & {
17328
17591
  limit?: number;
17329
17592
  }): Promise<Order$1[]>;
17330
17593
  get(id: string, params?: {
@@ -17333,7 +17596,7 @@ declare class OrdersResource {
17333
17596
  fields?: string;
17334
17597
  }): Promise<DataResponse<Order$1>>;
17335
17598
  create(body: CreateBody$k, options?: ResourceRequestOptions): Promise<DataResponse<Order$1>>;
17336
- update(id: string, body: UpdateBody$k): Promise<DataResponse<Order$1>>;
17599
+ update(id: string, body: UpdateBody$l): Promise<DataResponse<Order$1>>;
17337
17600
  listFulfillmentOrders(orderId: string): Promise<DataResponse<FulfillmentOrder$1[]>>;
17338
17601
  /**
17339
17602
  * Returns the API path for downloading the invoice PDF for an order.
@@ -17348,26 +17611,26 @@ declare class OrdersResource {
17348
17611
 
17349
17612
  type Fulfillment = components['schemas']['Fulfillment'];
17350
17613
  type CreateBody$j = NonNullable<operations['createFulfillment']['requestBody']>['content']['application/json'];
17351
- type UpdateBody$j = NonNullable<operations['updateFulfillment']['requestBody']>['content']['application/json'];
17614
+ type UpdateBody$k = NonNullable<operations['updateFulfillment']['requestBody']>['content']['application/json'];
17352
17615
  type CancelBody = NonNullable<operations['cancelFulfillment']['requestBody']>['content']['application/json'];
17353
17616
  declare class FulfillmentsResource {
17354
17617
  private client;
17355
17618
  constructor(client: Hydra);
17356
17619
  /** Create a fulfillment for a fulfillment order */
17357
17620
  create(fulfillmentOrderId: string, body: CreateBody$j, options?: ResourceRequestOptions): Promise<DataResponse<Fulfillment>>;
17358
- update(id: string, body: UpdateBody$j): Promise<DataResponse<Fulfillment>>;
17621
+ update(id: string, body: UpdateBody$k): Promise<DataResponse<Fulfillment>>;
17359
17622
  cancel(id: string, body?: CancelBody): Promise<DataResponse<Fulfillment>>;
17360
17623
  }
17361
17624
 
17362
17625
  type Refund = components['schemas']['Refund'];
17363
- type ListParams$o = NonNullable<operations['listRefunds']['parameters']['query']>;
17626
+ type ListParams$p = NonNullable<operations['listRefunds']['parameters']['query']>;
17364
17627
  type CreateBody$i = NonNullable<operations['createOrderRefund']['requestBody']>['content']['application/json'];
17365
17628
  declare class RefundsResource {
17366
17629
  private client;
17367
17630
  constructor(client: Hydra);
17368
- list(params?: ListParams$o): Promise<ListResponse<Refund>>;
17369
- iterate(params?: Omit<ListParams$o, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Refund, void, undefined>;
17370
- toArray(params?: Omit<ListParams$o, 'cursor'>, options?: PaginateOptions & {
17631
+ list(params?: ListParams$p): Promise<ListResponse<Refund>>;
17632
+ iterate(params?: Omit<ListParams$p, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Refund, void, undefined>;
17633
+ toArray(params?: Omit<ListParams$p, 'cursor'>, options?: PaginateOptions & {
17371
17634
  limit?: number;
17372
17635
  }): Promise<Refund[]>;
17373
17636
  get(id: string, params?: {
@@ -17385,17 +17648,17 @@ declare class RefundsResource {
17385
17648
  }
17386
17649
 
17387
17650
  type Return = components['schemas']['Return'];
17388
- type ListParams$n = NonNullable<operations['listReturns']['parameters']['query']>;
17651
+ type ListParams$o = NonNullable<operations['listReturns']['parameters']['query']>;
17389
17652
  type CreateBody$h = NonNullable<operations['createOrderReturn']['requestBody']>['content']['application/json'];
17390
17653
  type ApproveBody = NonNullable<operations['approveReturn']['requestBody']>['content']['application/json'];
17391
17654
  type ReceiveBody$1 = NonNullable<operations['receiveReturn']['requestBody']>['content']['application/json'];
17392
- type RejectBody = NonNullable<operations['rejectReturn']['requestBody']>['content']['application/json'];
17655
+ type RejectBody$1 = NonNullable<operations['rejectReturn']['requestBody']>['content']['application/json'];
17393
17656
  declare class ReturnsResource {
17394
17657
  private client;
17395
17658
  constructor(client: Hydra);
17396
- list(params?: ListParams$n): Promise<ListResponse<Return>>;
17397
- iterate(params?: Omit<ListParams$n, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Return, void, undefined>;
17398
- toArray(params?: Omit<ListParams$n, 'cursor'>, options?: PaginateOptions & {
17659
+ list(params?: ListParams$o): Promise<ListResponse<Return>>;
17660
+ iterate(params?: Omit<ListParams$o, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Return, void, undefined>;
17661
+ toArray(params?: Omit<ListParams$o, 'cursor'>, options?: PaginateOptions & {
17399
17662
  limit?: number;
17400
17663
  }): Promise<Return[]>;
17401
17664
  get(id: string, params?: {
@@ -17407,24 +17670,24 @@ declare class ReturnsResource {
17407
17670
  approve(id: string, body?: ApproveBody): Promise<DataResponse<Return>>;
17408
17671
  receive(id: string, body?: ReceiveBody$1): Promise<DataResponse<Return>>;
17409
17672
  close(id: string): Promise<DataResponse<Return>>;
17410
- reject(id: string, body?: RejectBody): Promise<DataResponse<Return>>;
17673
+ reject(id: string, body?: RejectBody$1): Promise<DataResponse<Return>>;
17411
17674
  cancel(id: string): Promise<DataResponse<Return>>;
17412
17675
  }
17413
17676
 
17414
17677
  type DraftOrder = components['schemas']['DraftOrder'];
17415
17678
  type DraftOrderLineItem = components['schemas']['DraftOrderLineItem'];
17416
17679
  type Order = components['schemas']['Order'];
17417
- type ListParams$m = NonNullable<operations['listDraftOrders']['parameters']['query']>;
17680
+ type ListParams$n = NonNullable<operations['listDraftOrders']['parameters']['query']>;
17418
17681
  type CreateBody$g = NonNullable<operations['createDraftOrder']['requestBody']>['content']['application/json'];
17419
- type UpdateBody$i = NonNullable<operations['updateDraftOrder']['requestBody']>['content']['application/json'];
17682
+ type UpdateBody$j = NonNullable<operations['updateDraftOrder']['requestBody']>['content']['application/json'];
17420
17683
  type AddItemsBody = NonNullable<operations['addDraftOrderItems']['requestBody']>['content']['application/json'];
17421
17684
  type UpdateItemBody$2 = NonNullable<operations['updateDraftOrderItem']['requestBody']>['content']['application/json'];
17422
17685
  declare class DraftOrdersResource {
17423
17686
  private client;
17424
17687
  constructor(client: Hydra);
17425
- list(params?: ListParams$m): Promise<ListResponse<DraftOrder>>;
17426
- iterate(params?: Omit<ListParams$m, 'cursor'>, options?: PaginateOptions): AsyncGenerator<DraftOrder, void, undefined>;
17427
- toArray(params?: Omit<ListParams$m, 'cursor'>, options?: PaginateOptions & {
17688
+ list(params?: ListParams$n): Promise<ListResponse<DraftOrder>>;
17689
+ iterate(params?: Omit<ListParams$n, 'cursor'>, options?: PaginateOptions): AsyncGenerator<DraftOrder, void, undefined>;
17690
+ toArray(params?: Omit<ListParams$n, 'cursor'>, options?: PaginateOptions & {
17428
17691
  limit?: number;
17429
17692
  }): Promise<DraftOrder[]>;
17430
17693
  get(id: string, params?: {
@@ -17433,7 +17696,7 @@ declare class DraftOrdersResource {
17433
17696
  fields?: string;
17434
17697
  }): Promise<DataResponse<DraftOrder>>;
17435
17698
  create(body: CreateBody$g, options?: ResourceRequestOptions): Promise<DataResponse<DraftOrder>>;
17436
- update(id: string, body: UpdateBody$i): Promise<DataResponse<DraftOrder>>;
17699
+ update(id: string, body: UpdateBody$j): Promise<DataResponse<DraftOrder>>;
17437
17700
  delete(id: string): Promise<void>;
17438
17701
  addItems(draftOrderId: string, body: AddItemsBody): Promise<DataResponse<DraftOrderLineItem[]>>;
17439
17702
  updateItem(draftOrderId: string, itemId: string, body: UpdateItemBody$2): Promise<DataResponse<DraftOrderLineItem>>;
@@ -17448,22 +17711,22 @@ declare class DraftOrdersResource {
17448
17711
  }
17449
17712
 
17450
17713
  type Customer = components['schemas']['Customer'];
17451
- type ListParams$l = NonNullable<operations['listCustomers']['parameters']['query']>;
17714
+ type ListParams$m = NonNullable<operations['listCustomers']['parameters']['query']>;
17452
17715
  type CreateBody$f = NonNullable<operations['createCustomer']['requestBody']>['content']['application/json'];
17453
- type UpdateBody$h = NonNullable<operations['updateCustomer']['requestBody']>['content']['application/json'];
17716
+ type UpdateBody$i = NonNullable<operations['updateCustomer']['requestBody']>['content']['application/json'];
17454
17717
  type CreateAddressBody$1 = NonNullable<operations['createCustomerAddress']['requestBody']>['content']['application/json'];
17455
17718
  type CreateNoteBody$1 = NonNullable<operations['createCustomerNote']['requestBody']>['content']['application/json'];
17456
17719
  declare class CustomersResource {
17457
17720
  private client;
17458
17721
  constructor(client: Hydra);
17459
- list(params?: ListParams$l): Promise<ListResponse<Customer>>;
17460
- iterate(params?: Omit<ListParams$l, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Customer, void, undefined>;
17461
- toArray(params?: Omit<ListParams$l, 'cursor'>, options?: PaginateOptions & {
17722
+ list(params?: ListParams$m): Promise<ListResponse<Customer>>;
17723
+ iterate(params?: Omit<ListParams$m, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Customer, void, undefined>;
17724
+ toArray(params?: Omit<ListParams$m, 'cursor'>, options?: PaginateOptions & {
17462
17725
  limit?: number;
17463
17726
  }): Promise<Customer[]>;
17464
- get(id: string, params?: Pick<ListParams$l, 'expand' | 'fields'>): Promise<DataResponse<Customer>>;
17727
+ get(id: string, params?: Pick<ListParams$m, 'expand' | 'fields'>): Promise<DataResponse<Customer>>;
17465
17728
  create(body: CreateBody$f, options?: ResourceRequestOptions): Promise<DataResponse<Customer>>;
17466
- update(id: string, body: UpdateBody$h): Promise<DataResponse<Customer>>;
17729
+ update(id: string, body: UpdateBody$i): Promise<DataResponse<Customer>>;
17467
17730
  delete(id: string): Promise<void>;
17468
17731
  listAddresses(customerId: string): Promise<DataResponse<unknown[]>>;
17469
17732
  createAddress(customerId: string, body: CreateAddressBody$1): Promise<DataResponse<unknown>>;
@@ -17477,26 +17740,83 @@ declare class CustomersResource {
17477
17740
  }
17478
17741
 
17479
17742
  type CustomerGroup = components['schemas']['CustomerGroup'];
17480
- type ListParams$k = NonNullable<operations['listCustomerGroups']['parameters']['query']>;
17743
+ type ListParams$l = NonNullable<operations['listCustomerGroups']['parameters']['query']>;
17481
17744
  type CreateBody$e = NonNullable<operations['createCustomerGroup']['requestBody']>['content']['application/json'];
17482
- type UpdateBody$g = NonNullable<operations['updateCustomerGroup']['requestBody']>['content']['application/json'];
17745
+ type UpdateBody$h = NonNullable<operations['updateCustomerGroup']['requestBody']>['content']['application/json'];
17483
17746
  type AddMembersBody = NonNullable<operations['addCustomerGroupMembers']['requestBody']>['content']['application/json'];
17484
17747
  declare class CustomerGroupsResource {
17485
17748
  private client;
17486
17749
  constructor(client: Hydra);
17487
- list(params?: ListParams$k): Promise<ListResponse<CustomerGroup>>;
17488
- iterate(params?: Omit<ListParams$k, 'cursor'>, options?: PaginateOptions): AsyncGenerator<CustomerGroup, void, undefined>;
17489
- toArray(params?: Omit<ListParams$k, 'cursor'>, options?: PaginateOptions & {
17750
+ list(params?: ListParams$l): Promise<ListResponse<CustomerGroup>>;
17751
+ iterate(params?: Omit<ListParams$l, 'cursor'>, options?: PaginateOptions): AsyncGenerator<CustomerGroup, void, undefined>;
17752
+ toArray(params?: Omit<ListParams$l, 'cursor'>, options?: PaginateOptions & {
17490
17753
  limit?: number;
17491
17754
  }): Promise<CustomerGroup[]>;
17492
17755
  get(id: string): Promise<DataResponse<CustomerGroup>>;
17493
17756
  create(body: CreateBody$e, options?: ResourceRequestOptions): Promise<DataResponse<CustomerGroup>>;
17494
- update(id: string, body: UpdateBody$g): Promise<DataResponse<CustomerGroup>>;
17757
+ update(id: string, body: UpdateBody$h): Promise<DataResponse<CustomerGroup>>;
17495
17758
  delete(id: string): Promise<void>;
17496
17759
  addMembers(groupId: string, body: AddMembersBody): Promise<void>;
17497
17760
  removeMember(groupId: string, customerId: string): Promise<void>;
17498
17761
  }
17499
17762
 
17763
+ type CustomerPhoto = components['schemas']['CustomerPhoto'];
17764
+ type ListParams$k = NonNullable<operations['listCustomerPhotos']['parameters']['query']>;
17765
+ type UpdateBody$g = NonNullable<operations['updateCustomerPhoto']['requestBody']>['content']['application/json'];
17766
+ type RejectBody = NonNullable<operations['rejectCustomerPhoto']['requestBody']>['content']['application/json'];
17767
+ declare class CustomerPhotosResource {
17768
+ private client;
17769
+ constructor(client: Hydra);
17770
+ /**
17771
+ * List customer photos (secret key only).
17772
+ * Filter by product, status, etc.
17773
+ */
17774
+ list(params?: ListParams$k): Promise<ListResponse<CustomerPhoto>>;
17775
+ /**
17776
+ * Iterate through all customer photos with automatic pagination.
17777
+ */
17778
+ iterate(params?: Omit<ListParams$k, 'cursor'>, options?: PaginateOptions): AsyncGenerator<CustomerPhoto, void, undefined>;
17779
+ /**
17780
+ * Fetch all customer photos as an array (use with caution on large datasets).
17781
+ */
17782
+ toArray(params?: Omit<ListParams$k, 'cursor'>, options?: PaginateOptions & {
17783
+ limit?: number;
17784
+ }): Promise<CustomerPhoto[]>;
17785
+ /**
17786
+ * Upload a customer photo (publishable or secret key).
17787
+ * Accepts FormData with: image, product_id, credit, link_url, link_text, customer_email.
17788
+ */
17789
+ upload(formData: FormData): Promise<DataResponse<CustomerPhoto>>;
17790
+ /**
17791
+ * Get a single customer photo by ID (secret key only).
17792
+ */
17793
+ get(id: string): Promise<DataResponse<CustomerPhoto>>;
17794
+ /**
17795
+ * Update customer photo metadata (secret key only).
17796
+ * Fields: credit, link_url, link_text, alt_text, show_in_gallery.
17797
+ */
17798
+ update(id: string, body: UpdateBody$g): Promise<DataResponse<CustomerPhoto>>;
17799
+ /**
17800
+ * Approve a customer photo (secret key only).
17801
+ * Sets status to 'approved' and makes it visible on storefront.
17802
+ */
17803
+ approve(id: string): Promise<DataResponse<CustomerPhoto>>;
17804
+ /**
17805
+ * Reject a customer photo (secret key only).
17806
+ * Sets status to 'rejected'. Optionally include rejection notes.
17807
+ */
17808
+ reject(id: string, body?: RejectBody): Promise<DataResponse<CustomerPhoto>>;
17809
+ /**
17810
+ * Delete a customer photo (soft delete, secret key only).
17811
+ */
17812
+ delete(id: string): Promise<void>;
17813
+ /**
17814
+ * Get approved customer photos for a product (storefront-safe, publishable key works).
17815
+ * Returns up to 24 approved photos for display on product pages.
17816
+ */
17817
+ getForProduct(productId: string): Promise<DataResponse<CustomerPhoto[]>>;
17818
+ }
17819
+
17500
17820
  type UpdateBody$f = NonNullable<operations['updateAddress']['requestBody']>['content']['application/json'];
17501
17821
  declare class AddressesResource {
17502
17822
  private client;
@@ -18168,6 +18488,7 @@ declare class Hydra {
18168
18488
  readonly draftOrders: DraftOrdersResource;
18169
18489
  readonly customers: CustomersResource;
18170
18490
  readonly customerGroups: CustomerGroupsResource;
18491
+ readonly customerPhotos: CustomerPhotosResource;
18171
18492
  readonly addresses: AddressesResource;
18172
18493
  readonly storeCredit: StoreCreditResource;
18173
18494
  readonly inventory: InventoryResource;
@@ -18275,4 +18596,4 @@ declare class HydraIdempotencyError extends HydraError {
18275
18596
  constructor(body: HydraErrorBody, headers: Headers);
18276
18597
  }
18277
18598
 
18278
- 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 };
18599
+ 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, type CustomerPhoto$1 as CustomerPhoto, CustomerPhotosResource, 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
@@ -596,6 +596,80 @@ var CustomerGroupsResource = class {
596
596
  }
597
597
  };
598
598
 
599
+ // src/resources/customer-photos.ts
600
+ var CustomerPhotosResource = class {
601
+ constructor(client) {
602
+ this.client = client;
603
+ }
604
+ client;
605
+ /**
606
+ * List customer photos (secret key only).
607
+ * Filter by product, status, etc.
608
+ */
609
+ async list(params) {
610
+ return this.client.request("GET", "/v1/customer-photos", { params });
611
+ }
612
+ /**
613
+ * Iterate through all customer photos with automatic pagination.
614
+ */
615
+ iterate(params, options) {
616
+ return paginate((cursor) => this.list({ ...params, cursor }), options);
617
+ }
618
+ /**
619
+ * Fetch all customer photos as an array (use with caution on large datasets).
620
+ */
621
+ async toArray(params, options) {
622
+ return toArray(this.iterate(params, options), options);
623
+ }
624
+ /**
625
+ * Upload a customer photo (publishable or secret key).
626
+ * Accepts FormData with: image, product_id, credit, link_url, link_text, customer_email.
627
+ */
628
+ async upload(formData) {
629
+ return this.client.upload("/v1/customer-photos", formData);
630
+ }
631
+ /**
632
+ * Get a single customer photo by ID (secret key only).
633
+ */
634
+ async get(id) {
635
+ return this.client.request("GET", `/v1/customer-photos/${id}`);
636
+ }
637
+ /**
638
+ * Update customer photo metadata (secret key only).
639
+ * Fields: credit, link_url, link_text, alt_text, show_in_gallery.
640
+ */
641
+ async update(id, body) {
642
+ return this.client.request("PATCH", `/v1/customer-photos/${id}`, { body });
643
+ }
644
+ /**
645
+ * Approve a customer photo (secret key only).
646
+ * Sets status to 'approved' and makes it visible on storefront.
647
+ */
648
+ async approve(id) {
649
+ return this.client.request("POST", `/v1/customer-photos/${id}/approve`);
650
+ }
651
+ /**
652
+ * Reject a customer photo (secret key only).
653
+ * Sets status to 'rejected'. Optionally include rejection notes.
654
+ */
655
+ async reject(id, body) {
656
+ return this.client.request("POST", `/v1/customer-photos/${id}/reject`, { body });
657
+ }
658
+ /**
659
+ * Delete a customer photo (soft delete, secret key only).
660
+ */
661
+ async delete(id) {
662
+ return this.client.request("DELETE", `/v1/customer-photos/${id}`);
663
+ }
664
+ /**
665
+ * Get approved customer photos for a product (storefront-safe, publishable key works).
666
+ * Returns up to 24 approved photos for display on product pages.
667
+ */
668
+ async getForProduct(productId) {
669
+ return this.client.request("GET", `/v1/products/${productId}/customer-photos`);
670
+ }
671
+ };
672
+
599
673
  // src/resources/addresses.ts
600
674
  var AddressesResource = class {
601
675
  constructor(client) {
@@ -1557,6 +1631,7 @@ var Hydra = class {
1557
1631
  // P3: Customers
1558
1632
  customers = new CustomersResource(this);
1559
1633
  customerGroups = new CustomerGroupsResource(this);
1634
+ customerPhotos = new CustomerPhotosResource(this);
1560
1635
  addresses = new AddressesResource(this);
1561
1636
  storeCredit = new StoreCreditResource(this);
1562
1637
  // P4: Commerce operations
@@ -1803,6 +1878,7 @@ export {
1803
1878
  CompaniesResource,
1804
1879
  ContentCategoriesResource,
1805
1880
  CustomerGroupsResource,
1881
+ CustomerPhotosResource,
1806
1882
  CustomersResource,
1807
1883
  DiscountsResource,
1808
1884
  DraftOrdersResource,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gethydra/sdk",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
4
4
  "description": "Official TypeScript SDK for the Hydra Commerce API",
5
5
  "license": "MIT",
6
6
  "author": "Grant Capital Group",