@betterstore/sdk 0.3.34 → 0.3.35
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/CHANGELOG.md +6 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -1
- package/dist/index.mjs +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -230,7 +230,7 @@ declare class Products {
|
|
|
230
230
|
private apiClient;
|
|
231
231
|
constructor(apiKey: string, proxy?: string);
|
|
232
232
|
list(): Promise<ProductWithoutVariants[]>;
|
|
233
|
-
retrieve(productId: string): Promise<Product>;
|
|
233
|
+
retrieve(productId: string): Promise<Product | null>;
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
declare function createBetterStore(config: {
|
package/dist/index.d.ts
CHANGED
|
@@ -230,7 +230,7 @@ declare class Products {
|
|
|
230
230
|
private apiClient;
|
|
231
231
|
constructor(apiKey: string, proxy?: string);
|
|
232
232
|
list(): Promise<ProductWithoutVariants[]>;
|
|
233
|
-
retrieve(productId: string): Promise<Product>;
|
|
233
|
+
retrieve(productId: string): Promise<Product | null>;
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
declare function createBetterStore(config: {
|
package/dist/index.js
CHANGED
|
@@ -422,7 +422,8 @@ var Products = class {
|
|
|
422
422
|
return __async(this, null, function* () {
|
|
423
423
|
const data = yield this.apiClient.get(`/products/${productId}`);
|
|
424
424
|
if (!data) {
|
|
425
|
-
|
|
425
|
+
console.error(`Product with id ${productId} not found`);
|
|
426
|
+
return null;
|
|
426
427
|
}
|
|
427
428
|
return data;
|
|
428
429
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -384,7 +384,8 @@ var Products = class {
|
|
|
384
384
|
return __async(this, null, function* () {
|
|
385
385
|
const data = yield this.apiClient.get(`/products/${productId}`);
|
|
386
386
|
if (!data) {
|
|
387
|
-
|
|
387
|
+
console.error(`Product with id ${productId} not found`);
|
|
388
|
+
return null;
|
|
388
389
|
}
|
|
389
390
|
return data;
|
|
390
391
|
});
|