@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 +1 @@
1
- {"version":3,"file":"auth.js","names":["#ctx"],"sources":["../../../src/neon/resources/auth.ts"],"sourcesContent":["import {\n\taddBranchNeonAuthOauthProvider,\n\taddBranchNeonAuthTrustedDomain,\n\tcreateBranchNeonAuthNewUser,\n\tcreateNeonAuth,\n\tdeleteBranchNeonAuthOauthProvider,\n\tdeleteBranchNeonAuthTrustedDomain,\n\tdeleteBranchNeonAuthUser,\n\tdisableNeonAuth,\n\tgetNeonAuth,\n\tlistBranchNeonAuthOauthProviders,\n\tlistBranchNeonAuthTrustedDomains,\n\tupdateBranchNeonAuthOauthProvider,\n\tupdateNeonAuthConfig,\n\tupdateNeonAuthUserRole,\n} from \"../../client/sdk.gen.js\";\nimport type {\n\tCreateBranchNeonAuthNewUserRequest,\n\tEnableNeonAuthIntegrationRequest,\n\tNeonAuthAddDomainToRedirectUriWhitelistRequest,\n\tNeonAuthAddOAuthProviderRequest,\n\tNeonAuthConfigResponse,\n\tNeonAuthConfigUpdate,\n\tNeonAuthCreateIntegrationResponse,\n\tNeonAuthCreateNewUserResponse,\n\tNeonAuthDeleteDomainFromRedirectUriWhitelistRequest,\n\tNeonAuthIntegration,\n\tNeonAuthOauthProvider,\n\tNeonAuthOauthProviderId,\n\tNeonAuthRedirectUriWhitelistDomain,\n\tNeonAuthUpdateOAuthProviderRequest,\n\tUpdateNeonAuthUserRoleResponse,\n} from \"../../client/types.gen.js\";\nimport type { CallOptions, RequestContext } from \"../context.js\";\nimport type { NeonResult, Outcome } from \"../result.js\";\n\n/** Branch-scoped Neon Auth OAuth providers (Google, GitHub, …). */\nexport class AuthOauthProviders<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}/auth/oauth_providers */\n\tlist(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t): Promise<Outcome<NeonAuthOauthProvider[], DThrow>>;\n\tlist<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<NeonAuthOauthProvider[], Throw>>;\n\tlist(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\topts?: CallOptions,\n\t): Promise<NeonAuthOauthProvider[] | NeonResult<NeonAuthOauthProvider[]>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client) =>\n\t\t\t\tlistBranchNeonAuthOauthProviders({\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.providers,\n\t\t);\n\t}\n\n\t/** @apiCall POST /projects/{project_id}/branches/{branch_id}/auth/oauth_providers */\n\tadd(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: NeonAuthAddOAuthProviderRequest,\n\t): Promise<Outcome<NeonAuthOauthProvider, DThrow>>;\n\tadd<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: NeonAuthAddOAuthProviderRequest,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<NeonAuthOauthProvider, Throw>>;\n\tadd(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: NeonAuthAddOAuthProviderRequest,\n\t\topts?: CallOptions,\n\t): Promise<NeonAuthOauthProvider | NeonResult<NeonAuthOauthProvider>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client) =>\n\t\t\t\taddBranchNeonAuthOauthProvider({\n\t\t\t\t\tclient,\n\t\t\t\t\tpath: { project_id: projectId, branch_id: branchId },\n\t\t\t\t\tbody: input,\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 PATCH …/auth/oauth_providers/{oauth_provider_id} */\n\tupdate(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tproviderId: NeonAuthOauthProviderId,\n\t\tinput: NeonAuthUpdateOAuthProviderRequest,\n\t): Promise<Outcome<NeonAuthOauthProvider, DThrow>>;\n\tupdate<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tproviderId: NeonAuthOauthProviderId,\n\t\tinput: NeonAuthUpdateOAuthProviderRequest,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<NeonAuthOauthProvider, Throw>>;\n\tupdate(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tproviderId: NeonAuthOauthProviderId,\n\t\tinput: NeonAuthUpdateOAuthProviderRequest,\n\t\topts?: CallOptions,\n\t): Promise<NeonAuthOauthProvider | NeonResult<NeonAuthOauthProvider>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client) =>\n\t\t\t\tupdateBranchNeonAuthOauthProvider({\n\t\t\t\t\tclient,\n\t\t\t\t\tpath: {\n\t\t\t\t\t\tproject_id: projectId,\n\t\t\t\t\t\tbranch_id: branchId,\n\t\t\t\t\t\toauth_provider_id: providerId,\n\t\t\t\t\t},\n\t\t\t\t\tbody: input,\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 …/auth/oauth_providers/{oauth_provider_id} */\n\tdelete(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tproviderId: NeonAuthOauthProviderId,\n\t): Promise<Outcome<void, DThrow>>;\n\tdelete<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tproviderId: NeonAuthOauthProviderId,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<void, Throw>>;\n\tdelete(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tproviderId: NeonAuthOauthProviderId,\n\t\topts?: CallOptions,\n\t): Promise<void | NeonResult<void>> {\n\t\treturn this.#ctx.runVoid(opts, (client) =>\n\t\t\tdeleteBranchNeonAuthOauthProvider({\n\t\t\t\tclient,\n\t\t\t\tpath: {\n\t\t\t\t\tproject_id: projectId,\n\t\t\t\t\tbranch_id: branchId,\n\t\t\t\t\toauth_provider_id: providerId,\n\t\t\t\t},\n\t\t\t\tthrowOnError: false,\n\t\t\t}),\n\t\t);\n\t}\n}\n\n/** Branch-scoped Neon Auth trusted domains (redirect URI whitelist). */\nexport class AuthTrustedDomains<DThrow extends boolean> {\n\treadonly #ctx: RequestContext;\n\n\tconstructor(ctx: RequestContext) {\n\t\tthis.#ctx = ctx;\n\t}\n\n\t/** @apiCall GET …/auth/trusted_domains */\n\tlist(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t): Promise<Outcome<NeonAuthRedirectUriWhitelistDomain[], DThrow>>;\n\tlist<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<NeonAuthRedirectUriWhitelistDomain[], Throw>>;\n\tlist(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\topts?: CallOptions,\n\t): Promise<\n\t\t| NeonAuthRedirectUriWhitelistDomain[]\n\t\t| NeonResult<NeonAuthRedirectUriWhitelistDomain[]>\n\t> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client) =>\n\t\t\t\tlistBranchNeonAuthTrustedDomains({\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.domains,\n\t\t);\n\t}\n\n\t/** @apiCall POST …/auth/trusted_domains */\n\tadd(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: NeonAuthAddDomainToRedirectUriWhitelistRequest,\n\t): Promise<Outcome<void, DThrow>>;\n\tadd<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: NeonAuthAddDomainToRedirectUriWhitelistRequest,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<void, Throw>>;\n\tadd(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: NeonAuthAddDomainToRedirectUriWhitelistRequest,\n\t\topts?: CallOptions,\n\t): Promise<void | NeonResult<void>> {\n\t\treturn this.#ctx.runVoid(opts, (client) =>\n\t\t\taddBranchNeonAuthTrustedDomain({\n\t\t\t\tclient,\n\t\t\t\tpath: { project_id: projectId, branch_id: branchId },\n\t\t\t\tbody: input,\n\t\t\t\tthrowOnError: false,\n\t\t\t}),\n\t\t);\n\t}\n\n\t/** @apiCall DELETE …/auth/trusted_domains */\n\tdelete(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: NeonAuthDeleteDomainFromRedirectUriWhitelistRequest,\n\t): Promise<Outcome<void, DThrow>>;\n\tdelete<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: NeonAuthDeleteDomainFromRedirectUriWhitelistRequest,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<void, Throw>>;\n\tdelete(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: NeonAuthDeleteDomainFromRedirectUriWhitelistRequest,\n\t\topts?: CallOptions,\n\t): Promise<void | NeonResult<void>> {\n\t\treturn this.#ctx.runVoid(opts, (client) =>\n\t\t\tdeleteBranchNeonAuthTrustedDomain({\n\t\t\t\tclient,\n\t\t\t\tpath: { project_id: projectId, branch_id: branchId },\n\t\t\t\tbody: input,\n\t\t\t\tthrowOnError: false,\n\t\t\t}),\n\t\t);\n\t}\n}\n\n/** Branch-scoped Neon Auth users. */\nexport class AuthUsers<DThrow extends boolean> {\n\treadonly #ctx: RequestContext;\n\n\tconstructor(ctx: RequestContext) {\n\t\tthis.#ctx = ctx;\n\t}\n\n\t/** @apiCall POST …/auth/users */\n\tcreate(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: CreateBranchNeonAuthNewUserRequest,\n\t): Promise<Outcome<NeonAuthCreateNewUserResponse, DThrow>>;\n\tcreate<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: CreateBranchNeonAuthNewUserRequest,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<NeonAuthCreateNewUserResponse, Throw>>;\n\tcreate(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: CreateBranchNeonAuthNewUserRequest,\n\t\topts?: CallOptions,\n\t): Promise<\n\t\t| NeonAuthCreateNewUserResponse\n\t\t| NeonResult<NeonAuthCreateNewUserResponse>\n\t> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client) =>\n\t\t\t\tcreateBranchNeonAuthNewUser({\n\t\t\t\t\tclient,\n\t\t\t\t\tpath: { project_id: projectId, branch_id: branchId },\n\t\t\t\t\tbody: input,\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 …/auth/users/{auth_user_id} */\n\tdelete(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tauthUserId: string,\n\t): Promise<Outcome<void, DThrow>>;\n\tdelete<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tauthUserId: string,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<void, Throw>>;\n\tdelete(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tauthUserId: string,\n\t\topts?: CallOptions,\n\t): Promise<void | NeonResult<void>> {\n\t\treturn this.#ctx.runVoid(opts, (client) =>\n\t\t\tdeleteBranchNeonAuthUser({\n\t\t\t\tclient,\n\t\t\t\tpath: {\n\t\t\t\t\tproject_id: projectId,\n\t\t\t\t\tbranch_id: branchId,\n\t\t\t\t\tauth_user_id: authUserId,\n\t\t\t\t},\n\t\t\t\tthrowOnError: false,\n\t\t\t}),\n\t\t);\n\t}\n\n\t/** @apiCall PATCH …/auth/users/{auth_user_id}/role */\n\tupdateRole(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tauthUserId: string,\n\t\troles: string[],\n\t): Promise<Outcome<UpdateNeonAuthUserRoleResponse, DThrow>>;\n\tupdateRole<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tauthUserId: string,\n\t\troles: string[],\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<UpdateNeonAuthUserRoleResponse, Throw>>;\n\tupdateRole(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tauthUserId: string,\n\t\troles: string[],\n\t\topts?: CallOptions,\n\t): Promise<\n\t\t| UpdateNeonAuthUserRoleResponse\n\t\t| NeonResult<UpdateNeonAuthUserRoleResponse>\n\t> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client) =>\n\t\t\t\tupdateNeonAuthUserRole({\n\t\t\t\t\tclient,\n\t\t\t\t\tpath: {\n\t\t\t\t\t\tproject_id: projectId,\n\t\t\t\t\t\tbranch_id: branchId,\n\t\t\t\t\t\tauth_user_id: authUserId,\n\t\t\t\t\t},\n\t\t\t\t\tbody: { roles },\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\n/**\n * Branch-scoped Neon Auth. Enable/disable the integration, tune its config, and manage\n * OAuth providers, trusted domains, and users. The legacy project-scoped auth endpoints are\n * deprecated and stay raw-only.\n */\nexport class Auth<DThrow extends boolean> {\n\treadonly #ctx: RequestContext;\n\treadonly oauthProviders: AuthOauthProviders<DThrow>;\n\treadonly trustedDomains: AuthTrustedDomains<DThrow>;\n\treadonly users: AuthUsers<DThrow>;\n\n\tconstructor(ctx: RequestContext) {\n\t\tthis.#ctx = ctx;\n\t\tthis.oauthProviders = new AuthOauthProviders<DThrow>(ctx);\n\t\tthis.trustedDomains = new AuthTrustedDomains<DThrow>(ctx);\n\t\tthis.users = new AuthUsers<DThrow>(ctx);\n\t}\n\n\t/** @apiCall GET /projects/{project_id}/branches/{branch_id}/auth */\n\tget(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t): Promise<Outcome<NeonAuthIntegration, DThrow>>;\n\tget<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<NeonAuthIntegration, Throw>>;\n\tget(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\topts?: CallOptions,\n\t): Promise<NeonAuthIntegration | NeonResult<NeonAuthIntegration>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client) =>\n\t\t\t\tgetNeonAuth({\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\t/** @apiCall POST /projects/{project_id}/branches/{branch_id}/auth */\n\tcreate(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: EnableNeonAuthIntegrationRequest,\n\t): Promise<Outcome<NeonAuthCreateIntegrationResponse, DThrow>>;\n\tcreate<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: EnableNeonAuthIntegrationRequest,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<NeonAuthCreateIntegrationResponse, Throw>>;\n\tcreate(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: EnableNeonAuthIntegrationRequest,\n\t\topts?: CallOptions,\n\t): Promise<\n\t\t| NeonAuthCreateIntegrationResponse\n\t\t| NeonResult<NeonAuthCreateIntegrationResponse>\n\t> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client) =>\n\t\t\t\tcreateNeonAuth({\n\t\t\t\t\tclient,\n\t\t\t\t\tpath: { project_id: projectId, branch_id: branchId },\n\t\t\t\t\tbody: input,\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 /projects/{project_id}/branches/{branch_id}/auth */\n\tdisable(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput?: { deleteData?: boolean },\n\t): Promise<Outcome<void, DThrow>>;\n\tdisable<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: { deleteData?: boolean } | undefined,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<void, Throw>>;\n\tdisable(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput?: { deleteData?: boolean },\n\t\topts?: CallOptions,\n\t): Promise<void | NeonResult<void>> {\n\t\treturn this.#ctx.runVoid(opts, (client) =>\n\t\t\tdisableNeonAuth({\n\t\t\t\tclient,\n\t\t\t\tpath: { project_id: projectId, branch_id: branchId },\n\t\t\t\tbody: { delete_data: input?.deleteData },\n\t\t\t\tthrowOnError: false,\n\t\t\t}),\n\t\t);\n\t}\n\n\t/** @apiCall PATCH /projects/{project_id}/branches/{branch_id}/auth/config */\n\tupdateConfig(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: NeonAuthConfigUpdate,\n\t): Promise<Outcome<NeonAuthConfigResponse, DThrow>>;\n\tupdateConfig<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: NeonAuthConfigUpdate,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<NeonAuthConfigResponse, Throw>>;\n\tupdateConfig(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: NeonAuthConfigUpdate,\n\t\topts?: CallOptions,\n\t): Promise<NeonAuthConfigResponse | NeonResult<NeonAuthConfigResponse>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client) =>\n\t\t\t\tupdateNeonAuthConfig({\n\t\t\t\t\tclient,\n\t\t\t\t\tpath: { project_id: projectId, branch_id: branchId },\n\t\t\t\t\tbody: input,\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":";;;AAqCA,IAAa,qBAAb,MAAwD;CACvD;CAEA,YAAY,KAAqB;EAChC,KAAKA,OAAO;CACb;CAYA,KACC,WACA,UACA,MACyE;EACzE,OAAO,KAAKA,KAAK,IAChB,OACC,WACA,iCAAiC;GAChC;GACA,MAAM;IAAE,YAAY;IAAW,WAAW;GAAS;GACnD,cAAc;EACf,CAAC,IACD,SAAS,KAAK,SAChB;CACD;CAcA,IACC,WACA,UACA,OACA,MACqE;EACrE,OAAO,KAAKA,KAAK,IAChB,OACC,WACA,+BAA+B;GAC9B;GACA,MAAM;IAAE,YAAY;IAAW,WAAW;GAAS;GACnD,MAAM;GACN,cAAc;EACf,CAAC,IACD,SAAS,IACX;CACD;CAgBA,OACC,WACA,UACA,YACA,OACA,MACqE;EACrE,OAAO,KAAKA,KAAK,IAChB,OACC,WACA,kCAAkC;GACjC;GACA,MAAM;IACL,YAAY;IACZ,WAAW;IACX,mBAAmB;GACpB;GACA,MAAM;GACN,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c;EACf,CAAC,CACF;CACD;CAgBA,WACC,WACA,UACA,YACA,OACA,MAIC;EACD,OAAO,KAAKA,KAAK,IAChB,OACC,WACA,uBAAuB;GACtB;GACA,MAAM;IACL,YAAY;IACZ,WAAW;IACX,cAAc;GACf;GACA,MAAM,EAAE,MAAM;GACd,cAAc;EACf,CAAC,IACD,SAAS,IACX;CACD;AACD;;;;;;AAOA,IAAa,OAAb,MAA0C;CACzC;CACA;CACA;CACA;CAEA,YAAY,KAAqB;EAChC,KAAKA,OAAO;EACZ,KAAK,iBAAiB,IAAI,mBAA2B,GAAG;EACxD,KAAK,iBAAiB,IAAI,mBAA2B,GAAG;EACxD,KAAK,QAAQ,IAAI,UAAkB,GAAG;CACvC;CAYA,IACC,WACA,UACA,MACiE;EACjE,OAAO,KAAKA,KAAK,IAChB,OACC,WACA,YAAY;GACX;GACA,MAAM;IAAE,YAAY;IAAW,WAAW;GAAS;GACnD,cAAc;EACf,CAAC,IACD,SAAS,IACX;CACD;CAcA,OACC,WACA,UACA,OACA,MAIC;EACD,OAAO,KAAKA,KAAK,IAChB,OACC,WACA,eAAe;GACd;GACA,MAAM;IAAE,YAAY;IAAW,WAAW;GAAS;GACnD,MAAM;GACN,cAAc;EACf,CAAC,IACD,SAAS,IACX;CACD;CAcA,QACC,WACA,UACA,OACA,MACmC;EACnC,OAAO,KAAKA,KAAK,QAAQ,OAAO,WAC/B,gBAAgB;GACf;GACA,MAAM;IAAE,YAAY;IAAW,WAAW;GAAS;GACnD,MAAM,EAAE,aAAa,OAAO,WAAW;GACvC,cAAc;EACf,CAAC,CACF;CACD;CAcA,aACC,WACA,UACA,OACA,MACuE;EACvE,OAAO,KAAKA,KAAK,IAChB,OACC,WACA,qBAAqB;GACpB;GACA,MAAM;IAAE,YAAY;IAAW,WAAW;GAAS;GACnD,MAAM;GACN,cAAc;EACf,CAAC,IACD,SAAS,IACX;CACD;AACD"}
1
+ {"version":3,"file":"auth.js","names":["#ctx"],"sources":["../../../src/neon/resources/auth.ts"],"sourcesContent":["import {\n\taddBranchNeonAuthOauthProvider,\n\taddBranchNeonAuthTrustedDomain,\n\tcreateBranchNeonAuthNewUser,\n\tcreateNeonAuth,\n\tdeleteBranchNeonAuthOauthProvider,\n\tdeleteBranchNeonAuthTrustedDomain,\n\tdeleteBranchNeonAuthUser,\n\tdisableNeonAuth,\n\tgetNeonAuth,\n\tlistBranchNeonAuthOauthProviders,\n\tlistBranchNeonAuthTrustedDomains,\n\tupdateBranchNeonAuthOauthProvider,\n\tupdateNeonAuthConfig,\n\tupdateNeonAuthUserRole,\n} from \"../../client/sdk.gen.js\";\nimport type {\n\tCreateBranchNeonAuthNewUserRequest,\n\tEnableNeonAuthIntegrationRequest,\n\tNeonAuthAddDomainToRedirectUriWhitelistRequest,\n\tNeonAuthAddOAuthProviderRequest,\n\tNeonAuthConfigResponse,\n\tNeonAuthConfigUpdate,\n\tNeonAuthCreateIntegrationResponse,\n\tNeonAuthCreateNewUserResponse,\n\tNeonAuthDeleteDomainFromRedirectUriWhitelistRequest,\n\tNeonAuthIntegration,\n\tNeonAuthOauthProvider,\n\tNeonAuthOauthProviderId,\n\tNeonAuthRedirectUriWhitelistDomain,\n\tNeonAuthUpdateOAuthProviderRequest,\n\tUpdateNeonAuthUserRoleResponse,\n} from \"../../client/types.gen.js\";\nimport type { CallOptions, RequestContext } from \"../context.js\";\nimport type { NeonResult, Outcome } from \"../result.js\";\n\n/** Branch-scoped Neon Auth OAuth providers (Google, GitHub, …). */\nexport class AuthOauthProviders<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}/auth/oauth_providers */\n\tlist(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t): Promise<Outcome<NeonAuthOauthProvider[], DThrow>>;\n\tlist<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<NeonAuthOauthProvider[], Throw>>;\n\tlist(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\topts?: CallOptions,\n\t): Promise<NeonAuthOauthProvider[] | NeonResult<NeonAuthOauthProvider[]>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client, signal) =>\n\t\t\t\tlistBranchNeonAuthOauthProviders({\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.providers,\n\t\t);\n\t}\n\n\t/** @apiCall POST /projects/{project_id}/branches/{branch_id}/auth/oauth_providers */\n\tadd(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: NeonAuthAddOAuthProviderRequest,\n\t): Promise<Outcome<NeonAuthOauthProvider, DThrow>>;\n\tadd<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: NeonAuthAddOAuthProviderRequest,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<NeonAuthOauthProvider, Throw>>;\n\tadd(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: NeonAuthAddOAuthProviderRequest,\n\t\topts?: CallOptions,\n\t): Promise<NeonAuthOauthProvider | NeonResult<NeonAuthOauthProvider>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client, signal) =>\n\t\t\t\taddBranchNeonAuthOauthProvider({\n\t\t\t\t\tclient,\n\t\t\t\t\tpath: { project_id: projectId, branch_id: branchId },\n\t\t\t\t\tbody: input,\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 PATCH …/auth/oauth_providers/{oauth_provider_id} */\n\tupdate(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tproviderId: NeonAuthOauthProviderId,\n\t\tinput: NeonAuthUpdateOAuthProviderRequest,\n\t): Promise<Outcome<NeonAuthOauthProvider, DThrow>>;\n\tupdate<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tproviderId: NeonAuthOauthProviderId,\n\t\tinput: NeonAuthUpdateOAuthProviderRequest,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<NeonAuthOauthProvider, Throw>>;\n\tupdate(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tproviderId: NeonAuthOauthProviderId,\n\t\tinput: NeonAuthUpdateOAuthProviderRequest,\n\t\topts?: CallOptions,\n\t): Promise<NeonAuthOauthProvider | NeonResult<NeonAuthOauthProvider>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client, signal) =>\n\t\t\t\tupdateBranchNeonAuthOauthProvider({\n\t\t\t\t\tclient,\n\t\t\t\t\tpath: {\n\t\t\t\t\t\tproject_id: projectId,\n\t\t\t\t\t\tbranch_id: branchId,\n\t\t\t\t\t\toauth_provider_id: providerId,\n\t\t\t\t\t},\n\t\t\t\t\tbody: input,\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 …/auth/oauth_providers/{oauth_provider_id} */\n\tdelete(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tproviderId: NeonAuthOauthProviderId,\n\t): Promise<Outcome<void, DThrow>>;\n\tdelete<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tproviderId: NeonAuthOauthProviderId,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<void, Throw>>;\n\tdelete(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tproviderId: NeonAuthOauthProviderId,\n\t\topts?: CallOptions,\n\t): Promise<void | NeonResult<void>> {\n\t\treturn this.#ctx.runVoid(opts, (client, signal) =>\n\t\t\tdeleteBranchNeonAuthOauthProvider({\n\t\t\t\tclient,\n\t\t\t\tpath: {\n\t\t\t\t\tproject_id: projectId,\n\t\t\t\t\tbranch_id: branchId,\n\t\t\t\t\toauth_provider_id: providerId,\n\t\t\t\t},\n\t\t\t\tthrowOnError: false,\n\t\t\t\tsignal,\n\t\t\t}),\n\t\t);\n\t}\n}\n\n/** Branch-scoped Neon Auth trusted domains (redirect URI whitelist). */\nexport class AuthTrustedDomains<DThrow extends boolean> {\n\treadonly #ctx: RequestContext;\n\n\tconstructor(ctx: RequestContext) {\n\t\tthis.#ctx = ctx;\n\t}\n\n\t/** @apiCall GET …/auth/trusted_domains */\n\tlist(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t): Promise<Outcome<NeonAuthRedirectUriWhitelistDomain[], DThrow>>;\n\tlist<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<NeonAuthRedirectUriWhitelistDomain[], Throw>>;\n\tlist(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\topts?: CallOptions,\n\t): Promise<\n\t\t| NeonAuthRedirectUriWhitelistDomain[]\n\t\t| NeonResult<NeonAuthRedirectUriWhitelistDomain[]>\n\t> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client, signal) =>\n\t\t\t\tlistBranchNeonAuthTrustedDomains({\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.domains,\n\t\t);\n\t}\n\n\t/** @apiCall POST …/auth/trusted_domains */\n\tadd(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: NeonAuthAddDomainToRedirectUriWhitelistRequest,\n\t): Promise<Outcome<void, DThrow>>;\n\tadd<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: NeonAuthAddDomainToRedirectUriWhitelistRequest,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<void, Throw>>;\n\tadd(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: NeonAuthAddDomainToRedirectUriWhitelistRequest,\n\t\topts?: CallOptions,\n\t): Promise<void | NeonResult<void>> {\n\t\treturn this.#ctx.runVoid(opts, (client, signal) =>\n\t\t\taddBranchNeonAuthTrustedDomain({\n\t\t\t\tclient,\n\t\t\t\tpath: { project_id: projectId, branch_id: branchId },\n\t\t\t\tbody: input,\n\t\t\t\tthrowOnError: false,\n\t\t\t\tsignal,\n\t\t\t}),\n\t\t);\n\t}\n\n\t/** @apiCall DELETE …/auth/trusted_domains */\n\tdelete(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: NeonAuthDeleteDomainFromRedirectUriWhitelistRequest,\n\t): Promise<Outcome<void, DThrow>>;\n\tdelete<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: NeonAuthDeleteDomainFromRedirectUriWhitelistRequest,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<void, Throw>>;\n\tdelete(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: NeonAuthDeleteDomainFromRedirectUriWhitelistRequest,\n\t\topts?: CallOptions,\n\t): Promise<void | NeonResult<void>> {\n\t\treturn this.#ctx.runVoid(opts, (client, signal) =>\n\t\t\tdeleteBranchNeonAuthTrustedDomain({\n\t\t\t\tclient,\n\t\t\t\tpath: { project_id: projectId, branch_id: branchId },\n\t\t\t\tbody: input,\n\t\t\t\tthrowOnError: false,\n\t\t\t\tsignal,\n\t\t\t}),\n\t\t);\n\t}\n}\n\n/** Branch-scoped Neon Auth users. */\nexport class AuthUsers<DThrow extends boolean> {\n\treadonly #ctx: RequestContext;\n\n\tconstructor(ctx: RequestContext) {\n\t\tthis.#ctx = ctx;\n\t}\n\n\t/** @apiCall POST …/auth/users */\n\tcreate(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: CreateBranchNeonAuthNewUserRequest,\n\t): Promise<Outcome<NeonAuthCreateNewUserResponse, DThrow>>;\n\tcreate<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: CreateBranchNeonAuthNewUserRequest,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<NeonAuthCreateNewUserResponse, Throw>>;\n\tcreate(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: CreateBranchNeonAuthNewUserRequest,\n\t\topts?: CallOptions,\n\t): Promise<\n\t\t| NeonAuthCreateNewUserResponse\n\t\t| NeonResult<NeonAuthCreateNewUserResponse>\n\t> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client, signal) =>\n\t\t\t\tcreateBranchNeonAuthNewUser({\n\t\t\t\t\tclient,\n\t\t\t\t\tpath: { project_id: projectId, branch_id: branchId },\n\t\t\t\t\tbody: input,\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 …/auth/users/{auth_user_id} */\n\tdelete(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tauthUserId: string,\n\t): Promise<Outcome<void, DThrow>>;\n\tdelete<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tauthUserId: string,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<void, Throw>>;\n\tdelete(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tauthUserId: string,\n\t\topts?: CallOptions,\n\t): Promise<void | NeonResult<void>> {\n\t\treturn this.#ctx.runVoid(opts, (client, signal) =>\n\t\t\tdeleteBranchNeonAuthUser({\n\t\t\t\tclient,\n\t\t\t\tpath: {\n\t\t\t\t\tproject_id: projectId,\n\t\t\t\t\tbranch_id: branchId,\n\t\t\t\t\tauth_user_id: authUserId,\n\t\t\t\t},\n\t\t\t\tthrowOnError: false,\n\t\t\t\tsignal,\n\t\t\t}),\n\t\t);\n\t}\n\n\t/** @apiCall PATCH …/auth/users/{auth_user_id}/role */\n\tupdateRole(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tauthUserId: string,\n\t\troles: string[],\n\t): Promise<Outcome<UpdateNeonAuthUserRoleResponse, DThrow>>;\n\tupdateRole<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tauthUserId: string,\n\t\troles: string[],\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<UpdateNeonAuthUserRoleResponse, Throw>>;\n\tupdateRole(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tauthUserId: string,\n\t\troles: string[],\n\t\topts?: CallOptions,\n\t): Promise<\n\t\t| UpdateNeonAuthUserRoleResponse\n\t\t| NeonResult<UpdateNeonAuthUserRoleResponse>\n\t> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client, signal) =>\n\t\t\t\tupdateNeonAuthUserRole({\n\t\t\t\t\tclient,\n\t\t\t\t\tpath: {\n\t\t\t\t\t\tproject_id: projectId,\n\t\t\t\t\t\tbranch_id: branchId,\n\t\t\t\t\t\tauth_user_id: authUserId,\n\t\t\t\t\t},\n\t\t\t\t\tbody: { roles },\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\n/**\n * Branch-scoped Neon Auth. Enable/disable the integration, tune its config, and manage\n * OAuth providers, trusted domains, and users. The legacy project-scoped auth endpoints are\n * deprecated and stay raw-only.\n */\nexport class Auth<DThrow extends boolean> {\n\treadonly #ctx: RequestContext;\n\treadonly oauthProviders: AuthOauthProviders<DThrow>;\n\treadonly trustedDomains: AuthTrustedDomains<DThrow>;\n\treadonly users: AuthUsers<DThrow>;\n\n\tconstructor(ctx: RequestContext) {\n\t\tthis.#ctx = ctx;\n\t\tthis.oauthProviders = new AuthOauthProviders<DThrow>(ctx);\n\t\tthis.trustedDomains = new AuthTrustedDomains<DThrow>(ctx);\n\t\tthis.users = new AuthUsers<DThrow>(ctx);\n\t}\n\n\t/** @apiCall GET /projects/{project_id}/branches/{branch_id}/auth */\n\tget(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t): Promise<Outcome<NeonAuthIntegration, DThrow>>;\n\tget<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<NeonAuthIntegration, Throw>>;\n\tget(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\topts?: CallOptions,\n\t): Promise<NeonAuthIntegration | NeonResult<NeonAuthIntegration>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client, signal) =>\n\t\t\t\tgetNeonAuth({\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\t/** @apiCall POST /projects/{project_id}/branches/{branch_id}/auth */\n\tcreate(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: EnableNeonAuthIntegrationRequest,\n\t): Promise<Outcome<NeonAuthCreateIntegrationResponse, DThrow>>;\n\tcreate<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: EnableNeonAuthIntegrationRequest,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<NeonAuthCreateIntegrationResponse, Throw>>;\n\tcreate(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: EnableNeonAuthIntegrationRequest,\n\t\topts?: CallOptions,\n\t): Promise<\n\t\t| NeonAuthCreateIntegrationResponse\n\t\t| NeonResult<NeonAuthCreateIntegrationResponse>\n\t> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client, signal) =>\n\t\t\t\tcreateNeonAuth({\n\t\t\t\t\tclient,\n\t\t\t\t\tpath: { project_id: projectId, branch_id: branchId },\n\t\t\t\t\tbody: input,\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 /projects/{project_id}/branches/{branch_id}/auth */\n\tdisable(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput?: { deleteData?: boolean },\n\t): Promise<Outcome<void, DThrow>>;\n\tdisable<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: { deleteData?: boolean } | undefined,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<void, Throw>>;\n\tdisable(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput?: { deleteData?: boolean },\n\t\topts?: CallOptions,\n\t): Promise<void | NeonResult<void>> {\n\t\treturn this.#ctx.runVoid(opts, (client, signal) =>\n\t\t\tdisableNeonAuth({\n\t\t\t\tclient,\n\t\t\t\tpath: { project_id: projectId, branch_id: branchId },\n\t\t\t\tbody: { delete_data: input?.deleteData },\n\t\t\t\tthrowOnError: false,\n\t\t\t\tsignal,\n\t\t\t}),\n\t\t);\n\t}\n\n\t/** @apiCall PATCH /projects/{project_id}/branches/{branch_id}/auth/config */\n\tupdateConfig(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: NeonAuthConfigUpdate,\n\t): Promise<Outcome<NeonAuthConfigResponse, DThrow>>;\n\tupdateConfig<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: NeonAuthConfigUpdate,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<NeonAuthConfigResponse, Throw>>;\n\tupdateConfig(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: NeonAuthConfigUpdate,\n\t\topts?: CallOptions,\n\t): Promise<NeonAuthConfigResponse | NeonResult<NeonAuthConfigResponse>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client, signal) =>\n\t\t\t\tupdateNeonAuthConfig({\n\t\t\t\t\tclient,\n\t\t\t\t\tpath: { project_id: projectId, branch_id: branchId },\n\t\t\t\t\tbody: input,\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":";;;AAqCA,IAAa,qBAAb,MAAwD;CACvD;CAEA,YAAY,KAAqB;EAChC,KAAKA,OAAO;CACb;CAYA,KACC,WACA,UACA,MACyE;EACzE,OAAO,KAAKA,KAAK,IAChB,OACC,QAAQ,WACR,iCAAiC;GAChC;GACA,MAAM;IAAE,YAAY;IAAW,WAAW;GAAS;GACnD,cAAc;GACd;EACD,CAAC,IACD,SAAS,KAAK,SAChB;CACD;CAcA,IACC,WACA,UACA,OACA,MACqE;EACrE,OAAO,KAAKA,KAAK,IAChB,OACC,QAAQ,WACR,+BAA+B;GAC9B;GACA,MAAM;IAAE,YAAY;IAAW,WAAW;GAAS;GACnD,MAAM;GACN,cAAc;GACd;EACD,CAAC,IACD,SAAS,IACX;CACD;CAgBA,OACC,WACA,UACA,YACA,OACA,MACqE;EACrE,OAAO,KAAKA,KAAK,IAChB,OACC,QAAQ,WACR,kCAAkC;GACjC;GACA,MAAM;IACL,YAAY;IACZ,WAAW;IACX,mBAAmB;GACpB;GACA,MAAM;GACN,cAAc;GACd;EACD,CAAC,IACD,SAAS,IACX;CACD;CAcA,OACC,WACA,UACA,YACA,MACmC;EACnC,OAAO,KAAKA,KAAK,QAAQ,OAAO,QAAQ,WACvC,kCAAkC;GACjC;GACA,MAAM;IACL,YAAY;IACZ,WAAW;IACX,mBAAmB;GACpB;GACA,cAAc;GACd;EACD,CAAC,CACF;CACD;AACD;;AAGA,IAAa,qBAAb,MAAwD;CACvD;CAEA,YAAY,KAAqB;EAChC,KAAKA,OAAO;CACb;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D;AACD;;;;;;AAOA,IAAa,OAAb,MAA0C;CACzC;CACA;CACA;CACA;CAEA,YAAY,KAAqB;EAChC,KAAKA,OAAO;EACZ,KAAK,iBAAiB,IAAI,mBAA2B,GAAG;EACxD,KAAK,iBAAiB,IAAI,mBAA2B,GAAG;EACxD,KAAK,QAAQ,IAAI,UAAkB,GAAG;CACvC;CAYA,IACC,WACA,UACA,MACiE;EACjE,OAAO,KAAKA,KAAK,IAChB,OACC,QAAQ,WACR,YAAY;GACX;GACA,MAAM;IAAE,YAAY;IAAW,WAAW;GAAS;GACnD,cAAc;GACd;EACD,CAAC,IACD,SAAS,IACX;CACD;CAcA,OACC,WACA,UACA,OACA,MAIC;EACD,OAAO,KAAKA,KAAK,IAChB,OACC,QAAQ,WACR,eAAe;GACd;GACA,MAAM;IAAE,YAAY;IAAW,WAAW;GAAS;GACnD,MAAM;GACN,cAAc;GACd;EACD,CAAC,IACD,SAAS,IACX;CACD;CAcA,QACC,WACA,UACA,OACA,MACmC;EACnC,OAAO,KAAKA,KAAK,QAAQ,OAAO,QAAQ,WACvC,gBAAgB;GACf;GACA,MAAM;IAAE,YAAY;IAAW,WAAW;GAAS;GACnD,MAAM,EAAE,aAAa,OAAO,WAAW;GACvC,cAAc;GACd;EACD,CAAC,CACF;CACD;CAcA,aACC,WACA,UACA,OACA,MACuE;EACvE,OAAO,KAAKA,KAAK,IAChB,OACC,QAAQ,WACR,qBAAqB;GACpB;GACA,MAAM;IAAE,YAAY;IAAW,WAAW;GAAS;GACnD,MAAM;GACN,cAAc;GACd;EACD,CAAC,IACD,SAAS,IACX;CACD;AACD"}
@@ -35,7 +35,7 @@ declare class Branches<DThrow extends boolean> {
35
35
  #private;
36
36
  constructor(ctx: RequestContext);
37
37
  /** @apiCall GET /projects/{project_id}/branches (cursor-paginated) */
38
- list(projectId: string, query?: ListQuery): Paginated<Branch>;
38
+ list(projectId: string, query?: ListQuery, opts?: CallOptions): Paginated<Branch>;
39
39
  /** @apiCall GET /projects/{project_id}/branches/{branch_id} */
40
40
  get(projectId: string, branchId: string): Promise<Outcome<Branch, DThrow>>;
41
41
  get<Throw extends boolean = DThrow>(projectId: string, branchId: string, opts: CallOptions<Throw>): Promise<Outcome<Branch, Throw>>;
@@ -1 +1 @@
1
- {"version":3,"file":"branches.d.ts","names":[],"sources":["../../../src/neon/resources/branches.ts"],"mappings":";;;;;;KAuBK,SAAA,GAAY,KAAK,YAAY;KAC7B,WAAA,GAAc,YAAY;AAHiD,KAI3E,WAAA,GAAc,mBAFL,CAAA,QAAA,CAAA;AAAA;AAAoB,UAKxB,eALwB,CAAA,cAAA,OAAA,CAAA,SAKuB,WALvB,CAKmC,KALnC,CAAA,CAAA;EAAZ;EAAL,MAAA,CAAA,EAAA,OAAA;AAAI;AAAA;AACL,UAUC,sBAAA,CAVD;EAAe,IAAA,CAAA,EAAA,MAAA;EAAZ;EAAW,QAAA,CAAA,EAAA,MAAA;EACzB;EAGK,OAAA,CAAA,EAAA;IAAe,KAAA,CAAA,EAAA,MAAA;IAA4C,KAAA,CAAA,EAAA,MAAA;IAAZ,qBAAA,CAAA,EAAA,MAAA;EAAW,CAAA;AAMpE;AAaA;AAAkC,UAAjB,iBAAA,CAAiB;EACzB,MAAA,EAAA,MAAA;EACE,QAAA,EAAA,QAAA;EAAQ,gBAAA,EAAA,MAAA;AAKnB;AAAqB;AAGH,cAHL,QAGK,CAAA,eAAA,OAAA,CAAA,CAAA;EAKe,CAAA,OAAA;EAAsB,WAAA,CAAA,GAAA,EALrC,cAKqC;EAAV;EAkBc,IAAA,CAAA,SAAA,EAAA,MAAA,EAAA,KAAA,CAAA,EAlB1B,SAkB0B,CAAA,EAlBd,SAkBc,CAlBJ,MAkBI,CAAA;EAAQ;EAAhB,GAAA,CAAA,SAAA,EAAA,MAAA,EAAA,QAAA,EAAA,MAAA,CAAA,EAAR,OAAQ,CAAA,OAAA,CAAQ,MAAR,EAAgB,MAAhB,CAAA,CAAA;EAAR,GAAA,CAAA,cAAA,OAAA,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CAAA,CAAA;EAAR,eAAA,CAAA,cAAA,OAAA,GAkKL,MAlKK,CAAA,CAAA,SAAA,EAAA,MAAA,EAAA,QAAA,EAAA,MAAA,EAAA,KAAA,EAAA;IACd,IAAA,CAAA,EAAA,MAAA;EAGZ,CAAA,GAAA,SAAA,EAAA,IAAA,EAkKZ,WAlKY,CAkKA,KAlKA,CAAA,CAAA,EAmKhB,OAnKgB,CAmKR,OAnKQ,CAAA,IAAA,EAmKM,KAnKN,CAAA,CAAA;EAAZ;AACkB;AAAd;AAAR;AAwBK;EACW,OAAA,CAAA,SAAA,EAAA,MAAA,EAAA,QAAA,EAAA,MAAA,CAAA,EAsKhB,OAtKgB,CAsKR,OAtKQ,CAsKA,MAtKA,EAsKQ,MAtKR,CAAA,CAAA;EAAmB,OAAA,CAAA,cAAA,OAAA,GAuKN,MAvKM,CAAA,CAAA,SAAA,EAAA,MAAA,EAAA,QAAA,EAAA,MAAA,EAAA,IAAA,EA0K/B,WA1K+B,CA0KnB,KA1KmB,CAAA,CAAA,EA2KnC,OA3KmC,CA2K3B,OA3K2B,CA2KnB,MA3KmB,EA2KX,KA3KW,CAAA,CAAA;AAA3B"}
@@ -11,7 +11,7 @@ var Branches = class {
11
11
  this.#ctx = ctx;
12
12
  }
13
13
  /** @apiCall GET /projects/{project_id}/branches (cursor-paginated) */
14
- list(projectId, query) {
14
+ list(projectId, query, opts) {
15
15
  return paginate((cursor, signal) => listProjectBranches({
16
16
  client: this.#ctx.client,
17
17
  path: { project_id: projectId },
@@ -24,45 +24,49 @@ var Branches = class {
24
24
  }), (data) => ({
25
25
  items: data?.branches ?? [],
26
26
  cursor: data?.pagination?.next
27
- }));
27
+ }), () => this.#ctx.deadlineFor(opts));
28
28
  }
29
29
  get(projectId, branchId, opts) {
30
- return this.#ctx.run(opts, (client) => getProjectBranch({
30
+ return this.#ctx.run(opts, (client, signal) => getProjectBranch({
31
31
  client,
32
32
  path: {
33
33
  project_id: projectId,
34
34
  branch_id: branchId
35
35
  },
36
- throwOnError: false
36
+ throwOnError: false,
37
+ signal
37
38
  }), (data) => data.branch);
38
39
  }
39
40
  create(projectId, input, opts) {
40
- return this.#ctx.run(opts, (client) => createProjectBranch({
41
+ return this.#ctx.run(opts, (client, signal) => createProjectBranch({
41
42
  client,
42
43
  path: { project_id: projectId },
43
44
  body: { branch: input },
44
- throwOnError: false
45
+ throwOnError: false,
46
+ signal
45
47
  }), (data) => data.branch);
46
48
  }
47
49
  update(projectId, branchId, input, opts) {
48
- return this.#ctx.run(opts, (client) => updateProjectBranch({
50
+ return this.#ctx.run(opts, (client, signal) => updateProjectBranch({
49
51
  client,
50
52
  path: {
51
53
  project_id: projectId,
52
54
  branch_id: branchId
53
55
  },
54
56
  body: { branch: input },
55
- throwOnError: false
57
+ throwOnError: false,
58
+ signal
56
59
  }), (data) => data.branch);
57
60
  }
58
61
  delete(projectId, branchId, opts) {
59
- return this.#ctx.runVoid(opts, (client) => deleteProjectBranch({
62
+ return this.#ctx.runVoid(opts, (client, signal) => deleteProjectBranch({
60
63
  client,
61
64
  path: {
62
65
  project_id: projectId,
63
66
  branch_id: branchId
64
67
  },
65
- throwOnError: false
68
+ throwOnError: false,
69
+ signal
66
70
  }));
67
71
  }
68
72
  async createWithCompute(projectId, input, opts) {
@@ -70,7 +74,7 @@ var Branches = class {
70
74
  return finalize(withConnectionString(await this.#ctx.execute({
71
75
  ...opts,
72
76
  waitForReadiness: opts?.waitForReadiness ?? true
73
- }, (client) => createProjectBranch({
77
+ }, (client, signal) => createProjectBranch({
74
78
  client,
75
79
  path: { project_id: projectId },
76
80
  body: {
@@ -85,7 +89,8 @@ var Branches = class {
85
89
  suspend_timeout_seconds: input.compute?.suspendTimeoutSeconds
86
90
  }]
87
91
  },
88
- throwOnError: false
92
+ throwOnError: false,
93
+ signal
89
94
  }), (data) => data), (data) => data.connection_uris, (data, connectionString) => ({
90
95
  branch: data.branch,
91
96
  endpoint: data.endpoints[0],
@@ -94,10 +99,11 @@ var Branches = class {
94
99
  }
95
100
  async getDefault(projectId, opts) {
96
101
  const shouldThrow = opts?.throwOnError ?? this.#ctx.defaults.throwOnError;
97
- const result = await this.#ctx.execute(opts, (client) => listProjectBranches({
102
+ const result = await this.#ctx.execute(opts, (client, signal) => listProjectBranches({
98
103
  client,
99
104
  path: { project_id: projectId },
100
- throwOnError: false
105
+ throwOnError: false,
106
+ signal
101
107
  }), (data) => data.branches);
102
108
  if (result.error) return finalize(err(result.error), shouldThrow);
103
109
  const branch = result.data.find((candidate) => candidate.default);
@@ -105,34 +111,37 @@ var Branches = class {
105
111
  return finalize(ok(branch), shouldThrow);
106
112
  }
107
113
  setDefault(projectId, branchId, opts) {
108
- return this.#ctx.run(opts, (client) => setDefaultProjectBranch({
114
+ return this.#ctx.run(opts, (client, signal) => setDefaultProjectBranch({
109
115
  client,
110
116
  path: {
111
117
  project_id: projectId,
112
118
  branch_id: branchId
113
119
  },
114
- throwOnError: false
120
+ throwOnError: false,
121
+ signal
115
122
  }), (data) => data.branch);
116
123
  }
117
124
  finalizeRestore(projectId, branchId, input, opts) {
118
- return this.#ctx.run(opts, (client) => finalizeRestoreBranch({
125
+ return this.#ctx.run(opts, (client, signal) => finalizeRestoreBranch({
119
126
  client,
120
127
  path: {
121
128
  project_id: projectId,
122
129
  branch_id: branchId
123
130
  },
124
131
  body: { name: input?.name },
125
- throwOnError: false
132
+ throwOnError: false,
133
+ signal
126
134
  }), () => void 0);
127
135
  }
128
136
  recover(projectId, branchId, opts) {
129
- return this.#ctx.run(opts, (client) => recoverProjectBranch({
137
+ return this.#ctx.run(opts, (client, signal) => recoverProjectBranch({
130
138
  client,
131
139
  path: {
132
140
  project_id: projectId,
133
141
  branch_id: branchId
134
142
  },
135
- throwOnError: false
143
+ throwOnError: false,
144
+ signal
136
145
  }), (data) => data.branch);
137
146
  }
138
147
  };
@@ -1 +1 @@
1
- {"version":3,"file":"branches.js","names":["#ctx"],"sources":["../../../src/neon/resources/branches.ts"],"sourcesContent":["import {\n\tcreateProjectBranch,\n\tdeleteProjectBranch,\n\tfinalizeRestoreBranch,\n\tgetProjectBranch,\n\tlistProjectBranches,\n\trecoverProjectBranch,\n\tsetDefaultProjectBranch,\n\tupdateProjectBranch,\n} from \"../../client/sdk.gen.js\";\nimport type {\n\tBranch,\n\tBranchCreateRequest,\n\tBranchUpdateRequest,\n\tEndpoint,\n\tListProjectBranchesData,\n} from \"../../client/types.gen.js\";\nimport { withConnectionString } from \"../connection.js\";\nimport type { CallOptions, RequestContext } from \"../context.js\";\nimport { NeonError } from \"../errors.js\";\nimport { type Paginated, paginate } from \"../paginate.js\";\nimport { err, finalize, type NeonResult, type Outcome, ok } from \"../result.js\";\n\ntype ListQuery = Omit<NonNullable<ListProjectBranchesData[\"query\"]>, \"cursor\">;\ntype CreateInput = NonNullable<BranchCreateRequest[\"branch\"]>;\ntype UpdateInput = BranchUpdateRequest[\"branch\"];\n\n/** Per-call options for the connect/compute workflows. */\ninterface WorkflowOptions<Throw extends boolean> extends CallOptions<Throw> {\n\t/** Return a pooled connection string (default `true`). */\n\tpooled?: boolean;\n}\n\n/** Input for {@link Branches.createWithCompute}. */\nexport interface CreateWithComputeInput {\n\tname?: string;\n\t/** Parent branch id. Defaults to the project's default branch. */\n\tparentId?: string;\n\t/** Autoscaling settings for the branch's read-write endpoint. */\n\tcompute?: {\n\t\tminCu?: number;\n\t\tmaxCu?: number;\n\t\tsuspendTimeoutSeconds?: number;\n\t};\n}\n\n/** A branch with its read-write endpoint and a ready-to-use connection string. */\nexport interface BranchWithCompute {\n\tbranch: Branch;\n\tendpoint: Endpoint;\n\tconnectionString: string;\n}\n\n/** Branch resource — one API call per CRUD method, plus the `createWithCompute` workflow. */\nexport class Branches<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 (cursor-paginated) */\n\tlist(projectId: string, query?: ListQuery): Paginated<Branch> {\n\t\treturn paginate(\n\t\t\t(cursor, signal) =>\n\t\t\t\tlistProjectBranches({\n\t\t\t\t\tclient: this.#ctx.client,\n\t\t\t\t\tpath: { project_id: projectId },\n\t\t\t\t\tquery: { ...query, cursor },\n\t\t\t\t\tthrowOnError: false,\n\t\t\t\t\tsignal,\n\t\t\t\t}),\n\t\t\t(data) => ({\n\t\t\t\titems: data?.branches ?? [],\n\t\t\t\tcursor: data?.pagination?.next,\n\t\t\t}),\n\t\t);\n\t}\n\n\t/** @apiCall GET /projects/{project_id}/branches/{branch_id} */\n\tget(projectId: string, branchId: string): Promise<Outcome<Branch, DThrow>>;\n\tget<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<Branch, Throw>>;\n\tget(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\topts?: CallOptions,\n\t): Promise<Branch | NeonResult<Branch>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client) =>\n\t\t\t\tgetProjectBranch({\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.branch,\n\t\t);\n\t}\n\n\t/** @apiCall POST /projects/{project_id}/branches */\n\tcreate(\n\t\tprojectId: string,\n\t\tinput?: CreateInput,\n\t): Promise<Outcome<Branch, DThrow>>;\n\tcreate<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tinput: CreateInput | undefined,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<Branch, Throw>>;\n\tcreate(\n\t\tprojectId: string,\n\t\tinput?: CreateInput,\n\t\topts?: CallOptions,\n\t): Promise<Branch | NeonResult<Branch>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client) =>\n\t\t\t\tcreateProjectBranch({\n\t\t\t\t\tclient,\n\t\t\t\t\tpath: { project_id: projectId },\n\t\t\t\t\tbody: { branch: input },\n\t\t\t\t\tthrowOnError: false,\n\t\t\t\t}),\n\t\t\t(data) => data.branch,\n\t\t);\n\t}\n\n\t/** @apiCall PATCH /projects/{project_id}/branches/{branch_id} */\n\tupdate(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: UpdateInput,\n\t): Promise<Outcome<Branch, DThrow>>;\n\tupdate<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: UpdateInput,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<Branch, Throw>>;\n\tupdate(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: UpdateInput,\n\t\topts?: CallOptions,\n\t): Promise<Branch | NeonResult<Branch>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client) =>\n\t\t\t\tupdateProjectBranch({\n\t\t\t\t\tclient,\n\t\t\t\t\tpath: { project_id: projectId, branch_id: branchId },\n\t\t\t\t\tbody: { branch: input },\n\t\t\t\t\tthrowOnError: false,\n\t\t\t\t}),\n\t\t\t(data) => data.branch,\n\t\t);\n\t}\n\n\t/** @apiCall DELETE /projects/{project_id}/branches/{branch_id} */\n\tdelete(projectId: string, branchId: string): Promise<Outcome<void, DThrow>>;\n\tdelete<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<void, Throw>>;\n\tdelete(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\topts?: CallOptions,\n\t): Promise<void | NeonResult<void>> {\n\t\treturn this.#ctx.runVoid(opts, (client) =>\n\t\t\tdeleteProjectBranch({\n\t\t\t\tclient,\n\t\t\t\tpath: { project_id: projectId, branch_id: branchId },\n\t\t\t\tthrowOnError: false,\n\t\t\t}),\n\t\t);\n\t}\n\n\t/**\n\t * Create a branch **with a read-write endpoint** and return a ready-to-use connection\n\t * string. One API call (Neon creates the endpoint inline) plus readiness polling.\n\t *\n\t * @workflow createProjectBranch (with endpoint) + waitForReadiness\n\t */\n\tcreateWithCompute(\n\t\tprojectId: string,\n\t\tinput: CreateWithComputeInput,\n\t): Promise<Outcome<BranchWithCompute, DThrow>>;\n\tcreateWithCompute<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tinput: CreateWithComputeInput,\n\t\topts: WorkflowOptions<Throw>,\n\t): Promise<Outcome<BranchWithCompute, Throw>>;\n\tasync createWithCompute(\n\t\tprojectId: string,\n\t\tinput: CreateWithComputeInput,\n\t\topts?: WorkflowOptions<boolean>,\n\t): Promise<BranchWithCompute | NeonResult<BranchWithCompute>> {\n\t\tconst shouldThrow =\n\t\t\topts?.throwOnError ?? this.#ctx.defaults.throwOnError;\n\t\tconst result = await this.#ctx.execute(\n\t\t\t{ ...opts, waitForReadiness: opts?.waitForReadiness ?? true },\n\t\t\t(client) =>\n\t\t\t\tcreateProjectBranch({\n\t\t\t\t\tclient,\n\t\t\t\t\tpath: { project_id: projectId },\n\t\t\t\t\tbody: {\n\t\t\t\t\t\tbranch: { name: input.name, parent_id: input.parentId },\n\t\t\t\t\t\tendpoints: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: \"read_write\",\n\t\t\t\t\t\t\t\tautoscaling_limit_min_cu: input.compute?.minCu,\n\t\t\t\t\t\t\t\tautoscaling_limit_max_cu: input.compute?.maxCu,\n\t\t\t\t\t\t\t\tsuspend_timeout_seconds:\n\t\t\t\t\t\t\t\t\tinput.compute?.suspendTimeoutSeconds,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t},\n\t\t\t\t\tthrowOnError: false,\n\t\t\t\t}),\n\t\t\t(data) => data,\n\t\t);\n\t\tconst out = withConnectionString(\n\t\t\tresult,\n\t\t\t(data) => data.connection_uris,\n\t\t\t(data, connectionString) => ({\n\t\t\t\tbranch: data.branch,\n\t\t\t\tendpoint: data.endpoints[0],\n\t\t\t\tconnectionString,\n\t\t\t}),\n\t\t\topts?.pooled ?? true,\n\t\t);\n\t\treturn finalize(out, shouldThrow);\n\t}\n\n\t/**\n\t * Resolve the project's default branch (by the `default` flag — not by name).\n\t * Returns a `client`-kind {@link NeonError} when no default branch is found.\n\t */\n\tgetDefault(projectId: string): Promise<Outcome<Branch, DThrow>>;\n\tgetDefault<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<Branch, Throw>>;\n\tasync getDefault(\n\t\tprojectId: string,\n\t\topts?: CallOptions,\n\t): Promise<Branch | NeonResult<Branch>> {\n\t\tconst shouldThrow =\n\t\t\topts?.throwOnError ?? this.#ctx.defaults.throwOnError;\n\t\tconst result = await this.#ctx.execute(\n\t\t\topts,\n\t\t\t(client) =>\n\t\t\t\tlistProjectBranches({\n\t\t\t\t\tclient,\n\t\t\t\t\tpath: { project_id: projectId },\n\t\t\t\t\tthrowOnError: false,\n\t\t\t\t}),\n\t\t\t(data) => data.branches,\n\t\t);\n\t\tif (result.error)\n\t\t\treturn finalize(err<Branch>(result.error), shouldThrow);\n\t\tconst branch = result.data.find((candidate) => candidate.default);\n\t\tif (!branch) {\n\t\t\treturn finalize(\n\t\t\t\terr<Branch>(\n\t\t\t\t\tnew NeonError(\n\t\t\t\t\t\t\"No default branch found for the project.\",\n\t\t\t\t\t\t\"client\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tshouldThrow,\n\t\t\t);\n\t\t}\n\t\treturn finalize(ok(branch), shouldThrow);\n\t}\n\n\t/** @apiCall POST /projects/{project_id}/branches/{branch_id}/set_as_default */\n\tsetDefault(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t): Promise<Outcome<Branch, DThrow>>;\n\tsetDefault<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<Branch, Throw>>;\n\tsetDefault(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\topts?: CallOptions,\n\t): Promise<Branch | NeonResult<Branch>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client) =>\n\t\t\t\tsetDefaultProjectBranch({\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.branch,\n\t\t);\n\t}\n\n\t/**\n\t * Complete (commit) a restore previously started with `snapshots.restore({ finalize: false })`:\n\t * moves computes onto the restored branch and renames the replaced one. This is **only**\n\t * the second step — it does not restore anything itself.\n\t *\n\t * @apiCall POST /projects/{project_id}/branches/{branch_id}/restore/finalize\n\t */\n\tfinalizeRestore(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput?: { name?: string },\n\t): Promise<Outcome<void, DThrow>>;\n\tfinalizeRestore<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: { name?: string } | undefined,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<void, Throw>>;\n\tfinalizeRestore(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput?: { name?: string },\n\t\topts?: CallOptions,\n\t): Promise<void | NeonResult<void>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client) =>\n\t\t\t\tfinalizeRestoreBranch({\n\t\t\t\t\tclient,\n\t\t\t\t\tpath: { project_id: projectId, branch_id: branchId },\n\t\t\t\t\tbody: { name: input?.name },\n\t\t\t\t\tthrowOnError: false,\n\t\t\t\t}),\n\t\t\t() => undefined,\n\t\t);\n\t}\n\n\t/**\n\t * Recover a soft-deleted branch within the 7-day recovery window.\n\t *\n\t * @apiCall POST /projects/{project_id}/branches/{branch_id}/recover\n\t */\n\trecover(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t): Promise<Outcome<Branch, DThrow>>;\n\trecover<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<Branch, Throw>>;\n\trecover(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\topts?: CallOptions,\n\t): Promise<Branch | NeonResult<Branch>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client) =>\n\t\t\t\trecoverProjectBranch({\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.branch,\n\t\t);\n\t}\n}\n"],"mappings":";;;;;;;AAsDA,IAAa,WAAb,MAA8C;CAC7C;CAEA,YAAY,KAAqB;EAChC,KAAKA,OAAO;CACb;;CAGA,KAAK,WAAmB,OAAsC;EAC7D,OAAO,UACL,QAAQ,WACR,oBAAoB;GACnB,QAAQ,KAAKA,KAAK;GAClB,MAAM,EAAE,YAAY,UAAU;GAC9B,OAAO;IAAE,GAAG;IAAO;GAAO;GAC1B,cAAc;GACd;EACD,CAAC,IACD,UAAU;GACV,OAAO,MAAM,YAAY,CAAC;GAC1B,QAAQ,MAAM,YAAY;EAC3B,EACD;CACD;CASA,IACC,WACA,UACA,MACuC;EACvC,OAAO,KAAKA,KAAK,IAChB,OACC,WACA,iBAAiB;GAChB;GACA,MAAM;IAAE,YAAY;IAAW,WAAW;GAAS;GACnD,cAAc;EACf,CAAC,IACD,SAAS,KAAK,MAChB;CACD;CAYA,OACC,WACA,OACA,MACuC;EACvC,OAAO,KAAKA,KAAK,IAChB,OACC,WACA,oBAAoB;GACnB;GACA,MAAM,EAAE,YAAY,UAAU;GAC9B,MAAM,EAAE,QAAQ,MAAM;GACtB,cAAc;EACf,CAAC,IACD,SAAS,KAAK,MAChB;CACD;CAcA,OACC,WACA,UACA,OACA,MACuC;EACvC,OAAO,KAAKA,KAAK,IAChB,OACC,WACA,oBAAoB;GACnB;GACA,MAAM;IAAE,YAAY;IAAW,WAAW;GAAS;GACnD,MAAM,EAAE,QAAQ,MAAM;GACtB,cAAc;EACf,CAAC,IAC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,GAAG,WAAW;CACxC;CAYA,WACC,WACA,UACA,MACuC;EACvC,OAAO,KAAKA,KAAK,IAChB,OACC,WACA,wBAAwB;GACvB;GACA,MAAM;IAAE,YAAY;IAAW,WAAW;GAAS;GACnD,cAAc;EACf,CAAC,IACD,SAAS,KAAK,MAChB;CACD;CAoBA,gBACC,WACA,UACA,OACA,MACmC;EACnC,OAAO,KAAKA,KAAK,IAChB,OACC,WACA,sBAAsB;GACrB;GACA,MAAM;IAAE,YAAY;IAAW,WAAW;GAAS;GACnD,MAAM,EAAE,MAAM,OAAO,KAAK;GAC1B,cAAc;EACf,CAAC,SACI,KAAA,CACP;CACD;CAgBA,QACC,WACA,UACA,MACuC;EACvC,OAAO,KAAKA,KAAK,IAChB,OACC,WACA,qBAAqB;GACpB;GACA,MAAM;IAAE,YAAY;IAAW,WAAW;GAAS;GACnD,cAAc;EACf,CAAC,IACD,SAAS,KAAK,MAChB;CACD;AACD"}
1
+ {"version":3,"file":"branches.js","names":["#ctx"],"sources":["../../../src/neon/resources/branches.ts"],"sourcesContent":["import {\n\tcreateProjectBranch,\n\tdeleteProjectBranch,\n\tfinalizeRestoreBranch,\n\tgetProjectBranch,\n\tlistProjectBranches,\n\trecoverProjectBranch,\n\tsetDefaultProjectBranch,\n\tupdateProjectBranch,\n} from \"../../client/sdk.gen.js\";\nimport type {\n\tBranch,\n\tBranchCreateRequest,\n\tBranchUpdateRequest,\n\tEndpoint,\n\tListProjectBranchesData,\n} from \"../../client/types.gen.js\";\nimport { withConnectionString } from \"../connection.js\";\nimport type { CallOptions, RequestContext } from \"../context.js\";\nimport { NeonError } from \"../errors.js\";\nimport { type Paginated, paginate } from \"../paginate.js\";\nimport { err, finalize, type NeonResult, type Outcome, ok } from \"../result.js\";\n\ntype ListQuery = Omit<NonNullable<ListProjectBranchesData[\"query\"]>, \"cursor\">;\ntype CreateInput = NonNullable<BranchCreateRequest[\"branch\"]>;\ntype UpdateInput = BranchUpdateRequest[\"branch\"];\n\n/** Per-call options for the connect/compute workflows. */\ninterface WorkflowOptions<Throw extends boolean> extends CallOptions<Throw> {\n\t/** Return a pooled connection string (default `true`). */\n\tpooled?: boolean;\n}\n\n/** Input for {@link Branches.createWithCompute}. */\nexport interface CreateWithComputeInput {\n\tname?: string;\n\t/** Parent branch id. Defaults to the project's default branch. */\n\tparentId?: string;\n\t/** Autoscaling settings for the branch's read-write endpoint. */\n\tcompute?: {\n\t\tminCu?: number;\n\t\tmaxCu?: number;\n\t\tsuspendTimeoutSeconds?: number;\n\t};\n}\n\n/** A branch with its read-write endpoint and a ready-to-use connection string. */\nexport interface BranchWithCompute {\n\tbranch: Branch;\n\tendpoint: Endpoint;\n\tconnectionString: string;\n}\n\n/** Branch resource — one API call per CRUD method, plus the `createWithCompute` workflow. */\nexport class Branches<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 (cursor-paginated) */\n\tlist(\n\t\tprojectId: string,\n\t\tquery?: ListQuery,\n\t\topts?: CallOptions,\n\t): Paginated<Branch> {\n\t\treturn paginate(\n\t\t\t(cursor, signal) =>\n\t\t\t\tlistProjectBranches({\n\t\t\t\t\tclient: this.#ctx.client,\n\t\t\t\t\tpath: { project_id: projectId },\n\t\t\t\t\tquery: { ...query, cursor },\n\t\t\t\t\tthrowOnError: false,\n\t\t\t\t\tsignal,\n\t\t\t\t}),\n\t\t\t(data) => ({\n\t\t\t\titems: data?.branches ?? [],\n\t\t\t\tcursor: data?.pagination?.next,\n\t\t\t}),\n\t\t\t() => this.#ctx.deadlineFor(opts),\n\t\t);\n\t}\n\n\t/** @apiCall GET /projects/{project_id}/branches/{branch_id} */\n\tget(projectId: string, branchId: string): Promise<Outcome<Branch, DThrow>>;\n\tget<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<Branch, Throw>>;\n\tget(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\topts?: CallOptions,\n\t): Promise<Branch | NeonResult<Branch>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client, signal) =>\n\t\t\t\tgetProjectBranch({\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.branch,\n\t\t);\n\t}\n\n\t/** @apiCall POST /projects/{project_id}/branches */\n\tcreate(\n\t\tprojectId: string,\n\t\tinput?: CreateInput,\n\t): Promise<Outcome<Branch, DThrow>>;\n\tcreate<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tinput: CreateInput | undefined,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<Branch, Throw>>;\n\tcreate(\n\t\tprojectId: string,\n\t\tinput?: CreateInput,\n\t\topts?: CallOptions,\n\t): Promise<Branch | NeonResult<Branch>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client, signal) =>\n\t\t\t\tcreateProjectBranch({\n\t\t\t\t\tclient,\n\t\t\t\t\tpath: { project_id: projectId },\n\t\t\t\t\tbody: { branch: input },\n\t\t\t\t\tthrowOnError: false,\n\t\t\t\t\tsignal,\n\t\t\t\t}),\n\t\t\t(data) => data.branch,\n\t\t);\n\t}\n\n\t/** @apiCall PATCH /projects/{project_id}/branches/{branch_id} */\n\tupdate(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: UpdateInput,\n\t): Promise<Outcome<Branch, DThrow>>;\n\tupdate<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: UpdateInput,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<Branch, Throw>>;\n\tupdate(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: UpdateInput,\n\t\topts?: CallOptions,\n\t): Promise<Branch | NeonResult<Branch>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client, signal) =>\n\t\t\t\tupdateProjectBranch({\n\t\t\t\t\tclient,\n\t\t\t\t\tpath: { project_id: projectId, branch_id: branchId },\n\t\t\t\t\tbody: { branch: input },\n\t\t\t\t\tthrowOnError: false,\n\t\t\t\t\tsignal,\n\t\t\t\t}),\n\t\t\t(data) => data.branch,\n\t\t);\n\t}\n\n\t/** @apiCall DELETE /projects/{project_id}/branches/{branch_id} */\n\tdelete(projectId: string, branchId: string): Promise<Outcome<void, DThrow>>;\n\tdelete<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<void, Throw>>;\n\tdelete(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\topts?: CallOptions,\n\t): Promise<void | NeonResult<void>> {\n\t\treturn this.#ctx.runVoid(opts, (client, signal) =>\n\t\t\tdeleteProjectBranch({\n\t\t\t\tclient,\n\t\t\t\tpath: { project_id: projectId, branch_id: branchId },\n\t\t\t\tthrowOnError: false,\n\t\t\t\tsignal,\n\t\t\t}),\n\t\t);\n\t}\n\n\t/**\n\t * Create a branch **with a read-write endpoint** and return a ready-to-use connection\n\t * string. One API call (Neon creates the endpoint inline) plus readiness polling.\n\t *\n\t * @workflow createProjectBranch (with endpoint) + waitForReadiness\n\t */\n\tcreateWithCompute(\n\t\tprojectId: string,\n\t\tinput: CreateWithComputeInput,\n\t): Promise<Outcome<BranchWithCompute, DThrow>>;\n\tcreateWithCompute<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tinput: CreateWithComputeInput,\n\t\topts: WorkflowOptions<Throw>,\n\t): Promise<Outcome<BranchWithCompute, Throw>>;\n\tasync createWithCompute(\n\t\tprojectId: string,\n\t\tinput: CreateWithComputeInput,\n\t\topts?: WorkflowOptions<boolean>,\n\t): Promise<BranchWithCompute | NeonResult<BranchWithCompute>> {\n\t\tconst shouldThrow =\n\t\t\topts?.throwOnError ?? this.#ctx.defaults.throwOnError;\n\t\tconst result = await this.#ctx.execute(\n\t\t\t{ ...opts, waitForReadiness: opts?.waitForReadiness ?? true },\n\t\t\t(client, signal) =>\n\t\t\t\tcreateProjectBranch({\n\t\t\t\t\tclient,\n\t\t\t\t\tpath: { project_id: projectId },\n\t\t\t\t\tbody: {\n\t\t\t\t\t\tbranch: { name: input.name, parent_id: input.parentId },\n\t\t\t\t\t\tendpoints: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: \"read_write\",\n\t\t\t\t\t\t\t\tautoscaling_limit_min_cu: input.compute?.minCu,\n\t\t\t\t\t\t\t\tautoscaling_limit_max_cu: input.compute?.maxCu,\n\t\t\t\t\t\t\t\tsuspend_timeout_seconds:\n\t\t\t\t\t\t\t\t\tinput.compute?.suspendTimeoutSeconds,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t},\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\tconst out = withConnectionString(\n\t\t\tresult,\n\t\t\t(data) => data.connection_uris,\n\t\t\t(data, connectionString) => ({\n\t\t\t\tbranch: data.branch,\n\t\t\t\tendpoint: data.endpoints[0],\n\t\t\t\tconnectionString,\n\t\t\t}),\n\t\t\topts?.pooled ?? true,\n\t\t);\n\t\treturn finalize(out, shouldThrow);\n\t}\n\n\t/**\n\t * Resolve the project's default branch (by the `default` flag — not by name).\n\t * Returns a `client`-kind {@link NeonError} when no default branch is found.\n\t */\n\tgetDefault(projectId: string): Promise<Outcome<Branch, DThrow>>;\n\tgetDefault<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<Branch, Throw>>;\n\tasync getDefault(\n\t\tprojectId: string,\n\t\topts?: CallOptions,\n\t): Promise<Branch | NeonResult<Branch>> {\n\t\tconst shouldThrow =\n\t\t\topts?.throwOnError ?? this.#ctx.defaults.throwOnError;\n\t\tconst result = await this.#ctx.execute(\n\t\t\topts,\n\t\t\t(client, signal) =>\n\t\t\t\tlistProjectBranches({\n\t\t\t\t\tclient,\n\t\t\t\t\tpath: { project_id: projectId },\n\t\t\t\t\tthrowOnError: false,\n\t\t\t\t\tsignal,\n\t\t\t\t}),\n\t\t\t(data) => data.branches,\n\t\t);\n\t\tif (result.error)\n\t\t\treturn finalize(err<Branch>(result.error), shouldThrow);\n\t\tconst branch = result.data.find((candidate) => candidate.default);\n\t\tif (!branch) {\n\t\t\treturn finalize(\n\t\t\t\terr<Branch>(\n\t\t\t\t\tnew NeonError(\n\t\t\t\t\t\t\"No default branch found for the project.\",\n\t\t\t\t\t\t\"client\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tshouldThrow,\n\t\t\t);\n\t\t}\n\t\treturn finalize(ok(branch), shouldThrow);\n\t}\n\n\t/** @apiCall POST /projects/{project_id}/branches/{branch_id}/set_as_default */\n\tsetDefault(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t): Promise<Outcome<Branch, DThrow>>;\n\tsetDefault<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<Branch, Throw>>;\n\tsetDefault(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\topts?: CallOptions,\n\t): Promise<Branch | NeonResult<Branch>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client, signal) =>\n\t\t\t\tsetDefaultProjectBranch({\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.branch,\n\t\t);\n\t}\n\n\t/**\n\t * Complete (commit) a restore previously started with `snapshots.restore({ finalize: false })`:\n\t * moves computes onto the restored branch and renames the replaced one. This is **only**\n\t * the second step — it does not restore anything itself.\n\t *\n\t * @apiCall POST /projects/{project_id}/branches/{branch_id}/restore/finalize\n\t */\n\tfinalizeRestore(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput?: { name?: string },\n\t): Promise<Outcome<void, DThrow>>;\n\tfinalizeRestore<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: { name?: string } | undefined,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<void, Throw>>;\n\tfinalizeRestore(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput?: { name?: string },\n\t\topts?: CallOptions,\n\t): Promise<void | NeonResult<void>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client, signal) =>\n\t\t\t\tfinalizeRestoreBranch({\n\t\t\t\t\tclient,\n\t\t\t\t\tpath: { project_id: projectId, branch_id: branchId },\n\t\t\t\t\tbody: { name: input?.name },\n\t\t\t\t\tthrowOnError: false,\n\t\t\t\t\tsignal,\n\t\t\t\t}),\n\t\t\t() => undefined,\n\t\t);\n\t}\n\n\t/**\n\t * Recover a soft-deleted branch within the 7-day recovery window.\n\t *\n\t * @apiCall POST /projects/{project_id}/branches/{branch_id}/recover\n\t */\n\trecover(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t): Promise<Outcome<Branch, DThrow>>;\n\trecover<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<Branch, Throw>>;\n\trecover(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\topts?: CallOptions,\n\t): Promise<Branch | NeonResult<Branch>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client, signal) =>\n\t\t\t\trecoverProjectBranch({\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\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AAS,KAAK,MAChB;CACD;CAoBA,gBACC,WACA,UACA,OACA,MACmC;EACnC,OAAO,KAAKA,KAAK,IAChB,OACC,QAAQ,WACR,sBAAsB;GACrB;GACA,MAAM;IAAE,YAAY;IAAW,WAAW;GAAS;GACnD,MAAM,EAAE,MAAM,OAAO,KAAK;GAC1B,cAAc;GACd;EACD,CAAC,SACI,KAAA,CACP;CACD;CAgBA,QACC,WACA,UACA,MACuC;EACvC,OAAO,KAAKA,KAAK,IAChB,OACC,QAAQ,WACR,qBAAqB;GACpB;GACA,MAAM;IAAE,YAAY;IAAW,WAAW;GAAS;GACnD,cAAc;GACd;EACD,CAAC,IACD,SAAS,KAAK,MAChB;CACD;AACD"}
@@ -1 +1 @@
1
- {"version":3,"file":"bucket-objects.d.ts","names":[],"sources":["../../../src/neon/resources/bucket-objects.ts"],"mappings":";;;;;KAiBK,SAAA,GAAY,KAChB,YAAY;;AADR,cAMQ,aANC,CAAA,eAAA,OAAA,CAAA,CAAA;EAAA,CAAA,OAAA;EACD,WAAA,CAAA,GAAA,EAQK,cARL;EAAZ;EADgB,IAAA,CAAA,SAAA,EAAA,MAAA,EAAA,QAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,KAMJ,CANI,EAkBP,SAlBO,GAAA;IAAI,MAAA,CAAA,EAAA,MAAA;EAMR,CAAA,CAAA,EAaT,OAbS,CAaD,OAbc,CAaN,yBAbM,EAaqB,MAbrB,CAAA,CAAA;EAAA,IAAA,CAAA,cAAA,OAAA,GAcI,MAdJ,CAAA,CAAA,SAAA,EAAA,MAAA,EAAA,QAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,KAAA,EAAA,CAkBhB,SAlBgB,GAAA;IAGR,MAAA,CAAA,EAAA,MAAA;EASR,CAAA,CAAA,GAAA,SAAA,EAAA,IAAA,EAOF,WAPE,CAOU,KAPV,CAAA,CAAA,EAQN,OARM,CAQE,OARF,CAQU,yBARV,EAQqC,KARrC,CAAA,CAAA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;EAAZ,cAAA,CAAA,SAAA,EAAA,MAAA,EAAA,QAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,CAAA,EA8GJ,OA9GI,CA8GI,OA9GJ,CA8GY,iCA9GZ,EA8G+C,MA9G/C,CAAA,CAAA;EACY,cAAA,CAAA,cAAA,OAAA,GA8GoB,MA9GpB,CAAA,CAAA,SAAA,EAAA,MAAA,EAAA,QAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,IAAA,EAmHZ,WAnHY,CAmHA,KAnHA,CAAA,CAAA,EAoHhB,OApHgB,CAoHR,OApHQ,CAoHA,iCApHA,EAoHmC,KApHnC,CAAA,CAAA;EAA2B;EAAnC,OAAA,CAAA,SAAA,EAAA,MAAA,EAAA,QAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,SAAA,EAAA,MAAA,EAAA,KAAA,EAuJH,cAvJG,CAAA,EAwJR,OAxJQ,CAwJA,OAxJA,CAwJQ,eAxJR,EAwJyB,MAxJzB,CAAA,CAAA;EAAR,OAAA,CAAA,cAAA,OAAA,GAyJ6B,MAzJ7B,CAAA,CAAA,SAAA,EAAA,MAAA,EAAA,QAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,SAAA,EAAA,MAAA,EAAA,KAAA,EA8JK,cA9JL,EAAA,IAAA,EA+JI,WA/JJ,CA+JgB,KA/JhB,CAAA,CAAA,EAgKA,OAhKA,CAgKQ,OAhKR,CAgKgB,eAhKhB,EAgKiC,KAhKjC,CAAA,CAAA;AAkCgB"}
@@ -7,7 +7,7 @@ var BucketObjects = class {
7
7
  this.#ctx = ctx;
8
8
  }
9
9
  list(projectId, branchId, bucketName, query, opts) {
10
- return this.#ctx.run(opts, (client) => listProjectBranchBucketObjects({
10
+ return this.#ctx.run(opts, (client, signal) => listProjectBranchBucketObjects({
11
11
  client,
12
12
  path: {
13
13
  project_id: projectId,
@@ -15,11 +15,12 @@ var BucketObjects = class {
15
15
  bucket_name: bucketName
16
16
  },
17
17
  query,
18
- throwOnError: false
18
+ throwOnError: false,
19
+ signal
19
20
  }), (data) => data);
20
21
  }
21
22
  get(projectId, branchId, bucketName, objectKey, opts) {
22
- return this.#ctx.run(opts, (client) => getProjectBranchBucketObject({
23
+ return this.#ctx.run(opts, (client, signal) => getProjectBranchBucketObject({
23
24
  client,
24
25
  path: {
25
26
  project_id: projectId,
@@ -27,11 +28,12 @@ var BucketObjects = class {
27
28
  bucket_name: bucketName,
28
29
  object_key: objectKey
29
30
  },
30
- throwOnError: false
31
+ throwOnError: false,
32
+ signal
31
33
  }), (data) => data);
32
34
  }
33
35
  delete(projectId, branchId, bucketName, objectKey, opts) {
34
- return this.#ctx.runVoid(opts, (client) => deleteProjectBranchBucketObject({
36
+ return this.#ctx.runVoid(opts, (client, signal) => deleteProjectBranchBucketObject({
35
37
  client,
36
38
  path: {
37
39
  project_id: projectId,
@@ -39,11 +41,12 @@ var BucketObjects = class {
39
41
  bucket_name: bucketName,
40
42
  object_key: objectKey
41
43
  },
42
- throwOnError: false
44
+ throwOnError: false,
45
+ signal
43
46
  }));
44
47
  }
45
48
  deleteByPrefix(projectId, branchId, bucketName, prefix, opts) {
46
- return this.#ctx.run(opts, (client) => deleteProjectBranchBucketObjectsByPrefix({
49
+ return this.#ctx.run(opts, (client, signal) => deleteProjectBranchBucketObjectsByPrefix({
47
50
  client,
48
51
  path: {
49
52
  project_id: projectId,
@@ -51,11 +54,12 @@ var BucketObjects = class {
51
54
  bucket_name: bucketName
52
55
  },
53
56
  query: { prefix },
54
- throwOnError: false
57
+ throwOnError: false,
58
+ signal
55
59
  }), (data) => data);
56
60
  }
57
61
  presign(projectId, branchId, bucketName, objectKey, input, opts) {
58
- return this.#ctx.run(opts, (client) => presignProjectBranchBucketObject({
62
+ return this.#ctx.run(opts, (client, signal) => presignProjectBranchBucketObject({
59
63
  client,
60
64
  path: {
61
65
  project_id: projectId,
@@ -64,7 +68,8 @@ var BucketObjects = class {
64
68
  object_key: objectKey
65
69
  },
66
70
  body: input,
67
- throwOnError: false
71
+ throwOnError: false,
72
+ signal
68
73
  }), (data) => data);
69
74
  }
70
75
  };
@@ -1 +1 @@
1
- {"version":3,"file":"bucket-objects.js","names":["#ctx"],"sources":["../../../src/neon/resources/bucket-objects.ts"],"sourcesContent":["import {\n\tdeleteProjectBranchBucketObject,\n\tdeleteProjectBranchBucketObjectsByPrefix,\n\tgetProjectBranchBucketObject,\n\tlistProjectBranchBucketObjects,\n\tpresignProjectBranchBucketObject,\n} from \"../../client/sdk.gen.js\";\nimport type {\n\tBucketObjectsDeletePrefixResponse,\n\tBucketObjectsListResponse,\n\tListProjectBranchBucketObjectsData,\n\tPresignRequest,\n\tPresignResponse,\n} from \"../../client/types.gen.js\";\nimport type { CallOptions, RequestContext } from \"../context.js\";\nimport type { NeonResult, Outcome } from \"../result.js\";\n\ntype ListQuery = Omit<\n\tNonNullable<ListProjectBranchBucketObjectsData[\"query\"]>,\n\t\"cursor\"\n>;\n\n/** Objects inside a branch bucket. */\nexport class BucketObjects<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}/buckets/{bucket_name}/objects */\n\tlist(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tbucketName: string,\n\t\tquery?: ListQuery & { cursor?: string },\n\t): Promise<Outcome<BucketObjectsListResponse, DThrow>>;\n\tlist<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tbucketName: string,\n\t\tquery: (ListQuery & { cursor?: string }) | undefined,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<BucketObjectsListResponse, Throw>>;\n\tlist(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tbucketName: string,\n\t\tquery?: ListQuery & { cursor?: string },\n\t\topts?: CallOptions,\n\t): Promise<\n\t\tBucketObjectsListResponse | NeonResult<BucketObjectsListResponse>\n\t> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client) =>\n\t\t\t\tlistProjectBranchBucketObjects({\n\t\t\t\t\tclient,\n\t\t\t\t\tpath: {\n\t\t\t\t\t\tproject_id: projectId,\n\t\t\t\t\t\tbranch_id: branchId,\n\t\t\t\t\t\tbucket_name: bucketName,\n\t\t\t\t\t},\n\t\t\t\t\tquery,\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 GET /projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects/{object_key}/download */\n\tget(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tbucketName: string,\n\t\tobjectKey: string,\n\t): Promise<Outcome<Blob, DThrow>>;\n\tget<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tbucketName: string,\n\t\tobjectKey: string,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<Blob, Throw>>;\n\tget(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tbucketName: string,\n\t\tobjectKey: string,\n\t\topts?: CallOptions,\n\t): Promise<Blob | NeonResult<Blob>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client) =>\n\t\t\t\tgetProjectBranchBucketObject({\n\t\t\t\t\tclient,\n\t\t\t\t\tpath: {\n\t\t\t\t\t\tproject_id: projectId,\n\t\t\t\t\t\tbranch_id: branchId,\n\t\t\t\t\t\tbucket_name: bucketName,\n\t\t\t\t\t\tobject_key: objectKey,\n\t\t\t\t\t},\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 /projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects/{object_key} */\n\tdelete(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tbucketName: string,\n\t\tobjectKey: string,\n\t): Promise<Outcome<void, DThrow>>;\n\tdelete<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tbucketName: string,\n\t\tobjectKey: string,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<void, Throw>>;\n\tdelete(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tbucketName: string,\n\t\tobjectKey: string,\n\t\topts?: CallOptions,\n\t): Promise<void | NeonResult<void>> {\n\t\treturn this.#ctx.runVoid(opts, (client) =>\n\t\t\tdeleteProjectBranchBucketObject({\n\t\t\t\tclient,\n\t\t\t\tpath: {\n\t\t\t\t\tproject_id: projectId,\n\t\t\t\t\tbranch_id: branchId,\n\t\t\t\t\tbucket_name: bucketName,\n\t\t\t\t\tobject_key: objectKey,\n\t\t\t\t},\n\t\t\t\tthrowOnError: false,\n\t\t\t}),\n\t\t);\n\t}\n\n\t/** @apiCall DELETE /projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects-by-prefix */\n\tdeleteByPrefix(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tbucketName: string,\n\t\tprefix: string,\n\t): Promise<Outcome<BucketObjectsDeletePrefixResponse, DThrow>>;\n\tdeleteByPrefix<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tbucketName: string,\n\t\tprefix: string,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<BucketObjectsDeletePrefixResponse, Throw>>;\n\tdeleteByPrefix(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tbucketName: string,\n\t\tprefix: string,\n\t\topts?: CallOptions,\n\t): Promise<\n\t\t| BucketObjectsDeletePrefixResponse\n\t\t| NeonResult<BucketObjectsDeletePrefixResponse>\n\t> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client) =>\n\t\t\t\tdeleteProjectBranchBucketObjectsByPrefix({\n\t\t\t\t\tclient,\n\t\t\t\t\tpath: {\n\t\t\t\t\t\tproject_id: projectId,\n\t\t\t\t\t\tbranch_id: branchId,\n\t\t\t\t\t\tbucket_name: bucketName,\n\t\t\t\t\t},\n\t\t\t\t\tquery: { prefix },\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 POST /projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects/{object_key}/presign */\n\tpresign(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tbucketName: string,\n\t\tobjectKey: string,\n\t\tinput: PresignRequest,\n\t): Promise<Outcome<PresignResponse, DThrow>>;\n\tpresign<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tbucketName: string,\n\t\tobjectKey: string,\n\t\tinput: PresignRequest,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<PresignResponse, Throw>>;\n\tpresign(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tbucketName: string,\n\t\tobjectKey: string,\n\t\tinput: PresignRequest,\n\t\topts?: CallOptions,\n\t): Promise<PresignResponse | NeonResult<PresignResponse>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client) =>\n\t\t\t\tpresignProjectBranchBucketObject({\n\t\t\t\t\tclient,\n\t\t\t\t\tpath: {\n\t\t\t\t\t\tproject_id: projectId,\n\t\t\t\t\t\tbranch_id: branchId,\n\t\t\t\t\t\tbucket_name: bucketName,\n\t\t\t\t\t\tobject_key: objectKey,\n\t\t\t\t\t},\n\t\t\t\t\tbody: input,\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":";;;AAuBA,IAAa,gBAAb,MAAmD;CAClD;CAEA,YAAY,KAAqB;EAChC,KAAKA,OAAO;CACb;CAgBA,KACC,WACA,UACA,YACA,OACA,MAGC;EACD,OAAO,KAAKA,KAAK,IAChB,OACC,WACA,+BAA+B;GAC9B;GACA,MAAM;IACL,YAAY;IACZ,WAAW;IACX,aAAa;GACd;GACA;GACA,cAAc;EACf,CAAC,IACD,SAAS,IACX;CACD;CAgBA,IACC,WACA,UACA,YACA,WACA,MACmC;EACnC,OAAO,KAAKA,KAAK,IAChB,OACC,WACA,6BAA6B;GAC5B;GACA,MAAM;IACL,YAAY;IACZ,WAAW;IACX,aAAa;IACb,YAAY;GACb;GACA,cAAc;EACf,CAAC,IACD,SAAS,IACX;CACD;CAgBA,OACC,WACA,UACA,YACA,WACA,MACmC;EACnC,OAAO,KAAKA,KAAK,QAAQ,OAAO,WAC/B,gCAAgC;GAC/B;GACA,MAAM;IACL,YAAY;IACZ,WAAW;IACX,aAAa;IACb,YAAY;GACb;GACA,cAAc;EACf,CAAC,CACF;CACD;CAgBA,eACC,WACA,UACA,YACA,QACA,MAIC;EACD,OAAO,KAAKA,KAAK,IAChB,OACC,WACA,yCAAyC;GACxC;GACA,MAAM;IACL,YAAY;IACZ,WAAW;IACX,aAAa;GACd;GACA,OAAO,EAAE,OAAO;GAChB,cAAc;EACf,CAAC,IACD,SAAS,IACX;CACD;CAkBA,QACC,WACA,UACA,YACA,WACA,OACA,MACyD;EACzD,OAAO,KAAKA,KAAK,IAChB,OACC,WACA,iCAAiC;GAChC;GACA,MAAM;IACL,YAAY;IACZ,WAAW;IACX,aAAa;IACb,YAAY;GACb;GACA,MAAM;GACN,cAAc;EACf,CAAC,IACD,SAAS,IACX;CACD;AACD"}
1
+ {"version":3,"file":"bucket-objects.js","names":["#ctx"],"sources":["../../../src/neon/resources/bucket-objects.ts"],"sourcesContent":["import {\n\tdeleteProjectBranchBucketObject,\n\tdeleteProjectBranchBucketObjectsByPrefix,\n\tgetProjectBranchBucketObject,\n\tlistProjectBranchBucketObjects,\n\tpresignProjectBranchBucketObject,\n} from \"../../client/sdk.gen.js\";\nimport type {\n\tBucketObjectsDeletePrefixResponse,\n\tBucketObjectsListResponse,\n\tListProjectBranchBucketObjectsData,\n\tPresignRequest,\n\tPresignResponse,\n} from \"../../client/types.gen.js\";\nimport type { CallOptions, RequestContext } from \"../context.js\";\nimport type { NeonResult, Outcome } from \"../result.js\";\n\ntype ListQuery = Omit<\n\tNonNullable<ListProjectBranchBucketObjectsData[\"query\"]>,\n\t\"cursor\"\n>;\n\n/** Objects inside a branch bucket. */\nexport class BucketObjects<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}/buckets/{bucket_name}/objects */\n\tlist(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tbucketName: string,\n\t\tquery?: ListQuery & { cursor?: string },\n\t): Promise<Outcome<BucketObjectsListResponse, DThrow>>;\n\tlist<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tbucketName: string,\n\t\tquery: (ListQuery & { cursor?: string }) | undefined,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<BucketObjectsListResponse, Throw>>;\n\tlist(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tbucketName: string,\n\t\tquery?: ListQuery & { cursor?: string },\n\t\topts?: CallOptions,\n\t): Promise<\n\t\tBucketObjectsListResponse | NeonResult<BucketObjectsListResponse>\n\t> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client, signal) =>\n\t\t\t\tlistProjectBranchBucketObjects({\n\t\t\t\t\tclient,\n\t\t\t\t\tpath: {\n\t\t\t\t\t\tproject_id: projectId,\n\t\t\t\t\t\tbranch_id: branchId,\n\t\t\t\t\t\tbucket_name: bucketName,\n\t\t\t\t\t},\n\t\t\t\t\tquery,\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 GET /projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects/{object_key}/download */\n\tget(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tbucketName: string,\n\t\tobjectKey: string,\n\t): Promise<Outcome<Blob, DThrow>>;\n\tget<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tbucketName: string,\n\t\tobjectKey: string,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<Blob, Throw>>;\n\tget(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tbucketName: string,\n\t\tobjectKey: string,\n\t\topts?: CallOptions,\n\t): Promise<Blob | NeonResult<Blob>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client, signal) =>\n\t\t\t\tgetProjectBranchBucketObject({\n\t\t\t\t\tclient,\n\t\t\t\t\tpath: {\n\t\t\t\t\t\tproject_id: projectId,\n\t\t\t\t\t\tbranch_id: branchId,\n\t\t\t\t\t\tbucket_name: bucketName,\n\t\t\t\t\t\tobject_key: objectKey,\n\t\t\t\t\t},\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 /projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects/{object_key} */\n\tdelete(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tbucketName: string,\n\t\tobjectKey: string,\n\t): Promise<Outcome<void, DThrow>>;\n\tdelete<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tbucketName: string,\n\t\tobjectKey: string,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<void, Throw>>;\n\tdelete(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tbucketName: string,\n\t\tobjectKey: string,\n\t\topts?: CallOptions,\n\t): Promise<void | NeonResult<void>> {\n\t\treturn this.#ctx.runVoid(opts, (client, signal) =>\n\t\t\tdeleteProjectBranchBucketObject({\n\t\t\t\tclient,\n\t\t\t\tpath: {\n\t\t\t\t\tproject_id: projectId,\n\t\t\t\t\tbranch_id: branchId,\n\t\t\t\t\tbucket_name: bucketName,\n\t\t\t\t\tobject_key: objectKey,\n\t\t\t\t},\n\t\t\t\tthrowOnError: false,\n\t\t\t\tsignal,\n\t\t\t}),\n\t\t);\n\t}\n\n\t/** @apiCall DELETE /projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects-by-prefix */\n\tdeleteByPrefix(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tbucketName: string,\n\t\tprefix: string,\n\t): Promise<Outcome<BucketObjectsDeletePrefixResponse, DThrow>>;\n\tdeleteByPrefix<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tbucketName: string,\n\t\tprefix: string,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<BucketObjectsDeletePrefixResponse, Throw>>;\n\tdeleteByPrefix(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tbucketName: string,\n\t\tprefix: string,\n\t\topts?: CallOptions,\n\t): Promise<\n\t\t| BucketObjectsDeletePrefixResponse\n\t\t| NeonResult<BucketObjectsDeletePrefixResponse>\n\t> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client, signal) =>\n\t\t\t\tdeleteProjectBranchBucketObjectsByPrefix({\n\t\t\t\t\tclient,\n\t\t\t\t\tpath: {\n\t\t\t\t\t\tproject_id: projectId,\n\t\t\t\t\t\tbranch_id: branchId,\n\t\t\t\t\t\tbucket_name: bucketName,\n\t\t\t\t\t},\n\t\t\t\t\tquery: { prefix },\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 POST /projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects/{object_key}/presign */\n\tpresign(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tbucketName: string,\n\t\tobjectKey: string,\n\t\tinput: PresignRequest,\n\t): Promise<Outcome<PresignResponse, DThrow>>;\n\tpresign<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tbucketName: string,\n\t\tobjectKey: string,\n\t\tinput: PresignRequest,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<PresignResponse, Throw>>;\n\tpresign(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tbucketName: string,\n\t\tobjectKey: string,\n\t\tinput: PresignRequest,\n\t\topts?: CallOptions,\n\t): Promise<PresignResponse | NeonResult<PresignResponse>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client, signal) =>\n\t\t\t\tpresignProjectBranchBucketObject({\n\t\t\t\t\tclient,\n\t\t\t\t\tpath: {\n\t\t\t\t\t\tproject_id: projectId,\n\t\t\t\t\t\tbranch_id: branchId,\n\t\t\t\t\t\tbucket_name: bucketName,\n\t\t\t\t\t\tobject_key: objectKey,\n\t\t\t\t\t},\n\t\t\t\t\tbody: input,\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":";;;AAuBA,IAAa,gBAAb,MAAmD;CAClD;CAEA,YAAY,KAAqB;EAChC,KAAKA,OAAO;CACb;CAgBA,KACC,WACA,UACA,YACA,OACA,MAGC;EACD,OAAO,KAAKA,KAAK,IAChB,OACC,QAAQ,WACR,+BAA+B;GAC9B;GACA,MAAM;IACL,YAAY;IACZ,WAAW;IACX,aAAa;GACd;GACA;GACA,cAAc;GACd;EACD,CAAC,IACD,SAAS,IACX;CACD;CAgBA,IACC,WACA,UACA,YACA,WACA,MACmC;EACnC,OAAO,KAAKA,KAAK,IAChB,OACC,QAAQ,WACR,6BAA6B;GAC5B;GACA,MAAM;IACL,YAAY;IACZ,WAAW;IACX,aAAa;IACb,YAAY;GACb;GACA,cAAc;GACd;EACD,CAAC,IACD,SAAS,IACX;CACD;CAgBA,OACC,WACA,UACA,YACA,WACA,MACmC;EACnC,OAAO,KAAKA,KAAK,QAAQ,OAAO,QAAQ,WACvC,gCAAgC;GAC/B;GACA,MAAM;IACL,YAAY;IACZ,WAAW;IACX,aAAa;IACb,YAAY;GACb;GACA,cAAc;GACd;EACD,CAAC,CACF;CACD;CAgBA,eACC,WACA,UACA,YACA,QACA,MAIC;EACD,OAAO,KAAKA,KAAK,IAChB,OACC,QAAQ,WACR,yCAAyC;GACxC;GACA,MAAM;IACL,YAAY;IACZ,WAAW;IACX,aAAa;GACd;GACA,OAAO,EAAE,OAAO;GAChB,cAAc;GACd;EACD,CAAC,IACD,SAAS,IACX;CACD;CAkBA,QACC,WACA,UACA,YACA,WACA,OACA,MACyD;EACzD,OAAO,KAAKA,KAAK,IAChB,OACC,QAAQ,WACR,iCAAiC;GAChC;GACA,MAAM;IACL,YAAY;IACZ,WAAW;IACX,aAAa;IACb,YAAY;GACb;GACA,MAAM;GACN,cAAc;GACd;EACD,CAAC,IACD,SAAS,IACX;CACD;AACD"}
@@ -1 +1 @@
1
- {"version":3,"file":"buckets.d.ts","names":[],"sources":["../../../src/neon/resources/buckets.ts"],"mappings":";;;;;KAaK,WAAA,GAAc;;AAAd,cAGQ,OAHG,CAAA,eAAG,OAAmB,CAAA,CAAA;EAGzB,CAAA,OAAA;EAAO,WAAA,CAAA,GAAA,EAGF,cAHE;EAGF;EAQE,IAAA,CAAA,SAAA,EAAA,MAAA,EAAA,QAAA,EAAA,MAAA,CAAA,EAAhB,OAAgB,CAAR,OAAQ,CAAA,MAAA,EAAA,EAAU,MAAV,CAAA,CAAA;EAAU,IAAA,CAAA,cAAA,OAAA,GACA,MADA,CAAA,CAAA,SAAA,EAAA,MAAA,EAAA,QAAA,EAAA,MAAA,EAAA,IAAA,EAItB,WAJsB,CAIV,KAJU,CAAA,CAAA,EAK1B,OAL0B,CAKlB,OALkB,CAKV,MALU,EAAA,EAKA,KALA,CAAA,CAAA;EAAlB;EAAR,MAAA,CAAA,SAAA,E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AAA,EAAA,QAAA,EAAA,MAAA,EAAA,IAAA,EAItB,WAJsB,CAIV,KAJU,CAAA,CAAA,EAK1B,OAL0B,CAKlB,OALkB,CAKV,MALU,EAAA,EAKA,KALA,CAAA,CAAA;EAAlB;EAAR,MAAA,CAAA,SAAA,EAAA,MAAA,EAAA,QAAA,EAAA,MAAA,EAAA,KAAA,EA4BK,WA5BL,CAAA,EA6BA,OA7BA,CA6BQ,OA7BR,CA6BgB,MA7BhB,EA6BwB,MA7BxB,CAAA,CAAA;EAC0B,MAAA,CAAA,cAAA,OAAA,GA6BE,MA7BF,CAAA,CAAA,SAAA,EAAA,MAAA,EAAA,QAAA,EAAA,MAAA,EAAA,KAAA,EAgCrB,WAhCqB,EAAA,IAAA,EAiCtB,WAjCsB,CAiCV,KAjCU,CAAA,CAAA,EAkC1B,OAlC0B,CAkClB,OAlCkB,CAkCV,MAlCU,EAkCF,KAlCE,CAAA,CAAA;EAGV;EAAZ,MAAA,CAAA,SAAA,EAAA,MAAA,EAAA,QAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,CAAA,EAyDJ,OAzDI,CAyDI,OAzDJ,CAAA,IAAA,EAyDkB,MAzDlB,CAAA,CAAA;EACY,MAAA,CAAA,cAAA,OAAA,GAyDY,MAzDZ,CAAA,CAAA,SAAA,EAAA,MAAA,EAAA,QAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,IAAA,EA6DZ,WA7DY,CA6DA,KA7DA,CAAA,CAAA,EA8DhB,OA9DgB,CA8DR,OA9DQ,CAAA,IAAA,EA8DM,KA9DN,CAAA,CAAA;AAAU"}
@@ -7,35 +7,38 @@ var Buckets = class {
7
7
  this.#ctx = ctx;
8
8
  }
9
9
  list(projectId, branchId, opts) {
10
- return this.#ctx.run(opts, (client) => listProjectBranchBuckets({
10
+ return this.#ctx.run(opts, (client, signal) => listProjectBranchBuckets({
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.buckets);
18
19
  }
19
20
  create(projectId, branchId, input, opts) {
20
- return this.#ctx.run(opts, (client) => createProjectBranchBucket({
21
+ return this.#ctx.run(opts, (client, signal) => createProjectBranchBucket({
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.bucket);
29
31
  }
30
32
  delete(projectId, branchId, bucketName, opts) {
31
- return this.#ctx.runVoid(opts, (client) => deleteProjectBranchBucket({
33
+ return this.#ctx.runVoid(opts, (client, signal) => deleteProjectBranchBucket({
32
34
  client,
33
35
  path: {
34
36
  project_id: projectId,
35
37
  branch_id: branchId,
36
38
  bucket_name: bucketName
37
39
  },
38
- throwOnError: false
40
+ throwOnError: false,
41
+ signal
39
42
  }));
40
43
  }
41
44
  };
@@ -1 +1 @@
1
- {"version":3,"file":"buckets.js","names":["#ctx"],"sources":["../../../src/neon/resources/buckets.ts"],"sourcesContent":["import {\n\tcreateProjectBranchBucket,\n\tdeleteProjectBranchBucket,\n\tlistProjectBranchBuckets,\n} from \"../../client/sdk.gen.js\";\nimport type {\n\tBucket,\n\tBucketAccessLevel,\n\tBucketCreateRequest,\n} from \"../../client/types.gen.js\";\nimport type { CallOptions, RequestContext } from \"../context.js\";\nimport type { NeonResult, Outcome } from \"../result.js\";\n\ntype CreateInput = BucketCreateRequest;\n\n/** Branch-scoped object-storage buckets. */\nexport class Buckets<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}/buckets */\n\tlist(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t): Promise<Outcome<Bucket[], DThrow>>;\n\tlist<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<Bucket[], Throw>>;\n\tlist(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\topts?: CallOptions,\n\t): Promise<Bucket[] | NeonResult<Bucket[]>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client) =>\n\t\t\t\tlistProjectBranchBuckets({\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.buckets,\n\t\t);\n\t}\n\n\t/** @apiCall POST /projects/{project_id}/branches/{branch_id}/buckets */\n\tcreate(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: CreateInput,\n\t): Promise<Outcome<Bucket, DThrow>>;\n\tcreate<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: CreateInput,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<Bucket, Throw>>;\n\tcreate(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: CreateInput,\n\t\topts?: CallOptions,\n\t): Promise<Bucket | NeonResult<Bucket>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client) =>\n\t\t\t\tcreateProjectBranchBucket({\n\t\t\t\t\tclient,\n\t\t\t\t\tpath: { project_id: projectId, branch_id: branchId },\n\t\t\t\t\tbody: input,\n\t\t\t\t\tthrowOnError: false,\n\t\t\t\t}),\n\t\t\t(data) => data.bucket,\n\t\t);\n\t}\n\n\t/** @apiCall DELETE /projects/{project_id}/branches/{branch_id}/buckets/{bucket_name} */\n\tdelete(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tbucketName: string,\n\t): Promise<Outcome<void, DThrow>>;\n\tdelete<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tbucketName: string,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<void, Throw>>;\n\tdelete(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tbucketName: string,\n\t\topts?: CallOptions,\n\t): Promise<void | NeonResult<void>> {\n\t\treturn this.#ctx.runVoid(opts, (client) =>\n\t\t\tdeleteProjectBranchBucket({\n\t\t\t\tclient,\n\t\t\t\tpath: {\n\t\t\t\t\tproject_id: projectId,\n\t\t\t\t\tbranch_id: branchId,\n\t\t\t\t\tbucket_name: bucketName,\n\t\t\t\t},\n\t\t\t\tthrowOnError: false,\n\t\t\t}),\n\t\t);\n\t}\n}\n\nexport type { BucketAccessLevel };\n"],"mappings":";;;AAgBA,IAAa,UAAb,MAA6C;CAC5C;CAEA,YAAY,KAAqB;EAChC,KAAKA,OAAO;CACb;CAYA,KACC,WACA,UACA,MAC2C;EAC3C,OAAO,KAAKA,KAAK,IAChB,OACC,WACA,yBAAyB;GACxB;GACA,MAAM;IAAE,YAAY;IAAW,WAAW;GAAS;GACnD,cAAc;EACf,CAAC,IACD,SAAS,KAAK,OAChB;CACD;CAcA,OACC,WACA,UACA,OACA,MACuC;EACvC,OAAO,KAAKA,KAAK,IAChB,OACC,WACA,0BAA0B;GACzB;GACA,MAAM;IAAE,YAAY;IAAW,WAAW;GAAS;GACnD,MAAM;GACN,cAAc;EACf,CAAC,IACD,SAAS,KAAK,MAChB;CACD;CAcA,OACC,WACA,UACA,YACA,MACmC;EACnC,OAAO,KAAKA,KAAK,QAAQ,OAAO,WAC/B,0BAA0B;GACzB;GACA,MAAM;IACL,YAAY;IACZ,WAAW;IACX,aAAa;GACd;GACA,cAAc;EACf,CAAC,CACF;CACD;AACD"}
1
+ {"version":3,"file":"buckets.js","names":["#ctx"],"sources":["../../../src/neon/resources/buckets.ts"],"sourcesContent":["import {\n\tcreateProjectBranchBucket,\n\tdeleteProjectBranchBucket,\n\tlistProjectBranchBuckets,\n} from \"../../client/sdk.gen.js\";\nimport type {\n\tBucket,\n\tBucketAccessLevel,\n\tBucketCreateRequest,\n} from \"../../client/types.gen.js\";\nimport type { CallOptions, RequestContext } from \"../context.js\";\nimport type { NeonResult, Outcome } from \"../result.js\";\n\ntype CreateInput = BucketCreateRequest;\n\n/** Branch-scoped object-storage buckets. */\nexport class Buckets<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}/buckets */\n\tlist(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t): Promise<Outcome<Bucket[], DThrow>>;\n\tlist<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<Bucket[], Throw>>;\n\tlist(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\topts?: CallOptions,\n\t): Promise<Bucket[] | NeonResult<Bucket[]>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client, signal) =>\n\t\t\t\tlistProjectBranchBuckets({\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.buckets,\n\t\t);\n\t}\n\n\t/** @apiCall POST /projects/{project_id}/branches/{branch_id}/buckets */\n\tcreate(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: CreateInput,\n\t): Promise<Outcome<Bucket, DThrow>>;\n\tcreate<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: CreateInput,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<Bucket, Throw>>;\n\tcreate(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tinput: CreateInput,\n\t\topts?: CallOptions,\n\t): Promise<Bucket | NeonResult<Bucket>> {\n\t\treturn this.#ctx.run(\n\t\t\topts,\n\t\t\t(client, signal) =>\n\t\t\t\tcreateProjectBranchBucket({\n\t\t\t\t\tclient,\n\t\t\t\t\tpath: { project_id: projectId, branch_id: branchId },\n\t\t\t\t\tbody: input,\n\t\t\t\t\tthrowOnError: false,\n\t\t\t\t\tsignal,\n\t\t\t\t}),\n\t\t\t(data) => data.bucket,\n\t\t);\n\t}\n\n\t/** @apiCall DELETE /projects/{project_id}/branches/{branch_id}/buckets/{bucket_name} */\n\tdelete(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tbucketName: string,\n\t): Promise<Outcome<void, DThrow>>;\n\tdelete<Throw extends boolean = DThrow>(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tbucketName: string,\n\t\topts: CallOptions<Throw>,\n\t): Promise<Outcome<void, Throw>>;\n\tdelete(\n\t\tprojectId: string,\n\t\tbranchId: string,\n\t\tbucketName: string,\n\t\topts?: CallOptions,\n\t): Promise<void | NeonResult<void>> {\n\t\treturn this.#ctx.runVoid(opts, (client, signal) =>\n\t\t\tdeleteProjectBranchBucket({\n\t\t\t\tclient,\n\t\t\t\tpath: {\n\t\t\t\t\tproject_id: projectId,\n\t\t\t\t\tbranch_id: branchId,\n\t\t\t\t\tbucket_name: bucketName,\n\t\t\t\t},\n\t\t\t\tthrowOnError: false,\n\t\t\t\tsignal,\n\t\t\t}),\n\t\t);\n\t}\n}\n\nexport type { BucketAccessLevel };\n"],"mappings":";;;AAgBA,IAAa,UAAb,MAA6C;CAC5C;CAEA,YAAY,KAAqB;EAChC,KAAKA,OAAO;CACb;CAYA,KACC,WACA,UACA,MAC2C;EAC3C,OAAO,KAAKA,KAAK,IAChB,OACC,QAAQ,WACR,yBAAyB;GACxB;GACA,MAAM;IAAE,YAAY;IAAW,WAAW;GAAS;GACnD,cAAc;GACd;EACD,CAAC,IACD,SAAS,KAAK,OAChB;CACD;CAcA,OACC,WACA,UACA,OACA,MACuC;EACvC,OAAO,KAAKA,KAAK,IAChB,OACC,QAAQ,WACR,0BAA0B;GACzB;GACA,MAAM;IAAE,YAAY;IAAW,WAAW;GAAS;GACnD,MAAM;GACN,cAAc;GACd;EACD,CAAC,IACD,SAAS,KAAK,MAChB;CACD;CAcA,OACC,WACA,UACA,YACA,MACmC;EACnC,OAAO,KAAKA,KAAK,QAAQ,OAAO,QAAQ,WACvC,0BAA0B;GACzB;GACA,MAAM;IACL,YAAY;IACZ,WAAW;IACX,aAAa;GACd;GACA,cAAc;GACd;EACD,CAAC,CACF;CACD;AACD"}
@@ -1,5 +1,5 @@
1
1
  import { ConsumptionHistoryPerBranchV2, ConsumptionHistoryPerProject, ConsumptionHistoryPerProjectV2, GetConsumptionHistoryPerBranchV2Data, GetConsumptionHistoryPerProjectData, GetConsumptionHistoryPerProjectV2Data } from "../../client/types.gen.js";
2
- import { RequestContext } from "../context.js";
2
+ import { CallOptions, RequestContext } from "../context.js";
3
3
  import { Paginated } from "../paginate.js";
4
4
 
5
5
  //#region src/neon/resources/consumption.d.ts
@@ -11,11 +11,11 @@ declare class Consumption {
11
11
  #private;
12
12
  constructor(ctx: RequestContext);
13
13
  /** @apiCall GET /consumption_history/projects */
14
- perProject(query: PerProjectQuery): Paginated<ConsumptionHistoryPerProject>;
14
+ perProject(query: PerProjectQuery, opts?: CallOptions): Paginated<ConsumptionHistoryPerProject>;
15
15
  /** @apiCall GET /consumption_history/v2/projects */
16
- perProjectV2(query: PerProjectV2Query): Paginated<ConsumptionHistoryPerProjectV2>;
16
+ perProjectV2(query: PerProjectV2Query, opts?: CallOptions): Paginated<ConsumptionHistoryPerProjectV2>;
17
17
  /** @apiCall GET /consumption_history/v2/branches */
18
- perBranchV2(query: PerBranchV2Query): Paginated<ConsumptionHistoryPerBranchV2>;
18
+ perBranchV2(query: PerBranchV2Query, opts?: CallOptions): Paginated<ConsumptionHistoryPerBranchV2>;
19
19
  }
20
20
  //#endregion
21
21
  export { Consumption };
@@ -1 +1 @@
1
- {"version":3,"file":"consumption.d.ts","names":[],"sources":["../../../src/neon/resources/consumption.ts"],"mappings":";;;;;KAgBK,eAAA,GAAkB,KACtB;KAGI,iBAAA,GAAoB,KACxB;AAPyD,KAUrD,gBAAA,GAAmB,IARJ,CASnB,oCATmB,CAAA,OAAA,CAAA,EAAA,QAAA,CAAA;AAAA;AACnB,cAaY,WAAA,CAbZ;EADsB,CAAA,OAAA;EAAI,WAAA,CAAA,GAAA,EAiBT,cAjBS;EAItB;EAAiB,UAAA,CAAA,KAAA,EAmBb,eAnBa,CAAA,EAoBlB,SApBkB,CAoBR,4BApBQ,CAAA;EACrB;EADwB,YAAA,CAAA,KAAA,EAsChB,iBAtCgB,CAAA,EAuCrB,SAvCqB,CAuCX,8BAvCW,CAAA;EAAI;EAIxB,WAAA,CAAA,KAAA,EAqDI,gBArDY,CAAA,EAsDjB,SAtDiB,CAsDP,6BAtDO,CAAA;AAAA"}
1
+ {"version":3,"file":"consumption.d.ts","names":[],"sources":["../../../src/neon/resources/consumption.ts"],"mappings":";;;;;KAgBK,eAAA,GAAkB,KACtB;KAGI,iBAAA,GAAoB,KACxB;AAPyD,KAUrD,gBAAA,GAAmB,IARJ,CASnB,oCATmB,CAAA,OAAA,CAAA,EAAA,QAAA,CAAA;AAAA;AACnB,cAaY,WAAA,CAbZ;EADsB,CAAA,OAAA;EAAI,WAAA,CAAA,GAAA,EAiBT,cAjBS;EAItB;EAAiB,UAAA,CAAA,KAAA,EAmBb,eAnBa,EAAA,IAAA,CAAA,EAoBb,WApBa,CAAA,EAqBlB,SArBkB,CAqBR,4BArBQ,CAAA;EACrB;EADwB,YAAA,CAAA,KAAA,EAwChB,iBAxCgB,EAAA,IAAA,CAAA,EAyChB,WAzCgB,CAAA,EA0CrB,SA1CqB,CA0CX,8BA1CW,CAAA;EAAI;EAIxB,WAAA,CAAA,KAAA,EAyDI,gBAzDY,EAAA,IAAA,CAAA,EA0DZ,WA1DY,CAAA,EA2DjB,SA3DiB,CA2DP,6BA3DO,CAAA;AAAA"}