@technova-tech/olive-proto-lib 2.0.4 → 2.0.6

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.
@@ -3638,6 +3638,8 @@ export declare namespace com.pkg.posv1.terminals {
3638
3638
  sessionId?: string;
3639
3639
  tokenExpiresAt?: string;
3640
3640
  sessionExpiresAt?: string;
3641
+ ownerType?: string;
3642
+ ownerId?: string;
3641
3643
  });
3642
3644
  get businessContextToken(): string;
3643
3645
  set businessContextToken(value: string);
@@ -3670,6 +3672,10 @@ export declare namespace com.pkg.posv1.terminals {
3670
3672
  set tokenExpiresAt(value: string);
3671
3673
  get sessionExpiresAt(): string;
3672
3674
  set sessionExpiresAt(value: string);
3675
+ get ownerType(): string;
3676
+ set ownerType(value: string);
3677
+ get ownerId(): string;
3678
+ set ownerId(value: string);
3673
3679
  static fromObject(data: {
3674
3680
  businessContextToken?: string;
3675
3681
  businessId?: string;
@@ -3685,6 +3691,8 @@ export declare namespace com.pkg.posv1.terminals {
3685
3691
  sessionId?: string;
3686
3692
  tokenExpiresAt?: string;
3687
3693
  sessionExpiresAt?: string;
3694
+ ownerType?: string;
3695
+ ownerId?: string;
3688
3696
  }): BusinessContextData;
3689
3697
  toObject(): {
3690
3698
  businessContextToken?: string | undefined;
@@ -3727,6 +3735,8 @@ export declare namespace com.pkg.posv1.terminals {
3727
3735
  sessionId?: string | undefined;
3728
3736
  tokenExpiresAt?: string | undefined;
3729
3737
  sessionExpiresAt?: string | undefined;
3738
+ ownerType?: string | undefined;
3739
+ ownerId?: string | undefined;
3730
3740
  };
3731
3741
  serialize(): Uint8Array;
3732
3742
  serialize(w: pb_1.BinaryWriter): void;
@@ -7255,6 +7265,8 @@ export declare namespace com.pkg.posv1.terminals {
7255
7265
  sessionId?: string | undefined;
7256
7266
  tokenExpiresAt?: string | undefined;
7257
7267
  sessionExpiresAt?: string | undefined;
7268
+ ownerType?: string | undefined;
7269
+ ownerId?: string | undefined;
7258
7270
  } | undefined;
7259
7271
  error?: string | undefined;
7260
7272
  };
@@ -10403,6 +10415,109 @@ export declare namespace com.pkg.posv1.terminals {
10403
10415
  serializeBinary(): Uint8Array;
10404
10416
  static deserializeBinary(bytes: Uint8Array): GetMfbTerminalsResponse;
10405
10417
  }
10418
+ export class ProvisionMerchantBranchTerminalRequest extends pb_1.Message {
10419
+ #private;
10420
+ constructor(data?: any[] | {
10421
+ serialNumber?: string;
10422
+ merchantId?: string;
10423
+ branchId?: string;
10424
+ merchantName?: string;
10425
+ merchantAccountNumber?: string;
10426
+ bvn?: string;
10427
+ assignedBy?: string;
10428
+ phoneNumber?: string;
10429
+ assignmentReason?: string;
10430
+ auditContext?: string;
10431
+ });
10432
+ get serialNumber(): string;
10433
+ set serialNumber(value: string);
10434
+ get merchantId(): string;
10435
+ set merchantId(value: string);
10436
+ get branchId(): string;
10437
+ set branchId(value: string);
10438
+ get merchantName(): string;
10439
+ set merchantName(value: string);
10440
+ get merchantAccountNumber(): string;
10441
+ set merchantAccountNumber(value: string);
10442
+ get bvn(): string;
10443
+ set bvn(value: string);
10444
+ get assignedBy(): string;
10445
+ set assignedBy(value: string);
10446
+ get phoneNumber(): string;
10447
+ set phoneNumber(value: string);
10448
+ get assignmentReason(): string;
10449
+ set assignmentReason(value: string);
10450
+ get auditContext(): string;
10451
+ set auditContext(value: string);
10452
+ static fromObject(data: {
10453
+ serialNumber?: string;
10454
+ merchantId?: string;
10455
+ branchId?: string;
10456
+ merchantName?: string;
10457
+ merchantAccountNumber?: string;
10458
+ bvn?: string;
10459
+ assignedBy?: string;
10460
+ phoneNumber?: string;
10461
+ assignmentReason?: string;
10462
+ auditContext?: string;
10463
+ }): ProvisionMerchantBranchTerminalRequest;
10464
+ toObject(): {
10465
+ serialNumber?: string | undefined;
10466
+ merchantId?: string | undefined;
10467
+ branchId?: string | undefined;
10468
+ merchantName?: string | undefined;
10469
+ merchantAccountNumber?: string | undefined;
10470
+ bvn?: string | undefined;
10471
+ assignedBy?: string | undefined;
10472
+ phoneNumber?: string | undefined;
10473
+ assignmentReason?: string | undefined;
10474
+ auditContext?: string | undefined;
10475
+ };
10476
+ serialize(): Uint8Array;
10477
+ serialize(w: pb_1.BinaryWriter): void;
10478
+ static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ProvisionMerchantBranchTerminalRequest;
10479
+ serializeBinary(): Uint8Array;
10480
+ static deserializeBinary(bytes: Uint8Array): ProvisionMerchantBranchTerminalRequest;
10481
+ }
10482
+ export class ProvisionMerchantBranchTerminalResponse extends pb_1.Message {
10483
+ #private;
10484
+ constructor(data?: any[] | {
10485
+ success?: boolean;
10486
+ message?: string;
10487
+ terminalInstanceId?: string;
10488
+ processorTid?: string;
10489
+ virtualAccountId?: string;
10490
+ });
10491
+ get success(): boolean;
10492
+ set success(value: boolean);
10493
+ get message(): string;
10494
+ set message(value: string);
10495
+ get terminalInstanceId(): string;
10496
+ set terminalInstanceId(value: string);
10497
+ get processorTid(): string;
10498
+ set processorTid(value: string);
10499
+ get virtualAccountId(): string;
10500
+ set virtualAccountId(value: string);
10501
+ static fromObject(data: {
10502
+ success?: boolean;
10503
+ message?: string;
10504
+ terminalInstanceId?: string;
10505
+ processorTid?: string;
10506
+ virtualAccountId?: string;
10507
+ }): ProvisionMerchantBranchTerminalResponse;
10508
+ toObject(): {
10509
+ success?: boolean | undefined;
10510
+ message?: string | undefined;
10511
+ terminalInstanceId?: string | undefined;
10512
+ processorTid?: string | undefined;
10513
+ virtualAccountId?: string | undefined;
10514
+ };
10515
+ serialize(): Uint8Array;
10516
+ serialize(w: pb_1.BinaryWriter): void;
10517
+ static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ProvisionMerchantBranchTerminalResponse;
10518
+ serializeBinary(): Uint8Array;
10519
+ static deserializeBinary(bytes: Uint8Array): ProvisionMerchantBranchTerminalResponse;
10520
+ }
10406
10521
  interface GrpcPromiseServiceInterface<P, R> {
10407
10522
  (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise<R>;
10408
10523
  (message: P, options?: grpc_1.CallOptions): Promise<R>;
@@ -11003,6 +11118,15 @@ export declare namespace com.pkg.posv1.terminals {
11003
11118
  responseSerialize: (message: GetMfbTerminalsResponse) => Buffer;
11004
11119
  responseDeserialize: (bytes: Buffer) => GetMfbTerminalsResponse;
11005
11120
  };
11121
+ ProvisionMerchantBranchTerminal: {
11122
+ path: string;
11123
+ requestStream: boolean;
11124
+ responseStream: boolean;
11125
+ requestSerialize: (message: ProvisionMerchantBranchTerminalRequest) => Buffer;
11126
+ requestDeserialize: (bytes: Buffer) => ProvisionMerchantBranchTerminalRequest;
11127
+ responseSerialize: (message: ProvisionMerchantBranchTerminalResponse) => Buffer;
11128
+ responseDeserialize: (bytes: Buffer) => ProvisionMerchantBranchTerminalResponse;
11129
+ };
11006
11130
  };
11007
11131
  [method: string]: grpc_1.UntypedHandleCall;
11008
11132
  abstract AddTerminalInstance(call: grpc_1.ServerUnaryCall<AddTerminalInstanceRequest, AddTerminalInstanceResponse>, callback: grpc_1.sendUnaryData<AddTerminalInstanceResponse>): void;
@@ -11071,6 +11195,7 @@ export declare namespace com.pkg.posv1.terminals {
11071
11195
  abstract AllocateMfbTerminals(call: grpc_1.ServerUnaryCall<AllocateMfbTerminalsRequest, AllocateMfbTerminalsResponse>, callback: grpc_1.sendUnaryData<AllocateMfbTerminalsResponse>): void;
11072
11196
  abstract DeallocateMfbTerminals(call: grpc_1.ServerUnaryCall<DeallocateMfbTerminalsRequest, DeallocateMfbTerminalsResponse>, callback: grpc_1.sendUnaryData<DeallocateMfbTerminalsResponse>): void;
11073
11197
  abstract GetMfbTerminals(call: grpc_1.ServerUnaryCall<GetMfbTerminalsRequest, GetMfbTerminalsResponse>, callback: grpc_1.sendUnaryData<GetMfbTerminalsResponse>): void;
11198
+ abstract ProvisionMerchantBranchTerminal(call: grpc_1.ServerUnaryCall<ProvisionMerchantBranchTerminalRequest, ProvisionMerchantBranchTerminalResponse>, callback: grpc_1.sendUnaryData<ProvisionMerchantBranchTerminalResponse>): void;
11074
11199
  }
11075
11200
  const TerminalServiceClient_base: grpc_1.ServiceClientConstructor;
11076
11201
  export class TerminalServiceClient extends TerminalServiceClient_base {
@@ -11141,6 +11266,7 @@ export declare namespace com.pkg.posv1.terminals {
11141
11266
  AllocateMfbTerminals: GrpcPromiseServiceInterface<AllocateMfbTerminalsRequest, AllocateMfbTerminalsResponse>;
11142
11267
  DeallocateMfbTerminals: GrpcPromiseServiceInterface<DeallocateMfbTerminalsRequest, DeallocateMfbTerminalsResponse>;
11143
11268
  GetMfbTerminals: GrpcPromiseServiceInterface<GetMfbTerminalsRequest, GetMfbTerminalsResponse>;
11269
+ ProvisionMerchantBranchTerminal: GrpcPromiseServiceInterface<ProvisionMerchantBranchTerminalRequest, ProvisionMerchantBranchTerminalResponse>;
11144
11270
  }
11145
11271
  export abstract class UnimplementedBusinessContextServiceService {
11146
11272
  static definition: {
@@ -1,113 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.google = void 0;
27
- const pb_1 = __importStar(require("google-protobuf"));
28
- var google;
29
- (function (google) {
30
- var protobuf;
31
- (function (protobuf) {
32
- class Any extends pb_1.Message {
33
- #one_of_decls = [];
34
- constructor(data) {
35
- super();
36
- pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
37
- if (!Array.isArray(data) && typeof data == "object") {
38
- if ("typeUrl" in data && data.typeUrl != undefined) {
39
- this.typeUrl = data.typeUrl;
40
- }
41
- if ("value" in data && data.value != undefined) {
42
- this.value = data.value;
43
- }
44
- }
45
- }
46
- get typeUrl() {
47
- return pb_1.Message.getFieldWithDefault(this, 1, "");
48
- }
49
- set typeUrl(value) {
50
- pb_1.Message.setField(this, 1, value);
51
- }
52
- get value() {
53
- return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0));
54
- }
55
- set value(value) {
56
- pb_1.Message.setField(this, 2, value);
57
- }
58
- static fromObject(data) {
59
- const message = new Any({});
60
- if (data.typeUrl != null) {
61
- message.typeUrl = data.typeUrl;
62
- }
63
- if (data.value != null) {
64
- message.value = data.value;
65
- }
66
- return message;
67
- }
68
- toObject() {
69
- const data = {};
70
- if (this.typeUrl != null) {
71
- data.typeUrl = this.typeUrl;
72
- }
73
- if (this.value != null) {
74
- data.value = this.value;
75
- }
76
- return data;
77
- }
78
- serialize(w) {
79
- const writer = w || new pb_1.BinaryWriter();
80
- if (this.typeUrl.length)
81
- writer.writeString(1, this.typeUrl);
82
- if (this.value.length)
83
- writer.writeBytes(2, this.value);
84
- if (!w)
85
- return writer.getResultBuffer();
86
- }
87
- static deserialize(bytes) {
88
- const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Any();
89
- while (reader.nextField()) {
90
- if (reader.isEndGroup())
91
- break;
92
- switch (reader.getFieldNumber()) {
93
- case 1:
94
- message.typeUrl = reader.readString();
95
- break;
96
- case 2:
97
- message.value = reader.readBytes();
98
- break;
99
- default: reader.skipField();
100
- }
101
- }
102
- return message;
103
- }
104
- serializeBinary() {
105
- return this.serialize();
106
- }
107
- static deserializeBinary(bytes) {
108
- return Any.deserialize(bytes);
109
- }
110
- }
111
- protobuf.Any = Any;
112
- })(protobuf = google.protobuf || (google.protobuf = {}));
113
- })(google || (exports.google = google = {}));
@@ -1,357 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.google = void 0;
27
- const pb_1 = __importStar(require("google-protobuf"));
28
- var google;
29
- (function (google) {
30
- var protobuf;
31
- (function (protobuf) {
32
- let NullValue;
33
- (function (NullValue) {
34
- NullValue[NullValue["NULL_VALUE"] = 0] = "NULL_VALUE";
35
- })(NullValue = protobuf.NullValue || (protobuf.NullValue = {}));
36
- class Struct extends pb_1.Message {
37
- #one_of_decls = [];
38
- constructor(data) {
39
- super();
40
- pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
41
- if (!Array.isArray(data) && typeof data == "object") {
42
- if ("fields" in data && data.fields != undefined) {
43
- this.fields = data.fields;
44
- }
45
- }
46
- if (!this.fields)
47
- this.fields = new Map();
48
- }
49
- get fields() {
50
- return pb_1.Message.getField(this, 1);
51
- }
52
- set fields(value) {
53
- pb_1.Message.setField(this, 1, value);
54
- }
55
- static fromObject(data) {
56
- const message = new Struct({});
57
- if (typeof data.fields == "object") {
58
- message.fields = new Map(Object.entries(data.fields).map(([key, value]) => [key, Value.fromObject(value)]));
59
- }
60
- return message;
61
- }
62
- toObject() {
63
- const data = {};
64
- if (this.fields != null) {
65
- data.fields = (Object.fromEntries)((Array.from)(this.fields).map(([key, value]) => [key, value.toObject()]));
66
- }
67
- return data;
68
- }
69
- serialize(w) {
70
- const writer = w || new pb_1.BinaryWriter();
71
- for (const [key, value] of this.fields) {
72
- writer.writeMessage(1, this.fields, () => {
73
- writer.writeString(1, key);
74
- writer.writeMessage(2, value, () => value.serialize(writer));
75
- });
76
- }
77
- if (!w)
78
- return writer.getResultBuffer();
79
- }
80
- static deserialize(bytes) {
81
- const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Struct();
82
- while (reader.nextField()) {
83
- if (reader.isEndGroup())
84
- break;
85
- switch (reader.getFieldNumber()) {
86
- case 1:
87
- reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.fields, reader, reader.readString, () => {
88
- let value;
89
- reader.readMessage(message, () => value = Value.deserialize(reader));
90
- return value;
91
- }));
92
- break;
93
- default: reader.skipField();
94
- }
95
- }
96
- return message;
97
- }
98
- serializeBinary() {
99
- return this.serialize();
100
- }
101
- static deserializeBinary(bytes) {
102
- return Struct.deserialize(bytes);
103
- }
104
- }
105
- protobuf.Struct = Struct;
106
- class Value extends pb_1.Message {
107
- #one_of_decls = [[1, 2, 3, 4, 5, 6]];
108
- constructor(data) {
109
- super();
110
- pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
111
- if (!Array.isArray(data) && typeof data == "object") {
112
- if ("nullValue" in data && data.nullValue != undefined) {
113
- this.nullValue = data.nullValue;
114
- }
115
- if ("numberValue" in data && data.numberValue != undefined) {
116
- this.numberValue = data.numberValue;
117
- }
118
- if ("stringValue" in data && data.stringValue != undefined) {
119
- this.stringValue = data.stringValue;
120
- }
121
- if ("boolValue" in data && data.boolValue != undefined) {
122
- this.boolValue = data.boolValue;
123
- }
124
- if ("structValue" in data && data.structValue != undefined) {
125
- this.structValue = data.structValue;
126
- }
127
- if ("listValue" in data && data.listValue != undefined) {
128
- this.listValue = data.listValue;
129
- }
130
- }
131
- }
132
- get nullValue() {
133
- return pb_1.Message.getFieldWithDefault(this, 1, NullValue.NULL_VALUE);
134
- }
135
- set nullValue(value) {
136
- pb_1.Message.setOneofField(this, 1, this.#one_of_decls[0], value);
137
- }
138
- get hasNullValue() {
139
- return pb_1.Message.getField(this, 1) != null;
140
- }
141
- get numberValue() {
142
- return pb_1.Message.getFieldWithDefault(this, 2, 0);
143
- }
144
- set numberValue(value) {
145
- pb_1.Message.setOneofField(this, 2, this.#one_of_decls[0], value);
146
- }
147
- get hasNumberValue() {
148
- return pb_1.Message.getField(this, 2) != null;
149
- }
150
- get stringValue() {
151
- return pb_1.Message.getFieldWithDefault(this, 3, "");
152
- }
153
- set stringValue(value) {
154
- pb_1.Message.setOneofField(this, 3, this.#one_of_decls[0], value);
155
- }
156
- get hasStringValue() {
157
- return pb_1.Message.getField(this, 3) != null;
158
- }
159
- get boolValue() {
160
- return pb_1.Message.getFieldWithDefault(this, 4, false);
161
- }
162
- set boolValue(value) {
163
- pb_1.Message.setOneofField(this, 4, this.#one_of_decls[0], value);
164
- }
165
- get hasBoolValue() {
166
- return pb_1.Message.getField(this, 4) != null;
167
- }
168
- get structValue() {
169
- return pb_1.Message.getWrapperField(this, Struct, 5);
170
- }
171
- set structValue(value) {
172
- pb_1.Message.setOneofWrapperField(this, 5, this.#one_of_decls[0], value);
173
- }
174
- get hasStructValue() {
175
- return pb_1.Message.getField(this, 5) != null;
176
- }
177
- get listValue() {
178
- return pb_1.Message.getWrapperField(this, ListValue, 6);
179
- }
180
- set listValue(value) {
181
- pb_1.Message.setOneofWrapperField(this, 6, this.#one_of_decls[0], value);
182
- }
183
- get hasListValue() {
184
- return pb_1.Message.getField(this, 6) != null;
185
- }
186
- get kind() {
187
- const cases = {
188
- 0: "none",
189
- 1: "nullValue",
190
- 2: "numberValue",
191
- 3: "stringValue",
192
- 4: "boolValue",
193
- 5: "structValue",
194
- 6: "listValue"
195
- };
196
- return cases[pb_1.Message.computeOneofCase(this, [1, 2, 3, 4, 5, 6])];
197
- }
198
- static fromObject(data) {
199
- const message = new Value({});
200
- if (data.nullValue != null) {
201
- message.nullValue = data.nullValue;
202
- }
203
- if (data.numberValue != null) {
204
- message.numberValue = data.numberValue;
205
- }
206
- if (data.stringValue != null) {
207
- message.stringValue = data.stringValue;
208
- }
209
- if (data.boolValue != null) {
210
- message.boolValue = data.boolValue;
211
- }
212
- if (data.structValue != null) {
213
- message.structValue = Struct.fromObject(data.structValue);
214
- }
215
- if (data.listValue != null) {
216
- message.listValue = ListValue.fromObject(data.listValue);
217
- }
218
- return message;
219
- }
220
- toObject() {
221
- const data = {};
222
- if (this.nullValue != null) {
223
- data.nullValue = this.nullValue;
224
- }
225
- if (this.numberValue != null) {
226
- data.numberValue = this.numberValue;
227
- }
228
- if (this.stringValue != null) {
229
- data.stringValue = this.stringValue;
230
- }
231
- if (this.boolValue != null) {
232
- data.boolValue = this.boolValue;
233
- }
234
- if (this.structValue != null) {
235
- data.structValue = this.structValue.toObject();
236
- }
237
- if (this.listValue != null) {
238
- data.listValue = this.listValue.toObject();
239
- }
240
- return data;
241
- }
242
- serialize(w) {
243
- const writer = w || new pb_1.BinaryWriter();
244
- if (this.hasNullValue)
245
- writer.writeEnum(1, this.nullValue);
246
- if (this.hasNumberValue)
247
- writer.writeDouble(2, this.numberValue);
248
- if (this.hasStringValue)
249
- writer.writeString(3, this.stringValue);
250
- if (this.hasBoolValue)
251
- writer.writeBool(4, this.boolValue);
252
- if (this.hasStructValue)
253
- writer.writeMessage(5, this.structValue, () => this.structValue.serialize(writer));
254
- if (this.hasListValue)
255
- writer.writeMessage(6, this.listValue, () => this.listValue.serialize(writer));
256
- if (!w)
257
- return writer.getResultBuffer();
258
- }
259
- static deserialize(bytes) {
260
- const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Value();
261
- while (reader.nextField()) {
262
- if (reader.isEndGroup())
263
- break;
264
- switch (reader.getFieldNumber()) {
265
- case 1:
266
- message.nullValue = reader.readEnum();
267
- break;
268
- case 2:
269
- message.numberValue = reader.readDouble();
270
- break;
271
- case 3:
272
- message.stringValue = reader.readString();
273
- break;
274
- case 4:
275
- message.boolValue = reader.readBool();
276
- break;
277
- case 5:
278
- reader.readMessage(message.structValue, () => message.structValue = Struct.deserialize(reader));
279
- break;
280
- case 6:
281
- reader.readMessage(message.listValue, () => message.listValue = ListValue.deserialize(reader));
282
- break;
283
- default: reader.skipField();
284
- }
285
- }
286
- return message;
287
- }
288
- serializeBinary() {
289
- return this.serialize();
290
- }
291
- static deserializeBinary(bytes) {
292
- return Value.deserialize(bytes);
293
- }
294
- }
295
- protobuf.Value = Value;
296
- class ListValue extends pb_1.Message {
297
- #one_of_decls = [];
298
- constructor(data) {
299
- super();
300
- pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls);
301
- if (!Array.isArray(data) && typeof data == "object") {
302
- if ("values" in data && data.values != undefined) {
303
- this.values = data.values;
304
- }
305
- }
306
- }
307
- get values() {
308
- return pb_1.Message.getRepeatedWrapperField(this, Value, 1);
309
- }
310
- set values(value) {
311
- pb_1.Message.setRepeatedWrapperField(this, 1, value);
312
- }
313
- static fromObject(data) {
314
- const message = new ListValue({});
315
- if (data.values != null) {
316
- message.values = data.values.map(item => Value.fromObject(item));
317
- }
318
- return message;
319
- }
320
- toObject() {
321
- const data = {};
322
- if (this.values != null) {
323
- data.values = this.values.map((item) => item.toObject());
324
- }
325
- return data;
326
- }
327
- serialize(w) {
328
- const writer = w || new pb_1.BinaryWriter();
329
- if (this.values.length)
330
- writer.writeRepeatedMessage(1, this.values, (item) => item.serialize(writer));
331
- if (!w)
332
- return writer.getResultBuffer();
333
- }
334
- static deserialize(bytes) {
335
- const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ListValue();
336
- while (reader.nextField()) {
337
- if (reader.isEndGroup())
338
- break;
339
- switch (reader.getFieldNumber()) {
340
- case 1:
341
- reader.readMessage(message.values, () => pb_1.Message.addToRepeatedWrapperField(message, 1, Value.deserialize(reader), Value));
342
- break;
343
- default: reader.skipField();
344
- }
345
- }
346
- return message;
347
- }
348
- serializeBinary() {
349
- return this.serialize();
350
- }
351
- static deserializeBinary(bytes) {
352
- return ListValue.deserialize(bytes);
353
- }
354
- }
355
- protobuf.ListValue = ListValue;
356
- })(protobuf = google.protobuf || (google.protobuf = {}));
357
- })(google || (exports.google = google = {}));
@@ -1,27 +0,0 @@
1
- import * as pb_1 from "google-protobuf";
2
- export declare namespace google.protobuf {
3
- class Any extends pb_1.Message {
4
- #private;
5
- constructor(data?: any[] | {
6
- typeUrl?: string;
7
- value?: Uint8Array;
8
- });
9
- get typeUrl(): string;
10
- set typeUrl(value: string);
11
- get value(): Uint8Array;
12
- set value(value: Uint8Array);
13
- static fromObject(data: {
14
- typeUrl?: string;
15
- value?: Uint8Array;
16
- }): Any;
17
- toObject(): {
18
- typeUrl?: string | undefined;
19
- value?: Uint8Array | undefined;
20
- };
21
- serialize(): Uint8Array;
22
- serialize(w: pb_1.BinaryWriter): void;
23
- static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Any;
24
- serializeBinary(): Uint8Array;
25
- static deserializeBinary(bytes: Uint8Array): Any;
26
- }
27
- }