@gethydra/sdk 0.1.11 → 0.1.13

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
@@ -7080,6 +7080,7 @@ interface operations {
7080
7080
  /** Format: uri */
7081
7081
  link_url?: string;
7082
7082
  link_text?: string;
7083
+ alt_text?: string;
7083
7084
  /** Format: email */
7084
7085
  customer_email?: string;
7085
7086
  };
@@ -7104,10 +7105,7 @@ interface operations {
7104
7105
  query?: never;
7105
7106
  header?: never;
7106
7107
  path: {
7107
- id: {
7108
- /** @example prod_abc123 */
7109
- id: string;
7110
- };
7108
+ id: string;
7111
7109
  };
7112
7110
  cookie?: never;
7113
7111
  };
@@ -7131,10 +7129,7 @@ interface operations {
7131
7129
  query?: never;
7132
7130
  header?: never;
7133
7131
  path: {
7134
- id: {
7135
- /** @example prod_abc123 */
7136
- id: string;
7137
- };
7132
+ id: string;
7138
7133
  };
7139
7134
  cookie?: never;
7140
7135
  };
@@ -7154,10 +7149,7 @@ interface operations {
7154
7149
  query?: never;
7155
7150
  header?: never;
7156
7151
  path: {
7157
- id: {
7158
- /** @example prod_abc123 */
7159
- id: string;
7160
- };
7152
+ id: string;
7161
7153
  };
7162
7154
  cookie?: never;
7163
7155
  };
@@ -7192,10 +7184,7 @@ interface operations {
7192
7184
  query?: never;
7193
7185
  header?: never;
7194
7186
  path: {
7195
- id: {
7196
- /** @example prod_abc123 */
7197
- id: string;
7198
- };
7187
+ id: string;
7199
7188
  };
7200
7189
  cookie?: never;
7201
7190
  };
@@ -7219,10 +7208,7 @@ interface operations {
7219
7208
  query?: never;
7220
7209
  header?: never;
7221
7210
  path: {
7222
- id: {
7223
- /** @example prod_abc123 */
7224
- id: string;
7225
- };
7211
+ id: string;
7226
7212
  };
7227
7213
  cookie?: never;
7228
7214
  };
@@ -17784,7 +17770,7 @@ declare class CustomerPhotosResource {
17784
17770
  }): Promise<CustomerPhoto[]>;
17785
17771
  /**
17786
17772
  * Upload a customer photo (publishable or secret key).
17787
- * Accepts FormData with: image, product_id, credit, link_url, link_text, customer_email.
17773
+ * Accepts FormData with: image, product_id, credit, link_url, link_text, alt_text, customer_email.
17788
17774
  */
17789
17775
  upload(formData: FormData): Promise<DataResponse<CustomerPhoto>>;
17790
17776
  /**
@@ -17810,6 +17796,11 @@ declare class CustomerPhotosResource {
17810
17796
  * Delete a customer photo (soft delete, secret key only).
17811
17797
  */
17812
17798
  delete(id: string): Promise<void>;
17799
+ /**
17800
+ * Replace the image file on an existing customer photo (secret key only).
17801
+ * Preserves all metadata, approval status, and moderation history.
17802
+ */
17803
+ replaceImage(id: string, formData: FormData): Promise<DataResponse<CustomerPhoto>>;
17813
17804
  /**
17814
17805
  * Get approved customer photos for a product (storefront-safe, publishable key works).
17815
17806
  * Returns up to 24 approved photos for display on product pages.
package/dist/index.js CHANGED
@@ -623,7 +623,7 @@ var CustomerPhotosResource = class {
623
623
  }
624
624
  /**
625
625
  * Upload a customer photo (publishable or secret key).
626
- * Accepts FormData with: image, product_id, credit, link_url, link_text, customer_email.
626
+ * Accepts FormData with: image, product_id, credit, link_url, link_text, alt_text, customer_email.
627
627
  */
628
628
  async upload(formData) {
629
629
  return this.client.upload("/v1/customer-photos", formData);
@@ -661,6 +661,13 @@ var CustomerPhotosResource = class {
661
661
  async delete(id) {
662
662
  return this.client.request("DELETE", `/v1/customer-photos/${id}`);
663
663
  }
664
+ /**
665
+ * Replace the image file on an existing customer photo (secret key only).
666
+ * Preserves all metadata, approval status, and moderation history.
667
+ */
668
+ async replaceImage(id, formData) {
669
+ return this.client.upload(`/v1/customer-photos/${id}/replace-image`, formData);
670
+ }
664
671
  /**
665
672
  * Get approved customer photos for a product (storefront-safe, publishable key works).
666
673
  * Returns up to 24 approved photos for display on product pages.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gethydra/sdk",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "description": "Official TypeScript SDK for the Hydra Commerce API",
5
5
  "license": "MIT",
6
6
  "author": "Grant Capital Group",