@zyphr-dev/node-sdk 0.1.32 → 0.1.33
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.cjs +1624 -84
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1780 -237
- package/dist/index.d.ts +1780 -237
- package/dist/index.js +1530 -84
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/.openapi-generator/FILES +20 -0
- package/src/client.ts +5 -0
- package/src/src/apis/AuthOrganizationsApi.ts +823 -0
- package/src/src/apis/AuthUserProfileApi.ts +62 -0
- package/src/src/apis/MuseApi.ts +531 -0
- package/src/src/apis/index.ts +2 -0
- package/src/src/models/AddOrganizationMemberRequest.ts +74 -0
- package/src/src/models/CreateOrganizationRequest.ts +82 -0
- package/src/src/models/LoginRequest.ts +12 -0
- package/src/src/models/Organization.ts +137 -0
- package/src/src/models/OrganizationListResponse.ts +90 -0
- package/src/src/models/OrganizationListResponseMeta.ts +73 -0
- package/src/src/models/OrganizationMembersListResponse.ts +90 -0
- package/src/src/models/OrganizationMembership.ts +119 -0
- package/src/src/models/OrganizationMembershipResponse.ts +90 -0
- package/src/src/models/OrganizationMembershipWithUser.ts +135 -0
- package/src/src/models/OrganizationResponse.ts +90 -0
- package/src/src/models/RegisterRequest.ts +23 -0
- package/src/src/models/SwitchOrganizationRequest.ts +75 -0
- package/src/src/models/SwitchOrganizationResponse.ts +90 -0
- package/src/src/models/SwitchOrganizationResponseData.ts +99 -0
- package/src/src/models/SwitchOrganizationResponseDataTokens.ts +103 -0
- package/src/src/models/SwitchOrganizationResponseDataUser.ts +73 -0
- package/src/src/models/UpdateOrganizationMemberRoleRequest.ts +66 -0
- package/src/src/models/UpdateOrganizationRequest.ts +81 -0
- package/src/src/models/V1MuseSubjectsSuggestPostRequest.ts +105 -0
- package/src/src/models/index.ts +18 -0
package/dist/index.js
CHANGED
|
@@ -502,6 +502,36 @@ function AddDomainRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
502
502
|
};
|
|
503
503
|
}
|
|
504
504
|
|
|
505
|
+
// src/src/models/AddOrganizationMemberRequest.ts
|
|
506
|
+
function instanceOfAddOrganizationMemberRequest(value) {
|
|
507
|
+
if (!("userId" in value) || value["userId"] === void 0) return false;
|
|
508
|
+
return true;
|
|
509
|
+
}
|
|
510
|
+
function AddOrganizationMemberRequestFromJSON(json) {
|
|
511
|
+
return AddOrganizationMemberRequestFromJSONTyped(json, false);
|
|
512
|
+
}
|
|
513
|
+
function AddOrganizationMemberRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
514
|
+
if (json == null) {
|
|
515
|
+
return json;
|
|
516
|
+
}
|
|
517
|
+
return {
|
|
518
|
+
"userId": json["user_id"],
|
|
519
|
+
"role": json["role"] == null ? void 0 : json["role"]
|
|
520
|
+
};
|
|
521
|
+
}
|
|
522
|
+
function AddOrganizationMemberRequestToJSON(json) {
|
|
523
|
+
return AddOrganizationMemberRequestToJSONTyped(json, false);
|
|
524
|
+
}
|
|
525
|
+
function AddOrganizationMemberRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
526
|
+
if (value == null) {
|
|
527
|
+
return value;
|
|
528
|
+
}
|
|
529
|
+
return {
|
|
530
|
+
"user_id": value["userId"],
|
|
531
|
+
"role": value["role"]
|
|
532
|
+
};
|
|
533
|
+
}
|
|
534
|
+
|
|
505
535
|
// src/src/models/AddTopicSubscribersRequest.ts
|
|
506
536
|
function instanceOfAddTopicSubscribersRequest(value) {
|
|
507
537
|
if (!("subscriberIds" in value) || value["subscriberIds"] === void 0) return false;
|
|
@@ -2484,6 +2514,38 @@ function CreateCategoryRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
2484
2514
|
};
|
|
2485
2515
|
}
|
|
2486
2516
|
|
|
2517
|
+
// src/src/models/CreateOrganizationRequest.ts
|
|
2518
|
+
function instanceOfCreateOrganizationRequest(value) {
|
|
2519
|
+
if (!("name" in value) || value["name"] === void 0) return false;
|
|
2520
|
+
return true;
|
|
2521
|
+
}
|
|
2522
|
+
function CreateOrganizationRequestFromJSON(json) {
|
|
2523
|
+
return CreateOrganizationRequestFromJSONTyped(json, false);
|
|
2524
|
+
}
|
|
2525
|
+
function CreateOrganizationRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
2526
|
+
if (json == null) {
|
|
2527
|
+
return json;
|
|
2528
|
+
}
|
|
2529
|
+
return {
|
|
2530
|
+
"name": json["name"],
|
|
2531
|
+
"slug": json["slug"] == null ? void 0 : json["slug"],
|
|
2532
|
+
"metadata": json["metadata"] == null ? void 0 : json["metadata"]
|
|
2533
|
+
};
|
|
2534
|
+
}
|
|
2535
|
+
function CreateOrganizationRequestToJSON(json) {
|
|
2536
|
+
return CreateOrganizationRequestToJSONTyped(json, false);
|
|
2537
|
+
}
|
|
2538
|
+
function CreateOrganizationRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2539
|
+
if (value == null) {
|
|
2540
|
+
return value;
|
|
2541
|
+
}
|
|
2542
|
+
return {
|
|
2543
|
+
"name": value["name"],
|
|
2544
|
+
"slug": value["slug"],
|
|
2545
|
+
"metadata": value["metadata"]
|
|
2546
|
+
};
|
|
2547
|
+
}
|
|
2548
|
+
|
|
2487
2549
|
// src/src/models/CreateSubscriberRequest.ts
|
|
2488
2550
|
function instanceOfCreateSubscriberRequest(value) {
|
|
2489
2551
|
if (!("externalId" in value) || value["externalId"] === void 0) return false;
|
|
@@ -4914,7 +4976,8 @@ function LoginRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
4914
4976
|
return {
|
|
4915
4977
|
"email": json["email"],
|
|
4916
4978
|
"password": json["password"],
|
|
4917
|
-
"customClaims": json["custom_claims"] == null ? void 0 : json["custom_claims"]
|
|
4979
|
+
"customClaims": json["custom_claims"] == null ? void 0 : json["custom_claims"],
|
|
4980
|
+
"organizationId": json["organization_id"] == null ? void 0 : json["organization_id"]
|
|
4918
4981
|
};
|
|
4919
4982
|
}
|
|
4920
4983
|
function LoginRequestToJSON(json) {
|
|
@@ -4927,7 +4990,8 @@ function LoginRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
4927
4990
|
return {
|
|
4928
4991
|
"email": value["email"],
|
|
4929
4992
|
"password": value["password"],
|
|
4930
|
-
"custom_claims": value["customClaims"]
|
|
4993
|
+
"custom_claims": value["customClaims"],
|
|
4994
|
+
"organization_id": value["organizationId"]
|
|
4931
4995
|
};
|
|
4932
4996
|
}
|
|
4933
4997
|
|
|
@@ -6298,6 +6362,304 @@ function OAuthTokensResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
6298
6362
|
};
|
|
6299
6363
|
}
|
|
6300
6364
|
|
|
6365
|
+
// src/src/models/Organization.ts
|
|
6366
|
+
function instanceOfOrganization(value) {
|
|
6367
|
+
if (!("id" in value) || value["id"] === void 0) return false;
|
|
6368
|
+
if (!("applicationId" in value) || value["applicationId"] === void 0) return false;
|
|
6369
|
+
if (!("environmentId" in value) || value["environmentId"] === void 0) return false;
|
|
6370
|
+
if (!("name" in value) || value["name"] === void 0) return false;
|
|
6371
|
+
if (!("metadata" in value) || value["metadata"] === void 0) return false;
|
|
6372
|
+
if (!("isDefault" in value) || value["isDefault"] === void 0) return false;
|
|
6373
|
+
if (!("createdAt" in value) || value["createdAt"] === void 0) return false;
|
|
6374
|
+
if (!("updatedAt" in value) || value["updatedAt"] === void 0) return false;
|
|
6375
|
+
return true;
|
|
6376
|
+
}
|
|
6377
|
+
function OrganizationFromJSON(json) {
|
|
6378
|
+
return OrganizationFromJSONTyped(json, false);
|
|
6379
|
+
}
|
|
6380
|
+
function OrganizationFromJSONTyped(json, ignoreDiscriminator) {
|
|
6381
|
+
if (json == null) {
|
|
6382
|
+
return json;
|
|
6383
|
+
}
|
|
6384
|
+
return {
|
|
6385
|
+
"id": json["id"],
|
|
6386
|
+
"applicationId": json["application_id"],
|
|
6387
|
+
"environmentId": json["environment_id"],
|
|
6388
|
+
"name": json["name"],
|
|
6389
|
+
"slug": json["slug"] == null ? void 0 : json["slug"],
|
|
6390
|
+
"metadata": json["metadata"],
|
|
6391
|
+
"isDefault": json["is_default"],
|
|
6392
|
+
"createdAt": new Date(json["created_at"]),
|
|
6393
|
+
"updatedAt": new Date(json["updated_at"])
|
|
6394
|
+
};
|
|
6395
|
+
}
|
|
6396
|
+
function OrganizationToJSON(json) {
|
|
6397
|
+
return OrganizationToJSONTyped(json, false);
|
|
6398
|
+
}
|
|
6399
|
+
function OrganizationToJSONTyped(value, ignoreDiscriminator = false) {
|
|
6400
|
+
if (value == null) {
|
|
6401
|
+
return value;
|
|
6402
|
+
}
|
|
6403
|
+
return {
|
|
6404
|
+
"id": value["id"],
|
|
6405
|
+
"application_id": value["applicationId"],
|
|
6406
|
+
"environment_id": value["environmentId"],
|
|
6407
|
+
"name": value["name"],
|
|
6408
|
+
"slug": value["slug"],
|
|
6409
|
+
"metadata": value["metadata"],
|
|
6410
|
+
"is_default": value["isDefault"],
|
|
6411
|
+
"created_at": value["createdAt"].toISOString(),
|
|
6412
|
+
"updated_at": value["updatedAt"].toISOString()
|
|
6413
|
+
};
|
|
6414
|
+
}
|
|
6415
|
+
|
|
6416
|
+
// src/src/models/OrganizationListResponseMeta.ts
|
|
6417
|
+
function instanceOfOrganizationListResponseMeta(value) {
|
|
6418
|
+
return true;
|
|
6419
|
+
}
|
|
6420
|
+
function OrganizationListResponseMetaFromJSON(json) {
|
|
6421
|
+
return OrganizationListResponseMetaFromJSONTyped(json, false);
|
|
6422
|
+
}
|
|
6423
|
+
function OrganizationListResponseMetaFromJSONTyped(json, ignoreDiscriminator) {
|
|
6424
|
+
if (json == null) {
|
|
6425
|
+
return json;
|
|
6426
|
+
}
|
|
6427
|
+
return {
|
|
6428
|
+
"requestId": json["request_id"] == null ? void 0 : json["request_id"],
|
|
6429
|
+
"nextCursor": json["next_cursor"] == null ? void 0 : json["next_cursor"]
|
|
6430
|
+
};
|
|
6431
|
+
}
|
|
6432
|
+
function OrganizationListResponseMetaToJSON(json) {
|
|
6433
|
+
return OrganizationListResponseMetaToJSONTyped(json, false);
|
|
6434
|
+
}
|
|
6435
|
+
function OrganizationListResponseMetaToJSONTyped(value, ignoreDiscriminator = false) {
|
|
6436
|
+
if (value == null) {
|
|
6437
|
+
return value;
|
|
6438
|
+
}
|
|
6439
|
+
return {
|
|
6440
|
+
"request_id": value["requestId"],
|
|
6441
|
+
"next_cursor": value["nextCursor"]
|
|
6442
|
+
};
|
|
6443
|
+
}
|
|
6444
|
+
|
|
6445
|
+
// src/src/models/OrganizationListResponse.ts
|
|
6446
|
+
function instanceOfOrganizationListResponse(value) {
|
|
6447
|
+
if (!("data" in value) || value["data"] === void 0) return false;
|
|
6448
|
+
if (!("meta" in value) || value["meta"] === void 0) return false;
|
|
6449
|
+
return true;
|
|
6450
|
+
}
|
|
6451
|
+
function OrganizationListResponseFromJSON(json) {
|
|
6452
|
+
return OrganizationListResponseFromJSONTyped(json, false);
|
|
6453
|
+
}
|
|
6454
|
+
function OrganizationListResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
6455
|
+
if (json == null) {
|
|
6456
|
+
return json;
|
|
6457
|
+
}
|
|
6458
|
+
return {
|
|
6459
|
+
"data": json["data"].map(OrganizationFromJSON),
|
|
6460
|
+
"meta": OrganizationListResponseMetaFromJSON(json["meta"])
|
|
6461
|
+
};
|
|
6462
|
+
}
|
|
6463
|
+
function OrganizationListResponseToJSON(json) {
|
|
6464
|
+
return OrganizationListResponseToJSONTyped(json, false);
|
|
6465
|
+
}
|
|
6466
|
+
function OrganizationListResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
6467
|
+
if (value == null) {
|
|
6468
|
+
return value;
|
|
6469
|
+
}
|
|
6470
|
+
return {
|
|
6471
|
+
"data": value["data"].map(OrganizationToJSON),
|
|
6472
|
+
"meta": OrganizationListResponseMetaToJSON(value["meta"])
|
|
6473
|
+
};
|
|
6474
|
+
}
|
|
6475
|
+
|
|
6476
|
+
// src/src/models/OrganizationMembershipWithUser.ts
|
|
6477
|
+
function instanceOfOrganizationMembershipWithUser(value) {
|
|
6478
|
+
if (!("id" in value) || value["id"] === void 0) return false;
|
|
6479
|
+
if (!("organizationId" in value) || value["organizationId"] === void 0) return false;
|
|
6480
|
+
if (!("endUserId" in value) || value["endUserId"] === void 0) return false;
|
|
6481
|
+
if (!("environmentId" in value) || value["environmentId"] === void 0) return false;
|
|
6482
|
+
if (!("createdAt" in value) || value["createdAt"] === void 0) return false;
|
|
6483
|
+
if (!("updatedAt" in value) || value["updatedAt"] === void 0) return false;
|
|
6484
|
+
return true;
|
|
6485
|
+
}
|
|
6486
|
+
function OrganizationMembershipWithUserFromJSON(json) {
|
|
6487
|
+
return OrganizationMembershipWithUserFromJSONTyped(json, false);
|
|
6488
|
+
}
|
|
6489
|
+
function OrganizationMembershipWithUserFromJSONTyped(json, ignoreDiscriminator) {
|
|
6490
|
+
if (json == null) {
|
|
6491
|
+
return json;
|
|
6492
|
+
}
|
|
6493
|
+
return {
|
|
6494
|
+
"id": json["id"],
|
|
6495
|
+
"organizationId": json["organization_id"],
|
|
6496
|
+
"endUserId": json["end_user_id"],
|
|
6497
|
+
"environmentId": json["environment_id"],
|
|
6498
|
+
"role": json["role"] == null ? void 0 : json["role"],
|
|
6499
|
+
"createdAt": new Date(json["created_at"]),
|
|
6500
|
+
"updatedAt": new Date(json["updated_at"]),
|
|
6501
|
+
"email": json["email"] == null ? void 0 : json["email"],
|
|
6502
|
+
"name": json["name"] == null ? void 0 : json["name"]
|
|
6503
|
+
};
|
|
6504
|
+
}
|
|
6505
|
+
function OrganizationMembershipWithUserToJSON(json) {
|
|
6506
|
+
return OrganizationMembershipWithUserToJSONTyped(json, false);
|
|
6507
|
+
}
|
|
6508
|
+
function OrganizationMembershipWithUserToJSONTyped(value, ignoreDiscriminator = false) {
|
|
6509
|
+
if (value == null) {
|
|
6510
|
+
return value;
|
|
6511
|
+
}
|
|
6512
|
+
return {
|
|
6513
|
+
"id": value["id"],
|
|
6514
|
+
"organization_id": value["organizationId"],
|
|
6515
|
+
"end_user_id": value["endUserId"],
|
|
6516
|
+
"environment_id": value["environmentId"],
|
|
6517
|
+
"role": value["role"],
|
|
6518
|
+
"created_at": value["createdAt"].toISOString(),
|
|
6519
|
+
"updated_at": value["updatedAt"].toISOString(),
|
|
6520
|
+
"email": value["email"],
|
|
6521
|
+
"name": value["name"]
|
|
6522
|
+
};
|
|
6523
|
+
}
|
|
6524
|
+
|
|
6525
|
+
// src/src/models/OrganizationMembersListResponse.ts
|
|
6526
|
+
function instanceOfOrganizationMembersListResponse(value) {
|
|
6527
|
+
if (!("data" in value) || value["data"] === void 0) return false;
|
|
6528
|
+
if (!("meta" in value) || value["meta"] === void 0) return false;
|
|
6529
|
+
return true;
|
|
6530
|
+
}
|
|
6531
|
+
function OrganizationMembersListResponseFromJSON(json) {
|
|
6532
|
+
return OrganizationMembersListResponseFromJSONTyped(json, false);
|
|
6533
|
+
}
|
|
6534
|
+
function OrganizationMembersListResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
6535
|
+
if (json == null) {
|
|
6536
|
+
return json;
|
|
6537
|
+
}
|
|
6538
|
+
return {
|
|
6539
|
+
"data": json["data"].map(OrganizationMembershipWithUserFromJSON),
|
|
6540
|
+
"meta": OrganizationListResponseMetaFromJSON(json["meta"])
|
|
6541
|
+
};
|
|
6542
|
+
}
|
|
6543
|
+
function OrganizationMembersListResponseToJSON(json) {
|
|
6544
|
+
return OrganizationMembersListResponseToJSONTyped(json, false);
|
|
6545
|
+
}
|
|
6546
|
+
function OrganizationMembersListResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
6547
|
+
if (value == null) {
|
|
6548
|
+
return value;
|
|
6549
|
+
}
|
|
6550
|
+
return {
|
|
6551
|
+
"data": value["data"].map(OrganizationMembershipWithUserToJSON),
|
|
6552
|
+
"meta": OrganizationListResponseMetaToJSON(value["meta"])
|
|
6553
|
+
};
|
|
6554
|
+
}
|
|
6555
|
+
|
|
6556
|
+
// src/src/models/OrganizationMembership.ts
|
|
6557
|
+
function instanceOfOrganizationMembership(value) {
|
|
6558
|
+
if (!("id" in value) || value["id"] === void 0) return false;
|
|
6559
|
+
if (!("organizationId" in value) || value["organizationId"] === void 0) return false;
|
|
6560
|
+
if (!("endUserId" in value) || value["endUserId"] === void 0) return false;
|
|
6561
|
+
if (!("environmentId" in value) || value["environmentId"] === void 0) return false;
|
|
6562
|
+
if (!("createdAt" in value) || value["createdAt"] === void 0) return false;
|
|
6563
|
+
if (!("updatedAt" in value) || value["updatedAt"] === void 0) return false;
|
|
6564
|
+
return true;
|
|
6565
|
+
}
|
|
6566
|
+
function OrganizationMembershipFromJSON(json) {
|
|
6567
|
+
return OrganizationMembershipFromJSONTyped(json, false);
|
|
6568
|
+
}
|
|
6569
|
+
function OrganizationMembershipFromJSONTyped(json, ignoreDiscriminator) {
|
|
6570
|
+
if (json == null) {
|
|
6571
|
+
return json;
|
|
6572
|
+
}
|
|
6573
|
+
return {
|
|
6574
|
+
"id": json["id"],
|
|
6575
|
+
"organizationId": json["organization_id"],
|
|
6576
|
+
"endUserId": json["end_user_id"],
|
|
6577
|
+
"environmentId": json["environment_id"],
|
|
6578
|
+
"role": json["role"] == null ? void 0 : json["role"],
|
|
6579
|
+
"createdAt": new Date(json["created_at"]),
|
|
6580
|
+
"updatedAt": new Date(json["updated_at"])
|
|
6581
|
+
};
|
|
6582
|
+
}
|
|
6583
|
+
function OrganizationMembershipToJSON(json) {
|
|
6584
|
+
return OrganizationMembershipToJSONTyped(json, false);
|
|
6585
|
+
}
|
|
6586
|
+
function OrganizationMembershipToJSONTyped(value, ignoreDiscriminator = false) {
|
|
6587
|
+
if (value == null) {
|
|
6588
|
+
return value;
|
|
6589
|
+
}
|
|
6590
|
+
return {
|
|
6591
|
+
"id": value["id"],
|
|
6592
|
+
"organization_id": value["organizationId"],
|
|
6593
|
+
"end_user_id": value["endUserId"],
|
|
6594
|
+
"environment_id": value["environmentId"],
|
|
6595
|
+
"role": value["role"],
|
|
6596
|
+
"created_at": value["createdAt"].toISOString(),
|
|
6597
|
+
"updated_at": value["updatedAt"].toISOString()
|
|
6598
|
+
};
|
|
6599
|
+
}
|
|
6600
|
+
|
|
6601
|
+
// src/src/models/OrganizationMembershipResponse.ts
|
|
6602
|
+
function instanceOfOrganizationMembershipResponse(value) {
|
|
6603
|
+
if (!("data" in value) || value["data"] === void 0) return false;
|
|
6604
|
+
if (!("meta" in value) || value["meta"] === void 0) return false;
|
|
6605
|
+
return true;
|
|
6606
|
+
}
|
|
6607
|
+
function OrganizationMembershipResponseFromJSON(json) {
|
|
6608
|
+
return OrganizationMembershipResponseFromJSONTyped(json, false);
|
|
6609
|
+
}
|
|
6610
|
+
function OrganizationMembershipResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
6611
|
+
if (json == null) {
|
|
6612
|
+
return json;
|
|
6613
|
+
}
|
|
6614
|
+
return {
|
|
6615
|
+
"data": OrganizationMembershipFromJSON(json["data"]),
|
|
6616
|
+
"meta": GetDomain200ResponseMetaFromJSON(json["meta"])
|
|
6617
|
+
};
|
|
6618
|
+
}
|
|
6619
|
+
function OrganizationMembershipResponseToJSON(json) {
|
|
6620
|
+
return OrganizationMembershipResponseToJSONTyped(json, false);
|
|
6621
|
+
}
|
|
6622
|
+
function OrganizationMembershipResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
6623
|
+
if (value == null) {
|
|
6624
|
+
return value;
|
|
6625
|
+
}
|
|
6626
|
+
return {
|
|
6627
|
+
"data": OrganizationMembershipToJSON(value["data"]),
|
|
6628
|
+
"meta": GetDomain200ResponseMetaToJSON(value["meta"])
|
|
6629
|
+
};
|
|
6630
|
+
}
|
|
6631
|
+
|
|
6632
|
+
// src/src/models/OrganizationResponse.ts
|
|
6633
|
+
function instanceOfOrganizationResponse(value) {
|
|
6634
|
+
if (!("data" in value) || value["data"] === void 0) return false;
|
|
6635
|
+
if (!("meta" in value) || value["meta"] === void 0) return false;
|
|
6636
|
+
return true;
|
|
6637
|
+
}
|
|
6638
|
+
function OrganizationResponseFromJSON(json) {
|
|
6639
|
+
return OrganizationResponseFromJSONTyped(json, false);
|
|
6640
|
+
}
|
|
6641
|
+
function OrganizationResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
6642
|
+
if (json == null) {
|
|
6643
|
+
return json;
|
|
6644
|
+
}
|
|
6645
|
+
return {
|
|
6646
|
+
"data": OrganizationFromJSON(json["data"]),
|
|
6647
|
+
"meta": GetDomain200ResponseMetaFromJSON(json["meta"])
|
|
6648
|
+
};
|
|
6649
|
+
}
|
|
6650
|
+
function OrganizationResponseToJSON(json) {
|
|
6651
|
+
return OrganizationResponseToJSONTyped(json, false);
|
|
6652
|
+
}
|
|
6653
|
+
function OrganizationResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
6654
|
+
if (value == null) {
|
|
6655
|
+
return value;
|
|
6656
|
+
}
|
|
6657
|
+
return {
|
|
6658
|
+
"data": OrganizationToJSON(value["data"]),
|
|
6659
|
+
"meta": GetDomain200ResponseMetaToJSON(value["meta"])
|
|
6660
|
+
};
|
|
6661
|
+
}
|
|
6662
|
+
|
|
6301
6663
|
// src/src/models/PasswordRequirements.ts
|
|
6302
6664
|
function instanceOfPasswordRequirements(value) {
|
|
6303
6665
|
return true;
|
|
@@ -7545,7 +7907,9 @@ function RegisterRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
7545
7907
|
"email": json["email"],
|
|
7546
7908
|
"password": json["password"],
|
|
7547
7909
|
"name": json["name"] == null ? void 0 : json["name"],
|
|
7548
|
-
"metadata": json["metadata"] == null ? void 0 : json["metadata"]
|
|
7910
|
+
"metadata": json["metadata"] == null ? void 0 : json["metadata"],
|
|
7911
|
+
"organizationId": json["organization_id"] == null ? void 0 : json["organization_id"],
|
|
7912
|
+
"organizationRole": json["organization_role"] == null ? void 0 : json["organization_role"]
|
|
7549
7913
|
};
|
|
7550
7914
|
}
|
|
7551
7915
|
function RegisterRequestToJSON(json) {
|
|
@@ -7559,7 +7923,9 @@ function RegisterRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
7559
7923
|
"email": value["email"],
|
|
7560
7924
|
"password": value["password"],
|
|
7561
7925
|
"name": value["name"],
|
|
7562
|
-
"metadata": value["metadata"]
|
|
7926
|
+
"metadata": value["metadata"],
|
|
7927
|
+
"organization_id": value["organizationId"],
|
|
7928
|
+
"organization_role": value["organizationRole"]
|
|
7563
7929
|
};
|
|
7564
7930
|
}
|
|
7565
7931
|
|
|
@@ -10046,44 +10412,209 @@ function SuccessResultToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
10046
10412
|
};
|
|
10047
10413
|
}
|
|
10048
10414
|
|
|
10049
|
-
// src/src/models/
|
|
10050
|
-
function
|
|
10415
|
+
// src/src/models/SwitchOrganizationRequest.ts
|
|
10416
|
+
function instanceOfSwitchOrganizationRequest(value) {
|
|
10417
|
+
if (!("refreshToken" in value) || value["refreshToken"] === void 0) return false;
|
|
10418
|
+
if (!("organizationId" in value) || value["organizationId"] === void 0) return false;
|
|
10051
10419
|
return true;
|
|
10052
10420
|
}
|
|
10053
|
-
function
|
|
10054
|
-
return
|
|
10421
|
+
function SwitchOrganizationRequestFromJSON(json) {
|
|
10422
|
+
return SwitchOrganizationRequestFromJSONTyped(json, false);
|
|
10055
10423
|
}
|
|
10056
|
-
function
|
|
10424
|
+
function SwitchOrganizationRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
10057
10425
|
if (json == null) {
|
|
10058
10426
|
return json;
|
|
10059
10427
|
}
|
|
10060
10428
|
return {
|
|
10061
|
-
"
|
|
10062
|
-
"
|
|
10063
|
-
"description": json["description"] == null ? void 0 : json["description"],
|
|
10064
|
-
"subject": json["subject"] == null ? void 0 : json["subject"],
|
|
10065
|
-
"html": json["html"] == null ? void 0 : json["html"],
|
|
10066
|
-
"text": json["text"] == null ? void 0 : json["text"],
|
|
10067
|
-
"variables": json["variables"] == null ? void 0 : json["variables"],
|
|
10068
|
-
"version": json["version"] == null ? void 0 : json["version"],
|
|
10069
|
-
"createdAt": json["created_at"] == null ? void 0 : new Date(json["created_at"]),
|
|
10070
|
-
"updatedAt": json["updated_at"] == null ? void 0 : new Date(json["updated_at"])
|
|
10429
|
+
"refreshToken": json["refresh_token"],
|
|
10430
|
+
"organizationId": json["organization_id"]
|
|
10071
10431
|
};
|
|
10072
10432
|
}
|
|
10073
|
-
function
|
|
10074
|
-
return
|
|
10433
|
+
function SwitchOrganizationRequestToJSON(json) {
|
|
10434
|
+
return SwitchOrganizationRequestToJSONTyped(json, false);
|
|
10075
10435
|
}
|
|
10076
|
-
function
|
|
10436
|
+
function SwitchOrganizationRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
10077
10437
|
if (value == null) {
|
|
10078
10438
|
return value;
|
|
10079
10439
|
}
|
|
10080
10440
|
return {
|
|
10081
|
-
"
|
|
10082
|
-
"
|
|
10083
|
-
|
|
10084
|
-
|
|
10085
|
-
|
|
10086
|
-
|
|
10441
|
+
"refresh_token": value["refreshToken"],
|
|
10442
|
+
"organization_id": value["organizationId"]
|
|
10443
|
+
};
|
|
10444
|
+
}
|
|
10445
|
+
|
|
10446
|
+
// src/src/models/SwitchOrganizationResponseDataUser.ts
|
|
10447
|
+
function instanceOfSwitchOrganizationResponseDataUser(value) {
|
|
10448
|
+
return true;
|
|
10449
|
+
}
|
|
10450
|
+
function SwitchOrganizationResponseDataUserFromJSON(json) {
|
|
10451
|
+
return SwitchOrganizationResponseDataUserFromJSONTyped(json, false);
|
|
10452
|
+
}
|
|
10453
|
+
function SwitchOrganizationResponseDataUserFromJSONTyped(json, ignoreDiscriminator) {
|
|
10454
|
+
if (json == null) {
|
|
10455
|
+
return json;
|
|
10456
|
+
}
|
|
10457
|
+
return {
|
|
10458
|
+
"id": json["id"] == null ? void 0 : json["id"],
|
|
10459
|
+
"email": json["email"] == null ? void 0 : json["email"]
|
|
10460
|
+
};
|
|
10461
|
+
}
|
|
10462
|
+
function SwitchOrganizationResponseDataUserToJSON(json) {
|
|
10463
|
+
return SwitchOrganizationResponseDataUserToJSONTyped(json, false);
|
|
10464
|
+
}
|
|
10465
|
+
function SwitchOrganizationResponseDataUserToJSONTyped(value, ignoreDiscriminator = false) {
|
|
10466
|
+
if (value == null) {
|
|
10467
|
+
return value;
|
|
10468
|
+
}
|
|
10469
|
+
return {
|
|
10470
|
+
"id": value["id"],
|
|
10471
|
+
"email": value["email"]
|
|
10472
|
+
};
|
|
10473
|
+
}
|
|
10474
|
+
|
|
10475
|
+
// src/src/models/SwitchOrganizationResponseDataTokens.ts
|
|
10476
|
+
var SwitchOrganizationResponseDataTokensTokenTypeEnum = {
|
|
10477
|
+
BEARER: "Bearer"
|
|
10478
|
+
};
|
|
10479
|
+
function instanceOfSwitchOrganizationResponseDataTokens(value) {
|
|
10480
|
+
if (!("accessToken" in value) || value["accessToken"] === void 0) return false;
|
|
10481
|
+
if (!("refreshToken" in value) || value["refreshToken"] === void 0) return false;
|
|
10482
|
+
if (!("expiresIn" in value) || value["expiresIn"] === void 0) return false;
|
|
10483
|
+
if (!("tokenType" in value) || value["tokenType"] === void 0) return false;
|
|
10484
|
+
return true;
|
|
10485
|
+
}
|
|
10486
|
+
function SwitchOrganizationResponseDataTokensFromJSON(json) {
|
|
10487
|
+
return SwitchOrganizationResponseDataTokensFromJSONTyped(json, false);
|
|
10488
|
+
}
|
|
10489
|
+
function SwitchOrganizationResponseDataTokensFromJSONTyped(json, ignoreDiscriminator) {
|
|
10490
|
+
if (json == null) {
|
|
10491
|
+
return json;
|
|
10492
|
+
}
|
|
10493
|
+
return {
|
|
10494
|
+
"accessToken": json["access_token"],
|
|
10495
|
+
"refreshToken": json["refresh_token"],
|
|
10496
|
+
"expiresIn": json["expires_in"],
|
|
10497
|
+
"tokenType": json["token_type"]
|
|
10498
|
+
};
|
|
10499
|
+
}
|
|
10500
|
+
function SwitchOrganizationResponseDataTokensToJSON(json) {
|
|
10501
|
+
return SwitchOrganizationResponseDataTokensToJSONTyped(json, false);
|
|
10502
|
+
}
|
|
10503
|
+
function SwitchOrganizationResponseDataTokensToJSONTyped(value, ignoreDiscriminator = false) {
|
|
10504
|
+
if (value == null) {
|
|
10505
|
+
return value;
|
|
10506
|
+
}
|
|
10507
|
+
return {
|
|
10508
|
+
"access_token": value["accessToken"],
|
|
10509
|
+
"refresh_token": value["refreshToken"],
|
|
10510
|
+
"expires_in": value["expiresIn"],
|
|
10511
|
+
"token_type": value["tokenType"]
|
|
10512
|
+
};
|
|
10513
|
+
}
|
|
10514
|
+
|
|
10515
|
+
// src/src/models/SwitchOrganizationResponseData.ts
|
|
10516
|
+
function instanceOfSwitchOrganizationResponseData(value) {
|
|
10517
|
+
if (!("tokens" in value) || value["tokens"] === void 0) return false;
|
|
10518
|
+
if (!("organizationId" in value) || value["organizationId"] === void 0) return false;
|
|
10519
|
+
if (!("user" in value) || value["user"] === void 0) return false;
|
|
10520
|
+
return true;
|
|
10521
|
+
}
|
|
10522
|
+
function SwitchOrganizationResponseDataFromJSON(json) {
|
|
10523
|
+
return SwitchOrganizationResponseDataFromJSONTyped(json, false);
|
|
10524
|
+
}
|
|
10525
|
+
function SwitchOrganizationResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
10526
|
+
if (json == null) {
|
|
10527
|
+
return json;
|
|
10528
|
+
}
|
|
10529
|
+
return {
|
|
10530
|
+
"tokens": SwitchOrganizationResponseDataTokensFromJSON(json["tokens"]),
|
|
10531
|
+
"organizationId": json["organization_id"],
|
|
10532
|
+
"user": SwitchOrganizationResponseDataUserFromJSON(json["user"])
|
|
10533
|
+
};
|
|
10534
|
+
}
|
|
10535
|
+
function SwitchOrganizationResponseDataToJSON(json) {
|
|
10536
|
+
return SwitchOrganizationResponseDataToJSONTyped(json, false);
|
|
10537
|
+
}
|
|
10538
|
+
function SwitchOrganizationResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
|
|
10539
|
+
if (value == null) {
|
|
10540
|
+
return value;
|
|
10541
|
+
}
|
|
10542
|
+
return {
|
|
10543
|
+
"tokens": SwitchOrganizationResponseDataTokensToJSON(value["tokens"]),
|
|
10544
|
+
"organization_id": value["organizationId"],
|
|
10545
|
+
"user": SwitchOrganizationResponseDataUserToJSON(value["user"])
|
|
10546
|
+
};
|
|
10547
|
+
}
|
|
10548
|
+
|
|
10549
|
+
// src/src/models/SwitchOrganizationResponse.ts
|
|
10550
|
+
function instanceOfSwitchOrganizationResponse(value) {
|
|
10551
|
+
if (!("data" in value) || value["data"] === void 0) return false;
|
|
10552
|
+
if (!("meta" in value) || value["meta"] === void 0) return false;
|
|
10553
|
+
return true;
|
|
10554
|
+
}
|
|
10555
|
+
function SwitchOrganizationResponseFromJSON(json) {
|
|
10556
|
+
return SwitchOrganizationResponseFromJSONTyped(json, false);
|
|
10557
|
+
}
|
|
10558
|
+
function SwitchOrganizationResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
10559
|
+
if (json == null) {
|
|
10560
|
+
return json;
|
|
10561
|
+
}
|
|
10562
|
+
return {
|
|
10563
|
+
"data": SwitchOrganizationResponseDataFromJSON(json["data"]),
|
|
10564
|
+
"meta": GetDomain200ResponseMetaFromJSON(json["meta"])
|
|
10565
|
+
};
|
|
10566
|
+
}
|
|
10567
|
+
function SwitchOrganizationResponseToJSON(json) {
|
|
10568
|
+
return SwitchOrganizationResponseToJSONTyped(json, false);
|
|
10569
|
+
}
|
|
10570
|
+
function SwitchOrganizationResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
10571
|
+
if (value == null) {
|
|
10572
|
+
return value;
|
|
10573
|
+
}
|
|
10574
|
+
return {
|
|
10575
|
+
"data": SwitchOrganizationResponseDataToJSON(value["data"]),
|
|
10576
|
+
"meta": GetDomain200ResponseMetaToJSON(value["meta"])
|
|
10577
|
+
};
|
|
10578
|
+
}
|
|
10579
|
+
|
|
10580
|
+
// src/src/models/Template.ts
|
|
10581
|
+
function instanceOfTemplate(value) {
|
|
10582
|
+
return true;
|
|
10583
|
+
}
|
|
10584
|
+
function TemplateFromJSON(json) {
|
|
10585
|
+
return TemplateFromJSONTyped(json, false);
|
|
10586
|
+
}
|
|
10587
|
+
function TemplateFromJSONTyped(json, ignoreDiscriminator) {
|
|
10588
|
+
if (json == null) {
|
|
10589
|
+
return json;
|
|
10590
|
+
}
|
|
10591
|
+
return {
|
|
10592
|
+
"id": json["id"] == null ? void 0 : json["id"],
|
|
10593
|
+
"name": json["name"] == null ? void 0 : json["name"],
|
|
10594
|
+
"description": json["description"] == null ? void 0 : json["description"],
|
|
10595
|
+
"subject": json["subject"] == null ? void 0 : json["subject"],
|
|
10596
|
+
"html": json["html"] == null ? void 0 : json["html"],
|
|
10597
|
+
"text": json["text"] == null ? void 0 : json["text"],
|
|
10598
|
+
"variables": json["variables"] == null ? void 0 : json["variables"],
|
|
10599
|
+
"version": json["version"] == null ? void 0 : json["version"],
|
|
10600
|
+
"createdAt": json["created_at"] == null ? void 0 : new Date(json["created_at"]),
|
|
10601
|
+
"updatedAt": json["updated_at"] == null ? void 0 : new Date(json["updated_at"])
|
|
10602
|
+
};
|
|
10603
|
+
}
|
|
10604
|
+
function TemplateToJSON(json) {
|
|
10605
|
+
return TemplateToJSONTyped(json, false);
|
|
10606
|
+
}
|
|
10607
|
+
function TemplateToJSONTyped(value, ignoreDiscriminator = false) {
|
|
10608
|
+
if (value == null) {
|
|
10609
|
+
return value;
|
|
10610
|
+
}
|
|
10611
|
+
return {
|
|
10612
|
+
"id": value["id"],
|
|
10613
|
+
"name": value["name"],
|
|
10614
|
+
"description": value["description"],
|
|
10615
|
+
"subject": value["subject"],
|
|
10616
|
+
"html": value["html"],
|
|
10617
|
+
"text": value["text"],
|
|
10087
10618
|
"version": value["version"],
|
|
10088
10619
|
"created_at": value["createdAt"] == null ? void 0 : value["createdAt"].toISOString(),
|
|
10089
10620
|
"updated_at": value["updatedAt"] == null ? void 0 : value["updatedAt"].toISOString()
|
|
@@ -10920,6 +11451,65 @@ function UpdateEndUserRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
10920
11451
|
};
|
|
10921
11452
|
}
|
|
10922
11453
|
|
|
11454
|
+
// src/src/models/UpdateOrganizationMemberRoleRequest.ts
|
|
11455
|
+
function instanceOfUpdateOrganizationMemberRoleRequest(value) {
|
|
11456
|
+
if (!("role" in value) || value["role"] === void 0) return false;
|
|
11457
|
+
return true;
|
|
11458
|
+
}
|
|
11459
|
+
function UpdateOrganizationMemberRoleRequestFromJSON(json) {
|
|
11460
|
+
return UpdateOrganizationMemberRoleRequestFromJSONTyped(json, false);
|
|
11461
|
+
}
|
|
11462
|
+
function UpdateOrganizationMemberRoleRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
11463
|
+
if (json == null) {
|
|
11464
|
+
return json;
|
|
11465
|
+
}
|
|
11466
|
+
return {
|
|
11467
|
+
"role": json["role"]
|
|
11468
|
+
};
|
|
11469
|
+
}
|
|
11470
|
+
function UpdateOrganizationMemberRoleRequestToJSON(json) {
|
|
11471
|
+
return UpdateOrganizationMemberRoleRequestToJSONTyped(json, false);
|
|
11472
|
+
}
|
|
11473
|
+
function UpdateOrganizationMemberRoleRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
11474
|
+
if (value == null) {
|
|
11475
|
+
return value;
|
|
11476
|
+
}
|
|
11477
|
+
return {
|
|
11478
|
+
"role": value["role"]
|
|
11479
|
+
};
|
|
11480
|
+
}
|
|
11481
|
+
|
|
11482
|
+
// src/src/models/UpdateOrganizationRequest.ts
|
|
11483
|
+
function instanceOfUpdateOrganizationRequest(value) {
|
|
11484
|
+
return true;
|
|
11485
|
+
}
|
|
11486
|
+
function UpdateOrganizationRequestFromJSON(json) {
|
|
11487
|
+
return UpdateOrganizationRequestFromJSONTyped(json, false);
|
|
11488
|
+
}
|
|
11489
|
+
function UpdateOrganizationRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
11490
|
+
if (json == null) {
|
|
11491
|
+
return json;
|
|
11492
|
+
}
|
|
11493
|
+
return {
|
|
11494
|
+
"name": json["name"] == null ? void 0 : json["name"],
|
|
11495
|
+
"slug": json["slug"] == null ? void 0 : json["slug"],
|
|
11496
|
+
"metadata": json["metadata"] == null ? void 0 : json["metadata"]
|
|
11497
|
+
};
|
|
11498
|
+
}
|
|
11499
|
+
function UpdateOrganizationRequestToJSON(json) {
|
|
11500
|
+
return UpdateOrganizationRequestToJSONTyped(json, false);
|
|
11501
|
+
}
|
|
11502
|
+
function UpdateOrganizationRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
11503
|
+
if (value == null) {
|
|
11504
|
+
return value;
|
|
11505
|
+
}
|
|
11506
|
+
return {
|
|
11507
|
+
"name": value["name"],
|
|
11508
|
+
"slug": value["slug"],
|
|
11509
|
+
"metadata": value["metadata"]
|
|
11510
|
+
};
|
|
11511
|
+
}
|
|
11512
|
+
|
|
10923
11513
|
// src/src/models/UpdateSubscriberPreferencesRequestPreferencesInner.ts
|
|
10924
11514
|
var UpdateSubscriberPreferencesRequestPreferencesInnerChannelEnum = {
|
|
10925
11515
|
EMAIL: "email",
|
|
@@ -11340,6 +11930,45 @@ function UserDevicesDeleteResponseToJSONTyped(value, ignoreDiscriminator = false
|
|
|
11340
11930
|
};
|
|
11341
11931
|
}
|
|
11342
11932
|
|
|
11933
|
+
// src/src/models/V1MuseSubjectsSuggestPostRequest.ts
|
|
11934
|
+
var V1MuseSubjectsSuggestPostRequestChannelEnum = {
|
|
11935
|
+
EMAIL: "email",
|
|
11936
|
+
PUSH: "push"
|
|
11937
|
+
};
|
|
11938
|
+
function instanceOfV1MuseSubjectsSuggestPostRequest(value) {
|
|
11939
|
+
if (!("channel" in value) || value["channel"] === void 0) return false;
|
|
11940
|
+
if (!("projectId" in value) || value["projectId"] === void 0) return false;
|
|
11941
|
+
return true;
|
|
11942
|
+
}
|
|
11943
|
+
function V1MuseSubjectsSuggestPostRequestFromJSON(json) {
|
|
11944
|
+
return V1MuseSubjectsSuggestPostRequestFromJSONTyped(json, false);
|
|
11945
|
+
}
|
|
11946
|
+
function V1MuseSubjectsSuggestPostRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
11947
|
+
if (json == null) {
|
|
11948
|
+
return json;
|
|
11949
|
+
}
|
|
11950
|
+
return {
|
|
11951
|
+
"templateId": json["template_id"] == null ? void 0 : json["template_id"],
|
|
11952
|
+
"templateBody": json["template_body"] == null ? void 0 : json["template_body"],
|
|
11953
|
+
"channel": json["channel"],
|
|
11954
|
+
"projectId": json["project_id"]
|
|
11955
|
+
};
|
|
11956
|
+
}
|
|
11957
|
+
function V1MuseSubjectsSuggestPostRequestToJSON(json) {
|
|
11958
|
+
return V1MuseSubjectsSuggestPostRequestToJSONTyped(json, false);
|
|
11959
|
+
}
|
|
11960
|
+
function V1MuseSubjectsSuggestPostRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
11961
|
+
if (value == null) {
|
|
11962
|
+
return value;
|
|
11963
|
+
}
|
|
11964
|
+
return {
|
|
11965
|
+
"template_id": value["templateId"],
|
|
11966
|
+
"template_body": value["templateBody"],
|
|
11967
|
+
"channel": value["channel"],
|
|
11968
|
+
"project_id": value["projectId"]
|
|
11969
|
+
};
|
|
11970
|
+
}
|
|
11971
|
+
|
|
11343
11972
|
// src/src/models/ValidateResetTokenRequest.ts
|
|
11344
11973
|
function instanceOfValidateResetTokenRequest(value) {
|
|
11345
11974
|
if (!("token" in value) || value["token"] === void 0) return false;
|
|
@@ -14640,17 +15269,22 @@ var AuthOAuthApi = class extends BaseAPI {
|
|
|
14640
15269
|
}
|
|
14641
15270
|
};
|
|
14642
15271
|
|
|
14643
|
-
// src/src/apis/
|
|
14644
|
-
var
|
|
15272
|
+
// src/src/apis/AuthOrganizationsApi.ts
|
|
15273
|
+
var AuthOrganizationsApi = class extends BaseAPI {
|
|
14645
15274
|
/**
|
|
14646
|
-
*
|
|
14647
|
-
* Request a password reset
|
|
15275
|
+
* Add a member to an organization
|
|
14648
15276
|
*/
|
|
14649
|
-
async
|
|
14650
|
-
if (requestParameters["
|
|
15277
|
+
async addOrganizationMemberRaw(requestParameters, initOverrides) {
|
|
15278
|
+
if (requestParameters["id"] == null) {
|
|
14651
15279
|
throw new RequiredError(
|
|
14652
|
-
"
|
|
14653
|
-
'Required parameter "
|
|
15280
|
+
"id",
|
|
15281
|
+
'Required parameter "id" was null or undefined when calling addOrganizationMember().'
|
|
15282
|
+
);
|
|
15283
|
+
}
|
|
15284
|
+
if (requestParameters["addOrganizationMemberRequest"] == null) {
|
|
15285
|
+
throw new RequiredError(
|
|
15286
|
+
"addOrganizationMemberRequest",
|
|
15287
|
+
'Required parameter "addOrganizationMemberRequest" was null or undefined when calling addOrganizationMember().'
|
|
14654
15288
|
);
|
|
14655
15289
|
}
|
|
14656
15290
|
const queryParameters = {};
|
|
@@ -14663,31 +15297,30 @@ var AuthPasswordResetApi = class extends BaseAPI {
|
|
|
14663
15297
|
headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key");
|
|
14664
15298
|
}
|
|
14665
15299
|
const response = await this.request({
|
|
14666
|
-
path: `/auth/
|
|
15300
|
+
path: `/auth/organizations/{id}/members`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
|
|
14667
15301
|
method: "POST",
|
|
14668
15302
|
headers: headerParameters,
|
|
14669
15303
|
query: queryParameters,
|
|
14670
|
-
body:
|
|
15304
|
+
body: AddOrganizationMemberRequestToJSON(requestParameters["addOrganizationMemberRequest"])
|
|
14671
15305
|
}, initOverrides);
|
|
14672
|
-
return new JSONApiResponse(response, (jsonValue) =>
|
|
15306
|
+
return new JSONApiResponse(response, (jsonValue) => OrganizationMembershipResponseFromJSON(jsonValue));
|
|
14673
15307
|
}
|
|
14674
15308
|
/**
|
|
14675
|
-
*
|
|
14676
|
-
* Request a password reset
|
|
15309
|
+
* Add a member to an organization
|
|
14677
15310
|
*/
|
|
14678
|
-
async
|
|
14679
|
-
const response = await this.
|
|
15311
|
+
async addOrganizationMember(id, addOrganizationMemberRequest, initOverrides) {
|
|
15312
|
+
const response = await this.addOrganizationMemberRaw({ id, addOrganizationMemberRequest }, initOverrides);
|
|
14680
15313
|
return await response.value();
|
|
14681
15314
|
}
|
|
14682
15315
|
/**
|
|
14683
|
-
*
|
|
14684
|
-
*
|
|
15316
|
+
* Create a new organization inside the current application × environment. Membership is many-to-many — add end users via POST /auth/organizations/{id}/members. The Default organization for the environment is auto-created at migration time and cannot be created via API.
|
|
15317
|
+
* Create an organization
|
|
14685
15318
|
*/
|
|
14686
|
-
async
|
|
14687
|
-
if (requestParameters["
|
|
15319
|
+
async createOrganizationRaw(requestParameters, initOverrides) {
|
|
15320
|
+
if (requestParameters["createOrganizationRequest"] == null) {
|
|
14688
15321
|
throw new RequiredError(
|
|
14689
|
-
"
|
|
14690
|
-
'Required parameter "
|
|
15322
|
+
"createOrganizationRequest",
|
|
15323
|
+
'Required parameter "createOrganizationRequest" was null or undefined when calling createOrganization().'
|
|
14691
15324
|
);
|
|
14692
15325
|
}
|
|
14693
15326
|
const queryParameters = {};
|
|
@@ -14700,36 +15333,35 @@ var AuthPasswordResetApi = class extends BaseAPI {
|
|
|
14700
15333
|
headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key");
|
|
14701
15334
|
}
|
|
14702
15335
|
const response = await this.request({
|
|
14703
|
-
path: `/auth/
|
|
15336
|
+
path: `/auth/organizations`,
|
|
14704
15337
|
method: "POST",
|
|
14705
15338
|
headers: headerParameters,
|
|
14706
15339
|
query: queryParameters,
|
|
14707
|
-
body:
|
|
15340
|
+
body: CreateOrganizationRequestToJSON(requestParameters["createOrganizationRequest"])
|
|
14708
15341
|
}, initOverrides);
|
|
14709
|
-
return new JSONApiResponse(response, (jsonValue) =>
|
|
15342
|
+
return new JSONApiResponse(response, (jsonValue) => OrganizationResponseFromJSON(jsonValue));
|
|
14710
15343
|
}
|
|
14711
15344
|
/**
|
|
14712
|
-
*
|
|
14713
|
-
*
|
|
15345
|
+
* Create a new organization inside the current application × environment. Membership is many-to-many — add end users via POST /auth/organizations/{id}/members. The Default organization for the environment is auto-created at migration time and cannot be created via API.
|
|
15346
|
+
* Create an organization
|
|
14714
15347
|
*/
|
|
14715
|
-
async
|
|
14716
|
-
const response = await this.
|
|
15348
|
+
async createOrganization(createOrganizationRequest, initOverrides) {
|
|
15349
|
+
const response = await this.createOrganizationRaw({ createOrganizationRequest }, initOverrides);
|
|
14717
15350
|
return await response.value();
|
|
14718
15351
|
}
|
|
14719
15352
|
/**
|
|
14720
|
-
*
|
|
14721
|
-
*
|
|
15353
|
+
* Hard-deletes the org and cascades memberships. The Default organization cannot be deleted.
|
|
15354
|
+
* Delete an organization
|
|
14722
15355
|
*/
|
|
14723
|
-
async
|
|
14724
|
-
if (requestParameters["
|
|
15356
|
+
async deleteOrganizationRaw(requestParameters, initOverrides) {
|
|
15357
|
+
if (requestParameters["id"] == null) {
|
|
14725
15358
|
throw new RequiredError(
|
|
14726
|
-
"
|
|
14727
|
-
'Required parameter "
|
|
15359
|
+
"id",
|
|
15360
|
+
'Required parameter "id" was null or undefined when calling deleteOrganization().'
|
|
14728
15361
|
);
|
|
14729
15362
|
}
|
|
14730
15363
|
const queryParameters = {};
|
|
14731
15364
|
const headerParameters = {};
|
|
14732
|
-
headerParameters["Content-Type"] = "application/json";
|
|
14733
15365
|
if (this.configuration && this.configuration.apiKey) {
|
|
14734
15366
|
headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret");
|
|
14735
15367
|
}
|
|
@@ -14737,35 +15369,458 @@ var AuthPasswordResetApi = class extends BaseAPI {
|
|
|
14737
15369
|
headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key");
|
|
14738
15370
|
}
|
|
14739
15371
|
const response = await this.request({
|
|
14740
|
-
path: `/auth/
|
|
14741
|
-
method: "
|
|
15372
|
+
path: `/auth/organizations/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
|
|
15373
|
+
method: "DELETE",
|
|
14742
15374
|
headers: headerParameters,
|
|
14743
|
-
query: queryParameters
|
|
14744
|
-
body: ValidateResetTokenRequestToJSON(requestParameters["validateResetTokenRequest"])
|
|
15375
|
+
query: queryParameters
|
|
14745
15376
|
}, initOverrides);
|
|
14746
|
-
return new
|
|
15377
|
+
return new VoidApiResponse(response);
|
|
14747
15378
|
}
|
|
14748
15379
|
/**
|
|
14749
|
-
*
|
|
14750
|
-
*
|
|
15380
|
+
* Hard-deletes the org and cascades memberships. The Default organization cannot be deleted.
|
|
15381
|
+
* Delete an organization
|
|
14751
15382
|
*/
|
|
14752
|
-
async
|
|
14753
|
-
|
|
14754
|
-
return await response.value();
|
|
15383
|
+
async deleteOrganization(id, initOverrides) {
|
|
15384
|
+
await this.deleteOrganizationRaw({ id }, initOverrides);
|
|
14755
15385
|
}
|
|
14756
|
-
};
|
|
14757
|
-
|
|
14758
|
-
// src/src/apis/AuthPhoneApi.ts
|
|
14759
|
-
var AuthPhoneApi = class extends BaseAPI {
|
|
14760
15386
|
/**
|
|
14761
|
-
*
|
|
14762
|
-
* Check phone auth availability
|
|
15387
|
+
* Get organization by id
|
|
14763
15388
|
*/
|
|
14764
|
-
async
|
|
14765
|
-
|
|
14766
|
-
|
|
14767
|
-
|
|
14768
|
-
|
|
15389
|
+
async getOrganizationRaw(requestParameters, initOverrides) {
|
|
15390
|
+
if (requestParameters["id"] == null) {
|
|
15391
|
+
throw new RequiredError(
|
|
15392
|
+
"id",
|
|
15393
|
+
'Required parameter "id" was null or undefined when calling getOrganization().'
|
|
15394
|
+
);
|
|
15395
|
+
}
|
|
15396
|
+
const queryParameters = {};
|
|
15397
|
+
const headerParameters = {};
|
|
15398
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
15399
|
+
headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret");
|
|
15400
|
+
}
|
|
15401
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
15402
|
+
headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key");
|
|
15403
|
+
}
|
|
15404
|
+
const response = await this.request({
|
|
15405
|
+
path: `/auth/organizations/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
|
|
15406
|
+
method: "GET",
|
|
15407
|
+
headers: headerParameters,
|
|
15408
|
+
query: queryParameters
|
|
15409
|
+
}, initOverrides);
|
|
15410
|
+
return new JSONApiResponse(response, (jsonValue) => OrganizationResponseFromJSON(jsonValue));
|
|
15411
|
+
}
|
|
15412
|
+
/**
|
|
15413
|
+
* Get organization by id
|
|
15414
|
+
*/
|
|
15415
|
+
async getOrganization(id, initOverrides) {
|
|
15416
|
+
const response = await this.getOrganizationRaw({ id }, initOverrides);
|
|
15417
|
+
return await response.value();
|
|
15418
|
+
}
|
|
15419
|
+
/**
|
|
15420
|
+
* List organization members
|
|
15421
|
+
*/
|
|
15422
|
+
async listOrganizationMembersRaw(requestParameters, initOverrides) {
|
|
15423
|
+
if (requestParameters["id"] == null) {
|
|
15424
|
+
throw new RequiredError(
|
|
15425
|
+
"id",
|
|
15426
|
+
'Required parameter "id" was null or undefined when calling listOrganizationMembers().'
|
|
15427
|
+
);
|
|
15428
|
+
}
|
|
15429
|
+
const queryParameters = {};
|
|
15430
|
+
if (requestParameters["limit"] != null) {
|
|
15431
|
+
queryParameters["limit"] = requestParameters["limit"];
|
|
15432
|
+
}
|
|
15433
|
+
if (requestParameters["cursor"] != null) {
|
|
15434
|
+
queryParameters["cursor"] = requestParameters["cursor"];
|
|
15435
|
+
}
|
|
15436
|
+
const headerParameters = {};
|
|
15437
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
15438
|
+
headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret");
|
|
15439
|
+
}
|
|
15440
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
15441
|
+
headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key");
|
|
15442
|
+
}
|
|
15443
|
+
const response = await this.request({
|
|
15444
|
+
path: `/auth/organizations/{id}/members`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
|
|
15445
|
+
method: "GET",
|
|
15446
|
+
headers: headerParameters,
|
|
15447
|
+
query: queryParameters
|
|
15448
|
+
}, initOverrides);
|
|
15449
|
+
return new JSONApiResponse(response, (jsonValue) => OrganizationMembersListResponseFromJSON(jsonValue));
|
|
15450
|
+
}
|
|
15451
|
+
/**
|
|
15452
|
+
* List organization members
|
|
15453
|
+
*/
|
|
15454
|
+
async listOrganizationMembers(id, limit, cursor, initOverrides) {
|
|
15455
|
+
const response = await this.listOrganizationMembersRaw({ id, limit, cursor }, initOverrides);
|
|
15456
|
+
return await response.value();
|
|
15457
|
+
}
|
|
15458
|
+
/**
|
|
15459
|
+
* List organizations in the current environment. Cursor-paginated.
|
|
15460
|
+
* List organizations
|
|
15461
|
+
*/
|
|
15462
|
+
async listOrganizationsRaw(requestParameters, initOverrides) {
|
|
15463
|
+
const queryParameters = {};
|
|
15464
|
+
if (requestParameters["limit"] != null) {
|
|
15465
|
+
queryParameters["limit"] = requestParameters["limit"];
|
|
15466
|
+
}
|
|
15467
|
+
if (requestParameters["cursor"] != null) {
|
|
15468
|
+
queryParameters["cursor"] = requestParameters["cursor"];
|
|
15469
|
+
}
|
|
15470
|
+
if (requestParameters["search"] != null) {
|
|
15471
|
+
queryParameters["search"] = requestParameters["search"];
|
|
15472
|
+
}
|
|
15473
|
+
const headerParameters = {};
|
|
15474
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
15475
|
+
headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret");
|
|
15476
|
+
}
|
|
15477
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
15478
|
+
headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key");
|
|
15479
|
+
}
|
|
15480
|
+
const response = await this.request({
|
|
15481
|
+
path: `/auth/organizations`,
|
|
15482
|
+
method: "GET",
|
|
15483
|
+
headers: headerParameters,
|
|
15484
|
+
query: queryParameters
|
|
15485
|
+
}, initOverrides);
|
|
15486
|
+
return new JSONApiResponse(response, (jsonValue) => OrganizationListResponseFromJSON(jsonValue));
|
|
15487
|
+
}
|
|
15488
|
+
/**
|
|
15489
|
+
* List organizations in the current environment. Cursor-paginated.
|
|
15490
|
+
* List organizations
|
|
15491
|
+
*/
|
|
15492
|
+
async listOrganizations(limit, cursor, search, initOverrides) {
|
|
15493
|
+
const response = await this.listOrganizationsRaw({ limit, cursor, search }, initOverrides);
|
|
15494
|
+
return await response.value();
|
|
15495
|
+
}
|
|
15496
|
+
/**
|
|
15497
|
+
* Inverse of the membership list — returns all orgs the user is a member of within the current environment. Use this when the orgs[] JWT claim is omitted because the user belongs to more than 50.
|
|
15498
|
+
* List organizations an end user belongs to
|
|
15499
|
+
*/
|
|
15500
|
+
async listOrganizationsForEndUserRaw(requestParameters, initOverrides) {
|
|
15501
|
+
if (requestParameters["userId"] == null) {
|
|
15502
|
+
throw new RequiredError(
|
|
15503
|
+
"userId",
|
|
15504
|
+
'Required parameter "userId" was null or undefined when calling listOrganizationsForEndUser().'
|
|
15505
|
+
);
|
|
15506
|
+
}
|
|
15507
|
+
const queryParameters = {};
|
|
15508
|
+
const headerParameters = {};
|
|
15509
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
15510
|
+
headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret");
|
|
15511
|
+
}
|
|
15512
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
15513
|
+
headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key");
|
|
15514
|
+
}
|
|
15515
|
+
const response = await this.request({
|
|
15516
|
+
path: `/auth/end-users/{user_id}/organizations`.replace(`{${"user_id"}}`, encodeURIComponent(String(requestParameters["userId"]))),
|
|
15517
|
+
method: "GET",
|
|
15518
|
+
headers: headerParameters,
|
|
15519
|
+
query: queryParameters
|
|
15520
|
+
}, initOverrides);
|
|
15521
|
+
return new JSONApiResponse(response, (jsonValue) => OrganizationListResponseFromJSON(jsonValue));
|
|
15522
|
+
}
|
|
15523
|
+
/**
|
|
15524
|
+
* Inverse of the membership list — returns all orgs the user is a member of within the current environment. Use this when the orgs[] JWT claim is omitted because the user belongs to more than 50.
|
|
15525
|
+
* List organizations an end user belongs to
|
|
15526
|
+
*/
|
|
15527
|
+
async listOrganizationsForEndUser(userId, initOverrides) {
|
|
15528
|
+
const response = await this.listOrganizationsForEndUserRaw({ userId }, initOverrides);
|
|
15529
|
+
return await response.value();
|
|
15530
|
+
}
|
|
15531
|
+
/**
|
|
15532
|
+
* Remove a member from an organization
|
|
15533
|
+
*/
|
|
15534
|
+
async removeOrganizationMemberRaw(requestParameters, initOverrides) {
|
|
15535
|
+
if (requestParameters["id"] == null) {
|
|
15536
|
+
throw new RequiredError(
|
|
15537
|
+
"id",
|
|
15538
|
+
'Required parameter "id" was null or undefined when calling removeOrganizationMember().'
|
|
15539
|
+
);
|
|
15540
|
+
}
|
|
15541
|
+
if (requestParameters["userId"] == null) {
|
|
15542
|
+
throw new RequiredError(
|
|
15543
|
+
"userId",
|
|
15544
|
+
'Required parameter "userId" was null or undefined when calling removeOrganizationMember().'
|
|
15545
|
+
);
|
|
15546
|
+
}
|
|
15547
|
+
const queryParameters = {};
|
|
15548
|
+
const headerParameters = {};
|
|
15549
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
15550
|
+
headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret");
|
|
15551
|
+
}
|
|
15552
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
15553
|
+
headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key");
|
|
15554
|
+
}
|
|
15555
|
+
const response = await this.request({
|
|
15556
|
+
path: `/auth/organizations/{id}/members/{user_id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))).replace(`{${"user_id"}}`, encodeURIComponent(String(requestParameters["userId"]))),
|
|
15557
|
+
method: "DELETE",
|
|
15558
|
+
headers: headerParameters,
|
|
15559
|
+
query: queryParameters
|
|
15560
|
+
}, initOverrides);
|
|
15561
|
+
return new VoidApiResponse(response);
|
|
15562
|
+
}
|
|
15563
|
+
/**
|
|
15564
|
+
* Remove a member from an organization
|
|
15565
|
+
*/
|
|
15566
|
+
async removeOrganizationMember(id, userId, initOverrides) {
|
|
15567
|
+
await this.removeOrganizationMemberRaw({ id, userId }, initOverrides);
|
|
15568
|
+
}
|
|
15569
|
+
/**
|
|
15570
|
+
* Takes a valid refresh token + a target organization the user is a member of, verifies membership at mint time, revokes the old session, and mints a fresh access + refresh pair with `org_id` set to the target. The old refresh token is invalidated (jti rotated). Use this when the user\'s active workspace changes (the Slack/Linear workspace-switch pattern).
|
|
15571
|
+
* Switch the active organization on a session
|
|
15572
|
+
*/
|
|
15573
|
+
async switchOrganizationRaw(requestParameters, initOverrides) {
|
|
15574
|
+
if (requestParameters["switchOrganizationRequest"] == null) {
|
|
15575
|
+
throw new RequiredError(
|
|
15576
|
+
"switchOrganizationRequest",
|
|
15577
|
+
'Required parameter "switchOrganizationRequest" was null or undefined when calling switchOrganization().'
|
|
15578
|
+
);
|
|
15579
|
+
}
|
|
15580
|
+
const queryParameters = {};
|
|
15581
|
+
const headerParameters = {};
|
|
15582
|
+
headerParameters["Content-Type"] = "application/json";
|
|
15583
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
15584
|
+
headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret");
|
|
15585
|
+
}
|
|
15586
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
15587
|
+
headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key");
|
|
15588
|
+
}
|
|
15589
|
+
const response = await this.request({
|
|
15590
|
+
path: `/auth/sessions/switch-organization`,
|
|
15591
|
+
method: "POST",
|
|
15592
|
+
headers: headerParameters,
|
|
15593
|
+
query: queryParameters,
|
|
15594
|
+
body: SwitchOrganizationRequestToJSON(requestParameters["switchOrganizationRequest"])
|
|
15595
|
+
}, initOverrides);
|
|
15596
|
+
return new JSONApiResponse(response, (jsonValue) => SwitchOrganizationResponseFromJSON(jsonValue));
|
|
15597
|
+
}
|
|
15598
|
+
/**
|
|
15599
|
+
* Takes a valid refresh token + a target organization the user is a member of, verifies membership at mint time, revokes the old session, and mints a fresh access + refresh pair with `org_id` set to the target. The old refresh token is invalidated (jti rotated). Use this when the user\'s active workspace changes (the Slack/Linear workspace-switch pattern).
|
|
15600
|
+
* Switch the active organization on a session
|
|
15601
|
+
*/
|
|
15602
|
+
async switchOrganization(switchOrganizationRequest, initOverrides) {
|
|
15603
|
+
const response = await this.switchOrganizationRaw({ switchOrganizationRequest }, initOverrides);
|
|
15604
|
+
return await response.value();
|
|
15605
|
+
}
|
|
15606
|
+
/**
|
|
15607
|
+
* The Default organization cannot be renamed or have its slug/metadata changed.
|
|
15608
|
+
* Update an organization
|
|
15609
|
+
*/
|
|
15610
|
+
async updateOrganizationRaw(requestParameters, initOverrides) {
|
|
15611
|
+
if (requestParameters["id"] == null) {
|
|
15612
|
+
throw new RequiredError(
|
|
15613
|
+
"id",
|
|
15614
|
+
'Required parameter "id" was null or undefined when calling updateOrganization().'
|
|
15615
|
+
);
|
|
15616
|
+
}
|
|
15617
|
+
if (requestParameters["updateOrganizationRequest"] == null) {
|
|
15618
|
+
throw new RequiredError(
|
|
15619
|
+
"updateOrganizationRequest",
|
|
15620
|
+
'Required parameter "updateOrganizationRequest" was null or undefined when calling updateOrganization().'
|
|
15621
|
+
);
|
|
15622
|
+
}
|
|
15623
|
+
const queryParameters = {};
|
|
15624
|
+
const headerParameters = {};
|
|
15625
|
+
headerParameters["Content-Type"] = "application/json";
|
|
15626
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
15627
|
+
headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret");
|
|
15628
|
+
}
|
|
15629
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
15630
|
+
headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key");
|
|
15631
|
+
}
|
|
15632
|
+
const response = await this.request({
|
|
15633
|
+
path: `/auth/organizations/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
|
|
15634
|
+
method: "PATCH",
|
|
15635
|
+
headers: headerParameters,
|
|
15636
|
+
query: queryParameters,
|
|
15637
|
+
body: UpdateOrganizationRequestToJSON(requestParameters["updateOrganizationRequest"])
|
|
15638
|
+
}, initOverrides);
|
|
15639
|
+
return new JSONApiResponse(response, (jsonValue) => OrganizationResponseFromJSON(jsonValue));
|
|
15640
|
+
}
|
|
15641
|
+
/**
|
|
15642
|
+
* The Default organization cannot be renamed or have its slug/metadata changed.
|
|
15643
|
+
* Update an organization
|
|
15644
|
+
*/
|
|
15645
|
+
async updateOrganization(id, updateOrganizationRequest, initOverrides) {
|
|
15646
|
+
const response = await this.updateOrganizationRaw({ id, updateOrganizationRequest }, initOverrides);
|
|
15647
|
+
return await response.value();
|
|
15648
|
+
}
|
|
15649
|
+
/**
|
|
15650
|
+
* Update a member\'s role
|
|
15651
|
+
*/
|
|
15652
|
+
async updateOrganizationMemberRoleRaw(requestParameters, initOverrides) {
|
|
15653
|
+
if (requestParameters["id"] == null) {
|
|
15654
|
+
throw new RequiredError(
|
|
15655
|
+
"id",
|
|
15656
|
+
'Required parameter "id" was null or undefined when calling updateOrganizationMemberRole().'
|
|
15657
|
+
);
|
|
15658
|
+
}
|
|
15659
|
+
if (requestParameters["userId"] == null) {
|
|
15660
|
+
throw new RequiredError(
|
|
15661
|
+
"userId",
|
|
15662
|
+
'Required parameter "userId" was null or undefined when calling updateOrganizationMemberRole().'
|
|
15663
|
+
);
|
|
15664
|
+
}
|
|
15665
|
+
if (requestParameters["updateOrganizationMemberRoleRequest"] == null) {
|
|
15666
|
+
throw new RequiredError(
|
|
15667
|
+
"updateOrganizationMemberRoleRequest",
|
|
15668
|
+
'Required parameter "updateOrganizationMemberRoleRequest" was null or undefined when calling updateOrganizationMemberRole().'
|
|
15669
|
+
);
|
|
15670
|
+
}
|
|
15671
|
+
const queryParameters = {};
|
|
15672
|
+
const headerParameters = {};
|
|
15673
|
+
headerParameters["Content-Type"] = "application/json";
|
|
15674
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
15675
|
+
headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret");
|
|
15676
|
+
}
|
|
15677
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
15678
|
+
headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key");
|
|
15679
|
+
}
|
|
15680
|
+
const response = await this.request({
|
|
15681
|
+
path: `/auth/organizations/{id}/members/{user_id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))).replace(`{${"user_id"}}`, encodeURIComponent(String(requestParameters["userId"]))),
|
|
15682
|
+
method: "PATCH",
|
|
15683
|
+
headers: headerParameters,
|
|
15684
|
+
query: queryParameters,
|
|
15685
|
+
body: UpdateOrganizationMemberRoleRequestToJSON(requestParameters["updateOrganizationMemberRoleRequest"])
|
|
15686
|
+
}, initOverrides);
|
|
15687
|
+
return new JSONApiResponse(response, (jsonValue) => OrganizationMembershipResponseFromJSON(jsonValue));
|
|
15688
|
+
}
|
|
15689
|
+
/**
|
|
15690
|
+
* Update a member\'s role
|
|
15691
|
+
*/
|
|
15692
|
+
async updateOrganizationMemberRole(id, userId, updateOrganizationMemberRoleRequest, initOverrides) {
|
|
15693
|
+
const response = await this.updateOrganizationMemberRoleRaw({ id, userId, updateOrganizationMemberRoleRequest }, initOverrides);
|
|
15694
|
+
return await response.value();
|
|
15695
|
+
}
|
|
15696
|
+
};
|
|
15697
|
+
|
|
15698
|
+
// src/src/apis/AuthPasswordResetApi.ts
|
|
15699
|
+
var AuthPasswordResetApi = class extends BaseAPI {
|
|
15700
|
+
/**
|
|
15701
|
+
* Request a password reset email. Creates a reset token and sends an email to the user. Always returns success to prevent email enumeration.
|
|
15702
|
+
* Request a password reset
|
|
15703
|
+
*/
|
|
15704
|
+
async forgotPasswordRaw(requestParameters, initOverrides) {
|
|
15705
|
+
if (requestParameters["forgotPasswordRequest"] == null) {
|
|
15706
|
+
throw new RequiredError(
|
|
15707
|
+
"forgotPasswordRequest",
|
|
15708
|
+
'Required parameter "forgotPasswordRequest" was null or undefined when calling forgotPassword().'
|
|
15709
|
+
);
|
|
15710
|
+
}
|
|
15711
|
+
const queryParameters = {};
|
|
15712
|
+
const headerParameters = {};
|
|
15713
|
+
headerParameters["Content-Type"] = "application/json";
|
|
15714
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
15715
|
+
headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret");
|
|
15716
|
+
}
|
|
15717
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
15718
|
+
headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key");
|
|
15719
|
+
}
|
|
15720
|
+
const response = await this.request({
|
|
15721
|
+
path: `/auth/forgot-password`,
|
|
15722
|
+
method: "POST",
|
|
15723
|
+
headers: headerParameters,
|
|
15724
|
+
query: queryParameters,
|
|
15725
|
+
body: ForgotPasswordRequestToJSON(requestParameters["forgotPasswordRequest"])
|
|
15726
|
+
}, initOverrides);
|
|
15727
|
+
return new JSONApiResponse(response, (jsonValue) => SuccessResultFromJSON(jsonValue));
|
|
15728
|
+
}
|
|
15729
|
+
/**
|
|
15730
|
+
* Request a password reset email. Creates a reset token and sends an email to the user. Always returns success to prevent email enumeration.
|
|
15731
|
+
* Request a password reset
|
|
15732
|
+
*/
|
|
15733
|
+
async forgotPassword(forgotPasswordRequest, initOverrides) {
|
|
15734
|
+
const response = await this.forgotPasswordRaw({ forgotPasswordRequest }, initOverrides);
|
|
15735
|
+
return await response.value();
|
|
15736
|
+
}
|
|
15737
|
+
/**
|
|
15738
|
+
* Reset a user\'s password using a valid reset token.
|
|
15739
|
+
* Reset password
|
|
15740
|
+
*/
|
|
15741
|
+
async resetEndUserPasswordRaw(requestParameters, initOverrides) {
|
|
15742
|
+
if (requestParameters["resetPasswordRequest"] == null) {
|
|
15743
|
+
throw new RequiredError(
|
|
15744
|
+
"resetPasswordRequest",
|
|
15745
|
+
'Required parameter "resetPasswordRequest" was null or undefined when calling resetEndUserPassword().'
|
|
15746
|
+
);
|
|
15747
|
+
}
|
|
15748
|
+
const queryParameters = {};
|
|
15749
|
+
const headerParameters = {};
|
|
15750
|
+
headerParameters["Content-Type"] = "application/json";
|
|
15751
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
15752
|
+
headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret");
|
|
15753
|
+
}
|
|
15754
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
15755
|
+
headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key");
|
|
15756
|
+
}
|
|
15757
|
+
const response = await this.request({
|
|
15758
|
+
path: `/auth/reset-password`,
|
|
15759
|
+
method: "POST",
|
|
15760
|
+
headers: headerParameters,
|
|
15761
|
+
query: queryParameters,
|
|
15762
|
+
body: ResetPasswordRequestToJSON(requestParameters["resetPasswordRequest"])
|
|
15763
|
+
}, initOverrides);
|
|
15764
|
+
return new JSONApiResponse(response, (jsonValue) => ResetPasswordResponseFromJSON(jsonValue));
|
|
15765
|
+
}
|
|
15766
|
+
/**
|
|
15767
|
+
* Reset a user\'s password using a valid reset token.
|
|
15768
|
+
* Reset password
|
|
15769
|
+
*/
|
|
15770
|
+
async resetEndUserPassword(resetPasswordRequest, initOverrides) {
|
|
15771
|
+
const response = await this.resetEndUserPasswordRaw({ resetPasswordRequest }, initOverrides);
|
|
15772
|
+
return await response.value();
|
|
15773
|
+
}
|
|
15774
|
+
/**
|
|
15775
|
+
* Validate a password reset token without consuming it. Useful for checking if a token is valid before showing the reset form.
|
|
15776
|
+
* Validate a password reset token
|
|
15777
|
+
*/
|
|
15778
|
+
async validateResetTokenRaw(requestParameters, initOverrides) {
|
|
15779
|
+
if (requestParameters["validateResetTokenRequest"] == null) {
|
|
15780
|
+
throw new RequiredError(
|
|
15781
|
+
"validateResetTokenRequest",
|
|
15782
|
+
'Required parameter "validateResetTokenRequest" was null or undefined when calling validateResetToken().'
|
|
15783
|
+
);
|
|
15784
|
+
}
|
|
15785
|
+
const queryParameters = {};
|
|
15786
|
+
const headerParameters = {};
|
|
15787
|
+
headerParameters["Content-Type"] = "application/json";
|
|
15788
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
15789
|
+
headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret");
|
|
15790
|
+
}
|
|
15791
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
15792
|
+
headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key");
|
|
15793
|
+
}
|
|
15794
|
+
const response = await this.request({
|
|
15795
|
+
path: `/auth/validate-reset-token`,
|
|
15796
|
+
method: "POST",
|
|
15797
|
+
headers: headerParameters,
|
|
15798
|
+
query: queryParameters,
|
|
15799
|
+
body: ValidateResetTokenRequestToJSON(requestParameters["validateResetTokenRequest"])
|
|
15800
|
+
}, initOverrides);
|
|
15801
|
+
return new JSONApiResponse(response, (jsonValue) => ValidateResetTokenResponseFromJSON(jsonValue));
|
|
15802
|
+
}
|
|
15803
|
+
/**
|
|
15804
|
+
* Validate a password reset token without consuming it. Useful for checking if a token is valid before showing the reset form.
|
|
15805
|
+
* Validate a password reset token
|
|
15806
|
+
*/
|
|
15807
|
+
async validateResetToken(validateResetTokenRequest, initOverrides) {
|
|
15808
|
+
const response = await this.validateResetTokenRaw({ validateResetTokenRequest }, initOverrides);
|
|
15809
|
+
return await response.value();
|
|
15810
|
+
}
|
|
15811
|
+
};
|
|
15812
|
+
|
|
15813
|
+
// src/src/apis/AuthPhoneApi.ts
|
|
15814
|
+
var AuthPhoneApi = class extends BaseAPI {
|
|
15815
|
+
/**
|
|
15816
|
+
* Check if phone authentication is available for this application. Requires Twilio credentials to be configured.
|
|
15817
|
+
* Check phone auth availability
|
|
15818
|
+
*/
|
|
15819
|
+
async checkPhoneAuthAvailabilityRaw(initOverrides) {
|
|
15820
|
+
const queryParameters = {};
|
|
15821
|
+
const headerParameters = {};
|
|
15822
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
15823
|
+
headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key");
|
|
14769
15824
|
}
|
|
14770
15825
|
const response = await this.request({
|
|
14771
15826
|
path: `/auth/phone/available`,
|
|
@@ -15221,6 +16276,40 @@ var AuthUserProfileApi = class extends BaseAPI {
|
|
|
15221
16276
|
const response = await this.deleteEndUserRaw(initOverrides);
|
|
15222
16277
|
return await response.value();
|
|
15223
16278
|
}
|
|
16279
|
+
/**
|
|
16280
|
+
* App-credentialed soft-delete for an end user, scoped to the test environment only. Live-mode credentials receive 403 — this is the intentional safety guard against a misconfigured CI runner nuking production users. Mirrors the self-service `DELETE /auth/users/me` flow: revokes all sessions, soft-deletes the row (status=\'deleted\'), and emits a `user.deleted` webhook with `method=\'application_admin\'`. The audit log row survives (no FK to end_users), so org-history queries still resolve. Intended for smoke / test-fixture cleanup. Production deletes should continue to use `DELETE /auth/users/me` from the end-user\'s own session or the dashboard.
|
|
16281
|
+
* Delete an end user (test environment only)
|
|
16282
|
+
*/
|
|
16283
|
+
async deleteEndUserByApplicationRaw(requestParameters, initOverrides) {
|
|
16284
|
+
if (requestParameters["userId"] == null) {
|
|
16285
|
+
throw new RequiredError(
|
|
16286
|
+
"userId",
|
|
16287
|
+
'Required parameter "userId" was null or undefined when calling deleteEndUserByApplication().'
|
|
16288
|
+
);
|
|
16289
|
+
}
|
|
16290
|
+
const queryParameters = {};
|
|
16291
|
+
const headerParameters = {};
|
|
16292
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
16293
|
+
headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret");
|
|
16294
|
+
}
|
|
16295
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
16296
|
+
headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key");
|
|
16297
|
+
}
|
|
16298
|
+
const response = await this.request({
|
|
16299
|
+
path: `/auth/users/{user_id}`.replace(`{${"user_id"}}`, encodeURIComponent(String(requestParameters["userId"]))),
|
|
16300
|
+
method: "DELETE",
|
|
16301
|
+
headers: headerParameters,
|
|
16302
|
+
query: queryParameters
|
|
16303
|
+
}, initOverrides);
|
|
16304
|
+
return new VoidApiResponse(response);
|
|
16305
|
+
}
|
|
16306
|
+
/**
|
|
16307
|
+
* App-credentialed soft-delete for an end user, scoped to the test environment only. Live-mode credentials receive 403 — this is the intentional safety guard against a misconfigured CI runner nuking production users. Mirrors the self-service `DELETE /auth/users/me` flow: revokes all sessions, soft-deletes the row (status=\'deleted\'), and emits a `user.deleted` webhook with `method=\'application_admin\'`. The audit log row survives (no FK to end_users), so org-history queries still resolve. Intended for smoke / test-fixture cleanup. Production deletes should continue to use `DELETE /auth/users/me` from the end-user\'s own session or the dashboard.
|
|
16308
|
+
* Delete an end user (test environment only)
|
|
16309
|
+
*/
|
|
16310
|
+
async deleteEndUserByApplication(userId, initOverrides) {
|
|
16311
|
+
await this.deleteEndUserByApplicationRaw({ userId }, initOverrides);
|
|
16312
|
+
}
|
|
15224
16313
|
/**
|
|
15225
16314
|
* Retrieve the profile of the currently authenticated end user.
|
|
15226
16315
|
* Get current end user profile
|
|
@@ -17028,6 +18117,266 @@ var ListAllInboxStatusEnum = {
|
|
|
17028
18117
|
ARCHIVED: "archived"
|
|
17029
18118
|
};
|
|
17030
18119
|
|
|
18120
|
+
// src/src/apis/MuseApi.ts
|
|
18121
|
+
var MuseApi = class extends BaseAPI {
|
|
18122
|
+
/**
|
|
18123
|
+
* Returns Muse invocations for the caller\'s account, ordered by most recent first. The request_payload is the PII-scrubbed payload we record at call time; the response payload is NOT returned by this endpoint for size reasons (use the per-row detail endpoint when built).
|
|
18124
|
+
* Paginated per-call audit log for Muse
|
|
18125
|
+
*/
|
|
18126
|
+
async v1MuseAuditLogGetRaw(initOverrides) {
|
|
18127
|
+
const queryParameters = {};
|
|
18128
|
+
const headerParameters = {};
|
|
18129
|
+
const response = await this.request({
|
|
18130
|
+
path: `/v1/muse/audit-log`,
|
|
18131
|
+
method: "GET",
|
|
18132
|
+
headers: headerParameters,
|
|
18133
|
+
query: queryParameters
|
|
18134
|
+
}, initOverrides);
|
|
18135
|
+
return new VoidApiResponse(response);
|
|
18136
|
+
}
|
|
18137
|
+
/**
|
|
18138
|
+
* Returns Muse invocations for the caller\'s account, ordered by most recent first. The request_payload is the PII-scrubbed payload we record at call time; the response payload is NOT returned by this endpoint for size reasons (use the per-row detail endpoint when built).
|
|
18139
|
+
* Paginated per-call audit log for Muse
|
|
18140
|
+
*/
|
|
18141
|
+
async v1MuseAuditLogGet(initOverrides) {
|
|
18142
|
+
await this.v1MuseAuditLogGetRaw(initOverrides);
|
|
18143
|
+
}
|
|
18144
|
+
/**
|
|
18145
|
+
* Streams Opus tokens then emits a structured advisory covering deliverability risks, frequency conflicts, audience warnings, send-time suggestions, and content notes — plus a single recommended_action so the dashboard can render a CTA without interpreting prose. Advisory is purely advisory — the platform does not block sends on AI output.
|
|
18146
|
+
* Stream a pre-send advisory for a draft broadcast
|
|
18147
|
+
*/
|
|
18148
|
+
async v1MuseBroadcastsAnalyzePostRaw(initOverrides) {
|
|
18149
|
+
const queryParameters = {};
|
|
18150
|
+
const headerParameters = {};
|
|
18151
|
+
const response = await this.request({
|
|
18152
|
+
path: `/v1/muse/broadcasts/analyze`,
|
|
18153
|
+
method: "POST",
|
|
18154
|
+
headers: headerParameters,
|
|
18155
|
+
query: queryParameters
|
|
18156
|
+
}, initOverrides);
|
|
18157
|
+
return new VoidApiResponse(response);
|
|
18158
|
+
}
|
|
18159
|
+
/**
|
|
18160
|
+
* Streams Opus tokens then emits a structured advisory covering deliverability risks, frequency conflicts, audience warnings, send-time suggestions, and content notes — plus a single recommended_action so the dashboard can render a CTA without interpreting prose. Advisory is purely advisory — the platform does not block sends on AI output.
|
|
18161
|
+
* Stream a pre-send advisory for a draft broadcast
|
|
18162
|
+
*/
|
|
18163
|
+
async v1MuseBroadcastsAnalyzePost(initOverrides) {
|
|
18164
|
+
await this.v1MuseBroadcastsAnalyzePostRaw(initOverrides);
|
|
18165
|
+
}
|
|
18166
|
+
/**
|
|
18167
|
+
* Returns whether the caller\'s account plan unlocks Zyphr Muse, the cheapest plan that would unlock it, and the monthly Bedrock spend cap for the current plan. Available to every authenticated caller (including free accounts).
|
|
18168
|
+
* Return the current account\'s Zyphr Muse entitlement
|
|
18169
|
+
*/
|
|
18170
|
+
async v1MuseEntitlementGetRaw(initOverrides) {
|
|
18171
|
+
const queryParameters = {};
|
|
18172
|
+
const headerParameters = {};
|
|
18173
|
+
const response = await this.request({
|
|
18174
|
+
path: `/v1/muse/entitlement`,
|
|
18175
|
+
method: "GET",
|
|
18176
|
+
headers: headerParameters,
|
|
18177
|
+
query: queryParameters
|
|
18178
|
+
}, initOverrides);
|
|
18179
|
+
return new VoidApiResponse(response);
|
|
18180
|
+
}
|
|
18181
|
+
/**
|
|
18182
|
+
* Returns whether the caller\'s account plan unlocks Zyphr Muse, the cheapest plan that would unlock it, and the monthly Bedrock spend cap for the current plan. Available to every authenticated caller (including free accounts).
|
|
18183
|
+
* Return the current account\'s Zyphr Muse entitlement
|
|
18184
|
+
*/
|
|
18185
|
+
async v1MuseEntitlementGet(initOverrides) {
|
|
18186
|
+
await this.v1MuseEntitlementGetRaw(initOverrides);
|
|
18187
|
+
}
|
|
18188
|
+
/**
|
|
18189
|
+
* Reads the committed baseline JSON files from src/services/muse/evals/baselines/ and returns them keyed by prompt name. Customers don\'t see this — it\'s for the internal Muse settings page / admin portal.
|
|
18190
|
+
* Per-prompt eval baseline snapshots
|
|
18191
|
+
*/
|
|
18192
|
+
async v1MuseEvalBaselinesGetRaw(initOverrides) {
|
|
18193
|
+
const queryParameters = {};
|
|
18194
|
+
const headerParameters = {};
|
|
18195
|
+
const response = await this.request({
|
|
18196
|
+
path: `/v1/muse/eval-baselines`,
|
|
18197
|
+
method: "GET",
|
|
18198
|
+
headers: headerParameters,
|
|
18199
|
+
query: queryParameters
|
|
18200
|
+
}, initOverrides);
|
|
18201
|
+
return new VoidApiResponse(response);
|
|
18202
|
+
}
|
|
18203
|
+
/**
|
|
18204
|
+
* Reads the committed baseline JSON files from src/services/muse/evals/baselines/ and returns them keyed by prompt name. Customers don\'t see this — it\'s for the internal Muse settings page / admin portal.
|
|
18205
|
+
* Per-prompt eval baseline snapshots
|
|
18206
|
+
*/
|
|
18207
|
+
async v1MuseEvalBaselinesGet(initOverrides) {
|
|
18208
|
+
await this.v1MuseEvalBaselinesGetRaw(initOverrides);
|
|
18209
|
+
}
|
|
18210
|
+
/**
|
|
18211
|
+
* Returns the project\'s Muse settings (cap override, allowed roles, blocked tiers). If no row exists yet, returns synthesized defaults so the caller never sees a 404.
|
|
18212
|
+
* Read Muse settings for a project
|
|
18213
|
+
*/
|
|
18214
|
+
async v1MuseSettingsProjectIdGetRaw(requestParameters, initOverrides) {
|
|
18215
|
+
if (requestParameters["projectId"] == null) {
|
|
18216
|
+
throw new RequiredError(
|
|
18217
|
+
"projectId",
|
|
18218
|
+
'Required parameter "projectId" was null or undefined when calling v1MuseSettingsProjectIdGet().'
|
|
18219
|
+
);
|
|
18220
|
+
}
|
|
18221
|
+
const queryParameters = {};
|
|
18222
|
+
const headerParameters = {};
|
|
18223
|
+
const response = await this.request({
|
|
18224
|
+
path: `/v1/muse/settings/{project_id}`.replace(`{${"project_id"}}`, encodeURIComponent(String(requestParameters["projectId"]))),
|
|
18225
|
+
method: "GET",
|
|
18226
|
+
headers: headerParameters,
|
|
18227
|
+
query: queryParameters
|
|
18228
|
+
}, initOverrides);
|
|
18229
|
+
return new VoidApiResponse(response);
|
|
18230
|
+
}
|
|
18231
|
+
/**
|
|
18232
|
+
* Returns the project\'s Muse settings (cap override, allowed roles, blocked tiers). If no row exists yet, returns synthesized defaults so the caller never sees a 404.
|
|
18233
|
+
* Read Muse settings for a project
|
|
18234
|
+
*/
|
|
18235
|
+
async v1MuseSettingsProjectIdGet(projectId, initOverrides) {
|
|
18236
|
+
await this.v1MuseSettingsProjectIdGetRaw({ projectId }, initOverrides);
|
|
18237
|
+
}
|
|
18238
|
+
/**
|
|
18239
|
+
* Partial update — any omitted field keeps its existing value. Pass `monthly_cap_usd_override: null` to clear an override. Requires project-level role admin or developer. Account owner/admin cascades.
|
|
18240
|
+
* Update Muse settings for a project (admin or developer only)
|
|
18241
|
+
*/
|
|
18242
|
+
async v1MuseSettingsProjectIdPatchRaw(requestParameters, initOverrides) {
|
|
18243
|
+
if (requestParameters["projectId"] == null) {
|
|
18244
|
+
throw new RequiredError(
|
|
18245
|
+
"projectId",
|
|
18246
|
+
'Required parameter "projectId" was null or undefined when calling v1MuseSettingsProjectIdPatch().'
|
|
18247
|
+
);
|
|
18248
|
+
}
|
|
18249
|
+
const queryParameters = {};
|
|
18250
|
+
const headerParameters = {};
|
|
18251
|
+
const response = await this.request({
|
|
18252
|
+
path: `/v1/muse/settings/{project_id}`.replace(`{${"project_id"}}`, encodeURIComponent(String(requestParameters["projectId"]))),
|
|
18253
|
+
method: "PATCH",
|
|
18254
|
+
headers: headerParameters,
|
|
18255
|
+
query: queryParameters
|
|
18256
|
+
}, initOverrides);
|
|
18257
|
+
return new VoidApiResponse(response);
|
|
18258
|
+
}
|
|
18259
|
+
/**
|
|
18260
|
+
* Partial update — any omitted field keeps its existing value. Pass `monthly_cap_usd_override: null` to clear an override. Requires project-level role admin or developer. Account owner/admin cascades.
|
|
18261
|
+
* Update Muse settings for a project (admin or developer only)
|
|
18262
|
+
*/
|
|
18263
|
+
async v1MuseSettingsProjectIdPatch(projectId, initOverrides) {
|
|
18264
|
+
await this.v1MuseSettingsProjectIdPatchRaw({ projectId }, initOverrides);
|
|
18265
|
+
}
|
|
18266
|
+
/**
|
|
18267
|
+
* Suggest 5 ranked subject-line candidates for a template
|
|
18268
|
+
*/
|
|
18269
|
+
async v1MuseSubjectsSuggestPostRaw(requestParameters, initOverrides) {
|
|
18270
|
+
if (requestParameters["v1MuseSubjectsSuggestPostRequest"] == null) {
|
|
18271
|
+
throw new RequiredError(
|
|
18272
|
+
"v1MuseSubjectsSuggestPostRequest",
|
|
18273
|
+
'Required parameter "v1MuseSubjectsSuggestPostRequest" was null or undefined when calling v1MuseSubjectsSuggestPost().'
|
|
18274
|
+
);
|
|
18275
|
+
}
|
|
18276
|
+
const queryParameters = {};
|
|
18277
|
+
const headerParameters = {};
|
|
18278
|
+
headerParameters["Content-Type"] = "application/json";
|
|
18279
|
+
const response = await this.request({
|
|
18280
|
+
path: `/v1/muse/subjects/suggest`,
|
|
18281
|
+
method: "POST",
|
|
18282
|
+
headers: headerParameters,
|
|
18283
|
+
query: queryParameters,
|
|
18284
|
+
body: V1MuseSubjectsSuggestPostRequestToJSON(requestParameters["v1MuseSubjectsSuggestPostRequest"])
|
|
18285
|
+
}, initOverrides);
|
|
18286
|
+
return new VoidApiResponse(response);
|
|
18287
|
+
}
|
|
18288
|
+
/**
|
|
18289
|
+
* Suggest 5 ranked subject-line candidates for a template
|
|
18290
|
+
*/
|
|
18291
|
+
async v1MuseSubjectsSuggestPost(v1MuseSubjectsSuggestPostRequest, initOverrides) {
|
|
18292
|
+
await this.v1MuseSubjectsSuggestPostRaw({ v1MuseSubjectsSuggestPostRequest }, initOverrides);
|
|
18293
|
+
}
|
|
18294
|
+
/**
|
|
18295
|
+
* Stream a draft template from a natural-language brief
|
|
18296
|
+
*/
|
|
18297
|
+
async v1MuseTemplatesDraftPostRaw(initOverrides) {
|
|
18298
|
+
const queryParameters = {};
|
|
18299
|
+
const headerParameters = {};
|
|
18300
|
+
const response = await this.request({
|
|
18301
|
+
path: `/v1/muse/templates/draft`,
|
|
18302
|
+
method: "POST",
|
|
18303
|
+
headers: headerParameters,
|
|
18304
|
+
query: queryParameters
|
|
18305
|
+
}, initOverrides);
|
|
18306
|
+
return new VoidApiResponse(response);
|
|
18307
|
+
}
|
|
18308
|
+
/**
|
|
18309
|
+
* Stream a draft template from a natural-language brief
|
|
18310
|
+
*/
|
|
18311
|
+
async v1MuseTemplatesDraftPost(initOverrides) {
|
|
18312
|
+
await this.v1MuseTemplatesDraftPostRaw(initOverrides);
|
|
18313
|
+
}
|
|
18314
|
+
/**
|
|
18315
|
+
* Stream a rewritten block per the user\'s instruction
|
|
18316
|
+
*/
|
|
18317
|
+
async v1MuseTemplatesRewritePostRaw(initOverrides) {
|
|
18318
|
+
const queryParameters = {};
|
|
18319
|
+
const headerParameters = {};
|
|
18320
|
+
const response = await this.request({
|
|
18321
|
+
path: `/v1/muse/templates/rewrite`,
|
|
18322
|
+
method: "POST",
|
|
18323
|
+
headers: headerParameters,
|
|
18324
|
+
query: queryParameters
|
|
18325
|
+
}, initOverrides);
|
|
18326
|
+
return new VoidApiResponse(response);
|
|
18327
|
+
}
|
|
18328
|
+
/**
|
|
18329
|
+
* Stream a rewritten block per the user\'s instruction
|
|
18330
|
+
*/
|
|
18331
|
+
async v1MuseTemplatesRewritePost(initOverrides) {
|
|
18332
|
+
await this.v1MuseTemplatesRewritePostRaw(initOverrides);
|
|
18333
|
+
}
|
|
18334
|
+
/**
|
|
18335
|
+
* Current calendar-month spend, plan cap, soft warning tier, and breakdowns by action and model tier. Dashboard polls this for the budget meter; 60s edge-cached via Redis is reasonable but not enforced server-side (lightweight aggregate).
|
|
18336
|
+
* Per-account Zyphr Muse usage + budget tier
|
|
18337
|
+
*/
|
|
18338
|
+
async v1MuseUsageGetRaw(initOverrides) {
|
|
18339
|
+
const queryParameters = {};
|
|
18340
|
+
const headerParameters = {};
|
|
18341
|
+
const response = await this.request({
|
|
18342
|
+
path: `/v1/muse/usage`,
|
|
18343
|
+
method: "GET",
|
|
18344
|
+
headers: headerParameters,
|
|
18345
|
+
query: queryParameters
|
|
18346
|
+
}, initOverrides);
|
|
18347
|
+
return new VoidApiResponse(response);
|
|
18348
|
+
}
|
|
18349
|
+
/**
|
|
18350
|
+
* Current calendar-month spend, plan cap, soft warning tier, and breakdowns by action and model tier. Dashboard polls this for the budget meter; 60s edge-cached via Redis is reasonable but not enforced server-side (lightweight aggregate).
|
|
18351
|
+
* Per-account Zyphr Muse usage + budget tier
|
|
18352
|
+
*/
|
|
18353
|
+
async v1MuseUsageGet(initOverrides) {
|
|
18354
|
+
await this.v1MuseUsageGetRaw(initOverrides);
|
|
18355
|
+
}
|
|
18356
|
+
/**
|
|
18357
|
+
* Streams Opus tokens then emits a fully-validated workflow JSON object (single root, no cycles, branch_path coherent, all step types valid). Channels referenced by the workflow must appear in the project\'s available_channels grounding; unsupported channels fall back to email via the prompt\'s hard rules.
|
|
18358
|
+
* Stream a generated workflow from a natural-language description
|
|
18359
|
+
*/
|
|
18360
|
+
async v1MuseWorkflowsGeneratePostRaw(initOverrides) {
|
|
18361
|
+
const queryParameters = {};
|
|
18362
|
+
const headerParameters = {};
|
|
18363
|
+
const response = await this.request({
|
|
18364
|
+
path: `/v1/muse/workflows/generate`,
|
|
18365
|
+
method: "POST",
|
|
18366
|
+
headers: headerParameters,
|
|
18367
|
+
query: queryParameters
|
|
18368
|
+
}, initOverrides);
|
|
18369
|
+
return new VoidApiResponse(response);
|
|
18370
|
+
}
|
|
18371
|
+
/**
|
|
18372
|
+
* Streams Opus tokens then emits a fully-validated workflow JSON object (single root, no cycles, branch_path coherent, all step types valid). Channels referenced by the workflow must appear in the project\'s available_channels grounding; unsupported channels fall back to email via the prompt\'s hard rules.
|
|
18373
|
+
* Stream a generated workflow from a natural-language description
|
|
18374
|
+
*/
|
|
18375
|
+
async v1MuseWorkflowsGeneratePost(initOverrides) {
|
|
18376
|
+
await this.v1MuseWorkflowsGeneratePostRaw(initOverrides);
|
|
18377
|
+
}
|
|
18378
|
+
};
|
|
18379
|
+
|
|
17031
18380
|
// src/src/apis/PushApi.ts
|
|
17032
18381
|
var PushApi = class extends BaseAPI {
|
|
17033
18382
|
/**
|
|
@@ -21070,6 +22419,9 @@ var Zyphr = class {
|
|
|
21070
22419
|
mfa: new AuthMFAApi(config),
|
|
21071
22420
|
magicLinks: new AuthMagicLinksApi(config),
|
|
21072
22421
|
oauth: new AuthOAuthApi(config),
|
|
22422
|
+
// sc-5594 / epic-5587 — Auth-as-a-Service Organizations (Pro/Enterprise).
|
|
22423
|
+
// Sub-tenant CRUD + membership + the active-org switch flow.
|
|
22424
|
+
organizations: new AuthOrganizationsApi(config),
|
|
21073
22425
|
phone: new AuthPhoneApi(config),
|
|
21074
22426
|
profile: new AuthUserProfileApi(config),
|
|
21075
22427
|
webauthn: new AuthWebAuthnApi(config)
|
|
@@ -21119,6 +22471,10 @@ export {
|
|
|
21119
22471
|
AddDomainRequestFromJSONTyped,
|
|
21120
22472
|
AddDomainRequestToJSON,
|
|
21121
22473
|
AddDomainRequestToJSONTyped,
|
|
22474
|
+
AddOrganizationMemberRequestFromJSON,
|
|
22475
|
+
AddOrganizationMemberRequestFromJSONTyped,
|
|
22476
|
+
AddOrganizationMemberRequestToJSON,
|
|
22477
|
+
AddOrganizationMemberRequestToJSONTyped,
|
|
21122
22478
|
AddTopicSubscribersRequestFromJSON,
|
|
21123
22479
|
AddTopicSubscribersRequestFromJSONTyped,
|
|
21124
22480
|
AddTopicSubscribersRequestToJSON,
|
|
@@ -21224,6 +22580,7 @@ export {
|
|
|
21224
22580
|
AuthMFAApi,
|
|
21225
22581
|
AuthMagicLinksApi,
|
|
21226
22582
|
AuthOAuthApi,
|
|
22583
|
+
AuthOrganizationsApi,
|
|
21227
22584
|
AuthPasswordResetApi,
|
|
21228
22585
|
AuthPhoneApi,
|
|
21229
22586
|
AuthRegistrationApi,
|
|
@@ -21363,6 +22720,10 @@ export {
|
|
|
21363
22720
|
CreateCategoryRequestFromJSONTyped,
|
|
21364
22721
|
CreateCategoryRequestToJSON,
|
|
21365
22722
|
CreateCategoryRequestToJSONTyped,
|
|
22723
|
+
CreateOrganizationRequestFromJSON,
|
|
22724
|
+
CreateOrganizationRequestFromJSONTyped,
|
|
22725
|
+
CreateOrganizationRequestToJSON,
|
|
22726
|
+
CreateOrganizationRequestToJSONTyped,
|
|
21366
22727
|
CreateSubscriberRequestFromJSON,
|
|
21367
22728
|
CreateSubscriberRequestFromJSONTyped,
|
|
21368
22729
|
CreateSubscriberRequestToJSON,
|
|
@@ -21759,6 +23120,7 @@ export {
|
|
|
21759
23120
|
MfaVerifyRequestFromJSONTyped,
|
|
21760
23121
|
MfaVerifyRequestToJSON,
|
|
21761
23122
|
MfaVerifyRequestToJSONTyped,
|
|
23123
|
+
MuseApi,
|
|
21762
23124
|
OAuthAuthorizationUrlResponseDataFromJSON,
|
|
21763
23125
|
OAuthAuthorizationUrlResponseDataFromJSONTyped,
|
|
21764
23126
|
OAuthAuthorizationUrlResponseDataToJSON,
|
|
@@ -21831,6 +23193,38 @@ export {
|
|
|
21831
23193
|
OAuthTokensResponseFromJSONTyped,
|
|
21832
23194
|
OAuthTokensResponseToJSON,
|
|
21833
23195
|
OAuthTokensResponseToJSONTyped,
|
|
23196
|
+
OrganizationFromJSON,
|
|
23197
|
+
OrganizationFromJSONTyped,
|
|
23198
|
+
OrganizationListResponseFromJSON,
|
|
23199
|
+
OrganizationListResponseFromJSONTyped,
|
|
23200
|
+
OrganizationListResponseMetaFromJSON,
|
|
23201
|
+
OrganizationListResponseMetaFromJSONTyped,
|
|
23202
|
+
OrganizationListResponseMetaToJSON,
|
|
23203
|
+
OrganizationListResponseMetaToJSONTyped,
|
|
23204
|
+
OrganizationListResponseToJSON,
|
|
23205
|
+
OrganizationListResponseToJSONTyped,
|
|
23206
|
+
OrganizationMembersListResponseFromJSON,
|
|
23207
|
+
OrganizationMembersListResponseFromJSONTyped,
|
|
23208
|
+
OrganizationMembersListResponseToJSON,
|
|
23209
|
+
OrganizationMembersListResponseToJSONTyped,
|
|
23210
|
+
OrganizationMembershipFromJSON,
|
|
23211
|
+
OrganizationMembershipFromJSONTyped,
|
|
23212
|
+
OrganizationMembershipResponseFromJSON,
|
|
23213
|
+
OrganizationMembershipResponseFromJSONTyped,
|
|
23214
|
+
OrganizationMembershipResponseToJSON,
|
|
23215
|
+
OrganizationMembershipResponseToJSONTyped,
|
|
23216
|
+
OrganizationMembershipToJSON,
|
|
23217
|
+
OrganizationMembershipToJSONTyped,
|
|
23218
|
+
OrganizationMembershipWithUserFromJSON,
|
|
23219
|
+
OrganizationMembershipWithUserFromJSONTyped,
|
|
23220
|
+
OrganizationMembershipWithUserToJSON,
|
|
23221
|
+
OrganizationMembershipWithUserToJSONTyped,
|
|
23222
|
+
OrganizationResponseFromJSON,
|
|
23223
|
+
OrganizationResponseFromJSONTyped,
|
|
23224
|
+
OrganizationResponseToJSON,
|
|
23225
|
+
OrganizationResponseToJSONTyped,
|
|
23226
|
+
OrganizationToJSON,
|
|
23227
|
+
OrganizationToJSONTyped,
|
|
21834
23228
|
PaginationMetaFromJSON,
|
|
21835
23229
|
PaginationMetaFromJSONTyped,
|
|
21836
23230
|
PaginationMetaToJSON,
|
|
@@ -22301,6 +23695,27 @@ export {
|
|
|
22301
23695
|
SuccessResultFromJSONTyped,
|
|
22302
23696
|
SuccessResultToJSON,
|
|
22303
23697
|
SuccessResultToJSONTyped,
|
|
23698
|
+
SwitchOrganizationRequestFromJSON,
|
|
23699
|
+
SwitchOrganizationRequestFromJSONTyped,
|
|
23700
|
+
SwitchOrganizationRequestToJSON,
|
|
23701
|
+
SwitchOrganizationRequestToJSONTyped,
|
|
23702
|
+
SwitchOrganizationResponseDataFromJSON,
|
|
23703
|
+
SwitchOrganizationResponseDataFromJSONTyped,
|
|
23704
|
+
SwitchOrganizationResponseDataToJSON,
|
|
23705
|
+
SwitchOrganizationResponseDataToJSONTyped,
|
|
23706
|
+
SwitchOrganizationResponseDataTokensFromJSON,
|
|
23707
|
+
SwitchOrganizationResponseDataTokensFromJSONTyped,
|
|
23708
|
+
SwitchOrganizationResponseDataTokensToJSON,
|
|
23709
|
+
SwitchOrganizationResponseDataTokensToJSONTyped,
|
|
23710
|
+
SwitchOrganizationResponseDataTokensTokenTypeEnum,
|
|
23711
|
+
SwitchOrganizationResponseDataUserFromJSON,
|
|
23712
|
+
SwitchOrganizationResponseDataUserFromJSONTyped,
|
|
23713
|
+
SwitchOrganizationResponseDataUserToJSON,
|
|
23714
|
+
SwitchOrganizationResponseDataUserToJSONTyped,
|
|
23715
|
+
SwitchOrganizationResponseFromJSON,
|
|
23716
|
+
SwitchOrganizationResponseFromJSONTyped,
|
|
23717
|
+
SwitchOrganizationResponseToJSON,
|
|
23718
|
+
SwitchOrganizationResponseToJSONTyped,
|
|
22304
23719
|
TemplateFromJSON,
|
|
22305
23720
|
TemplateFromJSONTyped,
|
|
22306
23721
|
TemplateListResponseFromJSON,
|
|
@@ -22418,6 +23833,14 @@ export {
|
|
|
22418
23833
|
UpdateEndUserRequestFromJSONTyped,
|
|
22419
23834
|
UpdateEndUserRequestToJSON,
|
|
22420
23835
|
UpdateEndUserRequestToJSONTyped,
|
|
23836
|
+
UpdateOrganizationMemberRoleRequestFromJSON,
|
|
23837
|
+
UpdateOrganizationMemberRoleRequestFromJSONTyped,
|
|
23838
|
+
UpdateOrganizationMemberRoleRequestToJSON,
|
|
23839
|
+
UpdateOrganizationMemberRoleRequestToJSONTyped,
|
|
23840
|
+
UpdateOrganizationRequestFromJSON,
|
|
23841
|
+
UpdateOrganizationRequestFromJSONTyped,
|
|
23842
|
+
UpdateOrganizationRequestToJSON,
|
|
23843
|
+
UpdateOrganizationRequestToJSONTyped,
|
|
22421
23844
|
UpdateSubscriberPreferencesRequestFromJSON,
|
|
22422
23845
|
UpdateSubscriberPreferencesRequestFromJSONTyped,
|
|
22423
23846
|
UpdateSubscriberPreferencesRequestPreferencesInnerChannelEnum,
|
|
@@ -22476,6 +23899,11 @@ export {
|
|
|
22476
23899
|
UserDevicesDeleteResponseToJSON,
|
|
22477
23900
|
UserDevicesDeleteResponseToJSONTyped,
|
|
22478
23901
|
UtilityApi,
|
|
23902
|
+
V1MuseSubjectsSuggestPostRequestChannelEnum,
|
|
23903
|
+
V1MuseSubjectsSuggestPostRequestFromJSON,
|
|
23904
|
+
V1MuseSubjectsSuggestPostRequestFromJSONTyped,
|
|
23905
|
+
V1MuseSubjectsSuggestPostRequestToJSON,
|
|
23906
|
+
V1MuseSubjectsSuggestPostRequestToJSONTyped,
|
|
22479
23907
|
ValidateResetTokenRequestFromJSON,
|
|
22480
23908
|
ValidateResetTokenRequestFromJSONTyped,
|
|
22481
23909
|
ValidateResetTokenRequestToJSON,
|
|
@@ -22821,6 +24249,7 @@ export {
|
|
|
22821
24249
|
instanceOfAddDomain200Response,
|
|
22822
24250
|
instanceOfAddDomain200ResponseMeta,
|
|
22823
24251
|
instanceOfAddDomainRequest,
|
|
24252
|
+
instanceOfAddOrganizationMemberRequest,
|
|
22824
24253
|
instanceOfAddTopicSubscribersRequest,
|
|
22825
24254
|
instanceOfApiError,
|
|
22826
24255
|
instanceOfApiErrorError,
|
|
@@ -22875,6 +24304,7 @@ export {
|
|
|
22875
24304
|
instanceOfConvertAnonymousUserRequestOneOf1AppleUser,
|
|
22876
24305
|
instanceOfConvertAnonymousUserRequestOneOf1AppleUserName,
|
|
22877
24306
|
instanceOfCreateCategoryRequest,
|
|
24307
|
+
instanceOfCreateOrganizationRequest,
|
|
22878
24308
|
instanceOfCreateSubscriberRequest,
|
|
22879
24309
|
instanceOfCreateTemplateRequest,
|
|
22880
24310
|
instanceOfCreateTopicRequest,
|
|
@@ -22984,6 +24414,14 @@ export {
|
|
|
22984
24414
|
instanceOfOAuthTokensRefreshResponseData,
|
|
22985
24415
|
instanceOfOAuthTokensResponse,
|
|
22986
24416
|
instanceOfOAuthTokensResponseData,
|
|
24417
|
+
instanceOfOrganization,
|
|
24418
|
+
instanceOfOrganizationListResponse,
|
|
24419
|
+
instanceOfOrganizationListResponseMeta,
|
|
24420
|
+
instanceOfOrganizationMembersListResponse,
|
|
24421
|
+
instanceOfOrganizationMembership,
|
|
24422
|
+
instanceOfOrganizationMembershipResponse,
|
|
24423
|
+
instanceOfOrganizationMembershipWithUser,
|
|
24424
|
+
instanceOfOrganizationResponse,
|
|
22987
24425
|
instanceOfPaginationMeta,
|
|
22988
24426
|
instanceOfPasswordRequirements,
|
|
22989
24427
|
instanceOfPasswordRequirementsResponse,
|
|
@@ -23096,6 +24534,11 @@ export {
|
|
|
23096
24534
|
instanceOfSubscriberPreference,
|
|
23097
24535
|
instanceOfSubscriberResponse,
|
|
23098
24536
|
instanceOfSuccessResult,
|
|
24537
|
+
instanceOfSwitchOrganizationRequest,
|
|
24538
|
+
instanceOfSwitchOrganizationResponse,
|
|
24539
|
+
instanceOfSwitchOrganizationResponseData,
|
|
24540
|
+
instanceOfSwitchOrganizationResponseDataTokens,
|
|
24541
|
+
instanceOfSwitchOrganizationResponseDataUser,
|
|
23099
24542
|
instanceOfTemplate,
|
|
23100
24543
|
instanceOfTemplateListResponse,
|
|
23101
24544
|
instanceOfTemplateRenderResponse,
|
|
@@ -23124,6 +24567,8 @@ export {
|
|
|
23124
24567
|
instanceOfUnsubscribeResponse,
|
|
23125
24568
|
instanceOfUpdateCategoryRequest,
|
|
23126
24569
|
instanceOfUpdateEndUserRequest,
|
|
24570
|
+
instanceOfUpdateOrganizationMemberRoleRequest,
|
|
24571
|
+
instanceOfUpdateOrganizationRequest,
|
|
23127
24572
|
instanceOfUpdateSubscriberPreferencesRequest,
|
|
23128
24573
|
instanceOfUpdateSubscriberPreferencesRequestPreferencesInner,
|
|
23129
24574
|
instanceOfUpdateSubscriberRequest,
|
|
@@ -23137,6 +24582,7 @@ export {
|
|
|
23137
24582
|
instanceOfUpsertSmsConfigRequest,
|
|
23138
24583
|
instanceOfUserDevicesDeleteResponse,
|
|
23139
24584
|
instanceOfUserDevicesDeleteResponseData,
|
|
24585
|
+
instanceOfV1MuseSubjectsSuggestPostRequest,
|
|
23140
24586
|
instanceOfValidateResetTokenRequest,
|
|
23141
24587
|
instanceOfValidateResetTokenResponse,
|
|
23142
24588
|
instanceOfValidateResetTokenResponseData,
|