@superatomai/sdk-web 0.0.14 → 0.0.15

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/index.d.cts CHANGED
@@ -517,9 +517,10 @@ declare const UserPromptSuggestionsResponseMessageSchema: z.ZodObject<{
517
517
  type UserPromptSuggestionsResponseMessage = z.infer<typeof UserPromptSuggestionsResponseMessageSchema>;
518
518
  /**
519
519
  * Bundle request payload schema
520
- * Bundle requests have empty payload
521
520
  */
522
- declare const BundleRequestPayloadSchema: z.ZodObject<{}, z.core.$strip>;
521
+ declare const BundleRequestPayloadSchema: z.ZodObject<{
522
+ devbundlereq: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
523
+ }, z.core.$strip>;
523
524
  type BundleRequestPayload = z.infer<typeof BundleRequestPayloadSchema>;
524
525
  /**
525
526
  * Bundle request message schema
@@ -535,7 +536,9 @@ declare const BundleRequestMessageSchema: z.ZodObject<{
535
536
  id: z.ZodOptional<z.ZodString>;
536
537
  type: z.ZodOptional<z.ZodString>;
537
538
  }, z.core.$strip>>;
538
- payload: z.ZodObject<{}, z.core.$strip>;
539
+ payload: z.ZodObject<{
540
+ devbundlereq: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
541
+ }, z.core.$strip>;
539
542
  }, z.core.$strip>;
540
543
  type BundleRequestMessage = z.infer<typeof BundleRequestMessageSchema>;
541
544
  /**
@@ -1210,6 +1213,7 @@ declare function sendUserPromptSuggestionsRequest(client: SuperatomClient, promp
1210
1213
  declare function requestBundle(client: SuperatomClient, options?: {
1211
1214
  timeout?: number;
1212
1215
  onProgress?: (progress: number) => void;
1216
+ devbundlereq?: boolean;
1213
1217
  }): Promise<string>;
1214
1218
 
1215
1219
  /**
@@ -1306,7 +1310,7 @@ declare function createUser(client: SuperatomClient, username: string, password:
1306
1310
  * @param timeout - Request timeout in milliseconds
1307
1311
  * @returns Server response with success status
1308
1312
  */
1309
- declare function updateUser(client: SuperatomClient, username: string, updates: {
1313
+ declare function updateUser(client: SuperatomClient, id: number, updates: {
1310
1314
  password?: string;
1311
1315
  email?: string;
1312
1316
  fullname?: string;
@@ -1327,7 +1331,7 @@ declare function updateUser(client: SuperatomClient, username: string, updates:
1327
1331
  * @param timeout - Request timeout in milliseconds
1328
1332
  * @returns Server response with success status
1329
1333
  */
1330
- declare function deleteUser(client: SuperatomClient, username: string, timeout?: number): Promise<{
1334
+ declare function deleteUser(client: SuperatomClient, id: number, timeout?: number): Promise<{
1331
1335
  success: boolean;
1332
1336
  error?: string;
1333
1337
  message?: string;
@@ -2380,6 +2384,7 @@ declare class SuperatomClient {
2380
2384
  requestBundle(options?: {
2381
2385
  timeout?: number;
2382
2386
  onProgress?: (progress: number) => void;
2387
+ devbundle?: boolean;
2383
2388
  }): Promise<string>;
2384
2389
  /**
2385
2390
  * Request data from a collection
@@ -2438,7 +2443,7 @@ declare class SuperatomClient {
2438
2443
  * Update an existing user
2439
2444
  * Delegates to users service
2440
2445
  */
2441
- updateUser(username: string, updates: {
2446
+ updateUser(id: number, updates: {
2442
2447
  password?: string;
2443
2448
  email?: string;
2444
2449
  fullname?: string;
@@ -2456,7 +2461,7 @@ declare class SuperatomClient {
2456
2461
  * Delete a user
2457
2462
  * Delegates to users service
2458
2463
  */
2459
- deleteUser(username: string, timeout?: number): Promise<{
2464
+ deleteUser(id: number, timeout?: number): Promise<{
2460
2465
  success: boolean;
2461
2466
  error?: string;
2462
2467
  message?: string;
package/dist/index.d.ts CHANGED
@@ -517,9 +517,10 @@ declare const UserPromptSuggestionsResponseMessageSchema: z.ZodObject<{
517
517
  type UserPromptSuggestionsResponseMessage = z.infer<typeof UserPromptSuggestionsResponseMessageSchema>;
518
518
  /**
519
519
  * Bundle request payload schema
520
- * Bundle requests have empty payload
521
520
  */
522
- declare const BundleRequestPayloadSchema: z.ZodObject<{}, z.core.$strip>;
521
+ declare const BundleRequestPayloadSchema: z.ZodObject<{
522
+ devbundlereq: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
523
+ }, z.core.$strip>;
523
524
  type BundleRequestPayload = z.infer<typeof BundleRequestPayloadSchema>;
524
525
  /**
525
526
  * Bundle request message schema
@@ -535,7 +536,9 @@ declare const BundleRequestMessageSchema: z.ZodObject<{
535
536
  id: z.ZodOptional<z.ZodString>;
536
537
  type: z.ZodOptional<z.ZodString>;
537
538
  }, z.core.$strip>>;
538
- payload: z.ZodObject<{}, z.core.$strip>;
539
+ payload: z.ZodObject<{
540
+ devbundlereq: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
541
+ }, z.core.$strip>;
539
542
  }, z.core.$strip>;
540
543
  type BundleRequestMessage = z.infer<typeof BundleRequestMessageSchema>;
541
544
  /**
@@ -1210,6 +1213,7 @@ declare function sendUserPromptSuggestionsRequest(client: SuperatomClient, promp
1210
1213
  declare function requestBundle(client: SuperatomClient, options?: {
1211
1214
  timeout?: number;
1212
1215
  onProgress?: (progress: number) => void;
1216
+ devbundlereq?: boolean;
1213
1217
  }): Promise<string>;
1214
1218
 
1215
1219
  /**
@@ -1306,7 +1310,7 @@ declare function createUser(client: SuperatomClient, username: string, password:
1306
1310
  * @param timeout - Request timeout in milliseconds
1307
1311
  * @returns Server response with success status
1308
1312
  */
1309
- declare function updateUser(client: SuperatomClient, username: string, updates: {
1313
+ declare function updateUser(client: SuperatomClient, id: number, updates: {
1310
1314
  password?: string;
1311
1315
  email?: string;
1312
1316
  fullname?: string;
@@ -1327,7 +1331,7 @@ declare function updateUser(client: SuperatomClient, username: string, updates:
1327
1331
  * @param timeout - Request timeout in milliseconds
1328
1332
  * @returns Server response with success status
1329
1333
  */
1330
- declare function deleteUser(client: SuperatomClient, username: string, timeout?: number): Promise<{
1334
+ declare function deleteUser(client: SuperatomClient, id: number, timeout?: number): Promise<{
1331
1335
  success: boolean;
1332
1336
  error?: string;
1333
1337
  message?: string;
@@ -2380,6 +2384,7 @@ declare class SuperatomClient {
2380
2384
  requestBundle(options?: {
2381
2385
  timeout?: number;
2382
2386
  onProgress?: (progress: number) => void;
2387
+ devbundle?: boolean;
2383
2388
  }): Promise<string>;
2384
2389
  /**
2385
2390
  * Request data from a collection
@@ -2438,7 +2443,7 @@ declare class SuperatomClient {
2438
2443
  * Update an existing user
2439
2444
  * Delegates to users service
2440
2445
  */
2441
- updateUser(username: string, updates: {
2446
+ updateUser(id: number, updates: {
2442
2447
  password?: string;
2443
2448
  email?: string;
2444
2449
  fullname?: string;
@@ -2456,7 +2461,7 @@ declare class SuperatomClient {
2456
2461
  * Delete a user
2457
2462
  * Delegates to users service
2458
2463
  */
2459
- deleteUser(username: string, timeout?: number): Promise<{
2464
+ deleteUser(id: number, timeout?: number): Promise<{
2460
2465
  success: boolean;
2461
2466
  error?: string;
2462
2467
  message?: string;
package/dist/index.js CHANGED
@@ -318,7 +318,9 @@ var UserPromptSuggestionsResponseMessageSchema = z.object({
318
318
  to: MessageParticipantSchema.optional(),
319
319
  payload: UserPromptSuggestionsResponsePayloadSchema
320
320
  });
321
- var BundleRequestPayloadSchema = z.object({});
321
+ var BundleRequestPayloadSchema = z.object({
322
+ devbundlereq: z.boolean().optional().default(false)
323
+ });
322
324
  var BundleRequestMessageSchema = z.object({
323
325
  id: z.string(),
324
326
  type: z.literal("BUNDLE_REQ"),
@@ -962,7 +964,7 @@ async function requestBundle(client, options) {
962
964
  type: "BUNDLE_REQ",
963
965
  from: { type: client.type },
964
966
  to: { type: "data-agent" },
965
- payload: {}
967
+ payload: { devbundlereq: options?.devbundlereq ?? false }
966
968
  });
967
969
  const chunks = [];
968
970
  let totalChunks = 0;
@@ -1093,7 +1095,7 @@ async function createUser(client, username, password, email, fullname, role, tim
1093
1095
  role: payload.data?.role
1094
1096
  };
1095
1097
  }
1096
- async function updateUser(client, username, updates, timeout) {
1098
+ async function updateUser(client, id, updates, timeout) {
1097
1099
  const messageId = `users_update_${Date.now()}`;
1098
1100
  const message = UsersRequestMessageSchema.parse({
1099
1101
  id: messageId,
@@ -1103,7 +1105,7 @@ async function updateUser(client, username, updates, timeout) {
1103
1105
  payload: {
1104
1106
  operation: "update",
1105
1107
  data: {
1106
- username,
1108
+ id,
1107
1109
  ...updates
1108
1110
  }
1109
1111
  }
@@ -1120,7 +1122,7 @@ async function updateUser(client, username, updates, timeout) {
1120
1122
  role: payload.data?.role
1121
1123
  };
1122
1124
  }
1123
- async function deleteUser(client, username, timeout) {
1125
+ async function deleteUser(client, id, timeout) {
1124
1126
  const messageId = `users_delete_${Date.now()}`;
1125
1127
  const message = UsersRequestMessageSchema.parse({
1126
1128
  id: messageId,
@@ -1130,7 +1132,7 @@ async function deleteUser(client, username, timeout) {
1130
1132
  payload: {
1131
1133
  operation: "delete",
1132
1134
  data: {
1133
- username
1135
+ id
1134
1136
  }
1135
1137
  }
1136
1138
  });
@@ -2491,17 +2493,17 @@ var SuperatomClient = class {
2491
2493
  * Update an existing user
2492
2494
  * Delegates to users service
2493
2495
  */
2494
- async updateUser(username, updates, timeout) {
2495
- this.log("info", "Updating user:", username);
2496
- return updateUser(this, username, updates, timeout);
2496
+ async updateUser(id, updates, timeout) {
2497
+ this.log("info", "Updating user:", id);
2498
+ return updateUser(this, id, updates, timeout);
2497
2499
  }
2498
2500
  /**
2499
2501
  * Delete a user
2500
2502
  * Delegates to users service
2501
2503
  */
2502
- async deleteUser(username, timeout) {
2503
- this.log("info", "Deleting user:", username);
2504
- return deleteUser(this, username, timeout);
2504
+ async deleteUser(id, timeout) {
2505
+ this.log("info", "Deleting user:", id);
2506
+ return deleteUser(this, id, timeout);
2505
2507
  }
2506
2508
  /**
2507
2509
  * Get all users