weave-typescript 0.36.0 → 0.38.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.
@@ -143,6 +143,11 @@ export interface AuthOrganization {
143
143
  slug: string;
144
144
  name: string;
145
145
  kind: OrganizationKind;
146
+ /**
147
+ * Deprecated: provider identifiers are backend-only; use id.
148
+ *
149
+ * @deprecated
150
+ */
146
151
  stytchOrganizationId: string;
147
152
  roleIds: string[];
148
153
  membershipStatus: MembershipStatus;
@@ -151,7 +156,17 @@ export interface DiscoveryOrganization {
151
156
  organizationId: string;
152
157
  organizationSlug: string;
153
158
  organizationName: string;
159
+ /**
160
+ * Deprecated: provider identifiers are backend-only; use organization_id.
161
+ *
162
+ * @deprecated
163
+ */
154
164
  stytchOrganizationId: string;
165
+ /**
166
+ * Deprecated: provider identifiers are backend-only; use organization_slug.
167
+ *
168
+ * @deprecated
169
+ */
155
170
  stytchOrganizationSlug: string;
156
171
  organizationKind: OrganizationKind;
157
172
  status: DiscoveryOrganizationStatus;
@@ -165,7 +180,17 @@ export interface InviteOnboardingState {
165
180
  organizationSlug: string;
166
181
  organizationName: string;
167
182
  organizationKind: OrganizationKind;
183
+ /**
184
+ * Deprecated: provider identifiers are backend-only; use organization_id.
185
+ *
186
+ * @deprecated
187
+ */
168
188
  stytchOrganizationId: string;
189
+ /**
190
+ * Deprecated: provider identifiers are backend-only; use invite_session_id.
191
+ *
192
+ * @deprecated
193
+ */
169
194
  stytchMemberId: string;
170
195
  email: string;
171
196
  displayName: string;
@@ -212,7 +237,17 @@ export interface UserPreferences_OrganizationPagePositionsEntry {
212
237
  export interface OrganizationAuthSettings {
213
238
  organizationId: string;
214
239
  organizationSlug: string;
240
+ /**
241
+ * Deprecated: provider identifiers are backend-only; use organization_id.
242
+ *
243
+ * @deprecated
244
+ */
215
245
  stytchOrganizationId: string;
246
+ /**
247
+ * Deprecated: provider identifiers are backend-only; use organization_slug.
248
+ *
249
+ * @deprecated
250
+ */
216
251
  stytchOrganizationSlug: string;
217
252
  organizationKind: OrganizationKind;
218
253
  allowedAuthMethods: AuthMethod[];
@@ -229,9 +264,16 @@ export interface OrganizationAuthSettings {
229
264
  } | undefined;
230
265
  }
231
266
  export interface OrganizationMember {
267
+ /** Weave organization_memberships.id. */
232
268
  id: string;
269
+ /** Weave users.id. */
233
270
  userId: string;
234
271
  organizationId: string;
272
+ /**
273
+ * Deprecated: provider identifiers are backend-only; use id.
274
+ *
275
+ * @deprecated
276
+ */
235
277
  stytchMemberId: string;
236
278
  email: string;
237
279
  displayName: string;
@@ -241,6 +283,25 @@ export interface OrganizationMember {
241
283
  createdAt: Date | undefined;
242
284
  updatedAt: Date | undefined;
243
285
  }
286
+ export interface OrganizationTeam {
287
+ id: string;
288
+ organizationId: string;
289
+ slug: string;
290
+ name: string;
291
+ description: string;
292
+ roleIds: string[];
293
+ members: OrganizationTeamMember[];
294
+ createdAt: Date | undefined;
295
+ updatedAt: Date | undefined;
296
+ }
297
+ export interface OrganizationTeamMember {
298
+ organizationMembershipId: string;
299
+ userId: string;
300
+ email: string;
301
+ displayName: string;
302
+ avatarUrl: string;
303
+ status: MembershipStatus;
304
+ }
244
305
  export interface RbacPolicySummary {
245
306
  resources: RbacResource[];
246
307
  roles: RbacRole[];
@@ -319,6 +380,8 @@ export declare const UserPreferences: MessageFns<UserPreferences>;
319
380
  export declare const UserPreferences_OrganizationPagePositionsEntry: MessageFns<UserPreferences_OrganizationPagePositionsEntry>;
320
381
  export declare const OrganizationAuthSettings: MessageFns<OrganizationAuthSettings>;
321
382
  export declare const OrganizationMember: MessageFns<OrganizationMember>;
383
+ export declare const OrganizationTeam: MessageFns<OrganizationTeam>;
384
+ export declare const OrganizationTeamMember: MessageFns<OrganizationTeamMember>;
322
385
  export declare const RbacPolicySummary: MessageFns<RbacPolicySummary>;
323
386
  export declare const RbacResource: MessageFns<RbacResource>;
324
387
  export declare const RbacRole: MessageFns<RbacRole>;
@@ -5,7 +5,7 @@
5
5
  // protoc unknown
6
6
  // source: weaveapi/auth/v1/auth.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.SupportAccessSession = exports.ScimGroupMapping = exports.ScimTokenRotation = exports.ScimConnection = exports.SsoConnection = exports.RbacPermission = exports.RbacRole = exports.RbacResource = exports.RbacPolicySummary = exports.OrganizationMember = exports.OrganizationAuthSettings = exports.UserPreferences_OrganizationPagePositionsEntry = exports.UserPreferences = exports.UserOrganizationPagePosition = exports.UserProfile = exports.InviteOnboardingState = exports.DiscoveryOrganization = exports.AuthOrganization = exports.AuthUser_OrganizationPagePositionsEntry = exports.AuthUser = exports.AuthSession = exports.InviteRecoveryStatus = exports.InviteRecoveryReason = exports.InviteOnboardingStatus = exports.AuthProvider = exports.ScimConnectionStatus = exports.SsoConnectionStatus = exports.SsoConnectionType = exports.OrganizationKind = exports.MembershipStatus = exports.DiscoveryOrganizationStatus = exports.AuthMethod = exports.protobufPackage = void 0;
8
+ exports.SupportAccessSession = exports.ScimGroupMapping = exports.ScimTokenRotation = exports.ScimConnection = exports.SsoConnection = exports.RbacPermission = exports.RbacRole = exports.RbacResource = exports.RbacPolicySummary = exports.OrganizationTeamMember = exports.OrganizationTeam = exports.OrganizationMember = exports.OrganizationAuthSettings = exports.UserPreferences_OrganizationPagePositionsEntry = exports.UserPreferences = exports.UserOrganizationPagePosition = exports.UserProfile = exports.InviteOnboardingState = exports.DiscoveryOrganization = exports.AuthOrganization = exports.AuthUser_OrganizationPagePositionsEntry = exports.AuthUser = exports.AuthSession = exports.InviteRecoveryStatus = exports.InviteRecoveryReason = exports.InviteOnboardingStatus = exports.AuthProvider = exports.ScimConnectionStatus = exports.SsoConnectionStatus = exports.SsoConnectionType = exports.OrganizationKind = exports.MembershipStatus = exports.DiscoveryOrganizationStatus = exports.AuthMethod = exports.protobufPackage = void 0;
9
9
  exports.authMethodFromJSON = authMethodFromJSON;
10
10
  exports.authMethodToJSON = authMethodToJSON;
11
11
  exports.discoveryOrganizationStatusFromJSON = discoveryOrganizationStatusFromJSON;
@@ -3051,6 +3051,355 @@ exports.OrganizationMember = {
3051
3051
  return message;
3052
3052
  },
3053
3053
  };
3054
+ function createBaseOrganizationTeam() {
3055
+ return {
3056
+ id: "",
3057
+ organizationId: "",
3058
+ slug: "",
3059
+ name: "",
3060
+ description: "",
3061
+ roleIds: [],
3062
+ members: [],
3063
+ createdAt: undefined,
3064
+ updatedAt: undefined,
3065
+ };
3066
+ }
3067
+ exports.OrganizationTeam = {
3068
+ encode(message, writer = new wire_1.BinaryWriter()) {
3069
+ if (message.id !== "") {
3070
+ writer.uint32(10).string(message.id);
3071
+ }
3072
+ if (message.organizationId !== "") {
3073
+ writer.uint32(18).string(message.organizationId);
3074
+ }
3075
+ if (message.slug !== "") {
3076
+ writer.uint32(26).string(message.slug);
3077
+ }
3078
+ if (message.name !== "") {
3079
+ writer.uint32(34).string(message.name);
3080
+ }
3081
+ if (message.description !== "") {
3082
+ writer.uint32(42).string(message.description);
3083
+ }
3084
+ for (const v of message.roleIds) {
3085
+ writer.uint32(50).string(v);
3086
+ }
3087
+ for (const v of message.members) {
3088
+ exports.OrganizationTeamMember.encode(v, writer.uint32(58).fork()).join();
3089
+ }
3090
+ if (message.createdAt !== undefined) {
3091
+ timestamp_pb_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(66).fork()).join();
3092
+ }
3093
+ if (message.updatedAt !== undefined) {
3094
+ timestamp_pb_1.Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(74).fork()).join();
3095
+ }
3096
+ return writer;
3097
+ },
3098
+ decode(input, length) {
3099
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
3100
+ const end = length === undefined ? reader.len : reader.pos + length;
3101
+ const message = createBaseOrganizationTeam();
3102
+ while (reader.pos < end) {
3103
+ const tag = reader.uint32();
3104
+ switch (tag >>> 3) {
3105
+ case 1: {
3106
+ if (tag !== 10) {
3107
+ break;
3108
+ }
3109
+ message.id = reader.string();
3110
+ continue;
3111
+ }
3112
+ case 2: {
3113
+ if (tag !== 18) {
3114
+ break;
3115
+ }
3116
+ message.organizationId = reader.string();
3117
+ continue;
3118
+ }
3119
+ case 3: {
3120
+ if (tag !== 26) {
3121
+ break;
3122
+ }
3123
+ message.slug = reader.string();
3124
+ continue;
3125
+ }
3126
+ case 4: {
3127
+ if (tag !== 34) {
3128
+ break;
3129
+ }
3130
+ message.name = reader.string();
3131
+ continue;
3132
+ }
3133
+ case 5: {
3134
+ if (tag !== 42) {
3135
+ break;
3136
+ }
3137
+ message.description = reader.string();
3138
+ continue;
3139
+ }
3140
+ case 6: {
3141
+ if (tag !== 50) {
3142
+ break;
3143
+ }
3144
+ message.roleIds.push(reader.string());
3145
+ continue;
3146
+ }
3147
+ case 7: {
3148
+ if (tag !== 58) {
3149
+ break;
3150
+ }
3151
+ message.members.push(exports.OrganizationTeamMember.decode(reader, reader.uint32()));
3152
+ continue;
3153
+ }
3154
+ case 8: {
3155
+ if (tag !== 66) {
3156
+ break;
3157
+ }
3158
+ message.createdAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
3159
+ continue;
3160
+ }
3161
+ case 9: {
3162
+ if (tag !== 74) {
3163
+ break;
3164
+ }
3165
+ message.updatedAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
3166
+ continue;
3167
+ }
3168
+ }
3169
+ if ((tag & 7) === 4 || tag === 0) {
3170
+ break;
3171
+ }
3172
+ reader.skip(tag & 7);
3173
+ }
3174
+ return message;
3175
+ },
3176
+ fromJSON(object) {
3177
+ return {
3178
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
3179
+ organizationId: isSet(object.organizationId)
3180
+ ? globalThis.String(object.organizationId)
3181
+ : isSet(object.organization_id)
3182
+ ? globalThis.String(object.organization_id)
3183
+ : "",
3184
+ slug: isSet(object.slug) ? globalThis.String(object.slug) : "",
3185
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
3186
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
3187
+ roleIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.roleIds)
3188
+ ? object.roleIds.map((e) => globalThis.String(e))
3189
+ : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.role_ids)
3190
+ ? object.role_ids.map((e) => globalThis.String(e))
3191
+ : [],
3192
+ members: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.members)
3193
+ ? object.members.map((e) => exports.OrganizationTeamMember.fromJSON(e))
3194
+ : [],
3195
+ createdAt: isSet(object.createdAt)
3196
+ ? fromJsonTimestamp(object.createdAt)
3197
+ : isSet(object.created_at)
3198
+ ? fromJsonTimestamp(object.created_at)
3199
+ : undefined,
3200
+ updatedAt: isSet(object.updatedAt)
3201
+ ? fromJsonTimestamp(object.updatedAt)
3202
+ : isSet(object.updated_at)
3203
+ ? fromJsonTimestamp(object.updated_at)
3204
+ : undefined,
3205
+ };
3206
+ },
3207
+ toJSON(message) {
3208
+ var _a, _b;
3209
+ const obj = {};
3210
+ if (message.id !== "") {
3211
+ obj.id = message.id;
3212
+ }
3213
+ if (message.organizationId !== "") {
3214
+ obj.organizationId = message.organizationId;
3215
+ }
3216
+ if (message.slug !== "") {
3217
+ obj.slug = message.slug;
3218
+ }
3219
+ if (message.name !== "") {
3220
+ obj.name = message.name;
3221
+ }
3222
+ if (message.description !== "") {
3223
+ obj.description = message.description;
3224
+ }
3225
+ if ((_a = message.roleIds) === null || _a === void 0 ? void 0 : _a.length) {
3226
+ obj.roleIds = message.roleIds;
3227
+ }
3228
+ if ((_b = message.members) === null || _b === void 0 ? void 0 : _b.length) {
3229
+ obj.members = message.members.map((e) => exports.OrganizationTeamMember.toJSON(e));
3230
+ }
3231
+ if (message.createdAt !== undefined) {
3232
+ obj.createdAt = message.createdAt.toISOString();
3233
+ }
3234
+ if (message.updatedAt !== undefined) {
3235
+ obj.updatedAt = message.updatedAt.toISOString();
3236
+ }
3237
+ return obj;
3238
+ },
3239
+ create(base) {
3240
+ return exports.OrganizationTeam.fromPartial(base !== null && base !== void 0 ? base : {});
3241
+ },
3242
+ fromPartial(object) {
3243
+ var _a, _b;
3244
+ var _c, _d, _e, _f, _g, _h, _j;
3245
+ const message = createBaseOrganizationTeam();
3246
+ message.id = (_c = object.id) !== null && _c !== void 0 ? _c : "";
3247
+ message.organizationId = (_d = object.organizationId) !== null && _d !== void 0 ? _d : "";
3248
+ message.slug = (_e = object.slug) !== null && _e !== void 0 ? _e : "";
3249
+ message.name = (_f = object.name) !== null && _f !== void 0 ? _f : "";
3250
+ message.description = (_g = object.description) !== null && _g !== void 0 ? _g : "";
3251
+ message.roleIds = ((_a = object.roleIds) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
3252
+ message.members = ((_b = object.members) === null || _b === void 0 ? void 0 : _b.map((e) => exports.OrganizationTeamMember.fromPartial(e))) || [];
3253
+ message.createdAt = (_h = object.createdAt) !== null && _h !== void 0 ? _h : undefined;
3254
+ message.updatedAt = (_j = object.updatedAt) !== null && _j !== void 0 ? _j : undefined;
3255
+ return message;
3256
+ },
3257
+ };
3258
+ function createBaseOrganizationTeamMember() {
3259
+ return { organizationMembershipId: "", userId: "", email: "", displayName: "", avatarUrl: "", status: 0 };
3260
+ }
3261
+ exports.OrganizationTeamMember = {
3262
+ encode(message, writer = new wire_1.BinaryWriter()) {
3263
+ if (message.organizationMembershipId !== "") {
3264
+ writer.uint32(10).string(message.organizationMembershipId);
3265
+ }
3266
+ if (message.userId !== "") {
3267
+ writer.uint32(18).string(message.userId);
3268
+ }
3269
+ if (message.email !== "") {
3270
+ writer.uint32(26).string(message.email);
3271
+ }
3272
+ if (message.displayName !== "") {
3273
+ writer.uint32(34).string(message.displayName);
3274
+ }
3275
+ if (message.avatarUrl !== "") {
3276
+ writer.uint32(42).string(message.avatarUrl);
3277
+ }
3278
+ if (message.status !== 0) {
3279
+ writer.uint32(48).int32(message.status);
3280
+ }
3281
+ return writer;
3282
+ },
3283
+ decode(input, length) {
3284
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
3285
+ const end = length === undefined ? reader.len : reader.pos + length;
3286
+ const message = createBaseOrganizationTeamMember();
3287
+ while (reader.pos < end) {
3288
+ const tag = reader.uint32();
3289
+ switch (tag >>> 3) {
3290
+ case 1: {
3291
+ if (tag !== 10) {
3292
+ break;
3293
+ }
3294
+ message.organizationMembershipId = reader.string();
3295
+ continue;
3296
+ }
3297
+ case 2: {
3298
+ if (tag !== 18) {
3299
+ break;
3300
+ }
3301
+ message.userId = reader.string();
3302
+ continue;
3303
+ }
3304
+ case 3: {
3305
+ if (tag !== 26) {
3306
+ break;
3307
+ }
3308
+ message.email = reader.string();
3309
+ continue;
3310
+ }
3311
+ case 4: {
3312
+ if (tag !== 34) {
3313
+ break;
3314
+ }
3315
+ message.displayName = reader.string();
3316
+ continue;
3317
+ }
3318
+ case 5: {
3319
+ if (tag !== 42) {
3320
+ break;
3321
+ }
3322
+ message.avatarUrl = reader.string();
3323
+ continue;
3324
+ }
3325
+ case 6: {
3326
+ if (tag !== 48) {
3327
+ break;
3328
+ }
3329
+ message.status = reader.int32();
3330
+ continue;
3331
+ }
3332
+ }
3333
+ if ((tag & 7) === 4 || tag === 0) {
3334
+ break;
3335
+ }
3336
+ reader.skip(tag & 7);
3337
+ }
3338
+ return message;
3339
+ },
3340
+ fromJSON(object) {
3341
+ return {
3342
+ organizationMembershipId: isSet(object.organizationMembershipId)
3343
+ ? globalThis.String(object.organizationMembershipId)
3344
+ : isSet(object.organization_membership_id)
3345
+ ? globalThis.String(object.organization_membership_id)
3346
+ : "",
3347
+ userId: isSet(object.userId)
3348
+ ? globalThis.String(object.userId)
3349
+ : isSet(object.user_id)
3350
+ ? globalThis.String(object.user_id)
3351
+ : "",
3352
+ email: isSet(object.email) ? globalThis.String(object.email) : "",
3353
+ displayName: isSet(object.displayName)
3354
+ ? globalThis.String(object.displayName)
3355
+ : isSet(object.display_name)
3356
+ ? globalThis.String(object.display_name)
3357
+ : "",
3358
+ avatarUrl: isSet(object.avatarUrl)
3359
+ ? globalThis.String(object.avatarUrl)
3360
+ : isSet(object.avatar_url)
3361
+ ? globalThis.String(object.avatar_url)
3362
+ : "",
3363
+ status: isSet(object.status) ? membershipStatusFromJSON(object.status) : 0,
3364
+ };
3365
+ },
3366
+ toJSON(message) {
3367
+ const obj = {};
3368
+ if (message.organizationMembershipId !== "") {
3369
+ obj.organizationMembershipId = message.organizationMembershipId;
3370
+ }
3371
+ if (message.userId !== "") {
3372
+ obj.userId = message.userId;
3373
+ }
3374
+ if (message.email !== "") {
3375
+ obj.email = message.email;
3376
+ }
3377
+ if (message.displayName !== "") {
3378
+ obj.displayName = message.displayName;
3379
+ }
3380
+ if (message.avatarUrl !== "") {
3381
+ obj.avatarUrl = message.avatarUrl;
3382
+ }
3383
+ if (message.status !== 0) {
3384
+ obj.status = membershipStatusToJSON(message.status);
3385
+ }
3386
+ return obj;
3387
+ },
3388
+ create(base) {
3389
+ return exports.OrganizationTeamMember.fromPartial(base !== null && base !== void 0 ? base : {});
3390
+ },
3391
+ fromPartial(object) {
3392
+ var _a, _b, _c, _d, _e, _f;
3393
+ const message = createBaseOrganizationTeamMember();
3394
+ message.organizationMembershipId = (_a = object.organizationMembershipId) !== null && _a !== void 0 ? _a : "";
3395
+ message.userId = (_b = object.userId) !== null && _b !== void 0 ? _b : "";
3396
+ message.email = (_c = object.email) !== null && _c !== void 0 ? _c : "";
3397
+ message.displayName = (_d = object.displayName) !== null && _d !== void 0 ? _d : "";
3398
+ message.avatarUrl = (_e = object.avatarUrl) !== null && _e !== void 0 ? _e : "";
3399
+ message.status = (_f = object.status) !== null && _f !== void 0 ? _f : 0;
3400
+ return message;
3401
+ },
3402
+ };
3054
3403
  function createBaseRbacPolicySummary() {
3055
3404
  return { resources: [], roles: [], updatedAt: undefined };
3056
3405
  }