@scalekit-sdk/node 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/jest.config.js +15 -0
- package/lib/core.d.ts +1 -1
- package/lib/core.js +31 -31
- package/lib/core.js.map +1 -1
- package/lib/errors/base-exception.d.ts +32 -0
- package/lib/errors/base-exception.js +238 -0
- package/lib/errors/base-exception.js.map +1 -0
- package/lib/errors/index.d.ts +2 -0
- package/lib/errors/index.js +20 -0
- package/lib/errors/index.js.map +1 -0
- package/lib/errors/specific-exceptions.d.ts +39 -0
- package/lib/errors/specific-exceptions.js +90 -0
- package/lib/errors/specific-exceptions.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/pkg/grpc/scalekit/v1/commons/commons_pb.d.ts +34 -87
- package/lib/pkg/grpc/scalekit/v1/commons/commons_pb.js +31 -120
- package/lib/pkg/grpc/scalekit/v1/commons/commons_pb.js.map +1 -1
- package/lib/pkg/grpc/scalekit/v1/connections/connections_connect.d.ts +19 -10
- package/lib/pkg/grpc/scalekit/v1/connections/connections_connect.js +18 -9
- package/lib/pkg/grpc/scalekit/v1/connections/connections_connect.js.map +1 -1
- package/lib/pkg/grpc/scalekit/v1/connections/connections_pb.d.ts +209 -6
- package/lib/pkg/grpc/scalekit/v1/connections/connections_pb.js +272 -5
- package/lib/pkg/grpc/scalekit/v1/connections/connections_pb.js.map +1 -1
- package/lib/pkg/grpc/scalekit/v1/domains/domains_pb.d.ts +29 -0
- package/lib/pkg/grpc/scalekit/v1/domains/domains_pb.js +40 -1
- package/lib/pkg/grpc/scalekit/v1/domains/domains_pb.js.map +1 -1
- package/lib/pkg/grpc/scalekit/v1/errdetails/errdetails_pb.d.ts +25 -0
- package/lib/pkg/grpc/scalekit/v1/errdetails/errdetails_pb.js +38 -1
- package/lib/pkg/grpc/scalekit/v1/errdetails/errdetails_pb.js.map +1 -1
- package/lib/pkg/grpc/scalekit/v1/organizations/organizations_connect.d.ts +21 -1
- package/lib/pkg/grpc/scalekit/v1/organizations/organizations_connect.js +20 -0
- package/lib/pkg/grpc/scalekit/v1/organizations/organizations_connect.js.map +1 -1
- package/lib/pkg/grpc/scalekit/v1/organizations/organizations_pb.d.ts +110 -5
- package/lib/pkg/grpc/scalekit/v1/organizations/organizations_pb.js +164 -5
- package/lib/pkg/grpc/scalekit/v1/organizations/organizations_pb.js.map +1 -1
- package/lib/pkg/grpc/scalekit/v1/users/users_connect.d.ts +48 -1
- package/lib/pkg/grpc/scalekit/v1/users/users_connect.js +47 -0
- package/lib/pkg/grpc/scalekit/v1/users/users_connect.js.map +1 -1
- package/lib/pkg/grpc/scalekit/v1/users/users_pb.d.ts +280 -4
- package/lib/pkg/grpc/scalekit/v1/users/users_pb.js +449 -11
- package/lib/pkg/grpc/scalekit/v1/users/users_pb.js.map +1 -1
- package/lib/scalekit.d.ts +29 -8
- package/lib/scalekit.js +78 -28
- package/lib/scalekit.js.map +1 -1
- package/lib/types/scalekit.d.ts +5 -0
- package/lib/types/user.d.ts +1 -1
- package/lib/user.d.ts +10 -3
- package/lib/user.js +26 -5
- package/lib/user.js.map +1 -1
- package/package.json +6 -2
- package/src/core.ts +31 -32
- package/src/errors/base-exception.ts +262 -0
- package/src/errors/index.ts +3 -0
- package/src/errors/specific-exceptions.ts +88 -0
- package/src/index.ts +3 -1
- package/src/pkg/grpc/scalekit/v1/commons/commons_pb.ts +49 -129
- package/src/pkg/grpc/scalekit/v1/connections/connections_connect.ts +19 -10
- package/src/pkg/grpc/scalekit/v1/connections/connections_pb.ts +377 -8
- package/src/pkg/grpc/scalekit/v1/domains/domains_pb.ts +44 -0
- package/src/pkg/grpc/scalekit/v1/errdetails/errdetails_pb.ts +49 -0
- package/src/pkg/grpc/scalekit/v1/organizations/organizations_connect.ts +21 -1
- package/src/pkg/grpc/scalekit/v1/organizations/organizations_pb.ts +218 -5
- package/src/pkg/grpc/scalekit/v1/users/users_connect.ts +48 -1
- package/src/pkg/grpc/scalekit/v1/users/users_pb.ts +558 -6
- package/src/scalekit.ts +95 -30
- package/src/types/scalekit.ts +6 -0
- package/src/types/user.ts +1 -1
- package/src/user.ts +34 -7
- package/tests/README.md +25 -0
- package/tests/connection.test.ts +42 -0
- package/tests/directory.test.ts +46 -0
- package/tests/organization.test.ts +65 -0
- package/tests/passwordless.test.ts +108 -0
- package/tests/scalekit.test.ts +104 -0
- package/tests/setup.ts +34 -0
- package/tests/users.test.ts +168 -0
- package/tests/utils/test-data.ts +248 -0
|
@@ -113,9 +113,9 @@ export class CreateUserAndMembershipRequest extends Message<CreateUserAndMembers
|
|
|
113
113
|
user?: CreateUser;
|
|
114
114
|
|
|
115
115
|
/**
|
|
116
|
-
* @generated from field: bool
|
|
116
|
+
* @generated from field: optional bool send_invitation_email = 3;
|
|
117
117
|
*/
|
|
118
|
-
|
|
118
|
+
sendInvitationEmail?: boolean;
|
|
119
119
|
|
|
120
120
|
constructor(data?: PartialMessage<CreateUserAndMembershipRequest>) {
|
|
121
121
|
super();
|
|
@@ -127,7 +127,7 @@ export class CreateUserAndMembershipRequest extends Message<CreateUserAndMembers
|
|
|
127
127
|
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
128
128
|
{ no: 1, name: "organization_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
129
129
|
{ no: 2, name: "user", kind: "message", T: CreateUser },
|
|
130
|
-
{ no: 3, name: "
|
|
130
|
+
{ no: 3, name: "send_invitation_email", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
131
131
|
]);
|
|
132
132
|
|
|
133
133
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateUserAndMembershipRequest {
|
|
@@ -611,9 +611,9 @@ export class CreateMembershipRequest extends Message<CreateMembershipRequest> {
|
|
|
611
611
|
} | { case: undefined; value?: undefined } = { case: undefined };
|
|
612
612
|
|
|
613
613
|
/**
|
|
614
|
-
* @generated from field: bool
|
|
614
|
+
* @generated from field: optional bool send_invitation_email = 5;
|
|
615
615
|
*/
|
|
616
|
-
|
|
616
|
+
sendInvitationEmail?: boolean;
|
|
617
617
|
|
|
618
618
|
constructor(data?: PartialMessage<CreateMembershipRequest>) {
|
|
619
619
|
super();
|
|
@@ -627,7 +627,7 @@ export class CreateMembershipRequest extends Message<CreateMembershipRequest> {
|
|
|
627
627
|
{ no: 2, name: "membership", kind: "message", T: CreateMembership },
|
|
628
628
|
{ no: 3, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "identities" },
|
|
629
629
|
{ no: 4, name: "external_id", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "identities" },
|
|
630
|
-
{ no: 5, name: "
|
|
630
|
+
{ no: 5, name: "send_invitation_email", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
631
631
|
]);
|
|
632
632
|
|
|
633
633
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateMembershipRequest {
|
|
@@ -1438,3 +1438,555 @@ export class UpdateUserProfile extends Message<UpdateUserProfile> {
|
|
|
1438
1438
|
}
|
|
1439
1439
|
}
|
|
1440
1440
|
|
|
1441
|
+
/**
|
|
1442
|
+
* @generated from message scalekit.v1.users.Invite
|
|
1443
|
+
*/
|
|
1444
|
+
export class Invite extends Message<Invite> {
|
|
1445
|
+
/**
|
|
1446
|
+
* @generated from field: string organization_id = 1;
|
|
1447
|
+
*/
|
|
1448
|
+
organizationId = "";
|
|
1449
|
+
|
|
1450
|
+
/**
|
|
1451
|
+
* @generated from field: string user_id = 2;
|
|
1452
|
+
*/
|
|
1453
|
+
userId = "";
|
|
1454
|
+
|
|
1455
|
+
/**
|
|
1456
|
+
* @generated from field: string invited_by = 3;
|
|
1457
|
+
*/
|
|
1458
|
+
invitedBy = "";
|
|
1459
|
+
|
|
1460
|
+
/**
|
|
1461
|
+
* @generated from field: string status = 4;
|
|
1462
|
+
*/
|
|
1463
|
+
status = "";
|
|
1464
|
+
|
|
1465
|
+
/**
|
|
1466
|
+
* @generated from field: google.protobuf.Timestamp created_at = 5;
|
|
1467
|
+
*/
|
|
1468
|
+
createdAt?: Timestamp;
|
|
1469
|
+
|
|
1470
|
+
/**
|
|
1471
|
+
* @generated from field: google.protobuf.Timestamp expires_at = 6;
|
|
1472
|
+
*/
|
|
1473
|
+
expiresAt?: Timestamp;
|
|
1474
|
+
|
|
1475
|
+
/**
|
|
1476
|
+
* @generated from field: google.protobuf.Timestamp resent_at = 7;
|
|
1477
|
+
*/
|
|
1478
|
+
resentAt?: Timestamp;
|
|
1479
|
+
|
|
1480
|
+
/**
|
|
1481
|
+
* @generated from field: int32 resent_count = 8;
|
|
1482
|
+
*/
|
|
1483
|
+
resentCount = 0;
|
|
1484
|
+
|
|
1485
|
+
constructor(data?: PartialMessage<Invite>) {
|
|
1486
|
+
super();
|
|
1487
|
+
proto3.util.initPartial(data, this);
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1490
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
1491
|
+
static readonly typeName = "scalekit.v1.users.Invite";
|
|
1492
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
1493
|
+
{ no: 1, name: "organization_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1494
|
+
{ no: 2, name: "user_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1495
|
+
{ no: 3, name: "invited_by", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1496
|
+
{ no: 4, name: "status", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1497
|
+
{ no: 5, name: "created_at", kind: "message", T: Timestamp },
|
|
1498
|
+
{ no: 6, name: "expires_at", kind: "message", T: Timestamp },
|
|
1499
|
+
{ no: 7, name: "resent_at", kind: "message", T: Timestamp },
|
|
1500
|
+
{ no: 8, name: "resent_count", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
|
1501
|
+
]);
|
|
1502
|
+
|
|
1503
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Invite {
|
|
1504
|
+
return new Invite().fromBinary(bytes, options);
|
|
1505
|
+
}
|
|
1506
|
+
|
|
1507
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Invite {
|
|
1508
|
+
return new Invite().fromJson(jsonValue, options);
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Invite {
|
|
1512
|
+
return new Invite().fromJsonString(jsonString, options);
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1515
|
+
static equals(a: Invite | PlainMessage<Invite> | undefined, b: Invite | PlainMessage<Invite> | undefined): boolean {
|
|
1516
|
+
return proto3.util.equals(Invite, a, b);
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1519
|
+
|
|
1520
|
+
/**
|
|
1521
|
+
* @generated from message scalekit.v1.users.ResendInviteRequest
|
|
1522
|
+
*/
|
|
1523
|
+
export class ResendInviteRequest extends Message<ResendInviteRequest> {
|
|
1524
|
+
/**
|
|
1525
|
+
* @generated from field: string organization_id = 1;
|
|
1526
|
+
*/
|
|
1527
|
+
organizationId = "";
|
|
1528
|
+
|
|
1529
|
+
/**
|
|
1530
|
+
* @generated from field: string id = 2;
|
|
1531
|
+
*/
|
|
1532
|
+
id = "";
|
|
1533
|
+
|
|
1534
|
+
constructor(data?: PartialMessage<ResendInviteRequest>) {
|
|
1535
|
+
super();
|
|
1536
|
+
proto3.util.initPartial(data, this);
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
1540
|
+
static readonly typeName = "scalekit.v1.users.ResendInviteRequest";
|
|
1541
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
1542
|
+
{ no: 1, name: "organization_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1543
|
+
{ no: 2, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1544
|
+
]);
|
|
1545
|
+
|
|
1546
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ResendInviteRequest {
|
|
1547
|
+
return new ResendInviteRequest().fromBinary(bytes, options);
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1550
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ResendInviteRequest {
|
|
1551
|
+
return new ResendInviteRequest().fromJson(jsonValue, options);
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ResendInviteRequest {
|
|
1555
|
+
return new ResendInviteRequest().fromJsonString(jsonString, options);
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1558
|
+
static equals(a: ResendInviteRequest | PlainMessage<ResendInviteRequest> | undefined, b: ResendInviteRequest | PlainMessage<ResendInviteRequest> | undefined): boolean {
|
|
1559
|
+
return proto3.util.equals(ResendInviteRequest, a, b);
|
|
1560
|
+
}
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1563
|
+
/**
|
|
1564
|
+
* @generated from message scalekit.v1.users.ResendInviteResponse
|
|
1565
|
+
*/
|
|
1566
|
+
export class ResendInviteResponse extends Message<ResendInviteResponse> {
|
|
1567
|
+
/**
|
|
1568
|
+
* @generated from field: scalekit.v1.users.Invite invite = 1;
|
|
1569
|
+
*/
|
|
1570
|
+
invite?: Invite;
|
|
1571
|
+
|
|
1572
|
+
constructor(data?: PartialMessage<ResendInviteResponse>) {
|
|
1573
|
+
super();
|
|
1574
|
+
proto3.util.initPartial(data, this);
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1577
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
1578
|
+
static readonly typeName = "scalekit.v1.users.ResendInviteResponse";
|
|
1579
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
1580
|
+
{ no: 1, name: "invite", kind: "message", T: Invite },
|
|
1581
|
+
]);
|
|
1582
|
+
|
|
1583
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ResendInviteResponse {
|
|
1584
|
+
return new ResendInviteResponse().fromBinary(bytes, options);
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1587
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ResendInviteResponse {
|
|
1588
|
+
return new ResendInviteResponse().fromJson(jsonValue, options);
|
|
1589
|
+
}
|
|
1590
|
+
|
|
1591
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ResendInviteResponse {
|
|
1592
|
+
return new ResendInviteResponse().fromJsonString(jsonString, options);
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1595
|
+
static equals(a: ResendInviteResponse | PlainMessage<ResendInviteResponse> | undefined, b: ResendInviteResponse | PlainMessage<ResendInviteResponse> | undefined): boolean {
|
|
1596
|
+
return proto3.util.equals(ResendInviteResponse, a, b);
|
|
1597
|
+
}
|
|
1598
|
+
}
|
|
1599
|
+
|
|
1600
|
+
/**
|
|
1601
|
+
* @generated from message scalekit.v1.users.ListUserRolesRequest
|
|
1602
|
+
*/
|
|
1603
|
+
export class ListUserRolesRequest extends Message<ListUserRolesRequest> {
|
|
1604
|
+
/**
|
|
1605
|
+
* @generated from field: string organization_id = 1;
|
|
1606
|
+
*/
|
|
1607
|
+
organizationId = "";
|
|
1608
|
+
|
|
1609
|
+
/**
|
|
1610
|
+
* @generated from field: string user_id = 2;
|
|
1611
|
+
*/
|
|
1612
|
+
userId = "";
|
|
1613
|
+
|
|
1614
|
+
constructor(data?: PartialMessage<ListUserRolesRequest>) {
|
|
1615
|
+
super();
|
|
1616
|
+
proto3.util.initPartial(data, this);
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
1620
|
+
static readonly typeName = "scalekit.v1.users.ListUserRolesRequest";
|
|
1621
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
1622
|
+
{ no: 1, name: "organization_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1623
|
+
{ no: 2, name: "user_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1624
|
+
]);
|
|
1625
|
+
|
|
1626
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListUserRolesRequest {
|
|
1627
|
+
return new ListUserRolesRequest().fromBinary(bytes, options);
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListUserRolesRequest {
|
|
1631
|
+
return new ListUserRolesRequest().fromJson(jsonValue, options);
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1634
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListUserRolesRequest {
|
|
1635
|
+
return new ListUserRolesRequest().fromJsonString(jsonString, options);
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
static equals(a: ListUserRolesRequest | PlainMessage<ListUserRolesRequest> | undefined, b: ListUserRolesRequest | PlainMessage<ListUserRolesRequest> | undefined): boolean {
|
|
1639
|
+
return proto3.util.equals(ListUserRolesRequest, a, b);
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
|
|
1643
|
+
/**
|
|
1644
|
+
* @generated from message scalekit.v1.users.ListUserRolesResponse
|
|
1645
|
+
*/
|
|
1646
|
+
export class ListUserRolesResponse extends Message<ListUserRolesResponse> {
|
|
1647
|
+
/**
|
|
1648
|
+
* @generated from field: repeated scalekit.v1.commons.Role roles = 1;
|
|
1649
|
+
*/
|
|
1650
|
+
roles: Role[] = [];
|
|
1651
|
+
|
|
1652
|
+
constructor(data?: PartialMessage<ListUserRolesResponse>) {
|
|
1653
|
+
super();
|
|
1654
|
+
proto3.util.initPartial(data, this);
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1657
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
1658
|
+
static readonly typeName = "scalekit.v1.users.ListUserRolesResponse";
|
|
1659
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
1660
|
+
{ no: 1, name: "roles", kind: "message", T: Role, repeated: true },
|
|
1661
|
+
]);
|
|
1662
|
+
|
|
1663
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListUserRolesResponse {
|
|
1664
|
+
return new ListUserRolesResponse().fromBinary(bytes, options);
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1667
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListUserRolesResponse {
|
|
1668
|
+
return new ListUserRolesResponse().fromJson(jsonValue, options);
|
|
1669
|
+
}
|
|
1670
|
+
|
|
1671
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListUserRolesResponse {
|
|
1672
|
+
return new ListUserRolesResponse().fromJsonString(jsonString, options);
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1675
|
+
static equals(a: ListUserRolesResponse | PlainMessage<ListUserRolesResponse> | undefined, b: ListUserRolesResponse | PlainMessage<ListUserRolesResponse> | undefined): boolean {
|
|
1676
|
+
return proto3.util.equals(ListUserRolesResponse, a, b);
|
|
1677
|
+
}
|
|
1678
|
+
}
|
|
1679
|
+
|
|
1680
|
+
/**
|
|
1681
|
+
* @generated from message scalekit.v1.users.AssignUserRolesRequest
|
|
1682
|
+
*/
|
|
1683
|
+
export class AssignUserRolesRequest extends Message<AssignUserRolesRequest> {
|
|
1684
|
+
/**
|
|
1685
|
+
* @generated from field: string organization_id = 1;
|
|
1686
|
+
*/
|
|
1687
|
+
organizationId = "";
|
|
1688
|
+
|
|
1689
|
+
/**
|
|
1690
|
+
* @generated from field: string user_id = 2;
|
|
1691
|
+
*/
|
|
1692
|
+
userId = "";
|
|
1693
|
+
|
|
1694
|
+
/**
|
|
1695
|
+
* @generated from field: repeated scalekit.v1.users.AssignRoleRequest roles = 3;
|
|
1696
|
+
*/
|
|
1697
|
+
roles: AssignRoleRequest[] = [];
|
|
1698
|
+
|
|
1699
|
+
constructor(data?: PartialMessage<AssignUserRolesRequest>) {
|
|
1700
|
+
super();
|
|
1701
|
+
proto3.util.initPartial(data, this);
|
|
1702
|
+
}
|
|
1703
|
+
|
|
1704
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
1705
|
+
static readonly typeName = "scalekit.v1.users.AssignUserRolesRequest";
|
|
1706
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
1707
|
+
{ no: 1, name: "organization_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1708
|
+
{ no: 2, name: "user_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1709
|
+
{ no: 3, name: "roles", kind: "message", T: AssignRoleRequest, repeated: true },
|
|
1710
|
+
]);
|
|
1711
|
+
|
|
1712
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AssignUserRolesRequest {
|
|
1713
|
+
return new AssignUserRolesRequest().fromBinary(bytes, options);
|
|
1714
|
+
}
|
|
1715
|
+
|
|
1716
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AssignUserRolesRequest {
|
|
1717
|
+
return new AssignUserRolesRequest().fromJson(jsonValue, options);
|
|
1718
|
+
}
|
|
1719
|
+
|
|
1720
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AssignUserRolesRequest {
|
|
1721
|
+
return new AssignUserRolesRequest().fromJsonString(jsonString, options);
|
|
1722
|
+
}
|
|
1723
|
+
|
|
1724
|
+
static equals(a: AssignUserRolesRequest | PlainMessage<AssignUserRolesRequest> | undefined, b: AssignUserRolesRequest | PlainMessage<AssignUserRolesRequest> | undefined): boolean {
|
|
1725
|
+
return proto3.util.equals(AssignUserRolesRequest, a, b);
|
|
1726
|
+
}
|
|
1727
|
+
}
|
|
1728
|
+
|
|
1729
|
+
/**
|
|
1730
|
+
* @generated from message scalekit.v1.users.AssignRoleRequest
|
|
1731
|
+
*/
|
|
1732
|
+
export class AssignRoleRequest extends Message<AssignRoleRequest> {
|
|
1733
|
+
/**
|
|
1734
|
+
* @generated from field: string id = 1;
|
|
1735
|
+
*/
|
|
1736
|
+
id = "";
|
|
1737
|
+
|
|
1738
|
+
constructor(data?: PartialMessage<AssignRoleRequest>) {
|
|
1739
|
+
super();
|
|
1740
|
+
proto3.util.initPartial(data, this);
|
|
1741
|
+
}
|
|
1742
|
+
|
|
1743
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
1744
|
+
static readonly typeName = "scalekit.v1.users.AssignRoleRequest";
|
|
1745
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
1746
|
+
{ no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1747
|
+
]);
|
|
1748
|
+
|
|
1749
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AssignRoleRequest {
|
|
1750
|
+
return new AssignRoleRequest().fromBinary(bytes, options);
|
|
1751
|
+
}
|
|
1752
|
+
|
|
1753
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AssignRoleRequest {
|
|
1754
|
+
return new AssignRoleRequest().fromJson(jsonValue, options);
|
|
1755
|
+
}
|
|
1756
|
+
|
|
1757
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AssignRoleRequest {
|
|
1758
|
+
return new AssignRoleRequest().fromJsonString(jsonString, options);
|
|
1759
|
+
}
|
|
1760
|
+
|
|
1761
|
+
static equals(a: AssignRoleRequest | PlainMessage<AssignRoleRequest> | undefined, b: AssignRoleRequest | PlainMessage<AssignRoleRequest> | undefined): boolean {
|
|
1762
|
+
return proto3.util.equals(AssignRoleRequest, a, b);
|
|
1763
|
+
}
|
|
1764
|
+
}
|
|
1765
|
+
|
|
1766
|
+
/**
|
|
1767
|
+
* @generated from message scalekit.v1.users.AssignUserRolesResponse
|
|
1768
|
+
*/
|
|
1769
|
+
export class AssignUserRolesResponse extends Message<AssignUserRolesResponse> {
|
|
1770
|
+
/**
|
|
1771
|
+
* @generated from field: repeated scalekit.v1.commons.Role roles = 1;
|
|
1772
|
+
*/
|
|
1773
|
+
roles: Role[] = [];
|
|
1774
|
+
|
|
1775
|
+
constructor(data?: PartialMessage<AssignUserRolesResponse>) {
|
|
1776
|
+
super();
|
|
1777
|
+
proto3.util.initPartial(data, this);
|
|
1778
|
+
}
|
|
1779
|
+
|
|
1780
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
1781
|
+
static readonly typeName = "scalekit.v1.users.AssignUserRolesResponse";
|
|
1782
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
1783
|
+
{ no: 1, name: "roles", kind: "message", T: Role, repeated: true },
|
|
1784
|
+
]);
|
|
1785
|
+
|
|
1786
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AssignUserRolesResponse {
|
|
1787
|
+
return new AssignUserRolesResponse().fromBinary(bytes, options);
|
|
1788
|
+
}
|
|
1789
|
+
|
|
1790
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AssignUserRolesResponse {
|
|
1791
|
+
return new AssignUserRolesResponse().fromJson(jsonValue, options);
|
|
1792
|
+
}
|
|
1793
|
+
|
|
1794
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AssignUserRolesResponse {
|
|
1795
|
+
return new AssignUserRolesResponse().fromJsonString(jsonString, options);
|
|
1796
|
+
}
|
|
1797
|
+
|
|
1798
|
+
static equals(a: AssignUserRolesResponse | PlainMessage<AssignUserRolesResponse> | undefined, b: AssignUserRolesResponse | PlainMessage<AssignUserRolesResponse> | undefined): boolean {
|
|
1799
|
+
return proto3.util.equals(AssignUserRolesResponse, a, b);
|
|
1800
|
+
}
|
|
1801
|
+
}
|
|
1802
|
+
|
|
1803
|
+
/**
|
|
1804
|
+
* @generated from message scalekit.v1.users.RemoveUserRoleRequest
|
|
1805
|
+
*/
|
|
1806
|
+
export class RemoveUserRoleRequest extends Message<RemoveUserRoleRequest> {
|
|
1807
|
+
/**
|
|
1808
|
+
* @generated from field: string organization_id = 1;
|
|
1809
|
+
*/
|
|
1810
|
+
organizationId = "";
|
|
1811
|
+
|
|
1812
|
+
/**
|
|
1813
|
+
* @generated from field: string user_id = 2;
|
|
1814
|
+
*/
|
|
1815
|
+
userId = "";
|
|
1816
|
+
|
|
1817
|
+
/**
|
|
1818
|
+
* @generated from field: string role_id = 3;
|
|
1819
|
+
*/
|
|
1820
|
+
roleId = "";
|
|
1821
|
+
|
|
1822
|
+
constructor(data?: PartialMessage<RemoveUserRoleRequest>) {
|
|
1823
|
+
super();
|
|
1824
|
+
proto3.util.initPartial(data, this);
|
|
1825
|
+
}
|
|
1826
|
+
|
|
1827
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
1828
|
+
static readonly typeName = "scalekit.v1.users.RemoveUserRoleRequest";
|
|
1829
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
1830
|
+
{ no: 1, name: "organization_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1831
|
+
{ no: 2, name: "user_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1832
|
+
{ no: 3, name: "role_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1833
|
+
]);
|
|
1834
|
+
|
|
1835
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RemoveUserRoleRequest {
|
|
1836
|
+
return new RemoveUserRoleRequest().fromBinary(bytes, options);
|
|
1837
|
+
}
|
|
1838
|
+
|
|
1839
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RemoveUserRoleRequest {
|
|
1840
|
+
return new RemoveUserRoleRequest().fromJson(jsonValue, options);
|
|
1841
|
+
}
|
|
1842
|
+
|
|
1843
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RemoveUserRoleRequest {
|
|
1844
|
+
return new RemoveUserRoleRequest().fromJsonString(jsonString, options);
|
|
1845
|
+
}
|
|
1846
|
+
|
|
1847
|
+
static equals(a: RemoveUserRoleRequest | PlainMessage<RemoveUserRoleRequest> | undefined, b: RemoveUserRoleRequest | PlainMessage<RemoveUserRoleRequest> | undefined): boolean {
|
|
1848
|
+
return proto3.util.equals(RemoveUserRoleRequest, a, b);
|
|
1849
|
+
}
|
|
1850
|
+
}
|
|
1851
|
+
|
|
1852
|
+
/**
|
|
1853
|
+
* @generated from message scalekit.v1.users.ListUserPermissionsRequest
|
|
1854
|
+
*/
|
|
1855
|
+
export class ListUserPermissionsRequest extends Message<ListUserPermissionsRequest> {
|
|
1856
|
+
/**
|
|
1857
|
+
* @generated from field: string organization_id = 1;
|
|
1858
|
+
*/
|
|
1859
|
+
organizationId = "";
|
|
1860
|
+
|
|
1861
|
+
/**
|
|
1862
|
+
* @generated from field: string user_id = 2;
|
|
1863
|
+
*/
|
|
1864
|
+
userId = "";
|
|
1865
|
+
|
|
1866
|
+
constructor(data?: PartialMessage<ListUserPermissionsRequest>) {
|
|
1867
|
+
super();
|
|
1868
|
+
proto3.util.initPartial(data, this);
|
|
1869
|
+
}
|
|
1870
|
+
|
|
1871
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
1872
|
+
static readonly typeName = "scalekit.v1.users.ListUserPermissionsRequest";
|
|
1873
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
1874
|
+
{ no: 1, name: "organization_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1875
|
+
{ no: 2, name: "user_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1876
|
+
]);
|
|
1877
|
+
|
|
1878
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListUserPermissionsRequest {
|
|
1879
|
+
return new ListUserPermissionsRequest().fromBinary(bytes, options);
|
|
1880
|
+
}
|
|
1881
|
+
|
|
1882
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListUserPermissionsRequest {
|
|
1883
|
+
return new ListUserPermissionsRequest().fromJson(jsonValue, options);
|
|
1884
|
+
}
|
|
1885
|
+
|
|
1886
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListUserPermissionsRequest {
|
|
1887
|
+
return new ListUserPermissionsRequest().fromJsonString(jsonString, options);
|
|
1888
|
+
}
|
|
1889
|
+
|
|
1890
|
+
static equals(a: ListUserPermissionsRequest | PlainMessage<ListUserPermissionsRequest> | undefined, b: ListUserPermissionsRequest | PlainMessage<ListUserPermissionsRequest> | undefined): boolean {
|
|
1891
|
+
return proto3.util.equals(ListUserPermissionsRequest, a, b);
|
|
1892
|
+
}
|
|
1893
|
+
}
|
|
1894
|
+
|
|
1895
|
+
/**
|
|
1896
|
+
* @generated from message scalekit.v1.users.Permission
|
|
1897
|
+
*/
|
|
1898
|
+
export class Permission extends Message<Permission> {
|
|
1899
|
+
/**
|
|
1900
|
+
* @generated from field: string id = 1;
|
|
1901
|
+
*/
|
|
1902
|
+
id = "";
|
|
1903
|
+
|
|
1904
|
+
/**
|
|
1905
|
+
* @generated from field: string name = 2;
|
|
1906
|
+
*/
|
|
1907
|
+
name = "";
|
|
1908
|
+
|
|
1909
|
+
/**
|
|
1910
|
+
* @generated from field: string display_name = 3;
|
|
1911
|
+
*/
|
|
1912
|
+
displayName = "";
|
|
1913
|
+
|
|
1914
|
+
/**
|
|
1915
|
+
* @generated from field: string description = 4;
|
|
1916
|
+
*/
|
|
1917
|
+
description = "";
|
|
1918
|
+
|
|
1919
|
+
/**
|
|
1920
|
+
* @generated from field: repeated string tags = 5;
|
|
1921
|
+
*/
|
|
1922
|
+
tags: string[] = [];
|
|
1923
|
+
|
|
1924
|
+
constructor(data?: PartialMessage<Permission>) {
|
|
1925
|
+
super();
|
|
1926
|
+
proto3.util.initPartial(data, this);
|
|
1927
|
+
}
|
|
1928
|
+
|
|
1929
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
1930
|
+
static readonly typeName = "scalekit.v1.users.Permission";
|
|
1931
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
1932
|
+
{ no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1933
|
+
{ no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1934
|
+
{ no: 3, name: "display_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1935
|
+
{ no: 4, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1936
|
+
{ no: 5, name: "tags", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
|
|
1937
|
+
]);
|
|
1938
|
+
|
|
1939
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Permission {
|
|
1940
|
+
return new Permission().fromBinary(bytes, options);
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Permission {
|
|
1944
|
+
return new Permission().fromJson(jsonValue, options);
|
|
1945
|
+
}
|
|
1946
|
+
|
|
1947
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Permission {
|
|
1948
|
+
return new Permission().fromJsonString(jsonString, options);
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1951
|
+
static equals(a: Permission | PlainMessage<Permission> | undefined, b: Permission | PlainMessage<Permission> | undefined): boolean {
|
|
1952
|
+
return proto3.util.equals(Permission, a, b);
|
|
1953
|
+
}
|
|
1954
|
+
}
|
|
1955
|
+
|
|
1956
|
+
/**
|
|
1957
|
+
* @generated from message scalekit.v1.users.ListUserPermissionsResponse
|
|
1958
|
+
*/
|
|
1959
|
+
export class ListUserPermissionsResponse extends Message<ListUserPermissionsResponse> {
|
|
1960
|
+
/**
|
|
1961
|
+
* @generated from field: repeated scalekit.v1.users.Permission permissions = 1;
|
|
1962
|
+
*/
|
|
1963
|
+
permissions: Permission[] = [];
|
|
1964
|
+
|
|
1965
|
+
constructor(data?: PartialMessage<ListUserPermissionsResponse>) {
|
|
1966
|
+
super();
|
|
1967
|
+
proto3.util.initPartial(data, this);
|
|
1968
|
+
}
|
|
1969
|
+
|
|
1970
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
1971
|
+
static readonly typeName = "scalekit.v1.users.ListUserPermissionsResponse";
|
|
1972
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
1973
|
+
{ no: 1, name: "permissions", kind: "message", T: Permission, repeated: true },
|
|
1974
|
+
]);
|
|
1975
|
+
|
|
1976
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListUserPermissionsResponse {
|
|
1977
|
+
return new ListUserPermissionsResponse().fromBinary(bytes, options);
|
|
1978
|
+
}
|
|
1979
|
+
|
|
1980
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListUserPermissionsResponse {
|
|
1981
|
+
return new ListUserPermissionsResponse().fromJson(jsonValue, options);
|
|
1982
|
+
}
|
|
1983
|
+
|
|
1984
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListUserPermissionsResponse {
|
|
1985
|
+
return new ListUserPermissionsResponse().fromJsonString(jsonString, options);
|
|
1986
|
+
}
|
|
1987
|
+
|
|
1988
|
+
static equals(a: ListUserPermissionsResponse | PlainMessage<ListUserPermissionsResponse> | undefined, b: ListUserPermissionsResponse | PlainMessage<ListUserPermissionsResponse> | undefined): boolean {
|
|
1989
|
+
return proto3.util.equals(ListUserPermissionsResponse, a, b);
|
|
1990
|
+
}
|
|
1991
|
+
}
|
|
1992
|
+
|