@scalekit-sdk/node 2.1.5 → 2.1.7
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/buf.gen.yaml +1 -0
- package/lib/auth.d.ts +22 -0
- package/lib/auth.js +65 -0
- package/lib/auth.js.map +1 -0
- package/lib/core.js +1 -1
- package/lib/organization.d.ts +9 -2
- package/lib/organization.js +19 -0
- package/lib/organization.js.map +1 -1
- package/lib/pkg/grpc/scalekit/v1/auditlogs/auditlogs_pb.d.ts +16 -0
- package/lib/pkg/grpc/scalekit/v1/auditlogs/auditlogs_pb.js +20 -0
- package/lib/pkg/grpc/scalekit/v1/auditlogs/auditlogs_pb.js.map +1 -1
- package/lib/pkg/grpc/scalekit/v1/auth/auth_connect.d.ts +118 -0
- package/lib/pkg/grpc/scalekit/v1/auth/auth_connect.js +126 -0
- package/lib/pkg/grpc/scalekit/v1/auth/auth_connect.js.map +1 -0
- package/lib/pkg/grpc/scalekit/v1/auth/auth_pb.d.ts +617 -0
- package/lib/pkg/grpc/scalekit/v1/auth/auth_pb.js +927 -0
- package/lib/pkg/grpc/scalekit/v1/auth/auth_pb.js.map +1 -0
- package/lib/pkg/grpc/scalekit/v1/commons/commons_pb.d.ts +34 -4
- package/lib/pkg/grpc/scalekit/v1/commons/commons_pb.js +43 -6
- package/lib/pkg/grpc/scalekit/v1/commons/commons_pb.js.map +1 -1
- package/lib/pkg/grpc/scalekit/v1/connections/connections_connect.d.ts +10 -1
- package/lib/pkg/grpc/scalekit/v1/connections/connections_connect.js +9 -0
- package/lib/pkg/grpc/scalekit/v1/connections/connections_connect.js.map +1 -1
- package/lib/pkg/grpc/scalekit/v1/connections/connections_pb.d.ts +277 -2
- package/lib/pkg/grpc/scalekit/v1/connections/connections_pb.js +324 -2
- package/lib/pkg/grpc/scalekit/v1/connections/connections_pb.js.map +1 -1
- package/lib/pkg/grpc/scalekit/v1/organizations/organizations_connect.d.ts +6 -6
- package/lib/pkg/grpc/scalekit/v1/organizations/organizations_connect.js +5 -5
- package/lib/pkg/grpc/scalekit/v1/organizations/organizations_pb.d.ts +19 -30
- package/lib/pkg/grpc/scalekit/v1/organizations/organizations_pb.js +22 -31
- package/lib/pkg/grpc/scalekit/v1/organizations/organizations_pb.js.map +1 -1
- package/lib/pkg/grpc/scalekit/v1/sessions/sessions_pb.d.ts +43 -50
- package/lib/pkg/grpc/scalekit/v1/sessions/sessions_pb.js +66 -73
- package/lib/pkg/grpc/scalekit/v1/sessions/sessions_pb.js.map +1 -1
- package/lib/pkg/grpc/scalekit/v1/users/users_pb.d.ts +62 -14
- package/lib/pkg/grpc/scalekit/v1/users/users_pb.js +46 -17
- package/lib/pkg/grpc/scalekit/v1/users/users_pb.js.map +1 -1
- package/lib/scalekit.d.ts +2 -0
- package/lib/scalekit.js +2 -0
- package/lib/scalekit.js.map +1 -1
- package/lib/types/organization.d.ts +3 -0
- package/package.json +1 -1
- package/src/auth.ts +65 -0
- package/src/core.ts +1 -1
- package/src/organization.ts +25 -2
- package/src/pkg/grpc/scalekit/v1/auditlogs/auditlogs_pb.ts +24 -0
- package/src/pkg/grpc/scalekit/v1/auth/auth_connect.ts +125 -0
- package/src/pkg/grpc/scalekit/v1/auth/auth_pb.ts +1183 -0
- package/src/pkg/grpc/scalekit/v1/commons/commons_pb.ts +50 -6
- package/src/pkg/grpc/scalekit/v1/connections/connections_connect.ts +10 -1
- package/src/pkg/grpc/scalekit/v1/connections/connections_pb.ts +504 -1
- package/src/pkg/grpc/scalekit/v1/organizations/organizations_connect.ts +6 -6
- package/src/pkg/grpc/scalekit/v1/organizations/organizations_pb.ts +28 -43
- package/src/pkg/grpc/scalekit/v1/sessions/sessions_pb.ts +82 -81
- package/src/pkg/grpc/scalekit/v1/users/users_pb.ts +92 -22
- package/src/scalekit.ts +6 -0
- package/src/types/organization.ts +4 -0
- package/tests/organization.test.ts +16 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// @ts-nocheck
|
|
5
5
|
|
|
6
6
|
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
|
|
7
|
-
import { BoolValue, FieldMask, Int32Value, Message,
|
|
7
|
+
import { BoolValue, FieldMask, Int32Value, Message, proto3, Timestamp } from "@bufbuild/protobuf";
|
|
8
8
|
import { RegionCode } from "../commons/commons_pb.js";
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -1216,22 +1216,9 @@ export class UpdateOrganizationSessionSettingsResponse extends Message<UpdateOrg
|
|
|
1216
1216
|
*/
|
|
1217
1217
|
export class OrganizationUserManagementSettings extends Message<OrganizationUserManagementSettings> {
|
|
1218
1218
|
/**
|
|
1219
|
-
* @generated from field: google.protobuf.
|
|
1219
|
+
* @generated from field: google.protobuf.Int32Value max_allowed_users = 1;
|
|
1220
1220
|
*/
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
/**
|
|
1224
|
-
* @generated from field: google.protobuf.BoolValue sync_user_profile_on_signin = 2;
|
|
1225
|
-
*/
|
|
1226
|
-
syncUserProfileOnSignin?: boolean;
|
|
1227
|
-
|
|
1228
|
-
/**
|
|
1229
|
-
* Deprecated placeholder to ensure google.protobuf.NullValue is referenced in the schema, preventing unused-definition warnings.
|
|
1230
|
-
*
|
|
1231
|
-
* @generated from field: google.protobuf.NullValue deprecated_placeholder = 99 [deprecated = true];
|
|
1232
|
-
* @deprecated
|
|
1233
|
-
*/
|
|
1234
|
-
deprecatedPlaceholder = NullValue.NULL_VALUE;
|
|
1221
|
+
maxAllowedUsers?: number;
|
|
1235
1222
|
|
|
1236
1223
|
constructor(data?: PartialMessage<OrganizationUserManagementSettings>) {
|
|
1237
1224
|
super();
|
|
@@ -1241,9 +1228,7 @@ export class OrganizationUserManagementSettings extends Message<OrganizationUser
|
|
|
1241
1228
|
static readonly runtime: typeof proto3 = proto3;
|
|
1242
1229
|
static readonly typeName = "scalekit.v1.organizations.OrganizationUserManagementSettings";
|
|
1243
1230
|
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
1244
|
-
{ no: 1, name: "
|
|
1245
|
-
{ no: 2, name: "sync_user_profile_on_signin", kind: "message", T: BoolValue },
|
|
1246
|
-
{ no: 99, name: "deprecated_placeholder", kind: "enum", T: proto3.getEnumType(NullValue) },
|
|
1231
|
+
{ no: 1, name: "max_allowed_users", kind: "message", T: Int32Value },
|
|
1247
1232
|
]);
|
|
1248
1233
|
|
|
1249
1234
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): OrganizationUserManagementSettings {
|
|
@@ -1626,9 +1611,9 @@ export class OrganizationSettingsFeature extends Message<OrganizationSettingsFea
|
|
|
1626
1611
|
}
|
|
1627
1612
|
|
|
1628
1613
|
/**
|
|
1629
|
-
* @generated from message scalekit.v1.organizations.
|
|
1614
|
+
* @generated from message scalekit.v1.organizations.UpsertUserManagementSettingsRequest
|
|
1630
1615
|
*/
|
|
1631
|
-
export class
|
|
1616
|
+
export class UpsertUserManagementSettingsRequest extends Message<UpsertUserManagementSettingsRequest> {
|
|
1632
1617
|
/**
|
|
1633
1618
|
* @generated from field: string organization_id = 1;
|
|
1634
1619
|
*/
|
|
@@ -1639,69 +1624,69 @@ export class UpdateUserManagementSettingsRequest extends Message<UpdateUserManag
|
|
|
1639
1624
|
*/
|
|
1640
1625
|
settings?: OrganizationUserManagementSettings;
|
|
1641
1626
|
|
|
1642
|
-
constructor(data?: PartialMessage<
|
|
1627
|
+
constructor(data?: PartialMessage<UpsertUserManagementSettingsRequest>) {
|
|
1643
1628
|
super();
|
|
1644
1629
|
proto3.util.initPartial(data, this);
|
|
1645
1630
|
}
|
|
1646
1631
|
|
|
1647
1632
|
static readonly runtime: typeof proto3 = proto3;
|
|
1648
|
-
static readonly typeName = "scalekit.v1.organizations.
|
|
1633
|
+
static readonly typeName = "scalekit.v1.organizations.UpsertUserManagementSettingsRequest";
|
|
1649
1634
|
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
1650
1635
|
{ no: 1, name: "organization_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1651
1636
|
{ no: 2, name: "settings", kind: "message", T: OrganizationUserManagementSettings },
|
|
1652
1637
|
]);
|
|
1653
1638
|
|
|
1654
|
-
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>):
|
|
1655
|
-
return new
|
|
1639
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpsertUserManagementSettingsRequest {
|
|
1640
|
+
return new UpsertUserManagementSettingsRequest().fromBinary(bytes, options);
|
|
1656
1641
|
}
|
|
1657
1642
|
|
|
1658
|
-
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>):
|
|
1659
|
-
return new
|
|
1643
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpsertUserManagementSettingsRequest {
|
|
1644
|
+
return new UpsertUserManagementSettingsRequest().fromJson(jsonValue, options);
|
|
1660
1645
|
}
|
|
1661
1646
|
|
|
1662
|
-
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>):
|
|
1663
|
-
return new
|
|
1647
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpsertUserManagementSettingsRequest {
|
|
1648
|
+
return new UpsertUserManagementSettingsRequest().fromJsonString(jsonString, options);
|
|
1664
1649
|
}
|
|
1665
1650
|
|
|
1666
|
-
static equals(a:
|
|
1667
|
-
return proto3.util.equals(
|
|
1651
|
+
static equals(a: UpsertUserManagementSettingsRequest | PlainMessage<UpsertUserManagementSettingsRequest> | undefined, b: UpsertUserManagementSettingsRequest | PlainMessage<UpsertUserManagementSettingsRequest> | undefined): boolean {
|
|
1652
|
+
return proto3.util.equals(UpsertUserManagementSettingsRequest, a, b);
|
|
1668
1653
|
}
|
|
1669
1654
|
}
|
|
1670
1655
|
|
|
1671
1656
|
/**
|
|
1672
|
-
* @generated from message scalekit.v1.organizations.
|
|
1657
|
+
* @generated from message scalekit.v1.organizations.UpsertUserManagementSettingsResponse
|
|
1673
1658
|
*/
|
|
1674
|
-
export class
|
|
1659
|
+
export class UpsertUserManagementSettingsResponse extends Message<UpsertUserManagementSettingsResponse> {
|
|
1675
1660
|
/**
|
|
1676
1661
|
* @generated from field: scalekit.v1.organizations.OrganizationUserManagementSettings settings = 1;
|
|
1677
1662
|
*/
|
|
1678
1663
|
settings?: OrganizationUserManagementSettings;
|
|
1679
1664
|
|
|
1680
|
-
constructor(data?: PartialMessage<
|
|
1665
|
+
constructor(data?: PartialMessage<UpsertUserManagementSettingsResponse>) {
|
|
1681
1666
|
super();
|
|
1682
1667
|
proto3.util.initPartial(data, this);
|
|
1683
1668
|
}
|
|
1684
1669
|
|
|
1685
1670
|
static readonly runtime: typeof proto3 = proto3;
|
|
1686
|
-
static readonly typeName = "scalekit.v1.organizations.
|
|
1671
|
+
static readonly typeName = "scalekit.v1.organizations.UpsertUserManagementSettingsResponse";
|
|
1687
1672
|
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
1688
1673
|
{ no: 1, name: "settings", kind: "message", T: OrganizationUserManagementSettings },
|
|
1689
1674
|
]);
|
|
1690
1675
|
|
|
1691
|
-
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>):
|
|
1692
|
-
return new
|
|
1676
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpsertUserManagementSettingsResponse {
|
|
1677
|
+
return new UpsertUserManagementSettingsResponse().fromBinary(bytes, options);
|
|
1693
1678
|
}
|
|
1694
1679
|
|
|
1695
|
-
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>):
|
|
1696
|
-
return new
|
|
1680
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpsertUserManagementSettingsResponse {
|
|
1681
|
+
return new UpsertUserManagementSettingsResponse().fromJson(jsonValue, options);
|
|
1697
1682
|
}
|
|
1698
1683
|
|
|
1699
|
-
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>):
|
|
1700
|
-
return new
|
|
1684
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpsertUserManagementSettingsResponse {
|
|
1685
|
+
return new UpsertUserManagementSettingsResponse().fromJsonString(jsonString, options);
|
|
1701
1686
|
}
|
|
1702
1687
|
|
|
1703
|
-
static equals(a:
|
|
1704
|
-
return proto3.util.equals(
|
|
1688
|
+
static equals(a: UpsertUserManagementSettingsResponse | PlainMessage<UpsertUserManagementSettingsResponse> | undefined, b: UpsertUserManagementSettingsResponse | PlainMessage<UpsertUserManagementSettingsResponse> | undefined): boolean {
|
|
1689
|
+
return proto3.util.equals(UpsertUserManagementSettingsResponse, a, b);
|
|
1705
1690
|
}
|
|
1706
1691
|
}
|
|
1707
1692
|
|
|
@@ -416,136 +416,131 @@ export class SessionDetails extends Message<SessionDetails> {
|
|
|
416
416
|
status = "";
|
|
417
417
|
|
|
418
418
|
/**
|
|
419
|
-
* @generated from field:
|
|
419
|
+
* @generated from field: scalekit.v1.sessions.DeviceDetails device = 12;
|
|
420
420
|
*/
|
|
421
|
-
|
|
421
|
+
device?: DeviceDetails;
|
|
422
422
|
|
|
423
423
|
/**
|
|
424
|
-
* @generated from field:
|
|
424
|
+
* @generated from field: google.protobuf.Timestamp last_active_at = 13;
|
|
425
425
|
*/
|
|
426
|
-
|
|
426
|
+
lastActiveAt?: Timestamp;
|
|
427
427
|
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
428
|
+
constructor(data?: PartialMessage<SessionDetails>) {
|
|
429
|
+
super();
|
|
430
|
+
proto3.util.initPartial(data, this);
|
|
431
|
+
}
|
|
432
432
|
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
433
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
434
|
+
static readonly typeName = "scalekit.v1.sessions.SessionDetails";
|
|
435
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
436
|
+
{ no: 1, name: "session_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
437
|
+
{ no: 2, name: "user_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
438
|
+
{ no: 3, name: "authenticated_organizations", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
|
|
439
|
+
{ no: 4, name: "organization_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
440
|
+
{ no: 5, name: "created_at", kind: "message", T: Timestamp },
|
|
441
|
+
{ no: 6, name: "updated_at", kind: "message", T: Timestamp },
|
|
442
|
+
{ no: 7, name: "idle_expires_at", kind: "message", T: Timestamp },
|
|
443
|
+
{ no: 8, name: "absolute_expires_at", kind: "message", T: Timestamp },
|
|
444
|
+
{ no: 9, name: "expired_at", kind: "message", T: Timestamp },
|
|
445
|
+
{ no: 10, name: "logout_at", kind: "message", T: Timestamp },
|
|
446
|
+
{ no: 11, name: "status", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
447
|
+
{ no: 12, name: "device", kind: "message", T: DeviceDetails },
|
|
448
|
+
{ no: 13, name: "last_active_at", kind: "message", T: Timestamp },
|
|
449
|
+
]);
|
|
437
450
|
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
initialBrowserVersion = "";
|
|
451
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SessionDetails {
|
|
452
|
+
return new SessionDetails().fromBinary(bytes, options);
|
|
453
|
+
}
|
|
442
454
|
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
initialDeviceType = "";
|
|
455
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SessionDetails {
|
|
456
|
+
return new SessionDetails().fromJson(jsonValue, options);
|
|
457
|
+
}
|
|
447
458
|
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
initialIp = "";
|
|
459
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SessionDetails {
|
|
460
|
+
return new SessionDetails().fromJsonString(jsonString, options);
|
|
461
|
+
}
|
|
452
462
|
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
463
|
+
static equals(a: SessionDetails | PlainMessage<SessionDetails> | undefined, b: SessionDetails | PlainMessage<SessionDetails> | undefined): boolean {
|
|
464
|
+
return proto3.util.equals(SessionDetails, a, b);
|
|
465
|
+
}
|
|
466
|
+
}
|
|
457
467
|
|
|
468
|
+
/**
|
|
469
|
+
* @generated from message scalekit.v1.sessions.DeviceDetails
|
|
470
|
+
*/
|
|
471
|
+
export class DeviceDetails extends Message<DeviceDetails> {
|
|
458
472
|
/**
|
|
459
|
-
* @generated from field: string
|
|
473
|
+
* @generated from field: string user_agent = 12;
|
|
460
474
|
*/
|
|
461
|
-
|
|
475
|
+
userAgent = "";
|
|
462
476
|
|
|
463
477
|
/**
|
|
464
|
-
* @generated from field: string
|
|
478
|
+
* @generated from field: string os = 13;
|
|
465
479
|
*/
|
|
466
|
-
|
|
480
|
+
os = "";
|
|
467
481
|
|
|
468
482
|
/**
|
|
469
|
-
* @generated from field: string
|
|
483
|
+
* @generated from field: string os_version = 14;
|
|
470
484
|
*/
|
|
471
|
-
|
|
485
|
+
osVersion = "";
|
|
472
486
|
|
|
473
487
|
/**
|
|
474
|
-
* @generated from field: string
|
|
488
|
+
* @generated from field: string browser = 15;
|
|
475
489
|
*/
|
|
476
|
-
|
|
490
|
+
browser = "";
|
|
477
491
|
|
|
478
492
|
/**
|
|
479
|
-
* @generated from field: string
|
|
493
|
+
* @generated from field: string browser_version = 16;
|
|
480
494
|
*/
|
|
481
|
-
|
|
495
|
+
browserVersion = "";
|
|
482
496
|
|
|
483
497
|
/**
|
|
484
|
-
* @generated from field: string
|
|
498
|
+
* @generated from field: string device_type = 17;
|
|
485
499
|
*/
|
|
486
|
-
|
|
500
|
+
deviceType = "";
|
|
487
501
|
|
|
488
502
|
/**
|
|
489
|
-
* @generated from field: string
|
|
503
|
+
* @generated from field: string ip = 19;
|
|
490
504
|
*/
|
|
491
|
-
|
|
505
|
+
ip = "";
|
|
492
506
|
|
|
493
507
|
/**
|
|
494
|
-
* @generated from field: scalekit.v1.sessions.Location
|
|
508
|
+
* @generated from field: scalekit.v1.sessions.Location location = 20;
|
|
495
509
|
*/
|
|
496
|
-
|
|
510
|
+
location?: Location;
|
|
497
511
|
|
|
498
|
-
constructor(data?: PartialMessage<
|
|
512
|
+
constructor(data?: PartialMessage<DeviceDetails>) {
|
|
499
513
|
super();
|
|
500
514
|
proto3.util.initPartial(data, this);
|
|
501
515
|
}
|
|
502
516
|
|
|
503
517
|
static readonly runtime: typeof proto3 = proto3;
|
|
504
|
-
static readonly typeName = "scalekit.v1.sessions.
|
|
518
|
+
static readonly typeName = "scalekit.v1.sessions.DeviceDetails";
|
|
505
519
|
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
506
|
-
{ no:
|
|
507
|
-
{ no:
|
|
508
|
-
{ no:
|
|
509
|
-
{ no:
|
|
510
|
-
{ no:
|
|
511
|
-
{ no:
|
|
512
|
-
{ no:
|
|
513
|
-
{ no:
|
|
514
|
-
{ no: 9, name: "expired_at", kind: "message", T: Timestamp },
|
|
515
|
-
{ no: 10, name: "logout_at", kind: "message", T: Timestamp },
|
|
516
|
-
{ no: 11, name: "status", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
517
|
-
{ no: 12, name: "initial_user_agent", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
518
|
-
{ no: 13, name: "initial_os", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
519
|
-
{ no: 14, name: "initial_os_version", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
520
|
-
{ no: 15, name: "initial_browser", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
521
|
-
{ no: 16, name: "initial_browser_version", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
522
|
-
{ no: 17, name: "initial_device_type", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
523
|
-
{ no: 19, name: "initial_ip", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
524
|
-
{ no: 20, name: "initial_location", kind: "message", T: Location },
|
|
525
|
-
{ no: 21, name: "latest_user_agent", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
526
|
-
{ no: 22, name: "latest_os", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
527
|
-
{ no: 23, name: "latest_os_version", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
528
|
-
{ no: 24, name: "latest_browser", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
529
|
-
{ no: 25, name: "latest_browser_version", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
530
|
-
{ no: 26, name: "latest_device_type", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
531
|
-
{ no: 28, name: "latest_ip", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
532
|
-
{ no: 29, name: "latest_location", kind: "message", T: Location },
|
|
520
|
+
{ no: 12, name: "user_agent", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
521
|
+
{ no: 13, name: "os", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
522
|
+
{ no: 14, name: "os_version", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
523
|
+
{ no: 15, name: "browser", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
524
|
+
{ no: 16, name: "browser_version", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
525
|
+
{ no: 17, name: "device_type", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
526
|
+
{ no: 19, name: "ip", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
527
|
+
{ no: 20, name: "location", kind: "message", T: Location },
|
|
533
528
|
]);
|
|
534
529
|
|
|
535
|
-
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>):
|
|
536
|
-
return new
|
|
530
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeviceDetails {
|
|
531
|
+
return new DeviceDetails().fromBinary(bytes, options);
|
|
537
532
|
}
|
|
538
533
|
|
|
539
|
-
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>):
|
|
540
|
-
return new
|
|
534
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeviceDetails {
|
|
535
|
+
return new DeviceDetails().fromJson(jsonValue, options);
|
|
541
536
|
}
|
|
542
537
|
|
|
543
|
-
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>):
|
|
544
|
-
return new
|
|
538
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeviceDetails {
|
|
539
|
+
return new DeviceDetails().fromJsonString(jsonString, options);
|
|
545
540
|
}
|
|
546
541
|
|
|
547
|
-
static equals(a:
|
|
548
|
-
return proto3.util.equals(
|
|
542
|
+
static equals(a: DeviceDetails | PlainMessage<DeviceDetails> | undefined, b: DeviceDetails | PlainMessage<DeviceDetails> | undefined): boolean {
|
|
543
|
+
return proto3.util.equals(DeviceDetails, a, b);
|
|
549
544
|
}
|
|
550
545
|
}
|
|
551
546
|
|
|
@@ -598,6 +593,11 @@ export class RevokedSessionDetails extends Message<RevokedSessionDetails> {
|
|
|
598
593
|
*/
|
|
599
594
|
status = "";
|
|
600
595
|
|
|
596
|
+
/**
|
|
597
|
+
* @generated from field: google.protobuf.Timestamp last_active_at = 12;
|
|
598
|
+
*/
|
|
599
|
+
lastActiveAt?: Timestamp;
|
|
600
|
+
|
|
601
601
|
constructor(data?: PartialMessage<RevokedSessionDetails>) {
|
|
602
602
|
super();
|
|
603
603
|
proto3.util.initPartial(data, this);
|
|
@@ -615,6 +615,7 @@ export class RevokedSessionDetails extends Message<RevokedSessionDetails> {
|
|
|
615
615
|
{ no: 9, name: "expired_at", kind: "message", T: Timestamp },
|
|
616
616
|
{ no: 10, name: "logout_at", kind: "message", T: Timestamp },
|
|
617
617
|
{ no: 11, name: "status", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
618
|
+
{ no: 12, name: "last_active_at", kind: "message", T: Timestamp },
|
|
618
619
|
]);
|
|
619
620
|
|
|
620
621
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RevokedSessionDetails {
|
|
@@ -1303,14 +1303,14 @@ export class CreateUser extends Message<CreateUser> {
|
|
|
1303
1303
|
*/
|
|
1304
1304
|
export class CreateUserProfile extends Message<CreateUserProfile> {
|
|
1305
1305
|
/**
|
|
1306
|
-
* @generated from field: string
|
|
1306
|
+
* @generated from field: string given_name = 2;
|
|
1307
1307
|
*/
|
|
1308
|
-
|
|
1308
|
+
givenName = "";
|
|
1309
1309
|
|
|
1310
1310
|
/**
|
|
1311
|
-
* @generated from field: string
|
|
1311
|
+
* @generated from field: string family_name = 3;
|
|
1312
1312
|
*/
|
|
1313
|
-
|
|
1313
|
+
familyName = "";
|
|
1314
1314
|
|
|
1315
1315
|
/**
|
|
1316
1316
|
* @generated from field: string name = 4;
|
|
@@ -1337,6 +1337,38 @@ export class CreateUserProfile extends Message<CreateUserProfile> {
|
|
|
1337
1337
|
*/
|
|
1338
1338
|
customAttributes: { [key: string]: string } = {};
|
|
1339
1339
|
|
|
1340
|
+
/**
|
|
1341
|
+
* @generated from field: string preferred_username = 10;
|
|
1342
|
+
*/
|
|
1343
|
+
preferredUsername = "";
|
|
1344
|
+
|
|
1345
|
+
/**
|
|
1346
|
+
* @generated from field: optional string picture = 11;
|
|
1347
|
+
*/
|
|
1348
|
+
picture?: string;
|
|
1349
|
+
|
|
1350
|
+
/**
|
|
1351
|
+
* @generated from field: optional string gender = 12;
|
|
1352
|
+
*/
|
|
1353
|
+
gender?: string;
|
|
1354
|
+
|
|
1355
|
+
/**
|
|
1356
|
+
* @generated from field: repeated string groups = 13;
|
|
1357
|
+
*/
|
|
1358
|
+
groups: string[] = [];
|
|
1359
|
+
|
|
1360
|
+
/**
|
|
1361
|
+
* @generated from field: string first_name = 21 [deprecated = true];
|
|
1362
|
+
* @deprecated
|
|
1363
|
+
*/
|
|
1364
|
+
firstName = "";
|
|
1365
|
+
|
|
1366
|
+
/**
|
|
1367
|
+
* @generated from field: string last_name = 22 [deprecated = true];
|
|
1368
|
+
* @deprecated
|
|
1369
|
+
*/
|
|
1370
|
+
lastName = "";
|
|
1371
|
+
|
|
1340
1372
|
constructor(data?: PartialMessage<CreateUserProfile>) {
|
|
1341
1373
|
super();
|
|
1342
1374
|
proto3.util.initPartial(data, this);
|
|
@@ -1345,13 +1377,19 @@ export class CreateUserProfile extends Message<CreateUserProfile> {
|
|
|
1345
1377
|
static readonly runtime: typeof proto3 = proto3;
|
|
1346
1378
|
static readonly typeName = "scalekit.v1.users.CreateUserProfile";
|
|
1347
1379
|
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
1348
|
-
{ no: 2, name: "
|
|
1349
|
-
{ no: 3, name: "
|
|
1380
|
+
{ no: 2, name: "given_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1381
|
+
{ no: 3, name: "family_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1350
1382
|
{ no: 4, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1351
1383
|
{ no: 5, name: "locale", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1352
1384
|
{ no: 7, name: "phone_number", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1353
1385
|
{ no: 8, name: "metadata", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
|
|
1354
1386
|
{ no: 9, name: "custom_attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
|
|
1387
|
+
{ no: 10, name: "preferred_username", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1388
|
+
{ no: 11, name: "picture", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
1389
|
+
{ no: 12, name: "gender", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
1390
|
+
{ no: 13, name: "groups", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
|
|
1391
|
+
{ no: 21, name: "first_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1392
|
+
{ no: 22, name: "last_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1355
1393
|
]);
|
|
1356
1394
|
|
|
1357
1395
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateUserProfile {
|
|
@@ -1376,14 +1414,14 @@ export class CreateUserProfile extends Message<CreateUserProfile> {
|
|
|
1376
1414
|
*/
|
|
1377
1415
|
export class UpdateUserProfile extends Message<UpdateUserProfile> {
|
|
1378
1416
|
/**
|
|
1379
|
-
* @generated from field: optional string
|
|
1417
|
+
* @generated from field: optional string given_name = 2;
|
|
1380
1418
|
*/
|
|
1381
|
-
|
|
1419
|
+
givenName?: string;
|
|
1382
1420
|
|
|
1383
1421
|
/**
|
|
1384
|
-
* @generated from field: optional string
|
|
1422
|
+
* @generated from field: optional string family_name = 3;
|
|
1385
1423
|
*/
|
|
1386
|
-
|
|
1424
|
+
familyName?: string;
|
|
1387
1425
|
|
|
1388
1426
|
/**
|
|
1389
1427
|
* @generated from field: optional string name = 4;
|
|
@@ -1410,6 +1448,38 @@ export class UpdateUserProfile extends Message<UpdateUserProfile> {
|
|
|
1410
1448
|
*/
|
|
1411
1449
|
customAttributes: { [key: string]: string } = {};
|
|
1412
1450
|
|
|
1451
|
+
/**
|
|
1452
|
+
* @generated from field: optional string first_name = 21 [deprecated = true];
|
|
1453
|
+
* @deprecated
|
|
1454
|
+
*/
|
|
1455
|
+
firstName?: string;
|
|
1456
|
+
|
|
1457
|
+
/**
|
|
1458
|
+
* @generated from field: optional string last_name = 22 [deprecated = true];
|
|
1459
|
+
* @deprecated
|
|
1460
|
+
*/
|
|
1461
|
+
lastName?: string;
|
|
1462
|
+
|
|
1463
|
+
/**
|
|
1464
|
+
* @generated from field: optional string preferred_username = 10;
|
|
1465
|
+
*/
|
|
1466
|
+
preferredUsername?: string;
|
|
1467
|
+
|
|
1468
|
+
/**
|
|
1469
|
+
* @generated from field: optional string picture = 11;
|
|
1470
|
+
*/
|
|
1471
|
+
picture?: string;
|
|
1472
|
+
|
|
1473
|
+
/**
|
|
1474
|
+
* @generated from field: optional string gender = 12;
|
|
1475
|
+
*/
|
|
1476
|
+
gender?: string;
|
|
1477
|
+
|
|
1478
|
+
/**
|
|
1479
|
+
* @generated from field: repeated string groups = 13;
|
|
1480
|
+
*/
|
|
1481
|
+
groups: string[] = [];
|
|
1482
|
+
|
|
1413
1483
|
constructor(data?: PartialMessage<UpdateUserProfile>) {
|
|
1414
1484
|
super();
|
|
1415
1485
|
proto3.util.initPartial(data, this);
|
|
@@ -1418,13 +1488,19 @@ export class UpdateUserProfile extends Message<UpdateUserProfile> {
|
|
|
1418
1488
|
static readonly runtime: typeof proto3 = proto3;
|
|
1419
1489
|
static readonly typeName = "scalekit.v1.users.UpdateUserProfile";
|
|
1420
1490
|
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
1421
|
-
{ no: 2, name: "
|
|
1422
|
-
{ no: 3, name: "
|
|
1491
|
+
{ no: 2, name: "given_name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
1492
|
+
{ no: 3, name: "family_name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
1423
1493
|
{ no: 4, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
1424
1494
|
{ no: 5, name: "locale", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
1425
1495
|
{ no: 7, name: "phone_number", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
1426
1496
|
{ no: 8, name: "metadata", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
|
|
1427
1497
|
{ no: 9, name: "custom_attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
|
|
1498
|
+
{ no: 21, name: "first_name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
1499
|
+
{ no: 22, name: "last_name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
1500
|
+
{ no: 10, name: "preferred_username", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
1501
|
+
{ no: 11, name: "picture", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
1502
|
+
{ no: 12, name: "gender", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
1503
|
+
{ no: 13, name: "groups", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
|
|
1428
1504
|
]);
|
|
1429
1505
|
|
|
1430
1506
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateUserProfile {
|
|
@@ -1920,17 +1996,12 @@ export class Permission extends Message<Permission> {
|
|
|
1920
1996
|
name = "";
|
|
1921
1997
|
|
|
1922
1998
|
/**
|
|
1923
|
-
* @generated from field: string
|
|
1924
|
-
*/
|
|
1925
|
-
displayName = "";
|
|
1926
|
-
|
|
1927
|
-
/**
|
|
1928
|
-
* @generated from field: string description = 4;
|
|
1999
|
+
* @generated from field: string description = 3;
|
|
1929
2000
|
*/
|
|
1930
2001
|
description = "";
|
|
1931
2002
|
|
|
1932
2003
|
/**
|
|
1933
|
-
* @generated from field: repeated string tags =
|
|
2004
|
+
* @generated from field: repeated string tags = 4;
|
|
1934
2005
|
*/
|
|
1935
2006
|
tags: string[] = [];
|
|
1936
2007
|
|
|
@@ -1944,9 +2015,8 @@ export class Permission extends Message<Permission> {
|
|
|
1944
2015
|
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
1945
2016
|
{ no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1946
2017
|
{ no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1947
|
-
{ no: 3, name: "
|
|
1948
|
-
{ no: 4, name: "
|
|
1949
|
-
{ no: 5, name: "tags", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
|
|
2018
|
+
{ no: 3, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
2019
|
+
{ no: 4, name: "tags", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
|
|
1950
2020
|
]);
|
|
1951
2021
|
|
|
1952
2022
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Permission {
|
package/src/scalekit.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { IdTokenClaimToUserMap } from './constants/user';
|
|
|
7
7
|
import CoreClient from './core';
|
|
8
8
|
import DirectoryClient from './directory';
|
|
9
9
|
import DomainClient from './domain';
|
|
10
|
+
import AuthClient from './auth';
|
|
10
11
|
import OrganizationClient from './organization';
|
|
11
12
|
import PasswordlessClient from './passwordless';
|
|
12
13
|
import UserClient from './user';
|
|
@@ -43,6 +44,7 @@ export default class ScalekitClient {
|
|
|
43
44
|
readonly session: SessionClient;
|
|
44
45
|
readonly role: RoleClient;
|
|
45
46
|
readonly permission: PermissionClient;
|
|
47
|
+
readonly auth: AuthClient;
|
|
46
48
|
constructor(
|
|
47
49
|
envUrl: string,
|
|
48
50
|
clientId: string,
|
|
@@ -93,6 +95,10 @@ export default class ScalekitClient {
|
|
|
93
95
|
this.grpcConnect,
|
|
94
96
|
this.coreClient
|
|
95
97
|
);
|
|
98
|
+
this.auth = new AuthClient(
|
|
99
|
+
this.grpcConnect,
|
|
100
|
+
this.coreClient
|
|
101
|
+
);
|
|
96
102
|
}
|
|
97
103
|
|
|
98
104
|
/**
|
|
@@ -62,4 +62,20 @@ describe('Organizations', () => {
|
|
|
62
62
|
expect(organization.organization?.displayName).toBeDefined();
|
|
63
63
|
});
|
|
64
64
|
});
|
|
65
|
+
|
|
66
|
+
describe('upsertUserManagementSettings', () => {
|
|
67
|
+
it('should upsert max allowed users', async () => {
|
|
68
|
+
const maxUsers = 50;
|
|
69
|
+
let settings;
|
|
70
|
+
try {
|
|
71
|
+
settings = await client.organization.upsertUserManagementSettings(testOrg, { maxAllowedUsers: maxUsers });
|
|
72
|
+
} catch (error) {
|
|
73
|
+
console.warn('Skipping upsertUserManagementSettings test due to error:', error);
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
expect(settings).toBeDefined();
|
|
78
|
+
expect(settings?.maxAllowedUsers).toBe(maxUsers);
|
|
79
|
+
});
|
|
80
|
+
});
|
|
65
81
|
});
|