@astrasyncai/verification-gateway 5.20.0 → 5.21.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.
Files changed (95) hide show
  1. package/CHANGELOG.md +62 -3
  2. package/README.md +2 -2
  3. package/dist/adapters/express.d.mts +1 -1
  4. package/dist/adapters/express.d.ts +1 -1
  5. package/dist/adapters/express.js +1 -1
  6. package/dist/adapters/express.js.map +1 -1
  7. package/dist/adapters/express.mjs +1 -1
  8. package/dist/adapters/express.mjs.map +1 -1
  9. package/dist/adapters/mcp.d.mts +1 -1
  10. package/dist/adapters/mcp.d.ts +1 -1
  11. package/dist/adapters/mcp.js +1 -1
  12. package/dist/adapters/mcp.js.map +1 -1
  13. package/dist/adapters/mcp.mjs +1 -1
  14. package/dist/adapters/mcp.mjs.map +1 -1
  15. package/dist/adapters/nextjs.d.mts +1 -1
  16. package/dist/adapters/nextjs.d.ts +1 -1
  17. package/dist/adapters/nextjs.js +1 -1
  18. package/dist/adapters/nextjs.js.map +1 -1
  19. package/dist/adapters/nextjs.mjs +1 -1
  20. package/dist/adapters/nextjs.mjs.map +1 -1
  21. package/dist/adapters/sdk.d.mts +8 -31
  22. package/dist/adapters/sdk.d.ts +8 -31
  23. package/dist/adapters/sdk.js +8 -22
  24. package/dist/adapters/sdk.js.map +1 -1
  25. package/dist/adapters/sdk.mjs +8 -22
  26. package/dist/adapters/sdk.mjs.map +1 -1
  27. package/dist/agent/index.js +1 -1
  28. package/dist/agent/index.js.map +1 -1
  29. package/dist/agent/index.mjs +1 -1
  30. package/dist/agent/index.mjs.map +1 -1
  31. package/dist/bin/astrasync-claude-hook.js +2 -2
  32. package/dist/bin/astrasync-codex-hook.js +2 -2
  33. package/dist/bin/astrasync-guard.js +2 -2
  34. package/dist/bin/astrasync.js +15 -2
  35. package/dist/browser/background.js +2 -2
  36. package/dist/browser/background.js.map +1 -1
  37. package/dist/browser/background.mjs +2 -2
  38. package/dist/browser/background.mjs.map +1 -1
  39. package/dist/cli/index.js +1 -1
  40. package/dist/cli/index.js.map +1 -1
  41. package/dist/cli/index.mjs +1 -1
  42. package/dist/cli/index.mjs.map +1 -1
  43. package/dist/codex/index.js +2 -2
  44. package/dist/codex/index.js.map +1 -1
  45. package/dist/codex/index.mjs +2 -2
  46. package/dist/codex/index.mjs.map +1 -1
  47. package/dist/cursor/extension.js +2 -2
  48. package/dist/cursor/extension.js.map +1 -1
  49. package/dist/cursor/extension.mjs +2 -2
  50. package/dist/cursor/extension.mjs.map +1 -1
  51. package/dist/edge-config.d.mts +1 -1
  52. package/dist/edge-config.d.ts +1 -1
  53. package/dist/edge-config.js +1 -1
  54. package/dist/edge-config.js.map +1 -1
  55. package/dist/edge-config.mjs +1 -1
  56. package/dist/edge-config.mjs.map +1 -1
  57. package/dist/edge-core/index.d.mts +1 -1
  58. package/dist/edge-core/index.d.ts +1 -1
  59. package/dist/edge-core/index.js +1 -1
  60. package/dist/edge-core/index.js.map +1 -1
  61. package/dist/edge-core/index.mjs +1 -1
  62. package/dist/edge-core/index.mjs.map +1 -1
  63. package/dist/gateway/gateway.js +2 -2
  64. package/dist/gateway/gateway.js.map +1 -1
  65. package/dist/gateway/gateway.mjs +2 -2
  66. package/dist/gateway/gateway.mjs.map +1 -1
  67. package/dist/git-trigger/git-hooks.d.mts +1 -1
  68. package/dist/git-trigger/git-hooks.d.ts +1 -1
  69. package/dist/index.d.mts +156 -34
  70. package/dist/index.d.ts +156 -34
  71. package/dist/index.js +327 -40
  72. package/dist/index.js.map +1 -1
  73. package/dist/index.mjs +319 -40
  74. package/dist/index.mjs.map +1 -1
  75. package/dist/registration/index.js +1 -1
  76. package/dist/registration/index.js.map +1 -1
  77. package/dist/registration/index.mjs +1 -1
  78. package/dist/registration/index.mjs.map +1 -1
  79. package/dist/transport/index.js +1 -1
  80. package/dist/transport/index.js.map +1 -1
  81. package/dist/transport/index.mjs +1 -1
  82. package/dist/transport/index.mjs.map +1 -1
  83. package/dist/{types-D37aSQ9c.d.mts → types-B4zhOAlq.d.mts} +5 -0
  84. package/dist/{types-Dn8tXnei.d.ts → types-CtBXnWuV.d.ts} +5 -0
  85. package/dist/{types-CxjqmPl-.d.mts → types-DHHyXtuZ.d.mts} +5 -0
  86. package/dist/{types-CxjqmPl-.d.ts → types-DHHyXtuZ.d.ts} +5 -0
  87. package/dist/ui/index.d.mts +1 -1
  88. package/dist/ui/index.d.ts +1 -1
  89. package/dist/verify.d.mts +1 -1
  90. package/dist/verify.d.ts +1 -1
  91. package/dist/verify.js +1 -1
  92. package/dist/verify.js.map +1 -1
  93. package/dist/verify.mjs +1 -1
  94. package/dist/verify.mjs.map +1 -1
  95. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { T as TrustLevel, S as SDKOptions, e as VerificationResult, d as VerificationRequest, A as AgentArtifacts, C as CheckoutMetadata } from '../types-CxjqmPl-.mjs';
1
+ import { T as TrustLevel, S as SDKOptions, e as VerificationResult, d as VerificationRequest, A as AgentArtifacts, C as CheckoutMetadata } from '../types-DHHyXtuZ.mjs';
2
2
 
3
3
  /**
4
4
  * AstraSync Universal Verification Gateway — Trust Level helpers.
@@ -199,38 +199,23 @@ declare class VerificationGatewayClient {
199
199
  status: string;
200
200
  alreadySettled?: boolean;
201
201
  }>;
202
- /**
203
- * 5.20.0 (round 29.1): change an endpoint's OPERATIONAL URLs with this
204
- * client's API key — `PATCH /api/endpoints/:id`. Accepts the key of the
205
- * endpoint's owner, or a personal key of an individual with an active seat
206
- * in the owning organisation. Policy (rules, trust floor, challenge, edge
207
- * config) stays dashboard-only. `null` clears a field. The owner is alerted
208
- * when `eventsUrl` changes.
209
- *
210
- * @param endpointId the ASTRAE id (defaults to the client's `counterpartyId`)
211
- * @returns the endpoint as stored, plus `changed` (the fields that changed)
212
- * @throws AstraSyncError — 400 `UNKNOWN_FIELDS` / validation, 401/403, 404
213
- */
214
- updateEndpoint(endpointId: string | undefined, patch: EndpointOperationalPatch): Promise<Record<string, unknown> & {
215
- changed: Array<keyof EndpointOperationalPatch>;
216
- }>;
217
202
  /**
218
203
  * 5.20.0 (round 29.1): ask AstraSync to send ONE signed step-up event to the
219
204
  * endpoint's Events URL now — `POST /api/endpoints/:id/events/test`.
220
205
  * Delivered synchronously, outside the event outbox (random `eventId`, no
221
206
  * retries), signed with the endpoint's webhook secret like a real event.
222
- * Without `approvalId` the payload is synthetic (a kit acknowledges and
223
- * ignores it). With the id of a held kit approval at this endpoint the
224
- * payload is the real one, so your resume path runs: `approved` makes the
225
- * kit re-confirm (held again — nothing is charged); `denied` / `expired` /
226
- * `lapsed` release the session.
207
+ * The payload is synthetic (`approvalId: "test_…"`); a kit acknowledges and
208
+ * ignores it.
209
+ *
210
+ * 5.21.0 (shops' item 48): synthetic only. Sending a real held approval's
211
+ * payload (which releases or re-drives that checkout) is dashboard-only, so
212
+ * a leaked API key can't do it.
227
213
  *
228
214
  * Resolves even when your endpoint refused the event (`delivered: false`,
229
215
  * with `responseCode` / `error`).
230
216
  */
231
217
  sendTestEvent(endpointId: string | undefined, options: {
232
218
  type: TestEventType;
233
- approvalId?: string;
234
219
  }): Promise<TestEventResult>;
235
220
  private endpointCall;
236
221
  /**
@@ -272,14 +257,6 @@ declare class VerificationGatewayClient {
272
257
  */
273
258
  private executeWithRetry;
274
259
  }
275
- /** 5.20.0: the operational fields `updateEndpoint` may change (`null` clears). */
276
- interface EndpointOperationalPatch {
277
- eventsUrl?: string | null;
278
- healthCheckUrl?: string | null;
279
- skillUrl?: string | null;
280
- catalogUrl?: string | null;
281
- checkoutUrl?: string | null;
282
- }
283
260
  /** 5.20.0: the step-up event types `sendTestEvent` can send. */
284
261
  type TestEventType = 'step_up.approved' | 'step_up.denied' | 'step_up.expired' | 'step_up.lapsed';
285
262
  /** 5.20.0: what `sendTestEvent` reports. */
@@ -309,4 +286,4 @@ declare function verifyOnce(options: SDKOptions & {
309
286
  action?: string;
310
287
  }): Promise<VerificationResult>;
311
288
 
312
- export { type EndpointOperationalPatch, type TestEventResult, type TestEventType, VerificationGatewayClient, createClient, getTrustLevel, verifyOnce };
289
+ export { type TestEventResult, type TestEventType, VerificationGatewayClient, createClient, getTrustLevel, verifyOnce };
@@ -1,4 +1,4 @@
1
- import { T as TrustLevel, S as SDKOptions, e as VerificationResult, d as VerificationRequest, A as AgentArtifacts, C as CheckoutMetadata } from '../types-CxjqmPl-.js';
1
+ import { T as TrustLevel, S as SDKOptions, e as VerificationResult, d as VerificationRequest, A as AgentArtifacts, C as CheckoutMetadata } from '../types-DHHyXtuZ.js';
2
2
 
3
3
  /**
4
4
  * AstraSync Universal Verification Gateway — Trust Level helpers.
@@ -199,38 +199,23 @@ declare class VerificationGatewayClient {
199
199
  status: string;
200
200
  alreadySettled?: boolean;
201
201
  }>;
202
- /**
203
- * 5.20.0 (round 29.1): change an endpoint's OPERATIONAL URLs with this
204
- * client's API key — `PATCH /api/endpoints/:id`. Accepts the key of the
205
- * endpoint's owner, or a personal key of an individual with an active seat
206
- * in the owning organisation. Policy (rules, trust floor, challenge, edge
207
- * config) stays dashboard-only. `null` clears a field. The owner is alerted
208
- * when `eventsUrl` changes.
209
- *
210
- * @param endpointId the ASTRAE id (defaults to the client's `counterpartyId`)
211
- * @returns the endpoint as stored, plus `changed` (the fields that changed)
212
- * @throws AstraSyncError — 400 `UNKNOWN_FIELDS` / validation, 401/403, 404
213
- */
214
- updateEndpoint(endpointId: string | undefined, patch: EndpointOperationalPatch): Promise<Record<string, unknown> & {
215
- changed: Array<keyof EndpointOperationalPatch>;
216
- }>;
217
202
  /**
218
203
  * 5.20.0 (round 29.1): ask AstraSync to send ONE signed step-up event to the
219
204
  * endpoint's Events URL now — `POST /api/endpoints/:id/events/test`.
220
205
  * Delivered synchronously, outside the event outbox (random `eventId`, no
221
206
  * retries), signed with the endpoint's webhook secret like a real event.
222
- * Without `approvalId` the payload is synthetic (a kit acknowledges and
223
- * ignores it). With the id of a held kit approval at this endpoint the
224
- * payload is the real one, so your resume path runs: `approved` makes the
225
- * kit re-confirm (held again — nothing is charged); `denied` / `expired` /
226
- * `lapsed` release the session.
207
+ * The payload is synthetic (`approvalId: "test_…"`); a kit acknowledges and
208
+ * ignores it.
209
+ *
210
+ * 5.21.0 (shops' item 48): synthetic only. Sending a real held approval's
211
+ * payload (which releases or re-drives that checkout) is dashboard-only, so
212
+ * a leaked API key can't do it.
227
213
  *
228
214
  * Resolves even when your endpoint refused the event (`delivered: false`,
229
215
  * with `responseCode` / `error`).
230
216
  */
231
217
  sendTestEvent(endpointId: string | undefined, options: {
232
218
  type: TestEventType;
233
- approvalId?: string;
234
219
  }): Promise<TestEventResult>;
235
220
  private endpointCall;
236
221
  /**
@@ -272,14 +257,6 @@ declare class VerificationGatewayClient {
272
257
  */
273
258
  private executeWithRetry;
274
259
  }
275
- /** 5.20.0: the operational fields `updateEndpoint` may change (`null` clears). */
276
- interface EndpointOperationalPatch {
277
- eventsUrl?: string | null;
278
- healthCheckUrl?: string | null;
279
- skillUrl?: string | null;
280
- catalogUrl?: string | null;
281
- checkoutUrl?: string | null;
282
- }
283
260
  /** 5.20.0: the step-up event types `sendTestEvent` can send. */
284
261
  type TestEventType = 'step_up.approved' | 'step_up.denied' | 'step_up.expired' | 'step_up.lapsed';
285
262
  /** 5.20.0: what `sendTestEvent` reports. */
@@ -309,4 +286,4 @@ declare function verifyOnce(options: SDKOptions & {
309
286
  action?: string;
310
287
  }): Promise<VerificationResult>;
311
288
 
312
- export { type EndpointOperationalPatch, type TestEventResult, type TestEventType, VerificationGatewayClient, createClient, getTrustLevel, verifyOnce };
289
+ export { type TestEventResult, type TestEventType, VerificationGatewayClient, createClient, getTrustLevel, verifyOnce };
@@ -28,7 +28,7 @@ __export(sdk_exports, {
28
28
  module.exports = __toCommonJS(sdk_exports);
29
29
 
30
30
  // src/version.ts
31
- var SDK_VERSION = "5.20.0";
31
+ var SDK_VERSION = "5.21.1";
32
32
 
33
33
  // src/http.ts
34
34
  var SDK_USER_AGENT = `astrasync-sdk/${SDK_VERSION}`;
@@ -1027,37 +1027,23 @@ var VerificationGatewayClient = class {
1027
1027
  }
1028
1028
  return json.data;
1029
1029
  }
1030
- /**
1031
- * 5.20.0 (round 29.1): change an endpoint's OPERATIONAL URLs with this
1032
- * client's API key — `PATCH /api/endpoints/:id`. Accepts the key of the
1033
- * endpoint's owner, or a personal key of an individual with an active seat
1034
- * in the owning organisation. Policy (rules, trust floor, challenge, edge
1035
- * config) stays dashboard-only. `null` clears a field. The owner is alerted
1036
- * when `eventsUrl` changes.
1037
- *
1038
- * @param endpointId the ASTRAE id (defaults to the client's `counterpartyId`)
1039
- * @returns the endpoint as stored, plus `changed` (the fields that changed)
1040
- * @throws AstraSyncError — 400 `UNKNOWN_FIELDS` / validation, 401/403, 404
1041
- */
1042
- async updateEndpoint(endpointId, patch) {
1043
- return this.endpointCall("PATCH", endpointId, "", patch);
1044
- }
1045
1030
  /**
1046
1031
  * 5.20.0 (round 29.1): ask AstraSync to send ONE signed step-up event to the
1047
1032
  * endpoint's Events URL now — `POST /api/endpoints/:id/events/test`.
1048
1033
  * Delivered synchronously, outside the event outbox (random `eventId`, no
1049
1034
  * retries), signed with the endpoint's webhook secret like a real event.
1050
- * Without `approvalId` the payload is synthetic (a kit acknowledges and
1051
- * ignores it). With the id of a held kit approval at this endpoint the
1052
- * payload is the real one, so your resume path runs: `approved` makes the
1053
- * kit re-confirm (held again — nothing is charged); `denied` / `expired` /
1054
- * `lapsed` release the session.
1035
+ * The payload is synthetic (`approvalId: "test_…"`); a kit acknowledges and
1036
+ * ignores it.
1037
+ *
1038
+ * 5.21.0 (shops' item 48): synthetic only. Sending a real held approval's
1039
+ * payload (which releases or re-drives that checkout) is dashboard-only, so
1040
+ * a leaked API key can't do it.
1055
1041
  *
1056
1042
  * Resolves even when your endpoint refused the event (`delivered: false`,
1057
1043
  * with `responseCode` / `error`).
1058
1044
  */
1059
1045
  async sendTestEvent(endpointId, options) {
1060
- return this.endpointCall("POST", endpointId, "/events/test", options);
1046
+ return this.endpointCall("POST", endpointId, "/events/test", { type: options.type });
1061
1047
  }
1062
1048
  async endpointCall(method, endpointId, suffix, body) {
1063
1049
  const id = endpointId ?? this.config.counterpartyId;