@fraym/proto 0.22.0 → 0.24.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.
@@ -14,11 +14,8 @@ export interface RegisterRequest {
14
14
  export interface View {
15
15
  name: string;
16
16
  sql: string;
17
- materialize: boolean;
18
- indices: ViewIndex[];
19
- }
20
- export interface ViewIndex {
21
- fields: string[];
17
+ directives: TypeDirective[];
18
+ fields: TypeField[];
22
19
  }
23
20
  export interface EnumType {
24
21
  name: string;
@@ -60,14 +57,6 @@ export declare const View: {
60
57
  create(base?: DeepPartial<View>): View;
61
58
  fromPartial(object: DeepPartial<View>): View;
62
59
  };
63
- export declare const ViewIndex: {
64
- encode(message: ViewIndex, writer?: _m0.Writer): _m0.Writer;
65
- decode(input: _m0.Reader | Uint8Array, length?: number): ViewIndex;
66
- fromJSON(object: any): ViewIndex;
67
- toJSON(message: ViewIndex): unknown;
68
- create(base?: DeepPartial<ViewIndex>): ViewIndex;
69
- fromPartial(object: DeepPartial<ViewIndex>): ViewIndex;
70
- };
71
60
  export declare const EnumType: {
72
61
  encode(message: EnumType, writer?: _m0.Writer): _m0.Writer;
73
62
  decode(input: _m0.Reader | Uint8Array, length?: number): EnumType;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.RegisterResponse = exports.TypeArgument = exports.TypeField = exports.TypeDirective = exports.ObjectType = exports.EnumType = exports.ViewIndex = exports.View = exports.RegisterRequest = exports.protobufPackage = void 0;
6
+ exports.RegisterResponse = exports.TypeArgument = exports.TypeField = exports.TypeDirective = exports.ObjectType = exports.EnumType = exports.View = exports.RegisterRequest = exports.protobufPackage = void 0;
7
7
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
8
8
  exports.protobufPackage = "freym.migrations.management";
9
9
  function createBaseRegisterRequest() {
@@ -197,7 +197,7 @@ exports.RegisterRequest = {
197
197
  },
198
198
  };
199
199
  function createBaseView() {
200
- return { name: "", sql: "", materialize: false, indices: [] };
200
+ return { name: "", sql: "", directives: [], fields: [] };
201
201
  }
202
202
  exports.View = {
203
203
  encode(message, writer = minimal_1.default.Writer.create()) {
@@ -207,11 +207,11 @@ exports.View = {
207
207
  if (message.sql !== "") {
208
208
  writer.uint32(18).string(message.sql);
209
209
  }
210
- if (message.materialize === true) {
211
- writer.uint32(24).bool(message.materialize);
210
+ for (const v of message.directives) {
211
+ exports.TypeDirective.encode(v, writer.uint32(26).fork()).ldelim();
212
212
  }
213
- for (const v of message.indices) {
214
- exports.ViewIndex.encode(v, writer.uint32(34).fork()).ldelim();
213
+ for (const v of message.fields) {
214
+ exports.TypeField.encode(v, writer.uint32(34).fork()).ldelim();
215
215
  }
216
216
  return writer;
217
217
  },
@@ -235,16 +235,16 @@ exports.View = {
235
235
  message.sql = reader.string();
236
236
  continue;
237
237
  case 3:
238
- if (tag !== 24) {
238
+ if (tag !== 26) {
239
239
  break;
240
240
  }
241
- message.materialize = reader.bool();
241
+ message.directives.push(exports.TypeDirective.decode(reader, reader.uint32()));
242
242
  continue;
243
243
  case 4:
244
244
  if (tag !== 34) {
245
245
  break;
246
246
  }
247
- message.indices.push(exports.ViewIndex.decode(reader, reader.uint32()));
247
+ message.fields.push(exports.TypeField.decode(reader, reader.uint32()));
248
248
  continue;
249
249
  }
250
250
  if ((tag & 7) === 4 || tag === 0) {
@@ -258,12 +258,14 @@ exports.View = {
258
258
  return {
259
259
  name: isSet(object.name) ? globalThis.String(object.name) : "",
260
260
  sql: isSet(object.sql) ? globalThis.String(object.sql) : "",
261
- materialize: isSet(object.materialize) ? globalThis.Boolean(object.materialize) : false,
262
- indices: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.indices) ? object.indices.map((e) => exports.ViewIndex.fromJSON(e)) : [],
261
+ directives: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.directives)
262
+ ? object.directives.map((e) => exports.TypeDirective.fromJSON(e))
263
+ : [],
264
+ fields: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.fields) ? object.fields.map((e) => exports.TypeField.fromJSON(e)) : [],
263
265
  };
264
266
  },
265
267
  toJSON(message) {
266
- var _a;
268
+ var _a, _b;
267
269
  const obj = {};
268
270
  if (message.name !== "") {
269
271
  obj.name = message.name;
@@ -271,11 +273,11 @@ exports.View = {
271
273
  if (message.sql !== "") {
272
274
  obj.sql = message.sql;
273
275
  }
274
- if (message.materialize === true) {
275
- obj.materialize = message.materialize;
276
+ if ((_a = message.directives) === null || _a === void 0 ? void 0 : _a.length) {
277
+ obj.directives = message.directives.map((e) => exports.TypeDirective.toJSON(e));
276
278
  }
277
- if ((_a = message.indices) === null || _a === void 0 ? void 0 : _a.length) {
278
- obj.indices = message.indices.map((e) => exports.ViewIndex.toJSON(e));
279
+ if ((_b = message.fields) === null || _b === void 0 ? void 0 : _b.length) {
280
+ obj.fields = message.fields.map((e) => exports.TypeField.toJSON(e));
279
281
  }
280
282
  return obj;
281
283
  },
@@ -287,62 +289,8 @@ exports.View = {
287
289
  const message = createBaseView();
288
290
  message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
289
291
  message.sql = (_b = object.sql) !== null && _b !== void 0 ? _b : "";
290
- message.materialize = (_c = object.materialize) !== null && _c !== void 0 ? _c : false;
291
- message.indices = ((_d = object.indices) === null || _d === void 0 ? void 0 : _d.map((e) => exports.ViewIndex.fromPartial(e))) || [];
292
- return message;
293
- },
294
- };
295
- function createBaseViewIndex() {
296
- return { fields: [] };
297
- }
298
- exports.ViewIndex = {
299
- encode(message, writer = minimal_1.default.Writer.create()) {
300
- for (const v of message.fields) {
301
- writer.uint32(18).string(v);
302
- }
303
- return writer;
304
- },
305
- decode(input, length) {
306
- const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
307
- let end = length === undefined ? reader.len : reader.pos + length;
308
- const message = createBaseViewIndex();
309
- while (reader.pos < end) {
310
- const tag = reader.uint32();
311
- switch (tag >>> 3) {
312
- case 2:
313
- if (tag !== 18) {
314
- break;
315
- }
316
- message.fields.push(reader.string());
317
- continue;
318
- }
319
- if ((tag & 7) === 4 || tag === 0) {
320
- break;
321
- }
322
- reader.skipType(tag & 7);
323
- }
324
- return message;
325
- },
326
- fromJSON(object) {
327
- return {
328
- fields: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.fields) ? object.fields.map((e) => globalThis.String(e)) : [],
329
- };
330
- },
331
- toJSON(message) {
332
- var _a;
333
- const obj = {};
334
- if ((_a = message.fields) === null || _a === void 0 ? void 0 : _a.length) {
335
- obj.fields = message.fields;
336
- }
337
- return obj;
338
- },
339
- create(base) {
340
- return exports.ViewIndex.fromPartial(base !== null && base !== void 0 ? base : {});
341
- },
342
- fromPartial(object) {
343
- var _a;
344
- const message = createBaseViewIndex();
345
- message.fields = ((_a = object.fields) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
292
+ message.directives = ((_c = object.directives) === null || _c === void 0 ? void 0 : _c.map((e) => exports.TypeDirective.fromPartial(e))) || [];
293
+ message.fields = ((_d = object.fields) === null || _d === void 0 ? void 0 : _d.map((e) => exports.TypeField.fromPartial(e))) || [];
346
294
  return message;
347
295
  },
348
296
  };
@@ -1,7 +1,7 @@
1
1
  export { ServiceClient, ServiceServer, ServiceService } from "./management/service";
2
2
  export { ApplyRequest, ApplyResponse } from "./management/apply";
3
3
  export { CleanupRequest, CleanupRequest_StatusEntry, CleanupResponse } from "./management/cleanup";
4
- export { EnumType, ObjectType, RegisterRequest, RegisterResponse, TypeArgument, TypeDirective, TypeField, View, ViewIndex, } from "./management/register";
4
+ export { EnumType, ObjectType, RegisterRequest, RegisterResponse, TypeArgument, TypeDirective, TypeField, View, } from "./management/register";
5
5
  export { RollbackRequest, RollbackResponse } from "./management/rollback";
6
6
  export { StartRequest, StartRequest_Init, StartRequest_TransformedData, StartRequest_TransformedData_DataEntry, StartResponse, StartResponse_Status, StartResponse_Status_StatusEntry, StartResponse_TransformData, StartResponse_TransformData_DataEntry, } from "./management/start";
7
7
  export { StatusRequest, StatusResponse } from "./management/status";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StatusResponse = exports.StatusRequest = exports.StartResponse_TransformData_DataEntry = exports.StartResponse_TransformData = exports.StartResponse_Status_StatusEntry = exports.StartResponse_Status = exports.StartResponse = exports.StartRequest_TransformedData_DataEntry = exports.StartRequest_TransformedData = exports.StartRequest_Init = exports.StartRequest = exports.RollbackResponse = exports.RollbackRequest = exports.ViewIndex = exports.View = exports.TypeField = exports.TypeDirective = exports.TypeArgument = exports.RegisterResponse = exports.RegisterRequest = exports.ObjectType = exports.EnumType = exports.CleanupResponse = exports.CleanupRequest_StatusEntry = exports.CleanupRequest = exports.ApplyResponse = exports.ApplyRequest = exports.ServiceService = exports.ServiceClient = void 0;
3
+ exports.StatusResponse = exports.StatusRequest = exports.StartResponse_TransformData_DataEntry = exports.StartResponse_TransformData = exports.StartResponse_Status_StatusEntry = exports.StartResponse_Status = exports.StartResponse = exports.StartRequest_TransformedData_DataEntry = exports.StartRequest_TransformedData = exports.StartRequest_Init = exports.StartRequest = exports.RollbackResponse = exports.RollbackRequest = exports.View = exports.TypeField = exports.TypeDirective = exports.TypeArgument = exports.RegisterResponse = exports.RegisterRequest = exports.ObjectType = exports.EnumType = exports.CleanupResponse = exports.CleanupRequest_StatusEntry = exports.CleanupRequest = exports.ApplyResponse = exports.ApplyRequest = exports.ServiceService = exports.ServiceClient = void 0;
4
4
  var service_1 = require("./management/service");
5
5
  Object.defineProperty(exports, "ServiceClient", { enumerable: true, get: function () { return service_1.ServiceClient; } });
6
6
  Object.defineProperty(exports, "ServiceService", { enumerable: true, get: function () { return service_1.ServiceService; } });
@@ -20,7 +20,6 @@ Object.defineProperty(exports, "TypeArgument", { enumerable: true, get: function
20
20
  Object.defineProperty(exports, "TypeDirective", { enumerable: true, get: function () { return register_1.TypeDirective; } });
21
21
  Object.defineProperty(exports, "TypeField", { enumerable: true, get: function () { return register_1.TypeField; } });
22
22
  Object.defineProperty(exports, "View", { enumerable: true, get: function () { return register_1.View; } });
23
- Object.defineProperty(exports, "ViewIndex", { enumerable: true, get: function () { return register_1.ViewIndex; } });
24
23
  var rollback_1 = require("./management/rollback");
25
24
  Object.defineProperty(exports, "RollbackRequest", { enumerable: true, get: function () { return rollback_1.RollbackRequest; } });
26
25
  Object.defineProperty(exports, "RollbackResponse", { enumerable: true, get: function () { return rollback_1.RollbackResponse; } });
@@ -19,6 +19,12 @@ export interface NestedType {
19
19
  directives: TypeDirective[];
20
20
  fields: TypeField[];
21
21
  }
22
+ export interface View {
23
+ name: string;
24
+ sql: string;
25
+ directives: TypeDirective[];
26
+ fields: TypeField[];
27
+ }
22
28
  export interface TypeField {
23
29
  name: string;
24
30
  type: string[];
@@ -32,15 +38,6 @@ export interface TypeArgument {
32
38
  name: string;
33
39
  value: string;
34
40
  }
35
- export interface View {
36
- name: string;
37
- sql: string;
38
- materialize: boolean;
39
- indices: ViewIndex[];
40
- }
41
- export interface ViewIndex {
42
- fields: string[];
43
- }
44
41
  export interface RegisterMigrationRequest {
45
42
  dangerouslyRemoveGdprFields: boolean;
46
43
  projectionTypes: ProjectionType[];
@@ -116,6 +113,14 @@ export declare const NestedType: {
116
113
  create(base?: DeepPartial<NestedType>): NestedType;
117
114
  fromPartial(object: DeepPartial<NestedType>): NestedType;
118
115
  };
116
+ export declare const View: {
117
+ encode(message: View, writer?: _m0.Writer): _m0.Writer;
118
+ decode(input: _m0.Reader | Uint8Array, length?: number): View;
119
+ fromJSON(object: any): View;
120
+ toJSON(message: View): unknown;
121
+ create(base?: DeepPartial<View>): View;
122
+ fromPartial(object: DeepPartial<View>): View;
123
+ };
119
124
  export declare const TypeField: {
120
125
  encode(message: TypeField, writer?: _m0.Writer): _m0.Writer;
121
126
  decode(input: _m0.Reader | Uint8Array, length?: number): TypeField;
@@ -140,22 +145,6 @@ export declare const TypeArgument: {
140
145
  create(base?: DeepPartial<TypeArgument>): TypeArgument;
141
146
  fromPartial(object: DeepPartial<TypeArgument>): TypeArgument;
142
147
  };
143
- export declare const View: {
144
- encode(message: View, writer?: _m0.Writer): _m0.Writer;
145
- decode(input: _m0.Reader | Uint8Array, length?: number): View;
146
- fromJSON(object: any): View;
147
- toJSON(message: View): unknown;
148
- create(base?: DeepPartial<View>): View;
149
- fromPartial(object: DeepPartial<View>): View;
150
- };
151
- export declare const ViewIndex: {
152
- encode(message: ViewIndex, writer?: _m0.Writer): _m0.Writer;
153
- decode(input: _m0.Reader | Uint8Array, length?: number): ViewIndex;
154
- fromJSON(object: any): ViewIndex;
155
- toJSON(message: ViewIndex): unknown;
156
- create(base?: DeepPartial<ViewIndex>): ViewIndex;
157
- fromPartial(object: DeepPartial<ViewIndex>): ViewIndex;
158
- };
159
148
  export declare const RegisterMigrationRequest: {
160
149
  encode(message: RegisterMigrationRequest, writer?: _m0.Writer): _m0.Writer;
161
150
  decode(input: _m0.Reader | Uint8Array, length?: number): RegisterMigrationRequest;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.GetMigrationStatusResponse = exports.GetMigrationStatusRequest = exports.RollbackMigrationResponse = exports.RollbackMigrationRequest = exports.CleanupMigrationResponse = exports.CleanupMigrationRequest_StatusEntry = exports.CleanupMigrationRequest = exports.ApplyMigrationResponse = exports.ApplyMigrationRequest = exports.RegisterMigrationResponse = exports.RegisterMigrationRequest = exports.ViewIndex = exports.View = exports.TypeArgument = exports.TypeDirective = exports.TypeField = exports.NestedType = exports.CrudType = exports.ProjectionType = exports.EnumType = exports.protobufPackage = void 0;
6
+ exports.GetMigrationStatusResponse = exports.GetMigrationStatusRequest = exports.RollbackMigrationResponse = exports.RollbackMigrationRequest = exports.CleanupMigrationResponse = exports.CleanupMigrationRequest_StatusEntry = exports.CleanupMigrationRequest = exports.ApplyMigrationResponse = exports.ApplyMigrationRequest = exports.RegisterMigrationResponse = exports.RegisterMigrationRequest = exports.TypeArgument = exports.TypeDirective = exports.TypeField = exports.View = exports.NestedType = exports.CrudType = exports.ProjectionType = exports.EnumType = exports.protobufPackage = void 0;
7
7
  const long_1 = __importDefault(require("long"));
8
8
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
9
9
  exports.protobufPackage = "freym.projections.management";
@@ -327,26 +327,29 @@ exports.NestedType = {
327
327
  return message;
328
328
  },
329
329
  };
330
- function createBaseTypeField() {
331
- return { name: "", type: [], directives: [] };
330
+ function createBaseView() {
331
+ return { name: "", sql: "", directives: [], fields: [] };
332
332
  }
333
- exports.TypeField = {
333
+ exports.View = {
334
334
  encode(message, writer = minimal_1.default.Writer.create()) {
335
335
  if (message.name !== "") {
336
336
  writer.uint32(10).string(message.name);
337
337
  }
338
- for (const v of message.type) {
339
- writer.uint32(18).string(v);
338
+ if (message.sql !== "") {
339
+ writer.uint32(18).string(message.sql);
340
340
  }
341
341
  for (const v of message.directives) {
342
342
  exports.TypeDirective.encode(v, writer.uint32(26).fork()).ldelim();
343
343
  }
344
+ for (const v of message.fields) {
345
+ exports.TypeField.encode(v, writer.uint32(34).fork()).ldelim();
346
+ }
344
347
  return writer;
345
348
  },
346
349
  decode(input, length) {
347
350
  const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
348
351
  let end = length === undefined ? reader.len : reader.pos + length;
349
- const message = createBaseTypeField();
352
+ const message = createBaseView();
350
353
  while (reader.pos < end) {
351
354
  const tag = reader.uint32();
352
355
  switch (tag >>> 3) {
@@ -360,7 +363,7 @@ exports.TypeField = {
360
363
  if (tag !== 18) {
361
364
  break;
362
365
  }
363
- message.type.push(reader.string());
366
+ message.sql = reader.string();
364
367
  continue;
365
368
  case 3:
366
369
  if (tag !== 26) {
@@ -368,6 +371,12 @@ exports.TypeField = {
368
371
  }
369
372
  message.directives.push(exports.TypeDirective.decode(reader, reader.uint32()));
370
373
  continue;
374
+ case 4:
375
+ if (tag !== 34) {
376
+ break;
377
+ }
378
+ message.fields.push(exports.TypeField.decode(reader, reader.uint32()));
379
+ continue;
371
380
  }
372
381
  if ((tag & 7) === 4 || tag === 0) {
373
382
  break;
@@ -379,10 +388,11 @@ exports.TypeField = {
379
388
  fromJSON(object) {
380
389
  return {
381
390
  name: isSet(object.name) ? globalThis.String(object.name) : "",
382
- type: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.type) ? object.type.map((e) => globalThis.String(e)) : [],
391
+ sql: isSet(object.sql) ? globalThis.String(object.sql) : "",
383
392
  directives: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.directives)
384
393
  ? object.directives.map((e) => exports.TypeDirective.fromJSON(e))
385
394
  : [],
395
+ fields: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.fields) ? object.fields.map((e) => exports.TypeField.fromJSON(e)) : [],
386
396
  };
387
397
  },
388
398
  toJSON(message) {
@@ -391,43 +401,50 @@ exports.TypeField = {
391
401
  if (message.name !== "") {
392
402
  obj.name = message.name;
393
403
  }
394
- if ((_a = message.type) === null || _a === void 0 ? void 0 : _a.length) {
395
- obj.type = message.type;
404
+ if (message.sql !== "") {
405
+ obj.sql = message.sql;
396
406
  }
397
- if ((_b = message.directives) === null || _b === void 0 ? void 0 : _b.length) {
407
+ if ((_a = message.directives) === null || _a === void 0 ? void 0 : _a.length) {
398
408
  obj.directives = message.directives.map((e) => exports.TypeDirective.toJSON(e));
399
409
  }
410
+ if ((_b = message.fields) === null || _b === void 0 ? void 0 : _b.length) {
411
+ obj.fields = message.fields.map((e) => exports.TypeField.toJSON(e));
412
+ }
400
413
  return obj;
401
414
  },
402
415
  create(base) {
403
- return exports.TypeField.fromPartial(base !== null && base !== void 0 ? base : {});
416
+ return exports.View.fromPartial(base !== null && base !== void 0 ? base : {});
404
417
  },
405
418
  fromPartial(object) {
406
- var _a, _b, _c;
407
- const message = createBaseTypeField();
419
+ var _a, _b, _c, _d;
420
+ const message = createBaseView();
408
421
  message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
409
- message.type = ((_b = object.type) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || [];
422
+ message.sql = (_b = object.sql) !== null && _b !== void 0 ? _b : "";
410
423
  message.directives = ((_c = object.directives) === null || _c === void 0 ? void 0 : _c.map((e) => exports.TypeDirective.fromPartial(e))) || [];
424
+ message.fields = ((_d = object.fields) === null || _d === void 0 ? void 0 : _d.map((e) => exports.TypeField.fromPartial(e))) || [];
411
425
  return message;
412
426
  },
413
427
  };
414
- function createBaseTypeDirective() {
415
- return { name: "", arguments: [] };
428
+ function createBaseTypeField() {
429
+ return { name: "", type: [], directives: [] };
416
430
  }
417
- exports.TypeDirective = {
431
+ exports.TypeField = {
418
432
  encode(message, writer = minimal_1.default.Writer.create()) {
419
433
  if (message.name !== "") {
420
434
  writer.uint32(10).string(message.name);
421
435
  }
422
- for (const v of message.arguments) {
423
- exports.TypeArgument.encode(v, writer.uint32(18).fork()).ldelim();
436
+ for (const v of message.type) {
437
+ writer.uint32(18).string(v);
438
+ }
439
+ for (const v of message.directives) {
440
+ exports.TypeDirective.encode(v, writer.uint32(26).fork()).ldelim();
424
441
  }
425
442
  return writer;
426
443
  },
427
444
  decode(input, length) {
428
445
  const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
429
446
  let end = length === undefined ? reader.len : reader.pos + length;
430
- const message = createBaseTypeDirective();
447
+ const message = createBaseTypeField();
431
448
  while (reader.pos < end) {
432
449
  const tag = reader.uint32();
433
450
  switch (tag >>> 3) {
@@ -441,7 +458,13 @@ exports.TypeDirective = {
441
458
  if (tag !== 18) {
442
459
  break;
443
460
  }
444
- message.arguments.push(exports.TypeArgument.decode(reader, reader.uint32()));
461
+ message.type.push(reader.string());
462
+ continue;
463
+ case 3:
464
+ if (tag !== 26) {
465
+ break;
466
+ }
467
+ message.directives.push(exports.TypeDirective.decode(reader, reader.uint32()));
445
468
  continue;
446
469
  }
447
470
  if ((tag & 7) === 4 || tag === 0) {
@@ -454,50 +477,55 @@ exports.TypeDirective = {
454
477
  fromJSON(object) {
455
478
  return {
456
479
  name: isSet(object.name) ? globalThis.String(object.name) : "",
457
- arguments: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.arguments)
458
- ? object.arguments.map((e) => exports.TypeArgument.fromJSON(e))
480
+ type: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.type) ? object.type.map((e) => globalThis.String(e)) : [],
481
+ directives: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.directives)
482
+ ? object.directives.map((e) => exports.TypeDirective.fromJSON(e))
459
483
  : [],
460
484
  };
461
485
  },
462
486
  toJSON(message) {
463
- var _a;
487
+ var _a, _b;
464
488
  const obj = {};
465
489
  if (message.name !== "") {
466
490
  obj.name = message.name;
467
491
  }
468
- if ((_a = message.arguments) === null || _a === void 0 ? void 0 : _a.length) {
469
- obj.arguments = message.arguments.map((e) => exports.TypeArgument.toJSON(e));
492
+ if ((_a = message.type) === null || _a === void 0 ? void 0 : _a.length) {
493
+ obj.type = message.type;
494
+ }
495
+ if ((_b = message.directives) === null || _b === void 0 ? void 0 : _b.length) {
496
+ obj.directives = message.directives.map((e) => exports.TypeDirective.toJSON(e));
470
497
  }
471
498
  return obj;
472
499
  },
473
500
  create(base) {
474
- return exports.TypeDirective.fromPartial(base !== null && base !== void 0 ? base : {});
501
+ return exports.TypeField.fromPartial(base !== null && base !== void 0 ? base : {});
475
502
  },
476
503
  fromPartial(object) {
477
- var _a, _b;
478
- const message = createBaseTypeDirective();
504
+ var _a, _b, _c;
505
+ const message = createBaseTypeField();
479
506
  message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
480
- message.arguments = ((_b = object.arguments) === null || _b === void 0 ? void 0 : _b.map((e) => exports.TypeArgument.fromPartial(e))) || [];
507
+ message.type = ((_b = object.type) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || [];
508
+ message.directives = ((_c = object.directives) === null || _c === void 0 ? void 0 : _c.map((e) => exports.TypeDirective.fromPartial(e))) || [];
481
509
  return message;
482
510
  },
483
511
  };
484
- function createBaseTypeArgument() {
485
- return { name: "", value: "" };
512
+ function createBaseTypeDirective() {
513
+ return { name: "", arguments: [] };
486
514
  }
487
- exports.TypeArgument = {
515
+ exports.TypeDirective = {
488
516
  encode(message, writer = minimal_1.default.Writer.create()) {
489
517
  if (message.name !== "") {
490
518
  writer.uint32(10).string(message.name);
491
519
  }
492
- if (message.value !== "") {
493
- writer.uint32(18).string(message.value);
520
+ for (const v of message.arguments) {
521
+ exports.TypeArgument.encode(v, writer.uint32(18).fork()).ldelim();
494
522
  }
495
523
  return writer;
496
524
  },
497
525
  decode(input, length) {
498
526
  const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
499
527
  let end = length === undefined ? reader.len : reader.pos + length;
500
- const message = createBaseTypeArgument();
528
+ const message = createBaseTypeDirective();
501
529
  while (reader.pos < end) {
502
530
  const tag = reader.uint32();
503
531
  switch (tag >>> 3) {
@@ -511,7 +539,7 @@ exports.TypeArgument = {
511
539
  if (tag !== 18) {
512
540
  break;
513
541
  }
514
- message.value = reader.string();
542
+ message.arguments.push(exports.TypeArgument.decode(reader, reader.uint32()));
515
543
  continue;
516
544
  }
517
545
  if ((tag & 7) === 4 || tag === 0) {
@@ -524,53 +552,50 @@ exports.TypeArgument = {
524
552
  fromJSON(object) {
525
553
  return {
526
554
  name: isSet(object.name) ? globalThis.String(object.name) : "",
527
- value: isSet(object.value) ? globalThis.String(object.value) : "",
555
+ arguments: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.arguments)
556
+ ? object.arguments.map((e) => exports.TypeArgument.fromJSON(e))
557
+ : [],
528
558
  };
529
559
  },
530
560
  toJSON(message) {
561
+ var _a;
531
562
  const obj = {};
532
563
  if (message.name !== "") {
533
564
  obj.name = message.name;
534
565
  }
535
- if (message.value !== "") {
536
- obj.value = message.value;
566
+ if ((_a = message.arguments) === null || _a === void 0 ? void 0 : _a.length) {
567
+ obj.arguments = message.arguments.map((e) => exports.TypeArgument.toJSON(e));
537
568
  }
538
569
  return obj;
539
570
  },
540
571
  create(base) {
541
- return exports.TypeArgument.fromPartial(base !== null && base !== void 0 ? base : {});
572
+ return exports.TypeDirective.fromPartial(base !== null && base !== void 0 ? base : {});
542
573
  },
543
574
  fromPartial(object) {
544
575
  var _a, _b;
545
- const message = createBaseTypeArgument();
576
+ const message = createBaseTypeDirective();
546
577
  message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
547
- message.value = (_b = object.value) !== null && _b !== void 0 ? _b : "";
578
+ message.arguments = ((_b = object.arguments) === null || _b === void 0 ? void 0 : _b.map((e) => exports.TypeArgument.fromPartial(e))) || [];
548
579
  return message;
549
580
  },
550
581
  };
551
- function createBaseView() {
552
- return { name: "", sql: "", materialize: false, indices: [] };
582
+ function createBaseTypeArgument() {
583
+ return { name: "", value: "" };
553
584
  }
554
- exports.View = {
585
+ exports.TypeArgument = {
555
586
  encode(message, writer = minimal_1.default.Writer.create()) {
556
587
  if (message.name !== "") {
557
588
  writer.uint32(10).string(message.name);
558
589
  }
559
- if (message.sql !== "") {
560
- writer.uint32(18).string(message.sql);
561
- }
562
- if (message.materialize === true) {
563
- writer.uint32(24).bool(message.materialize);
564
- }
565
- for (const v of message.indices) {
566
- exports.ViewIndex.encode(v, writer.uint32(34).fork()).ldelim();
590
+ if (message.value !== "") {
591
+ writer.uint32(18).string(message.value);
567
592
  }
568
593
  return writer;
569
594
  },
570
595
  decode(input, length) {
571
596
  const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
572
597
  let end = length === undefined ? reader.len : reader.pos + length;
573
- const message = createBaseView();
598
+ const message = createBaseTypeArgument();
574
599
  while (reader.pos < end) {
575
600
  const tag = reader.uint32();
576
601
  switch (tag >>> 3) {
@@ -584,19 +609,7 @@ exports.View = {
584
609
  if (tag !== 18) {
585
610
  break;
586
611
  }
587
- message.sql = reader.string();
588
- continue;
589
- case 3:
590
- if (tag !== 24) {
591
- break;
592
- }
593
- message.materialize = reader.bool();
594
- continue;
595
- case 4:
596
- if (tag !== 34) {
597
- break;
598
- }
599
- message.indices.push(exports.ViewIndex.decode(reader, reader.uint32()));
612
+ message.value = reader.string();
600
613
  continue;
601
614
  }
602
615
  if ((tag & 7) === 4 || tag === 0) {
@@ -609,92 +622,27 @@ exports.View = {
609
622
  fromJSON(object) {
610
623
  return {
611
624
  name: isSet(object.name) ? globalThis.String(object.name) : "",
612
- sql: isSet(object.sql) ? globalThis.String(object.sql) : "",
613
- materialize: isSet(object.materialize) ? globalThis.Boolean(object.materialize) : false,
614
- indices: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.indices) ? object.indices.map((e) => exports.ViewIndex.fromJSON(e)) : [],
625
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
615
626
  };
616
627
  },
617
628
  toJSON(message) {
618
- var _a;
619
629
  const obj = {};
620
630
  if (message.name !== "") {
621
631
  obj.name = message.name;
622
632
  }
623
- if (message.sql !== "") {
624
- obj.sql = message.sql;
625
- }
626
- if (message.materialize === true) {
627
- obj.materialize = message.materialize;
628
- }
629
- if ((_a = message.indices) === null || _a === void 0 ? void 0 : _a.length) {
630
- obj.indices = message.indices.map((e) => exports.ViewIndex.toJSON(e));
633
+ if (message.value !== "") {
634
+ obj.value = message.value;
631
635
  }
632
636
  return obj;
633
637
  },
634
638
  create(base) {
635
- return exports.View.fromPartial(base !== null && base !== void 0 ? base : {});
639
+ return exports.TypeArgument.fromPartial(base !== null && base !== void 0 ? base : {});
636
640
  },
637
641
  fromPartial(object) {
638
- var _a, _b, _c, _d;
639
- const message = createBaseView();
642
+ var _a, _b;
643
+ const message = createBaseTypeArgument();
640
644
  message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
641
- message.sql = (_b = object.sql) !== null && _b !== void 0 ? _b : "";
642
- message.materialize = (_c = object.materialize) !== null && _c !== void 0 ? _c : false;
643
- message.indices = ((_d = object.indices) === null || _d === void 0 ? void 0 : _d.map((e) => exports.ViewIndex.fromPartial(e))) || [];
644
- return message;
645
- },
646
- };
647
- function createBaseViewIndex() {
648
- return { fields: [] };
649
- }
650
- exports.ViewIndex = {
651
- encode(message, writer = minimal_1.default.Writer.create()) {
652
- for (const v of message.fields) {
653
- writer.uint32(18).string(v);
654
- }
655
- return writer;
656
- },
657
- decode(input, length) {
658
- const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
659
- let end = length === undefined ? reader.len : reader.pos + length;
660
- const message = createBaseViewIndex();
661
- while (reader.pos < end) {
662
- const tag = reader.uint32();
663
- switch (tag >>> 3) {
664
- case 2:
665
- if (tag !== 18) {
666
- break;
667
- }
668
- message.fields.push(reader.string());
669
- continue;
670
- }
671
- if ((tag & 7) === 4 || tag === 0) {
672
- break;
673
- }
674
- reader.skipType(tag & 7);
675
- }
676
- return message;
677
- },
678
- fromJSON(object) {
679
- return {
680
- fields: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.fields) ? object.fields.map((e) => globalThis.String(e)) : [],
681
- };
682
- },
683
- toJSON(message) {
684
- var _a;
685
- const obj = {};
686
- if ((_a = message.fields) === null || _a === void 0 ? void 0 : _a.length) {
687
- obj.fields = message.fields;
688
- }
689
- return obj;
690
- },
691
- create(base) {
692
- return exports.ViewIndex.fromPartial(base !== null && base !== void 0 ? base : {});
693
- },
694
- fromPartial(object) {
695
- var _a;
696
- const message = createBaseViewIndex();
697
- message.fields = ((_a = object.fields) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
645
+ message.value = (_b = object.value) !== null && _b !== void 0 ? _b : "";
698
646
  return message;
699
647
  },
700
648
  };
@@ -1,2 +1,2 @@
1
1
  export { ServiceClient, ServiceServer, ServiceService } from "./management/service";
2
- export { CrudType, EnumType, GetMigrationStatusRequest, GetMigrationStatusResponse, NestedType, ProjectionType, RegisterMigrationRequest, RegisterMigrationResponse, RollbackMigrationRequest, RollbackMigrationResponse, TypeArgument, TypeDirective, TypeField, ApplyMigrationRequest, ApplyMigrationResponse, CleanupMigrationRequest, CleanupMigrationRequest_StatusEntry, CleanupMigrationResponse, View, ViewIndex, } from "./management/migration";
2
+ export { CrudType, EnumType, GetMigrationStatusRequest, GetMigrationStatusResponse, NestedType, ProjectionType, RegisterMigrationRequest, RegisterMigrationResponse, RollbackMigrationRequest, RollbackMigrationResponse, TypeArgument, TypeDirective, TypeField, ApplyMigrationRequest, ApplyMigrationResponse, CleanupMigrationRequest, CleanupMigrationRequest_StatusEntry, CleanupMigrationResponse, View, } from "./management/migration";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ViewIndex = exports.View = exports.CleanupMigrationResponse = exports.CleanupMigrationRequest_StatusEntry = exports.CleanupMigrationRequest = exports.ApplyMigrationResponse = exports.ApplyMigrationRequest = exports.TypeField = exports.TypeDirective = exports.TypeArgument = exports.RollbackMigrationResponse = exports.RollbackMigrationRequest = exports.RegisterMigrationResponse = exports.RegisterMigrationRequest = exports.ProjectionType = exports.NestedType = exports.GetMigrationStatusResponse = exports.GetMigrationStatusRequest = exports.EnumType = exports.CrudType = exports.ServiceService = exports.ServiceClient = void 0;
3
+ exports.View = exports.CleanupMigrationResponse = exports.CleanupMigrationRequest_StatusEntry = exports.CleanupMigrationRequest = exports.ApplyMigrationResponse = exports.ApplyMigrationRequest = exports.TypeField = exports.TypeDirective = exports.TypeArgument = exports.RollbackMigrationResponse = exports.RollbackMigrationRequest = exports.RegisterMigrationResponse = exports.RegisterMigrationRequest = exports.ProjectionType = exports.NestedType = exports.GetMigrationStatusResponse = exports.GetMigrationStatusRequest = exports.EnumType = exports.CrudType = exports.ServiceService = exports.ServiceClient = void 0;
4
4
  var service_1 = require("./management/service");
5
5
  Object.defineProperty(exports, "ServiceClient", { enumerable: true, get: function () { return service_1.ServiceClient; } });
6
6
  Object.defineProperty(exports, "ServiceService", { enumerable: true, get: function () { return service_1.ServiceService; } });
@@ -24,4 +24,3 @@ Object.defineProperty(exports, "CleanupMigrationRequest", { enumerable: true, ge
24
24
  Object.defineProperty(exports, "CleanupMigrationRequest_StatusEntry", { enumerable: true, get: function () { return migration_1.CleanupMigrationRequest_StatusEntry; } });
25
25
  Object.defineProperty(exports, "CleanupMigrationResponse", { enumerable: true, get: function () { return migration_1.CleanupMigrationResponse; } });
26
26
  Object.defineProperty(exports, "View", { enumerable: true, get: function () { return migration_1.View; } });
27
- Object.defineProperty(exports, "ViewIndex", { enumerable: true, get: function () { return migration_1.ViewIndex; } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fraym/proto",
3
- "version": "0.22.0",
3
+ "version": "0.24.0",
4
4
  "license": "MIT",
5
5
  "homepage": "https://github.com/fraym/proto",
6
6
  "repository": {