@gpt-platform/client 0.10.5 → 0.11.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 (155) hide show
  1. package/dist/_internal/client/client.gen.d.ts +3 -0
  2. package/dist/_internal/client/client.gen.d.ts.map +1 -0
  3. package/dist/_internal/client/index.d.ts +9 -0
  4. package/dist/_internal/client/index.d.ts.map +1 -0
  5. package/dist/_internal/client/types.gen.d.ts +118 -0
  6. package/dist/_internal/client/types.gen.d.ts.map +1 -0
  7. package/dist/_internal/client/utils.gen.d.ts +34 -0
  8. package/dist/_internal/client/utils.gen.d.ts.map +1 -0
  9. package/dist/_internal/client.gen.d.ts +13 -0
  10. package/dist/_internal/client.gen.d.ts.map +1 -0
  11. package/dist/_internal/core/auth.gen.d.ts +19 -0
  12. package/dist/_internal/core/auth.gen.d.ts.map +1 -0
  13. package/dist/_internal/core/bodySerializer.gen.d.ts +26 -0
  14. package/dist/_internal/core/bodySerializer.gen.d.ts.map +1 -0
  15. package/dist/_internal/core/params.gen.d.ts +44 -0
  16. package/dist/_internal/core/params.gen.d.ts.map +1 -0
  17. package/dist/_internal/core/pathSerializer.gen.d.ts +34 -0
  18. package/dist/_internal/core/pathSerializer.gen.d.ts.map +1 -0
  19. package/dist/_internal/core/queryKeySerializer.gen.d.ts +19 -0
  20. package/dist/_internal/core/queryKeySerializer.gen.d.ts.map +1 -0
  21. package/dist/_internal/core/serverSentEvents.gen.d.ts +72 -0
  22. package/dist/_internal/core/serverSentEvents.gen.d.ts.map +1 -0
  23. package/dist/_internal/core/types.gen.d.ts +79 -0
  24. package/dist/_internal/core/types.gen.d.ts.map +1 -0
  25. package/dist/_internal/core/utils.gen.d.ts +20 -0
  26. package/dist/_internal/core/utils.gen.d.ts.map +1 -0
  27. package/dist/_internal/index.d.ts +3 -0
  28. package/dist/_internal/index.d.ts.map +1 -0
  29. package/dist/_internal/sdk.gen.d.ts +7053 -0
  30. package/dist/_internal/sdk.gen.d.ts.map +1 -0
  31. package/dist/_internal/types.gen.d.ts +146633 -0
  32. package/dist/_internal/types.gen.d.ts.map +1 -0
  33. package/dist/base-client.d.ts +199 -0
  34. package/dist/base-client.d.ts.map +1 -0
  35. package/dist/errors/index.d.ts +128 -0
  36. package/dist/errors/index.d.ts.map +1 -0
  37. package/dist/events.d.ts +69 -0
  38. package/dist/events.d.ts.map +1 -0
  39. package/dist/execution-events.d.ts +95 -0
  40. package/dist/execution-events.d.ts.map +1 -0
  41. package/dist/gpt-client.d.ts +2175 -0
  42. package/dist/gpt-client.d.ts.map +1 -0
  43. package/dist/index.d.ts +51 -30734
  44. package/dist/index.d.ts.map +1 -0
  45. package/dist/index.js +311 -4
  46. package/dist/index.js.map +1 -1
  47. package/dist/index.mjs +311 -4
  48. package/dist/index.mjs.map +1 -1
  49. package/dist/json-api.d.ts +26 -0
  50. package/dist/json-api.d.ts.map +1 -0
  51. package/dist/logging.d.ts +22 -0
  52. package/dist/logging.d.ts.map +1 -0
  53. package/dist/namespace-types.d.ts +79 -0
  54. package/dist/namespace-types.d.ts.map +1 -0
  55. package/dist/namespaces/access-grants.d.ts +71 -0
  56. package/dist/namespaces/access-grants.d.ts.map +1 -0
  57. package/dist/namespaces/agents.d.ts +1406 -0
  58. package/dist/namespaces/agents.d.ts.map +1 -0
  59. package/dist/namespaces/ai.d.ts +407 -0
  60. package/dist/namespaces/ai.d.ts.map +1 -0
  61. package/dist/namespaces/audit.d.ts +83 -0
  62. package/dist/namespaces/audit.d.ts.map +1 -0
  63. package/dist/namespaces/billing.d.ts +854 -0
  64. package/dist/namespaces/billing.d.ts.map +1 -0
  65. package/dist/namespaces/campaigns.d.ts +973 -0
  66. package/dist/namespaces/campaigns.d.ts.map +1 -0
  67. package/dist/namespaces/catalog.d.ts +964 -0
  68. package/dist/namespaces/catalog.d.ts.map +1 -0
  69. package/dist/namespaces/channels.d.ts +162 -0
  70. package/dist/namespaces/channels.d.ts.map +1 -0
  71. package/dist/namespaces/clinical.d.ts +2443 -0
  72. package/dist/namespaces/clinical.d.ts.map +1 -0
  73. package/dist/namespaces/communication.d.ts +439 -0
  74. package/dist/namespaces/communication.d.ts.map +1 -0
  75. package/dist/namespaces/compliance.d.ts +2310 -0
  76. package/dist/namespaces/compliance.d.ts.map +1 -0
  77. package/dist/namespaces/connectors.d.ts +1368 -0
  78. package/dist/namespaces/connectors.d.ts.map +1 -0
  79. package/dist/namespaces/content.d.ts +188 -0
  80. package/dist/namespaces/content.d.ts.map +1 -0
  81. package/dist/namespaces/crawler.d.ts +408 -0
  82. package/dist/namespaces/crawler.d.ts.map +1 -0
  83. package/dist/namespaces/crm-clusters.d.ts +31 -0
  84. package/dist/namespaces/crm-clusters.d.ts.map +1 -0
  85. package/dist/namespaces/crm.d.ts +1539 -0
  86. package/dist/namespaces/crm.d.ts.map +1 -0
  87. package/dist/namespaces/documents.d.ts +136 -0
  88. package/dist/namespaces/documents.d.ts.map +1 -0
  89. package/dist/namespaces/email.d.ts +550 -0
  90. package/dist/namespaces/email.d.ts.map +1 -0
  91. package/dist/namespaces/extraction.d.ts +1249 -0
  92. package/dist/namespaces/extraction.d.ts.map +1 -0
  93. package/dist/namespaces/identity.d.ts +411 -0
  94. package/dist/namespaces/identity.d.ts.map +1 -0
  95. package/dist/namespaces/imports.d.ts +177 -0
  96. package/dist/namespaces/imports.d.ts.map +1 -0
  97. package/dist/namespaces/index.d.ts +119 -0
  98. package/dist/namespaces/index.d.ts.map +1 -0
  99. package/dist/namespaces/memory.d.ts +105 -0
  100. package/dist/namespaces/memory.d.ts.map +1 -0
  101. package/dist/namespaces/models.d.ts +75 -0
  102. package/dist/namespaces/models.d.ts.map +1 -0
  103. package/dist/namespaces/permissions.d.ts +75 -0
  104. package/dist/namespaces/permissions.d.ts.map +1 -0
  105. package/dist/namespaces/pipeline-executions.d.ts +130 -0
  106. package/dist/namespaces/pipeline-executions.d.ts.map +1 -0
  107. package/dist/namespaces/pipelines.d.ts +120 -0
  108. package/dist/namespaces/pipelines.d.ts.map +1 -0
  109. package/dist/namespaces/platform.d.ts +1430 -0
  110. package/dist/namespaces/platform.d.ts.map +1 -0
  111. package/dist/namespaces/portal.d.ts +198 -0
  112. package/dist/namespaces/portal.d.ts.map +1 -0
  113. package/dist/namespaces/projects.d.ts +553 -0
  114. package/dist/namespaces/projects.d.ts.map +1 -0
  115. package/dist/namespaces/roles.d.ts +65 -0
  116. package/dist/namespaces/roles.d.ts.map +1 -0
  117. package/dist/namespaces/scheduling.d.ts +944 -0
  118. package/dist/namespaces/scheduling.d.ts.map +1 -0
  119. package/dist/namespaces/search.d.ts +224 -0
  120. package/dist/namespaces/search.d.ts.map +1 -0
  121. package/dist/namespaces/session-notes.d.ts +67 -0
  122. package/dist/namespaces/session-notes.d.ts.map +1 -0
  123. package/dist/namespaces/social.d.ts +330 -0
  124. package/dist/namespaces/social.d.ts.map +1 -0
  125. package/dist/namespaces/storage.d.ts +378 -0
  126. package/dist/namespaces/storage.d.ts.map +1 -0
  127. package/dist/namespaces/support.d.ts +427 -0
  128. package/dist/namespaces/support.d.ts.map +1 -0
  129. package/dist/namespaces/threads.d.ts +596 -0
  130. package/dist/namespaces/threads.d.ts.map +1 -0
  131. package/dist/namespaces/training.d.ts +358 -0
  132. package/dist/namespaces/training.d.ts.map +1 -0
  133. package/dist/namespaces/voice.d.ts +752 -0
  134. package/dist/namespaces/voice.d.ts.map +1 -0
  135. package/dist/namespaces/watcher.d.ts +425 -0
  136. package/dist/namespaces/watcher.d.ts.map +1 -0
  137. package/dist/namespaces/webhooks-ns.d.ts +3 -0
  138. package/dist/namespaces/webhooks-ns.d.ts.map +1 -0
  139. package/dist/pagination.d.ts +57 -0
  140. package/dist/pagination.d.ts.map +1 -0
  141. package/dist/request-builder.d.ts +95 -0
  142. package/dist/request-builder.d.ts.map +1 -0
  143. package/dist/security.d.ts +32 -0
  144. package/dist/security.d.ts.map +1 -0
  145. package/dist/streaming.d.ts +135 -0
  146. package/dist/streaming.d.ts.map +1 -0
  147. package/dist/utils/retry.d.ts +63 -0
  148. package/dist/utils/retry.d.ts.map +1 -0
  149. package/dist/version.d.ts +5 -0
  150. package/dist/version.d.ts.map +1 -0
  151. package/dist/webhook-signature.d.ts +109 -0
  152. package/dist/webhook-signature.d.ts.map +1 -0
  153. package/llms.txt +7 -1
  154. package/package.json +286 -36
  155. package/dist/index.d.mts +0 -30734
@@ -0,0 +1 @@
1
+ {"version":3,"file":"voice.d.ts","sourceRoot":"","sources":["../../src/namespaces/voice.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,wBAAwB,EACzB,MAAM,wBAAwB,CAAC;AA0BhC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG;IAC7C,UAAU,EAAE,WAAW,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,GAAG;QACpD,+FAA+F;QAC/F,aAAa,EAAE,MAAM,CAAC;QACtB,gFAAgF;QAChF,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;CACH,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,QAAQ,EAAE,KAAK,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,GAAG,EAAE,MAAM,CAAC;QACZ,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,oFAAoF;QACpF,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC,CAAC;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC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AAc,KACvB,OAAO,CAAC,gBAAgB,CAAC;QAuB5B;;;;;;WAMG;kBAEG,MAAM,YACA,cAAc,KACvB,OAAO,CAAC,gBAAgB,CAAC;QAQ5B;;;;;WAKG;6BAES;YAAE,IAAI,CAAC,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;SAAE,GAAG,cAAc,KAC9D,OAAO,CAAC,gBAAgB,EAAE,CAAC;QAQ9B;;;;;WAKG;yBAES;YAAE,IAAI,CAAC,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;SAAE,GAAG,cAAc,KAC9D,OAAO,CAAC,gBAAgB,EAAE,CAAC;QAQ9B;;;;;;WAMG;uCAEY,MAAM,YACT;YAAE,IAAI,CAAC,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;SAAE,GAAG,cAAc,KAC9D,OAAO,CAAC,gBAAgB,EAAE,CAAC;QAW9B;;;;;;;;;;;WAWG;6BAEM,MAAM,SACN,IAAI,GAAG,IAAI,YACR,cAAc,KACvB,OAAO,CAAC,wBAAwB,CAAC;QAUpC;;;;;;;;;;;WAWG;0BAEM,MAAM,WACJ,+BAA+B,YAC9B,cAAc,KACvB,OAAO,CAAC,8BAA8B,CAAC;QAW1C;;;;;WAKG;sBACiB,MAAM,YAAY,cAAc,KAAG,OAAO,CAAC,IAAI,CAAC;;EASzE"}
@@ -0,0 +1,425 @@
1
+ import type { WatcherClaim, WatcherEvent } from "../_internal/types.gen";
2
+ /** Attributes accepted when creating a new ingestion claim. */
3
+ export type CreateWatcherClaimAttributes = {
4
+ document_id: string;
5
+ worker_id?: string;
6
+ [key: string]: unknown;
7
+ };
8
+ /** Attributes accepted when updating an ingestion claim (PATCH semantics). */
9
+ export type UpdateWatcherClaimAttributes = {
10
+ status?: string;
11
+ progress_pct?: number;
12
+ [key: string]: unknown;
13
+ };
14
+ /** Attributes accepted when publishing an ingestion event. */
15
+ export type CreateWatcherEventAttributes = {
16
+ event_type: string;
17
+ storage_path: string;
18
+ bucket_id?: string;
19
+ metadata?: Record<string, unknown>;
20
+ [key: string]: unknown;
21
+ };
22
+ import type { RequestOptions } from "../base-client";
23
+ import { RequestBuilder } from "../request-builder";
24
+ /**
25
+ * Creates the watcher namespace, providing access to the ingestion claim
26
+ * lifecycle and file system/ingestion event management for the authenticated
27
+ * workspace.
28
+ *
29
+ * The watcher system coordinates document ingestion: external agents (e.g.,
30
+ * document processing workers) claim pending documents from the queue, process
31
+ * them, and then register completion. File system events notify the platform of
32
+ * new or changed files that should enter the ingestion pipeline.
33
+ *
34
+ * Accessed via `client.watcher.*`.
35
+ *
36
+ * @param rb - The internal `RequestBuilder` instance used to execute API calls.
37
+ * @returns An object containing the `claims` and `events` sub-namespaces.
38
+ */
39
+ export declare function createWatcherNamespace(rb: RequestBuilder): {
40
+ /**
41
+ * Sub-namespace for ingestion claim lifecycle operations.
42
+ *
43
+ * Claims represent the ownership of a pending document by a processing worker.
44
+ * When a document enters the ingestion queue, a worker calls `claim()` to
45
+ * atomically acquire it, preventing other workers from processing the same
46
+ * document concurrently. After processing completes, the worker calls
47
+ * `registerCompleted()` to mark the claim as done and release the document
48
+ * slot in the queue.
49
+ *
50
+ * The claim lifecycle is:
51
+ * 1. Document enters the ingestion queue (via a watcher event or direct upload).
52
+ * 2. A worker calls `claims.claim()` to atomically acquire the next pending document.
53
+ * 3. The worker processes the document.
54
+ * 4. The worker calls `claims.registerCompleted()` to close the claim.
55
+ *
56
+ * Use `claims.readStatus()` to inspect the current ingestion queue depth
57
+ * and health for the workspace.
58
+ */
59
+ claims: {
60
+ /**
61
+ * Returns a single page of ingestion claims for the current workspace.
62
+ *
63
+ * @param options - Optional pagination and request options.
64
+ * @param options.page - The 1-based page number to retrieve (default: 1).
65
+ * @param options.pageSize - The number of claims to return per page.
66
+ * @returns A promise resolving to an array of `WatcherClaim` objects for
67
+ * the requested page, each describing a document claim and its current
68
+ * state (pending, processing, completed, failed).
69
+ *
70
+ * @example
71
+ * ```typescript
72
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
73
+ *
74
+ * const claims = await client.watcher.claims.list({ pageSize: 50 });
75
+ * const pending = claims.filter(c => c.status === 'pending');
76
+ * console.log(`Pending claims: ${pending.length}`);
77
+ * ```
78
+ */
79
+ list: (options?: {
80
+ page?: number;
81
+ pageSize?: number;
82
+ } & RequestOptions) => Promise<WatcherClaim[]>;
83
+ /**
84
+ * Fetches all ingestion claims for the current workspace by automatically
85
+ * paginating through every result page.
86
+ *
87
+ * Use this to get a complete snapshot of the claim queue, for example to
88
+ * audit stuck or long-running claims.
89
+ *
90
+ * @param options - Optional request options such as custom headers or an
91
+ * abort signal.
92
+ * @returns A promise resolving to a flat array of all `WatcherClaim`
93
+ * objects across every page.
94
+ *
95
+ * @example
96
+ * ```typescript
97
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
98
+ *
99
+ * const allClaims = await client.watcher.claims.listAll();
100
+ * const stale = allClaims.filter(c => c.status === 'processing' && c.age_seconds > 300);
101
+ * console.log(`Potentially stuck claims: ${stale.length}`);
102
+ * ```
103
+ */
104
+ listAll: (options?: RequestOptions) => Promise<WatcherClaim[]>;
105
+ /**
106
+ * Atomically claims the next pending document in the workspace ingestion
107
+ * queue for processing.
108
+ *
109
+ * This operation is atomic — if multiple workers call `claim()` concurrently,
110
+ * each will receive a distinct document. A worker that receives a claim is
111
+ * solely responsible for processing that document and must call
112
+ * `registerCompleted()` when done. If a claim is not completed within the
113
+ * platform's timeout window, it will be automatically released back to the
114
+ * queue for retry.
115
+ *
116
+ * Returns the claim record for the acquired document, including the document
117
+ * reference and any metadata needed to fetch and process the file.
118
+ *
119
+ * @param options - Optional request options such as custom headers or an
120
+ * abort signal.
121
+ * @returns A promise resolving to a `WatcherClaim` object representing the
122
+ * acquired document claim. If no documents are pending, the platform may
123
+ * return a claim with `status: "empty"` or reject with a 204 response
124
+ * depending on API version.
125
+ *
126
+ * @example
127
+ * ```typescript
128
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
129
+ *
130
+ * const claim = await client.watcher.claims.claim();
131
+ * console.log(`Claimed document: ${claim.document_id}, path: ${claim.storage_path}`);
132
+ *
133
+ * // ... process the document ...
134
+ *
135
+ * await client.watcher.claims.registerCompleted();
136
+ * ```
137
+ */
138
+ claim: (options?: RequestOptions) => Promise<WatcherClaim>;
139
+ /**
140
+ * Creates a new ingestion claim record with explicit attributes.
141
+ *
142
+ * This is a lower-level alternative to `claim()` for cases where you need
143
+ * to construct a claim manually rather than atomically dequeuing the next
144
+ * pending document. Most callers should prefer `claim()`.
145
+ *
146
+ * @param attributes - A record of claim attributes. Typically includes
147
+ * `document_id` (the UUID of the document to claim) and optionally a
148
+ * `worker_id` to associate the claim with a specific processing agent.
149
+ * @param options - Optional request options such as custom headers or an
150
+ * abort signal.
151
+ * @returns A promise resolving to the newly created `WatcherClaim` object.
152
+ *
153
+ * @example
154
+ * ```typescript
155
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
156
+ *
157
+ * const claim = await client.watcher.claims.create({
158
+ * document_id: 'doc_01HXYZ...',
159
+ * worker_id: 'worker-node-7',
160
+ * });
161
+ * console.log(`Claim created: ${claim.id}`);
162
+ * ```
163
+ */
164
+ create: (attributes: CreateWatcherClaimAttributes, options?: RequestOptions) => Promise<WatcherClaim>;
165
+ /**
166
+ * Updates the mutable attributes of an existing ingestion claim, for
167
+ * example to record processing progress, attach metadata, or transition
168
+ * the claim to a specific state.
169
+ *
170
+ * @param id - The UUID of the claim to update.
171
+ * @param attributes - A partial record of claim attributes to update.
172
+ * Only the provided keys are changed; omitted keys are preserved.
173
+ * @param options - Optional request options such as custom headers or an
174
+ * abort signal.
175
+ * @returns A promise resolving to the updated `WatcherClaim` object.
176
+ *
177
+ * @example
178
+ * ```typescript
179
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
180
+ *
181
+ * const updated = await client.watcher.claims.update('claim_01HXYZ...', {
182
+ * status: 'processing',
183
+ * progress_pct: 50,
184
+ * });
185
+ * console.log(`Claim status: ${updated.status}`);
186
+ * ```
187
+ */
188
+ update: (id: string, attributes: UpdateWatcherClaimAttributes, options?: RequestOptions) => Promise<WatcherClaim>;
189
+ /**
190
+ * Releases and removes an ingestion claim, returning the document to the
191
+ * queue or discarding it depending on the platform's retry configuration.
192
+ *
193
+ * Use this to abandon a claim that the current worker cannot complete (e.g.,
194
+ * due to an unrecoverable error). For successful completions, use
195
+ * `registerCompleted()` instead.
196
+ *
197
+ * @param id - The UUID of the claim to delete.
198
+ * @param options - Optional request options such as custom headers or an
199
+ * abort signal.
200
+ * @returns A promise resolving to `true` when the claim has been released.
201
+ *
202
+ * @example
203
+ * ```typescript
204
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
205
+ *
206
+ * await client.watcher.claims.delete('claim_01HXYZ...');
207
+ * console.log('Claim released back to queue.');
208
+ * ```
209
+ */
210
+ delete: (id: string, options?: RequestOptions) => Promise<true>;
211
+ /**
212
+ * Marks an ingestion claim as successfully completed, signalling to the
213
+ * platform that the document has been fully processed and the queue slot
214
+ * can be freed.
215
+ *
216
+ * This method should be called by the processing worker after it has
217
+ * successfully extracted, indexed, or otherwise handled the document
218
+ * associated with the claim. Once registered as completed, the claim
219
+ * becomes part of the immutable processing history.
220
+ *
221
+ * @param options - Optional request options such as custom headers or an
222
+ * abort signal.
223
+ * @returns A promise resolving to the completed `WatcherClaim` record
224
+ * reflecting the final state.
225
+ *
226
+ * @example
227
+ * ```typescript
228
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
229
+ *
230
+ * // After successfully processing the document:
231
+ * const completedClaim = await client.watcher.claims.registerCompleted();
232
+ * console.log(`Claim completed: ${completedClaim.id}`);
233
+ * ```
234
+ */
235
+ registerCompleted: (options?: RequestOptions) => Promise<WatcherClaim>;
236
+ /**
237
+ * Returns the current ingestion queue status for the workspace, including
238
+ * metrics such as pending document count, active claim count, and
239
+ * throughput statistics.
240
+ *
241
+ * Use this to monitor the health of the ingestion pipeline, detect queue
242
+ * build-up, or display processing status in an admin dashboard.
243
+ *
244
+ * @param options - Optional request options such as custom headers or an
245
+ * abort signal.
246
+ * @returns A promise resolving to a `WatcherClaim`-shaped record containing
247
+ * queue status fields such as `pending_count`, `active_count`, and
248
+ * `last_processed_at`.
249
+ *
250
+ * @example
251
+ * ```typescript
252
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
253
+ *
254
+ * const status = await client.watcher.claims.readStatus();
255
+ * console.log(`Queue depth: ${status.pending_count} pending document(s).`);
256
+ * ```
257
+ */
258
+ readStatus: (options?: RequestOptions) => Promise<WatcherClaim>;
259
+ /**
260
+ * Retrieves a single ingestion claim by its unique identifier.
261
+ *
262
+ * @param id - The UUID of the claim to retrieve.
263
+ * @param options - Optional request options such as custom headers or an
264
+ * abort signal.
265
+ * @returns A promise resolving to the matching `WatcherClaim` object,
266
+ * including its current status, associated document reference, and
267
+ * timestamps.
268
+ *
269
+ * @example
270
+ * ```typescript
271
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
272
+ *
273
+ * const claim = await client.watcher.claims.get('claim_01HXYZ...');
274
+ * console.log(`Claim status: ${claim.status}, document: ${claim.document_id}`);
275
+ * ```
276
+ */
277
+ get: (id: string, options?: RequestOptions) => Promise<WatcherClaim>;
278
+ };
279
+ /**
280
+ * Sub-namespace for file system and ingestion event operations.
281
+ *
282
+ * Watcher events represent discrete file system or ingestion notifications —
283
+ * for example, "a new file was uploaded to this path" or "a file was modified".
284
+ * External systems (file watchers, storage notifications, webhooks) publish
285
+ * events here to trigger the ingestion pipeline. The platform consumes these
286
+ * events and creates corresponding documents in the processing queue.
287
+ *
288
+ * Events are the entry point for the ingestion workflow: event → claim → process.
289
+ */
290
+ events: {
291
+ /**
292
+ * Publishes a new file system or ingestion event to the platform, triggering
293
+ * the ingestion pipeline for the referenced file.
294
+ *
295
+ * Use this when an external file watcher or integration detects a new or
296
+ * changed file that should be processed by the platform. The event payload
297
+ * identifies the file's storage path, type, and any relevant metadata.
298
+ *
299
+ * @param attributes - A record of event attributes. Required fields typically
300
+ * include `event_type` (e.g., `"file_created"`, `"file_modified"`),
301
+ * `storage_path` (the object storage key of the file), and optionally
302
+ * `bucket_id` and `metadata`.
303
+ * @param options - Optional request options such as custom headers or an
304
+ * abort signal.
305
+ * @returns A promise resolving to the newly created `WatcherEvent` object,
306
+ * including the platform-assigned ID and the queued status.
307
+ *
308
+ * @example
309
+ * ```typescript
310
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
311
+ *
312
+ * const event = await client.watcher.events.create({
313
+ * event_type: 'file_created',
314
+ * storage_path: 'uploads/2026/q1/contract-acme.pdf',
315
+ * bucket_id: 'bkt_01HXYZ...',
316
+ * });
317
+ * console.log(`Event queued: ${event.id}, status: ${event.status}`);
318
+ * ```
319
+ */
320
+ create: (attributes: CreateWatcherEventAttributes, options?: RequestOptions) => Promise<WatcherEvent>;
321
+ /**
322
+ * Returns a single page of watcher events for the current workspace,
323
+ * ordered by most recent first.
324
+ *
325
+ * @param options - Optional pagination and request options.
326
+ * @param options.page - The 1-based page number to retrieve (default: 1).
327
+ * @param options.pageSize - The number of events to return per page.
328
+ * @returns A promise resolving to an array of `WatcherEvent` objects for
329
+ * the requested page.
330
+ *
331
+ * @example
332
+ * ```typescript
333
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
334
+ *
335
+ * const events = await client.watcher.events.list({ pageSize: 25 });
336
+ * events.forEach(e => console.log(e.event_type, e.storage_path, e.created_at));
337
+ * ```
338
+ */
339
+ list: (options?: {
340
+ page?: number;
341
+ pageSize?: number;
342
+ } & RequestOptions) => Promise<WatcherEvent[]>;
343
+ /**
344
+ * Fetches all watcher events for the current workspace by automatically
345
+ * paginating through every result page.
346
+ *
347
+ * Use this for full audit exports or when building a complete event timeline
348
+ * without manual pagination.
349
+ *
350
+ * @param options - Optional request options such as custom headers or an
351
+ * abort signal.
352
+ * @returns A promise resolving to a flat array of all `WatcherEvent`
353
+ * objects across every page.
354
+ *
355
+ * @example
356
+ * ```typescript
357
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
358
+ *
359
+ * const allEvents = await client.watcher.events.listAll();
360
+ * const fileCreated = allEvents.filter(e => e.event_type === 'file_created');
361
+ * console.log(`Total file_created events: ${fileCreated.length}`);
362
+ * ```
363
+ */
364
+ listAll: (options?: RequestOptions) => Promise<WatcherEvent[]>;
365
+ /**
366
+ * Deletes watcher events for the current workspace.
367
+ *
368
+ * This performs a bulk delete of events matching the default scope.
369
+ * Use with caution — deleted events cannot be recovered.
370
+ *
371
+ * @param options - Optional request options such as custom headers or an
372
+ * abort signal.
373
+ * @returns A promise resolving to `true` when the deletion succeeds.
374
+ *
375
+ * @example
376
+ * ```typescript
377
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
378
+ *
379
+ * await client.watcher.events.delete();
380
+ * console.log('Watcher events cleared.');
381
+ * ```
382
+ */
383
+ delete: (options?: RequestOptions) => Promise<true>;
384
+ /**
385
+ * Publishes multiple watcher events in a single batch request.
386
+ *
387
+ * Use this when an external file watcher has accumulated several file
388
+ * system notifications and wants to submit them to the platform in one
389
+ * round-trip instead of making individual `create()` calls per event.
390
+ *
391
+ * @param options - Optional request options such as custom headers or an
392
+ * abort signal.
393
+ * @returns A promise resolving to a `WatcherEvent` object representing the
394
+ * batch submission result.
395
+ *
396
+ * @example
397
+ * ```typescript
398
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
399
+ *
400
+ * const result = await client.watcher.events.batchCreate();
401
+ * console.log(`Batch event submission accepted: ${result.id}`);
402
+ * ```
403
+ */
404
+ batchCreate: (options?: RequestOptions) => Promise<WatcherEvent>;
405
+ /**
406
+ * Retrieves a single watcher event by its unique identifier.
407
+ *
408
+ * @param id - The UUID of the watcher event to retrieve.
409
+ * @param options - Optional request options such as custom headers or an
410
+ * abort signal.
411
+ * @returns A promise resolving to the matching `WatcherEvent` object,
412
+ * including its `event_type`, `storage_path`, `status`, and timestamps.
413
+ *
414
+ * @example
415
+ * ```typescript
416
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
417
+ *
418
+ * const event = await client.watcher.events.get('evt_01HXYZ...');
419
+ * console.log(`Event type: ${event.event_type}, status: ${event.status}`);
420
+ * ```
421
+ */
422
+ get: (id: string, options?: RequestOptions) => Promise<WatcherEvent>;
423
+ };
424
+ };
425
+ //# sourceMappingURL=watcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"watcher.d.ts","sourceRoot":"","sources":["../../src/namespaces/watcher.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEzE,+DAA+D;AAC/D,MAAM,MAAM,4BAA4B,GAAG;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,CAAC;AAEF,8EAA8E;AAC9E,MAAM,MAAM,4BAA4B,GAAG;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,CAAC;AAEF,8DAA8D;AAC9D,MAAM,MAAM,4BAA4B,GAAG;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,CAAC;AACF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAKpD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,cAAc;IAErD;;;;;;;;;;;;;;;;;;OAkBG;;QAED;;;;;;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4BACuB,cAAc,KAAG,OAAO,CAAC,YAAY,EAAE,CAAC;QAYlE;;;;;;;;;;;;;;;;;WAiBG;2BACsB,cAAc,KAAG,OAAO,CAAC,IAAI,CAAC;QAIvD;;;;;;;;;;;;;;;;;;;WAmBG;gCAC2B,cAAc,KAAG,OAAO,CAAC,YAAY,CAAC;QAIpE;;;;;;;;;;;;;;;;WAgBG;kBAEG,MAAM,YACA,cAAc,KACvB,OAAO,CAAC,YAAY,CAAC;;EAS7B"}
@@ -0,0 +1,3 @@
1
+ import { RequestBuilder } from "../request-builder";
2
+ export declare function createWebhooksNamespace(_rb: RequestBuilder): {};
3
+ //# sourceMappingURL=webhooks-ns.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhooks-ns.d.ts","sourceRoot":"","sources":["../../src/namespaces/webhooks-ns.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,cAAc,MAE1D"}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * JSON:API pagination links
3
+ */
4
+ export interface PaginationLinks {
5
+ self?: string;
6
+ first?: string;
7
+ last?: string;
8
+ prev?: string | null;
9
+ next?: string | null;
10
+ }
11
+ /**
12
+ * JSON:API response with pagination
13
+ */
14
+ export interface PaginatedResponse<T> {
15
+ data: T[];
16
+ links?: PaginationLinks;
17
+ meta?: {
18
+ total_count?: number;
19
+ page_count?: number;
20
+ current_page?: number;
21
+ };
22
+ }
23
+ /**
24
+ * Options for paginated requests
25
+ */
26
+ export interface PaginationOptions {
27
+ /**
28
+ * Page size (number of items per page)
29
+ */
30
+ pageSize?: number;
31
+ /**
32
+ * Maximum total items to fetch (default: unlimited for paginateAll, 10000 for paginateToArray)
33
+ */
34
+ limit?: number;
35
+ /**
36
+ * Maximum number of pages to fetch (default: 500)
37
+ * Safety limit to prevent infinite pagination loops
38
+ */
39
+ maxPages?: number;
40
+ /**
41
+ * Optional logger for warnings. If not provided, falls back to console.
42
+ */
43
+ logger?: {
44
+ warn: (...args: unknown[]) => void;
45
+ };
46
+ }
47
+ /**
48
+ * Async iterator for paginated results.
49
+ * Security: Enforces max pages limit to prevent infinite pagination loops.
50
+ */
51
+ export declare function paginateAll<T>(fetcher: (page: number, pageSize: number) => Promise<PaginatedResponse<T>>, options?: PaginationOptions): AsyncIterableIterator<T>;
52
+ /**
53
+ * Helper to collect all paginated results into an array
54
+ * Security: Enforces default limit to prevent DoS via infinite pagination
55
+ */
56
+ export declare function paginateToArray<T>(fetcher: (page: number, pageSize: number) => Promise<PaginatedResponse<T>>, options?: PaginationOptions): Promise<T[]>;
57
+ //# sourceMappingURL=pagination.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../src/pagination.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,IAAI,CAAC,EAAE;QACL,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,MAAM,CAAC,EAAE;QAAE,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAA;KAAE,CAAC;CACjD;AAOD;;;GAGG;AACH,wBAAuB,WAAW,CAAC,CAAC,EAClC,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,EAC1E,OAAO,GAAE,iBAAsB,GAC9B,qBAAqB,CAAC,CAAC,CAAC,CAuC1B;AAOD;;;GAGG;AACH,wBAAsB,eAAe,CAAC,CAAC,EACrC,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,EAC1E,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,CAAC,EAAE,CAAC,CAad"}
@@ -0,0 +1,95 @@
1
+ import type { Client } from "./_internal/client/index";
2
+ import type { RequestOptions } from "./base-client";
3
+ import { type StreamMessageChunk, type StreamOptions } from "./streaming";
4
+ import type { PaginatedResponse } from "./pagination";
5
+ /**
6
+ * Build headers for SDK requests.
7
+ * Merges base headers with per-request overrides and idempotency keys.
8
+ */
9
+ export declare function buildHeaders(getHeaders: () => Record<string, string>, options?: RequestOptions): Record<string, string>;
10
+ /**
11
+ * RequestBuilder provides a type-safe way to execute SDK requests
12
+ * with consistent header merging, error handling, retry, and unwrapping.
13
+ */
14
+ export declare class RequestBuilder {
15
+ private clientInstance;
16
+ private getHeaders;
17
+ private unwrap;
18
+ private requestWithRetry;
19
+ constructor(clientInstance: Client, getHeaders: () => Record<string, string>, unwrap: <T>(d: unknown) => T, requestWithRetry: <T>(fn: () => Promise<T>) => Promise<T>);
20
+ /**
21
+ * Execute a generated SDK function with full middleware pipeline.
22
+ * Handles headers, retry, unwrapping, and error conversion.
23
+ */
24
+ execute<TResponse>(fn: (...args: any[]) => Promise<any>, params: Record<string, unknown>, options?: RequestOptions): Promise<TResponse>;
25
+ /**
26
+ * Execute a generated SDK function that returns flat JSON (no JSON:API data wrapper).
27
+ * Unlike execute() (which unwraps data.data for JSON:API envelopes), this returns
28
+ * the parsed response body directly. Used for generic Ash actions that return maps.
29
+ */
30
+ executeDirect<TResponse>(fn: (...args: any[]) => Promise<any>, params: Record<string, unknown>, options?: RequestOptions): Promise<TResponse>;
31
+ /**
32
+ * Execute a delete operation that returns true on success.
33
+ */
34
+ executeDelete(fn: (...args: any[]) => Promise<any>, params: Record<string, unknown>, options?: RequestOptions): Promise<true>;
35
+ /**
36
+ * Execute a raw GET request to a custom (non-generated) endpoint.
37
+ * Used for endpoints implemented as custom Phoenix controllers.
38
+ */
39
+ rawGet<TResponse>(url: string, options?: RequestOptions): Promise<TResponse>;
40
+ /**
41
+ * Execute a raw multipart/form-data POST request.
42
+ * Used for file upload endpoints (custom Phoenix controllers).
43
+ * Content-Type is omitted from headers so the browser sets the correct
44
+ * multipart boundary automatically from the FormData body.
45
+ */
46
+ rawPostMultipart<TResponse>(url: string, body: FormData, options?: RequestOptions): Promise<TResponse>;
47
+ /**
48
+ * Execute a raw POST request to a custom (non-generated) endpoint.
49
+ * Used for endpoints implemented as custom Phoenix controllers.
50
+ */
51
+ rawPost<TResponse>(url: string, body?: unknown, options?: RequestOptions): Promise<TResponse>;
52
+ /**
53
+ * Execute a raw POST to a custom endpoint that returns flat JSON (no data wrapper).
54
+ * Unlike rawPost (which unwraps data.data), this returns the response body directly.
55
+ * Used for hand-written Phoenix controllers like DocumentsController.
56
+ */
57
+ rawPostDirect<TResponse>(url: string, body?: unknown, options?: RequestOptions): Promise<TResponse>;
58
+ /**
59
+ * Execute a raw PUT request to a custom (non-generated) endpoint.
60
+ */
61
+ rawPut<TResponse>(url: string, body?: unknown, options?: RequestOptions): Promise<TResponse>;
62
+ /**
63
+ * Execute a raw PATCH request to a custom (non-generated) endpoint.
64
+ */
65
+ rawPatch<TResponse>(url: string, body?: unknown, options?: RequestOptions): Promise<TResponse>;
66
+ /**
67
+ * Execute a raw DELETE request to a custom (non-generated) endpoint.
68
+ */
69
+ rawDelete<TResponse = void>(url: string, options?: RequestOptions): Promise<TResponse>;
70
+ /**
71
+ * Create a paginated fetcher function for listAll operations.
72
+ * Encapsulates the pattern of calling a generated SDK function with pagination params.
73
+ *
74
+ * @param fn - The generated SDK function (e.g., getAgents)
75
+ * @param queryBuilder - Function that builds the query object with page params
76
+ * @param options - Request options (headers, signal, etc.)
77
+ * @returns A fetcher function for use with paginateToArray
78
+ */
79
+ createPaginatedFetcher<T>(fn: (...args: any[]) => Promise<any>, queryBuilder: (page: number, pageSize: number) => Record<string, unknown>, options?: RequestOptions): (page: number, pageSize: number) => Promise<PaginatedResponse<T>>;
80
+ /**
81
+ * Make a streaming POST request through the client instance,
82
+ * ensuring all interceptors (auth, events, API version, etc.) fire.
83
+ *
84
+ * Uses the client's `post()` method with `parseAs: 'stream'` so the
85
+ * request/response interceptors execute, then wraps the stream body
86
+ * into an SSE message iterator.
87
+ */
88
+ streamRequest(url: string, body: unknown, options?: RequestOptions, streamOptions?: StreamOptions): Promise<AsyncIterableIterator<StreamMessageChunk>>;
89
+ /**
90
+ * Make a streaming GET request through the client instance.
91
+ * Used for subscribing to SSE event streams (e.g., execution streaming).
92
+ */
93
+ streamGetRequest(url: string, options?: RequestOptions, streamOptions?: StreamOptions): Promise<AsyncIterableIterator<StreamMessageChunk>>;
94
+ }
95
+ //# sourceMappingURL=request-builder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request-builder.d.ts","sourceRoot":"","sources":["../src/request-builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,aAAa,EACnB,MAAM,aAAa,CAAC;AACrB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O,CAAC,GAAG,CAAC,EACpC,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACzE,OAAO,CAAC,EAAE,cAAc,GACvB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC;IAwBpE;;;;;;;OAOG;IACG,aAAa,CACjB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,OAAO,EACb,OAAO,CAAC,EAAE,cAAc,EACxB,aAAa,CAAC,EAAE,aAAa,GAC5B,OAAO,CAAC,qBAAqB,CAAC,kBAAkB,CAAC,CAAC;IAsDrD;;;OAGG;IACG,gBAAgB,CACpB,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,cAAc,EACxB,aAAa,CAAC,EAAE,aAAa,GAC5B,OAAO,CAAC,qBAAqB,CAAC,kBAAkB,CAAC,CAAC;CA+CtD"}
@@ -0,0 +1,32 @@
1
+ /** Valid API key prefixes */
2
+ export declare const API_KEY_PREFIXES: readonly ["sk_tenant_", "sk_app_", "sk_srv_", "sk_sys_"];
3
+ /**
4
+ * Check if a URL is considered secure for transmitting credentials.
5
+ * Localhost and 127.0.0.1 are allowed for development.
6
+ */
7
+ export declare function isSecureUrl(url: string): boolean;
8
+ /**
9
+ * Check if running in a browser environment
10
+ */
11
+ export declare function isBrowserEnvironment(): boolean;
12
+ /**
13
+ * Validate API key format
14
+ */
15
+ export declare function validateApiKey(apiKey: string): {
16
+ valid: boolean;
17
+ prefix?: string;
18
+ warning?: string;
19
+ };
20
+ /**
21
+ * Security error thrown when HTTPS is required but not used
22
+ */
23
+ export declare class InsecureConnectionError extends Error {
24
+ constructor(message: string);
25
+ }
26
+ /**
27
+ * Error thrown when API key is used in browser without opt-in
28
+ */
29
+ export declare class BrowserApiKeyError extends Error {
30
+ constructor();
31
+ }
32
+ //# sourceMappingURL=security.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"security.d.ts","sourceRoot":"","sources":["../src/security.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,eAAO,MAAM,gBAAgB,0DAKnB,CAAC;AAEX;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAUhD;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAI9C;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG;IAC9C,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAuBA;AAED;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,KAAK;gBACpC,OAAO,EAAE,MAAM;CAI5B;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,KAAK;;CAY5C"}