@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.
@@ -1,4 +1,4 @@
1
- import { Mb as apiRoutes } from './index-DC6jGVkP.js';
1
+ import { Mb as apiRoutes } from './index-CcbN4xcE.js';
2
2
 
3
3
  type ShopRouteKey = keyof typeof apiRoutes;
4
4
  type ShopRoute<K extends ShopRouteKey> = (typeof apiRoutes)[K];
@@ -104,7 +104,7 @@ type ShopDiagnoseOptions = {
104
104
  */
105
105
  declare function diagnoseShop(options?: ShopDiagnoseOptions): Promise<ShopDiagnosis>;
106
106
 
107
- declare const CONTRACT_SHA256 = "05f34929e71fb2fcb3a4c04707facca22ee46f8960a4cc47ce0a3f1a6df36056";
107
+ declare const CONTRACT_SHA256 = "32f132210ee188c28a330c9db5c6db6eaf5b7c3a65ecc041e029aca6e1335a60";
108
108
 
109
109
  type ShopErrorDetails = {
110
110
  status: number;
@@ -1,4 +1,4 @@
1
- import { Mb as apiRoutes } from './index-DC6jGVkP.cjs';
1
+ import { Mb as apiRoutes } from './index-CcbN4xcE.cjs';
2
2
 
3
3
  type ShopRouteKey = keyof typeof apiRoutes;
4
4
  type ShopRoute<K extends ShopRouteKey> = (typeof apiRoutes)[K];
@@ -104,7 +104,7 @@ type ShopDiagnoseOptions = {
104
104
  */
105
105
  declare function diagnoseShop(options?: ShopDiagnoseOptions): Promise<ShopDiagnosis>;
106
106
 
107
- declare const CONTRACT_SHA256 = "05f34929e71fb2fcb3a4c04707facca22ee46f8960a4cc47ce0a3f1a6df36056";
107
+ declare const CONTRACT_SHA256 = "32f132210ee188c28a330c9db5c6db6eaf5b7c3a65ecc041e029aca6e1335a60";
108
108
 
109
109
  type ShopErrorDetails = {
110
110
  status: number;
@@ -8351,6 +8351,12 @@ type ExternalAppsServiceStatusResponseData = {
8351
8351
  authMethod: string | null;
8352
8352
  oauthClientId: string | null;
8353
8353
  oauthClientSecretFingerprint: string | null;
8354
+ credentialFingerprints: Array<{
8355
+ role: "api_key" | "previous_api_key" | "public_api_key" | "oauth_client_secret";
8356
+ fingerprint: string;
8357
+ current: boolean;
8358
+ expiresAt?: string | any | null;
8359
+ }>;
8354
8360
  entitlementPath: string | null;
8355
8361
  usageOveragePath: string | null;
8356
8362
  };
@@ -8687,7 +8693,7 @@ declare const apiRoutes_external_apps: {
8687
8693
  readonly meta: {
8688
8694
  readonly tags: readonly ["external-apps"];
8689
8695
  readonly summary: "Get external app registration status (B2B)";
8690
- readonly 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.";
8696
+ readonly 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.";
8691
8697
  };
8692
8698
  readonly types: {
8693
8699
  params: ExternalAppsServiceStatusParams;
@@ -25488,7 +25494,7 @@ declare const apiRoutes: {
25488
25494
  readonly meta: {
25489
25495
  readonly tags: readonly ["external-apps"];
25490
25496
  readonly summary: "Get external app registration status (B2B)";
25491
- readonly 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.";
25497
+ readonly 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.";
25492
25498
  };
25493
25499
  readonly types: {
25494
25500
  params: ExternalAppsServiceStatusParams;
@@ -8351,6 +8351,12 @@ type ExternalAppsServiceStatusResponseData = {
8351
8351
  authMethod: string | null;
8352
8352
  oauthClientId: string | null;
8353
8353
  oauthClientSecretFingerprint: string | null;
8354
+ credentialFingerprints: Array<{
8355
+ role: "api_key" | "previous_api_key" | "public_api_key" | "oauth_client_secret";
8356
+ fingerprint: string;
8357
+ current: boolean;
8358
+ expiresAt?: string | any | null;
8359
+ }>;
8354
8360
  entitlementPath: string | null;
8355
8361
  usageOveragePath: string | null;
8356
8362
  };
@@ -8687,7 +8693,7 @@ declare const apiRoutes_external_apps: {
8687
8693
  readonly meta: {
8688
8694
  readonly tags: readonly ["external-apps"];
8689
8695
  readonly summary: "Get external app registration status (B2B)";
8690
- readonly 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.";
8696
+ readonly 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.";
8691
8697
  };
8692
8698
  readonly types: {
8693
8699
  params: ExternalAppsServiceStatusParams;
@@ -25488,7 +25494,7 @@ declare const apiRoutes: {
25488
25494
  readonly meta: {
25489
25495
  readonly tags: readonly ["external-apps"];
25490
25496
  readonly summary: "Get external app registration status (B2B)";
25491
- readonly 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.";
25497
+ readonly 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.";
25492
25498
  };
25493
25499
  readonly types: {
25494
25500
  params: ExternalAppsServiceStatusParams;
package/dist/index.cjs CHANGED
@@ -2091,7 +2091,7 @@ var apiRoutes_external_apps = {
2091
2091
  meta: {
2092
2092
  tags: ["external-apps"],
2093
2093
  summary: "Get external app registration status (B2B)",
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."
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."
2095
2095
  },
2096
2096
  types: null
2097
2097
  },
@@ -5734,10 +5734,10 @@ function createShopClient(options = {}) {
5734
5734
  }
5735
5735
 
5736
5736
  // src/contract-hash.ts
5737
- var CONTRACT_SHA256 = "05f34929e71fb2fcb3a4c04707facca22ee46f8960a4cc47ce0a3f1a6df36056";
5737
+ var CONTRACT_SHA256 = "32f132210ee188c28a330c9db5c6db6eaf5b7c3a65ecc041e029aca6e1335a60";
5738
5738
 
5739
5739
  // src/client/diagnose.ts
5740
- var SDK_VERSION = "0.2.2" ;
5740
+ var SDK_VERSION = "0.2.3" ;
5741
5741
  async function resolveBaseUrl(options) {
5742
5742
  const provider = options.client?.baseUrl ?? options.baseUrl ?? SHOP_API_URL;
5743
5743
  const value = typeof provider === "function" ? await provider() : provider;