@unboundcx/sdk 1.3.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unboundcx/sdk",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "description": "Official JavaScript SDK for the Unbound API - A comprehensive toolkit for integrating with Unbound's communication, AI, and data management services",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -302,4 +302,50 @@ export class ObjectsService {
302
302
  const result = await this.sdk._fetch(`/object/generatedColumns/${id}`, 'DELETE');
303
303
  return result;
304
304
  }
305
+
306
+ // Object Management methods
307
+ async createObject(body = {}) {
308
+ this.sdk.validateParams(
309
+ { body },
310
+ {
311
+ body: { type: 'object', required: true },
312
+ },
313
+ );
314
+
315
+ const params = { body };
316
+
317
+ const result = await this.sdk._fetch(`/object/manage`, 'POST', params);
318
+ return result;
319
+ }
320
+
321
+ async createColumn(objectName, body = {}) {
322
+ this.sdk.validateParams(
323
+ { objectName, body },
324
+ {
325
+ objectName: { type: 'string', required: true },
326
+ body: { type: 'object', required: true },
327
+ },
328
+ );
329
+
330
+ const params = { body };
331
+
332
+ const result = await this.sdk._fetch(`/object/manage/${objectName}`, 'POST', params);
333
+ return result;
334
+ }
335
+
336
+ async modifyColumn(objectName, columnName, body = {}) {
337
+ this.sdk.validateParams(
338
+ { objectName, columnName, body },
339
+ {
340
+ objectName: { type: 'string', required: true },
341
+ columnName: { type: 'string', required: true },
342
+ body: { type: 'object', required: true },
343
+ },
344
+ );
345
+
346
+ const params = { body };
347
+
348
+ const result = await this.sdk._fetch(`/object/manage/${objectName}/${columnName}`, 'PUT', params);
349
+ return result;
350
+ }
305
351
  }