@turnkey/core 1.12.0 → 1.13.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.
@@ -1216,6 +1216,40 @@ class TurnkeySDKClientBase {
1216
1216
  url: fullUrl,
1217
1217
  };
1218
1218
  };
1219
+ this.createApiOnlyUsers = async (input, stampWith) => {
1220
+ const { organizationId, timestampMs, ...rest } = input;
1221
+ const session = await this.storageManager?.getActiveSession();
1222
+ return this.activity("/public/v1/submit/create_api_only_users", {
1223
+ parameters: rest,
1224
+ organizationId: organizationId ??
1225
+ session?.organizationId ??
1226
+ this.config.organizationId,
1227
+ timestampMs: timestampMs ?? String(Date.now()),
1228
+ type: "ACTIVITY_TYPE_CREATE_API_ONLY_USERS",
1229
+ }, "createApiOnlyUsersResult", stampWith);
1230
+ };
1231
+ this.stampCreateApiOnlyUsers = async (input, stampWith) => {
1232
+ const activeStamper = this.getStamper(stampWith);
1233
+ if (!activeStamper) {
1234
+ return undefined;
1235
+ }
1236
+ const { organizationId, timestampMs, ...parameters } = input;
1237
+ const session = await this.storageManager?.getActiveSession();
1238
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_api_only_users";
1239
+ const bodyWithType = {
1240
+ parameters,
1241
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
1242
+ timestampMs: timestampMs ?? String(Date.now()),
1243
+ type: "ACTIVITY_TYPE_CREATE_API_ONLY_USERS",
1244
+ };
1245
+ const stringifiedBody = JSON.stringify(bodyWithType);
1246
+ const stamp = await activeStamper.stamp(stringifiedBody);
1247
+ return {
1248
+ body: stringifiedBody,
1249
+ stamp: stamp,
1250
+ url: fullUrl,
1251
+ };
1252
+ };
1219
1253
  this.createAuthenticators = async (input, stampWith) => {
1220
1254
  const { organizationId, timestampMs, ...rest } = input;
1221
1255
  const session = await this.storageManager?.getActiveSession();
@@ -3329,6 +3363,40 @@ class TurnkeySDKClientBase {
3329
3363
  url: fullUrl,
3330
3364
  };
3331
3365
  };
3366
+ this.updateOrganizationName = async (input, stampWith) => {
3367
+ const { organizationId, timestampMs, ...rest } = input;
3368
+ const session = await this.storageManager?.getActiveSession();
3369
+ return this.activity("/public/v1/submit/update_organization_name", {
3370
+ parameters: rest,
3371
+ organizationId: organizationId ??
3372
+ session?.organizationId ??
3373
+ this.config.organizationId,
3374
+ timestampMs: timestampMs ?? String(Date.now()),
3375
+ type: "ACTIVITY_TYPE_UPDATE_ORGANIZATION_NAME",
3376
+ }, "updateOrganizationNameResult", stampWith);
3377
+ };
3378
+ this.stampUpdateOrganizationName = async (input, stampWith) => {
3379
+ const activeStamper = this.getStamper(stampWith);
3380
+ if (!activeStamper) {
3381
+ return undefined;
3382
+ }
3383
+ const { organizationId, timestampMs, ...parameters } = input;
3384
+ const session = await this.storageManager?.getActiveSession();
3385
+ const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/update_organization_name";
3386
+ const bodyWithType = {
3387
+ parameters,
3388
+ organizationId: organizationId ?? session?.organizationId ?? this.config.organizationId,
3389
+ timestampMs: timestampMs ?? String(Date.now()),
3390
+ type: "ACTIVITY_TYPE_UPDATE_ORGANIZATION_NAME",
3391
+ };
3392
+ const stringifiedBody = JSON.stringify(bodyWithType);
3393
+ const stamp = await activeStamper.stamp(stringifiedBody);
3394
+ return {
3395
+ body: stringifiedBody,
3396
+ stamp: stamp,
3397
+ url: fullUrl,
3398
+ };
3399
+ };
3332
3400
  this.updatePolicy = async (input, stampWith) => {
3333
3401
  const { organizationId, timestampMs, ...rest } = input;
3334
3402
  const session = await this.storageManager?.getActiveSession();