@kenji71089/evaluation 0.0.1 → 0.0.8

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 (196) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/README.md +36 -6
  3. package/lib/bucketeer.d.ts +6 -0
  4. package/lib/bucketeer.js +65 -0
  5. package/lib/bucketeer.mjs +38 -0
  6. package/lib/clauseEvaluator.js +49 -7
  7. package/lib/clauseEvaluator.mjs +41 -7
  8. package/lib/evaluation.d.ts +10 -1
  9. package/lib/evaluation.js +184 -27
  10. package/lib/evaluation.mjs +141 -10
  11. package/lib/index.d.ts +12 -10
  12. package/lib/index.js +61 -40
  13. package/lib/index.mjs +16 -10
  14. package/lib/modelFactory.d.ts +1 -0
  15. package/lib/modelFactory.js +2 -0
  16. package/lib/modelFactory.mjs +2 -0
  17. package/lib/proto/event/client/event_pb.d.ts +19 -9
  18. package/lib/proto/event/client/event_pb.js +22 -12
  19. package/lib/proto/event/client/event_pb.mjs +100 -90
  20. package/lib/proto/feature/clause_pb.d.ts +2 -1
  21. package/lib/proto/feature/clause_pb.js +3 -2
  22. package/lib/proto/feature/clause_pb.mjs +7 -6
  23. package/lib/proto/feature/evaluation_pb.d.ts +3 -3
  24. package/lib/proto/feature/evaluation_pb.js +1 -1
  25. package/lib/proto/feature/evaluation_pb.mjs +15 -15
  26. package/lib/proto/feature/feature_last_used_info_pb.d.ts +10 -1
  27. package/lib/proto/feature/feature_last_used_info_pb.js +12 -1
  28. package/lib/proto/feature/feature_last_used_info_pb.mjs +18 -7
  29. package/lib/proto/feature/feature_pb.d.ts +72 -7
  30. package/lib/proto/feature/feature_pb.js +446 -4
  31. package/lib/proto/feature/feature_pb.mjs +535 -29
  32. package/lib/proto/feature/prerequisite_pb.d.ts +1 -1
  33. package/lib/proto/feature/prerequisite_pb.js +1 -1
  34. package/lib/proto/feature/prerequisite_pb.mjs +3 -3
  35. package/lib/proto/feature/reason_pb.d.ts +8 -1
  36. package/lib/proto/feature/reason_pb.js +9 -2
  37. package/lib/proto/feature/reason_pb.mjs +11 -4
  38. package/lib/proto/feature/rule_pb.d.ts +3 -3
  39. package/lib/proto/feature/rule_pb.js +1 -1
  40. package/lib/proto/feature/rule_pb.mjs +4 -4
  41. package/lib/proto/feature/segment_pb.d.ts +3 -3
  42. package/lib/proto/feature/segment_pb.js +1 -1
  43. package/lib/proto/feature/segment_pb.mjs +22 -22
  44. package/lib/proto/feature/strategy_pb.d.ts +31 -1
  45. package/lib/proto/feature/strategy_pb.js +206 -2
  46. package/lib/proto/feature/strategy_pb.mjs +242 -9
  47. package/lib/proto/feature/target_pb.d.ts +1 -1
  48. package/lib/proto/feature/target_pb.js +1 -1
  49. package/lib/proto/feature/target_pb.mjs +3 -3
  50. package/lib/proto/feature/variation_pb.d.ts +1 -1
  51. package/lib/proto/feature/variation_pb.js +1 -1
  52. package/lib/proto/feature/variation_pb.mjs +5 -5
  53. package/lib/proto/user/user_pb.d.ts +53 -1
  54. package/lib/proto/user/user_pb.js +374 -1
  55. package/lib/proto/user/user_pb.mjs +427 -7
  56. package/lib/strategyEvaluator.d.ts +0 -2
  57. package/lib/strategyEvaluator.js +23 -57
  58. package/lib/strategyEvaluator.mjs +23 -46
  59. package/lib/userEvaluation.js +13 -3
  60. package/lib/userEvaluation.mjs +13 -3
  61. package/package.json +15 -8
  62. package/lib/google/api/annotations_pb.d.ts +0 -8
  63. package/lib/google/api/annotations_pb.js +0 -40
  64. package/lib/google/api/annotations_pb.mjs +0 -54
  65. package/lib/google/api/annotations_pb_service.d.ts +0 -3
  66. package/lib/google/api/annotations_pb_service.js +0 -3
  67. package/lib/google/api/annotations_pb_service.mjs +0 -3
  68. package/lib/google/api/http_pb.d.ts +0 -132
  69. package/lib/google/api/http_pb.js +0 -860
  70. package/lib/google/api/http_pb.mjs +0 -982
  71. package/lib/google/api/http_pb_service.d.ts +0 -3
  72. package/lib/google/api/http_pb_service.js +0 -3
  73. package/lib/google/api/http_pb_service.mjs +0 -3
  74. package/lib/google/rpc/code_pb.d.ts +0 -26
  75. package/lib/google/rpc/code_pb.js +0 -44
  76. package/lib/google/rpc/code_pb.mjs +0 -48
  77. package/lib/google/rpc/code_pb_service.d.ts +0 -3
  78. package/lib/google/rpc/code_pb_service.js +0 -3
  79. package/lib/google/rpc/code_pb_service.mjs +0 -3
  80. package/lib/google/rpc/error_details_pb.d.ts +0 -322
  81. package/lib/google/rpc/error_details_pb.js +0 -2220
  82. package/lib/google/rpc/error_details_pb.mjs +0 -2499
  83. package/lib/google/rpc/error_details_pb_service.d.ts +0 -3
  84. package/lib/google/rpc/error_details_pb_service.js +0 -3
  85. package/lib/google/rpc/error_details_pb_service.mjs +0 -3
  86. package/lib/google/rpc/status_pb.d.ts +0 -36
  87. package/lib/google/rpc/status_pb.js +0 -235
  88. package/lib/google/rpc/status_pb.mjs +0 -268
  89. package/lib/google/rpc/status_pb_service.d.ts +0 -3
  90. package/lib/google/rpc/status_pb_service.js +0 -3
  91. package/lib/google/rpc/status_pb_service.mjs +0 -3
  92. package/lib/proto/event/client/event_pb_service.d.ts +0 -3
  93. package/lib/proto/event/client/event_pb_service.js +0 -3
  94. package/lib/proto/event/client/event_pb_service.mjs +0 -3
  95. package/lib/proto/event/domain/event_pb.d.ts +0 -4518
  96. package/lib/proto/event/domain/event_pb.js +0 -10834
  97. package/lib/proto/event/domain/event_pb.mjs +0 -33315
  98. package/lib/proto/event/domain/event_pb_service.d.ts +0 -3
  99. package/lib/proto/event/domain/event_pb_service.js +0 -3
  100. package/lib/proto/event/domain/event_pb_service.mjs +0 -3
  101. package/lib/proto/event/domain/localized_message_pb.d.ts +0 -29
  102. package/lib/proto/event/domain/localized_message_pb.js +0 -183
  103. package/lib/proto/event/domain/localized_message_pb.mjs +0 -206
  104. package/lib/proto/event/domain/localized_message_pb_service.d.ts +0 -3
  105. package/lib/proto/event/domain/localized_message_pb_service.js +0 -3
  106. package/lib/proto/event/domain/localized_message_pb_service.mjs +0 -3
  107. package/lib/proto/event/service/feature_pb.d.ts +0 -44
  108. package/lib/proto/event/service/feature_pb.js +0 -277
  109. package/lib/proto/event/service/feature_pb.mjs +0 -319
  110. package/lib/proto/event/service/feature_pb_service.d.ts +0 -3
  111. package/lib/proto/event/service/feature_pb_service.js +0 -3
  112. package/lib/proto/event/service/feature_pb_service.mjs +0 -3
  113. package/lib/proto/event/service/segment_pb.d.ts +0 -51
  114. package/lib/proto/event/service/segment_pb.js +0 -324
  115. package/lib/proto/event/service/segment_pb.mjs +0 -375
  116. package/lib/proto/event/service/segment_pb_service.d.ts +0 -3
  117. package/lib/proto/event/service/segment_pb_service.js +0 -3
  118. package/lib/proto/event/service/segment_pb_service.mjs +0 -3
  119. package/lib/proto/event/service/user_pb.d.ts +0 -49
  120. package/lib/proto/event/service/user_pb.js +0 -315
  121. package/lib/proto/event/service/user_pb.mjs +0 -362
  122. package/lib/proto/event/service/user_pb_service.d.ts +0 -3
  123. package/lib/proto/event/service/user_pb_service.js +0 -3
  124. package/lib/proto/event/service/user_pb_service.mjs +0 -3
  125. package/lib/proto/feature/clause_pb_service.d.ts +0 -3
  126. package/lib/proto/feature/clause_pb_service.js +0 -3
  127. package/lib/proto/feature/clause_pb_service.mjs +0 -3
  128. package/lib/proto/feature/command_pb.d.ts +0 -1213
  129. package/lib/proto/feature/command_pb.js +0 -8260
  130. package/lib/proto/feature/command_pb.mjs +0 -9275
  131. package/lib/proto/feature/command_pb_service.d.ts +0 -3
  132. package/lib/proto/feature/command_pb_service.js +0 -3
  133. package/lib/proto/feature/command_pb_service.mjs +0 -3
  134. package/lib/proto/feature/evaluation_pb_service.d.ts +0 -3
  135. package/lib/proto/feature/evaluation_pb_service.js +0 -3
  136. package/lib/proto/feature/evaluation_pb_service.mjs +0 -3
  137. package/lib/proto/feature/feature_last_used_info_pb_service.d.ts +0 -3
  138. package/lib/proto/feature/feature_last_used_info_pb_service.js +0 -3
  139. package/lib/proto/feature/feature_last_used_info_pb_service.mjs +0 -3
  140. package/lib/proto/feature/feature_pb_service.d.ts +0 -3
  141. package/lib/proto/feature/feature_pb_service.js +0 -3
  142. package/lib/proto/feature/feature_pb_service.mjs +0 -3
  143. package/lib/proto/feature/flag_trigger_pb.d.ts +0 -84
  144. package/lib/proto/feature/flag_trigger_pb.js +0 -452
  145. package/lib/proto/feature/flag_trigger_pb.mjs +0 -525
  146. package/lib/proto/feature/flag_trigger_pb_service.d.ts +0 -3
  147. package/lib/proto/feature/flag_trigger_pb_service.js +0 -3
  148. package/lib/proto/feature/flag_trigger_pb_service.mjs +0 -3
  149. package/lib/proto/feature/prerequisite_pb_service.d.ts +0 -3
  150. package/lib/proto/feature/prerequisite_pb_service.js +0 -3
  151. package/lib/proto/feature/prerequisite_pb_service.mjs +0 -3
  152. package/lib/proto/feature/reason_pb_service.d.ts +0 -3
  153. package/lib/proto/feature/reason_pb_service.js +0 -3
  154. package/lib/proto/feature/reason_pb_service.mjs +0 -3
  155. package/lib/proto/feature/rule_pb_service.d.ts +0 -3
  156. package/lib/proto/feature/rule_pb_service.js +0 -3
  157. package/lib/proto/feature/rule_pb_service.mjs +0 -3
  158. package/lib/proto/feature/segment_pb_service.d.ts +0 -3
  159. package/lib/proto/feature/segment_pb_service.js +0 -3
  160. package/lib/proto/feature/segment_pb_service.mjs +0 -3
  161. package/lib/proto/feature/service_pb.d.ts +0 -2158
  162. package/lib/proto/feature/service_pb.js +0 -5363
  163. package/lib/proto/feature/service_pb.mjs +0 -16348
  164. package/lib/proto/feature/service_pb_service.d.ts +0 -747
  165. package/lib/proto/feature/service_pb_service.js +0 -1424
  166. package/lib/proto/feature/service_pb_service.mjs +0 -1501
  167. package/lib/proto/feature/strategy_pb_service.d.ts +0 -3
  168. package/lib/proto/feature/strategy_pb_service.js +0 -3
  169. package/lib/proto/feature/strategy_pb_service.mjs +0 -3
  170. package/lib/proto/feature/target_pb_service.d.ts +0 -3
  171. package/lib/proto/feature/target_pb_service.js +0 -3
  172. package/lib/proto/feature/target_pb_service.mjs +0 -3
  173. package/lib/proto/feature/variation_pb_service.d.ts +0 -3
  174. package/lib/proto/feature/variation_pb_service.js +0 -3
  175. package/lib/proto/feature/variation_pb_service.mjs +0 -3
  176. package/lib/proto/gateway/service_pb.d.ts +0 -772
  177. package/lib/proto/gateway/service_pb.js +0 -5249
  178. package/lib/proto/gateway/service_pb.mjs +0 -6001
  179. package/lib/proto/gateway/service_pb_service.d.ts +0 -253
  180. package/lib/proto/gateway/service_pb_service.js +0 -436
  181. package/lib/proto/gateway/service_pb_service.mjs +0 -461
  182. package/lib/proto/user/user_pb_service.d.ts +0 -3
  183. package/lib/proto/user/user_pb_service.js +0 -3
  184. package/lib/proto/user/user_pb_service.mjs +0 -3
  185. package/lib/protoc-gen-openapiv2/options/annotations_pb.d.ts +0 -16
  186. package/lib/protoc-gen-openapiv2/options/annotations_pb.js +0 -100
  187. package/lib/protoc-gen-openapiv2/options/annotations_pb.mjs +0 -158
  188. package/lib/protoc-gen-openapiv2/options/annotations_pb_service.d.ts +0 -3
  189. package/lib/protoc-gen-openapiv2/options/annotations_pb_service.js +0 -3
  190. package/lib/protoc-gen-openapiv2/options/annotations_pb_service.mjs +0 -3
  191. package/lib/protoc-gen-openapiv2/options/openapiv2_pb.d.ts +0 -834
  192. package/lib/protoc-gen-openapiv2/options/openapiv2_pb.js +0 -5456
  193. package/lib/protoc-gen-openapiv2/options/openapiv2_pb.mjs +0 -6256
  194. package/lib/protoc-gen-openapiv2/options/openapiv2_pb_service.d.ts +0 -3
  195. package/lib/protoc-gen-openapiv2/options/openapiv2_pb_service.js +0 -3
  196. package/lib/protoc-gen-openapiv2/options/openapiv2_pb_service.mjs +0 -3
@@ -8,7 +8,7 @@
8
8
  * @public
9
9
  */
10
10
  // GENERATED CODE -- DO NOT EDIT!
11
-
11
+ /* eslint-disable */
12
12
  // @ts-nocheck
13
13
 
14
14
  var jspb = require('google-protobuf');
@@ -21,6 +21,7 @@ var global =
21
21
  (function () { return this; }).call(null) ||
22
22
  Function('return this')();
23
23
 
24
+ goog.exportSymbol('proto.bucketeer.feature.Audience', null, global);
24
25
  goog.exportSymbol('proto.bucketeer.feature.FixedStrategy', null, global);
25
26
  goog.exportSymbol('proto.bucketeer.feature.RolloutStrategy', null, global);
26
27
  goog.exportSymbol('proto.bucketeer.feature.RolloutStrategy.Variation', null, global);
@@ -47,6 +48,27 @@ if (goog.DEBUG && !COMPILED) {
47
48
  */
48
49
  proto.bucketeer.feature.FixedStrategy.displayName = 'proto.bucketeer.feature.FixedStrategy';
49
50
  }
51
+ /**
52
+ * Generated by JsPbCodeGenerator.
53
+ * @param {Array=} opt_data Optional initial data array, typically from a
54
+ * server response, or constructed directly in Javascript. The array is used
55
+ * in place and becomes part of the constructed object. It is not cloned.
56
+ * If no data is provided, the constructed object will be empty, but still
57
+ * valid.
58
+ * @extends {jspb.Message}
59
+ * @constructor
60
+ */
61
+ proto.bucketeer.feature.Audience = function(opt_data) {
62
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
63
+ };
64
+ goog.inherits(proto.bucketeer.feature.Audience, jspb.Message);
65
+ if (goog.DEBUG && !COMPILED) {
66
+ /**
67
+ * @public
68
+ * @override
69
+ */
70
+ proto.bucketeer.feature.Audience.displayName = 'proto.bucketeer.feature.Audience';
71
+ }
50
72
  /**
51
73
  * Generated by JsPbCodeGenerator.
52
74
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -142,7 +164,7 @@ proto.bucketeer.feature.FixedStrategy.prototype.toObject = function(opt_includeI
142
164
  */
143
165
  proto.bucketeer.feature.FixedStrategy.toObject = function(includeInstance, msg) {
144
166
  var f, obj = {
145
- variation: jspb.Message.getFieldWithDefault(msg, 1, "")
167
+ variation: jspb.Message.getFieldWithDefault(msg, 1, "")
146
168
  };
147
169
 
148
170
  if (includeInstance) {
@@ -241,6 +263,166 @@ proto.bucketeer.feature.FixedStrategy.prototype.setVariation = function(value) {
241
263
 
242
264
 
243
265
 
266
+
267
+
268
+ if (jspb.Message.GENERATE_TO_OBJECT) {
269
+ /**
270
+ * Creates an object representation of this proto.
271
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
272
+ * Optional fields that are not set will be set to undefined.
273
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
274
+ * For the list of reserved names please see:
275
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
276
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
277
+ * JSPB instance for transitional soy proto support:
278
+ * http://goto/soy-param-migration
279
+ * @return {!Object}
280
+ */
281
+ proto.bucketeer.feature.Audience.prototype.toObject = function(opt_includeInstance) {
282
+ return proto.bucketeer.feature.Audience.toObject(opt_includeInstance, this);
283
+ };
284
+
285
+
286
+ /**
287
+ * Static version of the {@see toObject} method.
288
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
289
+ * the JSPB instance for transitional soy proto support:
290
+ * http://goto/soy-param-migration
291
+ * @param {!proto.bucketeer.feature.Audience} msg The msg instance to transform.
292
+ * @return {!Object}
293
+ * @suppress {unusedLocalVariables} f is only used for nested messages
294
+ */
295
+ proto.bucketeer.feature.Audience.toObject = function(includeInstance, msg) {
296
+ var f, obj = {
297
+ percentage: jspb.Message.getFieldWithDefault(msg, 1, 0),
298
+ defaultVariation: jspb.Message.getFieldWithDefault(msg, 2, "")
299
+ };
300
+
301
+ if (includeInstance) {
302
+ obj.$jspbMessageInstance = msg;
303
+ }
304
+ return obj;
305
+ };
306
+ }
307
+
308
+
309
+ /**
310
+ * Deserializes binary data (in protobuf wire format).
311
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
312
+ * @return {!proto.bucketeer.feature.Audience}
313
+ */
314
+ proto.bucketeer.feature.Audience.deserializeBinary = function(bytes) {
315
+ var reader = new jspb.BinaryReader(bytes);
316
+ var msg = new proto.bucketeer.feature.Audience;
317
+ return proto.bucketeer.feature.Audience.deserializeBinaryFromReader(msg, reader);
318
+ };
319
+
320
+
321
+ /**
322
+ * Deserializes binary data (in protobuf wire format) from the
323
+ * given reader into the given message object.
324
+ * @param {!proto.bucketeer.feature.Audience} msg The message object to deserialize into.
325
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
326
+ * @return {!proto.bucketeer.feature.Audience}
327
+ */
328
+ proto.bucketeer.feature.Audience.deserializeBinaryFromReader = function(msg, reader) {
329
+ while (reader.nextField()) {
330
+ if (reader.isEndGroup()) {
331
+ break;
332
+ }
333
+ var field = reader.getFieldNumber();
334
+ switch (field) {
335
+ case 1:
336
+ var value = /** @type {number} */ (reader.readInt32());
337
+ msg.setPercentage(value);
338
+ break;
339
+ case 2:
340
+ var value = /** @type {string} */ (reader.readString());
341
+ msg.setDefaultVariation(value);
342
+ break;
343
+ default:
344
+ reader.skipField();
345
+ break;
346
+ }
347
+ }
348
+ return msg;
349
+ };
350
+
351
+
352
+ /**
353
+ * Serializes the message to binary data (in protobuf wire format).
354
+ * @return {!Uint8Array}
355
+ */
356
+ proto.bucketeer.feature.Audience.prototype.serializeBinary = function() {
357
+ var writer = new jspb.BinaryWriter();
358
+ proto.bucketeer.feature.Audience.serializeBinaryToWriter(this, writer);
359
+ return writer.getResultBuffer();
360
+ };
361
+
362
+
363
+ /**
364
+ * Serializes the given message to binary data (in protobuf wire
365
+ * format), writing to the given BinaryWriter.
366
+ * @param {!proto.bucketeer.feature.Audience} message
367
+ * @param {!jspb.BinaryWriter} writer
368
+ * @suppress {unusedLocalVariables} f is only used for nested messages
369
+ */
370
+ proto.bucketeer.feature.Audience.serializeBinaryToWriter = function(message, writer) {
371
+ var f = undefined;
372
+ f = message.getPercentage();
373
+ if (f !== 0) {
374
+ writer.writeInt32(
375
+ 1,
376
+ f
377
+ );
378
+ }
379
+ f = message.getDefaultVariation();
380
+ if (f.length > 0) {
381
+ writer.writeString(
382
+ 2,
383
+ f
384
+ );
385
+ }
386
+ };
387
+
388
+
389
+ /**
390
+ * optional int32 percentage = 1;
391
+ * @return {number}
392
+ */
393
+ proto.bucketeer.feature.Audience.prototype.getPercentage = function() {
394
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
395
+ };
396
+
397
+
398
+ /**
399
+ * @param {number} value
400
+ * @return {!proto.bucketeer.feature.Audience} returns this
401
+ */
402
+ proto.bucketeer.feature.Audience.prototype.setPercentage = function(value) {
403
+ return jspb.Message.setProto3IntField(this, 1, value);
404
+ };
405
+
406
+
407
+ /**
408
+ * optional string default_variation = 2;
409
+ * @return {string}
410
+ */
411
+ proto.bucketeer.feature.Audience.prototype.getDefaultVariation = function() {
412
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
413
+ };
414
+
415
+
416
+ /**
417
+ * @param {string} value
418
+ * @return {!proto.bucketeer.feature.Audience} returns this
419
+ */
420
+ proto.bucketeer.feature.Audience.prototype.setDefaultVariation = function(value) {
421
+ return jspb.Message.setProto3StringField(this, 2, value);
422
+ };
423
+
424
+
425
+
244
426
  /**
245
427
  * List of repeated fields within this message type.
246
428
  * @private {!Array<number>}
@@ -279,8 +461,9 @@ proto.bucketeer.feature.RolloutStrategy.prototype.toObject = function(opt_includ
279
461
  */
280
462
  proto.bucketeer.feature.RolloutStrategy.toObject = function(includeInstance, msg) {
281
463
  var f, obj = {
282
- variationsList: jspb.Message.toObjectList(msg.getVariationsList(),
283
- proto.bucketeer.feature.RolloutStrategy.Variation.toObject, includeInstance)
464
+ variationsList: jspb.Message.toObjectList(msg.getVariationsList(),
465
+ proto.bucketeer.feature.RolloutStrategy.Variation.toObject, includeInstance),
466
+ audience: (f = msg.getAudience()) && proto.bucketeer.feature.Audience.toObject(includeInstance, f)
284
467
  };
285
468
 
286
469
  if (includeInstance) {
@@ -322,6 +505,11 @@ proto.bucketeer.feature.RolloutStrategy.deserializeBinaryFromReader = function(m
322
505
  reader.readMessage(value,proto.bucketeer.feature.RolloutStrategy.Variation.deserializeBinaryFromReader);
323
506
  msg.addVariations(value);
324
507
  break;
508
+ case 2:
509
+ var value = new proto.bucketeer.feature.Audience;
510
+ reader.readMessage(value,proto.bucketeer.feature.Audience.deserializeBinaryFromReader);
511
+ msg.setAudience(value);
512
+ break;
325
513
  default:
326
514
  reader.skipField();
327
515
  break;
@@ -359,6 +547,14 @@ proto.bucketeer.feature.RolloutStrategy.serializeBinaryToWriter = function(messa
359
547
  proto.bucketeer.feature.RolloutStrategy.Variation.serializeBinaryToWriter
360
548
  );
361
549
  }
550
+ f = message.getAudience();
551
+ if (f != null) {
552
+ writer.writeMessage(
553
+ 2,
554
+ f,
555
+ proto.bucketeer.feature.Audience.serializeBinaryToWriter
556
+ );
557
+ }
362
558
  };
363
559
 
364
560
 
@@ -394,8 +590,8 @@ proto.bucketeer.feature.RolloutStrategy.Variation.prototype.toObject = function(
394
590
  */
395
591
  proto.bucketeer.feature.RolloutStrategy.Variation.toObject = function(includeInstance, msg) {
396
592
  var f, obj = {
397
- variation: jspb.Message.getFieldWithDefault(msg, 1, ""),
398
- weight: jspb.Message.getFieldWithDefault(msg, 2, 0)
593
+ variation: jspb.Message.getFieldWithDefault(msg, 1, ""),
594
+ weight: jspb.Message.getFieldWithDefault(msg, 2, 0)
399
595
  };
400
596
 
401
597
  if (includeInstance) {
@@ -560,6 +756,43 @@ proto.bucketeer.feature.RolloutStrategy.prototype.clearVariationsList = function
560
756
  };
561
757
 
562
758
 
759
+ /**
760
+ * optional Audience audience = 2;
761
+ * @return {?proto.bucketeer.feature.Audience}
762
+ */
763
+ proto.bucketeer.feature.RolloutStrategy.prototype.getAudience = function() {
764
+ return /** @type{?proto.bucketeer.feature.Audience} */ (
765
+ jspb.Message.getWrapperField(this, proto.bucketeer.feature.Audience, 2));
766
+ };
767
+
768
+
769
+ /**
770
+ * @param {?proto.bucketeer.feature.Audience|undefined} value
771
+ * @return {!proto.bucketeer.feature.RolloutStrategy} returns this
772
+ */
773
+ proto.bucketeer.feature.RolloutStrategy.prototype.setAudience = function(value) {
774
+ return jspb.Message.setWrapperField(this, 2, value);
775
+ };
776
+
777
+
778
+ /**
779
+ * Clears the message field making it undefined.
780
+ * @return {!proto.bucketeer.feature.RolloutStrategy} returns this
781
+ */
782
+ proto.bucketeer.feature.RolloutStrategy.prototype.clearAudience = function() {
783
+ return this.setAudience(undefined);
784
+ };
785
+
786
+
787
+ /**
788
+ * Returns whether this field is set.
789
+ * @return {boolean}
790
+ */
791
+ proto.bucketeer.feature.RolloutStrategy.prototype.hasAudience = function() {
792
+ return jspb.Message.getField(this, 2) != null;
793
+ };
794
+
795
+
563
796
 
564
797
 
565
798
 
@@ -592,9 +825,9 @@ proto.bucketeer.feature.Strategy.prototype.toObject = function(opt_includeInstan
592
825
  */
593
826
  proto.bucketeer.feature.Strategy.toObject = function(includeInstance, msg) {
594
827
  var f, obj = {
595
- type: jspb.Message.getFieldWithDefault(msg, 1, 0),
596
- fixedStrategy: (f = msg.getFixedStrategy()) && proto.bucketeer.feature.FixedStrategy.toObject(includeInstance, f),
597
- rolloutStrategy: (f = msg.getRolloutStrategy()) && proto.bucketeer.feature.RolloutStrategy.toObject(includeInstance, f)
828
+ type: jspb.Message.getFieldWithDefault(msg, 1, 0),
829
+ fixedStrategy: (f = msg.getFixedStrategy()) && proto.bucketeer.feature.FixedStrategy.toObject(includeInstance, f),
830
+ rolloutStrategy: (f = msg.getRolloutStrategy()) && proto.bucketeer.feature.RolloutStrategy.toObject(includeInstance, f)
598
831
  };
599
832
 
600
833
  if (includeInstance) {
@@ -1,7 +1,7 @@
1
1
  // package: bucketeer.feature
2
2
  // file: proto/feature/target.proto
3
3
 
4
- import * as jspb from 'google-protobuf';
4
+ import * as jspb from "google-protobuf";
5
5
 
6
6
  export class Target extends jspb.Message {
7
7
  getVariation(): string;
@@ -10,7 +10,7 @@
10
10
  * @public
11
11
  */
12
12
  // GENERATED CODE -- DO NOT EDIT!
13
-
13
+ /* eslint-disable */
14
14
  // @ts-nocheck
15
15
 
16
16
  var jspb = require('google-protobuf');
@@ -8,7 +8,7 @@
8
8
  * @public
9
9
  */
10
10
  // GENERATED CODE -- DO NOT EDIT!
11
-
11
+ /* eslint-disable */
12
12
  // @ts-nocheck
13
13
 
14
14
  var jspb = require('google-protobuf');
@@ -82,8 +82,8 @@ proto.bucketeer.feature.Target.prototype.toObject = function(opt_includeInstance
82
82
  */
83
83
  proto.bucketeer.feature.Target.toObject = function(includeInstance, msg) {
84
84
  var f, obj = {
85
- variation: jspb.Message.getFieldWithDefault(msg, 1, ""),
86
- usersList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f
85
+ variation: jspb.Message.getFieldWithDefault(msg, 1, ""),
86
+ usersList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f
87
87
  };
88
88
 
89
89
  if (includeInstance) {
@@ -1,7 +1,7 @@
1
1
  // package: bucketeer.feature
2
2
  // file: proto/feature/variation.proto
3
3
 
4
- import * as jspb from 'google-protobuf';
4
+ import * as jspb from "google-protobuf";
5
5
 
6
6
  export class Variation extends jspb.Message {
7
7
  getId(): string;
@@ -10,7 +10,7 @@
10
10
  * @public
11
11
  */
12
12
  // GENERATED CODE -- DO NOT EDIT!
13
-
13
+ /* eslint-disable */
14
14
  // @ts-nocheck
15
15
 
16
16
  var jspb = require('google-protobuf');
@@ -8,7 +8,7 @@
8
8
  * @public
9
9
  */
10
10
  // GENERATED CODE -- DO NOT EDIT!
11
-
11
+ /* eslint-disable */
12
12
  // @ts-nocheck
13
13
 
14
14
  var jspb = require('google-protobuf');
@@ -75,10 +75,10 @@ proto.bucketeer.feature.Variation.prototype.toObject = function(opt_includeInsta
75
75
  */
76
76
  proto.bucketeer.feature.Variation.toObject = function(includeInstance, msg) {
77
77
  var f, obj = {
78
- id: jspb.Message.getFieldWithDefault(msg, 1, ""),
79
- value: jspb.Message.getFieldWithDefault(msg, 2, ""),
80
- name: jspb.Message.getFieldWithDefault(msg, 3, ""),
81
- description: jspb.Message.getFieldWithDefault(msg, 4, "")
78
+ id: jspb.Message.getFieldWithDefault(msg, 1, ""),
79
+ value: jspb.Message.getFieldWithDefault(msg, 2, ""),
80
+ name: jspb.Message.getFieldWithDefault(msg, 3, ""),
81
+ description: jspb.Message.getFieldWithDefault(msg, 4, "")
82
82
  };
83
83
 
84
84
  if (includeInstance) {
@@ -1,7 +1,7 @@
1
1
  // package: bucketeer.user
2
2
  // file: proto/user/user.proto
3
3
 
4
- import * as jspb from 'google-protobuf';
4
+ import * as jspb from "google-protobuf";
5
5
 
6
6
  export class User extends jspb.Message {
7
7
  getId(): string;
@@ -56,3 +56,55 @@ export namespace User {
56
56
  }
57
57
  }
58
58
 
59
+ export class UserAttributes extends jspb.Message {
60
+ getEnvironmentId(): string;
61
+ setEnvironmentId(value: string): void;
62
+
63
+ clearUserAttributesList(): void;
64
+ getUserAttributesList(): Array<UserAttribute>;
65
+ setUserAttributesList(value: Array<UserAttribute>): void;
66
+ addUserAttributes(value?: UserAttribute, index?: number): UserAttribute;
67
+
68
+ serializeBinary(): Uint8Array;
69
+ toObject(includeInstance?: boolean): UserAttributes.AsObject;
70
+ static toObject(includeInstance: boolean, msg: UserAttributes): UserAttributes.AsObject;
71
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
72
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
73
+ static serializeBinaryToWriter(message: UserAttributes, writer: jspb.BinaryWriter): void;
74
+ static deserializeBinary(bytes: Uint8Array): UserAttributes;
75
+ static deserializeBinaryFromReader(message: UserAttributes, reader: jspb.BinaryReader): UserAttributes;
76
+ }
77
+
78
+ export namespace UserAttributes {
79
+ export type AsObject = {
80
+ environmentId: string,
81
+ userAttributesList: Array<UserAttribute.AsObject>,
82
+ }
83
+ }
84
+
85
+ export class UserAttribute extends jspb.Message {
86
+ getKey(): string;
87
+ setKey(value: string): void;
88
+
89
+ clearValuesList(): void;
90
+ getValuesList(): Array<string>;
91
+ setValuesList(value: Array<string>): void;
92
+ addValues(value: string, index?: number): string;
93
+
94
+ serializeBinary(): Uint8Array;
95
+ toObject(includeInstance?: boolean): UserAttribute.AsObject;
96
+ static toObject(includeInstance: boolean, msg: UserAttribute): UserAttribute.AsObject;
97
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
98
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
99
+ static serializeBinaryToWriter(message: UserAttribute, writer: jspb.BinaryWriter): void;
100
+ static deserializeBinary(bytes: Uint8Array): UserAttribute;
101
+ static deserializeBinaryFromReader(message: UserAttribute, reader: jspb.BinaryReader): UserAttribute;
102
+ }
103
+
104
+ export namespace UserAttribute {
105
+ export type AsObject = {
106
+ key: string,
107
+ valuesList: Array<string>,
108
+ }
109
+ }
110
+