@kenji71089/evaluation 0.0.1

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 (209) hide show
  1. package/.release-please-manifest.json +3 -0
  2. package/README.md +9 -0
  3. package/eslint.config.mjs +27 -0
  4. package/lib/clauseEvaluator.d.ts +22 -0
  5. package/lib/clauseEvaluator.js +299 -0
  6. package/lib/clauseEvaluator.mjs +214 -0
  7. package/lib/dependencyEvaluator.d.ts +6 -0
  8. package/lib/dependencyEvaluator.js +46 -0
  9. package/lib/dependencyEvaluator.mjs +19 -0
  10. package/lib/errors.d.ts +9 -0
  11. package/lib/errors.js +15 -0
  12. package/lib/errors.mjs +12 -0
  13. package/lib/evaluation.d.ts +25 -0
  14. package/lib/evaluation.js +503 -0
  15. package/lib/evaluation.mjs +328 -0
  16. package/lib/google/api/annotations_pb.d.ts +8 -0
  17. package/lib/google/api/annotations_pb.js +40 -0
  18. package/lib/google/api/annotations_pb.mjs +54 -0
  19. package/lib/google/api/annotations_pb_service.d.ts +3 -0
  20. package/lib/google/api/annotations_pb_service.js +3 -0
  21. package/lib/google/api/annotations_pb_service.mjs +3 -0
  22. package/lib/google/api/http_pb.d.ts +132 -0
  23. package/lib/google/api/http_pb.js +860 -0
  24. package/lib/google/api/http_pb.mjs +982 -0
  25. package/lib/google/api/http_pb_service.d.ts +3 -0
  26. package/lib/google/api/http_pb_service.js +3 -0
  27. package/lib/google/api/http_pb_service.mjs +3 -0
  28. package/lib/google/rpc/code_pb.d.ts +26 -0
  29. package/lib/google/rpc/code_pb.js +44 -0
  30. package/lib/google/rpc/code_pb.mjs +48 -0
  31. package/lib/google/rpc/code_pb_service.d.ts +3 -0
  32. package/lib/google/rpc/code_pb_service.js +3 -0
  33. package/lib/google/rpc/code_pb_service.mjs +3 -0
  34. package/lib/google/rpc/error_details_pb.d.ts +322 -0
  35. package/lib/google/rpc/error_details_pb.js +2220 -0
  36. package/lib/google/rpc/error_details_pb.mjs +2499 -0
  37. package/lib/google/rpc/error_details_pb_service.d.ts +3 -0
  38. package/lib/google/rpc/error_details_pb_service.js +3 -0
  39. package/lib/google/rpc/error_details_pb_service.mjs +3 -0
  40. package/lib/google/rpc/status_pb.d.ts +36 -0
  41. package/lib/google/rpc/status_pb.js +235 -0
  42. package/lib/google/rpc/status_pb.mjs +268 -0
  43. package/lib/google/rpc/status_pb_service.d.ts +3 -0
  44. package/lib/google/rpc/status_pb_service.js +3 -0
  45. package/lib/google/rpc/status_pb_service.mjs +3 -0
  46. package/lib/index.d.ts +20 -0
  47. package/lib/index.js +199 -0
  48. package/lib/index.mjs +46 -0
  49. package/lib/modelFactory.d.ts +64 -0
  50. package/lib/modelFactory.js +206 -0
  51. package/lib/modelFactory.mjs +176 -0
  52. package/lib/proto/event/client/event_pb.d.ts +761 -0
  53. package/lib/proto/event/client/event_pb.js +5195 -0
  54. package/lib/proto/event/client/event_pb.mjs +5865 -0
  55. package/lib/proto/event/client/event_pb_service.d.ts +3 -0
  56. package/lib/proto/event/client/event_pb_service.js +3 -0
  57. package/lib/proto/event/client/event_pb_service.mjs +3 -0
  58. package/lib/proto/event/domain/event_pb.d.ts +4518 -0
  59. package/lib/proto/event/domain/event_pb.js +10834 -0
  60. package/lib/proto/event/domain/event_pb.mjs +33315 -0
  61. package/lib/proto/event/domain/event_pb_service.d.ts +3 -0
  62. package/lib/proto/event/domain/event_pb_service.js +3 -0
  63. package/lib/proto/event/domain/event_pb_service.mjs +3 -0
  64. package/lib/proto/event/domain/localized_message_pb.d.ts +29 -0
  65. package/lib/proto/event/domain/localized_message_pb.js +183 -0
  66. package/lib/proto/event/domain/localized_message_pb.mjs +206 -0
  67. package/lib/proto/event/domain/localized_message_pb_service.d.ts +3 -0
  68. package/lib/proto/event/domain/localized_message_pb_service.js +3 -0
  69. package/lib/proto/event/domain/localized_message_pb_service.mjs +3 -0
  70. package/lib/proto/event/service/feature_pb.d.ts +44 -0
  71. package/lib/proto/event/service/feature_pb.js +277 -0
  72. package/lib/proto/event/service/feature_pb.mjs +319 -0
  73. package/lib/proto/event/service/feature_pb_service.d.ts +3 -0
  74. package/lib/proto/event/service/feature_pb_service.js +3 -0
  75. package/lib/proto/event/service/feature_pb_service.mjs +3 -0
  76. package/lib/proto/event/service/segment_pb.d.ts +51 -0
  77. package/lib/proto/event/service/segment_pb.js +324 -0
  78. package/lib/proto/event/service/segment_pb.mjs +375 -0
  79. package/lib/proto/event/service/segment_pb_service.d.ts +3 -0
  80. package/lib/proto/event/service/segment_pb_service.js +3 -0
  81. package/lib/proto/event/service/segment_pb_service.mjs +3 -0
  82. package/lib/proto/event/service/user_pb.d.ts +49 -0
  83. package/lib/proto/event/service/user_pb.js +315 -0
  84. package/lib/proto/event/service/user_pb.mjs +362 -0
  85. package/lib/proto/event/service/user_pb_service.d.ts +3 -0
  86. package/lib/proto/event/service/user_pb_service.js +3 -0
  87. package/lib/proto/event/service/user_pb_service.mjs +3 -0
  88. package/lib/proto/feature/clause_pb.d.ts +57 -0
  89. package/lib/proto/feature/clause_pb.js +277 -0
  90. package/lib/proto/feature/clause_pb.mjs +312 -0
  91. package/lib/proto/feature/clause_pb_service.d.ts +3 -0
  92. package/lib/proto/feature/clause_pb_service.js +3 -0
  93. package/lib/proto/feature/clause_pb_service.mjs +3 -0
  94. package/lib/proto/feature/command_pb.d.ts +1213 -0
  95. package/lib/proto/feature/command_pb.js +8260 -0
  96. package/lib/proto/feature/command_pb.mjs +9275 -0
  97. package/lib/proto/feature/command_pb_service.d.ts +3 -0
  98. package/lib/proto/feature/command_pb_service.js +3 -0
  99. package/lib/proto/feature/command_pb_service.mjs +3 -0
  100. package/lib/proto/feature/evaluation_pb.d.ts +111 -0
  101. package/lib/proto/feature/evaluation_pb.js +685 -0
  102. package/lib/proto/feature/evaluation_pb.mjs +793 -0
  103. package/lib/proto/feature/evaluation_pb_service.d.ts +3 -0
  104. package/lib/proto/feature/evaluation_pb_service.js +3 -0
  105. package/lib/proto/feature/evaluation_pb_service.mjs +3 -0
  106. package/lib/proto/feature/feature_last_used_info_pb.d.ts +45 -0
  107. package/lib/proto/feature/feature_last_used_info_pb.js +283 -0
  108. package/lib/proto/feature/feature_last_used_info_pb.mjs +326 -0
  109. package/lib/proto/feature/feature_last_used_info_pb_service.d.ts +3 -0
  110. package/lib/proto/feature/feature_last_used_info_pb_service.js +3 -0
  111. package/lib/proto/feature/feature_last_used_info_pb_service.mjs +3 -0
  112. package/lib/proto/feature/feature_pb.d.ts +192 -0
  113. package/lib/proto/feature/feature_pb.js +1210 -0
  114. package/lib/proto/feature/feature_pb.mjs +1413 -0
  115. package/lib/proto/feature/feature_pb_service.d.ts +3 -0
  116. package/lib/proto/feature/feature_pb_service.js +3 -0
  117. package/lib/proto/feature/feature_pb_service.mjs +3 -0
  118. package/lib/proto/feature/flag_trigger_pb.d.ts +84 -0
  119. package/lib/proto/feature/flag_trigger_pb.js +452 -0
  120. package/lib/proto/feature/flag_trigger_pb.mjs +525 -0
  121. package/lib/proto/feature/flag_trigger_pb_service.d.ts +3 -0
  122. package/lib/proto/feature/flag_trigger_pb_service.js +3 -0
  123. package/lib/proto/feature/flag_trigger_pb_service.mjs +3 -0
  124. package/lib/proto/feature/prerequisite_pb.d.ts +29 -0
  125. package/lib/proto/feature/prerequisite_pb.js +183 -0
  126. package/lib/proto/feature/prerequisite_pb.mjs +206 -0
  127. package/lib/proto/feature/prerequisite_pb_service.d.ts +3 -0
  128. package/lib/proto/feature/prerequisite_pb_service.js +3 -0
  129. package/lib/proto/feature/prerequisite_pb_service.mjs +3 -0
  130. package/lib/proto/feature/reason_pb.d.ts +40 -0
  131. package/lib/proto/feature/reason_pb.js +196 -0
  132. package/lib/proto/feature/reason_pb.mjs +219 -0
  133. package/lib/proto/feature/reason_pb_service.d.ts +3 -0
  134. package/lib/proto/feature/reason_pb_service.js +3 -0
  135. package/lib/proto/feature/reason_pb_service.mjs +3 -0
  136. package/lib/proto/feature/rule_pb.d.ts +39 -0
  137. package/lib/proto/feature/rule_pb.js +254 -0
  138. package/lib/proto/feature/rule_pb.mjs +291 -0
  139. package/lib/proto/feature/rule_pb_service.d.ts +3 -0
  140. package/lib/proto/feature/rule_pb_service.js +3 -0
  141. package/lib/proto/feature/rule_pb_service.mjs +3 -0
  142. package/lib/proto/feature/segment_pb.d.ts +161 -0
  143. package/lib/proto/feature/segment_pb.js +974 -0
  144. package/lib/proto/feature/segment_pb.mjs +1127 -0
  145. package/lib/proto/feature/segment_pb_service.d.ts +3 -0
  146. package/lib/proto/feature/segment_pb_service.js +3 -0
  147. package/lib/proto/feature/segment_pb_service.mjs +3 -0
  148. package/lib/proto/feature/service_pb.d.ts +2158 -0
  149. package/lib/proto/feature/service_pb.js +5363 -0
  150. package/lib/proto/feature/service_pb.mjs +16348 -0
  151. package/lib/proto/feature/service_pb_service.d.ts +747 -0
  152. package/lib/proto/feature/service_pb_service.js +1424 -0
  153. package/lib/proto/feature/service_pb_service.mjs +1501 -0
  154. package/lib/proto/feature/strategy_pb.d.ts +110 -0
  155. package/lib/proto/feature/strategy_pb.js +712 -0
  156. package/lib/proto/feature/strategy_pb.mjs +803 -0
  157. package/lib/proto/feature/strategy_pb_service.d.ts +3 -0
  158. package/lib/proto/feature/strategy_pb_service.js +3 -0
  159. package/lib/proto/feature/strategy_pb_service.mjs +3 -0
  160. package/lib/proto/feature/target_pb.d.ts +31 -0
  161. package/lib/proto/feature/target_pb.js +207 -0
  162. package/lib/proto/feature/target_pb.mjs +232 -0
  163. package/lib/proto/feature/target_pb_service.d.ts +3 -0
  164. package/lib/proto/feature/target_pb_service.js +3 -0
  165. package/lib/proto/feature/target_pb_service.mjs +3 -0
  166. package/lib/proto/feature/variation_pb.d.ts +37 -0
  167. package/lib/proto/feature/variation_pb.js +233 -0
  168. package/lib/proto/feature/variation_pb.mjs +266 -0
  169. package/lib/proto/feature/variation_pb_service.d.ts +3 -0
  170. package/lib/proto/feature/variation_pb_service.js +3 -0
  171. package/lib/proto/feature/variation_pb_service.mjs +3 -0
  172. package/lib/proto/gateway/service_pb.d.ts +772 -0
  173. package/lib/proto/gateway/service_pb.js +5249 -0
  174. package/lib/proto/gateway/service_pb.mjs +6001 -0
  175. package/lib/proto/gateway/service_pb_service.d.ts +253 -0
  176. package/lib/proto/gateway/service_pb_service.js +436 -0
  177. package/lib/proto/gateway/service_pb_service.mjs +461 -0
  178. package/lib/proto/user/user_pb.d.ts +58 -0
  179. package/lib/proto/user/user_pb.js +410 -0
  180. package/lib/proto/user/user_pb.mjs +460 -0
  181. package/lib/proto/user/user_pb_service.d.ts +3 -0
  182. package/lib/proto/user/user_pb_service.js +3 -0
  183. package/lib/proto/user/user_pb_service.mjs +3 -0
  184. package/lib/protoc-gen-openapiv2/options/annotations_pb.d.ts +16 -0
  185. package/lib/protoc-gen-openapiv2/options/annotations_pb.js +100 -0
  186. package/lib/protoc-gen-openapiv2/options/annotations_pb.mjs +158 -0
  187. package/lib/protoc-gen-openapiv2/options/annotations_pb_service.d.ts +3 -0
  188. package/lib/protoc-gen-openapiv2/options/annotations_pb_service.js +3 -0
  189. package/lib/protoc-gen-openapiv2/options/annotations_pb_service.mjs +3 -0
  190. package/lib/protoc-gen-openapiv2/options/openapiv2_pb.d.ts +834 -0
  191. package/lib/protoc-gen-openapiv2/options/openapiv2_pb.js +5456 -0
  192. package/lib/protoc-gen-openapiv2/options/openapiv2_pb.mjs +6256 -0
  193. package/lib/protoc-gen-openapiv2/options/openapiv2_pb_service.d.ts +3 -0
  194. package/lib/protoc-gen-openapiv2/options/openapiv2_pb_service.js +3 -0
  195. package/lib/protoc-gen-openapiv2/options/openapiv2_pb_service.mjs +3 -0
  196. package/lib/ruleEvaluator.d.ts +13 -0
  197. package/lib/ruleEvaluator.js +80 -0
  198. package/lib/ruleEvaluator.mjs +41 -0
  199. package/lib/segmentEvaluator.d.ts +7 -0
  200. package/lib/segmentEvaluator.js +74 -0
  201. package/lib/segmentEvaluator.mjs +34 -0
  202. package/lib/strategyEvaluator.d.ts +10 -0
  203. package/lib/strategyEvaluator.js +135 -0
  204. package/lib/strategyEvaluator.mjs +83 -0
  205. package/lib/userEvaluation.d.ts +8 -0
  206. package/lib/userEvaluation.js +70 -0
  207. package/lib/userEvaluation.mjs +60 -0
  208. package/package.json +46 -0
  209. package/release-please-config.json +22 -0
@@ -0,0 +1,3 @@
1
+ // package: google.rpc
2
+ // file: google/rpc/error_details.proto
3
+
@@ -0,0 +1,3 @@
1
+ // package: google.rpc
2
+ // file: google/rpc/error_details.proto
3
+ "use strict";
@@ -0,0 +1,3 @@
1
+ // package: google.rpc
2
+ // file: google/rpc/error_details.proto
3
+
@@ -0,0 +1,36 @@
1
+ // package: google.rpc
2
+ // file: google/rpc/status.proto
3
+
4
+ import * as jspb from 'google-protobuf';
5
+ import * as google_protobuf_any_pb from 'google-protobuf/google/protobuf/any_pb';
6
+
7
+ export class Status extends jspb.Message {
8
+ getCode(): number;
9
+ setCode(value: number): void;
10
+
11
+ getMessage(): string;
12
+ setMessage(value: string): void;
13
+
14
+ clearDetailsList(): void;
15
+ getDetailsList(): Array<google_protobuf_any_pb.Any>;
16
+ setDetailsList(value: Array<google_protobuf_any_pb.Any>): void;
17
+ addDetails(value?: google_protobuf_any_pb.Any, index?: number): google_protobuf_any_pb.Any;
18
+
19
+ serializeBinary(): Uint8Array;
20
+ toObject(includeInstance?: boolean): Status.AsObject;
21
+ static toObject(includeInstance: boolean, msg: Status): Status.AsObject;
22
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
23
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
24
+ static serializeBinaryToWriter(message: Status, writer: jspb.BinaryWriter): void;
25
+ static deserializeBinary(bytes: Uint8Array): Status;
26
+ static deserializeBinaryFromReader(message: Status, reader: jspb.BinaryReader): Status;
27
+ }
28
+
29
+ export namespace Status {
30
+ export type AsObject = {
31
+ code: number,
32
+ message: string,
33
+ detailsList: Array<google_protobuf_any_pb.Any.AsObject>,
34
+ }
35
+ }
36
+
@@ -0,0 +1,235 @@
1
+ "use strict";
2
+
3
+ // source: google/rpc/status.proto
4
+ /**
5
+ * @fileoverview
6
+ * @enhanceable
7
+ * @suppress {missingRequire} reports error on implicit type usages.
8
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
9
+ * field starts with 'MSG_' and isn't a translatable message.
10
+ * @public
11
+ */
12
+ // GENERATED CODE -- DO NOT EDIT!
13
+
14
+ // @ts-nocheck
15
+
16
+ var jspb = require('google-protobuf');
17
+ var goog = jspb;
18
+ var global = typeof globalThis !== 'undefined' && globalThis || typeof window !== 'undefined' && window || typeof global !== 'undefined' && global || typeof self !== 'undefined' && self || function () {
19
+ return this;
20
+ }.call(null) || Function('return this')();
21
+ var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js');
22
+ goog.object.extend(proto, google_protobuf_any_pb);
23
+ goog.exportSymbol('proto.google.rpc.Status', null, global);
24
+ /**
25
+ * Generated by JsPbCodeGenerator.
26
+ * @param {Array=} opt_data Optional initial data array, typically from a
27
+ * server response, or constructed directly in Javascript. The array is used
28
+ * in place and becomes part of the constructed object. It is not cloned.
29
+ * If no data is provided, the constructed object will be empty, but still
30
+ * valid.
31
+ * @extends {jspb.Message}
32
+ * @constructor
33
+ */
34
+ proto.google.rpc.Status = function (opt_data) {
35
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.google.rpc.Status.repeatedFields_, null);
36
+ };
37
+ goog.inherits(proto.google.rpc.Status, jspb.Message);
38
+ if (goog.DEBUG && !COMPILED) {
39
+ /**
40
+ * @public
41
+ * @override
42
+ */
43
+ proto.google.rpc.Status.displayName = 'proto.google.rpc.Status';
44
+ }
45
+
46
+ /**
47
+ * List of repeated fields within this message type.
48
+ * @private {!Array<number>}
49
+ * @const
50
+ */
51
+ proto.google.rpc.Status.repeatedFields_ = [3];
52
+ if (jspb.Message.GENERATE_TO_OBJECT) {
53
+ /**
54
+ * Creates an object representation of this proto.
55
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
56
+ * Optional fields that are not set will be set to undefined.
57
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
58
+ * For the list of reserved names please see:
59
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
60
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
61
+ * JSPB instance for transitional soy proto support:
62
+ * http://goto/soy-param-migration
63
+ * @return {!Object}
64
+ */
65
+ proto.google.rpc.Status.prototype.toObject = function (opt_includeInstance) {
66
+ return proto.google.rpc.Status.toObject(opt_includeInstance, this);
67
+ };
68
+
69
+ /**
70
+ * Static version of the {@see toObject} method.
71
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
72
+ * the JSPB instance for transitional soy proto support:
73
+ * http://goto/soy-param-migration
74
+ * @param {!proto.google.rpc.Status} msg The msg instance to transform.
75
+ * @return {!Object}
76
+ * @suppress {unusedLocalVariables} f is only used for nested messages
77
+ */
78
+ proto.google.rpc.Status.toObject = function (includeInstance, msg) {
79
+ var f,
80
+ obj = {
81
+ code: jspb.Message.getFieldWithDefault(msg, 1, 0),
82
+ message: jspb.Message.getFieldWithDefault(msg, 2, ""),
83
+ detailsList: jspb.Message.toObjectList(msg.getDetailsList(), google_protobuf_any_pb.Any.toObject, includeInstance)
84
+ };
85
+ if (includeInstance) {
86
+ obj.$jspbMessageInstance = msg;
87
+ }
88
+ return obj;
89
+ };
90
+ }
91
+
92
+ /**
93
+ * Deserializes binary data (in protobuf wire format).
94
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
95
+ * @return {!proto.google.rpc.Status}
96
+ */
97
+ proto.google.rpc.Status.deserializeBinary = function (bytes) {
98
+ var reader = new jspb.BinaryReader(bytes);
99
+ var msg = new proto.google.rpc.Status();
100
+ return proto.google.rpc.Status.deserializeBinaryFromReader(msg, reader);
101
+ };
102
+
103
+ /**
104
+ * Deserializes binary data (in protobuf wire format) from the
105
+ * given reader into the given message object.
106
+ * @param {!proto.google.rpc.Status} msg The message object to deserialize into.
107
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
108
+ * @return {!proto.google.rpc.Status}
109
+ */
110
+ proto.google.rpc.Status.deserializeBinaryFromReader = function (msg, reader) {
111
+ while (reader.nextField()) {
112
+ if (reader.isEndGroup()) {
113
+ break;
114
+ }
115
+ var field = reader.getFieldNumber();
116
+ switch (field) {
117
+ case 1:
118
+ var value = /** @type {number} */reader.readInt32();
119
+ msg.setCode(value);
120
+ break;
121
+ case 2:
122
+ var value = /** @type {string} */reader.readString();
123
+ msg.setMessage(value);
124
+ break;
125
+ case 3:
126
+ var value = new google_protobuf_any_pb.Any();
127
+ reader.readMessage(value, google_protobuf_any_pb.Any.deserializeBinaryFromReader);
128
+ msg.addDetails(value);
129
+ break;
130
+ default:
131
+ reader.skipField();
132
+ break;
133
+ }
134
+ }
135
+ return msg;
136
+ };
137
+
138
+ /**
139
+ * Serializes the message to binary data (in protobuf wire format).
140
+ * @return {!Uint8Array}
141
+ */
142
+ proto.google.rpc.Status.prototype.serializeBinary = function () {
143
+ var writer = new jspb.BinaryWriter();
144
+ proto.google.rpc.Status.serializeBinaryToWriter(this, writer);
145
+ return writer.getResultBuffer();
146
+ };
147
+
148
+ /**
149
+ * Serializes the given message to binary data (in protobuf wire
150
+ * format), writing to the given BinaryWriter.
151
+ * @param {!proto.google.rpc.Status} message
152
+ * @param {!jspb.BinaryWriter} writer
153
+ * @suppress {unusedLocalVariables} f is only used for nested messages
154
+ */
155
+ proto.google.rpc.Status.serializeBinaryToWriter = function (message, writer) {
156
+ var f = undefined;
157
+ f = message.getCode();
158
+ if (f !== 0) {
159
+ writer.writeInt32(1, f);
160
+ }
161
+ f = message.getMessage();
162
+ if (f.length > 0) {
163
+ writer.writeString(2, f);
164
+ }
165
+ f = message.getDetailsList();
166
+ if (f.length > 0) {
167
+ writer.writeRepeatedMessage(3, f, google_protobuf_any_pb.Any.serializeBinaryToWriter);
168
+ }
169
+ };
170
+
171
+ /**
172
+ * optional int32 code = 1;
173
+ * @return {number}
174
+ */
175
+ proto.google.rpc.Status.prototype.getCode = function () {
176
+ return /** @type {number} */jspb.Message.getFieldWithDefault(this, 1, 0);
177
+ };
178
+
179
+ /**
180
+ * @param {number} value
181
+ * @return {!proto.google.rpc.Status} returns this
182
+ */
183
+ proto.google.rpc.Status.prototype.setCode = function (value) {
184
+ return jspb.Message.setProto3IntField(this, 1, value);
185
+ };
186
+
187
+ /**
188
+ * optional string message = 2;
189
+ * @return {string}
190
+ */
191
+ proto.google.rpc.Status.prototype.getMessage = function () {
192
+ return /** @type {string} */jspb.Message.getFieldWithDefault(this, 2, "");
193
+ };
194
+
195
+ /**
196
+ * @param {string} value
197
+ * @return {!proto.google.rpc.Status} returns this
198
+ */
199
+ proto.google.rpc.Status.prototype.setMessage = function (value) {
200
+ return jspb.Message.setProto3StringField(this, 2, value);
201
+ };
202
+
203
+ /**
204
+ * repeated google.protobuf.Any details = 3;
205
+ * @return {!Array<!proto.google.protobuf.Any>}
206
+ */
207
+ proto.google.rpc.Status.prototype.getDetailsList = function () {
208
+ return /** @type{!Array<!proto.google.protobuf.Any>} */jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 3);
209
+ };
210
+
211
+ /**
212
+ * @param {!Array<!proto.google.protobuf.Any>} value
213
+ * @return {!proto.google.rpc.Status} returns this
214
+ */
215
+ proto.google.rpc.Status.prototype.setDetailsList = function (value) {
216
+ return jspb.Message.setRepeatedWrapperField(this, 3, value);
217
+ };
218
+
219
+ /**
220
+ * @param {!proto.google.protobuf.Any=} opt_value
221
+ * @param {number=} opt_index
222
+ * @return {!proto.google.protobuf.Any}
223
+ */
224
+ proto.google.rpc.Status.prototype.addDetails = function (opt_value, opt_index) {
225
+ return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.google.protobuf.Any, opt_index);
226
+ };
227
+
228
+ /**
229
+ * Clears the list making it empty but non-null.
230
+ * @return {!proto.google.rpc.Status} returns this
231
+ */
232
+ proto.google.rpc.Status.prototype.clearDetailsList = function () {
233
+ return this.setDetailsList([]);
234
+ };
235
+ goog.object.extend(exports, proto.google.rpc);
@@ -0,0 +1,268 @@
1
+ // source: google/rpc/status.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!
11
+
12
+ // @ts-nocheck
13
+
14
+ var jspb = require('google-protobuf');
15
+ var goog = jspb;
16
+ var global =
17
+ (typeof globalThis !== 'undefined' && globalThis) ||
18
+ (typeof window !== 'undefined' && window) ||
19
+ (typeof global !== 'undefined' && global) ||
20
+ (typeof self !== 'undefined' && self) ||
21
+ (function () { return this; }).call(null) ||
22
+ Function('return this')();
23
+
24
+ var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js');
25
+ goog.object.extend(proto, google_protobuf_any_pb);
26
+ goog.exportSymbol('proto.google.rpc.Status', null, global);
27
+ /**
28
+ * Generated by JsPbCodeGenerator.
29
+ * @param {Array=} opt_data Optional initial data array, typically from a
30
+ * server response, or constructed directly in Javascript. The array is used
31
+ * in place and becomes part of the constructed object. It is not cloned.
32
+ * If no data is provided, the constructed object will be empty, but still
33
+ * valid.
34
+ * @extends {jspb.Message}
35
+ * @constructor
36
+ */
37
+ proto.google.rpc.Status = function(opt_data) {
38
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.google.rpc.Status.repeatedFields_, null);
39
+ };
40
+ goog.inherits(proto.google.rpc.Status, jspb.Message);
41
+ if (goog.DEBUG && !COMPILED) {
42
+ /**
43
+ * @public
44
+ * @override
45
+ */
46
+ proto.google.rpc.Status.displayName = 'proto.google.rpc.Status';
47
+ }
48
+
49
+ /**
50
+ * List of repeated fields within this message type.
51
+ * @private {!Array<number>}
52
+ * @const
53
+ */
54
+ proto.google.rpc.Status.repeatedFields_ = [3];
55
+
56
+
57
+
58
+ if (jspb.Message.GENERATE_TO_OBJECT) {
59
+ /**
60
+ * Creates an object representation of this proto.
61
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
62
+ * Optional fields that are not set will be set to undefined.
63
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
64
+ * For the list of reserved names please see:
65
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
66
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
67
+ * JSPB instance for transitional soy proto support:
68
+ * http://goto/soy-param-migration
69
+ * @return {!Object}
70
+ */
71
+ proto.google.rpc.Status.prototype.toObject = function(opt_includeInstance) {
72
+ return proto.google.rpc.Status.toObject(opt_includeInstance, this);
73
+ };
74
+
75
+
76
+ /**
77
+ * Static version of the {@see toObject} method.
78
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
79
+ * the JSPB instance for transitional soy proto support:
80
+ * http://goto/soy-param-migration
81
+ * @param {!proto.google.rpc.Status} msg The msg instance to transform.
82
+ * @return {!Object}
83
+ * @suppress {unusedLocalVariables} f is only used for nested messages
84
+ */
85
+ proto.google.rpc.Status.toObject = function(includeInstance, msg) {
86
+ var f, obj = {
87
+ code: jspb.Message.getFieldWithDefault(msg, 1, 0),
88
+ message: jspb.Message.getFieldWithDefault(msg, 2, ""),
89
+ detailsList: jspb.Message.toObjectList(msg.getDetailsList(),
90
+ google_protobuf_any_pb.Any.toObject, includeInstance)
91
+ };
92
+
93
+ if (includeInstance) {
94
+ obj.$jspbMessageInstance = msg;
95
+ }
96
+ return obj;
97
+ };
98
+ }
99
+
100
+
101
+ /**
102
+ * Deserializes binary data (in protobuf wire format).
103
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
104
+ * @return {!proto.google.rpc.Status}
105
+ */
106
+ proto.google.rpc.Status.deserializeBinary = function(bytes) {
107
+ var reader = new jspb.BinaryReader(bytes);
108
+ var msg = new proto.google.rpc.Status;
109
+ return proto.google.rpc.Status.deserializeBinaryFromReader(msg, reader);
110
+ };
111
+
112
+
113
+ /**
114
+ * Deserializes binary data (in protobuf wire format) from the
115
+ * given reader into the given message object.
116
+ * @param {!proto.google.rpc.Status} msg The message object to deserialize into.
117
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
118
+ * @return {!proto.google.rpc.Status}
119
+ */
120
+ proto.google.rpc.Status.deserializeBinaryFromReader = function(msg, reader) {
121
+ while (reader.nextField()) {
122
+ if (reader.isEndGroup()) {
123
+ break;
124
+ }
125
+ var field = reader.getFieldNumber();
126
+ switch (field) {
127
+ case 1:
128
+ var value = /** @type {number} */ (reader.readInt32());
129
+ msg.setCode(value);
130
+ break;
131
+ case 2:
132
+ var value = /** @type {string} */ (reader.readString());
133
+ msg.setMessage(value);
134
+ break;
135
+ case 3:
136
+ var value = new google_protobuf_any_pb.Any;
137
+ reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader);
138
+ msg.addDetails(value);
139
+ break;
140
+ default:
141
+ reader.skipField();
142
+ break;
143
+ }
144
+ }
145
+ return msg;
146
+ };
147
+
148
+
149
+ /**
150
+ * Serializes the message to binary data (in protobuf wire format).
151
+ * @return {!Uint8Array}
152
+ */
153
+ proto.google.rpc.Status.prototype.serializeBinary = function() {
154
+ var writer = new jspb.BinaryWriter();
155
+ proto.google.rpc.Status.serializeBinaryToWriter(this, writer);
156
+ return writer.getResultBuffer();
157
+ };
158
+
159
+
160
+ /**
161
+ * Serializes the given message to binary data (in protobuf wire
162
+ * format), writing to the given BinaryWriter.
163
+ * @param {!proto.google.rpc.Status} message
164
+ * @param {!jspb.BinaryWriter} writer
165
+ * @suppress {unusedLocalVariables} f is only used for nested messages
166
+ */
167
+ proto.google.rpc.Status.serializeBinaryToWriter = function(message, writer) {
168
+ var f = undefined;
169
+ f = message.getCode();
170
+ if (f !== 0) {
171
+ writer.writeInt32(
172
+ 1,
173
+ f
174
+ );
175
+ }
176
+ f = message.getMessage();
177
+ if (f.length > 0) {
178
+ writer.writeString(
179
+ 2,
180
+ f
181
+ );
182
+ }
183
+ f = message.getDetailsList();
184
+ if (f.length > 0) {
185
+ writer.writeRepeatedMessage(
186
+ 3,
187
+ f,
188
+ google_protobuf_any_pb.Any.serializeBinaryToWriter
189
+ );
190
+ }
191
+ };
192
+
193
+
194
+ /**
195
+ * optional int32 code = 1;
196
+ * @return {number}
197
+ */
198
+ proto.google.rpc.Status.prototype.getCode = function() {
199
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
200
+ };
201
+
202
+
203
+ /**
204
+ * @param {number} value
205
+ * @return {!proto.google.rpc.Status} returns this
206
+ */
207
+ proto.google.rpc.Status.prototype.setCode = function(value) {
208
+ return jspb.Message.setProto3IntField(this, 1, value);
209
+ };
210
+
211
+
212
+ /**
213
+ * optional string message = 2;
214
+ * @return {string}
215
+ */
216
+ proto.google.rpc.Status.prototype.getMessage = function() {
217
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
218
+ };
219
+
220
+
221
+ /**
222
+ * @param {string} value
223
+ * @return {!proto.google.rpc.Status} returns this
224
+ */
225
+ proto.google.rpc.Status.prototype.setMessage = function(value) {
226
+ return jspb.Message.setProto3StringField(this, 2, value);
227
+ };
228
+
229
+
230
+ /**
231
+ * repeated google.protobuf.Any details = 3;
232
+ * @return {!Array<!proto.google.protobuf.Any>}
233
+ */
234
+ proto.google.rpc.Status.prototype.getDetailsList = function() {
235
+ return /** @type{!Array<!proto.google.protobuf.Any>} */ (
236
+ jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 3));
237
+ };
238
+
239
+
240
+ /**
241
+ * @param {!Array<!proto.google.protobuf.Any>} value
242
+ * @return {!proto.google.rpc.Status} returns this
243
+ */
244
+ proto.google.rpc.Status.prototype.setDetailsList = function(value) {
245
+ return jspb.Message.setRepeatedWrapperField(this, 3, value);
246
+ };
247
+
248
+
249
+ /**
250
+ * @param {!proto.google.protobuf.Any=} opt_value
251
+ * @param {number=} opt_index
252
+ * @return {!proto.google.protobuf.Any}
253
+ */
254
+ proto.google.rpc.Status.prototype.addDetails = function(opt_value, opt_index) {
255
+ return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.google.protobuf.Any, opt_index);
256
+ };
257
+
258
+
259
+ /**
260
+ * Clears the list making it empty but non-null.
261
+ * @return {!proto.google.rpc.Status} returns this
262
+ */
263
+ proto.google.rpc.Status.prototype.clearDetailsList = function() {
264
+ return this.setDetailsList([]);
265
+ };
266
+
267
+
268
+ goog.object.extend(exports, proto.google.rpc);
@@ -0,0 +1,3 @@
1
+ // package: google.rpc
2
+ // file: google/rpc/status.proto
3
+
@@ -0,0 +1,3 @@
1
+ // package: google.rpc
2
+ // file: google/rpc/status.proto
3
+ "use strict";
@@ -0,0 +1,3 @@
1
+ // package: google.rpc
2
+ // file: google/rpc/status.proto
3
+
package/lib/index.d.ts ADDED
@@ -0,0 +1,20 @@
1
+ import { Evaluator } from './evaluation';
2
+ import { SegmentUser, SegmentUsers } from './proto/feature/segment_pb';
3
+ import { Feature } from './proto/feature/feature_pb';
4
+ import { NewUserEvaluations } from './userEvaluation';
5
+ import { User } from './proto/user/user_pb';
6
+ import { Evaluation, UserEvaluations } from './proto/feature/evaluation_pb';
7
+ import { Strategy } from './proto/feature/strategy_pb';
8
+ import { Clause } from './proto/feature/clause_pb';
9
+ import { Reason } from './proto/feature/reason_pb';
10
+ import { createClause, createFixedStrategy, createRolloutStrategy, createReason, createRule, createPrerequisite, createFeature, createEvaluation, createSegmentUser, createStrategy, createTarget, createUser, createVariation } from './modelFactory';
11
+ import { GetFeatureFlagsRequest, GetFeatureFlagsResponse, GetSegmentUsersRequest, GetSegmentUsersResponse } from './proto/gateway/service_pb';
12
+ import { SourceId } from './proto/event/client/event_pb';
13
+ import { GatewayClient, ServiceError } from './proto/gateway/service_pb_service';
14
+ export { Evaluator, NewUserEvaluations, Evaluation, UserEvaluations };
15
+ export { User, SegmentUser, SegmentUsers, Feature };
16
+ export { Strategy, Clause, Reason };
17
+ export { createClause, createFixedStrategy, createRolloutStrategy, createReason, createRule, createPrerequisite, createFeature, createEvaluation, createSegmentUser, createStrategy, createTarget, createUser, createVariation, };
18
+ export { GetFeatureFlagsRequest, GetFeatureFlagsResponse, GetSegmentUsersRequest, GetSegmentUsersResponse, };
19
+ export { SourceId };
20
+ export { GatewayClient, ServiceError };