@cronvello/shop-sdk 0.2.0 → 0.2.2
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/CONTRACT_SHA256 +1 -1
- package/dist/browser.cjs +17 -4
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +3 -3
- package/dist/browser.d.ts +3 -3
- package/dist/browser.js +17 -4
- package/dist/browser.js.map +1 -1
- package/dist/contract.cjs +15 -2
- package/dist/contract.cjs.map +1 -1
- package/dist/contract.d.cts +1 -1
- package/dist/contract.d.ts +1 -1
- package/dist/contract.js +15 -2
- package/dist/contract.js.map +1 -1
- package/dist/{error-C5_qRXMp.d.cts → error-1WqH-FhJ.d.cts} +2 -2
- package/dist/{error-Do0kyiZ6.d.ts → error-D3Jrcd-j.d.ts} +2 -2
- package/dist/{index-CIpUb0vL.d.cts → index-DC6jGVkP.d.cts} +85 -5
- package/dist/{index-CIpUb0vL.d.ts → index-DC6jGVkP.d.ts} +85 -5
- package/dist/index.cjs +17 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +17 -4
- package/dist/index.js.map +1 -1
- package/dist/openapi.json +193 -3
- package/dist/server.cjs +17 -4
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +3 -3
- package/dist/server.d.ts +3 -3
- package/dist/server.js +17 -4
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -847,7 +847,7 @@ var apiRoutes_b2b = {
|
|
|
847
847
|
meta: {
|
|
848
848
|
tags: ["b2b"],
|
|
849
849
|
summary: "Create B2B dynamic checkout session",
|
|
850
|
-
description: "Creates a Stripe checkout session with dynamic price_data for trusted external apps. Supports mixed carts (one-time + recurring). Auth: Bearer BACKEND_TO_BACKEND_API_KEY.",
|
|
850
|
+
description: "Creates a Stripe checkout session with dynamic price_data for trusted external apps. Supports mixed carts (one-time + recurring). Auth: Bearer BACKEND_TO_BACKEND_API_KEY or App-Scoped API Key.",
|
|
851
851
|
bodyContentType: "application/json",
|
|
852
852
|
validated: { "params": false, "query": false, "body": true }
|
|
853
853
|
},
|
|
@@ -2059,6 +2059,19 @@ var apiRoutes_external_apps = {
|
|
|
2059
2059
|
},
|
|
2060
2060
|
types: null
|
|
2061
2061
|
},
|
|
2062
|
+
"external_apps_service_rotate_key": {
|
|
2063
|
+
method: "POST",
|
|
2064
|
+
path: "/external-apps/service/rotate-key/:appId",
|
|
2065
|
+
auth: { "type": "x_api_key_https" },
|
|
2066
|
+
meta: {
|
|
2067
|
+
tags: ["external-apps"],
|
|
2068
|
+
summary: "Rotate external app api key (B2B zero-downtime)",
|
|
2069
|
+
description: "Rotates the API key of an external app. The previous key remains valid during the specified gracePeriodHours (default: 2h) to prevent downtime during deployments. Authenticated via backend-to-backend API key.",
|
|
2070
|
+
bodyContentType: "application/json",
|
|
2071
|
+
validated: { "params": true, "query": true, "body": true }
|
|
2072
|
+
},
|
|
2073
|
+
types: null
|
|
2074
|
+
},
|
|
2062
2075
|
"external_apps_service_delete": {
|
|
2063
2076
|
method: "DELETE",
|
|
2064
2077
|
path: "/external-apps/service/delete/:appId",
|
|
@@ -2078,7 +2091,7 @@ var apiRoutes_external_apps = {
|
|
|
2078
2091
|
meta: {
|
|
2079
2092
|
tags: ["external-apps"],
|
|
2080
2093
|
summary: "Get external app registration status (B2B)",
|
|
2081
|
-
description: "Returns registration status for an app identified by its string appId. Used by AMP to discover existing connections."
|
|
2094
|
+
description: "Returns registration status for an app identified by its string appId. Used by AMP to discover existing connections. Includes authMethod and, for OAuth apps, the oauth client_id we will present to that app plus a truncated SHA-256 fingerprint of the stored client secret, so the other side can prove a rotation actually landed here. Never the secret itself. Also reports the entitlement paths we have stored, because registration is an upsert: a caller that only wants to hand us new credentials must send these back unchanged, or it silently repoints where we fetch entitlements from."
|
|
2082
2095
|
},
|
|
2083
2096
|
types: null
|
|
2084
2097
|
},
|
|
@@ -5721,10 +5734,10 @@ function createShopClient(options = {}) {
|
|
|
5721
5734
|
}
|
|
5722
5735
|
|
|
5723
5736
|
// src/contract-hash.ts
|
|
5724
|
-
var CONTRACT_SHA256 = "
|
|
5737
|
+
var CONTRACT_SHA256 = "05f34929e71fb2fcb3a4c04707facca22ee46f8960a4cc47ce0a3f1a6df36056";
|
|
5725
5738
|
|
|
5726
5739
|
// src/client/diagnose.ts
|
|
5727
|
-
var SDK_VERSION = "0.2.
|
|
5740
|
+
var SDK_VERSION = "0.2.2" ;
|
|
5728
5741
|
async function resolveBaseUrl(options) {
|
|
5729
5742
|
const provider = options.client?.baseUrl ?? options.baseUrl ?? SHOP_API_URL;
|
|
5730
5743
|
const value = typeof provider === "function" ? await provider() : provider;
|