@scalekit-sdk/node 2.0.1 → 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 +3 -3
- package/lib/scalekit.js +35 -22
- package/lib/scalekit.js.map +1 -1
- 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 +39 -23
- 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
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/* eslint-disable */
|
|
5
5
|
// @ts-nocheck
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.UpdateUserProfile = exports.CreateUserProfile = exports.CreateUser = exports.SearchOrganizationUsersResponse = exports.SearchOrganizationUsersRequest = exports.UpdateMembershipResponse = exports.CreateMembership = exports.UpdateMembership = exports.UpdateMembershipRequest = exports.DeleteUserRequest = exports.SearchUsersResponse = exports.SearchUsersRequest = exports.ListUsersResponse = exports.ListUsersRequest = exports.CreateMembershipResponse = exports.CreateMembershipRequest = exports.DeleteMembershipRequest = exports.ListOrganizationUsersResponse = exports.ListOrganizationUsersRequest = exports.GetUserResponse = exports.GetUserRequest = exports.UpdateUserResponse = exports.UpdateUserRequest = exports.UpdateUser = exports.CreateUserAndMembershipResponse = exports.CreateUserAndMembershipRequest = exports.User = void 0;
|
|
7
|
+
exports.ListUserPermissionsResponse = exports.Permission = exports.ListUserPermissionsRequest = exports.RemoveUserRoleRequest = exports.AssignUserRolesResponse = exports.AssignRoleRequest = exports.AssignUserRolesRequest = exports.ListUserRolesResponse = exports.ListUserRolesRequest = exports.ResendInviteResponse = exports.ResendInviteRequest = exports.Invite = exports.UpdateUserProfile = exports.CreateUserProfile = exports.CreateUser = exports.SearchOrganizationUsersResponse = exports.SearchOrganizationUsersRequest = exports.UpdateMembershipResponse = exports.CreateMembership = exports.UpdateMembership = exports.UpdateMembershipRequest = exports.DeleteUserRequest = exports.SearchUsersResponse = exports.SearchUsersRequest = exports.ListUsersResponse = exports.ListUsersRequest = exports.CreateMembershipResponse = exports.CreateMembershipRequest = exports.DeleteMembershipRequest = exports.ListOrganizationUsersResponse = exports.ListOrganizationUsersRequest = exports.GetUserResponse = exports.GetUserRequest = exports.UpdateUserResponse = exports.UpdateUserRequest = exports.UpdateUser = exports.CreateUserAndMembershipResponse = exports.CreateUserAndMembershipRequest = exports.User = void 0;
|
|
8
8
|
const protobuf_1 = require("@bufbuild/protobuf");
|
|
9
9
|
const commons_pb_js_1 = require("../commons/commons_pb.js");
|
|
10
10
|
/**
|
|
@@ -73,10 +73,6 @@ class CreateUserAndMembershipRequest extends protobuf_1.Message {
|
|
|
73
73
|
* @generated from field: string organization_id = 1;
|
|
74
74
|
*/
|
|
75
75
|
this.organizationId = "";
|
|
76
|
-
/**
|
|
77
|
-
* @generated from field: bool send_activation_email = 3;
|
|
78
|
-
*/
|
|
79
|
-
this.sendActivationEmail = false;
|
|
80
76
|
protobuf_1.proto3.util.initPartial(data, this);
|
|
81
77
|
}
|
|
82
78
|
static fromBinary(bytes, options) {
|
|
@@ -98,7 +94,7 @@ CreateUserAndMembershipRequest.typeName = "scalekit.v1.users.CreateUserAndMember
|
|
|
98
94
|
CreateUserAndMembershipRequest.fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
99
95
|
{ no: 1, name: "organization_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
100
96
|
{ no: 2, name: "user", kind: "message", T: CreateUser },
|
|
101
|
-
{ no: 3, name: "
|
|
97
|
+
{ no: 3, name: "send_invitation_email", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
102
98
|
]);
|
|
103
99
|
/**
|
|
104
100
|
* @generated from message scalekit.v1.users.CreateUserAndMembershipResponse
|
|
@@ -418,10 +414,6 @@ class CreateMembershipRequest extends protobuf_1.Message {
|
|
|
418
414
|
* @generated from oneof scalekit.v1.users.CreateMembershipRequest.identities
|
|
419
415
|
*/
|
|
420
416
|
this.identities = { case: undefined };
|
|
421
|
-
/**
|
|
422
|
-
* @generated from field: bool send_activation_email = 5;
|
|
423
|
-
*/
|
|
424
|
-
this.sendActivationEmail = false;
|
|
425
417
|
protobuf_1.proto3.util.initPartial(data, this);
|
|
426
418
|
}
|
|
427
419
|
static fromBinary(bytes, options) {
|
|
@@ -445,7 +437,7 @@ CreateMembershipRequest.fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
|
445
437
|
{ no: 2, name: "membership", kind: "message", T: CreateMembership },
|
|
446
438
|
{ no: 3, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "identities" },
|
|
447
439
|
{ no: 4, name: "external_id", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "identities" },
|
|
448
|
-
{ no: 5, name: "
|
|
440
|
+
{ no: 5, name: "send_invitation_email", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
449
441
|
]);
|
|
450
442
|
/**
|
|
451
443
|
* @generated from message scalekit.v1.users.CreateMembershipResponse
|
|
@@ -1045,4 +1037,450 @@ UpdateUserProfile.fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
|
1045
1037
|
{ no: 8, name: "metadata", kind: "map", K: 9 /* ScalarType.STRING */, V: { kind: "scalar", T: 9 /* ScalarType.STRING */ } },
|
|
1046
1038
|
{ no: 9, name: "custom_attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: { kind: "scalar", T: 9 /* ScalarType.STRING */ } },
|
|
1047
1039
|
]);
|
|
1040
|
+
/**
|
|
1041
|
+
* @generated from message scalekit.v1.users.Invite
|
|
1042
|
+
*/
|
|
1043
|
+
class Invite extends protobuf_1.Message {
|
|
1044
|
+
constructor(data) {
|
|
1045
|
+
super();
|
|
1046
|
+
/**
|
|
1047
|
+
* @generated from field: string organization_id = 1;
|
|
1048
|
+
*/
|
|
1049
|
+
this.organizationId = "";
|
|
1050
|
+
/**
|
|
1051
|
+
* @generated from field: string user_id = 2;
|
|
1052
|
+
*/
|
|
1053
|
+
this.userId = "";
|
|
1054
|
+
/**
|
|
1055
|
+
* @generated from field: string invited_by = 3;
|
|
1056
|
+
*/
|
|
1057
|
+
this.invitedBy = "";
|
|
1058
|
+
/**
|
|
1059
|
+
* @generated from field: string status = 4;
|
|
1060
|
+
*/
|
|
1061
|
+
this.status = "";
|
|
1062
|
+
/**
|
|
1063
|
+
* @generated from field: int32 resent_count = 8;
|
|
1064
|
+
*/
|
|
1065
|
+
this.resentCount = 0;
|
|
1066
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
1067
|
+
}
|
|
1068
|
+
static fromBinary(bytes, options) {
|
|
1069
|
+
return new Invite().fromBinary(bytes, options);
|
|
1070
|
+
}
|
|
1071
|
+
static fromJson(jsonValue, options) {
|
|
1072
|
+
return new Invite().fromJson(jsonValue, options);
|
|
1073
|
+
}
|
|
1074
|
+
static fromJsonString(jsonString, options) {
|
|
1075
|
+
return new Invite().fromJsonString(jsonString, options);
|
|
1076
|
+
}
|
|
1077
|
+
static equals(a, b) {
|
|
1078
|
+
return protobuf_1.proto3.util.equals(Invite, a, b);
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
exports.Invite = Invite;
|
|
1082
|
+
Invite.runtime = protobuf_1.proto3;
|
|
1083
|
+
Invite.typeName = "scalekit.v1.users.Invite";
|
|
1084
|
+
Invite.fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
1085
|
+
{ no: 1, name: "organization_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1086
|
+
{ no: 2, name: "user_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1087
|
+
{ no: 3, name: "invited_by", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1088
|
+
{ no: 4, name: "status", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1089
|
+
{ no: 5, name: "created_at", kind: "message", T: protobuf_1.Timestamp },
|
|
1090
|
+
{ no: 6, name: "expires_at", kind: "message", T: protobuf_1.Timestamp },
|
|
1091
|
+
{ no: 7, name: "resent_at", kind: "message", T: protobuf_1.Timestamp },
|
|
1092
|
+
{ no: 8, name: "resent_count", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
|
1093
|
+
]);
|
|
1094
|
+
/**
|
|
1095
|
+
* @generated from message scalekit.v1.users.ResendInviteRequest
|
|
1096
|
+
*/
|
|
1097
|
+
class ResendInviteRequest extends protobuf_1.Message {
|
|
1098
|
+
constructor(data) {
|
|
1099
|
+
super();
|
|
1100
|
+
/**
|
|
1101
|
+
* @generated from field: string organization_id = 1;
|
|
1102
|
+
*/
|
|
1103
|
+
this.organizationId = "";
|
|
1104
|
+
/**
|
|
1105
|
+
* @generated from field: string id = 2;
|
|
1106
|
+
*/
|
|
1107
|
+
this.id = "";
|
|
1108
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
1109
|
+
}
|
|
1110
|
+
static fromBinary(bytes, options) {
|
|
1111
|
+
return new ResendInviteRequest().fromBinary(bytes, options);
|
|
1112
|
+
}
|
|
1113
|
+
static fromJson(jsonValue, options) {
|
|
1114
|
+
return new ResendInviteRequest().fromJson(jsonValue, options);
|
|
1115
|
+
}
|
|
1116
|
+
static fromJsonString(jsonString, options) {
|
|
1117
|
+
return new ResendInviteRequest().fromJsonString(jsonString, options);
|
|
1118
|
+
}
|
|
1119
|
+
static equals(a, b) {
|
|
1120
|
+
return protobuf_1.proto3.util.equals(ResendInviteRequest, a, b);
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
exports.ResendInviteRequest = ResendInviteRequest;
|
|
1124
|
+
ResendInviteRequest.runtime = protobuf_1.proto3;
|
|
1125
|
+
ResendInviteRequest.typeName = "scalekit.v1.users.ResendInviteRequest";
|
|
1126
|
+
ResendInviteRequest.fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
1127
|
+
{ no: 1, name: "organization_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1128
|
+
{ no: 2, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1129
|
+
]);
|
|
1130
|
+
/**
|
|
1131
|
+
* @generated from message scalekit.v1.users.ResendInviteResponse
|
|
1132
|
+
*/
|
|
1133
|
+
class ResendInviteResponse extends protobuf_1.Message {
|
|
1134
|
+
constructor(data) {
|
|
1135
|
+
super();
|
|
1136
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
1137
|
+
}
|
|
1138
|
+
static fromBinary(bytes, options) {
|
|
1139
|
+
return new ResendInviteResponse().fromBinary(bytes, options);
|
|
1140
|
+
}
|
|
1141
|
+
static fromJson(jsonValue, options) {
|
|
1142
|
+
return new ResendInviteResponse().fromJson(jsonValue, options);
|
|
1143
|
+
}
|
|
1144
|
+
static fromJsonString(jsonString, options) {
|
|
1145
|
+
return new ResendInviteResponse().fromJsonString(jsonString, options);
|
|
1146
|
+
}
|
|
1147
|
+
static equals(a, b) {
|
|
1148
|
+
return protobuf_1.proto3.util.equals(ResendInviteResponse, a, b);
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
exports.ResendInviteResponse = ResendInviteResponse;
|
|
1152
|
+
ResendInviteResponse.runtime = protobuf_1.proto3;
|
|
1153
|
+
ResendInviteResponse.typeName = "scalekit.v1.users.ResendInviteResponse";
|
|
1154
|
+
ResendInviteResponse.fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
1155
|
+
{ no: 1, name: "invite", kind: "message", T: Invite },
|
|
1156
|
+
]);
|
|
1157
|
+
/**
|
|
1158
|
+
* @generated from message scalekit.v1.users.ListUserRolesRequest
|
|
1159
|
+
*/
|
|
1160
|
+
class ListUserRolesRequest extends protobuf_1.Message {
|
|
1161
|
+
constructor(data) {
|
|
1162
|
+
super();
|
|
1163
|
+
/**
|
|
1164
|
+
* @generated from field: string organization_id = 1;
|
|
1165
|
+
*/
|
|
1166
|
+
this.organizationId = "";
|
|
1167
|
+
/**
|
|
1168
|
+
* @generated from field: string user_id = 2;
|
|
1169
|
+
*/
|
|
1170
|
+
this.userId = "";
|
|
1171
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
1172
|
+
}
|
|
1173
|
+
static fromBinary(bytes, options) {
|
|
1174
|
+
return new ListUserRolesRequest().fromBinary(bytes, options);
|
|
1175
|
+
}
|
|
1176
|
+
static fromJson(jsonValue, options) {
|
|
1177
|
+
return new ListUserRolesRequest().fromJson(jsonValue, options);
|
|
1178
|
+
}
|
|
1179
|
+
static fromJsonString(jsonString, options) {
|
|
1180
|
+
return new ListUserRolesRequest().fromJsonString(jsonString, options);
|
|
1181
|
+
}
|
|
1182
|
+
static equals(a, b) {
|
|
1183
|
+
return protobuf_1.proto3.util.equals(ListUserRolesRequest, a, b);
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
exports.ListUserRolesRequest = ListUserRolesRequest;
|
|
1187
|
+
ListUserRolesRequest.runtime = protobuf_1.proto3;
|
|
1188
|
+
ListUserRolesRequest.typeName = "scalekit.v1.users.ListUserRolesRequest";
|
|
1189
|
+
ListUserRolesRequest.fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
1190
|
+
{ no: 1, name: "organization_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1191
|
+
{ no: 2, name: "user_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1192
|
+
]);
|
|
1193
|
+
/**
|
|
1194
|
+
* @generated from message scalekit.v1.users.ListUserRolesResponse
|
|
1195
|
+
*/
|
|
1196
|
+
class ListUserRolesResponse extends protobuf_1.Message {
|
|
1197
|
+
constructor(data) {
|
|
1198
|
+
super();
|
|
1199
|
+
/**
|
|
1200
|
+
* @generated from field: repeated scalekit.v1.commons.Role roles = 1;
|
|
1201
|
+
*/
|
|
1202
|
+
this.roles = [];
|
|
1203
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
1204
|
+
}
|
|
1205
|
+
static fromBinary(bytes, options) {
|
|
1206
|
+
return new ListUserRolesResponse().fromBinary(bytes, options);
|
|
1207
|
+
}
|
|
1208
|
+
static fromJson(jsonValue, options) {
|
|
1209
|
+
return new ListUserRolesResponse().fromJson(jsonValue, options);
|
|
1210
|
+
}
|
|
1211
|
+
static fromJsonString(jsonString, options) {
|
|
1212
|
+
return new ListUserRolesResponse().fromJsonString(jsonString, options);
|
|
1213
|
+
}
|
|
1214
|
+
static equals(a, b) {
|
|
1215
|
+
return protobuf_1.proto3.util.equals(ListUserRolesResponse, a, b);
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1218
|
+
exports.ListUserRolesResponse = ListUserRolesResponse;
|
|
1219
|
+
ListUserRolesResponse.runtime = protobuf_1.proto3;
|
|
1220
|
+
ListUserRolesResponse.typeName = "scalekit.v1.users.ListUserRolesResponse";
|
|
1221
|
+
ListUserRolesResponse.fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
1222
|
+
{ no: 1, name: "roles", kind: "message", T: commons_pb_js_1.Role, repeated: true },
|
|
1223
|
+
]);
|
|
1224
|
+
/**
|
|
1225
|
+
* @generated from message scalekit.v1.users.AssignUserRolesRequest
|
|
1226
|
+
*/
|
|
1227
|
+
class AssignUserRolesRequest extends protobuf_1.Message {
|
|
1228
|
+
constructor(data) {
|
|
1229
|
+
super();
|
|
1230
|
+
/**
|
|
1231
|
+
* @generated from field: string organization_id = 1;
|
|
1232
|
+
*/
|
|
1233
|
+
this.organizationId = "";
|
|
1234
|
+
/**
|
|
1235
|
+
* @generated from field: string user_id = 2;
|
|
1236
|
+
*/
|
|
1237
|
+
this.userId = "";
|
|
1238
|
+
/**
|
|
1239
|
+
* @generated from field: repeated scalekit.v1.users.AssignRoleRequest roles = 3;
|
|
1240
|
+
*/
|
|
1241
|
+
this.roles = [];
|
|
1242
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
1243
|
+
}
|
|
1244
|
+
static fromBinary(bytes, options) {
|
|
1245
|
+
return new AssignUserRolesRequest().fromBinary(bytes, options);
|
|
1246
|
+
}
|
|
1247
|
+
static fromJson(jsonValue, options) {
|
|
1248
|
+
return new AssignUserRolesRequest().fromJson(jsonValue, options);
|
|
1249
|
+
}
|
|
1250
|
+
static fromJsonString(jsonString, options) {
|
|
1251
|
+
return new AssignUserRolesRequest().fromJsonString(jsonString, options);
|
|
1252
|
+
}
|
|
1253
|
+
static equals(a, b) {
|
|
1254
|
+
return protobuf_1.proto3.util.equals(AssignUserRolesRequest, a, b);
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
exports.AssignUserRolesRequest = AssignUserRolesRequest;
|
|
1258
|
+
AssignUserRolesRequest.runtime = protobuf_1.proto3;
|
|
1259
|
+
AssignUserRolesRequest.typeName = "scalekit.v1.users.AssignUserRolesRequest";
|
|
1260
|
+
AssignUserRolesRequest.fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
1261
|
+
{ no: 1, name: "organization_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1262
|
+
{ no: 2, name: "user_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1263
|
+
{ no: 3, name: "roles", kind: "message", T: AssignRoleRequest, repeated: true },
|
|
1264
|
+
]);
|
|
1265
|
+
/**
|
|
1266
|
+
* @generated from message scalekit.v1.users.AssignRoleRequest
|
|
1267
|
+
*/
|
|
1268
|
+
class AssignRoleRequest extends protobuf_1.Message {
|
|
1269
|
+
constructor(data) {
|
|
1270
|
+
super();
|
|
1271
|
+
/**
|
|
1272
|
+
* @generated from field: string id = 1;
|
|
1273
|
+
*/
|
|
1274
|
+
this.id = "";
|
|
1275
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
1276
|
+
}
|
|
1277
|
+
static fromBinary(bytes, options) {
|
|
1278
|
+
return new AssignRoleRequest().fromBinary(bytes, options);
|
|
1279
|
+
}
|
|
1280
|
+
static fromJson(jsonValue, options) {
|
|
1281
|
+
return new AssignRoleRequest().fromJson(jsonValue, options);
|
|
1282
|
+
}
|
|
1283
|
+
static fromJsonString(jsonString, options) {
|
|
1284
|
+
return new AssignRoleRequest().fromJsonString(jsonString, options);
|
|
1285
|
+
}
|
|
1286
|
+
static equals(a, b) {
|
|
1287
|
+
return protobuf_1.proto3.util.equals(AssignRoleRequest, a, b);
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
exports.AssignRoleRequest = AssignRoleRequest;
|
|
1291
|
+
AssignRoleRequest.runtime = protobuf_1.proto3;
|
|
1292
|
+
AssignRoleRequest.typeName = "scalekit.v1.users.AssignRoleRequest";
|
|
1293
|
+
AssignRoleRequest.fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
1294
|
+
{ no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1295
|
+
]);
|
|
1296
|
+
/**
|
|
1297
|
+
* @generated from message scalekit.v1.users.AssignUserRolesResponse
|
|
1298
|
+
*/
|
|
1299
|
+
class AssignUserRolesResponse extends protobuf_1.Message {
|
|
1300
|
+
constructor(data) {
|
|
1301
|
+
super();
|
|
1302
|
+
/**
|
|
1303
|
+
* @generated from field: repeated scalekit.v1.commons.Role roles = 1;
|
|
1304
|
+
*/
|
|
1305
|
+
this.roles = [];
|
|
1306
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
1307
|
+
}
|
|
1308
|
+
static fromBinary(bytes, options) {
|
|
1309
|
+
return new AssignUserRolesResponse().fromBinary(bytes, options);
|
|
1310
|
+
}
|
|
1311
|
+
static fromJson(jsonValue, options) {
|
|
1312
|
+
return new AssignUserRolesResponse().fromJson(jsonValue, options);
|
|
1313
|
+
}
|
|
1314
|
+
static fromJsonString(jsonString, options) {
|
|
1315
|
+
return new AssignUserRolesResponse().fromJsonString(jsonString, options);
|
|
1316
|
+
}
|
|
1317
|
+
static equals(a, b) {
|
|
1318
|
+
return protobuf_1.proto3.util.equals(AssignUserRolesResponse, a, b);
|
|
1319
|
+
}
|
|
1320
|
+
}
|
|
1321
|
+
exports.AssignUserRolesResponse = AssignUserRolesResponse;
|
|
1322
|
+
AssignUserRolesResponse.runtime = protobuf_1.proto3;
|
|
1323
|
+
AssignUserRolesResponse.typeName = "scalekit.v1.users.AssignUserRolesResponse";
|
|
1324
|
+
AssignUserRolesResponse.fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
1325
|
+
{ no: 1, name: "roles", kind: "message", T: commons_pb_js_1.Role, repeated: true },
|
|
1326
|
+
]);
|
|
1327
|
+
/**
|
|
1328
|
+
* @generated from message scalekit.v1.users.RemoveUserRoleRequest
|
|
1329
|
+
*/
|
|
1330
|
+
class RemoveUserRoleRequest extends protobuf_1.Message {
|
|
1331
|
+
constructor(data) {
|
|
1332
|
+
super();
|
|
1333
|
+
/**
|
|
1334
|
+
* @generated from field: string organization_id = 1;
|
|
1335
|
+
*/
|
|
1336
|
+
this.organizationId = "";
|
|
1337
|
+
/**
|
|
1338
|
+
* @generated from field: string user_id = 2;
|
|
1339
|
+
*/
|
|
1340
|
+
this.userId = "";
|
|
1341
|
+
/**
|
|
1342
|
+
* @generated from field: string role_id = 3;
|
|
1343
|
+
*/
|
|
1344
|
+
this.roleId = "";
|
|
1345
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
1346
|
+
}
|
|
1347
|
+
static fromBinary(bytes, options) {
|
|
1348
|
+
return new RemoveUserRoleRequest().fromBinary(bytes, options);
|
|
1349
|
+
}
|
|
1350
|
+
static fromJson(jsonValue, options) {
|
|
1351
|
+
return new RemoveUserRoleRequest().fromJson(jsonValue, options);
|
|
1352
|
+
}
|
|
1353
|
+
static fromJsonString(jsonString, options) {
|
|
1354
|
+
return new RemoveUserRoleRequest().fromJsonString(jsonString, options);
|
|
1355
|
+
}
|
|
1356
|
+
static equals(a, b) {
|
|
1357
|
+
return protobuf_1.proto3.util.equals(RemoveUserRoleRequest, a, b);
|
|
1358
|
+
}
|
|
1359
|
+
}
|
|
1360
|
+
exports.RemoveUserRoleRequest = RemoveUserRoleRequest;
|
|
1361
|
+
RemoveUserRoleRequest.runtime = protobuf_1.proto3;
|
|
1362
|
+
RemoveUserRoleRequest.typeName = "scalekit.v1.users.RemoveUserRoleRequest";
|
|
1363
|
+
RemoveUserRoleRequest.fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
1364
|
+
{ no: 1, name: "organization_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1365
|
+
{ no: 2, name: "user_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1366
|
+
{ no: 3, name: "role_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1367
|
+
]);
|
|
1368
|
+
/**
|
|
1369
|
+
* @generated from message scalekit.v1.users.ListUserPermissionsRequest
|
|
1370
|
+
*/
|
|
1371
|
+
class ListUserPermissionsRequest extends protobuf_1.Message {
|
|
1372
|
+
constructor(data) {
|
|
1373
|
+
super();
|
|
1374
|
+
/**
|
|
1375
|
+
* @generated from field: string organization_id = 1;
|
|
1376
|
+
*/
|
|
1377
|
+
this.organizationId = "";
|
|
1378
|
+
/**
|
|
1379
|
+
* @generated from field: string user_id = 2;
|
|
1380
|
+
*/
|
|
1381
|
+
this.userId = "";
|
|
1382
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
1383
|
+
}
|
|
1384
|
+
static fromBinary(bytes, options) {
|
|
1385
|
+
return new ListUserPermissionsRequest().fromBinary(bytes, options);
|
|
1386
|
+
}
|
|
1387
|
+
static fromJson(jsonValue, options) {
|
|
1388
|
+
return new ListUserPermissionsRequest().fromJson(jsonValue, options);
|
|
1389
|
+
}
|
|
1390
|
+
static fromJsonString(jsonString, options) {
|
|
1391
|
+
return new ListUserPermissionsRequest().fromJsonString(jsonString, options);
|
|
1392
|
+
}
|
|
1393
|
+
static equals(a, b) {
|
|
1394
|
+
return protobuf_1.proto3.util.equals(ListUserPermissionsRequest, a, b);
|
|
1395
|
+
}
|
|
1396
|
+
}
|
|
1397
|
+
exports.ListUserPermissionsRequest = ListUserPermissionsRequest;
|
|
1398
|
+
ListUserPermissionsRequest.runtime = protobuf_1.proto3;
|
|
1399
|
+
ListUserPermissionsRequest.typeName = "scalekit.v1.users.ListUserPermissionsRequest";
|
|
1400
|
+
ListUserPermissionsRequest.fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
1401
|
+
{ no: 1, name: "organization_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1402
|
+
{ no: 2, name: "user_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1403
|
+
]);
|
|
1404
|
+
/**
|
|
1405
|
+
* @generated from message scalekit.v1.users.Permission
|
|
1406
|
+
*/
|
|
1407
|
+
class Permission extends protobuf_1.Message {
|
|
1408
|
+
constructor(data) {
|
|
1409
|
+
super();
|
|
1410
|
+
/**
|
|
1411
|
+
* @generated from field: string id = 1;
|
|
1412
|
+
*/
|
|
1413
|
+
this.id = "";
|
|
1414
|
+
/**
|
|
1415
|
+
* @generated from field: string name = 2;
|
|
1416
|
+
*/
|
|
1417
|
+
this.name = "";
|
|
1418
|
+
/**
|
|
1419
|
+
* @generated from field: string display_name = 3;
|
|
1420
|
+
*/
|
|
1421
|
+
this.displayName = "";
|
|
1422
|
+
/**
|
|
1423
|
+
* @generated from field: string description = 4;
|
|
1424
|
+
*/
|
|
1425
|
+
this.description = "";
|
|
1426
|
+
/**
|
|
1427
|
+
* @generated from field: repeated string tags = 5;
|
|
1428
|
+
*/
|
|
1429
|
+
this.tags = [];
|
|
1430
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
1431
|
+
}
|
|
1432
|
+
static fromBinary(bytes, options) {
|
|
1433
|
+
return new Permission().fromBinary(bytes, options);
|
|
1434
|
+
}
|
|
1435
|
+
static fromJson(jsonValue, options) {
|
|
1436
|
+
return new Permission().fromJson(jsonValue, options);
|
|
1437
|
+
}
|
|
1438
|
+
static fromJsonString(jsonString, options) {
|
|
1439
|
+
return new Permission().fromJsonString(jsonString, options);
|
|
1440
|
+
}
|
|
1441
|
+
static equals(a, b) {
|
|
1442
|
+
return protobuf_1.proto3.util.equals(Permission, a, b);
|
|
1443
|
+
}
|
|
1444
|
+
}
|
|
1445
|
+
exports.Permission = Permission;
|
|
1446
|
+
Permission.runtime = protobuf_1.proto3;
|
|
1447
|
+
Permission.typeName = "scalekit.v1.users.Permission";
|
|
1448
|
+
Permission.fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
1449
|
+
{ no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1450
|
+
{ no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1451
|
+
{ no: 3, name: "display_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1452
|
+
{ no: 4, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1453
|
+
{ no: 5, name: "tags", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
|
|
1454
|
+
]);
|
|
1455
|
+
/**
|
|
1456
|
+
* @generated from message scalekit.v1.users.ListUserPermissionsResponse
|
|
1457
|
+
*/
|
|
1458
|
+
class ListUserPermissionsResponse extends protobuf_1.Message {
|
|
1459
|
+
constructor(data) {
|
|
1460
|
+
super();
|
|
1461
|
+
/**
|
|
1462
|
+
* @generated from field: repeated scalekit.v1.users.Permission permissions = 1;
|
|
1463
|
+
*/
|
|
1464
|
+
this.permissions = [];
|
|
1465
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
1466
|
+
}
|
|
1467
|
+
static fromBinary(bytes, options) {
|
|
1468
|
+
return new ListUserPermissionsResponse().fromBinary(bytes, options);
|
|
1469
|
+
}
|
|
1470
|
+
static fromJson(jsonValue, options) {
|
|
1471
|
+
return new ListUserPermissionsResponse().fromJson(jsonValue, options);
|
|
1472
|
+
}
|
|
1473
|
+
static fromJsonString(jsonString, options) {
|
|
1474
|
+
return new ListUserPermissionsResponse().fromJsonString(jsonString, options);
|
|
1475
|
+
}
|
|
1476
|
+
static equals(a, b) {
|
|
1477
|
+
return protobuf_1.proto3.util.equals(ListUserPermissionsResponse, a, b);
|
|
1478
|
+
}
|
|
1479
|
+
}
|
|
1480
|
+
exports.ListUserPermissionsResponse = ListUserPermissionsResponse;
|
|
1481
|
+
ListUserPermissionsResponse.runtime = protobuf_1.proto3;
|
|
1482
|
+
ListUserPermissionsResponse.typeName = "scalekit.v1.users.ListUserPermissionsResponse";
|
|
1483
|
+
ListUserPermissionsResponse.fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
1484
|
+
{ no: 1, name: "permissions", kind: "message", T: Permission, repeated: true },
|
|
1485
|
+
]);
|
|
1048
1486
|
//# sourceMappingURL=users_pb.js.map
|