@porulle/adapter-shopify 0.73.0 → 0.73.1

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/oauth.d.ts CHANGED
@@ -12,8 +12,10 @@ import type { ChannelConnectorError, Result } from "@porulle/core";
12
12
  * - `read_inventory`: variant stock and the inventory item behind a stock webhook.
13
13
  * - `write_orders`: a paid platform order is created in the store (`orderCreate`). A write scope
14
14
  * includes its read scope, which `orders/fulfilled` and `orders/cancelled` need.
15
+ * - `read_returns`, `write_returns`: a shopper's return is asked of the store (`returnRequest`) and
16
+ * its `returns/*` webhooks say how the store answered.
15
17
  */
16
- export declare const REQUIRED_SCOPES: readonly ["read_products", "write_products", "read_inventory", "write_orders"];
18
+ export declare const REQUIRED_SCOPES: readonly ["read_products", "write_products", "read_inventory", "write_orders", "read_returns", "write_returns"];
17
19
  /** Refresh this long before Shopify's stated expiry, so a call never starts on a token about to lapse. */
18
20
  export declare const ACCESS_TOKEN_REFRESH_MARGIN_MS: number;
19
21
  /** What the store row holds. Read back with {@link parseShopifyCredentials}; never cast. */
package/dist/oauth.js CHANGED
@@ -14,8 +14,10 @@ import { z } from "zod";
14
14
  * - `read_inventory`: variant stock and the inventory item behind a stock webhook.
15
15
  * - `write_orders`: a paid platform order is created in the store (`orderCreate`). A write scope
16
16
  * includes its read scope, which `orders/fulfilled` and `orders/cancelled` need.
17
+ * - `read_returns`, `write_returns`: a shopper's return is asked of the store (`returnRequest`) and
18
+ * its `returns/*` webhooks say how the store answered.
17
19
  */
18
- export const REQUIRED_SCOPES = ["read_products", "write_products", "read_inventory", "write_orders"];
20
+ export const REQUIRED_SCOPES = ["read_products", "write_products", "read_inventory", "write_orders", "read_returns", "write_returns"];
19
21
  /** Refresh this long before Shopify's stated expiry, so a call never starts on a token about to lapse. */
20
22
  export const ACCESS_TOKEN_REFRESH_MARGIN_MS = 5 * 60 * 1000;
21
23
  const credentialsSchema = z.object({