@sapiom/tools 0.12.0 → 0.14.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 (61) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +5 -3
  3. package/dist/cjs/client.d.ts +47 -0
  4. package/dist/cjs/client.d.ts.map +1 -1
  5. package/dist/cjs/client.js +24 -0
  6. package/dist/cjs/client.js.map +1 -1
  7. package/dist/cjs/domains/errors.d.ts +16 -0
  8. package/dist/cjs/domains/errors.d.ts.map +1 -0
  9. package/dist/cjs/domains/errors.js +36 -0
  10. package/dist/cjs/domains/errors.js.map +1 -0
  11. package/dist/cjs/domains/index.d.ts +297 -0
  12. package/dist/cjs/domains/index.d.ts.map +1 -0
  13. package/dist/cjs/domains/index.js +348 -0
  14. package/dist/cjs/domains/index.js.map +1 -0
  15. package/dist/cjs/index.d.ts +4 -0
  16. package/dist/cjs/index.d.ts.map +1 -1
  17. package/dist/cjs/index.js +7 -1
  18. package/dist/cjs/index.js.map +1 -1
  19. package/dist/cjs/memory/errors.d.ts +20 -0
  20. package/dist/cjs/memory/errors.d.ts.map +1 -0
  21. package/dist/cjs/memory/errors.js +40 -0
  22. package/dist/cjs/memory/errors.js.map +1 -0
  23. package/dist/cjs/memory/index.d.ts +318 -0
  24. package/dist/cjs/memory/index.d.ts.map +1 -0
  25. package/dist/cjs/memory/index.js +181 -0
  26. package/dist/cjs/memory/index.js.map +1 -0
  27. package/dist/cjs/stub/index.d.ts.map +1 -1
  28. package/dist/cjs/stub/index.js +102 -0
  29. package/dist/cjs/stub/index.js.map +1 -1
  30. package/dist/esm/client.d.ts +47 -0
  31. package/dist/esm/client.d.ts.map +1 -1
  32. package/dist/esm/client.js +24 -0
  33. package/dist/esm/client.js.map +1 -1
  34. package/dist/esm/domains/errors.d.ts +16 -0
  35. package/dist/esm/domains/errors.d.ts.map +1 -0
  36. package/dist/esm/domains/errors.js +31 -0
  37. package/dist/esm/domains/errors.js.map +1 -0
  38. package/dist/esm/domains/index.d.ts +297 -0
  39. package/dist/esm/domains/index.d.ts.map +1 -0
  40. package/dist/esm/domains/index.js +335 -0
  41. package/dist/esm/domains/index.js.map +1 -0
  42. package/dist/esm/index.d.ts +4 -0
  43. package/dist/esm/index.d.ts.map +1 -1
  44. package/dist/esm/index.js +4 -0
  45. package/dist/esm/index.js.map +1 -1
  46. package/dist/esm/memory/errors.d.ts +20 -0
  47. package/dist/esm/memory/errors.d.ts.map +1 -0
  48. package/dist/esm/memory/errors.js +35 -0
  49. package/dist/esm/memory/errors.js.map +1 -0
  50. package/dist/esm/memory/index.d.ts +318 -0
  51. package/dist/esm/memory/index.d.ts.map +1 -0
  52. package/dist/esm/memory/index.js +173 -0
  53. package/dist/esm/memory/index.js.map +1 -0
  54. package/dist/esm/stub/index.d.ts.map +1 -1
  55. package/dist/esm/stub/index.js +102 -0
  56. package/dist/esm/stub/index.js.map +1 -1
  57. package/dist/tsconfig.cjs.tsbuildinfo +1 -1
  58. package/dist/tsconfig.esm.tsbuildinfo +1 -1
  59. package/package.json +11 -1
  60. package/src/domains/README.md +76 -0
  61. package/src/memory/README.md +70 -0
@@ -0,0 +1,348 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DomainsHttpError = void 0;
4
+ exports.check = check;
5
+ exports.register = register;
6
+ exports.renew = renew;
7
+ exports.list = list;
8
+ exports.get = get;
9
+ exports.transferOut = transferOut;
10
+ exports.createDnsRecord = createDnsRecord;
11
+ exports.listDnsRecords = listDnsRecords;
12
+ exports.getDnsRecord = getDnsRecord;
13
+ exports.updateDnsRecord = updateDnsRecord;
14
+ exports.deleteDnsRecord = deleteDnsRecord;
15
+ /**
16
+ * `domains` capability — register domain names and manage their DNS. Check what's
17
+ * available and its price, buy a domain for a year, renew it, list and inspect the
18
+ * domains you own, and start a transfer out. A nested `dns` group creates, reads,
19
+ * updates, and deletes DNS records on a domain you own.
20
+ *
21
+ * import { domains } from "@sapiom/tools"; // ambient auth
22
+ *
23
+ * const [candidate] = await domains.check({ domainNames: ["my-app.dev"] });
24
+ * if (candidate.available) {
25
+ * await domains.register({ domainName: "my-app.dev" }); // charges apply
26
+ * await domains.dns.create({
27
+ * domainName: "my-app.dev",
28
+ * type: "A",
29
+ * host: "", // "" = the root domain
30
+ * value: "203.0.113.10",
31
+ * });
32
+ * }
33
+ *
34
+ * Or via an explicit client: `createClient({ apiKey }).domains.register(...)`.
35
+ *
36
+ * Operations are grouped:
37
+ * - top-level — check / register / renew / list / get / transferOut
38
+ * - `dns` — create / list / get / update / delete DNS records
39
+ *
40
+ * `register` and `renew` charge on success. Failed requests throw
41
+ * {@link DomainsHttpError} (carries `status` + parsed `body`).
42
+ */
43
+ const index_js_1 = require("../_client/index.js");
44
+ const service_url_js_1 = require("../_client/service-url.js");
45
+ const errors_js_1 = require("./errors.js");
46
+ Object.defineProperty(exports, "DomainsHttpError", { enumerable: true, get: function () { return errors_js_1.DomainsHttpError; } });
47
+ const DEFAULT_BASE_URL = (0, service_url_js_1.resolveServiceUrl)("namecom", process.env.SAPIOM_DOMAINS_URL);
48
+ function mapAvailability(raw) {
49
+ return {
50
+ domainName: raw.domainName,
51
+ available: raw.available,
52
+ ...(raw.purchasePrice != null && { purchasePrice: raw.purchasePrice }),
53
+ ...(raw.renewalPrice != null && { renewalPrice: raw.renewalPrice }),
54
+ ...(raw.premium !== undefined && { premium: raw.premium }),
55
+ };
56
+ }
57
+ function mapDomain(raw) {
58
+ return {
59
+ domainName: raw.domainName,
60
+ ...(raw.status !== undefined && { status: raw.status }),
61
+ ...(raw.expiresAt !== undefined && { expiresAt: raw.expiresAt }),
62
+ ...(raw.registeredAt !== undefined && { registeredAt: raw.registeredAt }),
63
+ ...(raw.purchasePrice != null && { purchasePrice: raw.purchasePrice }),
64
+ ...(raw.renewalPrice != null && { renewalPrice: raw.renewalPrice }),
65
+ ...(raw.nameservers !== undefined && { nameservers: raw.nameservers }),
66
+ ...(raw.locked !== undefined && { locked: raw.locked }),
67
+ ...(raw.premium !== undefined && { premium: raw.premium }),
68
+ ...(raw.tld !== undefined && { tld: raw.tld }),
69
+ ...(raw.transferEligibleAt !== undefined && {
70
+ transferEligibleAt: raw.transferEligibleAt,
71
+ }),
72
+ };
73
+ }
74
+ function mapDomainTransfer(raw) {
75
+ return {
76
+ domainName: raw.domainName,
77
+ ...(raw.authCode != null && { authCode: raw.authCode }),
78
+ ...(raw.transferInstructions != null && {
79
+ transferInstructions: raw.transferInstructions,
80
+ }),
81
+ };
82
+ }
83
+ function mapDnsRecord(raw) {
84
+ return {
85
+ recordId: raw.id,
86
+ domainName: raw.domainName,
87
+ type: raw.type,
88
+ host: raw.host,
89
+ ...(raw.fqdn != null && { fqdn: raw.fqdn }),
90
+ value: raw.value,
91
+ ttl: raw.ttl,
92
+ ...(raw.priority != null && { priority: raw.priority }),
93
+ ...(raw.createdAt != null && { createdAt: raw.createdAt }),
94
+ };
95
+ }
96
+ // ===========================================================================
97
+ // Guards & request shaping
98
+ // ===========================================================================
99
+ /**
100
+ * Guard a required string (a domain name / record id) client-side, so a JS caller
101
+ * passing null / undefined / "" gets a clear error instead of a confusing request
102
+ * to a malformed path.
103
+ */
104
+ function assertString(value, label) {
105
+ if (typeof value !== "string" || value.trim() === "") {
106
+ throw new errors_js_1.DomainsHttpError(`${label} is required and must be a non-empty string`, 400, undefined);
107
+ }
108
+ return value;
109
+ }
110
+ /** Percent-encode a single path segment (a domain name is one segment; dots are preserved). */
111
+ function encodeSegment(value) {
112
+ return encodeURIComponent(value);
113
+ }
114
+ /** Copy a value onto `body` only when it is neither undefined nor null. */
115
+ function set(body, key, value) {
116
+ if (value !== undefined && value !== null)
117
+ body[key] = value;
118
+ }
119
+ const JSON_HEADERS = { "content-type": "application/json" };
120
+ // ===========================================================================
121
+ // Domains — operations
122
+ // ===========================================================================
123
+ /**
124
+ * Check whether one or more domain names are available and get their price. Free.
125
+ * Use this first, in a workflow step that turns an idea into candidate names,
126
+ * before deciding what to `register`.
127
+ *
128
+ * @param input - `{ domainNames }` — 1 to 50 names to check.
129
+ * @returns One availability result per name (with pricing when available).
130
+ * @throws {DomainsHttpError} on a non-2xx response.
131
+ *
132
+ * @example
133
+ * const results = await domains.check({ domainNames: ["my-app.dev", "my-app.io"] });
134
+ * const buyable = results.filter((r) => r.available);
135
+ */
136
+ async function check(input, transport = (0, index_js_1.defaultTransport)(), baseUrl = DEFAULT_BASE_URL) {
137
+ const domainNames = input?.domainNames;
138
+ if (!Array.isArray(domainNames) || domainNames.length === 0) {
139
+ throw new errors_js_1.DomainsHttpError("domainNames is required and must be a non-empty array", 400, undefined);
140
+ }
141
+ const res = await (0, errors_js_1.ensureOk)(await transport.fetch(`${baseUrl}/v1/domains/check`, {
142
+ method: "POST",
143
+ headers: JSON_HEADERS,
144
+ body: JSON.stringify({ domainNames }),
145
+ }), "Failed to check domain availability");
146
+ const raw = (await res.json());
147
+ return raw.results.map(mapAvailability);
148
+ }
149
+ /**
150
+ * Register (buy) a domain for one year. Charges apply on success and the purchase
151
+ * is not reversible. Use in a workflow step to acquire a brand's domain before
152
+ * configuring DNS or email for it; confirm availability and price with `check`
153
+ * first.
154
+ *
155
+ * @param input - `{ domainName }` — the domain to register.
156
+ * @returns The newly registered domain.
157
+ * @throws {DomainsHttpError} on a non-2xx response (e.g. already registered, or a price change).
158
+ *
159
+ * @example
160
+ * const domain = await domains.register({ domainName: "my-app.dev" });
161
+ */
162
+ async function register(input, transport = (0, index_js_1.defaultTransport)(), baseUrl = DEFAULT_BASE_URL) {
163
+ const domainName = assertString(input?.domainName, "domainName");
164
+ const res = await (0, errors_js_1.ensureOk)(await transport.fetch(`${baseUrl}/v1/domains`, {
165
+ method: "POST",
166
+ headers: JSON_HEADERS,
167
+ body: JSON.stringify({ domainName }),
168
+ }), `Failed to register domain '${domainName}'`);
169
+ return mapDomain((await res.json()));
170
+ }
171
+ /**
172
+ * Renew a domain you own for one more year. Charges apply on success. Use in a
173
+ * workflow step that keeps a domain from expiring; read the renewal price from
174
+ * `get` first if you want to check it.
175
+ *
176
+ * @param input - `{ domainName }` — the domain to renew.
177
+ * @returns The domain with its updated expiry.
178
+ * @throws {DomainsHttpError} on a non-2xx response (e.g. not owned, or a price change).
179
+ *
180
+ * @example
181
+ * const domain = await domains.renew({ domainName: "my-app.dev" });
182
+ */
183
+ async function renew(input, transport = (0, index_js_1.defaultTransport)(), baseUrl = DEFAULT_BASE_URL) {
184
+ const domainName = assertString(input?.domainName, "domainName");
185
+ const res = await (0, errors_js_1.ensureOk)(await transport.fetch(`${baseUrl}/v1/domains/${encodeSegment(domainName)}/renew`, { method: "POST", headers: JSON_HEADERS, body: "{}" }), `Failed to renew domain '${domainName}'`);
186
+ return mapDomain((await res.json()));
187
+ }
188
+ /**
189
+ * List the domains you own. Free. Use in a workflow step to discover or iterate
190
+ * over the domains available to configure.
191
+ *
192
+ * @returns Your domains, each with status, expiry, and renewal price.
193
+ * @throws {DomainsHttpError} on a non-2xx response.
194
+ *
195
+ * @example
196
+ * const owned = await domains.list();
197
+ */
198
+ async function list(transport = (0, index_js_1.defaultTransport)(), baseUrl = DEFAULT_BASE_URL) {
199
+ const res = await (0, errors_js_1.ensureOk)(await transport.fetch(`${baseUrl}/v1/domains`), "Failed to list domains");
200
+ const raw = (await res.json());
201
+ return raw.map(mapDomain);
202
+ }
203
+ /**
204
+ * Get full details for a domain you own — nameservers, lock status, renewal price,
205
+ * and transfer eligibility. Free. Use in a workflow step before changing DNS or
206
+ * starting a transfer, when you need the domain's current state.
207
+ *
208
+ * @param input - `{ domainName }` — the domain to look up.
209
+ * @returns The domain's details.
210
+ * @throws {DomainsHttpError} on a non-2xx response (e.g. not owned).
211
+ *
212
+ * @example
213
+ * const detail = await domains.get({ domainName: "my-app.dev" });
214
+ */
215
+ async function get(input, transport = (0, index_js_1.defaultTransport)(), baseUrl = DEFAULT_BASE_URL) {
216
+ const domainName = assertString(input?.domainName, "domainName");
217
+ const res = await (0, errors_js_1.ensureOk)(await transport.fetch(`${baseUrl}/v1/domains/${encodeSegment(domainName)}`), `Failed to get domain '${domainName}'`);
218
+ return mapDomain((await res.json()));
219
+ }
220
+ /**
221
+ * Start transferring a domain you own out to another registrar. Returns an auth
222
+ * code to hand the receiving registrar. Disruptive — this unlocks the domain and
223
+ * begins the transfer; use in a workflow step only when you intend to move the
224
+ * domain away.
225
+ *
226
+ * @param input - `{ domainName }` — the domain to transfer out.
227
+ * @returns The auth code and transfer instructions.
228
+ * @throws {DomainsHttpError} on a non-2xx response (e.g. not owned, or still transfer-locked).
229
+ *
230
+ * @example
231
+ * const { authCode } = await domains.transferOut({ domainName: "my-app.dev" });
232
+ */
233
+ async function transferOut(input, transport = (0, index_js_1.defaultTransport)(), baseUrl = DEFAULT_BASE_URL) {
234
+ const domainName = assertString(input?.domainName, "domainName");
235
+ const res = await (0, errors_js_1.ensureOk)(await transport.fetch(`${baseUrl}/v1/domains/${encodeSegment(domainName)}`, { method: "DELETE" }), `Failed to transfer out domain '${domainName}'`);
236
+ return mapDomainTransfer((await res.json()));
237
+ }
238
+ // ===========================================================================
239
+ // DNS records — operations
240
+ // ===========================================================================
241
+ /**
242
+ * Create a DNS record on a domain you own. Free. Use in a workflow step to point a
243
+ * domain at a host (A/AAAA/CNAME), route its email (MX), or add verification text
244
+ * (TXT). Use `host: ""` for the root domain, or a subdomain like "www".
245
+ *
246
+ * @param input - `{ domainName, type, host, value, ttl?, priority? }`.
247
+ * @returns The created record (with its `recordId`).
248
+ * @throws {DomainsHttpError} on a non-2xx response.
249
+ *
250
+ * @example
251
+ * const record = await domains.dns.create({
252
+ * domainName: "my-app.dev",
253
+ * type: "A",
254
+ * host: "",
255
+ * value: "203.0.113.10",
256
+ * });
257
+ */
258
+ async function createDnsRecord(input, transport = (0, index_js_1.defaultTransport)(), baseUrl = DEFAULT_BASE_URL) {
259
+ const domainName = assertString(input?.domainName, "domainName");
260
+ const body = {
261
+ type: input.type,
262
+ host: input.host,
263
+ value: input.value,
264
+ };
265
+ set(body, "ttl", input.ttl);
266
+ set(body, "priority", input.priority);
267
+ const res = await (0, errors_js_1.ensureOk)(await transport.fetch(`${baseUrl}/v1/domains/${encodeSegment(domainName)}/records`, { method: "POST", headers: JSON_HEADERS, body: JSON.stringify(body) }), `Failed to create DNS record on '${domainName}'`);
268
+ return mapDnsRecord((await res.json()));
269
+ }
270
+ /**
271
+ * List the DNS records on a domain you own. Free. Use in a workflow step to read
272
+ * the current records (e.g. to find a `recordId` to update or delete).
273
+ *
274
+ * @param input - `{ domainName }` — the domain whose records to list.
275
+ * @returns The domain's DNS records.
276
+ * @throws {DomainsHttpError} on a non-2xx response.
277
+ *
278
+ * @example
279
+ * const records = await domains.dns.list({ domainName: "my-app.dev" });
280
+ */
281
+ async function listDnsRecords(input, transport = (0, index_js_1.defaultTransport)(), baseUrl = DEFAULT_BASE_URL) {
282
+ const domainName = assertString(input?.domainName, "domainName");
283
+ const res = await (0, errors_js_1.ensureOk)(await transport.fetch(`${baseUrl}/v1/domains/${encodeSegment(domainName)}/records`), `Failed to list DNS records on '${domainName}'`);
284
+ const raw = (await res.json());
285
+ return raw.map(mapDnsRecord);
286
+ }
287
+ /**
288
+ * Get a single DNS record on a domain you own. Free. Use in a workflow step when
289
+ * you have a `recordId` and need the record's current values.
290
+ *
291
+ * @param input - `{ domainName, recordId }`.
292
+ * @returns The DNS record.
293
+ * @throws {DomainsHttpError} on a non-2xx response (e.g. record not found).
294
+ *
295
+ * @example
296
+ * const record = await domains.dns.get({ domainName: "my-app.dev", recordId });
297
+ */
298
+ async function getDnsRecord(input, transport = (0, index_js_1.defaultTransport)(), baseUrl = DEFAULT_BASE_URL) {
299
+ const domainName = assertString(input?.domainName, "domainName");
300
+ const recordId = assertString(input?.recordId, "recordId");
301
+ const res = await (0, errors_js_1.ensureOk)(await transport.fetch(`${baseUrl}/v1/domains/${encodeSegment(domainName)}/records/${encodeSegment(recordId)}`), `Failed to get DNS record '${recordId}'`);
302
+ return mapDnsRecord((await res.json()));
303
+ }
304
+ /**
305
+ * Update a DNS record on a domain you own. Free. Provide only the fields you want
306
+ * to change. Use in a workflow step to repoint a record (e.g. change an A record's
307
+ * IP) without recreating it.
308
+ *
309
+ * @param input - `{ domainName, recordId, type?, host?, value?, ttl?, priority? }`.
310
+ * @returns The updated record.
311
+ * @throws {DomainsHttpError} on a non-2xx response.
312
+ *
313
+ * @example
314
+ * const updated = await domains.dns.update({
315
+ * domainName: "my-app.dev",
316
+ * recordId,
317
+ * value: "198.51.100.7",
318
+ * });
319
+ */
320
+ async function updateDnsRecord(input, transport = (0, index_js_1.defaultTransport)(), baseUrl = DEFAULT_BASE_URL) {
321
+ const domainName = assertString(input?.domainName, "domainName");
322
+ const recordId = assertString(input?.recordId, "recordId");
323
+ const body = {};
324
+ set(body, "type", input.type);
325
+ set(body, "host", input.host);
326
+ set(body, "value", input.value);
327
+ set(body, "ttl", input.ttl);
328
+ set(body, "priority", input.priority);
329
+ const res = await (0, errors_js_1.ensureOk)(await transport.fetch(`${baseUrl}/v1/domains/${encodeSegment(domainName)}/records/${encodeSegment(recordId)}`, { method: "PUT", headers: JSON_HEADERS, body: JSON.stringify(body) }), `Failed to update DNS record '${recordId}'`);
330
+ return mapDnsRecord((await res.json()));
331
+ }
332
+ /**
333
+ * Delete a DNS record from a domain you own. Free. Use in a workflow step to
334
+ * remove a record you no longer need.
335
+ *
336
+ * @param input - `{ domainName, recordId }`.
337
+ * @returns Nothing.
338
+ * @throws {DomainsHttpError} on a non-2xx response.
339
+ *
340
+ * @example
341
+ * await domains.dns.delete({ domainName: "my-app.dev", recordId });
342
+ */
343
+ async function deleteDnsRecord(input, transport = (0, index_js_1.defaultTransport)(), baseUrl = DEFAULT_BASE_URL) {
344
+ const domainName = assertString(input?.domainName, "domainName");
345
+ const recordId = assertString(input?.recordId, "recordId");
346
+ await (0, errors_js_1.ensureOk)(await transport.fetch(`${baseUrl}/v1/domains/${encodeSegment(domainName)}/records/${encodeSegment(recordId)}`, { method: "DELETE" }), `Failed to delete DNS record '${recordId}'`);
347
+ }
348
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domains/index.ts"],"names":[],"mappings":";;;AAiUA,sBAuBC;AAeD,4BAeC;AAcD,sBAcC;AAYD,oBAUC;AAcD,kBAWC;AAeD,kCAcC;AAuBD,0CAsBC;AAaD,wCAcC;AAaD,oCAcC;AAkBD,0CAsBC;AA6BQ,0CAAe;AAtoBxB;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,kDAAkE;AAClE,8DAA8D;AAC9D,2CAAyD;AAEhD,iGAFU,4BAAgB,OAEV;AAEzB,MAAM,gBAAgB,GAAG,IAAA,kCAAiB,EACxC,SAAS,EACT,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAC/B,CAAC;AAuLF,SAAS,eAAe,CAAC,GAAoB;IAC3C,OAAO;QACL,UAAU,EAAE,GAAG,CAAC,UAAU;QAC1B,SAAS,EAAE,GAAG,CAAC,SAAS;QACxB,GAAG,CAAC,GAAG,CAAC,aAAa,IAAI,IAAI,IAAI,EAAE,aAAa,EAAE,GAAG,CAAC,aAAa,EAAE,CAAC;QACtE,GAAG,CAAC,GAAG,CAAC,YAAY,IAAI,IAAI,IAAI,EAAE,YAAY,EAAE,GAAG,CAAC,YAAY,EAAE,CAAC;QACnE,GAAG,CAAC,GAAG,CAAC,OAAO,KAAK,SAAS,IAAI,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC;KAC3D,CAAC;AACJ,CAAC;AAED,SAAS,SAAS,CAAC,GAAc;IAC/B,OAAO;QACL,UAAU,EAAE,GAAG,CAAC,UAAU;QAC1B,GAAG,CAAC,GAAG,CAAC,MAAM,KAAK,SAAS,IAAI,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC;QACvD,GAAG,CAAC,GAAG,CAAC,SAAS,KAAK,SAAS,IAAI,EAAE,SAAS,EAAE,GAAG,CAAC,SA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EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CACrE,EACD,gCAAgC,QAAQ,GAAG,CAC5C,CAAC;IACF,OAAO,YAAY,CAAC,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAAiB,CAAC,CAAC;AAC1D,CAAC;AAED;;;;;;;;;;GAUG;AACH,KAAK,UAAU,eAAe,CAC5B,KAAmB,EACnB,YAAuB,IAAA,2BAAgB,GAAE,EACzC,OAAO,GAAG,gBAAgB;IAE1B,MAAM,UAAU,GAAG,YAAY,CAAC,KAAK,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC;IACjE,MAAM,QAAQ,GAAG,YAAY,CAAC,KAAK,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;IAC3D,MAAM,IAAA,oBAAQ,EACZ,MAAM,SAAS,CAAC,KAAK,CACnB,GAAG,OAAO,eAAe,aAAa,CAAC,UAAU,CAAC,YAAY,aAAa,CAAC,QAAQ,CAAC,EAAE,EACvF,EAAE,MAAM,EAAE,QAAQ,EAAE,CACrB,EACD,gCAAgC,QAAQ,GAAG,CAC5C,CAAC;AACJ,CAAC"}
@@ -44,4 +44,8 @@ export * as database from "./database/index.js";
44
44
  export { DatabaseHttpError } from "./database/index.js";
45
45
  export * as email from "./email/index.js";
46
46
  export { EmailHttpError } from "./email/index.js";
47
+ export * as domains from "./domains/index.js";
48
+ export { DomainsHttpError } from "./domains/index.js";
49
+ export * as memory from "./memory/index.js";
50
+ export { MemoryHttpError } from "./memory/index.js";
47
51
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAChE,YAAY,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,YAAY,EAAE,eAAe,E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AAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
package/dist/cjs/index.js CHANGED
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.EmailHttpError = exports.email = exports.DatabaseHttpError = exports.database = exports.SearchHttpError = exports.search = exports.toVideoResumePayload = exports.VIDEO_RESULT_SIGNAL = exports.ContentGenerationHttpError = exports.contentGeneration = exports.FileStorageHttpError = exports.fileStorage = exports.OrchestrationResultSchemaError = exports.orchestrationResultSchema = exports.schedules = exports.ORCHESTRATIONS_RESULT_SIGNAL = exports.orchestrations = exports.AgentRunResultSchemaError = exports.agentRunResultSchema = exports.AGENT_RUN_RESULT_SIGNAL = exports.EXECUTION_ENVIRONMENT_BLAXEL_SANDBOX = exports.toResumePayload = exports.CodingResultSchemaError = exports.codingResultSchema = exports.CODING_RESULT_SIGNAL = exports.agent = exports.Repository = exports.repositories = exports.Sandbox = exports.sandboxes = exports.createClientFromEnv = exports.createClient = void 0;
36
+ exports.MemoryHttpError = exports.memory = exports.DomainsHttpError = exports.domains = exports.EmailHttpError = exports.email = exports.DatabaseHttpError = exports.database = exports.SearchHttpError = exports.search = exports.toVideoResumePayload = exports.VIDEO_RESULT_SIGNAL = exports.ContentGenerationHttpError = exports.contentGeneration = exports.FileStorageHttpError = exports.fileStorage = exports.OrchestrationResultSchemaError = exports.orchestrationResultSchema = exports.schedules = exports.ORCHESTRATIONS_RESULT_SIGNAL = exports.orchestrations = exports.AgentRunResultSchemaError = exports.agentRunResultSchema = exports.AGENT_RUN_RESULT_SIGNAL = exports.EXECUTION_ENVIRONMENT_BLAXEL_SANDBOX = exports.toResumePayload = exports.CodingResultSchemaError = exports.codingResultSchema = exports.CODING_RESULT_SIGNAL = exports.agent = exports.Repository = exports.repositories = exports.Sandbox = exports.sandboxes = exports.createClientFromEnv = exports.createClient = void 0;
37
37
  /**
38
38
  * `@sapiom/tools` — the typed Sapiom capability client.
39
39
  *
@@ -106,4 +106,10 @@ Object.defineProperty(exports, "DatabaseHttpError", { enumerable: true, get: fun
106
106
  exports.email = __importStar(require("./email/index.js"));
107
107
  var index_js_15 = require("./email/index.js");
108
108
  Object.defineProperty(exports, "EmailHttpError", { enumerable: true, get: function () { return index_js_15.EmailHttpError; } });
109
+ exports.domains = __importStar(require("./domains/index.js"));
110
+ var index_js_16 = require("./domains/index.js");
111
+ Object.defineProperty(exports, "DomainsHttpError", { enumerable: true, get: function () { return index_js_16.DomainsHttpError; } });
112
+ exports.memory = __importStar(require("./memory/index.js"));
113
+ var index_js_17 = require("./memory/index.js");
114
+ Object.defineProperty(exports, "MemoryHttpError", { enumerable: true, get: function () { return index_js_17.MemoryHttpError; } });
109
115
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;GAYG;AACH,yCAAgE;AAAvD,yGAAA,YAAY,OAAA;AAAE,gHAAA,mBAAmB,OAAA;AAQ1C,kEAAkD;AAClD,iDAA+C;AAAtC,mGAAA,OAAO,OAAA;AAEhB,wEAAwD;AACxD,oDAAqD;AAA5C,sGAAA,UAAU,OAAA;AAEnB,0DAA0C;AAC1C,iFAAiF;AACjF,6CAAwD;AAA/C,gHAAA,oBAAoB,OAAA;AAO7B,+EAA+E;AAC/E,2CAA2C;AAC3C,6CAK0B;AAJxB,8GAAA,kBAAkB,OAAA;AAClB,mHAAA,uBAAuB,OAAA;AACvB,2GAAA,eAAe,OAAA;AACf,gIAAA,oCAAoC,OAAA;AAEtC,kFAAkF;AAClF,kFAAkF;AAClF,8DAA8D;AAC9D,6CAA2D;AAAlD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AAA;AAEtC,kFAAkF;AAClF,kFAAkF;AAClF,8DAA8D;AAC9D,6CAA2D;AAAlD,mHAAA,uBAAuB,OAAA;AAWhC,6CAG0B;AAFxB,gHAAA,oBAAoB,OAAA;AACpB,qHAAA,yBAAyB,OAAA;AAG3B,4EAA4D;AAC5D,iFAAiF;AACjF,sDAAyE;AAAhE,wHAAA,4BAA4B,OAAA;AAErC,kFAAkF;AAClF,kEAAkD;AAIlD,oEAAoE;AACpE,sDAGmC;AAFjC,qHAAA,yBAAyB,OAAA;AACzB,0HAAA,8BAA8B,OAAA;AAGhC,uEAAuD;AACvD,oDAA+D;AAAtD,gHAAA,oBAAoB,OAAA;AAE7B,mFAAmE;AACnE,2DAA2E;AAAlE,uHAAA,0BAA0B,OAAA;AACnC,iFAAiF;AACjF,2DAAoE;AAA3D,gHAAA,mBAAmB,OAAA;AAI5B,gFAAgF;AAChF,2DAAqE;AAA5D,iHAAA,oBAAoB,OAAA;AAE7B,4DAA4C;AAC5C,+CAAoD;AAA3C,4GAAA,eAAe,OAAA;AAExB,gEAAgD;AAChD,iDAAwD;AAA/C,8GAAA,iBAAiB,OAAA;AAE1B,0DAA0C;AAC1C,8CAAkD;AAAzC,2GAAA,cAAc,OAAA;AAEvB,8DAA8C;AAC9C,gDAAsD;AAA7C,6GAAA,gBAAgB,OAAA;AAEzB,4DAA4C;AAC5C,+CAAoD;AAA3C,4GAAA,eAAe,OAAA"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Error thrown by the memory capability when the gateway returns a non-2xx
3
+ * response. Exposes `status` (HTTP status code) and `body` (parsed JSON body, or
4
+ * raw text when the body isn't JSON) for programmatic inspection.
5
+ *
6
+ * Useful statuses to branch on: `400` (validation or `SecretDetected`), `401`
7
+ * (missing identity), `402` (route gate balance), `403` (ownership failure),
8
+ * `404` (`get` only), `422` (resource limit), and `507` (store full).
9
+ */
10
+ export declare class MemoryHttpError extends Error {
11
+ readonly status: number;
12
+ readonly body: unknown;
13
+ constructor(message: string, status: number, body: unknown);
14
+ }
15
+ /**
16
+ * Return the response when 2xx, otherwise throw a {@link MemoryHttpError}.
17
+ * Parses the error body as JSON when possible; falls back to raw text.
18
+ */
19
+ export declare function ensureOk(response: Response, errorPrefix: string): Promise<Response>;
20
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/memory/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,qBAAa,eAAgB,SAAQ,KAAK;IACxC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;gBAEX,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO;CAM3D;AAED;;;GAGG;AACH,wBAAsB,QAAQ,CAC5B,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,QAAQ,CAAC,CAcnB"}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MemoryHttpError = void 0;
4
+ exports.ensureOk = ensureOk;
5
+ /**
6
+ * Error thrown by the memory capability when the gateway returns a non-2xx
7
+ * response. Exposes `status` (HTTP status code) and `body` (parsed JSON body, or
8
+ * raw text when the body isn't JSON) for programmatic inspection.
9
+ *
10
+ * Useful statuses to branch on: `400` (validation or `SecretDetected`), `401`
11
+ * (missing identity), `402` (route gate balance), `403` (ownership failure),
12
+ * `404` (`get` only), `422` (resource limit), and `507` (store full).
13
+ */
14
+ class MemoryHttpError extends Error {
15
+ constructor(message, status, body) {
16
+ super(message);
17
+ this.name = "MemoryHttpError";
18
+ this.status = status;
19
+ this.body = body;
20
+ }
21
+ }
22
+ exports.MemoryHttpError = MemoryHttpError;
23
+ /**
24
+ * Return the response when 2xx, otherwise throw a {@link MemoryHttpError}.
25
+ * Parses the error body as JSON when possible; falls back to raw text.
26
+ */
27
+ async function ensureOk(response, errorPrefix) {
28
+ if (response.ok)
29
+ return response;
30
+ let body;
31
+ const text = await response.text().catch(() => "");
32
+ try {
33
+ body = JSON.parse(text);
34
+ }
35
+ catch {
36
+ body = text;
37
+ }
38
+ throw new MemoryHttpError(`${errorPrefix}: ${response.status} ${text}`, response.status, body);
39
+ }
40
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/memory/errors.ts"],"names":[],"mappings":";;;AAyBA,4BAiBC;AA1CD;;;;;;;;GAQG;AACH,MAAa,eAAgB,SAAQ,KAAK;IAIxC,YAAY,OAAe,EAAE,MAAc,EAAE,IAAa;QACxD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;QAC9B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AAVD,0CAUC;AAED;;;GAGG;AACI,KAAK,UAAU,QAAQ,CAC5B,QAAkB,EAClB,WAAmB;IAEnB,IAAI,QAAQ,CAAC,EAAE;QAAE,OAAO,QAAQ,CAAC;IACjC,IAAI,IAAa,CAAC;IAClB,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;IACnD,IAAI,CAAC;QACH,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAAC,MAAM,CAAC;QACP,IAAI,GAAG,IAAI,CAAC;IACd,CAAC;IACD,MAAM,IAAI,eAAe,CACvB,GAAG,WAAW,KAAK,QAAQ,CAAC,MAAM,IAAI,IAAI,EAAE,EAC5C,QAAQ,CAAC,MAAM,EACf,IAAI,CACL,CAAC;AACJ,CAAC"}