@scrawn/core 0.0.2 → 0.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.
Files changed (126) hide show
  1. package/README.md +40 -0
  2. package/dist/config.d.ts +17 -2
  3. package/dist/config.d.ts.map +1 -1
  4. package/dist/config.js +9 -2
  5. package/dist/config.js.map +1 -1
  6. package/dist/core/auth/apiKeyAuth.d.ts +4 -13
  7. package/dist/core/auth/apiKeyAuth.d.ts.map +1 -1
  8. package/dist/core/auth/apiKeyAuth.js +12 -17
  9. package/dist/core/auth/apiKeyAuth.js.map +1 -1
  10. package/dist/core/auth/baseAuth.d.ts +14 -36
  11. package/dist/core/auth/baseAuth.d.ts.map +1 -1
  12. package/dist/core/auth/baseAuth.js +0 -6
  13. package/dist/core/auth/baseAuth.js.map +1 -1
  14. package/dist/core/errors/index.d.ts +192 -0
  15. package/dist/core/errors/index.d.ts.map +1 -0
  16. package/dist/core/errors/index.js +280 -0
  17. package/dist/core/errors/index.js.map +1 -0
  18. package/dist/core/grpc/callContext.d.ts +18 -0
  19. package/dist/core/grpc/callContext.d.ts.map +1 -0
  20. package/dist/core/grpc/callContext.js +35 -0
  21. package/dist/core/grpc/callContext.js.map +1 -0
  22. package/dist/core/grpc/client.d.ts +13 -123
  23. package/dist/core/grpc/client.d.ts.map +1 -1
  24. package/dist/core/grpc/client.js +23 -131
  25. package/dist/core/grpc/client.js.map +1 -1
  26. package/dist/core/grpc/index.d.ts +5 -3
  27. package/dist/core/grpc/index.d.ts.map +1 -1
  28. package/dist/core/grpc/index.js +4 -2
  29. package/dist/core/grpc/index.js.map +1 -1
  30. package/dist/core/grpc/requestBuilder.d.ts +12 -113
  31. package/dist/core/grpc/requestBuilder.d.ts.map +1 -1
  32. package/dist/core/grpc/requestBuilder.js +36 -126
  33. package/dist/core/grpc/requestBuilder.js.map +1 -1
  34. package/dist/core/grpc/streamRequestBuilder.d.ts +13 -0
  35. package/dist/core/grpc/streamRequestBuilder.d.ts.map +1 -0
  36. package/dist/core/grpc/streamRequestBuilder.js +60 -0
  37. package/dist/core/grpc/streamRequestBuilder.js.map +1 -0
  38. package/dist/core/grpc/types.d.ts +5 -52
  39. package/dist/core/grpc/types.d.ts.map +1 -1
  40. package/dist/core/grpc/types.js +0 -7
  41. package/dist/core/grpc/types.js.map +1 -1
  42. package/dist/core/pricing/builders.d.ts +157 -0
  43. package/dist/core/pricing/builders.d.ts.map +1 -0
  44. package/dist/core/pricing/builders.js +218 -0
  45. package/dist/core/pricing/builders.js.map +1 -0
  46. package/dist/core/pricing/index.d.ts +30 -0
  47. package/dist/core/pricing/index.d.ts.map +1 -0
  48. package/dist/core/pricing/index.js +32 -0
  49. package/dist/core/pricing/index.js.map +1 -0
  50. package/dist/core/pricing/resolve.d.ts +39 -0
  51. package/dist/core/pricing/resolve.d.ts.map +1 -0
  52. package/dist/core/pricing/resolve.js +50 -0
  53. package/dist/core/pricing/resolve.js.map +1 -0
  54. package/dist/core/pricing/serialize.d.ts +55 -0
  55. package/dist/core/pricing/serialize.d.ts.map +1 -0
  56. package/dist/core/pricing/serialize.js +127 -0
  57. package/dist/core/pricing/serialize.js.map +1 -0
  58. package/dist/core/pricing/types.d.ts +122 -0
  59. package/dist/core/pricing/types.d.ts.map +1 -0
  60. package/dist/core/pricing/types.js +17 -0
  61. package/dist/core/pricing/types.js.map +1 -0
  62. package/dist/core/pricing/validate.d.ts +56 -0
  63. package/dist/core/pricing/validate.d.ts.map +1 -0
  64. package/dist/core/pricing/validate.js +162 -0
  65. package/dist/core/pricing/validate.js.map +1 -0
  66. package/dist/core/scrawn.d.ts +218 -17
  67. package/dist/core/scrawn.d.ts.map +1 -1
  68. package/dist/core/scrawn.js +469 -71
  69. package/dist/core/scrawn.js.map +1 -1
  70. package/dist/core/types/auth.d.ts +1 -1
  71. package/dist/core/types/event.d.ts +182 -18
  72. package/dist/core/types/event.d.ts.map +1 -1
  73. package/dist/core/types/event.js +133 -5
  74. package/dist/core/types/event.js.map +1 -1
  75. package/dist/gen/auth/v1/auth_grpc_pb.d.ts +3 -0
  76. package/dist/gen/auth/v1/auth_grpc_pb.js +45 -0
  77. package/dist/gen/auth/v1/auth_pb.d.ts +63 -57
  78. package/dist/gen/auth/v1/auth_pb.js +471 -86
  79. package/dist/gen/data/v1/data_grpc_pb.d.ts +5 -0
  80. package/dist/gen/data/v1/data_grpc_pb.js +44 -0
  81. package/dist/gen/data/v1/data_pb.d.ts +254 -0
  82. package/dist/gen/data/v1/data_pb.js +1530 -0
  83. package/dist/gen/event/v1/event_grpc_pb.d.ts +3 -0
  84. package/dist/gen/event/v1/event_grpc_pb.js +79 -0
  85. package/dist/gen/event/v1/event_pb.d.ts +273 -100
  86. package/dist/gen/event/v1/event_pb.js +1862 -138
  87. package/dist/gen/package.json +3 -0
  88. package/dist/gen/payment/v1/payment_grpc_pb.d.ts +3 -0
  89. package/dist/gen/payment/v1/payment_grpc_pb.js +45 -0
  90. package/dist/gen/payment/v1/payment_pb.d.ts +43 -35
  91. package/dist/gen/payment/v1/payment_pb.js +321 -59
  92. package/dist/gen/query/v1/query_grpc_pb.d.ts +5 -0
  93. package/dist/gen/query/v1/query_grpc_pb.js +44 -0
  94. package/dist/gen/query/v1/query_pb.d.ts +359 -0
  95. package/dist/gen/query/v1/query_pb.js +2327 -0
  96. package/dist/index.d.ts +19 -10
  97. package/dist/index.d.ts.map +1 -1
  98. package/dist/index.js +20 -10
  99. package/dist/index.js.map +1 -1
  100. package/dist/utils/forkAsyncIterable.d.ts +13 -0
  101. package/dist/utils/forkAsyncIterable.d.ts.map +1 -0
  102. package/dist/utils/forkAsyncIterable.js +78 -0
  103. package/dist/utils/forkAsyncIterable.js.map +1 -0
  104. package/dist/utils/logger.d.ts.map +1 -1
  105. package/dist/utils/logger.js +19 -19
  106. package/dist/utils/logger.js.map +1 -1
  107. package/dist/utils/pathMatcher.js +5 -5
  108. package/package.json +19 -15
  109. package/dist/gen/auth/v1/auth_connect.d.ts +0 -22
  110. package/dist/gen/auth/v1/auth_connect.d.ts.map +0 -1
  111. package/dist/gen/auth/v1/auth_connect.js +0 -26
  112. package/dist/gen/auth/v1/auth_connect.js.map +0 -1
  113. package/dist/gen/auth/v1/auth_pb.d.ts.map +0 -1
  114. package/dist/gen/auth/v1/auth_pb.js.map +0 -1
  115. package/dist/gen/event/v1/event_connect.d.ts +0 -22
  116. package/dist/gen/event/v1/event_connect.d.ts.map +0 -1
  117. package/dist/gen/event/v1/event_connect.js +0 -26
  118. package/dist/gen/event/v1/event_connect.js.map +0 -1
  119. package/dist/gen/event/v1/event_pb.d.ts.map +0 -1
  120. package/dist/gen/event/v1/event_pb.js.map +0 -1
  121. package/dist/gen/payment/v1/payment_connect.d.ts +0 -22
  122. package/dist/gen/payment/v1/payment_connect.d.ts.map +0 -1
  123. package/dist/gen/payment/v1/payment_connect.js +0 -26
  124. package/dist/gen/payment/v1/payment_connect.js.map +0 -1
  125. package/dist/gen/payment/v1/payment_pb.d.ts.map +0 -1
  126. package/dist/gen/payment/v1/payment_pb.js.map +0 -1
@@ -1,59 +1,65 @@
1
- import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
2
- import { Message, proto3 } from "@bufbuild/protobuf";
3
- /**
4
- * @generated from message auth.v1.CreateAPIKeyRequest
5
- */
6
- export declare class CreateAPIKeyRequest extends Message<CreateAPIKeyRequest> {
7
- /**
8
- * @generated from field: string name = 1;
9
- */
10
- name: string;
11
- /**
12
- * expiresIn is the expiration time in seconds from now
13
- *
14
- * @generated from field: int64 expiresIn = 2;
15
- */
16
- expiresIn: bigint;
17
- constructor(data?: PartialMessage<CreateAPIKeyRequest>);
18
- static readonly runtime: typeof proto3;
19
- static readonly typeName = "auth.v1.CreateAPIKeyRequest";
20
- static readonly fields: FieldList;
21
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateAPIKeyRequest;
22
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreateAPIKeyRequest;
23
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreateAPIKeyRequest;
24
- static equals(a: CreateAPIKeyRequest | PlainMessage<CreateAPIKeyRequest> | undefined, b: CreateAPIKeyRequest | PlainMessage<CreateAPIKeyRequest> | undefined): boolean;
1
+ // package: auth.v1
2
+ // file: auth/v1/auth.proto
3
+
4
+ import * as jspb from "google-protobuf";
5
+
6
+ export class CreateAPIKeyRequest extends jspb.Message {
7
+ getName(): string;
8
+ setName(value: string): void;
9
+
10
+ getExpiresin(): number;
11
+ setExpiresin(value: number): void;
12
+
13
+ serializeBinary(): Uint8Array;
14
+ toObject(includeInstance?: boolean): CreateAPIKeyRequest.AsObject;
15
+ static toObject(includeInstance: boolean, msg: CreateAPIKeyRequest): CreateAPIKeyRequest.AsObject;
16
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
17
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
18
+ static serializeBinaryToWriter(message: CreateAPIKeyRequest, writer: jspb.BinaryWriter): void;
19
+ static deserializeBinary(bytes: Uint8Array): CreateAPIKeyRequest;
20
+ static deserializeBinaryFromReader(message: CreateAPIKeyRequest, reader: jspb.BinaryReader): CreateAPIKeyRequest;
25
21
  }
26
- /**
27
- * @generated from message auth.v1.CreateAPIKeyResponse
28
- */
29
- export declare class CreateAPIKeyResponse extends Message<CreateAPIKeyResponse> {
30
- /**
31
- * @generated from field: string apiKeyId = 1;
32
- */
33
- apiKeyId: string;
34
- /**
35
- * @generated from field: string apiKey = 2;
36
- */
37
- apiKey: string;
38
- /**
39
- * @generated from field: string name = 3;
40
- */
41
- name: string;
42
- /**
43
- * @generated from field: string createdAt = 4;
44
- */
45
- createdAt: string;
46
- /**
47
- * @generated from field: string expiresAt = 5;
48
- */
49
- expiresAt: string;
50
- constructor(data?: PartialMessage<CreateAPIKeyResponse>);
51
- static readonly runtime: typeof proto3;
52
- static readonly typeName = "auth.v1.CreateAPIKeyResponse";
53
- static readonly fields: FieldList;
54
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateAPIKeyResponse;
55
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreateAPIKeyResponse;
56
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreateAPIKeyResponse;
57
- static equals(a: CreateAPIKeyResponse | PlainMessage<CreateAPIKeyResponse> | undefined, b: CreateAPIKeyResponse | PlainMessage<CreateAPIKeyResponse> | undefined): boolean;
22
+
23
+ export namespace CreateAPIKeyRequest {
24
+ export type AsObject = {
25
+ name: string,
26
+ expiresin: number,
27
+ }
58
28
  }
59
- //# sourceMappingURL=auth_pb.d.ts.map
29
+
30
+ export class CreateAPIKeyResponse extends jspb.Message {
31
+ getApikeyid(): string;
32
+ setApikeyid(value: string): void;
33
+
34
+ getApikey(): string;
35
+ setApikey(value: string): void;
36
+
37
+ getName(): string;
38
+ setName(value: string): void;
39
+
40
+ getCreatedat(): string;
41
+ setCreatedat(value: string): void;
42
+
43
+ getExpiresat(): string;
44
+ setExpiresat(value: string): void;
45
+
46
+ serializeBinary(): Uint8Array;
47
+ toObject(includeInstance?: boolean): CreateAPIKeyResponse.AsObject;
48
+ static toObject(includeInstance: boolean, msg: CreateAPIKeyResponse): CreateAPIKeyResponse.AsObject;
49
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
50
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
51
+ static serializeBinaryToWriter(message: CreateAPIKeyResponse, writer: jspb.BinaryWriter): void;
52
+ static deserializeBinary(bytes: Uint8Array): CreateAPIKeyResponse;
53
+ static deserializeBinaryFromReader(message: CreateAPIKeyResponse, reader: jspb.BinaryReader): CreateAPIKeyResponse;
54
+ }
55
+
56
+ export namespace CreateAPIKeyResponse {
57
+ export type AsObject = {
58
+ apikeyid: string,
59
+ apikey: string,
60
+ name: string,
61
+ createdat: string,
62
+ expiresat: string,
63
+ }
64
+ }
65
+
@@ -1,93 +1,478 @@
1
- // @generated by protoc-gen-es v1.10.1 with parameter "target=ts"
2
- // @generated from file auth/v1/auth.proto (package auth.v1, syntax proto3)
1
+ // source: auth/v1/auth.proto
2
+ /**
3
+ * @fileoverview
4
+ * @enhanceable
5
+ * @suppress {missingRequire} reports error on implicit type usages.
6
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
7
+ * field starts with 'MSG_' and isn't a translatable message.
8
+ * @public
9
+ */
10
+ // GENERATED CODE -- DO NOT EDIT!
3
11
  /* eslint-disable */
4
12
  // @ts-nocheck
5
- import { Message, proto3, protoInt64 } from "@bufbuild/protobuf";
6
- /**
7
- * @generated from message auth.v1.CreateAPIKeyRequest
8
- */
9
- export class CreateAPIKeyRequest extends Message {
10
- constructor(data) {
11
- super();
12
- /**
13
- * @generated from field: string name = 1;
14
- */
15
- this.name = "";
16
- /**
17
- * expiresIn is the expiration time in seconds from now
18
- *
19
- * @generated from field: int64 expiresIn = 2;
20
- */
21
- this.expiresIn = protoInt64.zero;
22
- proto3.util.initPartial(data, this);
23
- }
24
- static fromBinary(bytes, options) {
25
- return new CreateAPIKeyRequest().fromBinary(bytes, options);
26
- }
27
- static fromJson(jsonValue, options) {
28
- return new CreateAPIKeyRequest().fromJson(jsonValue, options);
29
- }
30
- static fromJsonString(jsonString, options) {
31
- return new CreateAPIKeyRequest().fromJsonString(jsonString, options);
32
- }
33
- static equals(a, b) {
34
- return proto3.util.equals(CreateAPIKeyRequest, a, b);
35
- }
13
+
14
+ var jspb = require('google-protobuf');
15
+ var goog = jspb;
16
+ var global = (function() {
17
+ if (this) { return this; }
18
+ if (typeof window !== 'undefined') { return window; }
19
+ if (typeof global !== 'undefined') { return global; }
20
+ if (typeof self !== 'undefined') { return self; }
21
+ return Function('return this')();
22
+ }.call(null));
23
+
24
+ goog.exportSymbol('proto.auth.v1.CreateAPIKeyRequest', null, global);
25
+ goog.exportSymbol('proto.auth.v1.CreateAPIKeyResponse', null, global);
26
+ /**
27
+ * Generated by JsPbCodeGenerator.
28
+ * @param {Array=} opt_data Optional initial data array, typically from a
29
+ * server response, or constructed directly in Javascript. The array is used
30
+ * in place and becomes part of the constructed object. It is not cloned.
31
+ * If no data is provided, the constructed object will be empty, but still
32
+ * valid.
33
+ * @extends {jspb.Message}
34
+ * @constructor
35
+ */
36
+ proto.auth.v1.CreateAPIKeyRequest = function(opt_data) {
37
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
38
+ };
39
+ goog.inherits(proto.auth.v1.CreateAPIKeyRequest, jspb.Message);
40
+ if (goog.DEBUG && !COMPILED) {
41
+ /**
42
+ * @public
43
+ * @override
44
+ */
45
+ proto.auth.v1.CreateAPIKeyRequest.displayName = 'proto.auth.v1.CreateAPIKeyRequest';
36
46
  }
37
- CreateAPIKeyRequest.runtime = proto3;
38
- CreateAPIKeyRequest.typeName = "auth.v1.CreateAPIKeyRequest";
39
- CreateAPIKeyRequest.fields = proto3.util.newFieldList(() => [
40
- { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
41
- { no: 2, name: "expiresIn", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
42
- ]);
43
- /**
44
- * @generated from message auth.v1.CreateAPIKeyResponse
45
- */
46
- export class CreateAPIKeyResponse extends Message {
47
- constructor(data) {
48
- super();
49
- /**
50
- * @generated from field: string apiKeyId = 1;
51
- */
52
- this.apiKeyId = "";
53
- /**
54
- * @generated from field: string apiKey = 2;
55
- */
56
- this.apiKey = "";
57
- /**
58
- * @generated from field: string name = 3;
59
- */
60
- this.name = "";
61
- /**
62
- * @generated from field: string createdAt = 4;
63
- */
64
- this.createdAt = "";
65
- /**
66
- * @generated from field: string expiresAt = 5;
67
- */
68
- this.expiresAt = "";
69
- proto3.util.initPartial(data, this);
70
- }
71
- static fromBinary(bytes, options) {
72
- return new CreateAPIKeyResponse().fromBinary(bytes, options);
47
+ /**
48
+ * Generated by JsPbCodeGenerator.
49
+ * @param {Array=} opt_data Optional initial data array, typically from a
50
+ * server response, or constructed directly in Javascript. The array is used
51
+ * in place and becomes part of the constructed object. It is not cloned.
52
+ * If no data is provided, the constructed object will be empty, but still
53
+ * valid.
54
+ * @extends {jspb.Message}
55
+ * @constructor
56
+ */
57
+ proto.auth.v1.CreateAPIKeyResponse = function(opt_data) {
58
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
59
+ };
60
+ goog.inherits(proto.auth.v1.CreateAPIKeyResponse, jspb.Message);
61
+ if (goog.DEBUG && !COMPILED) {
62
+ /**
63
+ * @public
64
+ * @override
65
+ */
66
+ proto.auth.v1.CreateAPIKeyResponse.displayName = 'proto.auth.v1.CreateAPIKeyResponse';
67
+ }
68
+
69
+
70
+
71
+ if (jspb.Message.GENERATE_TO_OBJECT) {
72
+ /**
73
+ * Creates an object representation of this proto.
74
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
75
+ * Optional fields that are not set will be set to undefined.
76
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
77
+ * For the list of reserved names please see:
78
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
79
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
80
+ * JSPB instance for transitional soy proto support:
81
+ * http://goto/soy-param-migration
82
+ * @return {!Object}
83
+ */
84
+ proto.auth.v1.CreateAPIKeyRequest.prototype.toObject = function(opt_includeInstance) {
85
+ return proto.auth.v1.CreateAPIKeyRequest.toObject(opt_includeInstance, this);
86
+ };
87
+
88
+
89
+ /**
90
+ * Static version of the {@see toObject} method.
91
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
92
+ * the JSPB instance for transitional soy proto support:
93
+ * http://goto/soy-param-migration
94
+ * @param {!proto.auth.v1.CreateAPIKeyRequest} msg The msg instance to transform.
95
+ * @return {!Object}
96
+ * @suppress {unusedLocalVariables} f is only used for nested messages
97
+ */
98
+ proto.auth.v1.CreateAPIKeyRequest.toObject = function(includeInstance, msg) {
99
+ var f, obj = {
100
+ name: jspb.Message.getFieldWithDefault(msg, 1, ""),
101
+ expiresin: jspb.Message.getFieldWithDefault(msg, 2, 0)
102
+ };
103
+
104
+ if (includeInstance) {
105
+ obj.$jspbMessageInstance = msg;
106
+ }
107
+ return obj;
108
+ };
109
+ }
110
+
111
+
112
+ /**
113
+ * Deserializes binary data (in protobuf wire format).
114
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
115
+ * @return {!proto.auth.v1.CreateAPIKeyRequest}
116
+ */
117
+ proto.auth.v1.CreateAPIKeyRequest.deserializeBinary = function(bytes) {
118
+ var reader = new jspb.BinaryReader(bytes);
119
+ var msg = new proto.auth.v1.CreateAPIKeyRequest;
120
+ return proto.auth.v1.CreateAPIKeyRequest.deserializeBinaryFromReader(msg, reader);
121
+ };
122
+
123
+
124
+ /**
125
+ * Deserializes binary data (in protobuf wire format) from the
126
+ * given reader into the given message object.
127
+ * @param {!proto.auth.v1.CreateAPIKeyRequest} msg The message object to deserialize into.
128
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
129
+ * @return {!proto.auth.v1.CreateAPIKeyRequest}
130
+ */
131
+ proto.auth.v1.CreateAPIKeyRequest.deserializeBinaryFromReader = function(msg, reader) {
132
+ while (reader.nextField()) {
133
+ if (reader.isEndGroup()) {
134
+ break;
73
135
  }
74
- static fromJson(jsonValue, options) {
75
- return new CreateAPIKeyResponse().fromJson(jsonValue, options);
136
+ var field = reader.getFieldNumber();
137
+ switch (field) {
138
+ case 1:
139
+ var value = /** @type {string} */ (reader.readString());
140
+ msg.setName(value);
141
+ break;
142
+ case 2:
143
+ var value = /** @type {number} */ (reader.readInt64());
144
+ msg.setExpiresin(value);
145
+ break;
146
+ default:
147
+ reader.skipField();
148
+ break;
76
149
  }
77
- static fromJsonString(jsonString, options) {
78
- return new CreateAPIKeyResponse().fromJsonString(jsonString, options);
150
+ }
151
+ return msg;
152
+ };
153
+
154
+
155
+ /**
156
+ * Serializes the message to binary data (in protobuf wire format).
157
+ * @return {!Uint8Array}
158
+ */
159
+ proto.auth.v1.CreateAPIKeyRequest.prototype.serializeBinary = function() {
160
+ var writer = new jspb.BinaryWriter();
161
+ proto.auth.v1.CreateAPIKeyRequest.serializeBinaryToWriter(this, writer);
162
+ return writer.getResultBuffer();
163
+ };
164
+
165
+
166
+ /**
167
+ * Serializes the given message to binary data (in protobuf wire
168
+ * format), writing to the given BinaryWriter.
169
+ * @param {!proto.auth.v1.CreateAPIKeyRequest} message
170
+ * @param {!jspb.BinaryWriter} writer
171
+ * @suppress {unusedLocalVariables} f is only used for nested messages
172
+ */
173
+ proto.auth.v1.CreateAPIKeyRequest.serializeBinaryToWriter = function(message, writer) {
174
+ var f = undefined;
175
+ f = message.getName();
176
+ if (f.length > 0) {
177
+ writer.writeString(
178
+ 1,
179
+ f
180
+ );
181
+ }
182
+ f = message.getExpiresin();
183
+ if (f !== 0) {
184
+ writer.writeInt64(
185
+ 2,
186
+ f
187
+ );
188
+ }
189
+ };
190
+
191
+
192
+ /**
193
+ * optional string name = 1;
194
+ * @return {string}
195
+ */
196
+ proto.auth.v1.CreateAPIKeyRequest.prototype.getName = function() {
197
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
198
+ };
199
+
200
+
201
+ /**
202
+ * @param {string} value
203
+ * @return {!proto.auth.v1.CreateAPIKeyRequest} returns this
204
+ */
205
+ proto.auth.v1.CreateAPIKeyRequest.prototype.setName = function(value) {
206
+ return jspb.Message.setProto3StringField(this, 1, value);
207
+ };
208
+
209
+
210
+ /**
211
+ * optional int64 expiresIn = 2;
212
+ * @return {number}
213
+ */
214
+ proto.auth.v1.CreateAPIKeyRequest.prototype.getExpiresin = function() {
215
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
216
+ };
217
+
218
+
219
+ /**
220
+ * @param {number} value
221
+ * @return {!proto.auth.v1.CreateAPIKeyRequest} returns this
222
+ */
223
+ proto.auth.v1.CreateAPIKeyRequest.prototype.setExpiresin = function(value) {
224
+ return jspb.Message.setProto3IntField(this, 2, value);
225
+ };
226
+
227
+
228
+
229
+
230
+
231
+ if (jspb.Message.GENERATE_TO_OBJECT) {
232
+ /**
233
+ * Creates an object representation of this proto.
234
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
235
+ * Optional fields that are not set will be set to undefined.
236
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
237
+ * For the list of reserved names please see:
238
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
239
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
240
+ * JSPB instance for transitional soy proto support:
241
+ * http://goto/soy-param-migration
242
+ * @return {!Object}
243
+ */
244
+ proto.auth.v1.CreateAPIKeyResponse.prototype.toObject = function(opt_includeInstance) {
245
+ return proto.auth.v1.CreateAPIKeyResponse.toObject(opt_includeInstance, this);
246
+ };
247
+
248
+
249
+ /**
250
+ * Static version of the {@see toObject} method.
251
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
252
+ * the JSPB instance for transitional soy proto support:
253
+ * http://goto/soy-param-migration
254
+ * @param {!proto.auth.v1.CreateAPIKeyResponse} msg The msg instance to transform.
255
+ * @return {!Object}
256
+ * @suppress {unusedLocalVariables} f is only used for nested messages
257
+ */
258
+ proto.auth.v1.CreateAPIKeyResponse.toObject = function(includeInstance, msg) {
259
+ var f, obj = {
260
+ apikeyid: jspb.Message.getFieldWithDefault(msg, 1, ""),
261
+ apikey: jspb.Message.getFieldWithDefault(msg, 2, ""),
262
+ name: jspb.Message.getFieldWithDefault(msg, 3, ""),
263
+ createdat: jspb.Message.getFieldWithDefault(msg, 4, ""),
264
+ expiresat: jspb.Message.getFieldWithDefault(msg, 5, "")
265
+ };
266
+
267
+ if (includeInstance) {
268
+ obj.$jspbMessageInstance = msg;
269
+ }
270
+ return obj;
271
+ };
272
+ }
273
+
274
+
275
+ /**
276
+ * Deserializes binary data (in protobuf wire format).
277
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
278
+ * @return {!proto.auth.v1.CreateAPIKeyResponse}
279
+ */
280
+ proto.auth.v1.CreateAPIKeyResponse.deserializeBinary = function(bytes) {
281
+ var reader = new jspb.BinaryReader(bytes);
282
+ var msg = new proto.auth.v1.CreateAPIKeyResponse;
283
+ return proto.auth.v1.CreateAPIKeyResponse.deserializeBinaryFromReader(msg, reader);
284
+ };
285
+
286
+
287
+ /**
288
+ * Deserializes binary data (in protobuf wire format) from the
289
+ * given reader into the given message object.
290
+ * @param {!proto.auth.v1.CreateAPIKeyResponse} msg The message object to deserialize into.
291
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
292
+ * @return {!proto.auth.v1.CreateAPIKeyResponse}
293
+ */
294
+ proto.auth.v1.CreateAPIKeyResponse.deserializeBinaryFromReader = function(msg, reader) {
295
+ while (reader.nextField()) {
296
+ if (reader.isEndGroup()) {
297
+ break;
79
298
  }
80
- static equals(a, b) {
81
- return proto3.util.equals(CreateAPIKeyResponse, a, b);
299
+ var field = reader.getFieldNumber();
300
+ switch (field) {
301
+ case 1:
302
+ var value = /** @type {string} */ (reader.readString());
303
+ msg.setApikeyid(value);
304
+ break;
305
+ case 2:
306
+ var value = /** @type {string} */ (reader.readString());
307
+ msg.setApikey(value);
308
+ break;
309
+ case 3:
310
+ var value = /** @type {string} */ (reader.readString());
311
+ msg.setName(value);
312
+ break;
313
+ case 4:
314
+ var value = /** @type {string} */ (reader.readString());
315
+ msg.setCreatedat(value);
316
+ break;
317
+ case 5:
318
+ var value = /** @type {string} */ (reader.readString());
319
+ msg.setExpiresat(value);
320
+ break;
321
+ default:
322
+ reader.skipField();
323
+ break;
82
324
  }
83
- }
84
- CreateAPIKeyResponse.runtime = proto3;
85
- CreateAPIKeyResponse.typeName = "auth.v1.CreateAPIKeyResponse";
86
- CreateAPIKeyResponse.fields = proto3.util.newFieldList(() => [
87
- { no: 1, name: "apiKeyId", kind: "scalar", T: 9 /* ScalarType.STRING */ },
88
- { no: 2, name: "apiKey", kind: "scalar", T: 9 /* ScalarType.STRING */ },
89
- { no: 3, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
90
- { no: 4, name: "createdAt", kind: "scalar", T: 9 /* ScalarType.STRING */ },
91
- { no: 5, name: "expiresAt", kind: "scalar", T: 9 /* ScalarType.STRING */ },
92
- ]);
93
- //# sourceMappingURL=auth_pb.js.map
325
+ }
326
+ return msg;
327
+ };
328
+
329
+
330
+ /**
331
+ * Serializes the message to binary data (in protobuf wire format).
332
+ * @return {!Uint8Array}
333
+ */
334
+ proto.auth.v1.CreateAPIKeyResponse.prototype.serializeBinary = function() {
335
+ var writer = new jspb.BinaryWriter();
336
+ proto.auth.v1.CreateAPIKeyResponse.serializeBinaryToWriter(this, writer);
337
+ return writer.getResultBuffer();
338
+ };
339
+
340
+
341
+ /**
342
+ * Serializes the given message to binary data (in protobuf wire
343
+ * format), writing to the given BinaryWriter.
344
+ * @param {!proto.auth.v1.CreateAPIKeyResponse} message
345
+ * @param {!jspb.BinaryWriter} writer
346
+ * @suppress {unusedLocalVariables} f is only used for nested messages
347
+ */
348
+ proto.auth.v1.CreateAPIKeyResponse.serializeBinaryToWriter = function(message, writer) {
349
+ var f = undefined;
350
+ f = message.getApikeyid();
351
+ if (f.length > 0) {
352
+ writer.writeString(
353
+ 1,
354
+ f
355
+ );
356
+ }
357
+ f = message.getApikey();
358
+ if (f.length > 0) {
359
+ writer.writeString(
360
+ 2,
361
+ f
362
+ );
363
+ }
364
+ f = message.getName();
365
+ if (f.length > 0) {
366
+ writer.writeString(
367
+ 3,
368
+ f
369
+ );
370
+ }
371
+ f = message.getCreatedat();
372
+ if (f.length > 0) {
373
+ writer.writeString(
374
+ 4,
375
+ f
376
+ );
377
+ }
378
+ f = message.getExpiresat();
379
+ if (f.length > 0) {
380
+ writer.writeString(
381
+ 5,
382
+ f
383
+ );
384
+ }
385
+ };
386
+
387
+
388
+ /**
389
+ * optional string apiKeyId = 1;
390
+ * @return {string}
391
+ */
392
+ proto.auth.v1.CreateAPIKeyResponse.prototype.getApikeyid = function() {
393
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
394
+ };
395
+
396
+
397
+ /**
398
+ * @param {string} value
399
+ * @return {!proto.auth.v1.CreateAPIKeyResponse} returns this
400
+ */
401
+ proto.auth.v1.CreateAPIKeyResponse.prototype.setApikeyid = function(value) {
402
+ return jspb.Message.setProto3StringField(this, 1, value);
403
+ };
404
+
405
+
406
+ /**
407
+ * optional string apiKey = 2;
408
+ * @return {string}
409
+ */
410
+ proto.auth.v1.CreateAPIKeyResponse.prototype.getApikey = function() {
411
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
412
+ };
413
+
414
+
415
+ /**
416
+ * @param {string} value
417
+ * @return {!proto.auth.v1.CreateAPIKeyResponse} returns this
418
+ */
419
+ proto.auth.v1.CreateAPIKeyResponse.prototype.setApikey = function(value) {
420
+ return jspb.Message.setProto3StringField(this, 2, value);
421
+ };
422
+
423
+
424
+ /**
425
+ * optional string name = 3;
426
+ * @return {string}
427
+ */
428
+ proto.auth.v1.CreateAPIKeyResponse.prototype.getName = function() {
429
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
430
+ };
431
+
432
+
433
+ /**
434
+ * @param {string} value
435
+ * @return {!proto.auth.v1.CreateAPIKeyResponse} returns this
436
+ */
437
+ proto.auth.v1.CreateAPIKeyResponse.prototype.setName = function(value) {
438
+ return jspb.Message.setProto3StringField(this, 3, value);
439
+ };
440
+
441
+
442
+ /**
443
+ * optional string createdAt = 4;
444
+ * @return {string}
445
+ */
446
+ proto.auth.v1.CreateAPIKeyResponse.prototype.getCreatedat = function() {
447
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
448
+ };
449
+
450
+
451
+ /**
452
+ * @param {string} value
453
+ * @return {!proto.auth.v1.CreateAPIKeyResponse} returns this
454
+ */
455
+ proto.auth.v1.CreateAPIKeyResponse.prototype.setCreatedat = function(value) {
456
+ return jspb.Message.setProto3StringField(this, 4, value);
457
+ };
458
+
459
+
460
+ /**
461
+ * optional string expiresAt = 5;
462
+ * @return {string}
463
+ */
464
+ proto.auth.v1.CreateAPIKeyResponse.prototype.getExpiresat = function() {
465
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
466
+ };
467
+
468
+
469
+ /**
470
+ * @param {string} value
471
+ * @return {!proto.auth.v1.CreateAPIKeyResponse} returns this
472
+ */
473
+ proto.auth.v1.CreateAPIKeyResponse.prototype.setExpiresat = function(value) {
474
+ return jspb.Message.setProto3StringField(this, 5, value);
475
+ };
476
+
477
+
478
+ goog.object.extend(exports, proto.auth.v1);