@neon/sdk 1.4.0 → 1.5.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 (168) hide show
  1. package/README.md +64 -3
  2. package/dist/_virtual/_rolldown/runtime.js +1 -2
  3. package/dist/index.d.ts +2 -2
  4. package/dist/index.js +2 -2
  5. package/dist/neon/config.d.ts +13 -0
  6. package/dist/neon/config.d.ts.map +1 -1
  7. package/dist/neon/config.js +2 -0
  8. package/dist/neon/config.js.map +1 -1
  9. package/dist/neon/context.d.ts +26 -6
  10. package/dist/neon/context.d.ts.map +1 -1
  11. package/dist/neon/context.js +59 -10
  12. package/dist/neon/context.js.map +1 -1
  13. package/dist/neon/deadline.d.ts +81 -0
  14. package/dist/neon/deadline.d.ts.map +1 -0
  15. package/dist/neon/deadline.js +143 -0
  16. package/dist/neon/deadline.js.map +1 -0
  17. package/dist/neon/errors.d.ts +22 -3
  18. package/dist/neon/errors.d.ts.map +1 -1
  19. package/dist/neon/errors.js +22 -2
  20. package/dist/neon/errors.js.map +1 -1
  21. package/dist/neon/paginate.d.ts +6 -1
  22. package/dist/neon/paginate.d.ts.map +1 -1
  23. package/dist/neon/paginate.js +59 -24
  24. package/dist/neon/paginate.js.map +1 -1
  25. package/dist/neon/raw-wrap.d.ts.map +1 -1
  26. package/dist/neon/raw-wrap.js +17 -2
  27. package/dist/neon/raw-wrap.js.map +1 -1
  28. package/dist/neon/resources/account.d.ts.map +1 -1
  29. package/dist/neon/resources/account.js +18 -12
  30. package/dist/neon/resources/account.js.map +1 -1
  31. package/dist/neon/resources/ai-gateway.js +3 -2
  32. package/dist/neon/resources/ai-gateway.js.map +1 -1
  33. package/dist/neon/resources/auth.d.ts.map +1 -1
  34. package/dist/neon/resources/auth.js +42 -28
  35. package/dist/neon/resources/auth.js.map +1 -1
  36. package/dist/neon/resources/branches.d.ts +1 -1
  37. package/dist/neon/resources/branches.d.ts.map +1 -1
  38. package/dist/neon/resources/branches.js +29 -20
  39. package/dist/neon/resources/branches.js.map +1 -1
  40. package/dist/neon/resources/bucket-objects.d.ts.map +1 -1
  41. package/dist/neon/resources/bucket-objects.js +15 -10
  42. package/dist/neon/resources/bucket-objects.js.map +1 -1
  43. package/dist/neon/resources/buckets.d.ts.map +1 -1
  44. package/dist/neon/resources/buckets.js +9 -6
  45. package/dist/neon/resources/buckets.js.map +1 -1
  46. package/dist/neon/resources/consumption.d.ts +4 -4
  47. package/dist/neon/resources/consumption.d.ts.map +1 -1
  48. package/dist/neon/resources/consumption.js +6 -6
  49. package/dist/neon/resources/consumption.js.map +1 -1
  50. package/dist/neon/resources/credentials.d.ts.map +1 -1
  51. package/dist/neon/resources/credentials.js +9 -6
  52. package/dist/neon/resources/credentials.js.map +1 -1
  53. package/dist/neon/resources/dataapi.d.ts.map +1 -1
  54. package/dist/neon/resources/dataapi.js +12 -8
  55. package/dist/neon/resources/dataapi.js.map +1 -1
  56. package/dist/neon/resources/databases.d.ts.map +1 -1
  57. package/dist/neon/resources/databases.js +15 -10
  58. package/dist/neon/resources/databases.js.map +1 -1
  59. package/dist/neon/resources/endpoints.d.ts.map +1 -1
  60. package/dist/neon/resources/endpoints.js +27 -18
  61. package/dist/neon/resources/endpoints.js.map +1 -1
  62. package/dist/neon/resources/functions.d.ts +1 -1
  63. package/dist/neon/resources/functions.d.ts.map +1 -1
  64. package/dist/neon/resources/functions.js +14 -10
  65. package/dist/neon/resources/functions.js.map +1 -1
  66. package/dist/neon/resources/operations.d.ts +12 -3
  67. package/dist/neon/resources/operations.d.ts.map +1 -1
  68. package/dist/neon/resources/operations.js +5 -4
  69. package/dist/neon/resources/operations.js.map +1 -1
  70. package/dist/neon/resources/postgres.d.ts.map +1 -1
  71. package/dist/neon/resources/postgres.js +9 -1
  72. package/dist/neon/resources/postgres.js.map +1 -1
  73. package/dist/neon/resources/projects.d.ts +1 -1
  74. package/dist/neon/resources/projects.d.ts.map +1 -1
  75. package/dist/neon/resources/projects.js +35 -24
  76. package/dist/neon/resources/projects.js.map +1 -1
  77. package/dist/neon/resources/roles.d.ts.map +1 -1
  78. package/dist/neon/resources/roles.js +18 -12
  79. package/dist/neon/resources/roles.js.map +1 -1
  80. package/dist/neon/resources/snapshots.d.ts +10 -1
  81. package/dist/neon/resources/snapshots.d.ts.map +1 -1
  82. package/dist/neon/resources/snapshots.js +37 -19
  83. package/dist/neon/resources/snapshots.js.map +1 -1
  84. package/dist/neon/resources/storage.js +3 -2
  85. package/dist/neon/resources/storage.js.map +1 -1
  86. package/dist/neon/retry.d.ts +30 -8
  87. package/dist/neon/retry.d.ts.map +1 -1
  88. package/dist/neon/retry.js +59 -20
  89. package/dist/neon/retry.js.map +1 -1
  90. package/dist/neon/wait.d.ts +7 -1
  91. package/dist/neon/wait.d.ts.map +1 -1
  92. package/dist/neon/wait.js +53 -34
  93. package/dist/neon/wait.js.map +1 -1
  94. package/package.json +3 -2
  95. package/dist/neon/client.test-d.d.ts +0 -1
  96. package/dist/neon/client.test-d.js +0 -98
  97. package/dist/neon/client.test-d.js.map +0 -1
  98. package/dist/node_modules/.pnpm/@vitest_pretty-format@3.0.9/node_modules/@vitest/pretty-format/dist/index.js +0 -879
  99. package/dist/node_modules/.pnpm/@vitest_pretty-format@3.0.9/node_modules/@vitest/pretty-format/dist/index.js.map +0 -1
  100. package/dist/node_modules/.pnpm/@vitest_runner@3.0.9/node_modules/@vitest/runner/dist/chunk-tasks.js +0 -30
  101. package/dist/node_modules/.pnpm/@vitest_runner@3.0.9/node_modules/@vitest/runner/dist/chunk-tasks.js.map +0 -1
  102. package/dist/node_modules/.pnpm/@vitest_runner@3.0.9/node_modules/@vitest/runner/dist/index.js +0 -579
  103. package/dist/node_modules/.pnpm/@vitest_runner@3.0.9/node_modules/@vitest/runner/dist/index.js.map +0 -1
  104. package/dist/node_modules/.pnpm/@vitest_runner@3.0.9/node_modules/@vitest/runner/dist/utils.js +0 -2
  105. package/dist/node_modules/.pnpm/@vitest_utils@3.0.9/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js +0 -92
  106. package/dist/node_modules/.pnpm/@vitest_utils@3.0.9/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js.map +0 -1
  107. package/dist/node_modules/.pnpm/@vitest_utils@3.0.9/node_modules/@vitest/utils/dist/helpers.js +0 -43
  108. package/dist/node_modules/.pnpm/@vitest_utils@3.0.9/node_modules/@vitest/utils/dist/helpers.js.map +0 -1
  109. package/dist/node_modules/.pnpm/@vitest_utils@3.0.9/node_modules/@vitest/utils/dist/index.js +0 -450
  110. package/dist/node_modules/.pnpm/@vitest_utils@3.0.9/node_modules/@vitest/utils/dist/index.js.map +0 -1
  111. package/dist/node_modules/.pnpm/@vitest_utils@3.0.9/node_modules/@vitest/utils/dist/source-map.js +0 -168
  112. package/dist/node_modules/.pnpm/@vitest_utils@3.0.9/node_modules/@vitest/utils/dist/source-map.js.map +0 -1
  113. package/dist/node_modules/.pnpm/chai@5.2.0/node_modules/chai/chai.js +0 -3101
  114. package/dist/node_modules/.pnpm/chai@5.2.0/node_modules/chai/chai.js.map +0 -1
  115. package/dist/node_modules/.pnpm/expect-type@1.2.1/node_modules/expect-type/dist/branding.js +0 -10
  116. package/dist/node_modules/.pnpm/expect-type@1.2.1/node_modules/expect-type/dist/branding.js.map +0 -1
  117. package/dist/node_modules/.pnpm/expect-type@1.2.1/node_modules/expect-type/dist/index.js +0 -109
  118. package/dist/node_modules/.pnpm/expect-type@1.2.1/node_modules/expect-type/dist/index.js.map +0 -1
  119. package/dist/node_modules/.pnpm/expect-type@1.2.1/node_modules/expect-type/dist/messages.js +0 -10
  120. package/dist/node_modules/.pnpm/expect-type@1.2.1/node_modules/expect-type/dist/messages.js.map +0 -1
  121. package/dist/node_modules/.pnpm/expect-type@1.2.1/node_modules/expect-type/dist/overloads.js +0 -10
  122. package/dist/node_modules/.pnpm/expect-type@1.2.1/node_modules/expect-type/dist/overloads.js.map +0 -1
  123. package/dist/node_modules/.pnpm/expect-type@1.2.1/node_modules/expect-type/dist/utils.js +0 -10
  124. package/dist/node_modules/.pnpm/expect-type@1.2.1/node_modules/expect-type/dist/utils.js.map +0 -1
  125. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/arguments.js +0 -11
  126. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/arguments.js.map +0 -1
  127. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/array.js +0 -16
  128. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/array.js.map +0 -1
  129. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/bigint.js +0 -11
  130. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/bigint.js.map +0 -1
  131. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/class.js +0 -15
  132. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/class.js.map +0 -1
  133. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/date.js +0 -13
  134. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/date.js.map +0 -1
  135. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/error.js +0 -34
  136. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/error.js.map +0 -1
  137. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/function.js +0 -12
  138. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/function.js.map +0 -1
  139. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/helpers.js +0 -122
  140. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/helpers.js.map +0 -1
  141. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/html.js +0 -39
  142. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/html.js.map +0 -1
  143. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/index.js +0 -99
  144. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/index.js.map +0 -1
  145. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/map.js +0 -25
  146. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/map.js.map +0 -1
  147. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/number.js +0 -14
  148. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/number.js.map +0 -1
  149. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/object.js +0 -21
  150. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/object.js.map +0 -1
  151. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/promise.js +0 -6
  152. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/promise.js.map +0 -1
  153. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/regexp.js +0 -12
  154. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/regexp.js.map +0 -1
  155. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/set.js +0 -18
  156. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/set.js.map +0 -1
  157. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/string.js +0 -24
  158. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/string.js.map +0 -1
  159. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/symbol.js +0 -9
  160. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/symbol.js.map +0 -1
  161. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/typedarray.js +0 -30
  162. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/typedarray.js.map +0 -1
  163. package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.js +0 -82
  164. package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.js.map +0 -1
  165. package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/node.js +0 -7
  166. package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/node.js.map +0 -1
  167. package/dist/node_modules/.pnpm/vitest@3.0.9_@types_debug@4.1.13_@types_node@20.19.17_jiti@2.7.0_jsdom@26.1.0_lightning_fb7ae83398b95c49208c9194029bba02/node_modules/vitest/dist/index.js +0 -10
  168. package/dist/node_modules/.pnpm/vitest@3.0.9_@types_debug@4.1.13_@types_node@20.19.17_jiti@2.7.0_jsdom@26.1.0_lightning_fb7ae83398b95c49208c9194029bba02/node_modules/vitest/dist/index.js.map +0 -1
@@ -1,49 +1,84 @@
1
1
  import { toNeonError } from "./errors.js";
2
+ import { cancelled, runBounded } from "./deadline.js";
2
3
  import { err, ok } from "./result.js";
3
4
  //#region src/neon/paginate.ts
4
5
  var PaginatedList = class {
5
6
  #fetchPage;
6
7
  #mapPage;
7
- #signal;
8
- constructor(fetchPage, mapPage, signal) {
8
+ #newDeadline;
9
+ constructor(fetchPage, mapPage, newDeadline) {
9
10
  this.#fetchPage = fetchPage;
10
11
  this.#mapPage = mapPage;
11
- this.#signal = signal;
12
+ this.#newDeadline = newDeadline;
12
13
  }
13
- async page(cursor) {
14
- const raw = await this.#fetchPage(cursor, this.#signal);
15
- if (raw.error || raw.data === void 0) return err(toNeonError(raw.error, raw.response));
14
+ async #page(cursor, deadline) {
15
+ let raw;
16
+ try {
17
+ raw = await runBounded(deadline, () => this.#fetchPage(cursor, deadline.signal));
18
+ } catch (error) {
19
+ return err(cancelled(deadline) ?? toNeonError(error, void 0));
20
+ }
21
+ const cancellation = cancelled(deadline);
22
+ if (cancellation) return err(cancellation);
23
+ if (raw === void 0 || raw.error || raw.data === void 0) return err(toNeonError(raw?.error, raw?.response));
16
24
  return ok(this.#mapPage(raw.data));
17
25
  }
26
+ async page(cursor) {
27
+ const deadline = this.#newDeadline();
28
+ try {
29
+ return await this.#page(cursor, deadline);
30
+ } finally {
31
+ deadline.dispose();
32
+ }
33
+ }
34
+ /**
35
+ * One deadline covers the whole walk, not each page: `all()` is a single operation
36
+ * from the caller's side, and a per-page budget would leave an unbounded number of
37
+ * pages unbounded in total.
38
+ */
18
39
  async all() {
19
- const items = [];
20
- let cursor;
21
- while (true) {
22
- const result = await this.page(cursor);
23
- if (result.error) return err(result.error);
24
- items.push(...result.data.items);
25
- if (!result.data.cursor || result.data.items.length === 0) break;
26
- cursor = result.data.cursor;
40
+ const deadline = this.#newDeadline();
41
+ try {
42
+ const items = [];
43
+ let cursor;
44
+ while (true) {
45
+ const result = await this.#page(cursor, deadline);
46
+ if (result.error) return err(result.error);
47
+ items.push(...result.data.items);
48
+ if (!result.data.cursor || result.data.items.length === 0) break;
49
+ cursor = result.data.cursor;
50
+ }
51
+ return ok(items);
52
+ } finally {
53
+ deadline.dispose();
27
54
  }
28
- return ok(items);
29
55
  }
30
56
  async *[Symbol.asyncIterator]() {
31
- let cursor;
32
- while (true) {
33
- const result = await this.page(cursor);
34
- if (result.error) throw result.error;
35
- yield* result.data.items;
36
- if (!result.data.cursor || result.data.items.length === 0) break;
37
- cursor = result.data.cursor;
57
+ const deadline = this.#newDeadline();
58
+ try {
59
+ let cursor;
60
+ while (true) {
61
+ const result = await this.#page(cursor, deadline);
62
+ if (result.error) throw result.error;
63
+ yield* result.data.items;
64
+ if (!result.data.cursor || result.data.items.length === 0) break;
65
+ cursor = result.data.cursor;
66
+ }
67
+ } finally {
68
+ deadline.dispose();
38
69
  }
39
70
  }
40
71
  };
41
72
  /**
42
73
  * Build a {@link Paginated} list from a page fetcher and a page mapper. The response-body
43
74
  * type `D` is inferred and erased from the public `Paginated<T>` return.
75
+ *
76
+ * `newDeadline` is called once per consumption — each `page()`, each `all()`, each
77
+ * iteration — because a `Paginated` is lazy and may be consumed more than once, so a
78
+ * deadline created when the list was built would already be spent.
44
79
  */
45
- function paginate(fetchPage, mapPage, signal) {
46
- return new PaginatedList(fetchPage, mapPage, signal);
80
+ function paginate(fetchPage, mapPage, newDeadline) {
81
+ return new PaginatedList(fetchPage, mapPage, newDeadline);
47
82
  }
48
83
  //#endregion
49
84
  export { paginate };
@@ -1 +1 @@
1
- {"version":3,"file":"paginate.js","names":["#fetchPage","#mapPage","#signal"],"sources":["../../src/neon/paginate.ts"],"sourcesContent":["import { toNeonError } from \"./errors.js\";\nimport { err, type NeonResult, ok } from \"./result.js\";\n\nexport interface Page<T> {\n\titems: T[];\n\t/** Cursor for the next page, when more results exist. */\n\tcursor?: string;\n}\n\ninterface RawResult<D> {\n\tdata?: D | undefined;\n\terror?: unknown;\n\tresponse?: Response | undefined;\n}\n\n/**\n * A lazy, cursor-paginated list. `all()` / `page()` return the `{ data, error }` envelope;\n * the async iterator streams items lazily and throws on a page-fetch error.\n *\n * Note: pagination helpers always use the result envelope (the iterator is the throwing\n * form) regardless of the client's `throwOnError` setting.\n */\nexport interface Paginated<T> extends AsyncIterable<T> {\n\t/** Fetch a single page (optionally from a cursor). */\n\tpage(cursor?: string): Promise<NeonResult<Page<T>>>;\n\t/** Fetch and concatenate every page. */\n\tall(): Promise<NeonResult<T[]>>;\n}\n\nclass PaginatedList<T, D> implements Paginated<T> {\n\treadonly #fetchPage: (\n\t\tcursor: string | undefined,\n\t\tsignal?: AbortSignal,\n\t) => Promise<RawResult<D>>;\n\treadonly #mapPage: (data: D) => Page<T>;\n\treadonly #signal?: AbortSignal;\n\n\tconstructor(\n\t\tfetchPage: (\n\t\t\tcursor: string | undefined,\n\t\t\tsignal?: AbortSignal,\n\t\t) => Promise<RawResult<D>>,\n\t\tmapPage: (data: D) => Page<T>,\n\t\tsignal?: AbortSignal,\n\t) {\n\t\tthis.#fetchPage = fetchPage;\n\t\tthis.#mapPage = mapPage;\n\t\tthis.#signal = signal;\n\t}\n\n\tasync page(cursor?: string): Promise<NeonResult<Page<T>>> {\n\t\tconst raw = await this.#fetchPage(cursor, this.#signal);\n\t\tif (raw.error || raw.data === undefined) {\n\t\t\treturn err(toNeonError(raw.error, raw.response));\n\t\t}\n\t\treturn ok(this.#mapPage(raw.data));\n\t}\n\n\tasync all(): Promise<NeonResult<T[]>> {\n\t\tconst items: T[] = [];\n\t\tlet cursor: string | undefined;\n\t\twhile (true) {\n\t\t\tconst result = await this.page(cursor);\n\t\t\tif (result.error) return err(result.error);\n\t\t\titems.push(...result.data.items);\n\t\t\tif (!result.data.cursor || result.data.items.length === 0) break;\n\t\t\tcursor = result.data.cursor;\n\t\t}\n\t\treturn ok(items);\n\t}\n\n\tasync *[Symbol.asyncIterator](): AsyncIterator<T> {\n\t\tlet cursor: string | undefined;\n\t\twhile (true) {\n\t\t\tconst result = await this.page(cursor);\n\t\t\tif (result.error) throw result.error;\n\t\t\tyield* result.data.items;\n\t\t\tif (!result.data.cursor || result.data.items.length === 0) break;\n\t\t\tcursor = result.data.cursor;\n\t\t}\n\t}\n}\n\n/**\n * Build a {@link Paginated} list from a page fetcher and a page mapper. The response-body\n * type `D` is inferred and erased from the public `Paginated<T>` return.\n */\nexport function paginate<T, D>(\n\tfetchPage: (\n\t\tcursor: string | undefined,\n\t\tsignal?: AbortSignal,\n\t) => Promise<RawResult<D>>,\n\tmapPage: (data: D) => Page<T>,\n\tsignal?: AbortSignal,\n): Paginated<T> {\n\treturn new PaginatedList(fetchPage, mapPage, signal);\n}\n"],"mappings":";;;AA6BA,IAAM,gBAAN,MAAkD;CACjD;CAIA;CACA;CAEA,YACC,WAIA,SACA,QACC;EACD,KAAKA,aAAa;EAClB,KAAKC,WAAW;EAChB,KAAKC,UAAU;CAChB;CAEA,MAAM,KAAK,QAA+C;EACzD,MAAM,MAAM,MAAM,KAAKF,WAAW,QAAQ,KAAKE,OAAO;EACtD,IAAI,IAAI,SAAS,IAAI,SAAS,KAAA,GAC7B,OAAO,IAAI,YAAY,IAAI,OAAO,IAAI,QAAQ,CAAC;EAEhD,OAAO,GAAG,KAAKD,SAAS,IAAI,IAAI,CAAC;CAClC;CAEA,MAAM,MAAgC;EACrC,MAAM,QAAa,CAAC;EACpB,IAAI;EACJ,OAAO,MAAM;GACZ,MAAM,SAAS,MAAM,KAAK,KAAK,MAAM;GACrC,IAAI,OAAO,OAAO,OAAO,IAAI,OAAO,KAAK;GACzC,MAAM,KAAK,GAAG,OAAO,KAAK,KAAK;GAC/B,IAAI,CAAC,OAAO,KAAK,UAAU,OAAO,KAAK,MAAM,WAAW,GAAG;GAC3D,SAAS,OAAO,KAAK;EACtB;EACA,OAAO,GAAG,KAAK;CAChB;CAEA,QAAQ,OAAO,iBAAmC;EACjD,IAAI;EACJ,OAAO,MAAM;GACZ,MAAM,SAAS,MAAM,KAAK,KAAK,MAAM;GACrC,IAAI,OAAO,OAAO,MAAM,OAAO;GAC/B,OAAO,OAAO,KAAK;GACnB,IAAI,CAAC,OAAO,KAAK,UAAU,OAAO,KAAK,MAAM,WAAW,GAAG;GAC3D,SAAS,OAAO,KAAK;EACtB;CACD;AACD;;;;;AAMA,SAAgB,SACf,WAIA,SACA,QACe;CACf,OAAO,IAAI,cAAc,WAAW,SAAS,MAAM;AACpD"}
1
+ {"version":3,"file":"paginate.js","names":["#fetchPage","#mapPage","#newDeadline","#page"],"sources":["../../src/neon/paginate.ts"],"sourcesContent":["import { cancelled, type Deadline, runBounded } from \"./deadline.js\";\nimport { toNeonError } from \"./errors.js\";\nimport { err, type NeonResult, ok } from \"./result.js\";\n\nexport interface Page<T> {\n\titems: T[];\n\t/** Cursor for the next page, when more results exist. */\n\tcursor?: string;\n}\n\ninterface RawResult<D> {\n\tdata?: D | undefined;\n\terror?: unknown;\n\tresponse?: Response | undefined;\n}\n\n/**\n * A lazy, cursor-paginated list. `all()` / `page()` return the `{ data, error }` envelope;\n * the async iterator streams items lazily and throws on a page-fetch error.\n *\n * Note: pagination helpers always use the result envelope (the iterator is the throwing\n * form) regardless of the client's `throwOnError` setting.\n */\nexport interface Paginated<T> extends AsyncIterable<T> {\n\t/** Fetch a single page (optionally from a cursor). */\n\tpage(cursor?: string): Promise<NeonResult<Page<T>>>;\n\t/** Fetch and concatenate every page. */\n\tall(): Promise<NeonResult<T[]>>;\n}\n\nclass PaginatedList<T, D> implements Paginated<T> {\n\treadonly #fetchPage: (\n\t\tcursor: string | undefined,\n\t\tsignal?: AbortSignal,\n\t) => Promise<RawResult<D>>;\n\treadonly #mapPage: (data: D) => Page<T>;\n\treadonly #newDeadline: () => Deadline;\n\n\tconstructor(\n\t\tfetchPage: (\n\t\t\tcursor: string | undefined,\n\t\t\tsignal?: AbortSignal,\n\t\t) => Promise<RawResult<D>>,\n\t\tmapPage: (data: D) => Page<T>,\n\t\tnewDeadline: () => Deadline,\n\t) {\n\t\tthis.#fetchPage = fetchPage;\n\t\tthis.#mapPage = mapPage;\n\t\tthis.#newDeadline = newDeadline;\n\t}\n\n\tasync #page(\n\t\tcursor: string | undefined,\n\t\tdeadline: Deadline,\n\t): Promise<NeonResult<Page<T>>> {\n\t\tlet raw: RawResult<D> | undefined;\n\t\ttry {\n\t\t\t// Bounded the same way the execution core bounds a request: the signal alone\n\t\t\t// does not cover the phases before `fetch` is reached, so a slow auth provider\n\t\t\t// would otherwise outlast the deadline.\n\t\t\traw = await runBounded(deadline, () =>\n\t\t\t\tthis.#fetchPage(cursor, deadline.signal),\n\t\t\t);\n\t\t} catch (error) {\n\t\t\treturn err(cancelled(deadline) ?? toNeonError(error, undefined));\n\t\t}\n\t\tconst cancellation = cancelled(deadline);\n\t\tif (cancellation) return err(cancellation);\n\t\tif (raw === undefined || raw.error || raw.data === undefined) {\n\t\t\treturn err(toNeonError(raw?.error, raw?.response));\n\t\t}\n\t\treturn ok(this.#mapPage(raw.data));\n\t}\n\n\tasync page(cursor?: string): Promise<NeonResult<Page<T>>> {\n\t\tconst deadline = this.#newDeadline();\n\t\ttry {\n\t\t\treturn await this.#page(cursor, deadline);\n\t\t} finally {\n\t\t\tdeadline.dispose();\n\t\t}\n\t}\n\n\t/**\n\t * One deadline covers the whole walk, not each page: `all()` is a single operation\n\t * from the caller's side, and a per-page budget would leave an unbounded number of\n\t * pages unbounded in total.\n\t */\n\tasync all(): Promise<NeonResult<T[]>> {\n\t\tconst deadline = this.#newDeadline();\n\t\ttry {\n\t\t\tconst items: T[] = [];\n\t\t\tlet cursor: string | undefined;\n\t\t\twhile (true) {\n\t\t\t\tconst result = await this.#page(cursor, deadline);\n\t\t\t\tif (result.error) return err(result.error);\n\t\t\t\titems.push(...result.data.items);\n\t\t\t\tif (!result.data.cursor || result.data.items.length === 0)\n\t\t\t\t\tbreak;\n\t\t\t\tcursor = result.data.cursor;\n\t\t\t}\n\t\t\treturn ok(items);\n\t\t} finally {\n\t\t\tdeadline.dispose();\n\t\t}\n\t}\n\n\tasync *[Symbol.asyncIterator](): AsyncIterator<T> {\n\t\tconst deadline = this.#newDeadline();\n\t\ttry {\n\t\t\tlet cursor: string | undefined;\n\t\t\twhile (true) {\n\t\t\t\tconst result = await this.#page(cursor, deadline);\n\t\t\t\tif (result.error) throw result.error;\n\t\t\t\tyield* result.data.items;\n\t\t\t\tif (!result.data.cursor || result.data.items.length === 0)\n\t\t\t\t\tbreak;\n\t\t\t\tcursor = result.data.cursor;\n\t\t\t}\n\t\t} finally {\n\t\t\tdeadline.dispose();\n\t\t}\n\t}\n}\n\n/**\n * Build a {@link Paginated} list from a page fetcher and a page mapper. The response-body\n * type `D` is inferred and erased from the public `Paginated<T>` return.\n *\n * `newDeadline` is called once per consumption — each `page()`, each `all()`, each\n * iteration — because a `Paginated` is lazy and may be consumed more than once, so a\n * deadline created when the list was built would already be spent.\n */\nexport function paginate<T, D>(\n\tfetchPage: (\n\t\tcursor: string | undefined,\n\t\tsignal?: AbortSignal,\n\t) => Promise<RawResult<D>>,\n\tmapPage: (data: D) => Page<T>,\n\tnewDead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;AAE9B;AAAX,KAvBC,SAuBD,CAAA,CAAA,CAAA,GAAA;EACS,IAAA,EAvBT,CAuBS;EAAR,KAAA,EAAA,SAAA;EAAR,QAAA,CAAA,EAvBuC,QAuBvC;EAEkB,OAAA,CAAA,EAzByC,OAyBzC;AAAX,CAAA,GAAA;EACmB,IAAA,EAAA,SAAA;EAAR,KAAA,EAvBZ,SAuBY;EAAV,QAAA,CAAA,EAtBE,QAsBF;EAAR,OAAA,CAAA,EArBS,OAqBT;AAAO,CAAA;;;;;;;;;;;;;iBANK,kBAAkB,cAAc,IAAI;YAEzC,WAAW;;MAClB,QAAQ,QAAQ;YAET,WAAW;;MAClB,QAAQ,UAAU,QAAQ"}
@@ -1,6 +1,21 @@
1
- import { toNeonError } from "./errors.js";
1
+ import { NeonAbortError, toNeonError } from "./errors.js";
2
2
  //#region src/neon/raw-wrap.ts
3
3
  /**
4
+ * Did the caller's own signal end this call?
5
+ *
6
+ * Read from the signal rather than the error, because the generated client reports
7
+ * authentication, serialization, interceptor, transport and parsing faults through one
8
+ * channel — an error named `AbortError` is not evidence about which occurred. A response
9
+ * having arrived rules cancellation out.
10
+ *
11
+ * This deliberately says nothing about a signal the SDK never saw: the Neon CLI installs
12
+ * its own request timeout inside a custom `fetch` rather than passing `signal`, so its
13
+ * timeouts keep classifying as {@link NeonNetworkError} exactly as before.
14
+ */
15
+ function abortedBy(signal, response) {
16
+ return response === void 0 && signal?.aborted === true;
17
+ }
18
+ /**
4
19
  * Wrap a generated raw function so it speaks the ergonomic result contract.
5
20
  *
6
21
  * @example
@@ -21,7 +36,7 @@ function wrapRaw(fn) {
21
36
  responseStyle: "fields"
22
37
  });
23
38
  if (raw.error !== void 0 && raw.error !== null) {
24
- const error = toNeonError(raw.error, raw.response);
39
+ const error = abortedBy(options.signal, raw.response) ? new NeonAbortError("The request was aborted by its signal.", { cause: raw.error }) : toNeonError(raw.error, raw.response);
25
40
  if (shouldThrow) throw error;
26
41
  return {
27
42
  data: void 0,
@@ -1 +1 @@
1
- {"version":3,"file":"raw-wrap.js","names":[],"sources":["../../src/neon/raw-wrap.ts"],"sourcesContent":["/**\n * The raw layer's result adapter.\n *\n * The generated `client/sdk.gen.ts` functions return hey-api's `{ data, error, request,\n * response }` envelope and are driven by two orthogonal switches (`throwOnError` and\n * `responseStyle`). {@link wrapRaw} collapses that onto the ergonomic client's contract: a\n * `{ data, error }` result by default (with the typed {@link NeonError} on the error\n * channel), or the bare resource when you pass `throwOnError: true`. `responseStyle` is\n * removed from the public raw surface — `throwOnError` is the only switch and the return\n * type always tracks it.\n *\n * The one difference from the ergonomic `NeonResult` is that the raw result also exposes the\n * underlying `response`/`request`, so power users (and the neonctl CLI) can read HTTP status\n * and headers without dropping to the low-level client.\n */\n\nimport type { NeonError } from \"./errors.js\";\nimport { toNeonError } from \"./errors.js\";\n\n/**\n * Structural shape of any generated raw function: generic over `throwOnError`, resolving to\n * hey-api's envelope. The `any`s live only inside this adapter type so the generated\n * functions (each with their own precise option/response types) remain assignable; the\n * public {@link wrapRaw} overloads recover full type safety per function.\n */\n// biome-ignore lint/suspicious/noExplicitAny: adapter boundary over generated generic fns\nexport type AnyRawFn = (options: any) => Promise<any>;\n\n/** hey-api's non-throw \"fields\" envelope, parameterized by the success payload. */\ninterface RawFieldsResult<T> {\n\tdata?: T;\n\terror?: unknown;\n\tresponse?: Response;\n\trequest?: Request;\n}\n\n/** Extract the success arm of a discriminated fields envelope. */\ntype SuccessArm<R> = R extends { error: undefined | null } ? R : never;\n\n/**\n * The success payload of a generated raw function — derived from its default (non-throw,\n * fields) return type, so it stays correct as the client is regenerated.\n */\nexport type RawData<F extends AnyRawFn> =\n\tSuccessArm<Awaited<ReturnType<F>>> extends { data: infer D } ? D : never;\n\n/** The call options for a wrapped raw function, minus the removed hey-api switches. */\nexport type RawOptions<F extends AnyRawFn> = Omit<\n\tNonNullable<Parameters<F>[0]>,\n\t\"throwOnError\" | \"responseStyle\"\n>;\n\n/**\n * The non-throwing result of a wrapped raw call: the ergonomic `{ data, error }` union\n * (typed {@link NeonError}), plus the underlying `response`/`request` for HTTP status and\n * headers.\n */\nexport type RawResult<T> =\n\t| { data: T; error: undefined; response?: Response; request?: Request }\n\t| {\n\t\t\tdata: undefined;\n\t\t\terror: NeonError;\n\t\t\tresponse?: Response;\n\t\t\trequest?: Request;\n\t };\n\n/**\n * Wrap a generated raw function so it speaks the ergonomic result contract.\n *\n * @example\n * ```ts\n * import { getProject } from \"@neon/sdk/raw\";\n *\n * const { data, error } = await getProject({ client, path: { project_id } });\n * // or, throwing:\n * const { project } = await getProject({ client, path: { project_id }, throwOnError: true });\n * ```\n */\nexport function wrapRaw<F extends AnyRawFn>(fn: F & AnyRawFn) {\n\tfunction call(\n\t\toptions: RawOptions<F> & { throwOnError: true },\n\t): Promise<RawData<F>>;\n\tfunction call(\n\t\toptions: RawOptions<F> & { throwOnError?: false },\n\t): Promise<RawResult<RawData<F>>>;\n\tasync function call(\n\t\toptions: RawOptions<F> & { throwOnError?: boolean },\n\t): Promise<RawData<F> | RawResult<RawData<F>>> {\n\t\tconst shouldThrow = options.throwOnError === true;\n\t\tconst raw: RawFieldsResult<RawData<F>> = await fn({\n\t\t\t...options,\n\t\t\tthrowOnError: false,\n\t\t\tresponseStyle: \"fields\",\n\t\t});\n\t\tif (raw.error !== undefined && raw.error !== null) {\n\t\t\tconst error = toNeonError(raw.error, raw.response);\n\t\t\tif (shouldThrow) throw error;\n\t\t\treturn {\n\t\t\t\tdata: undefined,\n\t\t\t\terror,\n\t\t\t\tresponse: raw.response,\n\t\t\t\trequest: raw.request,\n\t\t\t};\n\t\t}\n\t\t// On success the payload is present (or `void`/`undefined` for 204 endpoints); it is\n\t\t// the declared `RawData<F>` by construction of the generated response types.\n\t\tconst data = raw.data as RawData<F>;\n\t\tif (shouldThrow) return data;\n\t\treturn {\n\t\t\tdata,\n\t\t\terror: undefined,\n\t\t\tresponse: raw.response,\n\t\t\trequest: raw.request,\n\t\t};\n\t}\n\treturn call;\n}\n"],"mappings":";;;;;;;;;;;;;;AA8EA,SAAgB,QAA4B,IAAkB;CAO7D,eAAe,KACd,SAC8C;EAC9C,MAAM,cAAc,QAAQ,iBAAiB;EAC7C,MAAM,MAAmC,MAAM,GAAG;GACjD,GAAG;GACH,cAAc;GACd,eAAe;EAChB,CAAC;EACD,IAAI,IAAI,UAAU,KAAA,KAAa,IAAI,UAAU,MAAM;GAClD,MAAM,QAAQ,YAAY,IAAI,OAAO,IAAI,QAAQ;GACjD,IAAI,aAAa,MAAM;GACvB,OAAO;IACN,MAAM,KAAA;IACN;IACA,UAAU,IAAI;IACd,SAAS,IAAI;GACd;EACD;EAGA,MAAM,OAAO,IAAI;EACjB,IAAI,aAAa,OAAO;EACxB,OAAO;GACN;GACA,OAAO,KAAA;GACP,UAAU,IAAI;GACd,SAAS,IAAI;EACd;CACD;CACA,OAAO;AACR"}
1
+ {"version":3,"file":"raw-wrap.js","names":[],"sources":["../../src/neon/raw-wrap.ts"],"sourcesContent":["/**\n * The raw layer's result adapter.\n *\n * The generated `client/sdk.gen.ts` functions return hey-api's `{ data, error, request,\n * response }` envelope and are driven by two orthogonal switches (`throwOnError` and\n * `responseStyle`). {@link wrapRaw} collapses that onto the ergonomic client's contract: a\n * `{ data, error }` result by default (with the typed {@link NeonError} on the error\n * channel), or the bare resource when you pass `throwOnError: true`. `responseStyle` is\n * removed from the public raw surface — `throwOnError` is the only switch and the return\n * type always tracks it.\n *\n * The one difference from the ergonomic `NeonResult` is that the raw result also exposes the\n * underlying `response`/`request`, so power users (and the neonctl CLI) can read HTTP status\n * and headers without dropping to the low-level client.\n */\n\nimport type { NeonError } from \"./errors.js\";\nimport { NeonAbortError, toNeonError } from \"./errors.js\";\n\n/**\n * Did the caller's own signal end this call?\n *\n * Read from the signal rather than the error, because the generated client reports\n * authentication, serialization, interceptor, transport and parsing faults through one\n * channel — an error named `AbortError` is not evidence about which occurred. A response\n * having arrived rules cancellation out.\n *\n * This deliberately says nothing about a signal the SDK never saw: the Neon CLI installs\n * its own request timeout inside a custom `fetch` rather than passing `signal`, so its\n * timeouts keep classifying as {@link NeonNetworkError} exactly as before.\n */\nfunction abortedBy(\n\tsignal: AbortSignal | undefined,\n\tresponse: Response | undefined,\n): boolean {\n\treturn response === undefined && signal?.aborted === true;\n}\n\n/**\n * Structural shape of any generated raw function: generic over `throwOnError`, resolving to\n * hey-api's envelope. The `any`s live only inside this adapter type so the generated\n * functions (each with their own precise option/response types) remain assignable; the\n * public {@link wrapRaw} overloads recover full type safety per function.\n */\n// biome-ignore lint/suspicious/noExplicitAny: adapter boundary over generated generic fns\nexport type AnyRawFn = (options: any) => Promise<any>;\n\n/** hey-api's non-throw \"fields\" envelope, parameterized by the success payload. */\ninterface RawFieldsResult<T> {\n\tdata?: T;\n\terror?: unknown;\n\tresponse?: Response;\n\trequest?: Request;\n}\n\n/** Extract the success arm of a discriminated fields envelope. */\ntype SuccessArm<R> = R extends { error: undefined | null } ? R : never;\n\n/**\n * The success payload of a generated raw function — derived from its default (non-throw,\n * fields) return type, so it stays correct as the client is regenerated.\n */\nexport type RawData<F extends AnyRawFn> =\n\tSuccessArm<Awaited<ReturnType<F>>> extends { data: infer D } ? D : never;\n\n/** The call options for a wrapped raw function, minus the removed hey-api switches. */\nexport type RawOptions<F extends AnyRawFn> = Omit<\n\tNonNullable<Parameters<F>[0]>,\n\t\"throwOnError\" | \"responseStyle\"\n>;\n\n/**\n * The non-throwing result of a wrapped raw call: the ergonomic `{ data, error }` union\n * (typed {@link NeonError}), plus the underlying `response`/`request` for HTTP status and\n * headers.\n */\nexport type RawResult<T> =\n\t| { data: T; error: undefined; response?: Response; request?: Request }\n\t| {\n\t\t\tdata: undefined;\n\t\t\terror: NeonError;\n\t\t\tresponse?: Response;\n\t\t\trequest?: Request;\n\t };\n\n/**\n * Wrap a generated raw function so it speaks the ergonomic result contract.\n *\n * @example\n * ```ts\n * import { getProject } from \"@neon/sdk/raw\";\n *\n * const { data, error } = await getProject({ client, path: { project_id } });\n * // or, throwing:\n * const { project } = await getProject({ client, path: { project_id }, throwOnError: true });\n * ```\n */\nexport function wrapRaw<F extends AnyRawFn>(fn: F & AnyRawFn) {\n\tfunction call(\n\t\toptions: RawOptions<F> & { throwOnError: true },\n\t): Promise<RawData<F>>;\n\tfunction call(\n\t\toptions: RawOptions<F> & { throwOnError?: false },\n\t): Promise<RawResult<RawData<F>>>;\n\tasync function call(\n\t\toptions: RawOptions<F> & { throwOnError?: boolean },\n\t): Promise<RawData<F> | RawResult<RawData<F>>> {\n\t\tconst shouldThrow = options.throwOnError === true;\n\t\tconst raw: RawFieldsResult<RawData<F>> = await fn({\n\t\t\t...options,\n\t\t\tthrowOnError: false,\n\t\t\tresponseStyle: \"fields\",\n\t\t});\n\t\tif (raw.error !== undefined && raw.error !== null) {\n\t\t\tconst error = abortedBy(options.signal, raw.response)\n\t\t\t\t? new NeonAbortError(\"The request was aborted by its signal.\", {\n\t\t\t\t\t\tcause: raw.error,\n\t\t\t\t\t})\n\t\t\t\t: toNeonError(raw.error, raw.response);\n\t\t\tif (shouldThrow) throw error;\n\t\t\treturn {\n\t\t\t\tdata: undefined,\n\t\t\t\terror,\n\t\t\t\tresponse: raw.response,\n\t\t\t\trequest: raw.request,\n\t\t\t};\n\t\t}\n\t\t// On success the payload is present (or `void`/`undefined` for 204 endpoints); it is\n\t\t// the declared `RawData<F>` by construction of the generated response types.\n\t\tconst data = raw.data as RawData<F>;\n\t\tif (shouldThrow) return data;\n\t\treturn {\n\t\t\tdata,\n\t\t\terror: undefined,\n\t\t\tresponse: raw.response,\n\t\t\trequest: raw.request,\n\t\t};\n\t}\n\treturn call;\n}\n"],"mappings":";;;;;;;;;;;;;;AA+BA,SAAS,UACR,QACA,UACU;CACV,OAAO,aAAa,KAAA,KAAa,QAAQ,YAAY;AACtD;;;;;;;;;;;;;AA6DA,SAAgB,QAA4B,IAAkB;CAO7D,eAAe,KACd,SAC8C;EAC9C,MAAM,cAAc,QAAQ,iBAAiB;EAC7C,MAAM,MAAmC,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AAA,EAyE1B,OAzE0B,CAyElB,OAzEkB,CAyEV,oBAzEU,EAyEY,KAzEZ,CAAA,CAAA;AACV"}
@@ -7,15 +7,17 @@ var User = class {
7
7
  this.#ctx = ctx;
8
8
  }
9
9
  me(opts) {
10
- return this.#ctx.run(opts, (client) => getCurrentUserInfo({
10
+ return this.#ctx.run(opts, (client, signal) => getCurrentUserInfo({
11
11
  client,
12
- throwOnError: false
12
+ throwOnError: false,
13
+ signal
13
14
  }), (data) => data);
14
15
  }
15
16
  organizations(opts) {
16
- return this.#ctx.run(opts, (client) => getCurrentUserOrganizations({
17
+ return this.#ctx.run(opts, (client, signal) => getCurrentUserOrganizations({
17
18
  client,
18
- throwOnError: false
19
+ throwOnError: false,
20
+ signal
19
21
  }), (data) => data.organizations);
20
22
  }
21
23
  };
@@ -26,9 +28,10 @@ var Regions = class {
26
28
  this.#ctx = ctx;
27
29
  }
28
30
  list(opts) {
29
- return this.#ctx.run(opts, (client) => getActiveRegions({
31
+ return this.#ctx.run(opts, (client, signal) => getActiveRegions({
30
32
  client,
31
- throwOnError: false
33
+ throwOnError: false,
34
+ signal
32
35
  }), (data) => data.regions);
33
36
  }
34
37
  };
@@ -39,23 +42,26 @@ var ApiKeys = class {
39
42
  this.#ctx = ctx;
40
43
  }
41
44
  list(opts) {
42
- return this.#ctx.run(opts, (client) => listApiKeys({
45
+ return this.#ctx.run(opts, (client, signal) => listApiKeys({
43
46
  client,
44
- throwOnError: false
47
+ throwOnError: false,
48
+ signal
45
49
  }), (data) => data);
46
50
  }
47
51
  create(keyName, opts) {
48
- return this.#ctx.run(opts, (client) => createApiKey({
52
+ return this.#ctx.run(opts, (client, signal) => createApiKey({
49
53
  client,
50
54
  body: { key_name: keyName },
51
- throwOnError: false
55
+ throwOnError: false,
56
+ signal
52
57
  }), (data) => data);
53
58
  }
54
59
  revoke(keyId, opts) {
55
- return this.#ctx.run(opts, (client) => revokeApiKey({
60
+ return this.#ctx.run(opts, (client, signal) => revokeApiKey({
56
61
  client,
57
62
  path: { key_id: keyId },
58
- throwOnError: false
63
+ throwOnError: false,
64
+ signal
59
65
  }), (data) => data);
60
66
  }
61
67
  };
@@ -1 +1 @@
1
- {"version":3,"file":"account.js","names":["#ctx"],"sources":["../../../src/neon/resources/account.ts"],"sourcesContent":["import {\n\tcreateApiKey,\n\tgetActiveRegions,\n\tgetCurrentUserInfo,\n\tgetCurrentUserOrganizations,\n\tlistApiKeys,\n\trevokeApiKey,\n} from \"../../client/sdk.gen.js\";\nimport type {\n\tApiKeyCreateResponse,\n\tApiKeyRevokeResponse,\n\tApiKeysListResponseItem,\n\tCurrentUserInfoResponse,\n\tOrganization,\n\tRegionResponse,\n} from \"../../client/types.gen.js\";\nimport type { CallOptions, RequestContext } from \"../context.js\";\nimport type { NeonResult, Outcome } from \"../result.js\";\n\n/** Current user / account resource. */\nexport class User<DThrow extends boolean> {\n\treadonly #ctx: RequestContext;\n\n\tconstructor(ctx: RequestContext) {\n\t\tthis.#ctx = ctx;\n\t}\n\n\t/** @apiCall GET /users/me */\n\tme(): Promise<Outcome<CurrentUserInfoResponse, DThrow>>;\n\tme<Throw extends boolean = DThrow>(\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<CurrentUserInfoResponse, Throw>>;\n\tme(\n\t\topts?: CallOptions,\n\t): Promise<CurrentUserInfoResponse | NeonResult<CurrentUserInfoResponse>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client) => getCurrentUserInfo({ client, throwOnError: false }),\n\t\t\t(data) => data,\n\t\t);\n\t}\n\n\t/** @apiCall GET /users/me/organizations */\n\torganizations(): Promise<Outcome<Organization[], DThrow>>;\n\torganizations<Throw extends boolean = DThrow>(\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<Organization[], Throw>>;\n\torganizations(\n\t\topts?: CallOptions,\n\t): Promise<Organization[] | NeonResult<Organization[]>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client) =>\n\t\t\t\tgetCurrentUserOrganizations({ client, throwOnError: false }),\n\t\t\t(data) => data.organizations,\n\t\t);\n\t}\n}\n\n/** Active regions. */\nexport class Regions<DThrow extends boolean> {\n\treadonly #ctx: RequestContext;\n\n\tconstructor(ctx: RequestContext) {\n\t\tthis.#ctx = ctx;\n\t}\n\n\t/** @apiCall GET /regions */\n\tlist(): Promise<Outcome<RegionResponse[], DThrow>>;\n\tlist<Throw extends boolean = DThrow>(\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<RegionResponse[], Throw>>;\n\tlist(\n\t\topts?: CallOptions,\n\t): Promise<RegionResponse[] | NeonResult<RegionResponse[]>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client) => getActiveRegions({ client, throwOnError: false }),\n\t\t\t(data) => data.regions,\n\t\t);\n\t}\n}\n\n/** Account API keys. */\nexport class ApiKeys<DThrow extends boolean> {\n\treadonly #ctx: RequestContext;\n\n\tconstructor(ctx: RequestContext) {\n\t\tthis.#ctx = ctx;\n\t}\n\n\t/** @apiCall GET /api_keys */\n\tlist(): Promise<Outcome<ApiKeysListResponseItem[], DThrow>>;\n\tlist<Throw extends boolean = DThrow>(\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<ApiKeysListResponseItem[], Throw>>;\n\tlist(\n\t\topts?: CallOptions,\n\t): Promise<\n\t\tApiKeysListResponseItem[] | NeonResult<ApiKeysListResponseItem[]>\n\t> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client) => listApiKeys({ client, throwOnError: false }),\n\t\t\t(data) => data,\n\t\t);\n\t}\n\n\t/**\n\t * Create an API key. The returned `key` token is shown **once** — store it now.\n\t *\n\t * @apiCall POST /api_keys\n\t */\n\tcreate(keyName: string): Promise<Outcome<ApiKeyCreateResponse, DThrow>>;\n\tcreate<Throw extends boolean = DThrow>(\n\t\tkeyName: string,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<ApiKeyCreateResponse, Throw>>;\n\tcreate(\n\t\tkeyName: string,\n\t\topts?: CallOptions,\n\t): Promise<ApiKeyCreateResponse | NeonResult<ApiKeyCreateResponse>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client) =>\n\t\t\t\tcreateApiKey({\n\t\t\t\t\tclient,\n\t\t\t\t\tbody: { key_name: keyName },\n\t\t\t\t\tthrowOnError: false,\n\t\t\t\t}),\n\t\t\t(data) => data,\n\t\t);\n\t}\n\n\t/** @apiCall DELETE /api_keys/{key_id} */\n\trevoke(keyId: number): Promise<Outcome<ApiKeyRevokeResponse, DThrow>>;\n\trevoke<Throw extends boolean = DThrow>(\n\t\tkeyId: number,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<ApiKeyRevokeResponse, Throw>>;\n\trevoke(\n\t\tkeyId: number,\n\t\topts?: CallOptions,\n\t): Promise<ApiKeyRevokeResponse | NeonResult<ApiKeyRevokeResponse>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client) =>\n\t\t\t\trevokeApiKey({\n\t\t\t\t\tclient,\n\t\t\t\t\tpath: { key_id: keyId },\n\t\t\t\t\tthrowOnError: false,\n\t\t\t\t}),\n\t\t\t(data) => data,\n\t\t);\n\t}\n}\n"],"mappings":";;;AAoBA,IAAa,OAAb,MAA0C;CACzC;CAEA,YAAY,KAAqB;EAChC,KAAKA,OAAO;CACb;CAOA,GACC,MACyE;EACzE,OAAO,KAAKA,KAAK,IAChB,OACC,WAAW,mBAAmB;GAAE;GAAQ,cAAc;EAAM,CAAC,IAC7D,SAAS,IACX;CACD;CAOA,cACC,MACuD;EACvD,OAAO,KAAKA,KAAK,IAChB,OACC,WACA,4BAA4B;GAAE;GAAQ,cAAc;EAAM,CAAC,IAC3D,SAAS,KAAK,aAChB;CACD;AACD;;AAGA,IAAa,UAAb,MAA6C;CAC5C;CAEA,YAAY,KAAqB;EAChC,KAAKA,OAAO;CACb;CAOA,KACC,MAC2D;EAC3D,OAAO,KAAKA,KAAK,IAChB,OACC,WAAW,iBAAiB;GAAE;GAAQ,cAAc;EAAM,CAAC,IAC3D,SAAS,KAAK,OAChB;CACD;AACD;;AAGA,IAAa,UAAb,MAA6C;CAC5C;CAEA,YAAY,KAAqB;EAChC,KAAKA,OAAO;CACb;CAOA,KACC,MAGC;EACD,OAAO,KAAKA,KAAK,IAChB,OACC,WAAW,YAAY;GAAE;GAAQ,cAAc;EAAM,CAAC,IACtD,SAAS,IACX;CACD;CAYA,OACC,SACA,MACmE;EACnE,OAAO,KAAKA,KAAK,IAChB,OACC,WACA,aAAa;GACZ;GACA,MAAM,EAAE,UAAU,QAAQ;GAC1B,cAAc;EACf,CAAC,IACD,SAAS,IACX;CACD;CAQA,OACC,OACA,MACmE;EACnE,OAAO,KAAKA,KAAK,IAChB,OACC,WACA,aAAa;GACZ;GACA,MAAM,EAAE,QAAQ,MAAM;GACtB,cAAc;EACf,CAAC,IACD,SAAS,IACX;CACD;AACD"}
1
+ {"version":3,"file":"account.js","names":["#ctx"],"sources":["../../../src/neon/resources/account.ts"],"sourcesContent":["import {\n\tcreateApiKey,\n\tgetActiveRegions,\n\tgetCurrentUserInfo,\n\tgetCurrentUserOrganizations,\n\tlistApiKeys,\n\trevokeApiKey,\n} from \"../../client/sdk.gen.js\";\nimport type {\n\tApiKeyCreateResponse,\n\tApiKeyRevokeResponse,\n\tApiKeysListResponseItem,\n\tCurrentUserInfoResponse,\n\tOrganization,\n\tRegionResponse,\n} from \"../../client/types.gen.js\";\nimport type { CallOptions, RequestContext } from \"../context.js\";\nimport type { NeonResult, Outcome } from \"../result.js\";\n\n/** Current user / account resource. */\nexport class User<DThrow extends boolean> {\n\treadonly #ctx: RequestContext;\n\n\tconstructor(ctx: RequestContext) {\n\t\tthis.#ctx = ctx;\n\t}\n\n\t/** @apiCall GET /users/me */\n\tme(): Promise<Outcome<CurrentUserInfoResponse, DThrow>>;\n\tme<Throw extends boolean = DThrow>(\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<CurrentUserInfoResponse, Throw>>;\n\tme(\n\t\topts?: CallOptions,\n\t): Promise<CurrentUserInfoResponse | NeonResult<CurrentUserInfoResponse>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client, signal) =>\n\t\t\t\tgetCurrentUserInfo({ client, throwOnError: false, signal }),\n\t\t\t(data) => data,\n\t\t);\n\t}\n\n\t/** @apiCall GET /users/me/organizations */\n\torganizations(): Promise<Outcome<Organization[], DThrow>>;\n\torganizations<Throw extends boolean = DThrow>(\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<Organization[], Throw>>;\n\torganizations(\n\t\topts?: CallOptions,\n\t): Promise<Organization[] | NeonResult<Organization[]>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client, signal) =>\n\t\t\t\tgetCurrentUserOrganizations({\n\t\t\t\t\tclient,\n\t\t\t\t\tthrowOnError: false,\n\t\t\t\t\tsignal,\n\t\t\t\t}),\n\t\t\t(data) => data.organizations,\n\t\t);\n\t}\n}\n\n/** Active regions. */\nexport class Regions<DThrow extends boolean> {\n\treadonly #ctx: RequestContext;\n\n\tconstructor(ctx: RequestContext) {\n\t\tthis.#ctx = ctx;\n\t}\n\n\t/** @apiCall GET /regions */\n\tlist(): Promise<Outcome<RegionResponse[], DThrow>>;\n\tlist<Throw extends boolean = DThrow>(\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<RegionResponse[], Throw>>;\n\tlist(\n\t\topts?: CallOptions,\n\t): Promise<RegionResponse[] | NeonResult<RegionResponse[]>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client, signal) =>\n\t\t\t\tgetActiveRegions({ client, throwOnError: false, signal }),\n\t\t\t(data) => data.regions,\n\t\t);\n\t}\n}\n\n/** Account API keys. */\nexport class ApiKeys<DThrow extends boolean> {\n\treadonly #ctx: RequestContext;\n\n\tconstructor(ctx: RequestContext) {\n\t\tthis.#ctx = ctx;\n\t}\n\n\t/** @apiCall GET /api_keys */\n\tlist(): Promise<Outcome<ApiKeysListResponseItem[], DThrow>>;\n\tlist<Throw extends boolean = DThrow>(\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<ApiKeysListResponseItem[], Throw>>;\n\tlist(\n\t\topts?: CallOptions,\n\t): Promise<\n\t\tApiKeysListResponseItem[] | NeonResult<ApiKeysListResponseItem[]>\n\t> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client, signal) =>\n\t\t\t\tlistApiKeys({ client, throwOnError: false, signal }),\n\t\t\t(data) => data,\n\t\t);\n\t}\n\n\t/**\n\t * Create an API key. The returned `key` token is shown **once** — store it now.\n\t *\n\t * @apiCall POST /api_keys\n\t */\n\tcreate(keyName: string): Promise<Outcome<ApiKeyCreateResponse, DThrow>>;\n\tcreate<Throw extends boolean = DThrow>(\n\t\tkeyName: string,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<ApiKeyCreateResponse, Throw>>;\n\tcreate(\n\t\tkeyName: string,\n\t\topts?: CallOptions,\n\t): Promise<ApiKeyCreateResponse | NeonResult<ApiKeyCreateResponse>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client, signal) =>\n\t\t\t\tcreateApiKey({\n\t\t\t\t\tclient,\n\t\t\t\t\tbody: { key_name: keyName },\n\t\t\t\t\tthrowOnError: false,\n\t\t\t\t\tsignal,\n\t\t\t\t}),\n\t\t\t(data) => data,\n\t\t);\n\t}\n\n\t/** @apiCall DELETE /api_keys/{key_id} */\n\trevoke(keyId: number): Promise<Outcome<ApiKeyRevokeResponse, DThrow>>;\n\trevoke<Throw extends boolean = DThrow>(\n\t\tkeyId: number,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<ApiKeyRevokeResponse, Throw>>;\n\trevoke(\n\t\tkeyId: number,\n\t\topts?: CallOptions,\n\t): Promise<ApiKeyRevokeResponse | NeonResult<ApiKeyRevokeResponse>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client, signal) =>\n\t\t\t\trevokeApiKey({\n\t\t\t\t\tclient,\n\t\t\t\t\tpath: { key_id: keyId },\n\t\t\t\t\tthrowOnError: false,\n\t\t\t\t\tsignal,\n\t\t\t\t}),\n\t\t\t(data) => data,\n\t\t);\n\t}\n}\n"],"mappings":";;;AAoBA,IAAa,OAAb,MAA0C;CACzC;CAEA,YAAY,KAAqB;EAChC,KAAKA,OAAO;CACb;CAOA,GACC,MACyE;EACzE,OAAO,KAAKA,KAAK,IAChB,OACC,QAAQ,WACR,mBAAmB;GAAE;GAAQ,cAAc;GAAO;EAAO,CAAC,IAC1D,SAAS,IACX;CACD;CAOA,cACC,MACuD;EACvD,OAAO,KAAKA,KAAK,IAChB,OACC,QAAQ,WACR,4BAA4B;GAC3B;GACA,cAAc;GACd;EACD,CAAC,IACD,SAAS,KAAK,aAChB;CACD;AACD;;AAGA,IAAa,UAAb,MAA6C;CAC5C;CAEA,YAAY,KAAqB;EAChC,KAAKA,OAAO;CACb;CAOA,KACC,MAC2D;EAC3D,OAAO,KAAKA,KAAK,IAChB,OACC,QAAQ,WACR,iBAAiB;GAAE;GAAQ,cAAc;GAAO;EAAO,CAAC,IACxD,SAAS,KAAK,OAChB;CACD;AACD;;AAGA,IAAa,UAAb,MAA6C;CAC5C;CAEA,YAAY,KAAqB;EAChC,KAAKA,OAAO;CACb;CAOA,KACC,MAGC;EACD,OAAO,KAAKA,KAAK,IAChB,OACC,QAAQ,WACR,YAAY;GAAE;GAAQ,cAAc;GAAO;EAAO,CAAC,IACnD,SAAS,IACX;CACD;CAYA,OACC,SACA,MACmE;EACnE,OAAO,KAAKA,KAAK,IAChB,OACC,QAAQ,WACR,aAAa;GACZ;GACA,MAAM,EAAE,UAAU,QAAQ;GAC1B,cAAc;GACd;EACD,CAAC,IACD,SAAS,IACX;CACD;CAQA,OACC,OACA,MACmE;EACnE,OAAO,KAAKA,KAAK,IAChB,OACC,QAAQ,WACR,aAAa;GACZ;GACA,MAAM,EAAE,QAAQ,MAAM;GACtB,cAAc;GACd;EACD,CAAC,IACD,SAAS,IACX;CACD;AACD"}
@@ -7,13 +7,14 @@ var AiGateway = class {
7
7
  this.#ctx = ctx;
8
8
  }
9
9
  get(projectId, branchId, opts) {
10
- return this.#ctx.run(opts, (client) => getProjectBranchAiGateway({
10
+ return this.#ctx.run(opts, (client, signal) => getProjectBranchAiGateway({
11
11
  client,
12
12
  path: {
13
13
  project_id: projectId,
14
14
  branch_id: branchId
15
15
  },
16
- throwOnError: false
16
+ throwOnError: false,
17
+ signal
17
18
  }), (data) => data);
18
19
  }
19
20
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ai-gateway.js","names":["#ctx"],"sources":["../../../src/neon/resources/ai-gateway.ts"],"sourcesContent":["import { getProjectBranchAiGateway } from \"../../client/sdk.gen.js\";\nimport type { BranchAiGateway } from \"../../client/types.gen.js\";\nimport type { CallOptions, RequestContext } from \"../context.js\";\nimport type { NeonResult, Outcome } from \"../result.js\";\n\n/** Branch-scoped AI Gateway endpoint metadata. */\nexport class AiGateway<DThrow extends boolean> {\n\treadonly #ctx: RequestContext;\n\n\tconstructor(ctx: RequestContext) {\n\t\tthis.#ctx = ctx;\n\t}\n\n\t/** @apiCall GET /projects/{project_id}/branches/{branch_id}/ai_gateway */\n\tget(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t): Promise<Outcome<BranchAiGateway, DThrow>>;\n\tget<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<BranchAiGateway, Throw>>;\n\tget(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\topts?: CallOptions,\n\t): Promise<BranchAiGateway | NeonResult<BranchAiGateway>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client) =>\n\t\t\t\tgetProjectBranchAiGateway({\n\t\t\t\t\tclient,\n\t\t\t\t\tpath: { project_id: projectId, branch_id: branchId },\n\t\t\t\t\tthrowOnError: false,\n\t\t\t\t}),\n\t\t\t(data) => data,\n\t\t);\n\t}\n}\n"],"mappings":";;;AAMA,IAAa,YAAb,MAA+C;CAC9C;CAEA,YAAY,KAAqB;EAChC,KAAKA,OAAO;CACb;CAYA,IACC,WACA,UACA,MACyD;EACzD,OAAO,KAAKA,KAAK,IAChB,OACC,WACA,0BAA0B;GACzB;GACA,MAAM;IAAE,YAAY;IAAW,WAAW;GAAS;GACnD,cAAc;EACf,CAAC,IACD,SAAS,IACX;CACD;AACD"}
1
+ {"version":3,"file":"ai-gateway.js","names":["#ctx"],"sources":["../../../src/neon/resources/ai-gateway.ts"],"sourcesContent":["import { getProjectBranchAiGateway } from \"../../client/sdk.gen.js\";\nimport type { BranchAiGateway } from \"../../client/types.gen.js\";\nimport type { CallOptions, RequestContext } from \"../context.js\";\nimport type { NeonResult, Outcome } from \"../result.js\";\n\n/** Branch-scoped AI Gateway endpoint metadata. */\nexport class AiGateway<DThrow extends boolean> {\n\treadonly #ctx: RequestContext;\n\n\tconstructor(ctx: RequestContext) {\n\t\tthis.#ctx = ctx;\n\t}\n\n\t/** @apiCall GET /projects/{project_id}/branches/{branch_id}/ai_gateway */\n\tget(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t): Promise<Outcome<BranchAiGateway, DThrow>>;\n\tget<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<BranchAiGateway, Throw>>;\n\tget(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\topts?: CallOptions,\n\t): Promise<BranchAiGateway | NeonResult<BranchAiGateway>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client, signal) =>\n\t\t\t\tgetProjectBranchAiGateway({\n\t\t\t\t\tclient,\n\t\t\t\t\tpath: { project_id: projectId, branch_id: branchId },\n\t\t\t\t\tthrowOnError: false,\n\t\t\t\t\tsignal,\n\t\t\t\t}),\n\t\t\t(data) => data,\n\t\t);\n\t}\n}\n"],"mappings":";;;A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,GAgSY,MAhSZ,CAAA,CAAA,SAAA,EAAA,MAAA,EAAA,QAAA,EAAA,MAAA,EAAA,KAAA,EAmSjB,oBAnSiB,EAAA,IAAA,EAoSlB,WApSkB,CAoSN,KApSM,CAAA,CAAA,EAqStB,OArSsB,CAqSd,OArSc,CAqSN,sBArSM,EAqSkB,KArSlB,CAAA,CAAA;AAAd"}
@@ -7,28 +7,30 @@ var AuthOauthProviders = class {
7
7
  this.#ctx = ctx;
8
8
  }
9
9
  list(projectId, branchId, opts) {
10
- return this.#ctx.run(opts, (client) => listBranchNeonAuthOauthProviders({
10
+ return this.#ctx.run(opts, (client, signal) => listBranchNeonAuthOauthProviders({
11
11
  client,
12
12
  path: {
13
13
  project_id: projectId,
14
14
  branch_id: branchId
15
15
  },
16
- throwOnError: false
16
+ throwOnError: false,
17
+ signal
17
18
  }), (data) => data.providers);
18
19
  }
19
20
  add(projectId, branchId, input, opts) {
20
- return this.#ctx.run(opts, (client) => addBranchNeonAuthOauthProvider({
21
+ return this.#ctx.run(opts, (client, signal) => addBranchNeonAuthOauthProvider({
21
22
  client,
22
23
  path: {
23
24
  project_id: projectId,
24
25
  branch_id: branchId
25
26
  },
26
27
  body: input,
27
- throwOnError: false
28
+ throwOnError: false,
29
+ signal
28
30
  }), (data) => data);
29
31
  }
30
32
  update(projectId, branchId, providerId, input, opts) {
31
- return this.#ctx.run(opts, (client) => updateBranchNeonAuthOauthProvider({
33
+ return this.#ctx.run(opts, (client, signal) => updateBranchNeonAuthOauthProvider({
32
34
  client,
33
35
  path: {
34
36
  project_id: projectId,
@@ -36,18 +38,20 @@ var AuthOauthProviders = class {
36
38
  oauth_provider_id: providerId
37
39
  },
38
40
  body: input,
39
- throwOnError: false
41
+ throwOnError: false,
42
+ signal
40
43
  }), (data) => data);
41
44
  }
42
45
  delete(projectId, branchId, providerId, opts) {
43
- return this.#ctx.runVoid(opts, (client) => deleteBranchNeonAuthOauthProvider({
46
+ return this.#ctx.runVoid(opts, (client, signal) => deleteBranchNeonAuthOauthProvider({
44
47
  client,
45
48
  path: {
46
49
  project_id: projectId,
47
50
  branch_id: branchId,
48
51
  oauth_provider_id: providerId
49
52
  },
50
- throwOnError: false
53
+ throwOnError: false,
54
+ signal
51
55
  }));
52
56
  }
53
57
  };
@@ -58,35 +62,38 @@ var AuthTrustedDomains = class {
58
62
  this.#ctx = ctx;
59
63
  }
60
64
  list(projectId, branchId, opts) {
61
- return this.#ctx.run(opts, (client) => listBranchNeonAuthTrustedDomains({
65
+ return this.#ctx.run(opts, (client, signal) => listBranchNeonAuthTrustedDomains({
62
66
  client,
63
67
  path: {
64
68
  project_id: projectId,
65
69
  branch_id: branchId
66
70
  },
67
- throwOnError: false
71
+ throwOnError: false,
72
+ signal
68
73
  }), (data) => data.domains);
69
74
  }
70
75
  add(projectId, branchId, input, opts) {
71
- return this.#ctx.runVoid(opts, (client) => addBranchNeonAuthTrustedDomain({
76
+ return this.#ctx.runVoid(opts, (client, signal) => addBranchNeonAuthTrustedDomain({
72
77
  client,
73
78
  path: {
74
79
  project_id: projectId,
75
80
  branch_id: branchId
76
81
  },
77
82
  body: input,
78
- throwOnError: false
83
+ throwOnError: false,
84
+ signal
79
85
  }));
80
86
  }
81
87
  delete(projectId, branchId, input, opts) {
82
- return this.#ctx.runVoid(opts, (client) => deleteBranchNeonAuthTrustedDomain({
88
+ return this.#ctx.runVoid(opts, (client, signal) => deleteBranchNeonAuthTrustedDomain({
83
89
  client,
84
90
  path: {
85
91
  project_id: projectId,
86
92
  branch_id: branchId
87
93
  },
88
94
  body: input,
89
- throwOnError: false
95
+ throwOnError: false,
96
+ signal
90
97
  }));
91
98
  }
92
99
  };
@@ -97,29 +104,31 @@ var AuthUsers = class {
97
104
  this.#ctx = ctx;
98
105
  }
99
106
  create(projectId, branchId, input, opts) {
100
- return this.#ctx.run(opts, (client) => createBranchNeonAuthNewUser({
107
+ return this.#ctx.run(opts, (client, signal) => createBranchNeonAuthNewUser({
101
108
  client,
102
109
  path: {
103
110
  project_id: projectId,
104
111
  branch_id: branchId
105
112
  },
106
113
  body: input,
107
- throwOnError: false
114
+ throwOnError: false,
115
+ signal
108
116
  }), (data) => data);
109
117
  }
110
118
  delete(projectId, branchId, authUserId, opts) {
111
- return this.#ctx.runVoid(opts, (client) => deleteBranchNeonAuthUser({
119
+ return this.#ctx.runVoid(opts, (client, signal) => deleteBranchNeonAuthUser({
112
120
  client,
113
121
  path: {
114
122
  project_id: projectId,
115
123
  branch_id: branchId,
116
124
  auth_user_id: authUserId
117
125
  },
118
- throwOnError: false
126
+ throwOnError: false,
127
+ signal
119
128
  }));
120
129
  }
121
130
  updateRole(projectId, branchId, authUserId, roles, opts) {
122
- return this.#ctx.run(opts, (client) => updateNeonAuthUserRole({
131
+ return this.#ctx.run(opts, (client, signal) => updateNeonAuthUserRole({
123
132
  client,
124
133
  path: {
125
134
  project_id: projectId,
@@ -127,7 +136,8 @@ var AuthUsers = class {
127
136
  auth_user_id: authUserId
128
137
  },
129
138
  body: { roles },
130
- throwOnError: false
139
+ throwOnError: false,
140
+ signal
131
141
  }), (data) => data);
132
142
  }
133
143
  };
@@ -148,46 +158,50 @@ var Auth = class {
148
158
  this.users = new AuthUsers(ctx);
149
159
  }
150
160
  get(projectId, branchId, opts) {
151
- return this.#ctx.run(opts, (client) => getNeonAuth({
161
+ return this.#ctx.run(opts, (client, signal) => getNeonAuth({
152
162
  client,
153
163
  path: {
154
164
  project_id: projectId,
155
165
  branch_id: branchId
156
166
  },
157
- throwOnError: false
167
+ throwOnError: false,
168
+ signal
158
169
  }), (data) => data);
159
170
  }
160
171
  create(projectId, branchId, input, opts) {
161
- return this.#ctx.run(opts, (client) => createNeonAuth({
172
+ return this.#ctx.run(opts, (client, signal) => createNeonAuth({
162
173
  client,
163
174
  path: {
164
175
  project_id: projectId,
165
176
  branch_id: branchId
166
177
  },
167
178
  body: input,
168
- throwOnError: false
179
+ throwOnError: false,
180
+ signal
169
181
  }), (data) => data);
170
182
  }
171
183
  disable(projectId, branchId, input, opts) {
172
- return this.#ctx.runVoid(opts, (client) => disableNeonAuth({
184
+ return this.#ctx.runVoid(opts, (client, signal) => disableNeonAuth({
173
185
  client,
174
186
  path: {
175
187
  project_id: projectId,
176
188
  branch_id: branchId
177
189
  },
178
190
  body: { delete_data: input?.deleteData },
179
- throwOnError: false
191
+ throwOnError: false,
192
+ signal
180
193
  }));
181
194
  }
182
195
  updateConfig(projectId, branchId, input, opts) {
183
- return this.#ctx.run(opts, (client) => updateNeonAuthConfig({
196
+ return this.#ctx.run(opts, (client, signal) => updateNeonAuthConfig({
184
197
  client,
185
198
  path: {
186
199
  project_id: projectId,
187
200
  branch_id: branchId
188
201
  },
189
202
  body: input,
190
- throwOnError: false
203
+ throwOnError: false,
204
+ signal
191
205
  }), (data) => data);
192
206
  }
193
207
  };