@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,219 @@
1
+ // source: proto/feature/reason.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
+ goog.exportSymbol('proto.bucketeer.feature.Reason', null, global);
25
+ goog.exportSymbol('proto.bucketeer.feature.Reason.Type', 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.bucketeer.feature.Reason = function(opt_data) {
37
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
38
+ };
39
+ goog.inherits(proto.bucketeer.feature.Reason, jspb.Message);
40
+ if (goog.DEBUG && !COMPILED) {
41
+ /**
42
+ * @public
43
+ * @override
44
+ */
45
+ proto.bucketeer.feature.Reason.displayName = 'proto.bucketeer.feature.Reason';
46
+ }
47
+
48
+
49
+
50
+ if (jspb.Message.GENERATE_TO_OBJECT) {
51
+ /**
52
+ * Creates an object representation of this proto.
53
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
54
+ * Optional fields that are not set will be set to undefined.
55
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
56
+ * For the list of reserved names please see:
57
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
58
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
59
+ * JSPB instance for transitional soy proto support:
60
+ * http://goto/soy-param-migration
61
+ * @return {!Object}
62
+ */
63
+ proto.bucketeer.feature.Reason.prototype.toObject = function(opt_includeInstance) {
64
+ return proto.bucketeer.feature.Reason.toObject(opt_includeInstance, this);
65
+ };
66
+
67
+
68
+ /**
69
+ * Static version of the {@see toObject} method.
70
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
71
+ * the JSPB instance for transitional soy proto support:
72
+ * http://goto/soy-param-migration
73
+ * @param {!proto.bucketeer.feature.Reason} msg The msg instance to transform.
74
+ * @return {!Object}
75
+ * @suppress {unusedLocalVariables} f is only used for nested messages
76
+ */
77
+ proto.bucketeer.feature.Reason.toObject = function(includeInstance, msg) {
78
+ var f, obj = {
79
+ type: jspb.Message.getFieldWithDefault(msg, 1, 0),
80
+ ruleId: jspb.Message.getFieldWithDefault(msg, 2, "")
81
+ };
82
+
83
+ if (includeInstance) {
84
+ obj.$jspbMessageInstance = msg;
85
+ }
86
+ return obj;
87
+ };
88
+ }
89
+
90
+
91
+ /**
92
+ * Deserializes binary data (in protobuf wire format).
93
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
94
+ * @return {!proto.bucketeer.feature.Reason}
95
+ */
96
+ proto.bucketeer.feature.Reason.deserializeBinary = function(bytes) {
97
+ var reader = new jspb.BinaryReader(bytes);
98
+ var msg = new proto.bucketeer.feature.Reason;
99
+ return proto.bucketeer.feature.Reason.deserializeBinaryFromReader(msg, reader);
100
+ };
101
+
102
+
103
+ /**
104
+ * Deserializes binary data (in protobuf wire format) from the
105
+ * given reader into the given message object.
106
+ * @param {!proto.bucketeer.feature.Reason} msg The message object to deserialize into.
107
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
108
+ * @return {!proto.bucketeer.feature.Reason}
109
+ */
110
+ proto.bucketeer.feature.Reason.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 {!proto.bucketeer.feature.Reason.Type} */ (reader.readEnum());
119
+ msg.setType(value);
120
+ break;
121
+ case 2:
122
+ var value = /** @type {string} */ (reader.readString());
123
+ msg.setRuleId(value);
124
+ break;
125
+ default:
126
+ reader.skipField();
127
+ break;
128
+ }
129
+ }
130
+ return msg;
131
+ };
132
+
133
+
134
+ /**
135
+ * Serializes the message to binary data (in protobuf wire format).
136
+ * @return {!Uint8Array}
137
+ */
138
+ proto.bucketeer.feature.Reason.prototype.serializeBinary = function() {
139
+ var writer = new jspb.BinaryWriter();
140
+ proto.bucketeer.feature.Reason.serializeBinaryToWriter(this, writer);
141
+ return writer.getResultBuffer();
142
+ };
143
+
144
+
145
+ /**
146
+ * Serializes the given message to binary data (in protobuf wire
147
+ * format), writing to the given BinaryWriter.
148
+ * @param {!proto.bucketeer.feature.Reason} message
149
+ * @param {!jspb.BinaryWriter} writer
150
+ * @suppress {unusedLocalVariables} f is only used for nested messages
151
+ */
152
+ proto.bucketeer.feature.Reason.serializeBinaryToWriter = function(message, writer) {
153
+ var f = undefined;
154
+ f = message.getType();
155
+ if (f !== 0.0) {
156
+ writer.writeEnum(
157
+ 1,
158
+ f
159
+ );
160
+ }
161
+ f = message.getRuleId();
162
+ if (f.length > 0) {
163
+ writer.writeString(
164
+ 2,
165
+ f
166
+ );
167
+ }
168
+ };
169
+
170
+
171
+ /**
172
+ * @enum {number}
173
+ */
174
+ proto.bucketeer.feature.Reason.Type = {
175
+ TARGET: 0,
176
+ RULE: 1,
177
+ DEFAULT: 3,
178
+ CLIENT: 4,
179
+ OFF_VARIATION: 5,
180
+ PREREQUISITE: 6
181
+ };
182
+
183
+ /**
184
+ * optional Type type = 1;
185
+ * @return {!proto.bucketeer.feature.Reason.Type}
186
+ */
187
+ proto.bucketeer.feature.Reason.prototype.getType = function() {
188
+ return /** @type {!proto.bucketeer.feature.Reason.Type} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
189
+ };
190
+
191
+
192
+ /**
193
+ * @param {!proto.bucketeer.feature.Reason.Type} value
194
+ * @return {!proto.bucketeer.feature.Reason} returns this
195
+ */
196
+ proto.bucketeer.feature.Reason.prototype.setType = function(value) {
197
+ return jspb.Message.setProto3EnumField(this, 1, value);
198
+ };
199
+
200
+
201
+ /**
202
+ * optional string rule_id = 2;
203
+ * @return {string}
204
+ */
205
+ proto.bucketeer.feature.Reason.prototype.getRuleId = function() {
206
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
207
+ };
208
+
209
+
210
+ /**
211
+ * @param {string} value
212
+ * @return {!proto.bucketeer.feature.Reason} returns this
213
+ */
214
+ proto.bucketeer.feature.Reason.prototype.setRuleId = function(value) {
215
+ return jspb.Message.setProto3StringField(this, 2, value);
216
+ };
217
+
218
+
219
+ goog.object.extend(exports, proto.bucketeer.feature);
@@ -0,0 +1,3 @@
1
+ // package: bucketeer.feature
2
+ // file: proto/feature/reason.proto
3
+
@@ -0,0 +1,3 @@
1
+ // package: bucketeer.feature
2
+ // file: proto/feature/reason.proto
3
+ "use strict";
@@ -0,0 +1,3 @@
1
+ // package: bucketeer.feature
2
+ // file: proto/feature/reason.proto
3
+
@@ -0,0 +1,39 @@
1
+ // package: bucketeer.feature
2
+ // file: proto/feature/rule.proto
3
+
4
+ import * as jspb from 'google-protobuf';
5
+ import * as proto_feature_clause_pb from '../../proto/feature/clause_pb';
6
+ import * as proto_feature_strategy_pb from '../../proto/feature/strategy_pb';
7
+
8
+ export class Rule extends jspb.Message {
9
+ getId(): string;
10
+ setId(value: string): void;
11
+
12
+ hasStrategy(): boolean;
13
+ clearStrategy(): void;
14
+ getStrategy(): proto_feature_strategy_pb.Strategy | undefined;
15
+ setStrategy(value?: proto_feature_strategy_pb.Strategy): void;
16
+
17
+ clearClausesList(): void;
18
+ getClausesList(): Array<proto_feature_clause_pb.Clause>;
19
+ setClausesList(value: Array<proto_feature_clause_pb.Clause>): void;
20
+ addClauses(value?: proto_feature_clause_pb.Clause, index?: number): proto_feature_clause_pb.Clause;
21
+
22
+ serializeBinary(): Uint8Array;
23
+ toObject(includeInstance?: boolean): Rule.AsObject;
24
+ static toObject(includeInstance: boolean, msg: Rule): Rule.AsObject;
25
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
26
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
27
+ static serializeBinaryToWriter(message: Rule, writer: jspb.BinaryWriter): void;
28
+ static deserializeBinary(bytes: Uint8Array): Rule;
29
+ static deserializeBinaryFromReader(message: Rule, reader: jspb.BinaryReader): Rule;
30
+ }
31
+
32
+ export namespace Rule {
33
+ export type AsObject = {
34
+ id: string,
35
+ strategy?: proto_feature_strategy_pb.Strategy.AsObject,
36
+ clausesList: Array<proto_feature_clause_pb.Clause.AsObject>,
37
+ }
38
+ }
39
+
@@ -0,0 +1,254 @@
1
+ "use strict";
2
+
3
+ // source: proto/feature/rule.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 proto_feature_clause_pb = require('../../proto/feature/clause_pb.js');
22
+ goog.object.extend(proto, proto_feature_clause_pb);
23
+ var proto_feature_strategy_pb = require('../../proto/feature/strategy_pb.js');
24
+ goog.object.extend(proto, proto_feature_strategy_pb);
25
+ goog.exportSymbol('proto.bucketeer.feature.Rule', 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.bucketeer.feature.Rule = function (opt_data) {
37
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.bucketeer.feature.Rule.repeatedFields_, null);
38
+ };
39
+ goog.inherits(proto.bucketeer.feature.Rule, jspb.Message);
40
+ if (goog.DEBUG && !COMPILED) {
41
+ /**
42
+ * @public
43
+ * @override
44
+ */
45
+ proto.bucketeer.feature.Rule.displayName = 'proto.bucketeer.feature.Rule';
46
+ }
47
+
48
+ /**
49
+ * List of repeated fields within this message type.
50
+ * @private {!Array<number>}
51
+ * @const
52
+ */
53
+ proto.bucketeer.feature.Rule.repeatedFields_ = [3];
54
+ if (jspb.Message.GENERATE_TO_OBJECT) {
55
+ /**
56
+ * Creates an object representation of this proto.
57
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
58
+ * Optional fields that are not set will be set to undefined.
59
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
60
+ * For the list of reserved names please see:
61
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
62
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
63
+ * JSPB instance for transitional soy proto support:
64
+ * http://goto/soy-param-migration
65
+ * @return {!Object}
66
+ */
67
+ proto.bucketeer.feature.Rule.prototype.toObject = function (opt_includeInstance) {
68
+ return proto.bucketeer.feature.Rule.toObject(opt_includeInstance, this);
69
+ };
70
+
71
+ /**
72
+ * Static version of the {@see toObject} method.
73
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
74
+ * the JSPB instance for transitional soy proto support:
75
+ * http://goto/soy-param-migration
76
+ * @param {!proto.bucketeer.feature.Rule} msg The msg instance to transform.
77
+ * @return {!Object}
78
+ * @suppress {unusedLocalVariables} f is only used for nested messages
79
+ */
80
+ proto.bucketeer.feature.Rule.toObject = function (includeInstance, msg) {
81
+ var f,
82
+ obj = {
83
+ id: jspb.Message.getFieldWithDefault(msg, 1, ""),
84
+ strategy: (f = msg.getStrategy()) && proto_feature_strategy_pb.Strategy.toObject(includeInstance, f),
85
+ clausesList: jspb.Message.toObjectList(msg.getClausesList(), proto_feature_clause_pb.Clause.toObject, includeInstance)
86
+ };
87
+ if (includeInstance) {
88
+ obj.$jspbMessageInstance = msg;
89
+ }
90
+ return obj;
91
+ };
92
+ }
93
+
94
+ /**
95
+ * Deserializes binary data (in protobuf wire format).
96
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
97
+ * @return {!proto.bucketeer.feature.Rule}
98
+ */
99
+ proto.bucketeer.feature.Rule.deserializeBinary = function (bytes) {
100
+ var reader = new jspb.BinaryReader(bytes);
101
+ var msg = new proto.bucketeer.feature.Rule();
102
+ return proto.bucketeer.feature.Rule.deserializeBinaryFromReader(msg, reader);
103
+ };
104
+
105
+ /**
106
+ * Deserializes binary data (in protobuf wire format) from the
107
+ * given reader into the given message object.
108
+ * @param {!proto.bucketeer.feature.Rule} msg The message object to deserialize into.
109
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
110
+ * @return {!proto.bucketeer.feature.Rule}
111
+ */
112
+ proto.bucketeer.feature.Rule.deserializeBinaryFromReader = function (msg, reader) {
113
+ while (reader.nextField()) {
114
+ if (reader.isEndGroup()) {
115
+ break;
116
+ }
117
+ var field = reader.getFieldNumber();
118
+ switch (field) {
119
+ case 1:
120
+ var value = /** @type {string} */reader.readString();
121
+ msg.setId(value);
122
+ break;
123
+ case 2:
124
+ var value = new proto_feature_strategy_pb.Strategy();
125
+ reader.readMessage(value, proto_feature_strategy_pb.Strategy.deserializeBinaryFromReader);
126
+ msg.setStrategy(value);
127
+ break;
128
+ case 3:
129
+ var value = new proto_feature_clause_pb.Clause();
130
+ reader.readMessage(value, proto_feature_clause_pb.Clause.deserializeBinaryFromReader);
131
+ msg.addClauses(value);
132
+ break;
133
+ default:
134
+ reader.skipField();
135
+ break;
136
+ }
137
+ }
138
+ return msg;
139
+ };
140
+
141
+ /**
142
+ * Serializes the message to binary data (in protobuf wire format).
143
+ * @return {!Uint8Array}
144
+ */
145
+ proto.bucketeer.feature.Rule.prototype.serializeBinary = function () {
146
+ var writer = new jspb.BinaryWriter();
147
+ proto.bucketeer.feature.Rule.serializeBinaryToWriter(this, writer);
148
+ return writer.getResultBuffer();
149
+ };
150
+
151
+ /**
152
+ * Serializes the given message to binary data (in protobuf wire
153
+ * format), writing to the given BinaryWriter.
154
+ * @param {!proto.bucketeer.feature.Rule} message
155
+ * @param {!jspb.BinaryWriter} writer
156
+ * @suppress {unusedLocalVariables} f is only used for nested messages
157
+ */
158
+ proto.bucketeer.feature.Rule.serializeBinaryToWriter = function (message, writer) {
159
+ var f = undefined;
160
+ f = message.getId();
161
+ if (f.length > 0) {
162
+ writer.writeString(1, f);
163
+ }
164
+ f = message.getStrategy();
165
+ if (f != null) {
166
+ writer.writeMessage(2, f, proto_feature_strategy_pb.Strategy.serializeBinaryToWriter);
167
+ }
168
+ f = message.getClausesList();
169
+ if (f.length > 0) {
170
+ writer.writeRepeatedMessage(3, f, proto_feature_clause_pb.Clause.serializeBinaryToWriter);
171
+ }
172
+ };
173
+
174
+ /**
175
+ * optional string id = 1;
176
+ * @return {string}
177
+ */
178
+ proto.bucketeer.feature.Rule.prototype.getId = function () {
179
+ return /** @type {string} */jspb.Message.getFieldWithDefault(this, 1, "");
180
+ };
181
+
182
+ /**
183
+ * @param {string} value
184
+ * @return {!proto.bucketeer.feature.Rule} returns this
185
+ */
186
+ proto.bucketeer.feature.Rule.prototype.setId = function (value) {
187
+ return jspb.Message.setProto3StringField(this, 1, value);
188
+ };
189
+
190
+ /**
191
+ * optional Strategy strategy = 2;
192
+ * @return {?proto.bucketeer.feature.Strategy}
193
+ */
194
+ proto.bucketeer.feature.Rule.prototype.getStrategy = function () {
195
+ return /** @type{?proto.bucketeer.feature.Strategy} */jspb.Message.getWrapperField(this, proto_feature_strategy_pb.Strategy, 2);
196
+ };
197
+
198
+ /**
199
+ * @param {?proto.bucketeer.feature.Strategy|undefined} value
200
+ * @return {!proto.bucketeer.feature.Rule} returns this
201
+ */
202
+ proto.bucketeer.feature.Rule.prototype.setStrategy = function (value) {
203
+ return jspb.Message.setWrapperField(this, 2, value);
204
+ };
205
+
206
+ /**
207
+ * Clears the message field making it undefined.
208
+ * @return {!proto.bucketeer.feature.Rule} returns this
209
+ */
210
+ proto.bucketeer.feature.Rule.prototype.clearStrategy = function () {
211
+ return this.setStrategy(undefined);
212
+ };
213
+
214
+ /**
215
+ * Returns whether this field is set.
216
+ * @return {boolean}
217
+ */
218
+ proto.bucketeer.feature.Rule.prototype.hasStrategy = function () {
219
+ return jspb.Message.getField(this, 2) != null;
220
+ };
221
+
222
+ /**
223
+ * repeated Clause clauses = 3;
224
+ * @return {!Array<!proto.bucketeer.feature.Clause>}
225
+ */
226
+ proto.bucketeer.feature.Rule.prototype.getClausesList = function () {
227
+ return /** @type{!Array<!proto.bucketeer.feature.Clause>} */jspb.Message.getRepeatedWrapperField(this, proto_feature_clause_pb.Clause, 3);
228
+ };
229
+
230
+ /**
231
+ * @param {!Array<!proto.bucketeer.feature.Clause>} value
232
+ * @return {!proto.bucketeer.feature.Rule} returns this
233
+ */
234
+ proto.bucketeer.feature.Rule.prototype.setClausesList = function (value) {
235
+ return jspb.Message.setRepeatedWrapperField(this, 3, value);
236
+ };
237
+
238
+ /**
239
+ * @param {!proto.bucketeer.feature.Clause=} opt_value
240
+ * @param {number=} opt_index
241
+ * @return {!proto.bucketeer.feature.Clause}
242
+ */
243
+ proto.bucketeer.feature.Rule.prototype.addClauses = function (opt_value, opt_index) {
244
+ return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.bucketeer.feature.Clause, opt_index);
245
+ };
246
+
247
+ /**
248
+ * Clears the list making it empty but non-null.
249
+ * @return {!proto.bucketeer.feature.Rule} returns this
250
+ */
251
+ proto.bucketeer.feature.Rule.prototype.clearClausesList = function () {
252
+ return this.setClausesList([]);
253
+ };
254
+ goog.object.extend(exports, proto.bucketeer.feature);