@distilled.cloud/prisma-postgres 0.0.0-john

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 (202) hide show
  1. package/README.md +58 -0
  2. package/lib/category.d.ts +5 -0
  3. package/lib/category.d.ts.map +1 -0
  4. package/lib/category.js +5 -0
  5. package/lib/category.js.map +1 -0
  6. package/lib/client.d.ts +10 -0
  7. package/lib/client.d.ts.map +1 -0
  8. package/lib/client.js +56 -0
  9. package/lib/client.js.map +1 -0
  10. package/lib/credentials.d.ts +15 -0
  11. package/lib/credentials.d.ts.map +1 -0
  12. package/lib/credentials.js +21 -0
  13. package/lib/credentials.js.map +1 -0
  14. package/lib/errors.d.ts +32 -0
  15. package/lib/errors.d.ts.map +1 -0
  16. package/lib/errors.js +24 -0
  17. package/lib/errors.js.map +1 -0
  18. package/lib/index.d.ts +16 -0
  19. package/lib/index.d.ts.map +1 -0
  20. package/lib/index.js +16 -0
  21. package/lib/index.js.map +1 -0
  22. package/lib/operations/deleteV1ConnectionsById.d.ts +14 -0
  23. package/lib/operations/deleteV1ConnectionsById.d.ts.map +1 -0
  24. package/lib/operations/deleteV1ConnectionsById.js +22 -0
  25. package/lib/operations/deleteV1ConnectionsById.js.map +1 -0
  26. package/lib/operations/deleteV1DatabasesByDatabaseId.d.ts +14 -0
  27. package/lib/operations/deleteV1DatabasesByDatabaseId.d.ts.map +1 -0
  28. package/lib/operations/deleteV1DatabasesByDatabaseId.js +23 -0
  29. package/lib/operations/deleteV1DatabasesByDatabaseId.js.map +1 -0
  30. package/lib/operations/deleteV1IntegrationsById.d.ts +14 -0
  31. package/lib/operations/deleteV1IntegrationsById.d.ts.map +1 -0
  32. package/lib/operations/deleteV1IntegrationsById.js +22 -0
  33. package/lib/operations/deleteV1IntegrationsById.js.map +1 -0
  34. package/lib/operations/deleteV1ProjectsById.d.ts +14 -0
  35. package/lib/operations/deleteV1ProjectsById.d.ts.map +1 -0
  36. package/lib/operations/deleteV1ProjectsById.js +22 -0
  37. package/lib/operations/deleteV1ProjectsById.js.map +1 -0
  38. package/lib/operations/deleteV1WorkspacesByWorkspaceIdIntegrationsByClientId.d.ts +15 -0
  39. package/lib/operations/deleteV1WorkspacesByWorkspaceIdIntegrationsByClientId.d.ts.map +1 -0
  40. package/lib/operations/deleteV1WorkspacesByWorkspaceIdIntegrationsByClientId.js +27 -0
  41. package/lib/operations/deleteV1WorkspacesByWorkspaceIdIntegrationsByClientId.js.map +1 -0
  42. package/lib/operations/getV1Connections.d.ts +53 -0
  43. package/lib/operations/getV1Connections.d.ts.map +1 -0
  44. package/lib/operations/getV1Connections.js +59 -0
  45. package/lib/operations/getV1Connections.js.map +1 -0
  46. package/lib/operations/getV1ConnectionsById.d.ts +47 -0
  47. package/lib/operations/getV1ConnectionsById.d.ts.map +1 -0
  48. package/lib/operations/getV1ConnectionsById.js +55 -0
  49. package/lib/operations/getV1ConnectionsById.js.map +1 -0
  50. package/lib/operations/getV1Databases.d.ts +72 -0
  51. package/lib/operations/getV1Databases.d.ts.map +1 -0
  52. package/lib/operations/getV1Databases.js +83 -0
  53. package/lib/operations/getV1Databases.js.map +1 -0
  54. package/lib/operations/getV1DatabasesByDatabaseId.d.ts +66 -0
  55. package/lib/operations/getV1DatabasesByDatabaseId.d.ts.map +1 -0
  56. package/lib/operations/getV1DatabasesByDatabaseId.js +79 -0
  57. package/lib/operations/getV1DatabasesByDatabaseId.js.map +1 -0
  58. package/lib/operations/getV1DatabasesByDatabaseIdBackups.d.ts +31 -0
  59. package/lib/operations/getV1DatabasesByDatabaseIdBackups.d.ts.map +1 -0
  60. package/lib/operations/getV1DatabasesByDatabaseIdBackups.js +40 -0
  61. package/lib/operations/getV1DatabasesByDatabaseIdBackups.js.map +1 -0
  62. package/lib/operations/getV1DatabasesByDatabaseIdConnections.d.ts +53 -0
  63. package/lib/operations/getV1DatabasesByDatabaseIdConnections.d.ts.map +1 -0
  64. package/lib/operations/getV1DatabasesByDatabaseIdConnections.js +62 -0
  65. package/lib/operations/getV1DatabasesByDatabaseIdConnections.js.map +1 -0
  66. package/lib/operations/getV1DatabasesByDatabaseIdUsage.d.ts +32 -0
  67. package/lib/operations/getV1DatabasesByDatabaseIdUsage.d.ts.map +1 -0
  68. package/lib/operations/getV1DatabasesByDatabaseIdUsage.js +41 -0
  69. package/lib/operations/getV1DatabasesByDatabaseIdUsage.js.map +1 -0
  70. package/lib/operations/getV1Integrations.d.ts +37 -0
  71. package/lib/operations/getV1Integrations.d.ts.map +1 -0
  72. package/lib/operations/getV1Integrations.js +44 -0
  73. package/lib/operations/getV1Integrations.js.map +1 -0
  74. package/lib/operations/getV1IntegrationsById.d.ts +31 -0
  75. package/lib/operations/getV1IntegrationsById.d.ts.map +1 -0
  76. package/lib/operations/getV1IntegrationsById.js +39 -0
  77. package/lib/operations/getV1IntegrationsById.js.map +1 -0
  78. package/lib/operations/getV1Projects.d.ts +33 -0
  79. package/lib/operations/getV1Projects.d.ts.map +1 -0
  80. package/lib/operations/getV1Projects.js +39 -0
  81. package/lib/operations/getV1Projects.js.map +1 -0
  82. package/lib/operations/getV1ProjectsById.d.ts +28 -0
  83. package/lib/operations/getV1ProjectsById.d.ts.map +1 -0
  84. package/lib/operations/getV1ProjectsById.js +35 -0
  85. package/lib/operations/getV1ProjectsById.js.map +1 -0
  86. package/lib/operations/getV1ProjectsByProjectIdDatabases.d.ts +72 -0
  87. package/lib/operations/getV1ProjectsByProjectIdDatabases.d.ts.map +1 -0
  88. package/lib/operations/getV1ProjectsByProjectIdDatabases.js +86 -0
  89. package/lib/operations/getV1ProjectsByProjectIdDatabases.js.map +1 -0
  90. package/lib/operations/getV1Regions.d.ts +22 -0
  91. package/lib/operations/getV1Regions.d.ts.map +1 -0
  92. package/lib/operations/getV1Regions.js +28 -0
  93. package/lib/operations/getV1Regions.js.map +1 -0
  94. package/lib/operations/getV1RegionsAccelerate.d.ts +18 -0
  95. package/lib/operations/getV1RegionsAccelerate.d.ts.map +1 -0
  96. package/lib/operations/getV1RegionsAccelerate.js +26 -0
  97. package/lib/operations/getV1RegionsAccelerate.js.map +1 -0
  98. package/lib/operations/getV1RegionsPostgres.d.ts +19 -0
  99. package/lib/operations/getV1RegionsPostgres.d.ts.map +1 -0
  100. package/lib/operations/getV1RegionsPostgres.js +27 -0
  101. package/lib/operations/getV1RegionsPostgres.js.map +1 -0
  102. package/lib/operations/getV1Workspaces.d.ts +27 -0
  103. package/lib/operations/getV1Workspaces.d.ts.map +1 -0
  104. package/lib/operations/getV1Workspaces.js +33 -0
  105. package/lib/operations/getV1Workspaces.js.map +1 -0
  106. package/lib/operations/getV1WorkspacesById.d.ts +22 -0
  107. package/lib/operations/getV1WorkspacesById.d.ts.map +1 -0
  108. package/lib/operations/getV1WorkspacesById.js +30 -0
  109. package/lib/operations/getV1WorkspacesById.js.map +1 -0
  110. package/lib/operations/getV1WorkspacesByWorkspaceIdIntegrations.d.ts +37 -0
  111. package/lib/operations/getV1WorkspacesByWorkspaceIdIntegrations.d.ts.map +1 -0
  112. package/lib/operations/getV1WorkspacesByWorkspaceIdIntegrations.js +49 -0
  113. package/lib/operations/getV1WorkspacesByWorkspaceIdIntegrations.js.map +1 -0
  114. package/lib/operations/index.d.ts +32 -0
  115. package/lib/operations/index.d.ts.map +1 -0
  116. package/lib/operations/index.js +32 -0
  117. package/lib/operations/index.js.map +1 -0
  118. package/lib/operations/patchV1DatabasesByDatabaseId.d.ts +67 -0
  119. package/lib/operations/patchV1DatabasesByDatabaseId.d.ts.map +1 -0
  120. package/lib/operations/patchV1DatabasesByDatabaseId.js +81 -0
  121. package/lib/operations/patchV1DatabasesByDatabaseId.js.map +1 -0
  122. package/lib/operations/patchV1ProjectsById.d.ts +30 -0
  123. package/lib/operations/patchV1ProjectsById.d.ts.map +1 -0
  124. package/lib/operations/patchV1ProjectsById.js +38 -0
  125. package/lib/operations/patchV1ProjectsById.js.map +1 -0
  126. package/lib/operations/postV1Connections.d.ts +52 -0
  127. package/lib/operations/postV1Connections.d.ts.map +1 -0
  128. package/lib/operations/postV1Connections.js +59 -0
  129. package/lib/operations/postV1Connections.js.map +1 -0
  130. package/lib/operations/postV1Databases.d.ts +69 -0
  131. package/lib/operations/postV1Databases.d.ts.map +1 -0
  132. package/lib/operations/postV1Databases.js +83 -0
  133. package/lib/operations/postV1Databases.js.map +1 -0
  134. package/lib/operations/postV1DatabasesByDatabaseIdConnections.d.ts +55 -0
  135. package/lib/operations/postV1DatabasesByDatabaseIdConnections.d.ts.map +1 -0
  136. package/lib/operations/postV1DatabasesByDatabaseIdConnections.js +64 -0
  137. package/lib/operations/postV1DatabasesByDatabaseIdConnections.js.map +1 -0
  138. package/lib/operations/postV1Projects.d.ts +113 -0
  139. package/lib/operations/postV1Projects.d.ts.map +1 -0
  140. package/lib/operations/postV1Projects.js +126 -0
  141. package/lib/operations/postV1Projects.js.map +1 -0
  142. package/lib/operations/postV1ProjectsByIdTransfer.d.ts +15 -0
  143. package/lib/operations/postV1ProjectsByIdTransfer.d.ts.map +1 -0
  144. package/lib/operations/postV1ProjectsByIdTransfer.js +23 -0
  145. package/lib/operations/postV1ProjectsByIdTransfer.js.map +1 -0
  146. package/lib/operations/postV1ProjectsByProjectIdDatabases.d.ts +110 -0
  147. package/lib/operations/postV1ProjectsByProjectIdDatabases.d.ts.map +1 -0
  148. package/lib/operations/postV1ProjectsByProjectIdDatabases.js +127 -0
  149. package/lib/operations/postV1ProjectsByProjectIdDatabases.js.map +1 -0
  150. package/lib/retry.d.ts +22 -0
  151. package/lib/retry.d.ts.map +1 -0
  152. package/lib/retry.js +21 -0
  153. package/lib/retry.js.map +1 -0
  154. package/lib/sensitive.d.ts +5 -0
  155. package/lib/sensitive.d.ts.map +1 -0
  156. package/lib/sensitive.js +5 -0
  157. package/lib/sensitive.js.map +1 -0
  158. package/lib/traits.d.ts +5 -0
  159. package/lib/traits.d.ts.map +1 -0
  160. package/lib/traits.js +5 -0
  161. package/lib/traits.js.map +1 -0
  162. package/package.json +88 -0
  163. package/src/category.ts +4 -0
  164. package/src/client.ts +69 -0
  165. package/src/credentials.ts +34 -0
  166. package/src/errors.ts +48 -0
  167. package/src/index.ts +15 -0
  168. package/src/operations/deleteV1ConnectionsById.ts +30 -0
  169. package/src/operations/deleteV1DatabasesByDatabaseId.ts +29 -0
  170. package/src/operations/deleteV1IntegrationsById.ts +30 -0
  171. package/src/operations/deleteV1ProjectsById.ts +28 -0
  172. package/src/operations/deleteV1WorkspacesByWorkspaceIdIntegrationsByClientId.ts +35 -0
  173. package/src/operations/getV1Connections.ts +77 -0
  174. package/src/operations/getV1ConnectionsById.ts +71 -0
  175. package/src/operations/getV1Databases.ts +103 -0
  176. package/src/operations/getV1DatabasesByDatabaseId.ts +101 -0
  177. package/src/operations/getV1DatabasesByDatabaseIdBackups.ts +50 -0
  178. package/src/operations/getV1DatabasesByDatabaseIdConnections.ts +82 -0
  179. package/src/operations/getV1DatabasesByDatabaseIdUsage.ts +47 -0
  180. package/src/operations/getV1Integrations.ts +52 -0
  181. package/src/operations/getV1IntegrationsById.ts +46 -0
  182. package/src/operations/getV1Projects.ts +45 -0
  183. package/src/operations/getV1ProjectsById.ts +41 -0
  184. package/src/operations/getV1ProjectsByProjectIdDatabases.ts +110 -0
  185. package/src/operations/getV1Regions.ts +34 -0
  186. package/src/operations/getV1RegionsAccelerate.ts +38 -0
  187. package/src/operations/getV1RegionsPostgres.ts +37 -0
  188. package/src/operations/getV1Workspaces.ts +39 -0
  189. package/src/operations/getV1WorkspacesById.ts +34 -0
  190. package/src/operations/getV1WorkspacesByWorkspaceIdIntegrations.ts +59 -0
  191. package/src/operations/index.ts +31 -0
  192. package/src/operations/patchV1DatabasesByDatabaseId.ts +101 -0
  193. package/src/operations/patchV1ProjectsById.ts +42 -0
  194. package/src/operations/postV1Connections.ts +75 -0
  195. package/src/operations/postV1Databases.ts +103 -0
  196. package/src/operations/postV1DatabasesByDatabaseIdConnections.ts +82 -0
  197. package/src/operations/postV1Projects.ts +160 -0
  198. package/src/operations/postV1ProjectsByIdTransfer.ts +31 -0
  199. package/src/operations/postV1ProjectsByProjectIdDatabases.ts +165 -0
  200. package/src/retry.ts +37 -0
  201. package/src/sensitive.ts +4 -0
  202. package/src/traits.ts +4 -0
@@ -0,0 +1,59 @@
1
+ import * as Schema from "effect/Schema";
2
+ import { API } from "../client";
3
+ import * as T from "../traits";
4
+
5
+ // Input Schema
6
+ export const GetV1WorkspacesByWorkspaceIdIntegrationsInput =
7
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
8
+ workspaceId: Schema.String.pipe(T.PathParam()),
9
+ cursor: Schema.optional(Schema.String),
10
+ limit: Schema.optional(Schema.Number),
11
+ }).pipe(
12
+ T.Http({
13
+ method: "GET",
14
+ path: "/v1/workspaces/{workspaceId}/integrations",
15
+ }),
16
+ );
17
+ export type GetV1WorkspacesByWorkspaceIdIntegrationsInput =
18
+ typeof GetV1WorkspacesByWorkspaceIdIntegrationsInput.Type;
19
+
20
+ // Output Schema
21
+ export const GetV1WorkspacesByWorkspaceIdIntegrationsOutput =
22
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
23
+ data: Schema.Array(
24
+ Schema.Struct({
25
+ id: Schema.String,
26
+ url: Schema.String,
27
+ createdAt: Schema.String,
28
+ scopes: Schema.Array(Schema.String),
29
+ client: Schema.Struct({
30
+ id: Schema.String,
31
+ name: Schema.String,
32
+ createdAt: Schema.String,
33
+ }),
34
+ createdByUser: Schema.Struct({
35
+ id: Schema.String,
36
+ email: Schema.String,
37
+ displayName: Schema.NullOr(Schema.String),
38
+ }),
39
+ }),
40
+ ),
41
+ pagination: Schema.Struct({
42
+ nextCursor: Schema.NullOr(Schema.String),
43
+ hasMore: Schema.Boolean,
44
+ }),
45
+ });
46
+ export type GetV1WorkspacesByWorkspaceIdIntegrationsOutput =
47
+ typeof GetV1WorkspacesByWorkspaceIdIntegrationsOutput.Type;
48
+
49
+ // The operation
50
+ /**
51
+ * Get list of integrations
52
+ *
53
+ * Returns integrations for the given workspace.
54
+ */
55
+ export const getV1WorkspacesByWorkspaceIdIntegrations =
56
+ /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
57
+ inputSchema: GetV1WorkspacesByWorkspaceIdIntegrationsInput,
58
+ outputSchema: GetV1WorkspacesByWorkspaceIdIntegrationsOutput,
59
+ }));
@@ -0,0 +1,31 @@
1
+ export * from "./getV1Connections";
2
+ export * from "./postV1Connections";
3
+ export * from "./getV1ConnectionsById";
4
+ export * from "./deleteV1ConnectionsById";
5
+ export * from "./getV1Databases";
6
+ export * from "./postV1Databases";
7
+ export * from "./getV1DatabasesByDatabaseId";
8
+ export * from "./patchV1DatabasesByDatabaseId";
9
+ export * from "./deleteV1DatabasesByDatabaseId";
10
+ export * from "./getV1DatabasesByDatabaseIdConnections";
11
+ export * from "./postV1DatabasesByDatabaseIdConnections";
12
+ export * from "./getV1DatabasesByDatabaseIdBackups";
13
+ export * from "./getV1DatabasesByDatabaseIdUsage";
14
+ export * from "./getV1Projects";
15
+ export * from "./postV1Projects";
16
+ export * from "./getV1ProjectsById";
17
+ export * from "./patchV1ProjectsById";
18
+ export * from "./deleteV1ProjectsById";
19
+ export * from "./postV1ProjectsByIdTransfer";
20
+ export * from "./getV1ProjectsByProjectIdDatabases";
21
+ export * from "./postV1ProjectsByProjectIdDatabases";
22
+ export * from "./getV1Integrations";
23
+ export * from "./getV1IntegrationsById";
24
+ export * from "./deleteV1IntegrationsById";
25
+ export * from "./getV1WorkspacesByWorkspaceIdIntegrations";
26
+ export * from "./deleteV1WorkspacesByWorkspaceIdIntegrationsByClientId";
27
+ export * from "./getV1Regions";
28
+ export * from "./getV1RegionsPostgres";
29
+ export * from "./getV1RegionsAccelerate";
30
+ export * from "./getV1Workspaces";
31
+ export * from "./getV1WorkspacesById";
@@ -0,0 +1,101 @@
1
+ import * as Schema from "effect/Schema";
2
+ import { API } from "../client";
3
+ import * as T from "../traits";
4
+
5
+ // Input Schema
6
+ export const PatchV1DatabasesByDatabaseIdInput =
7
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
8
+ databaseId: Schema.String.pipe(T.PathParam()),
9
+ name: Schema.optional(Schema.String),
10
+ }).pipe(T.Http({ method: "PATCH", path: "/v1/databases/{databaseId}" }));
11
+ export type PatchV1DatabasesByDatabaseIdInput =
12
+ typeof PatchV1DatabasesByDatabaseIdInput.Type;
13
+
14
+ // Output Schema
15
+ export const PatchV1DatabasesByDatabaseIdOutput =
16
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
17
+ data: Schema.Struct({
18
+ id: Schema.String,
19
+ type: Schema.String,
20
+ url: Schema.String,
21
+ name: Schema.String,
22
+ status: Schema.Literals([
23
+ "failure",
24
+ "provisioning",
25
+ "ready",
26
+ "recovering",
27
+ ]),
28
+ createdAt: Schema.String,
29
+ isDefault: Schema.Boolean,
30
+ defaultConnectionId: Schema.NullOr(Schema.String),
31
+ connections: Schema.Array(
32
+ Schema.Struct({
33
+ id: Schema.String,
34
+ type: Schema.String,
35
+ url: Schema.String,
36
+ name: Schema.String,
37
+ createdAt: Schema.String,
38
+ kind: Schema.Literals(["postgres", "accelerate"]),
39
+ endpoints: Schema.Struct({
40
+ direct: Schema.optional(
41
+ Schema.Struct({
42
+ host: Schema.String,
43
+ port: Schema.Number,
44
+ }),
45
+ ),
46
+ pooled: Schema.optional(
47
+ Schema.Struct({
48
+ host: Schema.String,
49
+ port: Schema.Number,
50
+ }),
51
+ ),
52
+ accelerate: Schema.optional(
53
+ Schema.Struct({
54
+ host: Schema.String,
55
+ port: Schema.Number,
56
+ }),
57
+ ),
58
+ }),
59
+ directConnection: Schema.optional(
60
+ Schema.NullOr(
61
+ Schema.Struct({
62
+ host: Schema.String,
63
+ pass: Schema.String,
64
+ user: Schema.String,
65
+ }),
66
+ ),
67
+ ),
68
+ database: Schema.Struct({
69
+ id: Schema.String,
70
+ url: Schema.String,
71
+ name: Schema.String,
72
+ }),
73
+ }),
74
+ ),
75
+ project: Schema.Struct({
76
+ id: Schema.String,
77
+ url: Schema.String,
78
+ name: Schema.String,
79
+ }),
80
+ region: Schema.NullOr(
81
+ Schema.Struct({
82
+ id: Schema.String,
83
+ name: Schema.String,
84
+ }),
85
+ ),
86
+ }),
87
+ });
88
+ export type PatchV1DatabasesByDatabaseIdOutput =
89
+ typeof PatchV1DatabasesByDatabaseIdOutput.Type;
90
+
91
+ // The operation
92
+ /**
93
+ * Update database
94
+ *
95
+ * Updates the database with the given ID.
96
+ */
97
+ export const patchV1DatabasesByDatabaseId =
98
+ /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
99
+ inputSchema: PatchV1DatabasesByDatabaseIdInput,
100
+ outputSchema: PatchV1DatabasesByDatabaseIdOutput,
101
+ }));
@@ -0,0 +1,42 @@
1
+ import * as Schema from "effect/Schema";
2
+ import { API } from "../client";
3
+ import * as T from "../traits";
4
+
5
+ // Input Schema
6
+ export const PatchV1ProjectsByIdInput =
7
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
8
+ id: Schema.String.pipe(T.PathParam()),
9
+ name: Schema.optional(Schema.String),
10
+ settings: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
11
+ }).pipe(T.Http({ method: "PATCH", path: "/v1/projects/{id}" }));
12
+ export type PatchV1ProjectsByIdInput = typeof PatchV1ProjectsByIdInput.Type;
13
+
14
+ // Output Schema
15
+ export const PatchV1ProjectsByIdOutput =
16
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
17
+ data: Schema.Struct({
18
+ id: Schema.String,
19
+ type: Schema.String,
20
+ url: Schema.String,
21
+ name: Schema.String,
22
+ createdAt: Schema.String,
23
+ defaultRegion: Schema.NullOr(Schema.String),
24
+ workspace: Schema.Struct({
25
+ id: Schema.String,
26
+ url: Schema.String,
27
+ name: Schema.String,
28
+ }),
29
+ }),
30
+ });
31
+ export type PatchV1ProjectsByIdOutput = typeof PatchV1ProjectsByIdOutput.Type;
32
+
33
+ // The operation
34
+ /**
35
+ * Update project
36
+ *
37
+ * Updates the project with the given ID.
38
+ */
39
+ export const patchV1ProjectsById = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
40
+ inputSchema: PatchV1ProjectsByIdInput,
41
+ outputSchema: PatchV1ProjectsByIdOutput,
42
+ }));
@@ -0,0 +1,75 @@
1
+ import * as Schema from "effect/Schema";
2
+ import { API } from "../client";
3
+ import * as T from "../traits";
4
+
5
+ // Input Schema
6
+ export const PostV1ConnectionsInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
7
+ {
8
+ databaseId: Schema.String,
9
+ name: Schema.String,
10
+ },
11
+ ).pipe(T.Http({ method: "POST", path: "/v1/connections" }));
12
+ export type PostV1ConnectionsInput = typeof PostV1ConnectionsInput.Type;
13
+
14
+ // Output Schema
15
+ export const PostV1ConnectionsOutput =
16
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
17
+ data: Schema.Struct({
18
+ id: Schema.String,
19
+ type: Schema.String,
20
+ url: Schema.String,
21
+ name: Schema.String,
22
+ createdAt: Schema.String,
23
+ kind: Schema.Literals(["postgres", "accelerate"]),
24
+ endpoints: Schema.Struct({
25
+ direct: Schema.optional(
26
+ Schema.Struct({
27
+ host: Schema.String,
28
+ port: Schema.Number,
29
+ }),
30
+ ),
31
+ pooled: Schema.optional(
32
+ Schema.Struct({
33
+ host: Schema.String,
34
+ port: Schema.Number,
35
+ }),
36
+ ),
37
+ accelerate: Schema.optional(
38
+ Schema.Struct({
39
+ host: Schema.String,
40
+ port: Schema.Number,
41
+ }),
42
+ ),
43
+ }),
44
+ connectionString: Schema.String,
45
+ directConnection: Schema.optional(
46
+ Schema.NullOr(
47
+ Schema.Struct({
48
+ host: Schema.String,
49
+ pass: Schema.String,
50
+ user: Schema.String,
51
+ }),
52
+ ),
53
+ ),
54
+ database: Schema.Struct({
55
+ id: Schema.String,
56
+ url: Schema.String,
57
+ name: Schema.String,
58
+ }),
59
+ host: Schema.NullOr(Schema.String),
60
+ pass: Schema.NullOr(Schema.String),
61
+ user: Schema.NullOr(Schema.String),
62
+ }),
63
+ });
64
+ export type PostV1ConnectionsOutput = typeof PostV1ConnectionsOutput.Type;
65
+
66
+ // The operation
67
+ /**
68
+ * Create connection
69
+ *
70
+ * Creates a new connection for the specified database.
71
+ */
72
+ export const postV1Connections = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
73
+ inputSchema: PostV1ConnectionsInput,
74
+ outputSchema: PostV1ConnectionsOutput,
75
+ }));
@@ -0,0 +1,103 @@
1
+ import * as Schema from "effect/Schema";
2
+ import { API } from "../client";
3
+ import * as T from "../traits";
4
+
5
+ // Input Schema
6
+ export const PostV1DatabasesInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
7
+ projectId: Schema.String,
8
+ region: Schema.optional(
9
+ Schema.Literals([
10
+ "us-east-1",
11
+ "us-west-1",
12
+ "eu-west-3",
13
+ "eu-central-1",
14
+ "ap-northeast-1",
15
+ "ap-southeast-1",
16
+ "inherit",
17
+ ]),
18
+ ),
19
+ name: Schema.optional(Schema.String),
20
+ isDefault: Schema.optional(Schema.Boolean),
21
+ }).pipe(T.Http({ method: "POST", path: "/v1/databases" }));
22
+ export type PostV1DatabasesInput = typeof PostV1DatabasesInput.Type;
23
+
24
+ // Output Schema
25
+ export const PostV1DatabasesOutput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
26
+ data: Schema.Struct({
27
+ id: Schema.String,
28
+ type: Schema.String,
29
+ url: Schema.String,
30
+ name: Schema.String,
31
+ status: Schema.Literals(["failure", "provisioning", "ready", "recovering"]),
32
+ createdAt: Schema.String,
33
+ isDefault: Schema.Boolean,
34
+ defaultConnectionId: Schema.NullOr(Schema.String),
35
+ connections: Schema.Array(
36
+ Schema.Struct({
37
+ id: Schema.String,
38
+ type: Schema.String,
39
+ url: Schema.String,
40
+ name: Schema.String,
41
+ createdAt: Schema.String,
42
+ kind: Schema.Literals(["postgres", "accelerate"]),
43
+ endpoints: Schema.Struct({
44
+ direct: Schema.optional(
45
+ Schema.Struct({
46
+ host: Schema.String,
47
+ port: Schema.Number,
48
+ }),
49
+ ),
50
+ pooled: Schema.optional(
51
+ Schema.Struct({
52
+ host: Schema.String,
53
+ port: Schema.Number,
54
+ }),
55
+ ),
56
+ accelerate: Schema.optional(
57
+ Schema.Struct({
58
+ host: Schema.String,
59
+ port: Schema.Number,
60
+ }),
61
+ ),
62
+ }),
63
+ directConnection: Schema.optional(
64
+ Schema.NullOr(
65
+ Schema.Struct({
66
+ host: Schema.String,
67
+ pass: Schema.String,
68
+ user: Schema.String,
69
+ }),
70
+ ),
71
+ ),
72
+ database: Schema.Struct({
73
+ id: Schema.String,
74
+ url: Schema.String,
75
+ name: Schema.String,
76
+ }),
77
+ }),
78
+ ),
79
+ project: Schema.Struct({
80
+ id: Schema.String,
81
+ url: Schema.String,
82
+ name: Schema.String,
83
+ }),
84
+ region: Schema.NullOr(
85
+ Schema.Struct({
86
+ id: Schema.String,
87
+ name: Schema.String,
88
+ }),
89
+ ),
90
+ }),
91
+ });
92
+ export type PostV1DatabasesOutput = typeof PostV1DatabasesOutput.Type;
93
+
94
+ // The operation
95
+ /**
96
+ * Create database
97
+ *
98
+ * Creates a new database in the specified project.
99
+ */
100
+ export const postV1Databases = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
101
+ inputSchema: PostV1DatabasesInput,
102
+ outputSchema: PostV1DatabasesOutput,
103
+ }));
@@ -0,0 +1,82 @@
1
+ import * as Schema from "effect/Schema";
2
+ import { API } from "../client";
3
+ import * as T from "../traits";
4
+
5
+ // Input Schema
6
+ export const PostV1DatabasesByDatabaseIdConnectionsInput =
7
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
8
+ databaseId: Schema.String.pipe(T.PathParam()),
9
+ name: Schema.String,
10
+ }).pipe(
11
+ T.Http({ method: "POST", path: "/v1/databases/{databaseId}/connections" }),
12
+ );
13
+ export type PostV1DatabasesByDatabaseIdConnectionsInput =
14
+ typeof PostV1DatabasesByDatabaseIdConnectionsInput.Type;
15
+
16
+ // Output Schema
17
+ export const PostV1DatabasesByDatabaseIdConnectionsOutput =
18
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
19
+ data: Schema.Struct({
20
+ id: Schema.String,
21
+ type: Schema.String,
22
+ url: Schema.String,
23
+ name: Schema.String,
24
+ createdAt: Schema.String,
25
+ kind: Schema.Literals(["postgres", "accelerate"]),
26
+ endpoints: Schema.Struct({
27
+ direct: Schema.optional(
28
+ Schema.Struct({
29
+ host: Schema.String,
30
+ port: Schema.Number,
31
+ connectionString: Schema.String,
32
+ }),
33
+ ),
34
+ pooled: Schema.optional(
35
+ Schema.Struct({
36
+ host: Schema.String,
37
+ port: Schema.Number,
38
+ connectionString: Schema.String,
39
+ }),
40
+ ),
41
+ accelerate: Schema.optional(
42
+ Schema.Struct({
43
+ host: Schema.String,
44
+ port: Schema.Number,
45
+ connectionString: Schema.String,
46
+ }),
47
+ ),
48
+ }),
49
+ connectionString: Schema.String,
50
+ directConnection: Schema.optional(
51
+ Schema.NullOr(
52
+ Schema.Struct({
53
+ host: Schema.String,
54
+ pass: Schema.String,
55
+ user: Schema.String,
56
+ }),
57
+ ),
58
+ ),
59
+ database: Schema.Struct({
60
+ id: Schema.String,
61
+ url: Schema.String,
62
+ name: Schema.String,
63
+ }),
64
+ host: Schema.NullOr(Schema.String),
65
+ pass: Schema.NullOr(Schema.String),
66
+ user: Schema.NullOr(Schema.String),
67
+ }),
68
+ });
69
+ export type PostV1DatabasesByDatabaseIdConnectionsOutput =
70
+ typeof PostV1DatabasesByDatabaseIdConnectionsOutput.Type;
71
+
72
+ // The operation
73
+ /**
74
+ * Create database connection string
75
+ *
76
+ * Creates a new connection string for the given database.
77
+ */
78
+ export const postV1DatabasesByDatabaseIdConnections =
79
+ /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
80
+ inputSchema: PostV1DatabasesByDatabaseIdConnectionsInput,
81
+ outputSchema: PostV1DatabasesByDatabaseIdConnectionsOutput,
82
+ }));
@@ -0,0 +1,160 @@
1
+ import * as Schema from "effect/Schema";
2
+ import { API } from "../client";
3
+ import * as T from "../traits";
4
+
5
+ // Input Schema
6
+ export const PostV1ProjectsInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
7
+ createDatabase: Schema.optional(Schema.Boolean),
8
+ name: Schema.optional(Schema.String),
9
+ region: Schema.optional(
10
+ Schema.Literals([
11
+ "us-east-1",
12
+ "us-west-1",
13
+ "eu-west-3",
14
+ "eu-central-1",
15
+ "ap-northeast-1",
16
+ "ap-southeast-1",
17
+ ]),
18
+ ),
19
+ }).pipe(T.Http({ method: "POST", path: "/v1/projects" }));
20
+ export type PostV1ProjectsInput = typeof PostV1ProjectsInput.Type;
21
+
22
+ // Output Schema
23
+ export const PostV1ProjectsOutput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
24
+ data: Schema.Struct({
25
+ id: Schema.String,
26
+ type: Schema.String,
27
+ url: Schema.String,
28
+ name: Schema.String,
29
+ createdAt: Schema.String,
30
+ defaultRegion: Schema.NullOr(Schema.String),
31
+ workspace: Schema.Struct({
32
+ id: Schema.String,
33
+ url: Schema.String,
34
+ name: Schema.String,
35
+ }),
36
+ database: Schema.NullOr(
37
+ Schema.Struct({
38
+ id: Schema.String,
39
+ type: Schema.String,
40
+ url: Schema.String,
41
+ name: Schema.String,
42
+ status: Schema.Literals(["provisioning", "ready"]),
43
+ createdAt: Schema.String,
44
+ isDefault: Schema.Boolean,
45
+ defaultConnectionId: Schema.NullOr(Schema.String),
46
+ connections: Schema.Array(
47
+ Schema.Struct({
48
+ id: Schema.String,
49
+ type: Schema.String,
50
+ url: Schema.String,
51
+ name: Schema.String,
52
+ createdAt: Schema.String,
53
+ kind: Schema.Literals(["postgres", "accelerate"]),
54
+ endpoints: Schema.Struct({
55
+ direct: Schema.optional(
56
+ Schema.Struct({
57
+ host: Schema.String,
58
+ port: Schema.Number,
59
+ connectionString: Schema.optional(Schema.String),
60
+ }),
61
+ ),
62
+ pooled: Schema.optional(
63
+ Schema.Struct({
64
+ host: Schema.String,
65
+ port: Schema.Number,
66
+ connectionString: Schema.optional(Schema.String),
67
+ }),
68
+ ),
69
+ accelerate: Schema.optional(
70
+ Schema.Struct({
71
+ host: Schema.String,
72
+ port: Schema.Number,
73
+ connectionString: Schema.optional(Schema.String),
74
+ }),
75
+ ),
76
+ }),
77
+ directConnection: Schema.optional(
78
+ Schema.NullOr(
79
+ Schema.Struct({
80
+ host: Schema.String,
81
+ pass: Schema.String,
82
+ user: Schema.String,
83
+ }),
84
+ ),
85
+ ),
86
+ database: Schema.Struct({
87
+ id: Schema.String,
88
+ url: Schema.String,
89
+ name: Schema.String,
90
+ }),
91
+ }),
92
+ ),
93
+ region: Schema.Struct({
94
+ id: Schema.String,
95
+ name: Schema.String,
96
+ }),
97
+ apiKeys: Schema.Array(
98
+ Schema.Struct({
99
+ id: Schema.String,
100
+ type: Schema.String,
101
+ url: Schema.String,
102
+ name: Schema.String,
103
+ createdAt: Schema.String,
104
+ kind: Schema.Literals(["postgres", "accelerate"]),
105
+ endpoints: Schema.Struct({
106
+ direct: Schema.optional(
107
+ Schema.Struct({
108
+ host: Schema.String,
109
+ port: Schema.Number,
110
+ }),
111
+ ),
112
+ pooled: Schema.optional(
113
+ Schema.Struct({
114
+ host: Schema.String,
115
+ port: Schema.Number,
116
+ }),
117
+ ),
118
+ accelerate: Schema.optional(
119
+ Schema.Struct({
120
+ host: Schema.String,
121
+ port: Schema.Number,
122
+ }),
123
+ ),
124
+ }),
125
+ connectionString: Schema.String,
126
+ directConnection: Schema.optional(
127
+ Schema.NullOr(
128
+ Schema.Struct({
129
+ host: Schema.String,
130
+ pass: Schema.String,
131
+ user: Schema.String,
132
+ }),
133
+ ),
134
+ ),
135
+ }),
136
+ ),
137
+ connectionString: Schema.NullOr(Schema.String),
138
+ directConnection: Schema.NullOr(
139
+ Schema.Struct({
140
+ host: Schema.String,
141
+ pass: Schema.String,
142
+ user: Schema.String,
143
+ }),
144
+ ),
145
+ }),
146
+ ),
147
+ }),
148
+ });
149
+ export type PostV1ProjectsOutput = typeof PostV1ProjectsOutput.Type;
150
+
151
+ // The operation
152
+ /**
153
+ * Create project with a postgres database
154
+ *
155
+ * Creates a new project with a postgres database.
156
+ */
157
+ export const postV1Projects = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
158
+ inputSchema: PostV1ProjectsInput,
159
+ outputSchema: PostV1ProjectsOutput,
160
+ }));
@@ -0,0 +1,31 @@
1
+ import * as Schema from "effect/Schema";
2
+ import { API } from "../client";
3
+ import * as T from "../traits";
4
+
5
+ // Input Schema
6
+ export const PostV1ProjectsByIdTransferInput =
7
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
8
+ id: Schema.String.pipe(T.PathParam()),
9
+ recipientAccessToken: Schema.String,
10
+ }).pipe(T.Http({ method: "POST", path: "/v1/projects/{id}/transfer" }));
11
+ export type PostV1ProjectsByIdTransferInput =
12
+ typeof PostV1ProjectsByIdTransferInput.Type;
13
+
14
+ // Output Schema
15
+ export const PostV1ProjectsByIdTransferOutput =
16
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Void;
17
+ export type PostV1ProjectsByIdTransferOutput =
18
+ typeof PostV1ProjectsByIdTransferOutput.Type;
19
+
20
+ // The operation
21
+ /**
22
+ * Transfer project
23
+ *
24
+ * Transfer the project with the given ID to the new owner's workspace
25
+ */
26
+ export const postV1ProjectsByIdTransfer = /*@__PURE__*/ /*#__PURE__*/ API.make(
27
+ () => ({
28
+ inputSchema: PostV1ProjectsByIdTransferInput,
29
+ outputSchema: PostV1ProjectsByIdTransferOutput,
30
+ }),
31
+ );