@layervai/qurl 3.1.0 → 4.0.0

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 (152) hide show
  1. package/README.md +259 -46
  2. package/dist/cjs/client-connectors.d.ts +44 -0
  3. package/dist/cjs/client-connectors.js +189 -0
  4. package/dist/cjs/client-delegated.d.ts +30 -0
  5. package/dist/cjs/client-delegated.js +312 -0
  6. package/dist/cjs/client-errors.d.ts +44 -0
  7. package/dist/cjs/client-errors.js +219 -0
  8. package/dist/cjs/client-http-types.d.ts +37 -0
  9. package/dist/cjs/client-http-types.js +2 -0
  10. package/dist/cjs/client-input-fields.d.ts +53 -0
  11. package/dist/cjs/client-input-fields.js +262 -0
  12. package/dist/cjs/client-limits.d.ts +36 -0
  13. package/dist/cjs/client-limits.js +61 -0
  14. package/dist/cjs/client-management.d.ts +12 -0
  15. package/dist/cjs/client-management.js +119 -0
  16. package/dist/cjs/client-paths.d.ts +21 -0
  17. package/dist/cjs/client-paths.js +143 -0
  18. package/dist/cjs/client-portals.d.ts +82 -0
  19. package/dist/cjs/client-portals.js +244 -0
  20. package/dist/cjs/client-resources.d.ts +29 -0
  21. package/dist/cjs/client-resources.js +331 -0
  22. package/dist/cjs/client-validation.d.ts +35 -0
  23. package/dist/cjs/client-validation.js +326 -0
  24. package/dist/cjs/client.d.ts +45 -75
  25. package/dist/cjs/client.js +621 -2448
  26. package/dist/cjs/errors.d.ts +9 -1
  27. package/dist/cjs/errors.js +10 -1
  28. package/dist/cjs/index.d.ts +4 -2
  29. package/dist/cjs/index.js +4 -1
  30. package/dist/cjs/response-metadata.d.ts +13 -0
  31. package/dist/cjs/response-metadata.js +38 -0
  32. package/dist/cjs/share.js +2 -0
  33. package/dist/cjs/target-path.d.ts +2 -0
  34. package/dist/cjs/target-path.js +34 -0
  35. package/dist/cjs/types.d.ts +83 -7
  36. package/dist/cjs/version.d.ts +1 -1
  37. package/dist/cjs/version.js +1 -1
  38. package/dist/esm/client-connectors.d.ts +44 -0
  39. package/dist/esm/client-connectors.js +180 -0
  40. package/dist/esm/client-delegated.d.ts +30 -0
  41. package/dist/esm/client-delegated.js +295 -0
  42. package/dist/esm/client-errors.d.ts +44 -0
  43. package/dist/esm/client-errors.js +206 -0
  44. package/dist/esm/client-http-types.d.ts +37 -0
  45. package/dist/esm/client-http-types.js +1 -0
  46. package/dist/esm/client-input-fields.d.ts +53 -0
  47. package/dist/esm/client-input-fields.js +258 -0
  48. package/dist/esm/client-limits.d.ts +36 -0
  49. package/dist/esm/client-limits.js +58 -0
  50. package/dist/esm/client-management.d.ts +12 -0
  51. package/dist/esm/client-management.js +113 -0
  52. package/dist/esm/client-paths.d.ts +21 -0
  53. package/dist/esm/client-paths.js +138 -0
  54. package/dist/esm/client-portals.d.ts +82 -0
  55. package/dist/esm/client-portals.js +236 -0
  56. package/dist/esm/client-resources.d.ts +29 -0
  57. package/dist/esm/client-resources.js +323 -0
  58. package/dist/esm/client-validation.d.ts +35 -0
  59. package/dist/esm/client-validation.js +302 -0
  60. package/dist/esm/client.d.ts +45 -76
  61. package/dist/esm/client.js +318 -2147
  62. package/dist/esm/crid.d.ts +0 -1
  63. package/dist/esm/crid.js +0 -1
  64. package/dist/esm/errors.d.ts +9 -2
  65. package/dist/esm/errors.js +9 -1
  66. package/dist/esm/index.d.ts +4 -3
  67. package/dist/esm/index.js +2 -2
  68. package/dist/esm/internal.d.ts +0 -1
  69. package/dist/esm/internal.js +0 -1
  70. package/dist/esm/node/agent-runtime.d.ts +0 -1
  71. package/dist/esm/node/agent-runtime.js +0 -1
  72. package/dist/esm/node/agent-state.d.ts +0 -1
  73. package/dist/esm/node/agent-state.js +0 -1
  74. package/dist/esm/node/agent-transport.d.ts +0 -1
  75. package/dist/esm/node/agent-transport.js +0 -1
  76. package/dist/esm/node/deployment.d.ts +0 -1
  77. package/dist/esm/node/deployment.js +0 -1
  78. package/dist/esm/node/file-agent-state.d.ts +0 -1
  79. package/dist/esm/node/file-agent-state.js +0 -1
  80. package/dist/esm/node/native-udp.d.ts +0 -1
  81. package/dist/esm/node/native-udp.js +0 -1
  82. package/dist/esm/node/nhp-wire.d.ts +0 -1
  83. package/dist/esm/node/nhp-wire.js +0 -1
  84. package/dist/esm/node/portal-opener.d.ts +0 -1
  85. package/dist/esm/node/portal-opener.js +0 -1
  86. package/dist/esm/node/provider.d.ts +0 -1
  87. package/dist/esm/node/provider.js +0 -1
  88. package/dist/esm/node/qv2.d.ts +0 -1
  89. package/dist/esm/node/qv2.js +0 -1
  90. package/dist/esm/node/relay.d.ts +0 -1
  91. package/dist/esm/node/relay.js +0 -1
  92. package/dist/esm/node/sealed-agent-state.d.ts +0 -1
  93. package/dist/esm/node/sealed-agent-state.js +0 -1
  94. package/dist/esm/node/strict-json.d.ts +0 -1
  95. package/dist/esm/node/strict-json.js +0 -1
  96. package/dist/esm/node.d.ts +0 -1
  97. package/dist/esm/node.js +0 -1
  98. package/dist/esm/response-metadata.d.ts +13 -0
  99. package/dist/esm/response-metadata.js +33 -0
  100. package/dist/esm/share.d.ts +0 -1
  101. package/dist/esm/share.js +2 -1
  102. package/dist/esm/target-path.d.ts +2 -0
  103. package/dist/esm/target-path.js +30 -0
  104. package/dist/esm/types.d.ts +83 -8
  105. package/dist/esm/types.js +0 -1
  106. package/dist/esm/version.d.ts +1 -2
  107. package/dist/esm/version.js +1 -2
  108. package/package.json +9 -7
  109. package/dist/esm/client.d.ts.map +0 -1
  110. package/dist/esm/client.js.map +0 -1
  111. package/dist/esm/crid.d.ts.map +0 -1
  112. package/dist/esm/crid.js.map +0 -1
  113. package/dist/esm/errors.d.ts.map +0 -1
  114. package/dist/esm/errors.js.map +0 -1
  115. package/dist/esm/index.d.ts.map +0 -1
  116. package/dist/esm/index.js.map +0 -1
  117. package/dist/esm/internal.d.ts.map +0 -1
  118. package/dist/esm/internal.js.map +0 -1
  119. package/dist/esm/node/agent-runtime.d.ts.map +0 -1
  120. package/dist/esm/node/agent-runtime.js.map +0 -1
  121. package/dist/esm/node/agent-state.d.ts.map +0 -1
  122. package/dist/esm/node/agent-state.js.map +0 -1
  123. package/dist/esm/node/agent-transport.d.ts.map +0 -1
  124. package/dist/esm/node/agent-transport.js.map +0 -1
  125. package/dist/esm/node/deployment.d.ts.map +0 -1
  126. package/dist/esm/node/deployment.js.map +0 -1
  127. package/dist/esm/node/file-agent-state.d.ts.map +0 -1
  128. package/dist/esm/node/file-agent-state.js.map +0 -1
  129. package/dist/esm/node/native-udp.d.ts.map +0 -1
  130. package/dist/esm/node/native-udp.js.map +0 -1
  131. package/dist/esm/node/nhp-wire.d.ts.map +0 -1
  132. package/dist/esm/node/nhp-wire.js.map +0 -1
  133. package/dist/esm/node/portal-opener.d.ts.map +0 -1
  134. package/dist/esm/node/portal-opener.js.map +0 -1
  135. package/dist/esm/node/provider.d.ts.map +0 -1
  136. package/dist/esm/node/provider.js.map +0 -1
  137. package/dist/esm/node/qv2.d.ts.map +0 -1
  138. package/dist/esm/node/qv2.js.map +0 -1
  139. package/dist/esm/node/relay.d.ts.map +0 -1
  140. package/dist/esm/node/relay.js.map +0 -1
  141. package/dist/esm/node/sealed-agent-state.d.ts.map +0 -1
  142. package/dist/esm/node/sealed-agent-state.js.map +0 -1
  143. package/dist/esm/node/strict-json.d.ts.map +0 -1
  144. package/dist/esm/node/strict-json.js.map +0 -1
  145. package/dist/esm/node.d.ts.map +0 -1
  146. package/dist/esm/node.js.map +0 -1
  147. package/dist/esm/share.d.ts.map +0 -1
  148. package/dist/esm/share.js.map +0 -1
  149. package/dist/esm/types.d.ts.map +0 -1
  150. package/dist/esm/types.js.map +0 -1
  151. package/dist/esm/version.d.ts.map +0 -1
  152. package/dist/esm/version.js.map +0 -1
@@ -1,4 +1,3 @@
1
1
  export declare const CRID_DOMAIN = "NHP-QURL-CRID-V1\0";
2
2
  export declare function parseCrid(value: unknown, knownVersionOnly?: boolean): Uint8Array | undefined;
3
3
  export declare function cridKeyMatches(value: unknown, der: Uint8Array): Promise<boolean>;
4
- //# sourceMappingURL=crid.d.ts.map
package/dist/esm/crid.js CHANGED
@@ -55,4 +55,3 @@ export async function cridKeyMatches(value, der) {
55
55
  difference |= expected[i] ^ digest[i];
56
56
  return difference === 0;
57
57
  }
58
- //# sourceMappingURL=crid.js.map
@@ -1,4 +1,4 @@
1
- import type { QURLErrorData } from "./types.js";
1
+ import type { QURLErrorData, TombstoneInfo } from "./types.js";
2
2
  /**
3
3
  * Sentinel `.code` values for SDK-internal failure modes (no real HTTP
4
4
  * status applies). Exported as constants so consumers branching on
@@ -32,6 +32,12 @@ export declare const ERROR_CODE_CONNECTOR_RESOURCE_REVOKED = "connector_resource
32
32
  export declare const ERROR_CODE_RESOURCE_NOT_FOUND = "resource_not_found";
33
33
  /** A Connector slug lookup matched more than one active resource (client-detected, `status: 0`). */
34
34
  export declare const ERROR_CODE_AMBIGUOUS_RESOURCE = "ambiguous_resource";
35
+ /**
36
+ * Server `.code` (on a 400 `ValidationError`) when a create that makes a new
37
+ * resource has no `name`, or `PATCH /v1/resources/{id}/preview` sets an empty
38
+ * one. Nothing was written; add the public name and retry.
39
+ */
40
+ export declare const ERROR_CODE_NAME_REQUIRED = "name_required";
35
41
  /** Fallback `.code` when the server returns a non-RFC-7807 response (HTML proxy page, plaintext gateway error, JSON without `error` envelope). */
36
42
  export declare const ERROR_CODE_UNKNOWN = "unknown";
37
43
  /**
@@ -67,6 +73,8 @@ export declare class QURLError extends Error {
67
73
  readonly invalidFields?: Record<string, string>;
68
74
  readonly requestId?: string;
69
75
  readonly retryAfter?: number;
76
+ /** Retained resource metadata supplied by a 410 Gone response. */
77
+ readonly tombstone?: TombstoneInfo;
70
78
  /** Known minted IDs from a rejected terminal batch, for bounded cleanup. No bearer links. */
71
79
  readonly partialQurlIds?: readonly string[];
72
80
  constructor(data: QURLErrorData);
@@ -173,4 +181,3 @@ export declare class RuntimeError extends QURLError {
173
181
  }
174
182
  /** Create the appropriate QURLError subclass for an HTTP status code. */
175
183
  export declare function createError(data: QURLErrorData): QURLError;
176
- //# sourceMappingURL=errors.d.ts.map
@@ -31,6 +31,12 @@ export const ERROR_CODE_CONNECTOR_RESOURCE_REVOKED = "connector_resource_revoked
31
31
  export const ERROR_CODE_RESOURCE_NOT_FOUND = "resource_not_found";
32
32
  /** A Connector slug lookup matched more than one active resource (client-detected, `status: 0`). */
33
33
  export const ERROR_CODE_AMBIGUOUS_RESOURCE = "ambiguous_resource";
34
+ /**
35
+ * Server `.code` (on a 400 `ValidationError`) when a create that makes a new
36
+ * resource has no `name`, or `PATCH /v1/resources/{id}/preview` sets an empty
37
+ * one. Nothing was written; add the public name and retry.
38
+ */
39
+ export const ERROR_CODE_NAME_REQUIRED = "name_required";
34
40
  /** Fallback `.code` when the server returns a non-RFC-7807 response (HTML proxy page, plaintext gateway error, JSON without `error` envelope). */
35
41
  export const ERROR_CODE_UNKNOWN = "unknown";
36
42
  /**
@@ -66,6 +72,8 @@ export class QURLError extends Error {
66
72
  invalidFields;
67
73
  requestId;
68
74
  retryAfter;
75
+ /** Retained resource metadata supplied by a 410 Gone response. */
76
+ tombstone;
69
77
  /** Known minted IDs from a rejected terminal batch, for bounded cleanup. No bearer links. */
70
78
  partialQurlIds;
71
79
  constructor(data) {
@@ -83,6 +91,7 @@ export class QURLError extends Error {
83
91
  this.invalidFields = data.invalid_fields;
84
92
  this.requestId = data.request_id;
85
93
  this.retryAfter = data.retry_after;
94
+ this.tombstone = data.tombstone;
86
95
  }
87
96
  }
88
97
  /** 401 Unauthorized — invalid or missing API key. */
@@ -264,4 +273,3 @@ export function createError(data) {
264
273
  const ErrorClass = STATUS_ERROR_MAP[data.status] ?? QURLError;
265
274
  return new ErrorClass(data);
266
275
  }
267
- //# sourceMappingURL=errors.js.map
@@ -2,7 +2,8 @@ export { ConnectorResource, isApiKeyRequestScope, ProtectedResource, QURLClient,
2
2
  export type { EnsureConnectorResourceResult } from "./client.js";
3
3
  export { CRIDVerificationError, ShareLink } from "./share.js";
4
4
  export type { CRIDVerificationErrorCode, ShareLinkInit, ShareLinkJSON } from "./share.js";
5
- export { AuthenticationError, AuthorizationError, ConnectorResourceOutcomeUnknownError, createError, DelegatedBatchOutcomeUnknownError, ERROR_CODE_AMBIGUOUS_RESOURCE, ERROR_CODE_CLIENT_VALIDATION, ERROR_CODE_CONNECTOR_RESOURCE_OUTCOME_UNKNOWN, ERROR_CODE_CONNECTOR_RESOURCE_REVOKED, ERROR_CODE_CRID_MISMATCH, ERROR_CODE_DELEGATED_BATCH_OUTCOME_UNKNOWN, ERROR_CODE_INVALID_CRID, ERROR_CODE_INVALID_CRID_KEY, ERROR_CODE_MISSING_CRID, ERROR_CODE_NETWORK, ERROR_CODE_RESOURCE_NOT_FOUND, ERROR_CODE_RUNTIME, ERROR_CODE_TIMEOUT, ERROR_CODE_UNEXPECTED_RESPONSE, ERROR_CODE_UNKNOWN, NetworkError, NotFoundError, QURLError, RateLimitError, RuntimeError, ServerError, TimeoutError, ValidationError, } from "./errors.js";
5
+ export { AuthenticationError, AuthorizationError, ConnectorResourceOutcomeUnknownError, createError, DelegatedBatchOutcomeUnknownError, ERROR_CODE_AMBIGUOUS_RESOURCE, ERROR_CODE_CLIENT_VALIDATION, ERROR_CODE_CONNECTOR_RESOURCE_OUTCOME_UNKNOWN, ERROR_CODE_CONNECTOR_RESOURCE_REVOKED, ERROR_CODE_CRID_MISMATCH, ERROR_CODE_DELEGATED_BATCH_OUTCOME_UNKNOWN, ERROR_CODE_INVALID_CRID, ERROR_CODE_INVALID_CRID_KEY, ERROR_CODE_MISSING_CRID, ERROR_CODE_NAME_REQUIRED, ERROR_CODE_NETWORK, ERROR_CODE_RESOURCE_NOT_FOUND, ERROR_CODE_RUNTIME, ERROR_CODE_TIMEOUT, ERROR_CODE_UNEXPECTED_RESPONSE, ERROR_CODE_UNKNOWN, NetworkError, NotFoundError, QURLError, RateLimitError, RuntimeError, ServerError, TimeoutError, ValidationError, } from "./errors.js";
6
6
  export { VERSION } from "./version.js";
7
- export type { ConsumerAccessPolicy, AccessCode, AccessCodeListOutput, AccessGrant, ConsumerInvitation, ConsumerGrant, ConsumerGrantApprovalInput, ConsumerListInput, ConsumerInvitationListOutput, ConsumerGrantListOutput, AccessPolicy, AccessToken, AIAgentCategory, AIAgentPolicy, ApiKey, ApiKeyListOutput, ApiKeyRequestScope, ApiKeyScope, BatchCreateInput, BatchCreateOutput, BatchItemFailure, BatchItemResult, BatchItemSuccess, BillingInvoiceListOutput, ClientOptions, ConnectorInstallation, ConnectorInstallationCapabilities, ConnectorInstallationListOutput, ConnectorInstallationStats, CreateAccessCodeInput, CreateAccessCodeOutput, CreateApiKeyInput, CreateApiKeyOutput, CreateDurableApiKeyInput, CreateEnrollmentTokenInput, CreateBillingCheckoutInput, CreateDelegatedQurlBatchInput, CreateDelegatedQurlBatchOptions, CreateInput, CreateOutput, CreatePortalOptions, CreateQurlForResourceInput, CreateResourceInput, CreateWebhookInput, CredentialClaim, CredentialClaimInput, CredentialKind, CredentialTarget, CredentialTargetInput, Customer, CheckoutSession, DnsRecord, Domain, DomainCheckDetail, DomainListOutput, DomainVerifyResult, DelegatedQurl, DelegatedQurlBatchAccepted, DelegatedQurlBatchItemFailure, DelegatedQurlBatchItemResult, DelegatedQurlBatchItemSuccess, DelegatedQurlBatchNotModified, DelegatedQurlBatchPending, DelegatedQurlBatchStatus, DelegatedQurlBatchTerminal, DelegatedQurlCreatedData, DelegatedQurlGrant, ExtendInput, Invoice, GetDelegatedQurlBatchOptions, GetDelegatedQurlBatchOutput, ListApiKeysInput, ListBillingInvoicesInput, ListConnectorInstallationsInput, ListDomainsInput, ListInput, ListOutput, ListWebhooksInput, ListWebhookDeliveriesInput, Meta, MintInput, MintOutput, PaginatedOutput, Portal, PortalSession, ProtectUrlOptions, QURL, QURLErrorData, QurlSummary, Quota, RedeemAccessCodeInput, RedeemAccessCodeOutput, RegisterDomainInput, Resource, ResourceDetail, ResourceHandle, ResourceListInput, ResourceListOutput, ResourceType, RequestOptions, ResolveInput, ResolveOutput, Session, SessionListOutput, SessionTerminateOutput, ShareResourceOptions, TombstoneInfo, UnpaginatedOutput, UpdateApiKeyInput, UpdateCustomerInput, UpdateInput, UpdateResourceInput, UpdateResourceQurlInput, UpdateWebhookInput, UsageCostEstimate, UsageCurrentPeriod, UsageDaily, UsageDailyEntry, Webhook, WebhookDelivery, WebhookDeliveryListOutput, WebhookEventType, WebhookEventTypeInfo, WebhookListOutput, WebhookPayload, WebhookWithSecret, } from "./types.js";
8
- //# sourceMappingURL=index.d.ts.map
7
+ export type { ConsumerAccessPolicy, CRIDPaymentPolicy, AccessCode, AccessCodeListOutput, AccessGrant, ConsumerInvitation, ConsumerGrant, ConsumerGrantApprovalInput, ConsumerListInput, ConsumerInvitationListOutput, ConsumerGrantListOutput, AccessPolicy, AccessToken, AIAgentCategory, AIAgentPolicy, ApiKey, ApiKeyListOutput, ApiKeyRequestScope, ApiKeyScope, BatchCreateInput, BatchCreateOutput, BatchItemFailure, BatchItemResult, BatchItemSuccess, BillingInvoiceListOutput, CallerIdentity, ClientOptions, ConnectorInstallation, ConnectorInstallationCapabilities, ConnectorInstallationListOutput, ConnectorInstallationStats, CreateAccessCodeInput, CreateAccessCodeOutput, CreateApiKeyInput, CreateApiKeyOutput, CreateExternalIdentityBindingInput, CreateExternalIdentityBindingOutput, CreateDurableApiKeyInput, CreateEnrollmentTokenInput, CreateBillingCheckoutInput, CreateDelegatedQurlBatchInput, CreateDelegatedQurlBatchOptions, CreateInput, CreateOutput, CreatePortalOptions, CreateQurlForResourceInput, CreateResourceInput, CreateWebhookInput, CredentialClaim, CredentialClaimInput, CredentialKind, CredentialTarget, CredentialTargetInput, Customer, CheckoutSession, DnsRecord, Domain, DomainCheckDetail, DomainListOutput, DomainVerifyResult, DelegatedQurl, DelegatedQurlBatchAccepted, DelegatedQurlBatchItemFailure, DelegatedQurlBatchItemResult, DelegatedQurlBatchItemSuccess, DelegatedQurlBatchNotModified, DelegatedQurlBatchPending, DelegatedQurlBatchStatus, DelegatedQurlBatchTerminal, DelegatedQurlCreatedData, DelegatedQurlGrant, ExternalIdentityProvider, ExtendInput, Invoice, GetDelegatedQurlBatchOptions, GetDelegatedQurlBatchOutput, ListApiKeysInput, ListBillingInvoicesInput, ListConnectorInstallationsInput, ListDomainsInput, ListInput, ListOutput, ListWebhooksInput, ListWebhookDeliveriesInput, Meta, MintInput, MintOutput, PaginatedOutput, Portal, PortalSession, ProtectUrlOptions, QURL, QURLErrorData, QurlSummary, Quota, RedeemAccessCodeInput, RedeemAccessCodeOutput, RegisterDomainInput, Resource, ResourceDetail, ResourceHandle, ResourceListInput, ResourceListOutput, ResourceType, RequestOptions, ResolveInput, ResolveOutput, Session, SessionListOutput, SessionTerminateOutput, ShareResourceOptions, TombstoneInfo, UnpaginatedOutput, UpdateApiKeyInput, UpdateCustomerInput, UpdateInput, UpdateResourceInput, UpdateResourceQurlInput, UpdateWebhookInput, UsageCostEstimate, UsageCurrentPeriod, UsageDaily, UsageDailyEntry, Webhook, WebhookDelivery, WebhookDeliveryListOutput, WebhookEventType, WebhookEventTypeInfo, WebhookListOutput, WebhookPayload, WebhookWithSecret, } from "./types.js";
8
+ export { getResponseMetadata } from "./response-metadata.js";
9
+ export type { ResponseMetadata } from "./response-metadata.js";
package/dist/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export { ConnectorResource, isApiKeyRequestScope, ProtectedResource, QURLClient, } from "./client.js";
2
2
  export { CRIDVerificationError, ShareLink } from "./share.js";
3
- export { AuthenticationError, AuthorizationError, ConnectorResourceOutcomeUnknownError, createError, DelegatedBatchOutcomeUnknownError, ERROR_CODE_AMBIGUOUS_RESOURCE, ERROR_CODE_CLIENT_VALIDATION, ERROR_CODE_CONNECTOR_RESOURCE_OUTCOME_UNKNOWN, ERROR_CODE_CONNECTOR_RESOURCE_REVOKED, ERROR_CODE_CRID_MISMATCH, ERROR_CODE_DELEGATED_BATCH_OUTCOME_UNKNOWN, ERROR_CODE_INVALID_CRID, ERROR_CODE_INVALID_CRID_KEY, ERROR_CODE_MISSING_CRID, ERROR_CODE_NETWORK, ERROR_CODE_RESOURCE_NOT_FOUND, ERROR_CODE_RUNTIME, ERROR_CODE_TIMEOUT, ERROR_CODE_UNEXPECTED_RESPONSE, ERROR_CODE_UNKNOWN, NetworkError, NotFoundError, QURLError, RateLimitError, RuntimeError, ServerError, TimeoutError, ValidationError, } from "./errors.js";
3
+ export { AuthenticationError, AuthorizationError, ConnectorResourceOutcomeUnknownError, createError, DelegatedBatchOutcomeUnknownError, ERROR_CODE_AMBIGUOUS_RESOURCE, ERROR_CODE_CLIENT_VALIDATION, ERROR_CODE_CONNECTOR_RESOURCE_OUTCOME_UNKNOWN, ERROR_CODE_CONNECTOR_RESOURCE_REVOKED, ERROR_CODE_CRID_MISMATCH, ERROR_CODE_DELEGATED_BATCH_OUTCOME_UNKNOWN, ERROR_CODE_INVALID_CRID, ERROR_CODE_INVALID_CRID_KEY, ERROR_CODE_MISSING_CRID, ERROR_CODE_NAME_REQUIRED, ERROR_CODE_NETWORK, ERROR_CODE_RESOURCE_NOT_FOUND, ERROR_CODE_RUNTIME, ERROR_CODE_TIMEOUT, ERROR_CODE_UNEXPECTED_RESPONSE, ERROR_CODE_UNKNOWN, NetworkError, NotFoundError, QURLError, RateLimitError, RuntimeError, ServerError, TimeoutError, ValidationError, } from "./errors.js";
4
4
  export { VERSION } from "./version.js";
5
- //# sourceMappingURL=index.js.map
5
+ export { getResponseMetadata } from "./response-metadata.js";
@@ -2,4 +2,3 @@
2
2
  * so it is linear on any input (the regex form is polynomial-ReDoS on a long run
3
3
  * of slashes over caller-supplied input, e.g. a `baseUrl` option). */
4
4
  export declare function stripTrailingSlashes(url: string): string;
5
- //# sourceMappingURL=internal.d.ts.map
@@ -11,4 +11,3 @@ export function stripTrailingSlashes(url) {
11
11
  }
12
12
  return end === url.length ? url : url.slice(0, end);
13
13
  }
14
- //# sourceMappingURL=internal.js.map
@@ -106,4 +106,3 @@ export declare const agentRuntimeTesting: {
106
106
  fingerprint: typeof fingerprint;
107
107
  };
108
108
  export {};
109
- //# sourceMappingURL=agent-runtime.d.ts.map
@@ -943,4 +943,3 @@ export const agentRuntimeTesting = {
943
943
  Lifecycle,
944
944
  fingerprint,
945
945
  };
946
- //# sourceMappingURL=agent-runtime.js.map
@@ -98,4 +98,3 @@ export declare function validateEndpoint(value: StrictJsonValue | undefined): NH
98
98
  export declare function validateAssignment(value: StrictJsonValue | undefined): AgentAssignment;
99
99
  export declare function decodeAgentState(raw: Uint8Array): AgentState;
100
100
  export declare function encodeAgentState(state: AgentState): Buffer;
101
- //# sourceMappingURL=agent-state.d.ts.map
@@ -295,4 +295,3 @@ export function encodeAgentState(state) {
295
295
  throw error;
296
296
  }
297
297
  }
298
- //# sourceMappingURL=agent-state.js.map
@@ -15,4 +15,3 @@ export declare class AgentTransportError extends Error {
15
15
  constructor(options?: ErrorOptions);
16
16
  }
17
17
  export declare const nativeAgentTransport: AgentTransport;
18
- //# sourceMappingURL=agent-transport.d.ts.map
@@ -111,4 +111,3 @@ export const nativeAgentTransport = async (input) => {
111
111
  first.packet.fill(0);
112
112
  }
113
113
  };
114
- //# sourceMappingURL=agent-transport.js.map
@@ -48,4 +48,3 @@ export declare const deploymentTesting: {
48
48
  /** Producer-only deployments need a pinned Hub, but need no portal issuer keys. */
49
49
  export declare function loadDeploymentHub(): unknown;
50
50
  export {};
51
- //# sourceMappingURL=deployment.d.ts.map
@@ -180,4 +180,3 @@ export function loadDeploymentHub() {
180
180
  throw new Error("QURL_DEPLOYMENT has no producer Hub");
181
181
  return value.hub;
182
182
  }
183
- //# sourceMappingURL=deployment.js.map
@@ -13,4 +13,3 @@ export declare class FileAgentState implements AgentStateStore {
13
13
  withLock<T>(operation: (locked: AgentStateStore) => Promise<T>, signal?: AbortSignal): Promise<T>;
14
14
  close(): void;
15
15
  }
16
- //# sourceMappingURL=file-agent-state.d.ts.map
@@ -131,4 +131,3 @@ export class FileAgentState {
131
131
  this.#native.close(this.#handle);
132
132
  }
133
133
  }
134
- //# sourceMappingURL=file-agent-state.js.map
@@ -38,4 +38,3 @@ export declare const nativeUdpTesting: {
38
38
  socketExchangeError: (cause: unknown) => Error;
39
39
  };
40
40
  export {};
41
- //# sourceMappingURL=native-udp.d.ts.map
@@ -290,4 +290,3 @@ export const nativeUdpTesting = {
290
290
  sendOwnedDatagram,
291
291
  socketExchangeError: (cause) => new SocketExchangeError(cause),
292
292
  };
293
- //# sourceMappingURL=native-udp.js.map
@@ -42,4 +42,3 @@ export declare const nhpWireTesting: {
42
42
  inflateReplyBody: typeof inflateReplyBody;
43
43
  };
44
44
  export {};
45
- //# sourceMappingURL=nhp-wire.d.ts.map
@@ -271,4 +271,3 @@ function wipeBuffers(values) {
271
271
  value.fill(0);
272
272
  }
273
273
  export const nhpWireTesting = { validateReplyProfile, inflateReplyBody };
274
- //# sourceMappingURL=nhp-wire.js.map
@@ -119,4 +119,3 @@ export declare const portalOpenerTesting: {
119
119
  validateSessionToken: typeof validateSessionToken;
120
120
  };
121
121
  export {};
122
- //# sourceMappingURL=portal-opener.d.ts.map
@@ -1072,4 +1072,3 @@ export const portalOpenerTesting = {
1072
1072
  validatedCellForLink,
1073
1073
  validateSessionToken,
1074
1074
  };
1075
- //# sourceMappingURL=portal-opener.js.map
@@ -17,4 +17,3 @@ export interface DiscoveryProviderOptions {
17
17
  }
18
18
  export declare function createHTTPManifestFetcher(value: string, fetch?: typeof globalThis.fetch): DiscoveryProviderOptions["fetcher"];
19
19
  export declare function createDiscoveryProvider(options: DiscoveryProviderOptions): PortalProvider;
20
- //# sourceMappingURL=provider.d.ts.map
@@ -146,4 +146,3 @@ export function createDiscoveryProvider(options) {
146
146
  },
147
147
  };
148
148
  }
149
- //# sourceMappingURL=provider.js.map
@@ -38,4 +38,3 @@ export declare const qv2Testing: {
38
38
  verifyIssuerClaims: typeof verifyIssuerClaims;
39
39
  };
40
40
  export {};
41
- //# sourceMappingURL=qv2.d.ts.map
@@ -297,4 +297,3 @@ export const qv2Testing = {
297
297
  parseAndWipeSecret,
298
298
  verifyIssuerClaims,
299
299
  };
300
- //# sourceMappingURL=qv2.js.map
@@ -10,4 +10,3 @@ export declare function relayKnock(relayURL: string, allowlist: readonly string[
10
10
  signal?: AbortSignal;
11
11
  fetch?: typeof globalThis.fetch;
12
12
  }): Promise<NHPMessage>;
13
- //# sourceMappingURL=relay.d.ts.map
@@ -102,4 +102,3 @@ export async function relayKnock(relayURL, allowlist, serverPublicKey, devicePri
102
102
  packet?.fill(0);
103
103
  }
104
104
  }
105
- //# sourceMappingURL=relay.js.map
@@ -17,4 +17,3 @@ export interface AgentStateKeyWrapper {
17
17
  }
18
18
  export declare function createSealedAgentStateCodec(providerID: string, wrapper: AgentStateKeyWrapper, expectedAgentID?: string): AgentStateCodec;
19
19
  export declare function openSealedFileAgentState(path: string, providerID: string, wrapper: AgentStateKeyWrapper, expectedAgentID?: string): FileAgentState;
20
- //# sourceMappingURL=sealed-agent-state.d.ts.map
@@ -187,4 +187,3 @@ export function createSealedAgentStateCodec(providerID, wrapper, expectedAgentID
187
187
  export function openSealedFileAgentState(path, providerID, wrapper, expectedAgentID) {
188
188
  return new FileAgentState(path, createSealedAgentStateCodec(providerID, wrapper, expectedAgentID));
189
189
  }
190
- //# sourceMappingURL=sealed-agent-state.js.map
@@ -10,4 +10,3 @@ export declare function parseStrictJson(input: Uint8Array, maxBytes: number, onM
10
10
  export declare function isStrictJsonObject(value: StrictJsonValue | undefined): value is {
11
11
  [key: string]: StrictJsonValue;
12
12
  };
13
- //# sourceMappingURL=strict-json.d.ts.map
@@ -173,4 +173,3 @@ class StrictJsonParser {
173
173
  export function isStrictJsonObject(value) {
174
174
  return typeof value === "object" && value !== null && !Array.isArray(value);
175
175
  }
176
- //# sourceMappingURL=strict-json.js.map
@@ -15,4 +15,3 @@ export { createSealedAgentStateCodec, openSealedFileAgentState, } from "./node/s
15
15
  export type { AgentStateKeyBinding, WrappedAgentStateKey, AgentStateKeyWrapper, } from "./node/sealed-agent-state.js";
16
16
  export { AgentRuntime, AgentLifecycleError, connectAgentRuntime, recoverAgentRuntime, } from "./node/agent-runtime.js";
17
17
  export type { AgentRuntimeOptions, AgentRecoveryOptions, AgentOTPChallenge, NativeAgentKnockOptions, NativeAgentGrant, NativeSessionReceipt, } from "./node/agent-runtime.js";
18
- //# sourceMappingURL=node.d.ts.map
package/dist/esm/node.js CHANGED
@@ -6,4 +6,3 @@ export { AgentTransportError } from "./node/agent-transport.js";
6
6
  export { FileAgentState } from "./node/file-agent-state.js";
7
7
  export { createSealedAgentStateCodec, openSealedFileAgentState, } from "./node/sealed-agent-state.js";
8
8
  export { AgentRuntime, AgentLifecycleError, connectAgentRuntime, recoverAgentRuntime, } from "./node/agent-runtime.js";
9
- //# sourceMappingURL=node.js.map
@@ -0,0 +1,13 @@
1
+ /** Correlation metadata from one successful API response. */
2
+ export interface ResponseMetadata {
3
+ readonly requestId: string;
4
+ }
5
+ /**
6
+ * Read this result's server correlation ID. Metadata is non-enumerable and is
7
+ * not part of its JSON payload. Local handles and responses without an ID return undefined.
8
+ */
9
+ export declare function getResponseMetadata(value: unknown): Readonly<ResponseMetadata> | undefined;
10
+ /** @internal Attach only an identifier already validated at the HTTP boundary. */
11
+ export declare function withResponseMetadata<T>(value: T, requestId: string | undefined): T;
12
+ /** @internal Preserve correlation when a response becomes a new SDK value. */
13
+ export declare function copyResponseMetadata<T>(source: unknown, value: T): T;
@@ -0,0 +1,33 @@
1
+ // A constant global symbol survives mixed ESM/CJS loads without a mutable registry.
2
+ const RESPONSE_METADATA = Symbol.for("@layervai/qurl.responseMetadata.v1");
3
+ function isObject(value) {
4
+ return value !== null && (typeof value === "object" || typeof value === "function");
5
+ }
6
+ /**
7
+ * Read this result's server correlation ID. Metadata is non-enumerable and is
8
+ * not part of its JSON payload. Local handles and responses without an ID return undefined.
9
+ */
10
+ export function getResponseMetadata(value) {
11
+ if (!isObject(value))
12
+ return undefined;
13
+ return Object.getOwnPropertyDescriptor(value, RESPONSE_METADATA)?.value;
14
+ }
15
+ /** @internal Attach only an identifier already validated at the HTTP boundary. */
16
+ export function withResponseMetadata(value, requestId) {
17
+ if (!isObject(value) || !requestId)
18
+ return value;
19
+ // Diagnostic metadata must not turn a successful mutation into a failure.
20
+ if (Object.getOwnPropertyDescriptor(value, RESPONSE_METADATA) || !Object.isExtensible(value))
21
+ return value;
22
+ Object.defineProperty(value, RESPONSE_METADATA, {
23
+ value: Object.freeze({ requestId }),
24
+ enumerable: false,
25
+ writable: false,
26
+ configurable: false,
27
+ });
28
+ return value;
29
+ }
30
+ /** @internal Preserve correlation when a response becomes a new SDK value. */
31
+ export function copyResponseMetadata(source, value) {
32
+ return withResponseMetadata(value, getResponseMetadata(source)?.requestId);
33
+ }
@@ -54,4 +54,3 @@ export declare class ShareLink {
54
54
  */
55
55
  verifyCrid(derSpki: ArrayBuffer | ArrayBufferView): Promise<void>;
56
56
  }
57
- //# sourceMappingURL=share.d.ts.map
package/dist/esm/share.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { copyResponseMetadata } from "./response-metadata.js";
1
2
  import { ERROR_CODE_CRID_MISMATCH, ERROR_CODE_INVALID_CRID, ERROR_CODE_INVALID_CRID_KEY, ERROR_CODE_MISSING_CRID, QURLError, RuntimeError, } from "./errors.js";
2
3
  import { cridKeyMatches, parseCrid } from "./crid.js";
3
4
  /** A local, fail-closed CRID verification failure. */
@@ -44,6 +45,7 @@ export class ShareLink {
44
45
  this.#expiresAtEpochMs = Number.isFinite(expiresAtEpochMs) ? expiresAtEpochMs : undefined;
45
46
  this.expiresInSeconds = init.expiresInSeconds;
46
47
  this.singleUse = init.singleUse;
48
+ copyResponseMetadata(init, this);
47
49
  Object.freeze(this);
48
50
  }
49
51
  /** Effective expiry as a defensive copy; mutating it does not change this share. */
@@ -106,4 +108,3 @@ function copyBytes(value) {
106
108
  function invalidCrid() {
107
109
  return new CRIDVerificationError(ERROR_CODE_INVALID_CRID, "Share response carried an invalid CRID");
108
110
  }
109
- //# sourceMappingURL=share.js.map
@@ -0,0 +1,2 @@
1
+ export declare function isCanonicalTargetPath(value: unknown): value is string;
2
+ export declare function requireCanonicalTargetPath(value: string | undefined, field: string): void;
@@ -0,0 +1,30 @@
1
+ import { clientValidationError } from "./client-errors.js";
2
+ import { MAX_TARGET_PATH } from "./client-limits.js";
3
+ import { requireMaxUtf8Bytes, requireNonEmptyIfPresent } from "./client-validation.js";
4
+ // TODO(upstream-contract): qurl-service ValidateTargetPath and the released
5
+ // target_path_v1_vectors define this grammar without normalization.
6
+ const INVALID_TARGET_PATH_ASCII = /[^A-Za-z0-9._~!$&()*+,;=:@%/?-]/;
7
+ const MALFORMED_PERCENT_ESCAPE = /%(?![0-9a-fA-F]{2})/;
8
+ export function isCanonicalTargetPath(value) {
9
+ if (typeof value !== "string" ||
10
+ value.length > MAX_TARGET_PATH ||
11
+ value.startsWith("//") ||
12
+ !value.startsWith("/") ||
13
+ INVALID_TARGET_PATH_ASCII.test(value) ||
14
+ MALFORMED_PERCENT_ESCAPE.test(value))
15
+ return false;
16
+ const path = value.split("?", 1)[0];
17
+ // Queries remain encoded data; only the path defines authorization.
18
+ return (!/[%!()*;]/.test(path) &&
19
+ !path.slice(1).includes("//") &&
20
+ !path.split("/").some((segment) => segment === "." || segment === ".."));
21
+ }
22
+ export function requireCanonicalTargetPath(value, field) {
23
+ if (value === undefined)
24
+ return;
25
+ requireMaxUtf8Bytes(value, field, MAX_TARGET_PATH);
26
+ requireNonEmptyIfPresent(value, field);
27
+ if (!isCanonicalTargetPath(value)) {
28
+ throw clientValidationError(`${field}: must be a canonical ASCII path with optional query`);
29
+ }
30
+ }
@@ -56,7 +56,8 @@ export interface AccessToken {
56
56
  use_count: number;
57
57
  qurl_site?: string;
58
58
  created_at: string;
59
- expires_at: string;
59
+ /** Optional in API summaries; omission does not imply an unlimited lifetime. */
60
+ expires_at?: string;
60
61
  }
61
62
  /** Per-qURL summary returned from resource-detail and token-update endpoints. */
62
63
  export interface QurlSummary {
@@ -113,6 +114,15 @@ export interface QURL {
113
114
  * the resource and must be set through {@link UpdateInput} after creation.
114
115
  */
115
116
  export interface CreateInput {
117
+ /**
118
+ * Public name recipients see: the qURL page, link previews, and the passkey
119
+ * they save. Not `description`, which stays a private owner note. Sent only
120
+ * when set; needs a qURL API version that accepts it. The service requires
121
+ * it when this call creates a resource (`400 name_required` otherwise) and
122
+ * ignores it when an existing resource is reused. Rename later with
123
+ * `PATCH /v1/resources/{id}/preview`.
124
+ */
125
+ name?: string;
116
126
  /** Omit to keep an existing resource's privacy; a new URL or Connector resource defaults to private. */
117
127
  private?: boolean;
118
128
  type?: ResourceType;
@@ -137,6 +147,8 @@ export interface CreateOutput {
137
147
  expires_at?: string;
138
148
  label?: string;
139
149
  type?: ResourceType;
150
+ /** Recorded Connector path scope; omitted for the bare origin. */
151
+ target_path?: string;
140
152
  }
141
153
  /** Input for listing qURLs. */
142
154
  export interface ListInput {
@@ -237,6 +249,8 @@ export interface MintOutput {
237
249
  }
238
250
  /** Options for `QURLClient.protectUrl`. */
239
251
  export interface ProtectUrlOptions {
252
+ /** Public resource name; see {@link CreateInput.name}. */
253
+ name?: string;
240
254
  private?: boolean;
241
255
  consumerAccess?: ConsumerAccessPolicy;
242
256
  /** Optional resource-level metadata. Max 500 chars. */
@@ -282,11 +296,17 @@ export interface CreatePortalOptions {
282
296
  sessionDuration?: string | number;
283
297
  /**
284
298
  * Scope a qURL for an existing tunnel resource to one path and its
285
- * descendants. The SDK rejects only empty values and values over 2048 UTF-8
286
- * bytes; the API remains authoritative for the path grammar and resource
287
- * type. This option is invalid with `createPortalForUrl`.
299
+ * descendants. Must be a canonical ASCII path with optional query, at most
300
+ * 2048 bytes. The API enforces the tunnel-only resource boundary.
301
+ * This option is invalid with `createPortalForUrl`.
288
302
  */
289
303
  targetPath?: string;
304
+ /**
305
+ * Public name of the resource `createPortalForUrl` creates; see
306
+ * {@link CreateInput.name}. Required by the service when that call creates a
307
+ * resource. `createPortal` rejects it: the resource already exists.
308
+ */
309
+ name?: string;
290
310
  }
291
311
  /**
292
312
  * A qURL link minted for a protected resource.
@@ -312,6 +332,8 @@ export interface Portal {
312
332
  qurlId?: string;
313
333
  /** Token label, when returned by the API. */
314
334
  label?: string;
335
+ /** Recorded Connector path scope; absent means bare origin. */
336
+ targetPath?: string;
315
337
  }
316
338
  /**
317
339
  * Result of a successful `enterPortal`: the reachable resource.
@@ -345,7 +367,10 @@ export interface ResolveOutput {
345
367
  resource_id: string;
346
368
  access_grant?: AccessGrant;
347
369
  }
348
- /** Quota information. */
370
+ /**
371
+ * Quota information. The API schema does not require rate_limits, usage, or
372
+ * their inner fields; minimal responses may omit them. Check presence before use.
373
+ */
349
374
  export interface Quota {
350
375
  plan: "free" | "growth" | "enterprise" | (string & {});
351
376
  period_start: string;
@@ -413,6 +438,7 @@ export interface BatchCreateOutput {
413
438
  succeeded: number;
414
439
  failed: number;
415
440
  results: BatchItemResult[];
441
+ /** Canonical meta.request_id wins; data.request_id is preserved when meta omits it. */
416
442
  request_id?: string;
417
443
  }
418
444
  /** One recipient grant redeemed from an opaque delegated mint capability. */
@@ -513,13 +539,22 @@ export interface DelegatedQurl {
513
539
  access_policy?: AccessPolicy;
514
540
  }
515
541
  /** Private resource policy. Contract fulfillment comes from the publisher backend. */
542
+ export interface CRIDPaymentPolicy {
543
+ account_id: string;
544
+ price_id: string;
545
+ /** One-time access duration; zero lasts for the resource lifetime. Subscriptions require zero. */
546
+ access_seconds: number;
547
+ }
516
548
  export interface ConsumerAccessPolicy {
517
549
  mode: "keys" | "invite_only" | "email_capture" | "review" | "contract";
518
550
  version: number;
519
551
  contract_id?: string;
552
+ payment?: CRIDPaymentPolicy;
520
553
  }
521
554
  /** Input for creating a resource directly. */
522
555
  export interface CreateResourceInput {
556
+ /** Public resource name; see {@link CreateInput.name}. */
557
+ name?: string;
523
558
  private?: boolean;
524
559
  consumer_access?: ConsumerAccessPolicy;
525
560
  type?: ResourceType;
@@ -603,7 +638,7 @@ export interface ShareResourceOptions {
603
638
  ttlSeconds?: number;
604
639
  }
605
640
  /** Input for minting a qURL against an existing resource. */
606
- export type CreateQurlForResourceInput = Omit<CreateInput, "target_url" | "custom_domain" | "type" | "private"> & {
641
+ export type CreateQurlForResourceInput = Omit<CreateInput, "target_url" | "custom_domain" | "type" | "private" | "name"> & {
607
642
  /**
608
643
  * Path this resource qURL resolves to (e.g. "/api/detect").
609
644
  *
@@ -916,6 +951,16 @@ export interface UpdateApiKeyInput {
916
951
  name?: string;
917
952
  scopes?: ApiKeyRequestScope[];
918
953
  }
954
+ /** Identity of the credential used for the current request. */
955
+ export interface CallerIdentity {
956
+ owner_id: string;
957
+ auth_type: OpenString<"api_key" | "jwt">;
958
+ /**
959
+ * Available API-key metadata, which may be omitted even for an API-key caller.
960
+ * JWT callers omit it. Display fields are optional; no credential secret is returned.
961
+ */
962
+ api_key?: ApiKey;
963
+ }
919
964
  export interface ApiKey {
920
965
  key_id?: string;
921
966
  key_prefix?: string;
@@ -997,6 +1042,7 @@ export interface QURLErrorData {
997
1042
  invalid_fields?: Record<string, string>;
998
1043
  request_id?: string;
999
1044
  retry_after?: number;
1045
+ tombstone?: TombstoneInfo;
1000
1046
  }
1001
1047
  /** Per-call options accepted by mutating requests. */
1002
1048
  export interface RequestOptions {
@@ -1018,13 +1064,19 @@ export interface ClientOptions {
1018
1064
  /** Base URL. Defaults to https://api.layerv.ai */
1019
1065
  baseUrl?: string;
1020
1066
  /**
1021
- * Custom fetch implementation. Redirect-safety requires it to honor
1067
+ * Custom fetch implementation, called with globalThis as its receiver.
1068
+ * Bind methods that need a different receiver. Redirect-safety requires it to honor
1022
1069
  * `redirect: "manual"`, accurately expose `Response.redirected`, and leave
1023
1070
  * `Response.url` empty or set it to the normalized request URL when no
1024
1071
  * redirect was followed. Every Response-like result must also provide a
1025
1072
  * `headers` object with a WHATWG-compatible `headers.get(name)` method.
1026
1073
  */
1027
1074
  fetch?: typeof globalThis.fetch;
1075
+ /**
1076
+ * Decoded API response bytes per request. Default: 1 MiB.
1077
+ * Integer range: 1 byte through 16 MiB.
1078
+ */
1079
+ maxResponseBodyBytes?: number;
1028
1080
  /** Maximum retry attempts for transient errors (429, 5xx). Default: 3. */
1029
1081
  maxRetries?: number;
1030
1082
  /**
@@ -1081,5 +1133,28 @@ export interface ConsumerInvitationListOutput extends PaginatedOutput {
1081
1133
  export interface ConsumerGrantListOutput extends PaginatedOutput {
1082
1134
  grants: ConsumerGrant[];
1083
1135
  }
1136
+ /** Provider authenticated by its configured confidential OAuth client. */
1137
+ export type ExternalIdentityProvider = "slack" | "discord" | "teams";
1138
+ export interface CreateExternalIdentityBindingInput {
1139
+ provider: ExternalIdentityProvider;
1140
+ external_id: string;
1141
+ display_name?: string;
1142
+ /** Explicit reauthorization only; revokes the previous binding key. */
1143
+ rotate_existing?: boolean;
1144
+ }
1145
+ /** Persist api_key.plaintext securely immediately; never log this result. */
1146
+ export interface CreateExternalIdentityBindingOutput {
1147
+ binding_id: string;
1148
+ provider: ExternalIdentityProvider;
1149
+ external_id: string;
1150
+ display_name?: string;
1151
+ api_key: {
1152
+ key_id: string;
1153
+ key_prefix: string;
1154
+ /** One-time secret, replayable only with the same request within 24 hours. */
1155
+ plaintext: string;
1156
+ };
1157
+ scopes: ApiKeyRequestScope[];
1158
+ created_at: string;
1159
+ }
1084
1160
  export {};
1085
- //# sourceMappingURL=types.d.ts.map
package/dist/esm/types.js CHANGED
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=types.js.map
@@ -1,2 +1 @@
1
- export declare const VERSION = "3.1.0";
2
- //# sourceMappingURL=version.d.ts.map
1
+ export declare const VERSION = "4.0.0";
@@ -1,2 +1 @@
1
- export const VERSION = "3.1.0"; // x-release-please-version
2
- //# sourceMappingURL=version.js.map
1
+ export const VERSION = "4.0.0"; // x-release-please-version