@unboundcx/sdk 1.2.6 → 1.4.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.2.6",
3
+ "version": "1.4.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",
package/services/login.js CHANGED
@@ -110,4 +110,25 @@ export class LoginService {
110
110
  );
111
111
  return result;
112
112
  }
113
+
114
+ async forgotPassword(email) {
115
+ this.sdk.validateParams(
116
+ { email },
117
+ {
118
+ email: { type: 'string', required: true },
119
+ },
120
+ );
121
+
122
+ const options = {
123
+ body: { email },
124
+ };
125
+
126
+ const result = await this.sdk._fetch(
127
+ '/login/forgotPassword',
128
+ 'POST',
129
+ options,
130
+ true,
131
+ );
132
+ return result;
133
+ }
113
134
  }
@@ -166,4 +166,186 @@ export class ObjectsService {
166
166
  const result = await this.sdk._fetch(`/object/`, 'GET', params);
167
167
  return result;
168
168
  }
169
+
170
+ // ExpandDetails methods
171
+ async createExpandDetail(body = {}) {
172
+ this.sdk.validateParams(
173
+ { body },
174
+ {
175
+ body: { type: 'object', required: true },
176
+ },
177
+ );
178
+
179
+ const params = { body };
180
+
181
+ const result = await this.sdk._fetch(`/object/expandDetails`, 'POST', params);
182
+ return result;
183
+ }
184
+
185
+ async getExpandDetails(query = {}) {
186
+ this.sdk.validateParams(
187
+ { query },
188
+ {
189
+ query: { type: 'object', required: false },
190
+ },
191
+ );
192
+
193
+ const params = { query };
194
+
195
+ const result = await this.sdk._fetch(`/object/expandDetails`, 'GET', params);
196
+ return result;
197
+ }
198
+
199
+ async getExpandDetailById(id) {
200
+ this.sdk.validateParams(
201
+ { id },
202
+ {
203
+ id: { type: 'string', required: true },
204
+ },
205
+ );
206
+
207
+ const result = await this.sdk._fetch(`/object/expandDetails/${id}`, 'GET');
208
+ return result;
209
+ }
210
+
211
+ async updateExpandDetail(id, body = {}) {
212
+ this.sdk.validateParams(
213
+ { id, body },
214
+ {
215
+ id: { type: 'string', required: true },
216
+ body: { type: 'object', required: true },
217
+ },
218
+ );
219
+
220
+ const params = { body };
221
+
222
+ const result = await this.sdk._fetch(`/object/expandDetails/${id}`, 'PUT', params);
223
+ return result;
224
+ }
225
+
226
+ async deleteExpandDetail(id) {
227
+ this.sdk.validateParams(
228
+ { id },
229
+ {
230
+ id: { type: 'string', required: true },
231
+ },
232
+ );
233
+
234
+ const result = await this.sdk._fetch(`/object/expandDetails/${id}`, 'DELETE');
235
+ return result;
236
+ }
237
+
238
+ // GeneratedColumns methods
239
+ async createGeneratedColumn(body = {}) {
240
+ this.sdk.validateParams(
241
+ { body },
242
+ {
243
+ body: { type: 'object', required: true },
244
+ },
245
+ );
246
+
247
+ const params = { body };
248
+
249
+ const result = await this.sdk._fetch(`/object/generatedColumns`, 'POST', params);
250
+ return result;
251
+ }
252
+
253
+ async getGeneratedColumns(query = {}) {
254
+ this.sdk.validateParams(
255
+ { query },
256
+ {
257
+ query: { type: 'object', required: false },
258
+ },
259
+ );
260
+
261
+ const params = { query };
262
+
263
+ const result = await this.sdk._fetch(`/object/generatedColumns`, 'GET', params);
264
+ return result;
265
+ }
266
+
267
+ async getGeneratedColumnById(id) {
268
+ this.sdk.validateParams(
269
+ { id },
270
+ {
271
+ id: { type: 'string', required: true },
272
+ },
273
+ );
274
+
275
+ const result = await this.sdk._fetch(`/object/generatedColumns/${id}`, 'GET');
276
+ return result;
277
+ }
278
+
279
+ async updateGeneratedColumn(id, body = {}) {
280
+ this.sdk.validateParams(
281
+ { id, body },
282
+ {
283
+ id: { type: 'string', required: true },
284
+ body: { type: 'object', required: true },
285
+ },
286
+ );
287
+
288
+ const params = { body };
289
+
290
+ const result = await this.sdk._fetch(`/object/generatedColumns/${id}`, 'PUT', params);
291
+ return result;
292
+ }
293
+
294
+ async deleteGeneratedColumn(id) {
295
+ this.sdk.validateParams(
296
+ { id },
297
+ {
298
+ id: { type: 'string', required: true },
299
+ },
300
+ );
301
+
302
+ const result = await this.sdk._fetch(`/object/generatedColumns/${id}`, 'DELETE');
303
+ return result;
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
+ }
169
351
  }