@superblocksteam/sabs-client 0.0.1-demo-databricks-deploy

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.
package/dist/sabs.js ADDED
@@ -0,0 +1,372 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.SabsClient = void 0;
7
+ const sabs_types_1 = require("@superblocksteam/sabs-types");
8
+ const axios_1 = __importDefault(require("axios"));
9
+ const errors_1 = require("./errors");
10
+ /**
11
+ * SABS (Superblocks Application Build System) TypeScript Client
12
+ *
13
+ * Provides methods to interact with the SABS API for building and managing applications.
14
+ *
15
+ * All error types inherit from the standard `HttpError` class that extends the standard `Error` class,
16
+ * ensuring backward compatibility with existing error handling code that catches generic `Error` instances
17
+ * used in earlier versions of the client library.
18
+ */
19
+ class SabsClient {
20
+ baseUrl;
21
+ constructor(baseUrl) {
22
+ this.baseUrl = baseUrl;
23
+ }
24
+ /**
25
+ * Start a new build for an application
26
+ *
27
+ * @param params - Build parameters
28
+ * @param params.directoryHash - Hash of the application directory to build
29
+ * @param params.meta - Application metadata (ID and organization ID)
30
+ * @param params.buildKey - Secret build key for authentication
31
+ * @param params.accessToken - JWT access token for authorization
32
+ * @returns Promise resolving to build information including build ID
33
+ * @throws BadRequestError if the directory hash, application metadata, application ID, organization ID, build key, or access token are empty or invalid
34
+ * @throws ForbiddenError if the access token is invalid or missing the required scopes
35
+ * @throws InternalServerError if the service has an unexpected error while performing this request
36
+ * @throws HttpError if the request fails for an unknown reason
37
+ */
38
+ async build({ directoryHash, meta, buildKey, accessToken }) {
39
+ if (!directoryHash || directoryHash.length === 0) {
40
+ throw (0, errors_1.createClientError)('Directory hash is required');
41
+ }
42
+ if (!meta) {
43
+ throw (0, errors_1.createClientError)('Application metadata is required');
44
+ }
45
+ if (!meta.id || meta.id.length === 0) {
46
+ throw (0, errors_1.createClientError)('Application ID is required');
47
+ }
48
+ if (!meta.organizationId || meta.organizationId.length === 0) {
49
+ throw (0, errors_1.createClientError)('Organization ID is required');
50
+ }
51
+ if (!buildKey || buildKey.length === 0) {
52
+ throw (0, errors_1.createClientError)('Build key is required');
53
+ }
54
+ if (!accessToken || accessToken.length === 0) {
55
+ throw (0, errors_1.createClientError)('Access token is required');
56
+ }
57
+ const data = new sabs_types_1.BuildRequest({
58
+ directoryHash: directoryHash,
59
+ applicationMetadata: meta,
60
+ buildKey
61
+ });
62
+ return this.executeRequest({
63
+ method: 'POST',
64
+ url: `${this.baseUrl}/v1/builds`,
65
+ data
66
+ }, accessToken);
67
+ }
68
+ /**
69
+ * Start a new Databricks build for an application and deploy it to Databricks
70
+ *
71
+ * @param params - Build parameters
72
+ * @param params.directoryHash - Hash of the application directory to build
73
+ * @param params.meta - Application metadata (ID and organization ID)
74
+ * @param params.buildKey - Secret build key for authentication
75
+ * @param params.accessToken - JWT access token for authorization
76
+ * @returns Promise resolving to build information including build ID
77
+ * @throws BadRequestError if the directory hash, application metadata, application ID, organization ID, build key, or access token are empty or invalid
78
+ * @throws ForbiddenError if the access token is invalid or missing the required scopes
79
+ * @throws InternalServerError if the service has an unexpected error while performing this request
80
+ * @throws HttpError if the request fails for an unknown reason
81
+ */
82
+ async deployDatabricks({ directoryHash, meta, buildKey, accessToken }) {
83
+ if (!directoryHash || directoryHash.length === 0) {
84
+ throw (0, errors_1.createClientError)('Directory hash is required');
85
+ }
86
+ if (!meta) {
87
+ throw (0, errors_1.createClientError)('Application metadata is required');
88
+ }
89
+ if (!meta.id || meta.id.length === 0) {
90
+ throw (0, errors_1.createClientError)('Application ID is required');
91
+ }
92
+ if (!meta.organizationId || meta.organizationId.length === 0) {
93
+ throw (0, errors_1.createClientError)('Organization ID is required');
94
+ }
95
+ if (!buildKey || buildKey.length === 0) {
96
+ throw (0, errors_1.createClientError)('Build key is required');
97
+ }
98
+ if (!accessToken || accessToken.length === 0) {
99
+ throw (0, errors_1.createClientError)('Access token is required');
100
+ }
101
+ const data = new sabs_types_1.DeployDatabricksRequest({
102
+ directoryHash: directoryHash,
103
+ applicationMetadata: meta,
104
+ buildKey
105
+ });
106
+ return this.executeRequest({
107
+ method: 'POST',
108
+ url: `${this.baseUrl}/v1/builds/deploy-databricks`,
109
+ data
110
+ }, accessToken);
111
+ }
112
+ /**
113
+ * Get the status of a build
114
+ *
115
+ * @param params - Status query parameters
116
+ * @param params.buildId - ID of the build to check
117
+ * @param params.accessToken - JWT access token for authorization
118
+ * @returns Promise resolving to build status information
119
+ * @throws BadRequestError if the build ID or access token is empty or invalid
120
+ * @throws UnauthorizedError if the access token is invalid or missing the required scopes
121
+ * @throws NotFoundError if the build ID is invalid
122
+ * @throws InternalServerError if the service has an unexpected error while performing this request
123
+ * @throws HttpError if the request fails for an unknown reason
124
+ */
125
+ async status({ buildId, accessToken }) {
126
+ if (!buildId || buildId.length === 0) {
127
+ throw (0, errors_1.createClientError)('Build ID is required');
128
+ }
129
+ if (!accessToken || accessToken.length === 0) {
130
+ throw (0, errors_1.createClientError)('Access token is required');
131
+ }
132
+ return this.executeRequest({
133
+ method: 'GET',
134
+ url: `${this.baseUrl}/v1/builds/${buildId}`
135
+ }, accessToken);
136
+ }
137
+ /**
138
+ * Get the status of multiple builds at once
139
+ *
140
+ * @param params - Bulk status query parameters
141
+ * @param params.organizationId - Organization ID
142
+ * @param params.applicationId - Application ID
143
+ * @param params.directoryHashes - Array of directory hashes to check
144
+ * @param params.accessToken - JWT access token for authorization
145
+ * @returns Promise resolving to multiple build status information
146
+ * @throws BadRequestError if the organization ID, application ID, directory hashes, or access token are empty or invalid
147
+ * @throws UnauthorizedError if the access token is invalid or missing the required scopes
148
+ * @throws NotFoundError if the organization ID or application ID is invalid
149
+ * @throws InternalServerError if the service has an unexpected error while performing this request
150
+ * @throws HttpError if the request fails for an unknown reason
151
+ */
152
+ async bulkStatus({ organizationId, applicationId, directoryHashes, accessToken }) {
153
+ if (!organizationId || organizationId.length === 0) {
154
+ throw (0, errors_1.createClientError)('Organization ID is required');
155
+ }
156
+ if (!applicationId || applicationId.length === 0) {
157
+ throw (0, errors_1.createClientError)('Application ID is required');
158
+ }
159
+ if (!directoryHashes || directoryHashes.length === 0) {
160
+ throw (0, errors_1.createClientError)('Directory hashes are required');
161
+ }
162
+ if (!accessToken || accessToken.length === 0) {
163
+ throw (0, errors_1.createClientError)('Access token is required');
164
+ }
165
+ const data = new sabs_types_1.BulkStatusRequest({
166
+ organizationId,
167
+ applicationId,
168
+ directoryHashes
169
+ });
170
+ return this.executeRequest({
171
+ method: 'POST',
172
+ url: `${this.baseUrl}/v1/builds/${organizationId}/${applicationId}/bulk-status`,
173
+ data
174
+ }, accessToken);
175
+ }
176
+ /**
177
+ * List all builds for a specific application and directory
178
+ *
179
+ * @param params - List query parameters
180
+ * @param params.organizationId - Organization ID
181
+ * @param params.applicationId - Application ID
182
+ * @param params.directoryHash - Hash of the application directory
183
+ * @param params.accessToken - JWT access token for authorization
184
+ * @returns Promise resolving to list of builds
185
+ * @throws BadRequestError if the organization ID, application ID, directory hash, or access token are empty or invalid
186
+ * @throws UnauthorizedError if the access token is invalid or missing the required scopes
187
+ * @throws NotFoundError if the organization ID or application ID is invalid
188
+ * @throws InternalServerError if the service has an unexpected error while performing this request
189
+ * @throws HttpError if the request fails for an unknown reason
190
+ */
191
+ async list({ organizationId, applicationId, directoryHash, accessToken }) {
192
+ if (!organizationId || organizationId.length === 0) {
193
+ throw (0, errors_1.createClientError)('Organization ID is required');
194
+ }
195
+ if (!applicationId || applicationId.length === 0) {
196
+ throw (0, errors_1.createClientError)('Application ID is required');
197
+ }
198
+ if (!directoryHash || directoryHash.length === 0) {
199
+ throw (0, errors_1.createClientError)('Directory hash is required');
200
+ }
201
+ if (!accessToken || accessToken.length === 0) {
202
+ throw (0, errors_1.createClientError)('Access token is required');
203
+ }
204
+ const data = new sabs_types_1.ListRequest({
205
+ organizationId,
206
+ applicationId,
207
+ directoryHash
208
+ });
209
+ return this.executeRequest({
210
+ method: 'GET',
211
+ url: `${this.baseUrl}/v1/build`,
212
+ params: data
213
+ }, accessToken);
214
+ }
215
+ /**
216
+ * Terminate a running build with a final status
217
+ *
218
+ * @param params - Termination parameters
219
+ * @param params.buildId - ID of the build to terminate
220
+ * @param params.status - Final status of the build
221
+ * @param params.buildKey - Secret build key for authentication
222
+ * @param params.error - Optional error message if build failed
223
+ * @param params.accessToken - JWT access token for authorization
224
+ * @returns Promise resolving to termination confirmation
225
+ * @throws BadRequestError if the build ID, build status, build key, or access token are empty or invalid
226
+ * @throws UnauthorizedError if the access token is invalid or missing the required scopes
227
+ * @throws NotFoundError if the build ID is invalid
228
+ * @throws InternalServerError if the service has an unexpected error while performing this request
229
+ * @throws HttpError if the request fails for an unknown reason
230
+ */
231
+ async terminate({ buildId, status, buildKey, error, accessToken }) {
232
+ if (!buildId || buildId.length === 0) {
233
+ throw (0, errors_1.createClientError)('Build ID is required');
234
+ }
235
+ if (!status) {
236
+ throw (0, errors_1.createClientError)('Build status is required');
237
+ }
238
+ if (!buildKey || buildKey.length === 0) {
239
+ throw (0, errors_1.createClientError)('Build key is required');
240
+ }
241
+ if (!accessToken || accessToken.length === 0) {
242
+ throw (0, errors_1.createClientError)('Access token is required');
243
+ }
244
+ const data = new sabs_types_1.TerminateRequest({
245
+ buildId,
246
+ status,
247
+ error,
248
+ buildKey
249
+ });
250
+ return this.executeRequest({
251
+ method: 'POST',
252
+ url: `${this.baseUrl}/v1/builds/${buildId}/terminate`,
253
+ data
254
+ }, accessToken);
255
+ }
256
+ /**
257
+ * Create a new live edit session for real-time development
258
+ *
259
+ * @param params - Live edit creation parameters
260
+ * @param params.applicationId - Application ID
261
+ * @param params.organizationId - Organization ID
262
+ * @param params.branch - Git branch name
263
+ * @param params.expiresIn - Session duration in seconds
264
+ * @param params.accessToken - JWT access token for authorization
265
+ * @returns Promise resolving to live edit session information
266
+ * @throws BadRequestError if the application ID, organization ID, branch, or access token are empty or invalid, or expiresIn is not greater than 0
267
+ * @throws UnauthorizedError if the access token is invalid or missing the required scopes
268
+ * @throws InternalServerError if the service has an unexpected error while performing this request
269
+ * @throws HttpError if the request fails for an unknown reason
270
+ */
271
+ async createLiveEdit({ applicationId, organizationId, branch, expiresIn, accessToken }) {
272
+ if (!applicationId || applicationId.length === 0) {
273
+ throw (0, errors_1.createClientError)('Application ID is required');
274
+ }
275
+ if (!organizationId || organizationId.length === 0) {
276
+ throw (0, errors_1.createClientError)('Organization ID is required');
277
+ }
278
+ if (!branch || branch.length === 0) {
279
+ throw (0, errors_1.createClientError)('Branch is required');
280
+ }
281
+ if (!accessToken || accessToken.length === 0) {
282
+ throw (0, errors_1.createClientError)('Access token is required');
283
+ }
284
+ if (!expiresIn || expiresIn <= 0) {
285
+ throw (0, errors_1.createClientError)('Expires in is required and must be greater than 0');
286
+ }
287
+ const data = new sabs_types_1.CreateLiveEditRequest({
288
+ application: {
289
+ applicationId,
290
+ organizationId: organizationId,
291
+ branch: branch
292
+ },
293
+ sessionJwt: accessToken,
294
+ expiresIn: BigInt(expiresIn)
295
+ });
296
+ return this.executeRequest({
297
+ method: 'POST',
298
+ url: `${this.baseUrl}/v1/live-edit`,
299
+ data
300
+ }, accessToken);
301
+ }
302
+ /**
303
+ * Terminate an active live edit session
304
+ *
305
+ * @param params - Live edit termination parameters
306
+ * @param params.liveEditId - ID of the live edit session to terminate
307
+ * @param params.accessToken - JWT access token for authorization
308
+ * @returns Promise resolving to termination confirmation
309
+ * @throws BadRequestError if the live edit ID or access token are empty or invalid
310
+ * @throws UnauthorizedError if the access token is invalid or missing the required scopes
311
+ * @throws NotFoundError if the live edit ID is invalid
312
+ * @throws InternalServerError if the service has an unexpected error while performing this request
313
+ * @throws HttpError if the request fails for an unknown reason
314
+ */
315
+ async terminateLiveEdit({ liveEditId, accessToken }) {
316
+ if (!liveEditId || liveEditId.length === 0) {
317
+ throw (0, errors_1.createClientError)('Live edit ID is required');
318
+ }
319
+ if (!accessToken || accessToken.length === 0) {
320
+ throw (0, errors_1.createClientError)('Access token is required');
321
+ }
322
+ const data = new sabs_types_1.TerminateLiveEditRequest({
323
+ liveEditId
324
+ });
325
+ return this.executeRequest({
326
+ method: 'POST',
327
+ url: `${this.baseUrl}/v1/live-edit/${liveEditId}/terminate`,
328
+ data
329
+ }, accessToken);
330
+ }
331
+ async executeRequest(config, accessToken) {
332
+ let headers;
333
+ if (accessToken || config.headers) {
334
+ headers = {
335
+ ...config.headers,
336
+ Authorization: accessToken ? `Bearer ${accessToken}` : undefined
337
+ };
338
+ }
339
+ try {
340
+ const response = await axios_1.default.request({
341
+ ...config,
342
+ headers
343
+ });
344
+ return response.data;
345
+ }
346
+ catch (error) {
347
+ if (axios_1.default.isAxiosError(error)) {
348
+ const statusCode = error.response?.status ?? 500;
349
+ const statusText = error.response?.statusText ?? 'Unknown Error';
350
+ const responseData = error.response?.data;
351
+ let message;
352
+ if (responseData && typeof responseData === 'object' && responseData.message) {
353
+ message = responseData.message;
354
+ }
355
+ else if (responseData && typeof responseData === 'string') {
356
+ message = responseData;
357
+ }
358
+ else {
359
+ message = `${statusText} (${statusCode})`;
360
+ }
361
+ throw (0, errors_1.createErrorFromStatusCode)(statusCode, message);
362
+ }
363
+ else {
364
+ // Network error or other non-HTTP error
365
+ const message = error instanceof Error ? error.message : 'Unknown error occurred';
366
+ throw (0, errors_1.createNetworkError)(message, error instanceof Error ? error : undefined);
367
+ }
368
+ }
369
+ }
370
+ }
371
+ exports.SabsClient = SabsClient;
372
+ //# sourceMappingURL=sabs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sabs.js","sourceRoot":"","sources":["../src/sabs.ts"],"names":[],"mappings":";;;;;;AAAA,4DAkBqC;AACrC,kDAA0E;AAE1E,qCAA4F;AAE5F;;;;;;;;GAQG;AACH,MAAa,UAAU;IACJ,OAAO,CAAS;IAEjC,YAAmB,OAAe;QAChC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACz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