@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,291 @@
1
+ // source: proto/feature/rule.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 proto_feature_clause_pb = require('../../proto/feature/clause_pb.js');
25
+ goog.object.extend(proto, proto_feature_clause_pb);
26
+ var proto_feature_strategy_pb = require('../../proto/feature/strategy_pb.js');
27
+ goog.object.extend(proto, proto_feature_strategy_pb);
28
+ goog.exportSymbol('proto.bucketeer.feature.Rule', null, global);
29
+ /**
30
+ * Generated by JsPbCodeGenerator.
31
+ * @param {Array=} opt_data Optional initial data array, typically from a
32
+ * server response, or constructed directly in Javascript. The array is used
33
+ * in place and becomes part of the constructed object. It is not cloned.
34
+ * If no data is provided, the constructed object will be empty, but still
35
+ * valid.
36
+ * @extends {jspb.Message}
37
+ * @constructor
38
+ */
39
+ proto.bucketeer.feature.Rule = function(opt_data) {
40
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.bucketeer.feature.Rule.repeatedFields_, null);
41
+ };
42
+ goog.inherits(proto.bucketeer.feature.Rule, jspb.Message);
43
+ if (goog.DEBUG && !COMPILED) {
44
+ /**
45
+ * @public
46
+ * @override
47
+ */
48
+ proto.bucketeer.feature.Rule.displayName = 'proto.bucketeer.feature.Rule';
49
+ }
50
+
51
+ /**
52
+ * List of repeated fields within this message type.
53
+ * @private {!Array<number>}
54
+ * @const
55
+ */
56
+ proto.bucketeer.feature.Rule.repeatedFields_ = [3];
57
+
58
+
59
+
60
+ if (jspb.Message.GENERATE_TO_OBJECT) {
61
+ /**
62
+ * Creates an object representation of this proto.
63
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
64
+ * Optional fields that are not set will be set to undefined.
65
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
66
+ * For the list of reserved names please see:
67
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
68
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
69
+ * JSPB instance for transitional soy proto support:
70
+ * http://goto/soy-param-migration
71
+ * @return {!Object}
72
+ */
73
+ proto.bucketeer.feature.Rule.prototype.toObject = function(opt_includeInstance) {
74
+ return proto.bucketeer.feature.Rule.toObject(opt_includeInstance, this);
75
+ };
76
+
77
+
78
+ /**
79
+ * Static version of the {@see toObject} method.
80
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
81
+ * the JSPB instance for transitional soy proto support:
82
+ * http://goto/soy-param-migration
83
+ * @param {!proto.bucketeer.feature.Rule} msg The msg instance to transform.
84
+ * @return {!Object}
85
+ * @suppress {unusedLocalVariables} f is only used for nested messages
86
+ */
87
+ proto.bucketeer.feature.Rule.toObject = function(includeInstance, msg) {
88
+ var f, obj = {
89
+ id: jspb.Message.getFieldWithDefault(msg, 1, ""),
90
+ strategy: (f = msg.getStrategy()) && proto_feature_strategy_pb.Strategy.toObject(includeInstance, f),
91
+ clausesList: jspb.Message.toObjectList(msg.getClausesList(),
92
+ proto_feature_clause_pb.Clause.toObject, includeInstance)
93
+ };
94
+
95
+ if (includeInstance) {
96
+ obj.$jspbMessageInstance = msg;
97
+ }
98
+ return obj;
99
+ };
100
+ }
101
+
102
+
103
+ /**
104
+ * Deserializes binary data (in protobuf wire format).
105
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
106
+ * @return {!proto.bucketeer.feature.Rule}
107
+ */
108
+ proto.bucketeer.feature.Rule.deserializeBinary = function(bytes) {
109
+ var reader = new jspb.BinaryReader(bytes);
110
+ var msg = new proto.bucketeer.feature.Rule;
111
+ return proto.bucketeer.feature.Rule.deserializeBinaryFromReader(msg, reader);
112
+ };
113
+
114
+
115
+ /**
116
+ * Deserializes binary data (in protobuf wire format) from the
117
+ * given reader into the given message object.
118
+ * @param {!proto.bucketeer.feature.Rule} msg The message object to deserialize into.
119
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
120
+ * @return {!proto.bucketeer.feature.Rule}
121
+ */
122
+ proto.bucketeer.feature.Rule.deserializeBinaryFromReader = function(msg, reader) {
123
+ while (reader.nextField()) {
124
+ if (reader.isEndGroup()) {
125
+ break;
126
+ }
127
+ var field = reader.getFieldNumber();
128
+ switch (field) {
129
+ case 1:
130
+ var value = /** @type {string} */ (reader.readString());
131
+ msg.setId(value);
132
+ break;
133
+ case 2:
134
+ var value = new proto_feature_strategy_pb.Strategy;
135
+ reader.readMessage(value,proto_feature_strategy_pb.Strategy.deserializeBinaryFromReader);
136
+ msg.setStrategy(value);
137
+ break;
138
+ case 3:
139
+ var value = new proto_feature_clause_pb.Clause;
140
+ reader.readMessage(value,proto_feature_clause_pb.Clause.deserializeBinaryFromReader);
141
+ msg.addClauses(value);
142
+ break;
143
+ default:
144
+ reader.skipField();
145
+ break;
146
+ }
147
+ }
148
+ return msg;
149
+ };
150
+
151
+
152
+ /**
153
+ * Serializes the message to binary data (in protobuf wire format).
154
+ * @return {!Uint8Array}
155
+ */
156
+ proto.bucketeer.feature.Rule.prototype.serializeBinary = function() {
157
+ var writer = new jspb.BinaryWriter();
158
+ proto.bucketeer.feature.Rule.serializeBinaryToWriter(this, writer);
159
+ return writer.getResultBuffer();
160
+ };
161
+
162
+
163
+ /**
164
+ * Serializes the given message to binary data (in protobuf wire
165
+ * format), writing to the given BinaryWriter.
166
+ * @param {!proto.bucketeer.feature.Rule} message
167
+ * @param {!jspb.BinaryWriter} writer
168
+ * @suppress {unusedLocalVariables} f is only used for nested messages
169
+ */
170
+ proto.bucketeer.feature.Rule.serializeBinaryToWriter = function(message, writer) {
171
+ var f = undefined;
172
+ f = message.getId();
173
+ if (f.length > 0) {
174
+ writer.writeString(
175
+ 1,
176
+ f
177
+ );
178
+ }
179
+ f = message.getStrategy();
180
+ if (f != null) {
181
+ writer.writeMessage(
182
+ 2,
183
+ f,
184
+ proto_feature_strategy_pb.Strategy.serializeBinaryToWriter
185
+ );
186
+ }
187
+ f = message.getClausesList();
188
+ if (f.length > 0) {
189
+ writer.writeRepeatedMessage(
190
+ 3,
191
+ f,
192
+ proto_feature_clause_pb.Clause.serializeBinaryToWriter
193
+ );
194
+ }
195
+ };
196
+
197
+
198
+ /**
199
+ * optional string id = 1;
200
+ * @return {string}
201
+ */
202
+ proto.bucketeer.feature.Rule.prototype.getId = function() {
203
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
204
+ };
205
+
206
+
207
+ /**
208
+ * @param {string} value
209
+ * @return {!proto.bucketeer.feature.Rule} returns this
210
+ */
211
+ proto.bucketeer.feature.Rule.prototype.setId = function(value) {
212
+ return jspb.Message.setProto3StringField(this, 1, value);
213
+ };
214
+
215
+
216
+ /**
217
+ * optional Strategy strategy = 2;
218
+ * @return {?proto.bucketeer.feature.Strategy}
219
+ */
220
+ proto.bucketeer.feature.Rule.prototype.getStrategy = function() {
221
+ return /** @type{?proto.bucketeer.feature.Strategy} */ (
222
+ jspb.Message.getWrapperField(this, proto_feature_strategy_pb.Strategy, 2));
223
+ };
224
+
225
+
226
+ /**
227
+ * @param {?proto.bucketeer.feature.Strategy|undefined} value
228
+ * @return {!proto.bucketeer.feature.Rule} returns this
229
+ */
230
+ proto.bucketeer.feature.Rule.prototype.setStrategy = function(value) {
231
+ return jspb.Message.setWrapperField(this, 2, value);
232
+ };
233
+
234
+
235
+ /**
236
+ * Clears the message field making it undefined.
237
+ * @return {!proto.bucketeer.feature.Rule} returns this
238
+ */
239
+ proto.bucketeer.feature.Rule.prototype.clearStrategy = function() {
240
+ return this.setStrategy(undefined);
241
+ };
242
+
243
+
244
+ /**
245
+ * Returns whether this field is set.
246
+ * @return {boolean}
247
+ */
248
+ proto.bucketeer.feature.Rule.prototype.hasStrategy = function() {
249
+ return jspb.Message.getField(this, 2) != null;
250
+ };
251
+
252
+
253
+ /**
254
+ * repeated Clause clauses = 3;
255
+ * @return {!Array<!proto.bucketeer.feature.Clause>}
256
+ */
257
+ proto.bucketeer.feature.Rule.prototype.getClausesList = function() {
258
+ return /** @type{!Array<!proto.bucketeer.feature.Clause>} */ (
259
+ jspb.Message.getRepeatedWrapperField(this, proto_feature_clause_pb.Clause, 3));
260
+ };
261
+
262
+
263
+ /**
264
+ * @param {!Array<!proto.bucketeer.feature.Clause>} value
265
+ * @return {!proto.bucketeer.feature.Rule} returns this
266
+ */
267
+ proto.bucketeer.feature.Rule.prototype.setClausesList = function(value) {
268
+ return jspb.Message.setRepeatedWrapperField(this, 3, value);
269
+ };
270
+
271
+
272
+ /**
273
+ * @param {!proto.bucketeer.feature.Clause=} opt_value
274
+ * @param {number=} opt_index
275
+ * @return {!proto.bucketeer.feature.Clause}
276
+ */
277
+ proto.bucketeer.feature.Rule.prototype.addClauses = function(opt_value, opt_index) {
278
+ return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.bucketeer.feature.Clause, opt_index);
279
+ };
280
+
281
+
282
+ /**
283
+ * Clears the list making it empty but non-null.
284
+ * @return {!proto.bucketeer.feature.Rule} returns this
285
+ */
286
+ proto.bucketeer.feature.Rule.prototype.clearClausesList = function() {
287
+ return this.setClausesList([]);
288
+ };
289
+
290
+
291
+ goog.object.extend(exports, proto.bucketeer.feature);
@@ -0,0 +1,3 @@
1
+ // package: bucketeer.feature
2
+ // file: proto/feature/rule.proto
3
+
@@ -0,0 +1,3 @@
1
+ // package: bucketeer.feature
2
+ // file: proto/feature/rule.proto
3
+ "use strict";
@@ -0,0 +1,3 @@
1
+ // package: bucketeer.feature
2
+ // file: proto/feature/rule.proto
3
+
@@ -0,0 +1,161 @@
1
+ // package: bucketeer.feature
2
+ // file: proto/feature/segment.proto
3
+
4
+ import * as jspb from 'google-protobuf';
5
+ import * as proto_feature_rule_pb from '../../proto/feature/rule_pb';
6
+ import * as proto_feature_feature_pb from '../../proto/feature/feature_pb';
7
+
8
+ export class Segment extends jspb.Message {
9
+ getId(): string;
10
+ setId(value: string): void;
11
+
12
+ getName(): string;
13
+ setName(value: string): void;
14
+
15
+ getDescription(): string;
16
+ setDescription(value: string): void;
17
+
18
+ clearRulesList(): void;
19
+ getRulesList(): Array<proto_feature_rule_pb.Rule>;
20
+ setRulesList(value: Array<proto_feature_rule_pb.Rule>): void;
21
+ addRules(value?: proto_feature_rule_pb.Rule, index?: number): proto_feature_rule_pb.Rule;
22
+
23
+ getCreatedAt(): number;
24
+ setCreatedAt(value: number): void;
25
+
26
+ getUpdatedAt(): number;
27
+ setUpdatedAt(value: number): void;
28
+
29
+ getVersion(): number;
30
+ setVersion(value: number): void;
31
+
32
+ getDeleted(): boolean;
33
+ setDeleted(value: boolean): void;
34
+
35
+ getIncludedUserCount(): number;
36
+ setIncludedUserCount(value: number): void;
37
+
38
+ getExcludedUserCount(): number;
39
+ setExcludedUserCount(value: number): void;
40
+
41
+ getStatus(): Segment.StatusMap[keyof Segment.StatusMap];
42
+ setStatus(value: Segment.StatusMap[keyof Segment.StatusMap]): void;
43
+
44
+ getIsInUseStatus(): boolean;
45
+ setIsInUseStatus(value: boolean): void;
46
+
47
+ clearFeaturesList(): void;
48
+ getFeaturesList(): Array<proto_feature_feature_pb.Feature>;
49
+ setFeaturesList(value: Array<proto_feature_feature_pb.Feature>): void;
50
+ addFeatures(value?: proto_feature_feature_pb.Feature, index?: number): proto_feature_feature_pb.Feature;
51
+
52
+ serializeBinary(): Uint8Array;
53
+ toObject(includeInstance?: boolean): Segment.AsObject;
54
+ static toObject(includeInstance: boolean, msg: Segment): Segment.AsObject;
55
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
56
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
57
+ static serializeBinaryToWriter(message: Segment, writer: jspb.BinaryWriter): void;
58
+ static deserializeBinary(bytes: Uint8Array): Segment;
59
+ static deserializeBinaryFromReader(message: Segment, reader: jspb.BinaryReader): Segment;
60
+ }
61
+
62
+ export namespace Segment {
63
+ export type AsObject = {
64
+ id: string,
65
+ name: string,
66
+ description: string,
67
+ rulesList: Array<proto_feature_rule_pb.Rule.AsObject>,
68
+ createdAt: number,
69
+ updatedAt: number,
70
+ version: number,
71
+ deleted: boolean,
72
+ includedUserCount: number,
73
+ excludedUserCount: number,
74
+ status: Segment.StatusMap[keyof Segment.StatusMap],
75
+ isInUseStatus: boolean,
76
+ featuresList: Array<proto_feature_feature_pb.Feature.AsObject>,
77
+ }
78
+
79
+ export interface StatusMap {
80
+ INITIAL: 0;
81
+ UPLOADING: 1;
82
+ SUCEEDED: 2;
83
+ FAILED: 3;
84
+ }
85
+
86
+ export const Status: StatusMap;
87
+ }
88
+
89
+ export class SegmentUser extends jspb.Message {
90
+ getId(): string;
91
+ setId(value: string): void;
92
+
93
+ getSegmentId(): string;
94
+ setSegmentId(value: string): void;
95
+
96
+ getUserId(): string;
97
+ setUserId(value: string): void;
98
+
99
+ getState(): SegmentUser.StateMap[keyof SegmentUser.StateMap];
100
+ setState(value: SegmentUser.StateMap[keyof SegmentUser.StateMap]): void;
101
+
102
+ getDeleted(): boolean;
103
+ setDeleted(value: boolean): void;
104
+
105
+ serializeBinary(): Uint8Array;
106
+ toObject(includeInstance?: boolean): SegmentUser.AsObject;
107
+ static toObject(includeInstance: boolean, msg: SegmentUser): SegmentUser.AsObject;
108
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
109
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
110
+ static serializeBinaryToWriter(message: SegmentUser, writer: jspb.BinaryWriter): void;
111
+ static deserializeBinary(bytes: Uint8Array): SegmentUser;
112
+ static deserializeBinaryFromReader(message: SegmentUser, reader: jspb.BinaryReader): SegmentUser;
113
+ }
114
+
115
+ export namespace SegmentUser {
116
+ export type AsObject = {
117
+ id: string,
118
+ segmentId: string,
119
+ userId: string,
120
+ state: SegmentUser.StateMap[keyof SegmentUser.StateMap],
121
+ deleted: boolean,
122
+ }
123
+
124
+ export interface StateMap {
125
+ INCLUDED: 0;
126
+ EXCLUDED: 1;
127
+ }
128
+
129
+ export const State: StateMap;
130
+ }
131
+
132
+ export class SegmentUsers extends jspb.Message {
133
+ getSegmentId(): string;
134
+ setSegmentId(value: string): void;
135
+
136
+ clearUsersList(): void;
137
+ getUsersList(): Array<SegmentUser>;
138
+ setUsersList(value: Array<SegmentUser>): void;
139
+ addUsers(value?: SegmentUser, index?: number): SegmentUser;
140
+
141
+ getUpdatedAt(): number;
142
+ setUpdatedAt(value: number): void;
143
+
144
+ serializeBinary(): Uint8Array;
145
+ toObject(includeInstance?: boolean): SegmentUsers.AsObject;
146
+ static toObject(includeInstance: boolean, msg: SegmentUsers): SegmentUsers.AsObject;
147
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
148
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
149
+ static serializeBinaryToWriter(message: SegmentUsers, writer: jspb.BinaryWriter): void;
150
+ static deserializeBinary(bytes: Uint8Array): SegmentUsers;
151
+ static deserializeBinaryFromReader(message: SegmentUsers, reader: jspb.BinaryReader): SegmentUsers;
152
+ }
153
+
154
+ export namespace SegmentUsers {
155
+ export type AsObject = {
156
+ segmentId: string,
157
+ usersList: Array<SegmentUser.AsObject>,
158
+ updatedAt: number,
159
+ }
160
+ }
161
+