@cronvello/shop-sdk 0.2.0 → 0.2.3

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/contract.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. `credentialFingerprints` lists one such fingerprint per credential we hold for that app (api_key, previous_api_key during a rotation grace period, public_api_key, oauth_client_secret). It lets the caller locate the value in the app's runtime environment by equality instead of guessing a variable name - the name differs per app, the value does not. 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
  },