@cronvello/shop-sdk 0.2.2 → 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/openapi.json CHANGED
@@ -30883,7 +30883,7 @@
30883
30883
  "external-apps"
30884
30884
  ],
30885
30885
  "summary": "Get external app registration status (B2B)",
30886
- "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.",
30886
+ "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.",
30887
30887
  "responses": {
30888
30888
  "200": {
30889
30889
  "description": "JSON response",
@@ -30969,6 +30969,50 @@
30969
30969
  }
30970
30970
  ]
30971
30971
  },
30972
+ "credentialFingerprints": {
30973
+ "type": "array",
30974
+ "items": {
30975
+ "type": "object",
30976
+ "properties": {
30977
+ "role": {
30978
+ "type": "string",
30979
+ "enum": [
30980
+ "api_key",
30981
+ "previous_api_key",
30982
+ "public_api_key",
30983
+ "oauth_client_secret"
30984
+ ]
30985
+ },
30986
+ "fingerprint": {
30987
+ "type": "string"
30988
+ },
30989
+ "current": {
30990
+ "type": "boolean"
30991
+ },
30992
+ "expiresAt": {
30993
+ "anyOf": [
30994
+ {
30995
+ "anyOf": [
30996
+ {
30997
+ "type": "string"
30998
+ },
30999
+ {}
31000
+ ]
31001
+ },
31002
+ {
31003
+ "type": "null"
31004
+ }
31005
+ ]
31006
+ }
31007
+ },
31008
+ "required": [
31009
+ "role",
31010
+ "fingerprint",
31011
+ "current"
31012
+ ],
31013
+ "additionalProperties": false
31014
+ }
31015
+ },
30972
31016
  "entitlementPath": {
30973
31017
  "anyOf": [
30974
31018
  {
@@ -30999,6 +31043,7 @@
30999
31043
  "authMethod",
31000
31044
  "oauthClientId",
31001
31045
  "oauthClientSecretFingerprint",
31046
+ "credentialFingerprints",
31002
31047
  "entitlementPath",
31003
31048
  "usageOveragePath"
31004
31049
  ],
package/dist/server.cjs CHANGED
@@ -1742,7 +1742,7 @@ var apiRoutes_external_apps = {
1742
1742
  meta: {
1743
1743
  tags: ["external-apps"],
1744
1744
  summary: "Get external app registration status (B2B)",
1745
- 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."
1745
+ 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."
1746
1746
  },
1747
1747
  types: null
1748
1748
  },
@@ -5385,10 +5385,10 @@ function createShopClient(options = {}) {
5385
5385
  }
5386
5386
 
5387
5387
  // src/contract-hash.ts
5388
- var CONTRACT_SHA256 = "05f34929e71fb2fcb3a4c04707facca22ee46f8960a4cc47ce0a3f1a6df36056";
5388
+ var CONTRACT_SHA256 = "32f132210ee188c28a330c9db5c6db6eaf5b7c3a65ecc041e029aca6e1335a60";
5389
5389
 
5390
5390
  // src/client/diagnose.ts
5391
- var SDK_VERSION = "0.2.2" ;
5391
+ var SDK_VERSION = "0.2.3" ;
5392
5392
  async function resolveBaseUrl(options) {
5393
5393
  const provider = options.client?.baseUrl ?? options.baseUrl ?? SHOP_API_URL;
5394
5394
  const value = typeof provider === "function" ? await provider() : provider;