@powerlines/plugin-prisma 0.2.243 → 0.2.245

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 (119) hide show
  1. package/dist/api/client/client.gen.d.cts +7 -0
  2. package/dist/api/client/client.gen.d.cts.map +1 -0
  3. package/dist/api/client/client.gen.d.mts +7 -0
  4. package/dist/api/client/client.gen.d.mts.map +1 -0
  5. package/dist/api/client/client.gen.mjs +2 -1
  6. package/dist/api/client/client.gen.mjs.map +1 -0
  7. package/dist/api/client/index.d.cts +8 -0
  8. package/dist/api/client/index.d.mts +8 -0
  9. package/dist/api/client/types.gen.d.cts +131 -0
  10. package/dist/api/client/types.gen.d.cts.map +1 -0
  11. package/dist/api/client/types.gen.d.mts +131 -0
  12. package/dist/api/client/types.gen.d.mts.map +1 -0
  13. package/dist/api/client/utils.gen.d.cts +44 -0
  14. package/dist/api/client/utils.gen.d.cts.map +1 -0
  15. package/dist/api/client/utils.gen.d.mts +44 -0
  16. package/dist/api/client/utils.gen.d.mts.map +1 -0
  17. package/dist/api/client/utils.gen.mjs +2 -1
  18. package/dist/api/client/utils.gen.mjs.map +1 -0
  19. package/dist/api/client.gen.d.cts +19 -0
  20. package/dist/api/client.gen.d.cts.map +1 -0
  21. package/dist/api/client.gen.d.mts +19 -0
  22. package/dist/api/client.gen.d.mts.map +1 -0
  23. package/dist/api/client.gen.mjs +2 -1
  24. package/dist/api/client.gen.mjs.map +1 -0
  25. package/dist/api/core/auth.gen.d.cts +24 -0
  26. package/dist/api/core/auth.gen.d.cts.map +1 -0
  27. package/dist/api/core/auth.gen.d.mts +24 -0
  28. package/dist/api/core/auth.gen.d.mts.map +1 -0
  29. package/dist/api/core/auth.gen.mjs +2 -1
  30. package/dist/api/core/auth.gen.mjs.map +1 -0
  31. package/dist/api/core/bodySerializer.gen.d.cts +32 -0
  32. package/dist/api/core/bodySerializer.gen.d.cts.map +1 -0
  33. package/dist/api/core/bodySerializer.gen.d.mts +32 -0
  34. package/dist/api/core/bodySerializer.gen.d.mts.map +1 -0
  35. package/dist/api/core/bodySerializer.gen.mjs +2 -1
  36. package/dist/api/core/bodySerializer.gen.mjs.map +1 -0
  37. package/dist/api/core/params.gen.d.cts +49 -0
  38. package/dist/api/core/params.gen.d.cts.map +1 -0
  39. package/dist/api/core/params.gen.d.mts +49 -0
  40. package/dist/api/core/params.gen.d.mts.map +1 -0
  41. package/dist/api/core/params.gen.mjs +2 -1
  42. package/dist/api/core/params.gen.mjs.map +1 -0
  43. package/dist/api/core/pathSerializer.gen.d.cts +56 -0
  44. package/dist/api/core/pathSerializer.gen.d.cts.map +1 -0
  45. package/dist/api/core/pathSerializer.gen.d.mts +56 -0
  46. package/dist/api/core/pathSerializer.gen.d.mts.map +1 -0
  47. package/dist/api/core/pathSerializer.gen.mjs +2 -1
  48. package/dist/api/core/pathSerializer.gen.mjs.map +1 -0
  49. package/dist/api/core/queryKeySerializer.gen.d.cts +23 -0
  50. package/dist/api/core/queryKeySerializer.gen.d.cts.map +1 -0
  51. package/dist/api/core/queryKeySerializer.gen.d.mts +23 -0
  52. package/dist/api/core/queryKeySerializer.gen.d.mts.map +1 -0
  53. package/dist/api/core/queryKeySerializer.gen.mjs +2 -1
  54. package/dist/api/core/queryKeySerializer.gen.mjs.map +1 -0
  55. package/dist/api/core/serverSentEvents.gen.d.cts +91 -0
  56. package/dist/api/core/serverSentEvents.gen.d.cts.map +1 -0
  57. package/dist/api/core/serverSentEvents.gen.d.mts +91 -0
  58. package/dist/api/core/serverSentEvents.gen.d.mts.map +1 -0
  59. package/dist/api/core/serverSentEvents.gen.mjs +2 -1
  60. package/dist/api/core/serverSentEvents.gen.mjs.map +1 -0
  61. package/dist/api/core/types.gen.d.cts +80 -0
  62. package/dist/api/core/types.gen.d.cts.map +1 -0
  63. package/dist/api/core/types.gen.d.mts +80 -0
  64. package/dist/api/core/types.gen.d.mts.map +1 -0
  65. package/dist/api/core/utils.gen.d.cts +34 -0
  66. package/dist/api/core/utils.gen.d.cts.map +1 -0
  67. package/dist/api/core/utils.gen.d.mts +34 -0
  68. package/dist/api/core/utils.gen.d.mts.map +1 -0
  69. package/dist/api/core/utils.gen.mjs +2 -1
  70. package/dist/api/core/utils.gen.mjs.map +1 -0
  71. package/dist/api/sdk.gen.cjs +154 -6
  72. package/dist/api/sdk.gen.d.cts +226 -0
  73. package/dist/api/sdk.gen.d.cts.map +1 -0
  74. package/dist/api/sdk.gen.d.mts +226 -0
  75. package/dist/api/sdk.gen.d.mts.map +1 -0
  76. package/dist/api/sdk.gen.mjs +156 -7
  77. package/dist/api/sdk.gen.mjs.map +1 -0
  78. package/dist/api/types.gen.d.cts +2365 -0
  79. package/dist/api/types.gen.d.cts.map +1 -0
  80. package/dist/api/types.gen.d.mts +2365 -0
  81. package/dist/api/types.gen.d.mts.map +1 -0
  82. package/dist/helpers/get-schema.d.cts +14 -0
  83. package/dist/helpers/get-schema.d.cts.map +1 -0
  84. package/dist/helpers/get-schema.d.mts +14 -0
  85. package/dist/helpers/get-schema.d.mts.map +1 -0
  86. package/dist/helpers/get-schema.mjs +2 -1
  87. package/dist/helpers/get-schema.mjs.map +1 -0
  88. package/dist/helpers/index.d.cts +4 -0
  89. package/dist/helpers/index.d.mts +4 -0
  90. package/dist/helpers/prisma-postgres.d.cts +65 -0
  91. package/dist/helpers/prisma-postgres.d.cts.map +1 -0
  92. package/dist/helpers/prisma-postgres.d.mts +65 -0
  93. package/dist/helpers/prisma-postgres.d.mts.map +1 -0
  94. package/dist/helpers/prisma-postgres.mjs +2 -1
  95. package/dist/helpers/prisma-postgres.mjs.map +1 -0
  96. package/dist/helpers/schema-creator.d.cts +21 -0
  97. package/dist/helpers/schema-creator.d.cts.map +1 -0
  98. package/dist/helpers/schema-creator.d.mts +21 -0
  99. package/dist/helpers/schema-creator.d.mts.map +1 -0
  100. package/dist/helpers/schema-creator.mjs +2 -1
  101. package/dist/helpers/schema-creator.mjs.map +1 -0
  102. package/dist/index.cjs +18 -24
  103. package/dist/index.d.cts +24 -0
  104. package/dist/index.d.cts.map +1 -0
  105. package/dist/index.d.mts +24 -0
  106. package/dist/index.d.mts.map +1 -0
  107. package/dist/index.mjs +16 -21
  108. package/dist/index.mjs.map +1 -0
  109. package/dist/types/index.d.cts +3 -0
  110. package/dist/types/index.d.mts +3 -0
  111. package/dist/types/plugin.d.cts +91 -0
  112. package/dist/types/plugin.d.cts.map +1 -0
  113. package/dist/types/plugin.d.mts +91 -0
  114. package/dist/types/plugin.d.mts.map +1 -0
  115. package/dist/types/prisma.d.cts +85 -0
  116. package/dist/types/prisma.d.cts.map +1 -0
  117. package/dist/types/prisma.d.mts +85 -0
  118. package/dist/types/prisma.d.mts.map +1 -0
  119. package/package.json +8 -7
@@ -0,0 +1,91 @@
1
+ import { Config } from "./types.gen.mjs";
2
+
3
+ //#region src/api/core/serverSentEvents.gen.d.ts
4
+ type ServerSentEventsOptions<TData = unknown> = Omit<RequestInit, 'method'> & Pick<Config, 'method' | 'responseTransformer' | 'responseValidator'> & {
5
+ /**
6
+ * Fetch API implementation. You can use this option to provide a custom
7
+ * fetch instance.
8
+ *
9
+ * @default globalThis.fetch
10
+ */
11
+ fetch?: typeof fetch;
12
+ /**
13
+ * Implementing clients can call request interceptors inside this hook.
14
+ */
15
+ onRequest?: (url: string, init: RequestInit) => Promise<Request>;
16
+ /**
17
+ * Callback invoked when a network or parsing error occurs during streaming.
18
+ *
19
+ * This option applies only if the endpoint returns a stream of events.
20
+ *
21
+ * @param error The error that occurred.
22
+ */
23
+ onSseError?: (error: unknown) => void;
24
+ /**
25
+ * Callback invoked when an event is streamed from the server.
26
+ *
27
+ * This option applies only if the endpoint returns a stream of events.
28
+ *
29
+ * @param event Event streamed from the server.
30
+ * @returns Nothing (void).
31
+ */
32
+ onSseEvent?: (event: StreamEvent<TData>) => void;
33
+ serializedBody?: RequestInit['body'];
34
+ /**
35
+ * Default retry delay in milliseconds.
36
+ *
37
+ * This option applies only if the endpoint returns a stream of events.
38
+ *
39
+ * @default 3000
40
+ */
41
+ sseDefaultRetryDelay?: number;
42
+ /**
43
+ * Maximum number of retry attempts before giving up.
44
+ */
45
+ sseMaxRetryAttempts?: number;
46
+ /**
47
+ * Maximum retry delay in milliseconds.
48
+ *
49
+ * Applies only when exponential backoff is used.
50
+ *
51
+ * This option applies only if the endpoint returns a stream of events.
52
+ *
53
+ * @default 30000
54
+ */
55
+ sseMaxRetryDelay?: number;
56
+ /**
57
+ * Optional sleep function for retry backoff.
58
+ *
59
+ * Defaults to using `setTimeout`.
60
+ */
61
+ sseSleepFn?: (ms: number) => Promise<void>;
62
+ url: string;
63
+ };
64
+ interface StreamEvent<TData = unknown> {
65
+ data: TData;
66
+ event?: string;
67
+ id?: string;
68
+ retry?: number;
69
+ }
70
+ type ServerSentEventsResult<TData = unknown, TReturn = void, TNext = unknown> = {
71
+ stream: AsyncGenerator<TData extends Record<string, unknown> ? TData[keyof TData] : TData, TReturn, TNext>;
72
+ };
73
+ declare const createSseClient: <TData = unknown>({
74
+ onRequest,
75
+ onSseError,
76
+ onSseEvent,
77
+ responseTransformer,
78
+ responseValidator,
79
+ sseDefaultRetryDelay,
80
+ sseMaxRetryAttempts,
81
+ sseMaxRetryDelay,
82
+ sseSleepFn,
83
+ url,
84
+ ...options
85
+ }: ServerSentEventsOptions) => ServerSentEventsResult<TData>;
86
+ declare type __ΩServerSentEventsOptions = any[];
87
+ declare type __ΩStreamEvent = any[];
88
+ declare type __ΩServerSentEventsResult = any[];
89
+ //#endregion
90
+ export { ServerSentEventsOptions, ServerSentEventsResult, StreamEvent, __ΩServerSentEventsOptions, __ΩServerSentEventsResult, __ΩStreamEvent, createSseClient };
91
+ //# sourceMappingURL=serverSentEvents.gen.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serverSentEvents.gen.d.mts","names":[],"sources":["../../../src/api/core/serverSentEvents.gen.ts"],"sourcesContent":[],"mappings":";;;KAIY,2CAA2C,KACrD,yBAGA,KAAK;;AAJP;;;;;EAWmB,KAAA,CAAA,EAAA,OAAA,KAAA;EAIiB;;;EAiBC,SAAA,CAAA,EAAA,CAAA,GAAA,EAAA,MAAA,EAAA,IAAA,EAjBD,WAiBC,EAAA,GAjBe,OAiBf,CAjBuB,OAiBvB,CAAA;EAAZ;;;;AAiCzB;AAOA;;EAMkB,UAAA,CAAA,EAAA,CAAA,KAAA,EAAA,OAAA,EAAA,GAAA,IAAA;EAA0B;;;;;;;AAM5C;EAAiD,UAAA,CAAA,EAAA,CAAA,KAAA,EApDxB,WAoDwB,CApDZ,KAoDY,CAAA,EAAA,GAAA,IAAA;EAAA,cAAA,CAAA,EAnD5B,WAmD4B,CAAA,MAAA,CAAA;EAAA;;;;;;;EAAA,oBAAA,CAAA,EAAA,MAAA;EAY9C;;;EAAgD,mBAAA,CAAA,EAAA,MAAA;;;;;;;;;;;;;;;;+BAnClB;;;UAIhB;QACT;;;;;KAMI;UAKF,eACN,cAAc,0BAA0B,YAAY,SAAS,OAC7D,SACA;;cAIS;;;;;;;;;;;;GAYV,4BAA0B,uBAAuB"}
@@ -91,4 +91,5 @@ const createSseClient = ({ onRequest, onSseError, onSseEvent, responseTransforme
91
91
  };
92
92
 
93
93
  //#endregion
94
- export { createSseClient };
94
+ export { createSseClient };
95
+ //# sourceMappingURL=serverSentEvents.gen.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serverSentEvents.gen.mjs","names":["lastEventId: string | undefined","retryDelay: number","requestInit: RequestInit","dataLines: Array<string>","eventName: string | undefined","data: unknown"],"sources":["../../../src/api/core/serverSentEvents.gen.ts"],"sourcesContent":["// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Config } from './types.gen';\n\nexport type ServerSentEventsOptions<TData = unknown> = Omit<\n RequestInit,\n 'method'\n> &\n Pick<Config, 'method' | 'responseTransformer' | 'responseValidator'> & {\n /**\n * Fetch API implementation. You can use this option to provide a custom\n * fetch instance.\n *\n * @default globalThis.fetch\n */\n fetch?: typeof fetch;\n /**\n * Implementing clients can call request interceptors inside this hook.\n */\n onRequest?: (url: string, init: RequestInit) => Promise<Request>;\n /**\n * Callback invoked when a network or parsing error occurs during streaming.\n *\n * This option applies only if the endpoint returns a stream of events.\n *\n * @param error The error that occurred.\n */\n onSseError?: (error: unknown) => void;\n /**\n * Callback invoked when an event is streamed from the server.\n *\n * This option applies only if the endpoint returns a stream of events.\n *\n * @param event Event streamed from the server.\n * @returns Nothing (void).\n */\n onSseEvent?: (event: StreamEvent<TData>) => void;\n serializedBody?: RequestInit['body'];\n /**\n * Default retry delay in milliseconds.\n *\n * This option applies only if the endpoint returns a stream of events.\n *\n * @default 3000\n */\n sseDefaultRetryDelay?: number;\n /**\n * Maximum number of retry attempts before giving up.\n */\n sseMaxRetryAttempts?: number;\n /**\n * Maximum retry delay in milliseconds.\n *\n * Applies only when exponential backoff is used.\n *\n * This option applies only if the endpoint returns a stream of events.\n *\n * @default 30000\n */\n sseMaxRetryDelay?: number;\n /**\n * Optional sleep function for retry backoff.\n *\n * Defaults to using `setTimeout`.\n */\n sseSleepFn?: (ms: number) => Promise<void>;\n url: string;\n };\n\nexport interface StreamEvent<TData = unknown> {\n data: TData;\n event?: string;\n id?: string;\n retry?: number;\n}\n\nexport type ServerSentEventsResult<\n TData = unknown,\n TReturn = void,\n TNext = unknown,\n> = {\n stream: AsyncGenerator<\n TData extends Record<string, unknown> ? TData[keyof TData] : TData,\n TReturn,\n TNext\n >;\n};\n\nexport const createSseClient = <TData = unknown>({\n onRequest,\n onSseError,\n onSseEvent,\n responseTransformer,\n responseValidator,\n sseDefaultRetryDelay,\n sseMaxRetryAttempts,\n sseMaxRetryDelay,\n sseSleepFn,\n url,\n ...options\n}: ServerSentEventsOptions): ServerSentEventsResult<TData> => {\n let lastEventId: string | undefined;\n\n const sleep =\n sseSleepFn ??\n ((ms: number) => new Promise((resolve) => setTimeout(resolve, ms)));\n\n const createStream = async function* () {\n let retryDelay: number = sseDefaultRetryDelay ?? 3000;\n let attempt = 0;\n const signal = options.signal ?? new AbortController().signal;\n\n while (true) {\n if (signal.aborted) break;\n\n attempt++;\n\n const headers =\n options.headers instanceof Headers\n ? options.headers\n : new Headers(options.headers as Record<string, string> | undefined);\n\n if (lastEventId !== undefined) {\n headers.set('Last-Event-ID', lastEventId);\n }\n\n try {\n const requestInit: RequestInit = {\n redirect: 'follow',\n ...options,\n body: options.serializedBody,\n headers,\n signal,\n };\n let request = new Request(url, requestInit);\n if (onRequest) {\n request = await onRequest(url, requestInit);\n }\n // fetch must be assigned here, otherwise it would throw the error:\n // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation\n const _fetch = options.fetch ?? globalThis.fetch;\n const response = await _fetch(request);\n\n if (!response.ok)\n throw new Error(\n `SSE failed: ${response.status} ${response.statusText}`,\n );\n\n if (!response.body) throw new Error('No body in SSE response');\n\n const reader = response.body\n .pipeThrough(new TextDecoderStream())\n .getReader();\n\n let buffer = '';\n\n const abortHandler = () => {\n try {\n reader.cancel();\n } catch {\n // noop\n }\n };\n\n signal.addEventListener('abort', abortHandler);\n\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n buffer += value;\n // Normalize line endings: CRLF -> LF, then CR -> LF\n buffer = buffer.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\n\n const chunks = buffer.split('\\n\\n');\n buffer = chunks.pop() ?? '';\n\n for (const chunk of chunks) {\n const lines = chunk.split('\\n');\n const dataLines: Array<string> = [];\n let eventName: string | undefined;\n\n for (const line of lines) {\n if (line.startsWith('data:')) {\n dataLines.push(line.replace(/^data:\\s*/, ''));\n } else if (line.startsWith('event:')) {\n eventName = line.replace(/^event:\\s*/, '');\n } else if (line.startsWith('id:')) {\n lastEventId = line.replace(/^id:\\s*/, '');\n } else if (line.startsWith('retry:')) {\n const parsed = Number.parseInt(\n line.replace(/^retry:\\s*/, ''),\n 10,\n );\n if (!Number.isNaN(parsed)) {\n retryDelay = parsed;\n }\n }\n }\n\n let data: unknown;\n let parsedJson = false;\n\n if (dataLines.length) {\n const rawData = dataLines.join('\\n');\n try {\n data = JSON.parse(rawData);\n parsedJson = true;\n } catch {\n data = rawData;\n }\n }\n\n if (parsedJson) {\n if (responseValidator) {\n await responseValidator(data);\n }\n\n if (responseTransformer) {\n data = await responseTransformer(data);\n }\n }\n\n onSseEvent?.({\n data,\n event: eventName,\n id: lastEventId,\n retry: retryDelay,\n });\n\n if (dataLines.length) {\n yield data as any;\n }\n }\n }\n } finally {\n signal.removeEventListener('abort', abortHandler);\n reader.releaseLock();\n }\n\n break; // exit loop on normal completion\n } catch (error) {\n // connection failed or aborted; retry after delay\n onSseError?.(error);\n\n if (\n sseMaxRetryAttempts !== undefined &&\n attempt >= sseMaxRetryAttempts\n ) {\n break; // stop after firing error\n }\n\n // exponential backoff: double retry each attempt, cap at 30s\n const backoff = Math.min(\n retryDelay * 2 ** (attempt - 1),\n sseMaxRetryDelay ?? 30000,\n );\n await sleep(backoff);\n }\n }\n };\n\n const stream = createStream();\n\n return { stream };\n};\n"],"mappings":"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"}
@@ -0,0 +1,80 @@
1
+ import { Auth, AuthToken } from "./auth.gen.cjs";
2
+ import { BodySerializer, QuerySerializer, QuerySerializerOptions } from "./bodySerializer.gen.cjs";
3
+
4
+ //#region src/api/core/types.gen.d.ts
5
+ type HttpMethod = 'connect' | 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put' | 'trace';
6
+ type Client<RequestFn = never, Config$1 = unknown, MethodFn = never, BuildUrlFn = never, SseFn = never> = {
7
+ /**
8
+ * Returns the final request URL.
9
+ */
10
+ buildUrl: BuildUrlFn;
11
+ getConfig: () => Config$1;
12
+ request: RequestFn;
13
+ setConfig: (config: Config$1) => Config$1;
14
+ } & { [K in HttpMethod]: MethodFn } & ([SseFn] extends [never] ? {
15
+ sse?: never;
16
+ } : {
17
+ sse: { [K in HttpMethod]: SseFn };
18
+ });
19
+ interface Config {
20
+ /**
21
+ * Auth token or a function returning auth token. The resolved value will be
22
+ * added to the request payload as defined by its `security` array.
23
+ */
24
+ auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;
25
+ /**
26
+ * A function for serializing request body parameter. By default,
27
+ * {@link JSON.stringify()} will be used.
28
+ */
29
+ bodySerializer?: BodySerializer | null;
30
+ /**
31
+ * An object containing any HTTP headers that you want to pre-populate your
32
+ * `Headers` object with.
33
+ *
34
+ * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}
35
+ */
36
+ headers?: RequestInit['headers'] | Record<string, string | number | boolean | (string | number | boolean)[] | null | undefined | unknown>;
37
+ /**
38
+ * The request method.
39
+ *
40
+ * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}
41
+ */
42
+ method?: Uppercase<HttpMethod>;
43
+ /**
44
+ * A function for serializing request query parameters. By default, arrays
45
+ * will be exploded in form style, objects will be exploded in deepObject
46
+ * style, and reserved characters are percent-encoded.
47
+ *
48
+ * This method will have no effect if the native `paramsSerializer()` Axios
49
+ * API function is used.
50
+ *
51
+ * {@link https://swagger.io/docs/specification/serialization/#query View examples}
52
+ */
53
+ querySerializer?: QuerySerializer | QuerySerializerOptions;
54
+ /**
55
+ * A function validating request data. This is useful if you want to ensure
56
+ * the request conforms to the desired shape, so it can be safely sent to
57
+ * the server.
58
+ */
59
+ requestValidator?: (data: unknown) => Promise<unknown>;
60
+ /**
61
+ * A function transforming response data before it's returned. This is useful
62
+ * for post-processing data, e.g. converting ISO strings into Date objects.
63
+ */
64
+ responseTransformer?: (data: unknown) => Promise<unknown>;
65
+ /**
66
+ * A function validating response data. This is useful if you want to ensure
67
+ * the response conforms to the desired shape, so it can be safely passed to
68
+ * the transformers and returned to the user.
69
+ */
70
+ responseValidator?: (data: unknown) => Promise<unknown>;
71
+ }
72
+ type IsExactlyNeverOrNeverUndefined<T> = [T] extends [never] ? true : [T] extends [never | undefined] ? [undefined] extends [T] ? false : true : false;
73
+ type OmitNever<T extends Record<string, unknown>> = { [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K] };
74
+ declare type __ΩHttpMethod = any[];
75
+ declare type __ΩClient = any[];
76
+ declare type __ΩConfig = any[];
77
+ declare type __ΩOmitNever = any[];
78
+ //#endregion
79
+ export { Client, Config, HttpMethod, OmitNever, __ΩClient, __ΩConfig, __ΩHttpMethod, __ΩOmitNever };
80
+ //# sourceMappingURL=types.gen.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.gen.d.cts","names":[],"sources":["../../../src/api/core/types.gen.ts"],"sourcesContent":[],"mappings":";;;;KASY,UAAA;KAWA;EAXA;AAWZ;;EAWmB,QAAA,EADP,UACO;EACR,SAAA,EAAA,GAAA,GADQ,QACR;EACW,OAAA,EADX,SACW;EAAW,SAAA,EAAA,CAAA,MAAA,EAAX,QAAW,EAAA,GAAA,QAAA;CAEzB,GAAA,QAAA,UAAa,GAAA,QAAA,EACf,GAAA,CAAA,CAAA,KAAA,CAAA,SAAA,CAAA,KAAA,CAAA,GAAA;EAEe,GAAA,CAAA,EAAA,KAAA;CAAa,GAAA;EAAK,GAAA,EAAA,QAAlB,UAEE,GAFW,KAEX,EAKN;CAAiB,CAAA;AAAR,UALT,MAAA,CAKS;EAAqB;;;;EAczC,IAAA,CAAA,EAAA,CAAA,CAAA,IAAA,EAdW,IAcX,EAAA,GAdoB,OAcpB,CAd4B,SAc5B,CAAA,GAdyC,SAczC,CAAA,GAdsD,SActD;EAee;;;;EAiBmB,cAAA,CAAA,EAzCrB,cAyCqB,GAAA,IAAA;EAKG;;;AAO1C;;;EAK0B,OAAA,CAAA,EAlDrB,WAkDqB,CAAA,SAAA,CAAA,GAjDrB,MAiDqB,CAAA,MAAA,EAAA,MAAA,GAAA,MAAA,GAAA,OAAA,GAAA,CAAA,MAAA,GAAA,MAAA,GAAA,OAAA,CAAA,EAAA,GAAA,IAAA,GAAA,SAAA,GAAA,OAAA,CAAA;EAAC;AAK5B;;;;EACoD,MAAA,CAAA,EAxCzC,SAwCyC,CAxC/B,UAwC+B,CAAA;EAAjC;;;;;;;;;;oBA7BC,kBAAkB;;;;;;wCAME;;;;;2CAKG;;;;;;yCAMF;;KAGpC,qCAAqC,6BAErC,sDACsB;KAKf,oBAAoB,yCAClB,KAAK,+BAA+B,EAAE,2BAE9C,IAAI,EAAE"}
@@ -0,0 +1,80 @@
1
+ import { Auth, AuthToken } from "./auth.gen.mjs";
2
+ import { BodySerializer, QuerySerializer, QuerySerializerOptions } from "./bodySerializer.gen.mjs";
3
+
4
+ //#region src/api/core/types.gen.d.ts
5
+ type HttpMethod = 'connect' | 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put' | 'trace';
6
+ type Client<RequestFn = never, Config$1 = unknown, MethodFn = never, BuildUrlFn = never, SseFn = never> = {
7
+ /**
8
+ * Returns the final request URL.
9
+ */
10
+ buildUrl: BuildUrlFn;
11
+ getConfig: () => Config$1;
12
+ request: RequestFn;
13
+ setConfig: (config: Config$1) => Config$1;
14
+ } & { [K in HttpMethod]: MethodFn } & ([SseFn] extends [never] ? {
15
+ sse?: never;
16
+ } : {
17
+ sse: { [K in HttpMethod]: SseFn };
18
+ });
19
+ interface Config {
20
+ /**
21
+ * Auth token or a function returning auth token. The resolved value will be
22
+ * added to the request payload as defined by its `security` array.
23
+ */
24
+ auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;
25
+ /**
26
+ * A function for serializing request body parameter. By default,
27
+ * {@link JSON.stringify()} will be used.
28
+ */
29
+ bodySerializer?: BodySerializer | null;
30
+ /**
31
+ * An object containing any HTTP headers that you want to pre-populate your
32
+ * `Headers` object with.
33
+ *
34
+ * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}
35
+ */
36
+ headers?: RequestInit['headers'] | Record<string, string | number | boolean | (string | number | boolean)[] | null | undefined | unknown>;
37
+ /**
38
+ * The request method.
39
+ *
40
+ * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}
41
+ */
42
+ method?: Uppercase<HttpMethod>;
43
+ /**
44
+ * A function for serializing request query parameters. By default, arrays
45
+ * will be exploded in form style, objects will be exploded in deepObject
46
+ * style, and reserved characters are percent-encoded.
47
+ *
48
+ * This method will have no effect if the native `paramsSerializer()` Axios
49
+ * API function is used.
50
+ *
51
+ * {@link https://swagger.io/docs/specification/serialization/#query View examples}
52
+ */
53
+ querySerializer?: QuerySerializer | QuerySerializerOptions;
54
+ /**
55
+ * A function validating request data. This is useful if you want to ensure
56
+ * the request conforms to the desired shape, so it can be safely sent to
57
+ * the server.
58
+ */
59
+ requestValidator?: (data: unknown) => Promise<unknown>;
60
+ /**
61
+ * A function transforming response data before it's returned. This is useful
62
+ * for post-processing data, e.g. converting ISO strings into Date objects.
63
+ */
64
+ responseTransformer?: (data: unknown) => Promise<unknown>;
65
+ /**
66
+ * A function validating response data. This is useful if you want to ensure
67
+ * the response conforms to the desired shape, so it can be safely passed to
68
+ * the transformers and returned to the user.
69
+ */
70
+ responseValidator?: (data: unknown) => Promise<unknown>;
71
+ }
72
+ type IsExactlyNeverOrNeverUndefined<T> = [T] extends [never] ? true : [T] extends [never | undefined] ? [undefined] extends [T] ? false : true : false;
73
+ type OmitNever<T extends Record<string, unknown>> = { [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K] };
74
+ declare type __ΩHttpMethod = any[];
75
+ declare type __ΩClient = any[];
76
+ declare type __ΩConfig = any[];
77
+ declare type __ΩOmitNever = any[];
78
+ //#endregion
79
+ export { Client, Config, HttpMethod, OmitNever, __ΩClient, __ΩConfig, __ΩHttpMethod, __ΩOmitNever };
80
+ //# sourceMappingURL=types.gen.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.gen.d.mts","names":[],"sources":["../../../src/api/core/types.gen.ts"],"sourcesContent":[],"mappings":";;;;KASY,UAAA;KAWA;EAXA;AAWZ;;EAWmB,QAAA,EADP,UACO;EACR,SAAA,EAAA,GAAA,GADQ,QACR;EACW,OAAA,EADX,SACW;EAAW,SAAA,EAAA,CAAA,MAAA,EAAX,QAAW,EAAA,GAAA,QAAA;CAEzB,GAAA,QAAA,UAAa,GAAA,QAAA,EACf,GAAA,CAAA,CAAA,KAAA,CAAA,SAAA,CAAA,KAAA,CAAA,GAAA;EAEe,GAAA,CAAA,EAAA,KAAA;CAAa,GAAA;EAAK,GAAA,EAAA,QAAlB,UAEE,GAFW,KAEX,EAKN;CAAiB,CAAA;AAAR,UALT,MAAA,CAKS;EAAqB;;;;EAczC,IAAA,CAAA,EAAA,CAAA,CAAA,IAAA,EAdW,IAcX,EAAA,GAdoB,OAcpB,CAd4B,SAc5B,CAAA,GAdyC,SAczC,CAAA,GAdsD,SActD;EAee;;;;EAiBmB,cAAA,CAAA,EAzCrB,cAyCqB,GAAA,IAAA;EAKG;;;AAO1C;;;EAK0B,OAAA,CAAA,EAlDrB,WAkDqB,CAAA,SAAA,CAAA,GAjDrB,MAiDqB,CAAA,MAAA,EAAA,MAAA,GAAA,MAAA,GAAA,OAAA,GAAA,CAAA,MAAA,GAAA,MAAA,GAAA,OAAA,CAAA,EAAA,GAAA,IAAA,GAAA,SAAA,GAAA,OAAA,CAAA;EAAC;AAK5B;;;;EACoD,MAAA,CAAA,EAxCzC,SAwCyC,CAxC/B,UAwC+B,CAAA;EAAjC;;;;;;;;;;oBA7BC,kBAAkB;;;;;;wCAME;;;;;2CAKG;;;;;;yCAMF;;KAGpC,qCAAqC,6BAErC,sDACsB;KAKf,oBAAoB,yCAClB,KAAK,+BAA+B,EAAE,2BAE9C,IAAI,EAAE"}
@@ -0,0 +1,34 @@
1
+ import { BodySerializer, QuerySerializer } from "./bodySerializer.gen.cjs";
2
+
3
+ //#region src/api/core/utils.gen.d.ts
4
+ interface PathSerializer {
5
+ path: Record<string, unknown>;
6
+ url: string;
7
+ }
8
+ declare const PATH_PARAM_RE: RegExp;
9
+ declare const defaultPathSerializer: ({
10
+ path,
11
+ url: _url
12
+ }: PathSerializer) => string;
13
+ declare const getUrl: ({
14
+ baseUrl,
15
+ path,
16
+ query,
17
+ querySerializer,
18
+ url: _url
19
+ }: {
20
+ baseUrl?: string;
21
+ path?: Record<string, unknown>;
22
+ query?: Record<string, unknown>;
23
+ querySerializer: QuerySerializer;
24
+ url: string;
25
+ }) => string;
26
+ declare function getValidRequestBody(options: {
27
+ body?: unknown;
28
+ bodySerializer?: BodySerializer | null;
29
+ serializedBody?: unknown;
30
+ }): unknown;
31
+ declare type __ΩPathSerializer = any[];
32
+ //#endregion
33
+ export { PATH_PARAM_RE, PathSerializer, __ΩPathSerializer, defaultPathSerializer, getUrl, getValidRequestBody };
34
+ //# sourceMappingURL=utils.gen.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.gen.d.cts","names":[],"sources":["../../../src/api/core/utils.gen.ts"],"sourcesContent":[],"mappings":";;;UAUiB,cAAA;QACT;EADS,GAAA,EAAA,MAAA;AAKjB;AAEa,cAFA,aAsEZ,EAtEyB,MAsEzB;AApEqC,cAAzB,qBAAyB,EAAA,CAAA;EAAA,IAAA;EAAA,GAAA,EAAA;AAAA,CAAA,EAAqB,cAArB,EAAA,GAAA,MAAA;AAAA,cAsEzB,MAtEyB,EAAA,CAAA;EAAA,OAAA;EAAA,IAAA;EAAA,KAAA;EAAA,eAAA;EAAA,GAAA,EAsEf;CAtEe,EAAA;EAAqB,OAAA,CAAA,EAAA,MAAA;EAAc,IAAA,CAAA,EA8EhE,MA9EgE,CAAA,MAAA,EAAA,OAAA,CAAA;EAsE5D,KAAA,CAAA,EASH,MAiBT,CAAA,MAAA,EAAA,OAAA,CAAA;EA1BsB,eAAA,EAUJ,eAVI;EAAA,GAAA,EAAA,MAAA;CAAA,EAAA,GAAA,MAAA;AAAA,iBA4BP,mBAAA,CA5BO,OAAA,EAAA;EAAA,IAAA,CAAA,EAAA,OAAA;EAQd,cAAA,CAAA,EAsBU,cAtBV,GAAA,IAAA;EACC,cAAA,CAAA,EAAA,OAAA;CACS,CAAA,EAAA,OAAA;AAAe,iCAAA,GAAA,EAAA"}
@@ -0,0 +1,34 @@
1
+ import { BodySerializer, QuerySerializer } from "./bodySerializer.gen.mjs";
2
+
3
+ //#region src/api/core/utils.gen.d.ts
4
+ interface PathSerializer {
5
+ path: Record<string, unknown>;
6
+ url: string;
7
+ }
8
+ declare const PATH_PARAM_RE: RegExp;
9
+ declare const defaultPathSerializer: ({
10
+ path,
11
+ url: _url
12
+ }: PathSerializer) => string;
13
+ declare const getUrl: ({
14
+ baseUrl,
15
+ path,
16
+ query,
17
+ querySerializer,
18
+ url: _url
19
+ }: {
20
+ baseUrl?: string;
21
+ path?: Record<string, unknown>;
22
+ query?: Record<string, unknown>;
23
+ querySerializer: QuerySerializer;
24
+ url: string;
25
+ }) => string;
26
+ declare function getValidRequestBody(options: {
27
+ body?: unknown;
28
+ bodySerializer?: BodySerializer | null;
29
+ serializedBody?: unknown;
30
+ }): unknown;
31
+ declare type __ΩPathSerializer = any[];
32
+ //#endregion
33
+ export { PATH_PARAM_RE, PathSerializer, __ΩPathSerializer, defaultPathSerializer, getUrl, getValidRequestBody };
34
+ //# sourceMappingURL=utils.gen.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.gen.d.mts","names":[],"sources":["../../../src/api/core/utils.gen.ts"],"sourcesContent":[],"mappings":";;;UAUiB,cAAA;QACT;EADS,GAAA,EAAA,MAAA;AAKjB;AAEa,cAFA,aAsEZ,EAtEyB,MAsEzB;AApEqC,cAAzB,qBAAyB,EAAA,CAAA;EAAA,IAAA;EAAA,GAAA,EAAA;AAAA,CAAA,EAAqB,cAArB,EAAA,GAAA,MAAA;AAAA,cAsEzB,MAtEyB,EAAA,CAAA;EAAA,OAAA;EAAA,IAAA;EAAA,KAAA;EAAA,eAAA;EAAA,GAAA,EAsEf;CAtEe,EAAA;EAAqB,OAAA,CAAA,EAAA,MAAA;EAAc,IAAA,CAAA,EA8EhE,MA9EgE,CAAA,MAAA,EAAA,OAAA,CAAA;EAsE5D,KAAA,CAAA,EASH,MAiBT,CAAA,MAAA,EAAA,OAAA,CAAA;EA1BsB,eAAA,EAUJ,eAVI;EAAA,GAAA,EAAA,MAAA;CAAA,EAAA,GAAA,MAAA;AAAA,iBA4BP,mBAAA,CA5BO,OAAA,EAAA;EAAA,IAAA,CAAA,EAAA,OAAA;EAQd,cAAA,CAAA,EAsBU,cAtBV,GAAA,IAAA;EACC,cAAA,CAAA,EAAA,OAAA;CACS,CAAA,EAAA,OAAA;AAAe,iCAAA,GAAA,EAAA"}
@@ -75,4 +75,5 @@ function getValidRequestBody(options) {
75
75
  }
76
76
 
77
77
  //#endregion
78
- export { PATH_PARAM_RE, defaultPathSerializer, getUrl, getValidRequestBody };
78
+ export { PATH_PARAM_RE, defaultPathSerializer, getUrl, getValidRequestBody };
79
+ //# sourceMappingURL=utils.gen.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.gen.mjs","names":["style: ArraySeparatorStyle"],"sources":["../../../src/api/core/utils.gen.ts"],"sourcesContent":["// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { BodySerializer, QuerySerializer } from './bodySerializer.gen';\nimport {\n type ArraySeparatorStyle,\n serializeArrayParam,\n serializeObjectParam,\n serializePrimitiveParam,\n} from './pathSerializer.gen';\n\nexport interface PathSerializer {\n path: Record<string, unknown>;\n url: string;\n}\n\nexport const PATH_PARAM_RE = /\\{[^{}]+\\}/g;\n\nexport const defaultPathSerializer = ({ path, url: _url }: PathSerializer) => {\n let url = _url;\n const matches = _url.match(PATH_PARAM_RE);\n if (matches) {\n for (const match of matches) {\n let explode = false;\n let name = match.substring(1, match.length - 1);\n let style: ArraySeparatorStyle = 'simple';\n\n if (name.endsWith('*')) {\n explode = true;\n name = name.substring(0, name.length - 1);\n }\n\n if (name.startsWith('.')) {\n name = name.substring(1);\n style = 'label';\n } else if (name.startsWith(';')) {\n name = name.substring(1);\n style = 'matrix';\n }\n\n const value = path[name];\n\n if (value === undefined || value === null) {\n continue;\n }\n\n if (Array.isArray(value)) {\n url = url.replace(\n match,\n serializeArrayParam({ explode, name, style, value }),\n );\n continue;\n }\n\n if (typeof value === 'object') {\n url = url.replace(\n match,\n serializeObjectParam({\n explode,\n name,\n style,\n value: value as Record<string, unknown>,\n valueOnly: true,\n }),\n );\n continue;\n }\n\n if (style === 'matrix') {\n url = url.replace(\n match,\n `;${serializePrimitiveParam({\n name,\n value: value as string,\n })}`,\n );\n continue;\n }\n\n const replaceValue = encodeURIComponent(\n style === 'label' ? `.${value as string}` : (value as string),\n );\n url = url.replace(match, replaceValue);\n }\n }\n return url;\n};\n\nexport const getUrl = ({\n baseUrl,\n path,\n query,\n querySerializer,\n url: _url,\n}: {\n baseUrl?: string;\n path?: Record<string, unknown>;\n query?: Record<string, unknown>;\n querySerializer: QuerySerializer;\n url: string;\n}) => {\n const pathUrl = _url.startsWith('/') ? _url : `/${_url}`;\n let url = (baseUrl ?? '') + pathUrl;\n if (path) {\n url = defaultPathSerializer({ path, url });\n }\n let search = query ? querySerializer(query) : '';\n if (search.startsWith('?')) {\n search = search.substring(1);\n }\n if (search) {\n url += `?${search}`;\n }\n return url;\n};\n\nexport function getValidRequestBody(options: {\n body?: unknown;\n bodySerializer?: BodySerializer | null;\n serializedBody?: unknown;\n}) {\n const hasBody = options.body !== undefined;\n const isSerializedBody = hasBody && options.bodySerializer;\n\n if (isSerializedBody) {\n if ('serializedBody' in options) {\n const hasSerializedBody =\n options.serializedBody !== undefined && options.serializedBody !== '';\n\n return hasSerializedBody ? options.serializedBody : null;\n }\n\n // not all clients implement a serializedBody property (i.e. client-axios)\n return options.body !== '' ? options.body : null;\n }\n\n // plain/text body\n if (hasBody) {\n return options.body;\n }\n\n // no body was provided\n return undefined;\n}\n"],"mappings":";;;AAeA,MAAa,gBAAgB;AAE7B,MAAa,yBAAyB,EAAE,MAAM,KAAK,WAA2B;CAC5E,IAAI,MAAM;CACV,MAAM,UAAU,KAAK,MAAM,cAAc;AACzC,KAAI,QACF,MAAK,MAAM,SAAS,SAAS;EAC3B,IAAI,UAAU;EACd,IAAI,OAAO,MAAM,UAAU,GAAG,MAAM,SAAS,EAAE;EAC/C,IAAIA,QAA6B;AAEjC,MAAI,KAAK,SAAS,IAAI,EAAE;AACtB,aAAU;AACV,UAAO,KAAK,UAAU,GAAG,KAAK,SAAS,EAAE;;AAG3C,MAAI,KAAK,WAAW,IAAI,EAAE;AACxB,UAAO,KAAK,UAAU,EAAE;AACxB,WAAQ;aACC,KAAK,WAAW,IAAI,EAAE;AAC/B,UAAO,KAAK,UAAU,EAAE;AACxB,WAAQ;;EAGV,MAAM,QAAQ,KAAK;AAEnB,MAAI,UAAU,UAAa,UAAU,KACnC;AAGF,MAAI,MAAM,QAAQ,MAAM,EAAE;AACxB,SAAM,IAAI,QACR,OACA,oBAAoB;IAAE;IAAS;IAAM;IAAO;IAAO,CAAC,CACrD;AACD;;AAGF,MAAI,OAAO,UAAU,UAAU;AAC7B,SAAM,IAAI,QACR,OACA,qBAAqB;IACnB;IACA;IACA;IACO;IACP,WAAW;IACZ,CAAC,CACH;AACD;;AAGF,MAAI,UAAU,UAAU;AACtB,SAAM,IAAI,QACR,OACA,IAAI,wBAAwB;IAC1B;IACO;IACR,CAAC,GACH;AACD;;EAGF,MAAM,eAAe,mBACnB,UAAU,UAAU,IAAI,UAAqB,MAC9C;AACD,QAAM,IAAI,QAAQ,OAAO,aAAa;;AAG1C,QAAO;;AAGT,MAAa,UAAU,EACrB,SACA,MACA,OACA,iBACA,KAAK,WAOD;CACJ,MAAM,UAAU,KAAK,WAAW,IAAI,GAAG,OAAO,IAAI;CAClD,IAAI,OAAO,WAAW,MAAM;AAC5B,KAAI,KACF,OAAM,sBAAsB;EAAE;EAAM;EAAK,CAAC;CAE5C,IAAI,SAAS,QAAQ,gBAAgB,MAAM,GAAG;AAC9C,KAAI,OAAO,WAAW,IAAI,CACxB,UAAS,OAAO,UAAU,EAAE;AAE9B,KAAI,OACF,QAAO,IAAI;AAEb,QAAO;;AAGT,SAAgB,oBAAoB,SAIjC;CACD,MAAM,UAAU,QAAQ,SAAS;AAGjC,KAFyB,WAAW,QAAQ,gBAEtB;AACpB,MAAI,oBAAoB,QAItB,QAFE,QAAQ,mBAAmB,UAAa,QAAQ,mBAAmB,KAE1C,QAAQ,iBAAiB;AAItD,SAAO,QAAQ,SAAS,KAAK,QAAQ,OAAO;;AAI9C,KAAI,QACF,QAAO,QAAQ"}
@@ -26,17 +26,80 @@ var PrismaClient = class PrismaClient extends HeyApiClient {
26
26
  PrismaClient.__registry.set(this, args?.key);
27
27
  }
28
28
  /**
29
- * Delete database connection string
29
+ * List connections
30
30
  *
31
- * Deletes the database connection string with the given ID.
31
+ * Returns all connections the actor has access to, with optional database filter.
32
32
  */
33
- deleteDatabaseConnectionString(options) {
33
+ listConnections(options) {
34
+ return (options?.client ?? this.client).get({
35
+ url: "/v1/connections",
36
+ ...options
37
+ });
38
+ }
39
+ /**
40
+ * Create connection
41
+ *
42
+ * Creates a new connection for the specified database.
43
+ */
44
+ createConnection(options) {
45
+ return (options?.client ?? this.client).post({
46
+ url: "/v1/connections",
47
+ ...options,
48
+ headers: {
49
+ "Content-Type": "application/json",
50
+ ...options?.headers
51
+ }
52
+ });
53
+ }
54
+ /**
55
+ * Delete connection
56
+ *
57
+ * Deletes the connection with the given ID.
58
+ */
59
+ deleteConnection(options) {
34
60
  return (options.client ?? this.client).delete({
35
61
  url: "/v1/connections/{id}",
36
62
  ...options
37
63
  });
38
64
  }
39
65
  /**
66
+ * Get connection
67
+ *
68
+ * Returns the connection with the given ID.
69
+ */
70
+ getConnection(options) {
71
+ return (options.client ?? this.client).get({
72
+ url: "/v1/connections/{id}",
73
+ ...options
74
+ });
75
+ }
76
+ /**
77
+ * List databases
78
+ *
79
+ * Returns all databases the token has access to. Optionally filter by project ID.
80
+ */
81
+ listDatabases(options) {
82
+ return (options?.client ?? this.client).get({
83
+ url: "/v1/databases",
84
+ ...options
85
+ });
86
+ }
87
+ /**
88
+ * Create database
89
+ *
90
+ * Creates a new database in the specified project.
91
+ */
92
+ createDatabase(options) {
93
+ return (options?.client ?? this.client).post({
94
+ url: "/v1/databases",
95
+ ...options,
96
+ headers: {
97
+ "Content-Type": "application/json",
98
+ ...options?.headers
99
+ }
100
+ });
101
+ }
102
+ /**
40
103
  * Delete database
41
104
  *
42
105
  * Deletes the database with the given ID.
@@ -59,6 +122,21 @@ var PrismaClient = class PrismaClient extends HeyApiClient {
59
122
  });
60
123
  }
61
124
  /**
125
+ * Update database
126
+ *
127
+ * Updates the database with the given ID.
128
+ */
129
+ updateDatabase(options) {
130
+ return (options.client ?? this.client).patch({
131
+ url: "/v1/databases/{databaseId}",
132
+ ...options,
133
+ headers: {
134
+ "Content-Type": "application/json",
135
+ ...options.headers
136
+ }
137
+ });
138
+ }
139
+ /**
62
140
  * Get list of database connections
63
141
  *
64
142
  * Returns all connections for the given database.
@@ -155,6 +233,21 @@ var PrismaClient = class PrismaClient extends HeyApiClient {
155
233
  });
156
234
  }
157
235
  /**
236
+ * Update project
237
+ *
238
+ * Updates the project with the given ID.
239
+ */
240
+ updateProject(options) {
241
+ return (options.client ?? this.client).patch({
242
+ url: "/v1/projects/{id}",
243
+ ...options,
244
+ headers: {
245
+ "Content-Type": "application/json",
246
+ ...options.headers
247
+ }
248
+ });
249
+ }
250
+ /**
158
251
  * Transfer project
159
252
  *
160
253
  * Transfer the project with the given ID to the new owner's workspace
@@ -174,7 +267,7 @@ var PrismaClient = class PrismaClient extends HeyApiClient {
174
267
  *
175
268
  * Returns databases for the given project.
176
269
  */
177
- listDatabases(options) {
270
+ listDatabases2(options) {
178
271
  return (options.client ?? this.client).get({
179
272
  url: "/v1/projects/{projectId}/databases",
180
273
  ...options
@@ -185,7 +278,7 @@ var PrismaClient = class PrismaClient extends HeyApiClient {
185
278
  *
186
279
  * Creates a new database for the given project.
187
280
  */
188
- createDatabase(options) {
281
+ createDatabase2(options) {
189
282
  return (options.client ?? this.client).post({
190
283
  url: "/v1/projects/{projectId}/databases",
191
284
  ...options,
@@ -198,9 +291,42 @@ var PrismaClient = class PrismaClient extends HeyApiClient {
198
291
  /**
199
292
  * Get list of integrations
200
293
  *
201
- * Returns integrations for the given workspace.
294
+ * Returns integrations filtered by workspace ID.
202
295
  */
203
296
  listIntegrations(options) {
297
+ return (options.client ?? this.client).get({
298
+ url: "/v1/integrations",
299
+ ...options
300
+ });
301
+ }
302
+ /**
303
+ * Delete integration
304
+ *
305
+ * Revokes the integration tokens by integration ID.
306
+ */
307
+ deleteIntegration(options) {
308
+ return (options.client ?? this.client).delete({
309
+ url: "/v1/integrations/{id}",
310
+ ...options
311
+ });
312
+ }
313
+ /**
314
+ * Get integration by ID
315
+ *
316
+ * Returns a single integration by its ID.
317
+ */
318
+ getIntegrationById(options) {
319
+ return (options.client ?? this.client).get({
320
+ url: "/v1/integrations/{id}",
321
+ ...options
322
+ });
323
+ }
324
+ /**
325
+ * Get list of integrations
326
+ *
327
+ * Returns integrations for the given workspace.
328
+ */
329
+ listIntegrations2(options) {
204
330
  return (options.client ?? this.client).get({
205
331
  url: "/v1/workspaces/{workspaceId}/integrations",
206
332
  ...options
@@ -218,6 +344,17 @@ var PrismaClient = class PrismaClient extends HeyApiClient {
218
344
  });
219
345
  }
220
346
  /**
347
+ * Get all regions
348
+ *
349
+ * Returns all available regions across products. Optionally filter by product.
350
+ */
351
+ getAllRegions(options) {
352
+ return (options?.client ?? this.client).get({
353
+ url: "/v1/regions",
354
+ ...options
355
+ });
356
+ }
357
+ /**
221
358
  * Get Prisma Postgres regions
222
359
  *
223
360
  * Returns all available regions for Prisma Postgres.
@@ -250,6 +387,17 @@ var PrismaClient = class PrismaClient extends HeyApiClient {
250
387
  ...options
251
388
  });
252
389
  }
390
+ /**
391
+ * Get workspace
392
+ *
393
+ * Returns the workspace with the given ID.
394
+ */
395
+ getWorkspace(options) {
396
+ return (options.client ?? this.client).get({
397
+ url: "/v1/workspaces/{id}",
398
+ ...options
399
+ });
400
+ }
253
401
  };
254
402
 
255
403
  //#endregion