@waffo/pancake-ts 0.3.2 → 0.3.4
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 +10 -0
- package/dist/index.cjs +12 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +25 -7
- package/dist/index.d.ts +25 -7
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/package.json +14 -6
package/dist/index.d.cts
CHANGED
|
@@ -304,7 +304,13 @@ interface CreateStoreParams {
|
|
|
304
304
|
/** Store name (slug is auto-generated) */
|
|
305
305
|
name: string;
|
|
306
306
|
}
|
|
307
|
-
/**
|
|
307
|
+
/**
|
|
308
|
+
* Parameters for updating a store.
|
|
309
|
+
*
|
|
310
|
+
* Settings objects support partial updates — omitted sub-fields keep their
|
|
311
|
+
* existing values, `null` clears a field, and a concrete value sets it.
|
|
312
|
+
* Pass the entire settings object as `null` to clear all fields in the group.
|
|
313
|
+
*/
|
|
308
314
|
interface UpdateStoreParams {
|
|
309
315
|
/** Store ID */
|
|
310
316
|
id: string;
|
|
@@ -318,12 +324,12 @@ interface UpdateStoreParams {
|
|
|
318
324
|
supportEmail?: string | null;
|
|
319
325
|
/** Store website URL (set to `null` to remove) */
|
|
320
326
|
website?: string | null;
|
|
321
|
-
/** Webhook configuration
|
|
322
|
-
webhookSettings?: WebhookSettings | null;
|
|
323
|
-
/** Notification preferences (set to `null` to
|
|
324
|
-
notificationSettings?: NotificationSettings | null;
|
|
325
|
-
/** Checkout page theme configuration (set to `null` to
|
|
326
|
-
checkoutSettings?: CheckoutSettings | null;
|
|
327
|
+
/** Webhook configuration (partial update — omitted fields keep existing values, set to `null` to clear all) */
|
|
328
|
+
webhookSettings?: Partial<WebhookSettings> | null;
|
|
329
|
+
/** Notification preferences (partial update — omitted fields keep existing values, set to `null` to clear all) */
|
|
330
|
+
notificationSettings?: Partial<NotificationSettings> | null;
|
|
331
|
+
/** Checkout page theme configuration (partial update — omitted fields keep existing values, set to `null` to clear all) */
|
|
332
|
+
checkoutSettings?: Partial<CheckoutSettings> | null;
|
|
327
333
|
}
|
|
328
334
|
/** Parameters for deleting (soft-delete) a store. */
|
|
329
335
|
interface DeleteStoreParams {
|
|
@@ -1449,14 +1455,26 @@ declare class StoresResource {
|
|
|
1449
1455
|
/**
|
|
1450
1456
|
* Update an existing store's settings.
|
|
1451
1457
|
*
|
|
1458
|
+
* Settings objects (`webhookSettings`, `notificationSettings`, `checkoutSettings`)
|
|
1459
|
+
* support partial updates: omitted sub-fields keep existing values, `null` clears
|
|
1460
|
+
* a field. Pass the entire settings object as `null` to clear all fields.
|
|
1461
|
+
*
|
|
1452
1462
|
* @param params - Fields to update (only provided fields are changed)
|
|
1453
1463
|
* @returns Updated store entity
|
|
1454
1464
|
*
|
|
1455
1465
|
* @example
|
|
1466
|
+
* // Update name
|
|
1456
1467
|
* const { store } = await client.stores.update({
|
|
1457
1468
|
* id: "STO_xxx",
|
|
1458
1469
|
* name: "Updated Name",
|
|
1459
1470
|
* });
|
|
1471
|
+
*
|
|
1472
|
+
* @example
|
|
1473
|
+
* // Clear test webhook URL while keeping other webhook settings
|
|
1474
|
+
* const { store } = await client.stores.update({
|
|
1475
|
+
* id: "STO_xxx",
|
|
1476
|
+
* webhookSettings: { testWebhookUrl: null },
|
|
1477
|
+
* });
|
|
1460
1478
|
*/
|
|
1461
1479
|
update(params: UpdateStoreParams): Promise<{
|
|
1462
1480
|
store: Store;
|
package/dist/index.d.ts
CHANGED
|
@@ -304,7 +304,13 @@ interface CreateStoreParams {
|
|
|
304
304
|
/** Store name (slug is auto-generated) */
|
|
305
305
|
name: string;
|
|
306
306
|
}
|
|
307
|
-
/**
|
|
307
|
+
/**
|
|
308
|
+
* Parameters for updating a store.
|
|
309
|
+
*
|
|
310
|
+
* Settings objects support partial updates — omitted sub-fields keep their
|
|
311
|
+
* existing values, `null` clears a field, and a concrete value sets it.
|
|
312
|
+
* Pass the entire settings object as `null` to clear all fields in the group.
|
|
313
|
+
*/
|
|
308
314
|
interface UpdateStoreParams {
|
|
309
315
|
/** Store ID */
|
|
310
316
|
id: string;
|
|
@@ -318,12 +324,12 @@ interface UpdateStoreParams {
|
|
|
318
324
|
supportEmail?: string | null;
|
|
319
325
|
/** Store website URL (set to `null` to remove) */
|
|
320
326
|
website?: string | null;
|
|
321
|
-
/** Webhook configuration
|
|
322
|
-
webhookSettings?: WebhookSettings | null;
|
|
323
|
-
/** Notification preferences (set to `null` to
|
|
324
|
-
notificationSettings?: NotificationSettings | null;
|
|
325
|
-
/** Checkout page theme configuration (set to `null` to
|
|
326
|
-
checkoutSettings?: CheckoutSettings | null;
|
|
327
|
+
/** Webhook configuration (partial update — omitted fields keep existing values, set to `null` to clear all) */
|
|
328
|
+
webhookSettings?: Partial<WebhookSettings> | null;
|
|
329
|
+
/** Notification preferences (partial update — omitted fields keep existing values, set to `null` to clear all) */
|
|
330
|
+
notificationSettings?: Partial<NotificationSettings> | null;
|
|
331
|
+
/** Checkout page theme configuration (partial update — omitted fields keep existing values, set to `null` to clear all) */
|
|
332
|
+
checkoutSettings?: Partial<CheckoutSettings> | null;
|
|
327
333
|
}
|
|
328
334
|
/** Parameters for deleting (soft-delete) a store. */
|
|
329
335
|
interface DeleteStoreParams {
|
|
@@ -1449,14 +1455,26 @@ declare class StoresResource {
|
|
|
1449
1455
|
/**
|
|
1450
1456
|
* Update an existing store's settings.
|
|
1451
1457
|
*
|
|
1458
|
+
* Settings objects (`webhookSettings`, `notificationSettings`, `checkoutSettings`)
|
|
1459
|
+
* support partial updates: omitted sub-fields keep existing values, `null` clears
|
|
1460
|
+
* a field. Pass the entire settings object as `null` to clear all fields.
|
|
1461
|
+
*
|
|
1452
1462
|
* @param params - Fields to update (only provided fields are changed)
|
|
1453
1463
|
* @returns Updated store entity
|
|
1454
1464
|
*
|
|
1455
1465
|
* @example
|
|
1466
|
+
* // Update name
|
|
1456
1467
|
* const { store } = await client.stores.update({
|
|
1457
1468
|
* id: "STO_xxx",
|
|
1458
1469
|
* name: "Updated Name",
|
|
1459
1470
|
* });
|
|
1471
|
+
*
|
|
1472
|
+
* @example
|
|
1473
|
+
* // Clear test webhook URL while keeping other webhook settings
|
|
1474
|
+
* const { store } = await client.stores.update({
|
|
1475
|
+
* id: "STO_xxx",
|
|
1476
|
+
* webhookSettings: { testWebhookUrl: null },
|
|
1477
|
+
* });
|
|
1460
1478
|
*/
|
|
1461
1479
|
update(params: UpdateStoreParams): Promise<{
|
|
1462
1480
|
store: Store;
|
package/dist/index.js
CHANGED
|
@@ -786,14 +786,26 @@ var StoresResource = class {
|
|
|
786
786
|
/**
|
|
787
787
|
* Update an existing store's settings.
|
|
788
788
|
*
|
|
789
|
+
* Settings objects (`webhookSettings`, `notificationSettings`, `checkoutSettings`)
|
|
790
|
+
* support partial updates: omitted sub-fields keep existing values, `null` clears
|
|
791
|
+
* a field. Pass the entire settings object as `null` to clear all fields.
|
|
792
|
+
*
|
|
789
793
|
* @param params - Fields to update (only provided fields are changed)
|
|
790
794
|
* @returns Updated store entity
|
|
791
795
|
*
|
|
792
796
|
* @example
|
|
797
|
+
* // Update name
|
|
793
798
|
* const { store } = await client.stores.update({
|
|
794
799
|
* id: "STO_xxx",
|
|
795
800
|
* name: "Updated Name",
|
|
796
801
|
* });
|
|
802
|
+
*
|
|
803
|
+
* @example
|
|
804
|
+
* // Clear test webhook URL while keeping other webhook settings
|
|
805
|
+
* const { store } = await client.stores.update({
|
|
806
|
+
* id: "STO_xxx",
|
|
807
|
+
* webhookSettings: { testWebhookUrl: null },
|
|
808
|
+
* });
|
|
797
809
|
*/
|
|
798
810
|
async update(params) {
|
|
799
811
|
validateShortId("id", params.id, "STO");
|