@turnkey/sdk-browser 0.0.1 → 0.1.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.
Files changed (47) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/__generated__/sdk-client-base.d.ts.map +1 -1
  3. package/dist/__generated__/sdk-client-base.js +173 -43
  4. package/dist/__generated__/sdk-client-base.js.map +1 -1
  5. package/dist/__generated__/sdk-client-base.mjs +173 -43
  6. package/dist/__generated__/sdk-client-base.mjs.map +1 -1
  7. package/dist/__generated__/version.d.ts +1 -1
  8. package/dist/__generated__/version.js +1 -1
  9. package/dist/__generated__/version.mjs +1 -1
  10. package/dist/__polyfills__/window.d.ts +15 -0
  11. package/dist/__polyfills__/window.d.ts.map +1 -0
  12. package/dist/__polyfills__/window.js +30 -0
  13. package/dist/__polyfills__/window.js.map +1 -0
  14. package/dist/__polyfills__/window.mjs +28 -0
  15. package/dist/__polyfills__/window.mjs.map +1 -0
  16. package/dist/index.d.ts +5 -5
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +6 -2
  19. package/dist/index.js.map +1 -1
  20. package/dist/index.mjs +2 -2
  21. package/dist/models.d.ts +0 -5
  22. package/dist/models.d.ts.map +1 -1
  23. package/dist/sdk-client.d.ts +18 -22
  24. package/dist/sdk-client.d.ts.map +1 -1
  25. package/dist/sdk-client.js +70 -131
  26. package/dist/sdk-client.js.map +1 -1
  27. package/dist/sdk-client.mjs +69 -132
  28. package/dist/sdk-client.mjs.map +1 -1
  29. package/dist/storage.d.ts +2 -6
  30. package/dist/storage.d.ts.map +1 -1
  31. package/dist/storage.js +5 -9
  32. package/dist/storage.js.map +1 -1
  33. package/dist/storage.mjs +5 -9
  34. package/dist/storage.mjs.map +1 -1
  35. package/dist/turnkey-helpers.d.ts +2 -0
  36. package/dist/turnkey-helpers.d.ts.map +1 -1
  37. package/dist/turnkey-helpers.js +13 -0
  38. package/dist/turnkey-helpers.js.map +1 -1
  39. package/dist/turnkey-helpers.mjs +12 -1
  40. package/dist/turnkey-helpers.mjs.map +1 -1
  41. package/package.json +4 -3
  42. package/dist/constants.d.ts +0 -4
  43. package/dist/constants.d.ts.map +0 -1
  44. package/dist/constants.js +0 -18
  45. package/dist/constants.js.map +0 -1
  46. package/dist/constants.mjs +0 -15
  47. package/dist/constants.mjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @turnkey/sdk-browser
2
2
 
3
+ ## 0.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Ready for 0.1.0
8
+
3
9
  ## 0.0.1
4
10
 
5
11
  Initial (experimental) release! This is an alpha release and subject to change.
@@ -1 +1 @@
1
- {"version":3,"file":"sdk-client-base.d.ts","sourceRoot":"","sources":["../../src/__generated__/sdk-client-base.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,sBAAsB,EACvB,MAAM,mBAAmB,CAAC;AAI3B,OAAO,KAAK,KAAK,WAAW,MAAM,iBAAiB,CAAC;AAEpD,qBAAa,oBAAoB;IAC/B,MAAM,EAAE,sBAAsB,CAAC;gBAEnB,MAAM,EAAE,sBAAsB;IAIpC,OAAO,CAAC,SAAS,EAAE,aAAa,EACpC,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,SAAS,GACd,OAAO,CAAC,aAAa,CAAC;IAqCnB,OAAO,CAAC,SAAS,EAAE,aAAa,EACpC,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,SAAS,EACf,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,aAAa,CAAC;IA4CnB,gBAAgB,CAAC,SAAS,EAAE,aAAa,EAC7C,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,SAAS,GACd,OAAO,CAAC,aAAa,CAAC;IAazB,WAAW,UACF,YAAY,gBAAgB,KAClC,QAAQ,YAAY,oBAAoB,CAAC,CAK1C;IAEF,SAAS,UACA,YAAY,cAAc,KAChC,QAAQ,YAAY,kBAAkB,CAAC,CAKxC;IAEF,UA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js');
5
+ var storage = require('../storage.js');
5
6
 
6
7
  /* @generated by codegen. DO NOT EDIT BY HAND */
7
8
  class TurnkeySDKClientBase {
@@ -128,387 +129,516 @@ class TurnkeySDKClientBase {
128
129
  };
129
130
  this.approveActivity = async (input) => {
130
131
  const { organizationId, timestampMs, ...rest } = input;
132
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
131
133
  return this.activityDecision("/public/v1/submit/approve_activity", {
132
134
  parameters: rest,
133
- organizationId: organizationId ?? this.config.organizationId,
135
+ organizationId: organizationId ??
136
+ currentUser?.organization?.organizationId ??
137
+ this.config.organizationId,
134
138
  timestampMs: timestampMs ?? String(Date.now()),
135
139
  type: "ACTIVITY_TYPE_APPROVE_ACTIVITY",
136
140
  });
137
141
  };
138
142
  this.createApiKeys = async (input) => {
139
143
  const { organizationId, timestampMs, ...rest } = input;
144
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
140
145
  return this.command("/public/v1/submit/create_api_keys", {
141
146
  parameters: rest,
142
- organizationId: organizationId ?? this.config.organizationId,
147
+ organizationId: organizationId ??
148
+ currentUser?.organization?.organizationId ??
149
+ this.config.organizationId,
143
150
  timestampMs: timestampMs ?? String(Date.now()),
144
151
  type: "ACTIVITY_TYPE_CREATE_API_KEYS",
145
152
  }, "createApiKeysResult");
146
153
  };
147
154
  this.createApiOnlyUsers = async (input) => {
148
155
  const { organizationId, timestampMs, ...rest } = input;
156
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
149
157
  return this.command("/public/v1/submit/create_api_only_users", {
150
158
  parameters: rest,
151
- organizationId: organizationId ?? this.config.organizationId,
159
+ organizationId: organizationId ??
160
+ currentUser?.organization?.organizationId ??
161
+ this.config.organizationId,
152
162
  timestampMs: timestampMs ?? String(Date.now()),
153
163
  type: "ACTIVITY_TYPE_CREATE_API_ONLY_USERS",
154
164
  }, "createApiOnlyUsersResult");
155
165
  };
156
166
  this.createAuthenticators = async (input) => {
157
167
  const { organizationId, timestampMs, ...rest } = input;
168
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
158
169
  return this.command("/public/v1/submit/create_authenticators", {
159
170
  parameters: rest,
160
- organizationId: organizationId ?? this.config.organizationId,
171
+ organizationId: organizationId ??
172
+ currentUser?.organization?.organizationId ??
173
+ this.config.organizationId,
161
174
  timestampMs: timestampMs ?? String(Date.now()),
162
175
  type: "ACTIVITY_TYPE_CREATE_AUTHENTICATORS_V2",
163
176
  }, "createAuthenticatorsResult");
164
177
  };
165
178
  this.createInvitations = async (input) => {
166
179
  const { organizationId, timestampMs, ...rest } = input;
180
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
167
181
  return this.command("/public/v1/submit/create_invitations", {
168
182
  parameters: rest,
169
- organizationId: organizationId ?? this.config.organizationId,
183
+ organizationId: organizationId ??
184
+ currentUser?.organization?.organizationId ??
185
+ this.config.organizationId,
170
186
  timestampMs: timestampMs ?? String(Date.now()),
171
187
  type: "ACTIVITY_TYPE_CREATE_INVITATIONS",
172
188
  }, "createInvitationsResult");
173
189
  };
174
190
  this.createPolicies = async (input) => {
175
191
  const { organizationId, timestampMs, ...rest } = input;
192
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
176
193
  return this.command("/public/v1/submit/create_policies", {
177
194
  parameters: rest,
178
- organizationId: organizationId ?? this.config.organizationId,
195
+ organizationId: organizationId ??
196
+ currentUser?.organization?.organizationId ??
197
+ this.config.organizationId,
179
198
  timestampMs: timestampMs ?? String(Date.now()),
180
199
  type: "ACTIVITY_TYPE_CREATE_POLICIES",
181
200
  }, "createPoliciesResult");
182
201
  };
183
202
  this.createPolicy = async (input) => {
184
203
  const { organizationId, timestampMs, ...rest } = input;
204
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
185
205
  return this.command("/public/v1/submit/create_policy", {
186
206
  parameters: rest,
187
- organizationId: organizationId ?? this.config.organizationId,
207
+ organizationId: organizationId ??
208
+ currentUser?.organization?.organizationId ??
209
+ this.config.organizationId,
188
210
  timestampMs: timestampMs ?? String(Date.now()),
189
211
  type: "ACTIVITY_TYPE_CREATE_POLICY_V3",
190
212
  }, "createPolicyResult");
191
213
  };
192
214
  this.createPrivateKeyTag = async (input) => {
193
215
  const { organizationId, timestampMs, ...rest } = input;
216
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
194
217
  return this.command("/public/v1/submit/create_private_key_tag", {
195
218
  parameters: rest,
196
- organizationId: organizationId ?? this.config.organizationId,
219
+ organizationId: organizationId ??
220
+ currentUser?.organization?.organizationId ??
221
+ this.config.organizationId,
197
222
  timestampMs: timestampMs ?? String(Date.now()),
198
223
  type: "ACTIVITY_TYPE_CREATE_PRIVATE_KEY_TAG",
199
224
  }, "createPrivateKeyTagResult");
200
225
  };
201
226
  this.createPrivateKeys = async (input) => {
202
227
  const { organizationId, timestampMs, ...rest } = input;
228
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
203
229
  return this.command("/public/v1/submit/create_private_keys", {
204
230
  parameters: rest,
205
- organizationId: organizationId ?? this.config.organizationId,
231
+ organizationId: organizationId ??
232
+ currentUser?.organization?.organizationId ??
233
+ this.config.organizationId,
206
234
  timestampMs: timestampMs ?? String(Date.now()),
207
235
  type: "ACTIVITY_TYPE_CREATE_PRIVATE_KEYS_V2",
208
236
  }, "createPrivateKeysResultV2");
209
237
  };
210
238
  this.createReadOnlySession = async (input) => {
211
239
  const { organizationId, timestampMs, ...rest } = input;
240
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
212
241
  return this.command("/public/v1/submit/create_read_only_session", {
213
242
  parameters: rest,
214
- organizationId: organizationId ?? this.config.organizationId,
243
+ organizationId: organizationId ??
244
+ currentUser?.organization?.organizationId ??
245
+ this.config.organizationId,
215
246
  timestampMs: timestampMs ?? String(Date.now()),
216
247
  type: "ACTIVITY_TYPE_CREATE_READ_ONLY_SESSION",
217
248
  }, "createReadOnlySessionResult");
218
249
  };
219
250
  this.createSubOrganization = async (input) => {
220
251
  const { organizationId, timestampMs, ...rest } = input;
252
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
221
253
  return this.command("/public/v1/submit/create_sub_organization", {
222
254
  parameters: rest,
223
- organizationId: organizationId ?? this.config.organizationId,
255
+ organizationId: organizationId ??
256
+ currentUser?.organization?.organizationId ??
257
+ this.config.organizationId,
224
258
  timestampMs: timestampMs ?? String(Date.now()),
225
259
  type: "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V4",
226
260
  }, "createSubOrganizationResultV4");
227
261
  };
228
262
  this.createUserTag = async (input) => {
229
263
  const { organizationId, timestampMs, ...rest } = input;
264
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
230
265
  return this.command("/public/v1/submit/create_user_tag", {
231
266
  parameters: rest,
232
- organizationId: organizationId ?? this.config.organizationId,
267
+ organizationId: organizationId ??
268
+ currentUser?.organization?.organizationId ??
269
+ this.config.organizationId,
233
270
  timestampMs: timestampMs ?? String(Date.now()),
234
271
  type: "ACTIVITY_TYPE_CREATE_USER_TAG",
235
272
  }, "createUserTagResult");
236
273
  };
237
274
  this.createUsers = async (input) => {
238
275
  const { organizationId, timestampMs, ...rest } = input;
276
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
239
277
  return this.command("/public/v1/submit/create_users", {
240
278
  parameters: rest,
241
- organizationId: organizationId ?? this.config.organizationId,
279
+ organizationId: organizationId ??
280
+ currentUser?.organization?.organizationId ??
281
+ this.config.organizationId,
242
282
  timestampMs: timestampMs ?? String(Date.now()),
243
283
  type: "ACTIVITY_TYPE_CREATE_USERS_V2",
244
284
  }, "createUsersResult");
245
285
  };
246
286
  this.createWallet = async (input) => {
247
287
  const { organizationId, timestampMs, ...rest } = input;
288
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
248
289
  return this.command("/public/v1/submit/create_wallet", {
249
290
  parameters: rest,
250
- organizationId: organizationId ?? this.config.organizationId,
291
+ organizationId: organizationId ??
292
+ currentUser?.organization?.organizationId ??
293
+ this.config.organizationId,
251
294
  timestampMs: timestampMs ?? String(Date.now()),
252
295
  type: "ACTIVITY_TYPE_CREATE_WALLET",
253
296
  }, "createWalletResult");
254
297
  };
255
298
  this.createWalletAccounts = async (input) => {
256
299
  const { organizationId, timestampMs, ...rest } = input;
300
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
257
301
  return this.command("/public/v1/submit/create_wallet_accounts", {
258
302
  parameters: rest,
259
- organizationId: organizationId ?? this.config.organizationId,
303
+ organizationId: organizationId ??
304
+ currentUser?.organization?.organizationId ??
305
+ this.config.organizationId,
260
306
  timestampMs: timestampMs ?? String(Date.now()),
261
307
  type: "ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS",
262
308
  }, "createWalletAccountsResult");
263
309
  };
264
310
  this.deleteApiKeys = async (input) => {
265
311
  const { organizationId, timestampMs, ...rest } = input;
312
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
266
313
  return this.command("/public/v1/submit/delete_api_keys", {
267
314
  parameters: rest,
268
- organizationId: organizationId ?? this.config.organizationId,
315
+ organizationId: organizationId ??
316
+ currentUser?.organization?.organizationId ??
317
+ this.config.organizationId,
269
318
  timestampMs: timestampMs ?? String(Date.now()),
270
319
  type: "ACTIVITY_TYPE_DELETE_API_KEYS",
271
320
  }, "deleteApiKeysResult");
272
321
  };
273
322
  this.deleteAuthenticators = async (input) => {
274
323
  const { organizationId, timestampMs, ...rest } = input;
324
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
275
325
  return this.command("/public/v1/submit/delete_authenticators", {
276
326
  parameters: rest,
277
- organizationId: organizationId ?? this.config.organizationId,
327
+ organizationId: organizationId ??
328
+ currentUser?.organization?.organizationId ??
329
+ this.config.organizationId,
278
330
  timestampMs: timestampMs ?? String(Date.now()),
279
331
  type: "ACTIVITY_TYPE_DELETE_AUTHENTICATORS",
280
332
  }, "deleteAuthenticatorsResult");
281
333
  };
282
334
  this.deleteInvitation = async (input) => {
283
335
  const { organizationId, timestampMs, ...rest } = input;
336
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
284
337
  return this.command("/public/v1/submit/delete_invitation", {
285
338
  parameters: rest,
286
- organizationId: organizationId ?? this.config.organizationId,
339
+ organizationId: organizationId ??
340
+ currentUser?.organization?.organizationId ??
341
+ this.config.organizationId,
287
342
  timestampMs: timestampMs ?? String(Date.now()),
288
343
  type: "ACTIVITY_TYPE_DELETE_INVITATION",
289
344
  }, "deleteInvitationResult");
290
345
  };
291
346
  this.deletePolicy = async (input) => {
292
347
  const { organizationId, timestampMs, ...rest } = input;
348
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
293
349
  return this.command("/public/v1/submit/delete_policy", {
294
350
  parameters: rest,
295
- organizationId: organizationId ?? this.config.organizationId,
351
+ organizationId: organizationId ??
352
+ currentUser?.organization?.organizationId ??
353
+ this.config.organizationId,
296
354
  timestampMs: timestampMs ?? String(Date.now()),
297
355
  type: "ACTIVITY_TYPE_DELETE_POLICY",
298
356
  }, "deletePolicyResult");
299
357
  };
300
358
  this.deletePrivateKeyTags = async (input) => {
301
359
  const { organizationId, timestampMs, ...rest } = input;
360
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
302
361
  return this.command("/public/v1/submit/delete_private_key_tags", {
303
362
  parameters: rest,
304
- organizationId: organizationId ?? this.config.organizationId,
363
+ organizationId: organizationId ??
364
+ currentUser?.organization?.organizationId ??
365
+ this.config.organizationId,
305
366
  timestampMs: timestampMs ?? String(Date.now()),
306
367
  type: "ACTIVITY_TYPE_DELETE_PRIVATE_KEY_TAGS",
307
368
  }, "deletePrivateKeyTagsResult");
308
369
  };
309
370
  this.deleteUserTags = async (input) => {
310
371
  const { organizationId, timestampMs, ...rest } = input;
372
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
311
373
  return this.command("/public/v1/submit/delete_user_tags", {
312
374
  parameters: rest,
313
- organizationId: organizationId ?? this.config.organizationId,
375
+ organizationId: organizationId ??
376
+ currentUser?.organization?.organizationId ??
377
+ this.config.organizationId,
314
378
  timestampMs: timestampMs ?? String(Date.now()),
315
379
  type: "ACTIVITY_TYPE_DELETE_USER_TAGS",
316
380
  }, "deleteUserTagsResult");
317
381
  };
318
382
  this.deleteUsers = async (input) => {
319
383
  const { organizationId, timestampMs, ...rest } = input;
384
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
320
385
  return this.command("/public/v1/submit/delete_users", {
321
386
  parameters: rest,
322
- organizationId: organizationId ?? this.config.organizationId,
387
+ organizationId: organizationId ??
388
+ currentUser?.organization?.organizationId ??
389
+ this.config.organizationId,
323
390
  timestampMs: timestampMs ?? String(Date.now()),
324
391
  type: "ACTIVITY_TYPE_DELETE_USERS",
325
392
  }, "deleteUsersResult");
326
393
  };
327
394
  this.emailAuth = async (input) => {
328
395
  const { organizationId, timestampMs, ...rest } = input;
396
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
329
397
  return this.command("/public/v1/submit/email_auth", {
330
398
  parameters: rest,
331
- organizationId: organizationId ?? this.config.organizationId,
399
+ organizationId: organizationId ??
400
+ currentUser?.organization?.organizationId ??
401
+ this.config.organizationId,
332
402
  timestampMs: timestampMs ?? String(Date.now()),
333
403
  type: "ACTIVITY_TYPE_EMAIL_AUTH",
334
404
  }, "emailAuthResult");
335
405
  };
336
406
  this.exportPrivateKey = async (input) => {
337
407
  const { organizationId, timestampMs, ...rest } = input;
408
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
338
409
  return this.command("/public/v1/submit/export_private_key", {
339
410
  parameters: rest,
340
- organizationId: organizationId ?? this.config.organizationId,
411
+ organizationId: organizationId ??
412
+ currentUser?.organization?.organizationId ??
413
+ this.config.organizationId,
341
414
  timestampMs: timestampMs ?? String(Date.now()),
342
415
  type: "ACTIVITY_TYPE_EXPORT_PRIVATE_KEY",
343
416
  }, "exportPrivateKeyResult");
344
417
  };
345
418
  this.exportWallet = async (input) => {
346
419
  const { organizationId, timestampMs, ...rest } = input;
420
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
347
421
  return this.command("/public/v1/submit/export_wallet", {
348
422
  parameters: rest,
349
- organizationId: organizationId ?? this.config.organizationId,
423
+ organizationId: organizationId ??
424
+ currentUser?.organization?.organizationId ??
425
+ this.config.organizationId,
350
426
  timestampMs: timestampMs ?? String(Date.now()),
351
427
  type: "ACTIVITY_TYPE_EXPORT_WALLET",
352
428
  }, "exportWalletResult");
353
429
  };
354
430
  this.exportWalletAccount = async (input) => {
355
431
  const { organizationId, timestampMs, ...rest } = input;
432
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
356
433
  return this.command("/public/v1/submit/export_wallet_account", {
357
434
  parameters: rest,
358
- organizationId: organizationId ?? this.config.organizationId,
435
+ organizationId: organizationId ??
436
+ currentUser?.organization?.organizationId ??
437
+ this.config.organizationId,
359
438
  timestampMs: timestampMs ?? String(Date.now()),
360
439
  type: "ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT",
361
440
  }, "exportWalletAccountResult");
362
441
  };
363
442
  this.importPrivateKey = async (input) => {
364
443
  const { organizationId, timestampMs, ...rest } = input;
444
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
365
445
  return this.command("/public/v1/submit/import_private_key", {
366
446
  parameters: rest,
367
- organizationId: organizationId ?? this.config.organizationId,
447
+ organizationId: organizationId ??
448
+ currentUser?.organization?.organizationId ??
449
+ this.config.organizationId,
368
450
  timestampMs: timestampMs ?? String(Date.now()),
369
451
  type: "ACTIVITY_TYPE_IMPORT_PRIVATE_KEY",
370
452
  }, "importPrivateKeyResult");
371
453
  };
372
454
  this.importWallet = async (input) => {
373
455
  const { organizationId, timestampMs, ...rest } = input;
456
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
374
457
  return this.command("/public/v1/submit/import_wallet", {
375
458
  parameters: rest,
376
- organizationId: organizationId ?? this.config.organizationId,
459
+ organizationId: organizationId ??
460
+ currentUser?.organization?.organizationId ??
461
+ this.config.organizationId,
377
462
  timestampMs: timestampMs ?? String(Date.now()),
378
463
  type: "ACTIVITY_TYPE_IMPORT_WALLET",
379
464
  }, "importWalletResult");
380
465
  };
381
466
  this.initImportPrivateKey = async (input) => {
382
467
  const { organizationId, timestampMs, ...rest } = input;
468
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
383
469
  return this.command("/public/v1/submit/init_import_private_key", {
384
470
  parameters: rest,
385
- organizationId: organizationId ?? this.config.organizationId,
471
+ organizationId: organizationId ??
472
+ currentUser?.organization?.organizationId ??
473
+ this.config.organizationId,
386
474
  timestampMs: timestampMs ?? String(Date.now()),
387
475
  type: "ACTIVITY_TYPE_INIT_IMPORT_PRIVATE_KEY",
388
476
  }, "initImportPrivateKeyResult");
389
477
  };
390
478
  this.initImportWallet = async (input) => {
391
479
  const { organizationId, timestampMs, ...rest } = input;
480
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
392
481
  return this.command("/public/v1/submit/init_import_wallet", {
393
482
  parameters: rest,
394
- organizationId: organizationId ?? this.config.organizationId,
483
+ organizationId: organizationId ??
484
+ currentUser?.organization?.organizationId ??
485
+ this.config.organizationId,
395
486
  timestampMs: timestampMs ?? String(Date.now()),
396
487
  type: "ACTIVITY_TYPE_INIT_IMPORT_WALLET",
397
488
  }, "initImportWalletResult");
398
489
  };
399
490
  this.initUserEmailRecovery = async (input) => {
400
491
  const { organizationId, timestampMs, ...rest } = input;
492
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
401
493
  return this.command("/public/v1/submit/init_user_email_recovery", {
402
494
  parameters: rest,
403
- organizationId: organizationId ?? this.config.organizationId,
495
+ organizationId: organizationId ??
496
+ currentUser?.organization?.organizationId ??
497
+ this.config.organizationId,
404
498
  timestampMs: timestampMs ?? String(Date.now()),
405
499
  type: "ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY",
406
500
  }, "initUserEmailRecoveryResult");
407
501
  };
408
502
  this.recoverUser = async (input) => {
409
503
  const { organizationId, timestampMs, ...rest } = input;
504
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
410
505
  return this.command("/public/v1/submit/recover_user", {
411
506
  parameters: rest,
412
- organizationId: organizationId ?? this.config.organizationId,
507
+ organizationId: organizationId ??
508
+ currentUser?.organization?.organizationId ??
509
+ this.config.organizationId,
413
510
  timestampMs: timestampMs ?? String(Date.now()),
414
511
  type: "ACTIVITY_TYPE_RECOVER_USER",
415
512
  }, "recoverUserResult");
416
513
  };
417
514
  this.rejectActivity = async (input) => {
418
515
  const { organizationId, timestampMs, ...rest } = input;
516
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
419
517
  return this.activityDecision("/public/v1/submit/reject_activity", {
420
518
  parameters: rest,
421
- organizationId: organizationId ?? this.config.organizationId,
519
+ organizationId: organizationId ??
520
+ currentUser?.organization?.organizationId ??
521
+ this.config.organizationId,
422
522
  timestampMs: timestampMs ?? String(Date.now()),
423
523
  type: "ACTIVITY_TYPE_REJECT_ACTIVITY",
424
524
  });
425
525
  };
426
526
  this.removeOrganizationFeature = async (input) => {
427
527
  const { organizationId, timestampMs, ...rest } = input;
528
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
428
529
  return this.command("/public/v1/submit/remove_organization_feature", {
429
530
  parameters: rest,
430
- organizationId: organizationId ?? this.config.organizationId,
531
+ organizationId: organizationId ??
532
+ currentUser?.organization?.organizationId ??
533
+ this.config.organizationId,
431
534
  timestampMs: timestampMs ?? String(Date.now()),
432
535
  type: "ACTIVITY_TYPE_REMOVE_ORGANIZATION_FEATURE",
433
536
  }, "removeOrganizationFeatureResult");
434
537
  };
435
538
  this.setOrganizationFeature = async (input) => {
436
539
  const { organizationId, timestampMs, ...rest } = input;
540
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
437
541
  return this.command("/public/v1/submit/set_organization_feature", {
438
542
  parameters: rest,
439
- organizationId: organizationId ?? this.config.organizationId,
543
+ organizationId: organizationId ??
544
+ currentUser?.organization?.organizationId ??
545
+ this.config.organizationId,
440
546
  timestampMs: timestampMs ?? String(Date.now()),
441
547
  type: "ACTIVITY_TYPE_SET_ORGANIZATION_FEATURE",
442
548
  }, "setOrganizationFeatureResult");
443
549
  };
444
550
  this.signRawPayload = async (input) => {
445
551
  const { organizationId, timestampMs, ...rest } = input;
552
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
446
553
  return this.command("/public/v1/submit/sign_raw_payload", {
447
554
  parameters: rest,
448
- organizationId: organizationId ?? this.config.organizationId,
555
+ organizationId: organizationId ??
556
+ currentUser?.organization?.organizationId ??
557
+ this.config.organizationId,
449
558
  timestampMs: timestampMs ?? String(Date.now()),
450
559
  type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2",
451
560
  }, "signRawPayloadResult");
452
561
  };
453
562
  this.signRawPayloads = async (input) => {
454
563
  const { organizationId, timestampMs, ...rest } = input;
564
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
455
565
  return this.command("/public/v1/submit/sign_raw_payloads", {
456
566
  parameters: rest,
457
- organizationId: organizationId ?? this.config.organizationId,
567
+ organizationId: organizationId ??
568
+ currentUser?.organization?.organizationId ??
569
+ this.config.organizationId,
458
570
  timestampMs: timestampMs ?? String(Date.now()),
459
571
  type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOADS",
460
572
  }, "signRawPayloadsResult");
461
573
  };
462
574
  this.signTransaction = async (input) => {
463
575
  const { organizationId, timestampMs, ...rest } = input;
576
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
464
577
  return this.command("/public/v1/submit/sign_transaction", {
465
578
  parameters: rest,
466
- organizationId: organizationId ?? this.config.organizationId,
579
+ organizationId: organizationId ??
580
+ currentUser?.organization?.organizationId ??
581
+ this.config.organizationId,
467
582
  timestampMs: timestampMs ?? String(Date.now()),
468
583
  type: "ACTIVITY_TYPE_SIGN_TRANSACTION_V2",
469
584
  }, "signTransactionResult");
470
585
  };
471
586
  this.updatePolicy = async (input) => {
472
587
  const { organizationId, timestampMs, ...rest } = input;
588
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
473
589
  return this.command("/public/v1/submit/update_policy", {
474
590
  parameters: rest,
475
- organizationId: organizationId ?? this.config.organizationId,
591
+ organizationId: organizationId ??
592
+ currentUser?.organization?.organizationId ??
593
+ this.config.organizationId,
476
594
  timestampMs: timestampMs ?? String(Date.now()),
477
595
  type: "ACTIVITY_TYPE_UPDATE_POLICY",
478
596
  }, "updatePolicyResult");
479
597
  };
480
598
  this.updatePrivateKeyTag = async (input) => {
481
599
  const { organizationId, timestampMs, ...rest } = input;
600
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
482
601
  return this.command("/public/v1/submit/update_private_key_tag", {
483
602
  parameters: rest,
484
- organizationId: organizationId ?? this.config.organizationId,
603
+ organizationId: organizationId ??
604
+ currentUser?.organization?.organizationId ??
605
+ this.config.organizationId,
485
606
  timestampMs: timestampMs ?? String(Date.now()),
486
607
  type: "ACTIVITY_TYPE_UPDATE_PRIVATE_KEY_TAG",
487
608
  }, "updatePrivateKeyTagResult");
488
609
  };
489
610
  this.updateRootQuorum = async (input) => {
490
611
  const { organizationId, timestampMs, ...rest } = input;
612
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
491
613
  return this.command("/public/v1/submit/update_root_quorum", {
492
614
  parameters: rest,
493
- organizationId: organizationId ?? this.config.organizationId,
615
+ organizationId: organizationId ??
616
+ currentUser?.organization?.organizationId ??
617
+ this.config.organizationId,
494
618
  timestampMs: timestampMs ?? String(Date.now()),
495
619
  type: "ACTIVITY_TYPE_UPDATE_ROOT_QUORUM",
496
620
  }, "updateRootQuorumResult");
497
621
  };
498
622
  this.updateUser = async (input) => {
499
623
  const { organizationId, timestampMs, ...rest } = input;
624
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
500
625
  return this.command("/public/v1/submit/update_user", {
501
626
  parameters: rest,
502
- organizationId: organizationId ?? this.config.organizationId,
627
+ organizationId: organizationId ??
628
+ currentUser?.organization?.organizationId ??
629
+ this.config.organizationId,
503
630
  timestampMs: timestampMs ?? String(Date.now()),
504
631
  type: "ACTIVITY_TYPE_UPDATE_USER",
505
632
  }, "updateUserResult");
506
633
  };
507
634
  this.updateUserTag = async (input) => {
508
635
  const { organizationId, timestampMs, ...rest } = input;
636
+ const currentUser = await storage.getStorageValue(storage.StorageKeys.CurrentUser);
509
637
  return this.command("/public/v1/submit/update_user_tag", {
510
638
  parameters: rest,
511
- organizationId: organizationId ?? this.config.organizationId,
639
+ organizationId: organizationId ??
640
+ currentUser?.organization?.organizationId ??
641
+ this.config.organizationId,
512
642
  timestampMs: timestampMs ?? String(Date.now()),
513
643
  type: "ACTIVITY_TYPE_UPDATE_USER_TAG",
514
644
  }, "updateUserTagResult");