@miradorlabs/web-grpc 2.72.0 → 2.74.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miradorlabs/web-grpc",
3
- "version": "2.72.0",
3
+ "version": "2.74.0",
4
4
  "description": "Generated gRPC (grpc-js) client stubs for the Mirador web gateway.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -905,6 +905,18 @@ export interface RevokeCliSessionResponse {
905
905
  status: ResponseStatus | undefined;
906
906
  }
907
907
 
908
+ export interface ProductFeatures {
909
+ betaInviteEnabled: boolean;
910
+ }
911
+
912
+ export interface GetProductFeaturesRequest {
913
+ }
914
+
915
+ export interface GetProductFeaturesResponse {
916
+ status: ResponseStatus | undefined;
917
+ features: ProductFeatures | undefined;
918
+ }
919
+
908
920
  function createBaseLogonRequest(): LogonRequest {
909
921
  return { invitationId: undefined };
910
922
  }
@@ -9059,9 +9071,229 @@ export const RevokeCliSessionResponse: MessageFns<RevokeCliSessionResponse> = {
9059
9071
  },
9060
9072
  };
9061
9073
 
9074
+ function createBaseProductFeatures(): ProductFeatures {
9075
+ return { betaInviteEnabled: false };
9076
+ }
9077
+
9078
+ export const ProductFeatures: MessageFns<ProductFeatures> = {
9079
+ encode(message: ProductFeatures, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
9080
+ if (message.betaInviteEnabled !== false) {
9081
+ writer.uint32(8).bool(message.betaInviteEnabled);
9082
+ }
9083
+ return writer;
9084
+ },
9085
+
9086
+ decode(input: BinaryReader | Uint8Array, length?: number): ProductFeatures {
9087
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
9088
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
9089
+ if (previousRecursionDepth >= 100) {
9090
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
9091
+ }
9092
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
9093
+ try {
9094
+ const end = length === undefined ? reader.len : reader.pos + length;
9095
+ const message = createBaseProductFeatures();
9096
+ while (reader.pos < end) {
9097
+ const tag = reader.uint32();
9098
+ switch (tag >>> 3) {
9099
+ case 1: {
9100
+ if (tag !== 8) {
9101
+ break;
9102
+ }
9103
+
9104
+ message.betaInviteEnabled = reader.bool();
9105
+ continue;
9106
+ }
9107
+ }
9108
+ if ((tag & 7) === 4 || tag === 0) {
9109
+ break;
9110
+ }
9111
+ reader.skip(tag & 7);
9112
+ }
9113
+ return message;
9114
+ } finally {
9115
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
9116
+ }
9117
+ },
9118
+
9119
+ fromJSON(object: any): ProductFeatures {
9120
+ return {
9121
+ betaInviteEnabled: isSet(object.betaInviteEnabled)
9122
+ ? globalThis.Boolean(object.betaInviteEnabled)
9123
+ : isSet(object.beta_invite_enabled)
9124
+ ? globalThis.Boolean(object.beta_invite_enabled)
9125
+ : false,
9126
+ };
9127
+ },
9128
+
9129
+ toJSON(message: ProductFeatures): unknown {
9130
+ const obj: any = {};
9131
+ if (message.betaInviteEnabled !== false) {
9132
+ obj.betaInviteEnabled = message.betaInviteEnabled;
9133
+ }
9134
+ return obj;
9135
+ },
9136
+
9137
+ create<I extends Exact<DeepPartial<ProductFeatures>, I>>(base?: I): ProductFeatures {
9138
+ return ProductFeatures.fromPartial(base ?? ({} as any));
9139
+ },
9140
+ fromPartial<I extends Exact<DeepPartial<ProductFeatures>, I>>(object: I): ProductFeatures {
9141
+ const message = createBaseProductFeatures();
9142
+ message.betaInviteEnabled = object.betaInviteEnabled ?? false;
9143
+ return message;
9144
+ },
9145
+ };
9146
+
9147
+ function createBaseGetProductFeaturesRequest(): GetProductFeaturesRequest {
9148
+ return {};
9149
+ }
9150
+
9151
+ export const GetProductFeaturesRequest: MessageFns<GetProductFeaturesRequest> = {
9152
+ encode(_: GetProductFeaturesRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
9153
+ return writer;
9154
+ },
9155
+
9156
+ decode(input: BinaryReader | Uint8Array, length?: number): GetProductFeaturesRequest {
9157
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
9158
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
9159
+ if (previousRecursionDepth >= 100) {
9160
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
9161
+ }
9162
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
9163
+ try {
9164
+ const end = length === undefined ? reader.len : reader.pos + length;
9165
+ const message = createBaseGetProductFeaturesRequest();
9166
+ while (reader.pos < end) {
9167
+ const tag = reader.uint32();
9168
+ switch (tag >>> 3) {
9169
+ }
9170
+ if ((tag & 7) === 4 || tag === 0) {
9171
+ break;
9172
+ }
9173
+ reader.skip(tag & 7);
9174
+ }
9175
+ return message;
9176
+ } finally {
9177
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
9178
+ }
9179
+ },
9180
+
9181
+ fromJSON(_: any): GetProductFeaturesRequest {
9182
+ return {};
9183
+ },
9184
+
9185
+ toJSON(_: GetProductFeaturesRequest): unknown {
9186
+ const obj: any = {};
9187
+ return obj;
9188
+ },
9189
+
9190
+ create<I extends Exact<DeepPartial<GetProductFeaturesRequest>, I>>(base?: I): GetProductFeaturesRequest {
9191
+ return GetProductFeaturesRequest.fromPartial(base ?? ({} as any));
9192
+ },
9193
+ fromPartial<I extends Exact<DeepPartial<GetProductFeaturesRequest>, I>>(_: I): GetProductFeaturesRequest {
9194
+ const message = createBaseGetProductFeaturesRequest();
9195
+ return message;
9196
+ },
9197
+ };
9198
+
9199
+ function createBaseGetProductFeaturesResponse(): GetProductFeaturesResponse {
9200
+ return { status: undefined, features: undefined };
9201
+ }
9202
+
9203
+ export const GetProductFeaturesResponse: MessageFns<GetProductFeaturesResponse> = {
9204
+ encode(message: GetProductFeaturesResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
9205
+ if (message.status !== undefined) {
9206
+ ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
9207
+ }
9208
+ if (message.features !== undefined) {
9209
+ ProductFeatures.encode(message.features, writer.uint32(18).fork()).join();
9210
+ }
9211
+ return writer;
9212
+ },
9213
+
9214
+ decode(input: BinaryReader | Uint8Array, length?: number): GetProductFeaturesResponse {
9215
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
9216
+ const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
9217
+ if (previousRecursionDepth >= 100) {
9218
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
9219
+ }
9220
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
9221
+ try {
9222
+ const end = length === undefined ? reader.len : reader.pos + length;
9223
+ const message = createBaseGetProductFeaturesResponse();
9224
+ while (reader.pos < end) {
9225
+ const tag = reader.uint32();
9226
+ switch (tag >>> 3) {
9227
+ case 1: {
9228
+ if (tag !== 10) {
9229
+ break;
9230
+ }
9231
+
9232
+ message.status = ResponseStatus.decode(reader, reader.uint32());
9233
+ continue;
9234
+ }
9235
+ case 2: {
9236
+ if (tag !== 18) {
9237
+ break;
9238
+ }
9239
+
9240
+ message.features = ProductFeatures.decode(reader, reader.uint32());
9241
+ continue;
9242
+ }
9243
+ }
9244
+ if ((tag & 7) === 4 || tag === 0) {
9245
+ break;
9246
+ }
9247
+ reader.skip(tag & 7);
9248
+ }
9249
+ return message;
9250
+ } finally {
9251
+ (reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
9252
+ }
9253
+ },
9254
+
9255
+ fromJSON(object: any): GetProductFeaturesResponse {
9256
+ return {
9257
+ status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
9258
+ features: isSet(object.features) ? ProductFeatures.fromJSON(object.features) : undefined,
9259
+ };
9260
+ },
9261
+
9262
+ toJSON(message: GetProductFeaturesResponse): unknown {
9263
+ const obj: any = {};
9264
+ if (message.status !== undefined) {
9265
+ obj.status = ResponseStatus.toJSON(message.status);
9266
+ }
9267
+ if (message.features !== undefined) {
9268
+ obj.features = ProductFeatures.toJSON(message.features);
9269
+ }
9270
+ return obj;
9271
+ },
9272
+
9273
+ create<I extends Exact<DeepPartial<GetProductFeaturesResponse>, I>>(base?: I): GetProductFeaturesResponse {
9274
+ return GetProductFeaturesResponse.fromPartial(base ?? ({} as any));
9275
+ },
9276
+ fromPartial<I extends Exact<DeepPartial<GetProductFeaturesResponse>, I>>(object: I): GetProductFeaturesResponse {
9277
+ const message = createBaseGetProductFeaturesResponse();
9278
+ message.status = (object.status !== undefined && object.status !== null)
9279
+ ? ResponseStatus.fromPartial(object.status)
9280
+ : undefined;
9281
+ message.features = (object.features !== undefined && object.features !== null)
9282
+ ? ProductFeatures.fromPartial(object.features)
9283
+ : undefined;
9284
+ return message;
9285
+ },
9286
+ };
9287
+
9062
9288
  export interface AccountGatewayService {
9063
9289
  /** Authentication */
9064
9290
  Logon(request: LogonRequest, metadata?: Metadata): Promise<LogonResponse>;
9291
+ /**
9292
+ * GetProductFeatures returns this gateway's product feature flags (e.g. beta-invite gating). The
9293
+ * product is the gateway's fixed deployment identity, never a request field. Public: the pre-auth
9294
+ * signup page reads it to decide whether to show the invite-code gate.
9295
+ */
9296
+ GetProductFeatures(request: GetProductFeaturesRequest, metadata?: Metadata): Promise<GetProductFeaturesResponse>;
9065
9297
  /** Project operations */
9066
9298
  CreateProject(request: CreateProjectRequest, metadata?: Metadata): Promise<CreateProjectResponse>;
9067
9299
  RevealServerApiKey(request: RevealServerApiKeyRequest, metadata?: Metadata): Promise<RevealServerApiKeyResponse>;
@@ -9117,6 +9349,7 @@ export class AccountGatewayServiceClientImpl implements AccountGatewayService {
9117
9349
  this.service = opts?.service || AccountGatewayServiceServiceName;
9118
9350
  this.rpc = rpc;
9119
9351
  this.Logon = this.Logon.bind(this);
9352
+ this.GetProductFeatures = this.GetProductFeatures.bind(this);
9120
9353
  this.CreateProject = this.CreateProject.bind(this);
9121
9354
  this.RevealServerApiKey = this.RevealServerApiKey.bind(this);
9122
9355
  this.ListProjects = this.ListProjects.bind(this);
@@ -9154,6 +9387,12 @@ export class AccountGatewayServiceClientImpl implements AccountGatewayService {
9154
9387
  return promise.then((data) => LogonResponse.decode(new BinaryReader(data)));
9155
9388
  }
9156
9389
 
9390
+ GetProductFeatures(request: GetProductFeaturesRequest, metadata?: Metadata): Promise<GetProductFeaturesResponse> {
9391
+ const data = GetProductFeaturesRequest.encode(request).finish();
9392
+ const promise = this.rpc.request(this.service, "GetProductFeatures", data, metadata);
9393
+ return promise.then((data) => GetProductFeaturesResponse.decode(new BinaryReader(data)));
9394
+ }
9395
+
9157
9396
  CreateProject(request: CreateProjectRequest, metadata?: Metadata): Promise<CreateProjectResponse> {
9158
9397
  const data = CreateProjectRequest.encode(request).finish();
9159
9398
  const promise = this.rpc.request(this.service, "CreateProject", data, metadata);
@@ -204,6 +204,28 @@ function deserialize_gateway_web_v1_DeleteWebApiKeyResponse(buffer_arg) {
204
204
  return proto_gateway_web_v1_account_gateway_pb.DeleteWebApiKeyResponse.deserializeBinary(new Uint8Array(buffer_arg));
205
205
  }
206
206
 
207
+ function serialize_gateway_web_v1_GetProductFeaturesRequest(arg) {
208
+ if (!(arg instanceof proto_gateway_web_v1_account_gateway_pb.GetProductFeaturesRequest)) {
209
+ throw new Error('Expected argument of type gateway.web.v1.GetProductFeaturesRequest');
210
+ }
211
+ return Buffer.from(arg.serializeBinary());
212
+ }
213
+
214
+ function deserialize_gateway_web_v1_GetProductFeaturesRequest(buffer_arg) {
215
+ return proto_gateway_web_v1_account_gateway_pb.GetProductFeaturesRequest.deserializeBinary(new Uint8Array(buffer_arg));
216
+ }
217
+
218
+ function serialize_gateway_web_v1_GetProductFeaturesResponse(arg) {
219
+ if (!(arg instanceof proto_gateway_web_v1_account_gateway_pb.GetProductFeaturesResponse)) {
220
+ throw new Error('Expected argument of type gateway.web.v1.GetProductFeaturesResponse');
221
+ }
222
+ return Buffer.from(arg.serializeBinary());
223
+ }
224
+
225
+ function deserialize_gateway_web_v1_GetProductFeaturesResponse(buffer_arg) {
226
+ return proto_gateway_web_v1_account_gateway_pb.GetProductFeaturesResponse.deserializeBinary(new Uint8Array(buffer_arg));
227
+ }
228
+
207
229
  function serialize_gateway_web_v1_InviteUserRequest(arg) {
208
230
  if (!(arg instanceof proto_gateway_web_v1_account_gateway_pb.InviteUserRequest)) {
209
231
  throw new Error('Expected argument of type gateway.web.v1.InviteUserRequest');
@@ -702,6 +724,20 @@ logon: {
702
724
  responseSerialize: serialize_gateway_web_v1_LogonResponse,
703
725
  responseDeserialize: deserialize_gateway_web_v1_LogonResponse,
704
726
  },
727
+ // GetProductFeatures returns this gateway's product feature flags (e.g. beta-invite gating). The
728
+ // product is the gateway's fixed deployment identity, never a request field. Public: the pre-auth
729
+ // signup page reads it to decide whether to show the invite-code gate.
730
+ getProductFeatures: {
731
+ path: '/gateway.web.v1.AccountGatewayService/GetProductFeatures',
732
+ requestStream: false,
733
+ responseStream: false,
734
+ requestType: proto_gateway_web_v1_account_gateway_pb.GetProductFeaturesRequest,
735
+ responseType: proto_gateway_web_v1_account_gateway_pb.GetProductFeaturesResponse,
736
+ requestSerialize: serialize_gateway_web_v1_GetProductFeaturesRequest,
737
+ requestDeserialize: deserialize_gateway_web_v1_GetProductFeaturesRequest,
738
+ responseSerialize: serialize_gateway_web_v1_GetProductFeaturesResponse,
739
+ responseDeserialize: deserialize_gateway_web_v1_GetProductFeaturesResponse,
740
+ },
705
741
  // Project operations
706
742
  createProject: {
707
743
  path: '/gateway.web.v1.AccountGatewayService/CreateProject',