@osaas/client-services 0.6.2 → 0.8.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.
@@ -282,7 +282,7 @@ import { Context } from '@osaas/client-core';
282
282
  * @description Unlock seamless data management with Apache CouchDB! Effortlessly scalable and highly available, CouchDB makes storing, retrieving, and syncing data across devices a breeze. Ideal for modern cloud apps!
283
283
  * @author Eyevinn Technology AB <osc@eyevinn.se>
284
284
  * @copyright 2025 Eyevinn Technology AB
285
- *
285
+ * @see {@link https://docs.osaas.io/osaas.wiki/Service:-CouchDB.html|Online docs} for further information
286
286
  */
287
287
  /**
288
288
  * @typedef {Object} ApacheCouchdbConfig
@@ -11,7 +11,7 @@ const client_core_1 = require("@osaas/client-core");
11
11
  * @description Unlock seamless data management with Apache CouchDB! Effortlessly scalable and highly available, CouchDB makes storing, retrieving, and syncing data across devices a breeze. Ideal for modern cloud apps!
12
12
  * @author Eyevinn Technology AB <osc@eyevinn.se>
13
13
  * @copyright 2025 Eyevinn Technology AB
14
- *
14
+ * @see {@link https://docs.osaas.io/osaas.wiki/Service:-CouchDB.html|Online docs} for further information
15
15
  */
16
16
  /**
17
17
  * @typedef {Object} ApacheCouchdbConfig
@@ -0,0 +1,345 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+ export interface paths {
6
+ '/': {
7
+ /** Say hello */
8
+ get: {
9
+ responses: {
10
+ /** The magical words! */
11
+ 200: {
12
+ schema: string;
13
+ };
14
+ };
15
+ };
16
+ };
17
+ '/clickhouseinstance': {
18
+ /** List all running clickhouse instances */
19
+ get: {
20
+ responses: {
21
+ /** Default Response */
22
+ 200: {
23
+ schema: {
24
+ /** @description Name of the clickhouse instance */
25
+ name: string;
26
+ /** @description URL to instance API */
27
+ url: string;
28
+ resources: {
29
+ license: {
30
+ /** @description URL to license information */
31
+ url: string;
32
+ };
33
+ apiDocs?: {
34
+ /** @description URL to instance API documentation */
35
+ url: string;
36
+ };
37
+ app?: {
38
+ /** @description URL to instance application (GUI) */
39
+ url: string;
40
+ };
41
+ };
42
+ Db?: string;
43
+ User?: string;
44
+ Password?: string;
45
+ }[];
46
+ };
47
+ /** Default Response */
48
+ 500: {
49
+ schema: {
50
+ /** @description Reason why something failed */
51
+ reason: string;
52
+ };
53
+ };
54
+ };
55
+ };
56
+ /** Launch a new clickhouse instance */
57
+ post: {
58
+ parameters: {
59
+ body: {
60
+ body?: {
61
+ /** @description Name of the clickhouse instance */
62
+ name: string;
63
+ Db?: string;
64
+ User?: string;
65
+ Password?: string;
66
+ };
67
+ };
68
+ };
69
+ responses: {
70
+ /** Default Response */
71
+ 200: {
72
+ schema: {
73
+ /** @description Name of the clickhouse instance */
74
+ name: string;
75
+ /** @description URL to instance API */
76
+ url: string;
77
+ resources: {
78
+ license: {
79
+ /** @description URL to license information */
80
+ url: string;
81
+ };
82
+ apiDocs?: {
83
+ /** @description URL to instance API documentation */
84
+ url: string;
85
+ };
86
+ app?: {
87
+ /** @description URL to instance application (GUI) */
88
+ url: string;
89
+ };
90
+ };
91
+ Db?: string;
92
+ User?: string;
93
+ Password?: string;
94
+ };
95
+ };
96
+ /** Default Response */
97
+ 403: {
98
+ schema: {
99
+ /** @description Reason why something failed */
100
+ reason: string;
101
+ };
102
+ };
103
+ /** Default Response */
104
+ 409: {
105
+ schema: {
106
+ /** @description Reason why something failed */
107
+ reason: string;
108
+ };
109
+ };
110
+ /** Default Response */
111
+ 500: {
112
+ schema: {
113
+ /** @description Reason why something failed */
114
+ reason: string;
115
+ };
116
+ };
117
+ };
118
+ };
119
+ };
120
+ '/clickhouseinstance/{id}': {
121
+ /** Obtain status and resource URLs for an clickhouse instance */
122
+ get: {
123
+ parameters: {
124
+ path: {
125
+ /** Name of the clickhouse instance */
126
+ id: string;
127
+ };
128
+ };
129
+ responses: {
130
+ /** Default Response */
131
+ 200: {
132
+ schema: {
133
+ /** @description Name of the clickhouse instance */
134
+ name: string;
135
+ /** @description URL to instance API */
136
+ url: string;
137
+ resources: {
138
+ license: {
139
+ /** @description URL to license information */
140
+ url: string;
141
+ };
142
+ apiDocs?: {
143
+ /** @description URL to instance API documentation */
144
+ url: string;
145
+ };
146
+ app?: {
147
+ /** @description URL to instance application (GUI) */
148
+ url: string;
149
+ };
150
+ };
151
+ Db?: string;
152
+ User?: string;
153
+ Password?: string;
154
+ };
155
+ };
156
+ /** Default Response */
157
+ 404: {
158
+ schema: {
159
+ /** @description Reason why something failed */
160
+ reason: string;
161
+ };
162
+ };
163
+ /** Default Response */
164
+ 500: {
165
+ schema: {
166
+ /** @description Reason why something failed */
167
+ reason: string;
168
+ };
169
+ };
170
+ };
171
+ };
172
+ /** Stop and remove an clickhouse instance */
173
+ delete: {
174
+ parameters: {
175
+ path: {
176
+ /** Name of the clickhouse instance */
177
+ id: string;
178
+ };
179
+ };
180
+ responses: {
181
+ /** Default Response */
182
+ 204: {
183
+ schema: string;
184
+ };
185
+ /** Default Response */
186
+ 500: {
187
+ schema: {
188
+ /** @description Reason why something failed */
189
+ reason: string;
190
+ };
191
+ };
192
+ };
193
+ };
194
+ };
195
+ '/health/{id}': {
196
+ /** Return status of clickhouse instance */
197
+ get: {
198
+ parameters: {
199
+ path: {
200
+ /** Name of the clickhouse instance */
201
+ id: string;
202
+ };
203
+ };
204
+ responses: {
205
+ /** Default Response */
206
+ 200: {
207
+ schema: {
208
+ /** @enum {string} */
209
+ status: 'starting' | 'running' | 'stopped' | 'failed' | 'unknown';
210
+ };
211
+ };
212
+ /** Default Response */
213
+ 500: {
214
+ schema: {
215
+ /** @description Reason why something failed */
216
+ reason: string;
217
+ };
218
+ };
219
+ };
220
+ };
221
+ };
222
+ '/logs/{id}': {
223
+ /** Return the latest logs from the clickhouse instance */
224
+ get: {
225
+ parameters: {
226
+ query: {
227
+ timestamps?: boolean;
228
+ sinceSeconds?: number;
229
+ };
230
+ path: {
231
+ /** Name of the clickhouse instance */
232
+ id: string;
233
+ };
234
+ };
235
+ responses: {
236
+ /** Default Response */
237
+ 200: {
238
+ schema: string;
239
+ };
240
+ /** Default Response */
241
+ 500: {
242
+ schema: {
243
+ /** @description Reason why something failed */
244
+ reason: string;
245
+ };
246
+ };
247
+ };
248
+ };
249
+ };
250
+ '/ports/{id}': {
251
+ /** Return the exposed extra ports for clickhouse instance */
252
+ get: {
253
+ parameters: {
254
+ path: {
255
+ /** Name of the clickhouse instance */
256
+ id: string;
257
+ };
258
+ };
259
+ responses: {
260
+ /** Default Response */
261
+ 200: {
262
+ schema: {
263
+ externalIp: string;
264
+ externalPort: number;
265
+ internalPort: number;
266
+ }[];
267
+ };
268
+ /** Default Response */
269
+ 500: {
270
+ schema: {
271
+ /** @description Reason why something failed */
272
+ reason: string;
273
+ };
274
+ };
275
+ };
276
+ };
277
+ };
278
+ }
279
+ export interface definitions {
280
+ }
281
+ export interface operations {
282
+ }
283
+ export interface external {
284
+ }
285
+ export type ClickhouseClickhouse = paths['/clickhouseinstance/{id}']['get']['responses']['200']['schema'];
286
+ export type ClickhouseClickhouseConfig = paths['/clickhouseinstance']['post']['parameters']['body']['body'];
287
+ import { Context } from '@osaas/client-core';
288
+ /**
289
+ * @namespace clickhouse-clickhouse
290
+ * @description Unlock real-time data insights effortlessly with ClickHouse, the lightning-fast, open-source columnar database. Elevate your analytics and make data-driven decisions with speed and precision like never before!
291
+ * @author Eyevinn Technology AB <osc@eyevinn.se>
292
+ * @copyright 2025 Eyevinn Technology AB
293
+ * @see {@link https://docs.osaas.io/osaas.wiki/Service:-ClickHouse.html|Online docs} for further information
294
+ */
295
+ /**
296
+ * @typedef {Object} ClickhouseClickhouseConfig
297
+ * @property {string} name - Name of clickhouse
298
+ * @property {string} [Db] - Db
299
+ * @property {string} [User] - User
300
+ * @property {string} [Password] - Password
301
+
302
+ *
303
+ */
304
+ /**
305
+ * @typedef {Object} ClickhouseClickhouse
306
+ * @property {string} name - Name of the ClickHouse Server instance
307
+ * @property {string} url - URL of the ClickHouse Server instance
308
+ *
309
+ */
310
+ /**
311
+ * Create a new ClickHouse Server instance
312
+ *
313
+ * @memberOf clickhouse-clickhouse
314
+ * @async
315
+ * @param {Context} context - Open Source Cloud configuration context
316
+ * @param {ClickhouseClickhouseConfig} body - Service instance configuration
317
+ * @returns {ClickhouseClickhouse} - Service instance
318
+ * @example
319
+ * import { Context, createClickhouseClickhouseInstance } from '@osaas/client-services';
320
+ *
321
+ * const ctx = new Context();
322
+ * const instance = await createClickhouseClickhouseInstance(ctx, { name: 'myinstance' });
323
+ * console.log(instance.url);
324
+ */
325
+ export declare function createClickhouseClickhouseInstance(ctx: Context, body: ClickhouseClickhouseConfig): Promise<ClickhouseClickhouse>;
326
+ /**
327
+ * Remove a ClickHouse Server instance
328
+ *
329
+ * @memberOf clickhouse-clickhouse
330
+ * @async
331
+ * @param {Context} context - Open Source Cloud configuration context
332
+ * @param {string} name - Name of the clickhouse-server to be removed
333
+ */
334
+ export declare function removeClickhouseClickhouseInstance(ctx: Context, name: string): Promise<void>;
335
+ /**
336
+ * Get a ClickHouse Server instance
337
+ *
338
+ * @memberOf clickhouse-clickhouse
339
+ * @async
340
+ * @param {Context} context - Open Source Cloud configuration context
341
+ * @param {string} name - Name of the clickhouse-server to be retrieved
342
+ * @returns {ClickhouseClickhouse} - Service instance
343
+ */
344
+ export declare function getClickhouseClickhouseInstance(ctx: Context, name: string): Promise<ClickhouseClickhouse>;
345
+ //# sourceMappingURL=clickhouse-clickhouse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clickhouse-clickhouse.d.ts","sourceRoot":"","sources":["../../src/generated/clickhouse-clickhouse.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,KAAK;IACpB,GAAG,EAAE;QACH,gBAAgB;QAChB,GAAG,EAAE;YACH,SAAS,EAAE;gBACT,yBAAyB;gBACzB,GAAG,EAAE;oBACH,MAAM,EAAE,MAAM,CAAC;iBAChB,CAAC;aACH,CAAC;SACH,CAAC;KACH,CAAC;I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AAC;CACH;AAED,MAAM,WAAW,WAAW;CAAG;AAE/B,MAAM,WAAW,UAAU;CAAG;AAE9B,MAAM,WAAW,QAAQ;CAAG;AAE5B,MAAM,MAAM,oBAAoB,GAC9B,KAAK,CAAC,0BAA0B,CAAC,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAC;AAEzE,MAAM,MAAM,0BAA0B,GACpC,KAAK,CAAC,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AACrE,OAAO,EACL,OAAO,EAKR,MAAM,oBAAoB,CAAC;AAC5B;;;;;;GAMG;AAEH;;;;;;;;GAQG;AAEH;;;;;GAKG;AAEH;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,kCAAkC,CACtD,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,0BAA0B,GAC/B,OAAO,CAAC,oBAAoB,CAAC,CAY/B;AAED;;;;;;;GAOG;AACH,wBAAsB,kCAAkC,CACtD,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,IAAI,CAAC,CAKf;AAED;;;;;;;;GAQG;AACH,wBAAsB,+BAA+B,CACnD,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,oBAAoB,CAAC,CAU/B"}
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by openapi-typescript.
4
+ * Do not make direct changes to the file.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.getClickhouseClickhouseInstance = exports.removeClickhouseClickhouseInstance = exports.createClickhouseClickhouseInstance = void 0;
8
+ const client_core_1 = require("@osaas/client-core");
9
+ /**
10
+ * @namespace clickhouse-clickhouse
11
+ * @description Unlock real-time data insights effortlessly with ClickHouse, the lightning-fast, open-source columnar database. Elevate your analytics and make data-driven decisions with speed and precision like never before!
12
+ * @author Eyevinn Technology AB <osc@eyevinn.se>
13
+ * @copyright 2025 Eyevinn Technology AB
14
+ * @see {@link https://docs.osaas.io/osaas.wiki/Service:-ClickHouse.html|Online docs} for further information
15
+ */
16
+ /**
17
+ * @typedef {Object} ClickhouseClickhouseConfig
18
+ * @property {string} name - Name of clickhouse
19
+ * @property {string} [Db] - Db
20
+ * @property {string} [User] - User
21
+ * @property {string} [Password] - Password
22
+
23
+ *
24
+ */
25
+ /**
26
+ * @typedef {Object} ClickhouseClickhouse
27
+ * @property {string} name - Name of the ClickHouse Server instance
28
+ * @property {string} url - URL of the ClickHouse Server instance
29
+ *
30
+ */
31
+ /**
32
+ * Create a new ClickHouse Server instance
33
+ *
34
+ * @memberOf clickhouse-clickhouse
35
+ * @async
36
+ * @param {Context} context - Open Source Cloud configuration context
37
+ * @param {ClickhouseClickhouseConfig} body - Service instance configuration
38
+ * @returns {ClickhouseClickhouse} - Service instance
39
+ * @example
40
+ * import { Context, createClickhouseClickhouseInstance } from '@osaas/client-services';
41
+ *
42
+ * const ctx = new Context();
43
+ * const instance = await createClickhouseClickhouseInstance(ctx, { name: 'myinstance' });
44
+ * console.log(instance.url);
45
+ */
46
+ async function createClickhouseClickhouseInstance(ctx, body) {
47
+ const serviceAccessToken = await ctx.getServiceAccessToken('clickhouse-clickhouse');
48
+ const instance = await (0, client_core_1.createInstance)(ctx, 'clickhouse-clickhouse', serviceAccessToken, body);
49
+ await (0, client_core_1.waitForInstanceReady)('clickhouse-clickhouse', instance.name, ctx);
50
+ return instance;
51
+ }
52
+ exports.createClickhouseClickhouseInstance = createClickhouseClickhouseInstance;
53
+ /**
54
+ * Remove a ClickHouse Server instance
55
+ *
56
+ * @memberOf clickhouse-clickhouse
57
+ * @async
58
+ * @param {Context} context - Open Source Cloud configuration context
59
+ * @param {string} name - Name of the clickhouse-server to be removed
60
+ */
61
+ async function removeClickhouseClickhouseInstance(ctx, name) {
62
+ const serviceAccessToken = await ctx.getServiceAccessToken('clickhouse-clickhouse');
63
+ await (0, client_core_1.removeInstance)(ctx, 'clickhouse-clickhouse', name, serviceAccessToken);
64
+ }
65
+ exports.removeClickhouseClickhouseInstance = removeClickhouseClickhouseInstance;
66
+ /**
67
+ * Get a ClickHouse Server instance
68
+ *
69
+ * @memberOf clickhouse-clickhouse
70
+ * @async
71
+ * @param {Context} context - Open Source Cloud configuration context
72
+ * @param {string} name - Name of the clickhouse-server to be retrieved
73
+ * @returns {ClickhouseClickhouse} - Service instance
74
+ */
75
+ async function getClickhouseClickhouseInstance(ctx, name) {
76
+ const serviceAccessToken = await ctx.getServiceAccessToken('clickhouse-clickhouse');
77
+ return await (0, client_core_1.getInstance)(ctx, 'clickhouse-clickhouse', name, serviceAccessToken);
78
+ }
79
+ exports.getClickhouseClickhouseInstance = getClickhouseClickhouseInstance;
80
+ //# sourceMappingURL=clickhouse-clickhouse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clickhouse-clickhouse.js","sourceRoot":"","sources":["../../src/generated/clickhouse-clickhouse.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAgSH,oDAM4B;AAC5B;;;;;;GAMG;AAEH;;;;;;;;GAQG;AAEH;;;;;GAKG;AAEH;;;;;;;;;;;;;;GAcG;AACI,KAAK,UAAU,kCAAkC,CACtD,GAAY,EACZ,IAAgC;IAEhC,MAAM,kBAAkB,GAAG,MAAM,GAAG,CAAC,qBAAqB,CACxD,uBAAuB,CACxB,CAAC;IACF,MAAM,QAAQ,GAAG,MAAM,IAAA,4BAAc,EACnC,GAAG,EACH,uBAAuB,EACvB,kBAAkB,EAClB,IAAI,CACL,CAAC;IACF,MAAM,IAAA,kCAAoB,EAAC,uBAAuB,EAAE,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACxE,OAAO,QAAQ,CAAC;AAClB,CAAC;AAfD,gFAeC;AAED;;;;;;;GAOG;AACI,KAAK,UAAU,kCAAkC,CACtD,GAAY,EACZ,IAAY;IAEZ,MAAM,kBAAkB,GAAG,MAAM,GAAG,CAAC,qBAAqB,CACxD,uBAAuB,CACxB,CAAC;IACF,MAAM,IAAA,4BAAc,EAAC,GAAG,EAAE,uBAAuB,EAAE,IAAI,EAAE,kBAAkB,CAAC,CAAC;AAC/E,CAAC;AARD,gFAQC;AAED;;;;;;;;GAQG;AACI,KAAK,UAAU,+BAA+B,CACnD,GAAY,EACZ,IAAY;IAEZ,MAAM,kBAAkB,GAAG,MAAM,GAAG,CAAC,qBAAqB,CACxD,uBAAuB,CACxB,CAAC;IACF,OAAO,MAAM,IAAA,yBAAW,EACtB,GAAG,EACH,uBAAuB,EACvB,IAAI,EACJ,kBAAkB,CACnB,CAAC;AACJ,CAAC;AAbD,0EAaC"}