@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.
- package/CHANGELOG.md +45 -0
- package/README.md +36 -6
- package/lib/bucketeer.d.ts +6 -0
- package/lib/bucketeer.js +65 -0
- package/lib/bucketeer.mjs +38 -0
- package/lib/clauseEvaluator.js +49 -7
- package/lib/clauseEvaluator.mjs +41 -7
- package/lib/evaluation.d.ts +10 -1
- package/lib/evaluation.js +184 -27
- package/lib/evaluation.mjs +141 -10
- package/lib/index.d.ts +12 -10
- package/lib/index.js +61 -40
- package/lib/index.mjs +16 -10
- package/lib/modelFactory.d.ts +1 -0
- package/lib/modelFactory.js +2 -0
- package/lib/modelFactory.mjs +2 -0
- package/lib/proto/event/client/event_pb.d.ts +19 -9
- package/lib/proto/event/client/event_pb.js +22 -12
- package/lib/proto/event/client/event_pb.mjs +100 -90
- package/lib/proto/feature/clause_pb.d.ts +2 -1
- package/lib/proto/feature/clause_pb.js +3 -2
- package/lib/proto/feature/clause_pb.mjs +7 -6
- package/lib/proto/feature/evaluation_pb.d.ts +3 -3
- package/lib/proto/feature/evaluation_pb.js +1 -1
- package/lib/proto/feature/evaluation_pb.mjs +15 -15
- package/lib/proto/feature/feature_last_used_info_pb.d.ts +10 -1
- package/lib/proto/feature/feature_last_used_info_pb.js +12 -1
- package/lib/proto/feature/feature_last_used_info_pb.mjs +18 -7
- package/lib/proto/feature/feature_pb.d.ts +72 -7
- package/lib/proto/feature/feature_pb.js +446 -4
- package/lib/proto/feature/feature_pb.mjs +535 -29
- package/lib/proto/feature/prerequisite_pb.d.ts +1 -1
- package/lib/proto/feature/prerequisite_pb.js +1 -1
- package/lib/proto/feature/prerequisite_pb.mjs +3 -3
- package/lib/proto/feature/reason_pb.d.ts +8 -1
- package/lib/proto/feature/reason_pb.js +9 -2
- package/lib/proto/feature/reason_pb.mjs +11 -4
- package/lib/proto/feature/rule_pb.d.ts +3 -3
- package/lib/proto/feature/rule_pb.js +1 -1
- package/lib/proto/feature/rule_pb.mjs +4 -4
- package/lib/proto/feature/segment_pb.d.ts +3 -3
- package/lib/proto/feature/segment_pb.js +1 -1
- package/lib/proto/feature/segment_pb.mjs +22 -22
- package/lib/proto/feature/strategy_pb.d.ts +31 -1
- package/lib/proto/feature/strategy_pb.js +206 -2
- package/lib/proto/feature/strategy_pb.mjs +242 -9
- package/lib/proto/feature/target_pb.d.ts +1 -1
- package/lib/proto/feature/target_pb.js +1 -1
- package/lib/proto/feature/target_pb.mjs +3 -3
- package/lib/proto/feature/variation_pb.d.ts +1 -1
- package/lib/proto/feature/variation_pb.js +1 -1
- package/lib/proto/feature/variation_pb.mjs +5 -5
- package/lib/proto/user/user_pb.d.ts +53 -1
- package/lib/proto/user/user_pb.js +374 -1
- package/lib/proto/user/user_pb.mjs +427 -7
- package/lib/strategyEvaluator.d.ts +0 -2
- package/lib/strategyEvaluator.js +23 -57
- package/lib/strategyEvaluator.mjs +23 -46
- package/lib/userEvaluation.js +13 -3
- package/lib/userEvaluation.mjs +13 -3
- package/package.json +15 -8
- package/lib/google/api/annotations_pb.d.ts +0 -8
- package/lib/google/api/annotations_pb.js +0 -40
- package/lib/google/api/annotations_pb.mjs +0 -54
- package/lib/google/api/annotations_pb_service.d.ts +0 -3
- package/lib/google/api/annotations_pb_service.js +0 -3
- package/lib/google/api/annotations_pb_service.mjs +0 -3
- package/lib/google/api/http_pb.d.ts +0 -132
- package/lib/google/api/http_pb.js +0 -860
- package/lib/google/api/http_pb.mjs +0 -982
- package/lib/google/api/http_pb_service.d.ts +0 -3
- package/lib/google/api/http_pb_service.js +0 -3
- package/lib/google/api/http_pb_service.mjs +0 -3
- package/lib/google/rpc/code_pb.d.ts +0 -26
- package/lib/google/rpc/code_pb.js +0 -44
- package/lib/google/rpc/code_pb.mjs +0 -48
- package/lib/google/rpc/code_pb_service.d.ts +0 -3
- package/lib/google/rpc/code_pb_service.js +0 -3
- package/lib/google/rpc/code_pb_service.mjs +0 -3
- package/lib/google/rpc/error_details_pb.d.ts +0 -322
- package/lib/google/rpc/error_details_pb.js +0 -2220
- package/lib/google/rpc/error_details_pb.mjs +0 -2499
- package/lib/google/rpc/error_details_pb_service.d.ts +0 -3
- package/lib/google/rpc/error_details_pb_service.js +0 -3
- package/lib/google/rpc/error_details_pb_service.mjs +0 -3
- package/lib/google/rpc/status_pb.d.ts +0 -36
- package/lib/google/rpc/status_pb.js +0 -235
- package/lib/google/rpc/status_pb.mjs +0 -268
- package/lib/google/rpc/status_pb_service.d.ts +0 -3
- package/lib/google/rpc/status_pb_service.js +0 -3
- package/lib/google/rpc/status_pb_service.mjs +0 -3
- package/lib/proto/event/client/event_pb_service.d.ts +0 -3
- package/lib/proto/event/client/event_pb_service.js +0 -3
- package/lib/proto/event/client/event_pb_service.mjs +0 -3
- package/lib/proto/event/domain/event_pb.d.ts +0 -4518
- package/lib/proto/event/domain/event_pb.js +0 -10834
- package/lib/proto/event/domain/event_pb.mjs +0 -33315
- package/lib/proto/event/domain/event_pb_service.d.ts +0 -3
- package/lib/proto/event/domain/event_pb_service.js +0 -3
- package/lib/proto/event/domain/event_pb_service.mjs +0 -3
- package/lib/proto/event/domain/localized_message_pb.d.ts +0 -29
- package/lib/proto/event/domain/localized_message_pb.js +0 -183
- package/lib/proto/event/domain/localized_message_pb.mjs +0 -206
- package/lib/proto/event/domain/localized_message_pb_service.d.ts +0 -3
- package/lib/proto/event/domain/localized_message_pb_service.js +0 -3
- package/lib/proto/event/domain/localized_message_pb_service.mjs +0 -3
- package/lib/proto/event/service/feature_pb.d.ts +0 -44
- package/lib/proto/event/service/feature_pb.js +0 -277
- package/lib/proto/event/service/feature_pb.mjs +0 -319
- package/lib/proto/event/service/feature_pb_service.d.ts +0 -3
- package/lib/proto/event/service/feature_pb_service.js +0 -3
- package/lib/proto/event/service/feature_pb_service.mjs +0 -3
- package/lib/proto/event/service/segment_pb.d.ts +0 -51
- package/lib/proto/event/service/segment_pb.js +0 -324
- package/lib/proto/event/service/segment_pb.mjs +0 -375
- package/lib/proto/event/service/segment_pb_service.d.ts +0 -3
- package/lib/proto/event/service/segment_pb_service.js +0 -3
- package/lib/proto/event/service/segment_pb_service.mjs +0 -3
- package/lib/proto/event/service/user_pb.d.ts +0 -49
- package/lib/proto/event/service/user_pb.js +0 -315
- package/lib/proto/event/service/user_pb.mjs +0 -362
- package/lib/proto/event/service/user_pb_service.d.ts +0 -3
- package/lib/proto/event/service/user_pb_service.js +0 -3
- package/lib/proto/event/service/user_pb_service.mjs +0 -3
- package/lib/proto/feature/clause_pb_service.d.ts +0 -3
- package/lib/proto/feature/clause_pb_service.js +0 -3
- package/lib/proto/feature/clause_pb_service.mjs +0 -3
- package/lib/proto/feature/command_pb.d.ts +0 -1213
- package/lib/proto/feature/command_pb.js +0 -8260
- package/lib/proto/feature/command_pb.mjs +0 -9275
- package/lib/proto/feature/command_pb_service.d.ts +0 -3
- package/lib/proto/feature/command_pb_service.js +0 -3
- package/lib/proto/feature/command_pb_service.mjs +0 -3
- package/lib/proto/feature/evaluation_pb_service.d.ts +0 -3
- package/lib/proto/feature/evaluation_pb_service.js +0 -3
- package/lib/proto/feature/evaluation_pb_service.mjs +0 -3
- package/lib/proto/feature/feature_last_used_info_pb_service.d.ts +0 -3
- package/lib/proto/feature/feature_last_used_info_pb_service.js +0 -3
- package/lib/proto/feature/feature_last_used_info_pb_service.mjs +0 -3
- package/lib/proto/feature/feature_pb_service.d.ts +0 -3
- package/lib/proto/feature/feature_pb_service.js +0 -3
- package/lib/proto/feature/feature_pb_service.mjs +0 -3
- package/lib/proto/feature/flag_trigger_pb.d.ts +0 -84
- package/lib/proto/feature/flag_trigger_pb.js +0 -452
- package/lib/proto/feature/flag_trigger_pb.mjs +0 -525
- package/lib/proto/feature/flag_trigger_pb_service.d.ts +0 -3
- package/lib/proto/feature/flag_trigger_pb_service.js +0 -3
- package/lib/proto/feature/flag_trigger_pb_service.mjs +0 -3
- package/lib/proto/feature/prerequisite_pb_service.d.ts +0 -3
- package/lib/proto/feature/prerequisite_pb_service.js +0 -3
- package/lib/proto/feature/prerequisite_pb_service.mjs +0 -3
- package/lib/proto/feature/reason_pb_service.d.ts +0 -3
- package/lib/proto/feature/reason_pb_service.js +0 -3
- package/lib/proto/feature/reason_pb_service.mjs +0 -3
- package/lib/proto/feature/rule_pb_service.d.ts +0 -3
- package/lib/proto/feature/rule_pb_service.js +0 -3
- package/lib/proto/feature/rule_pb_service.mjs +0 -3
- package/lib/proto/feature/segment_pb_service.d.ts +0 -3
- package/lib/proto/feature/segment_pb_service.js +0 -3
- package/lib/proto/feature/segment_pb_service.mjs +0 -3
- package/lib/proto/feature/service_pb.d.ts +0 -2158
- package/lib/proto/feature/service_pb.js +0 -5363
- package/lib/proto/feature/service_pb.mjs +0 -16348
- package/lib/proto/feature/service_pb_service.d.ts +0 -747
- package/lib/proto/feature/service_pb_service.js +0 -1424
- package/lib/proto/feature/service_pb_service.mjs +0 -1501
- package/lib/proto/feature/strategy_pb_service.d.ts +0 -3
- package/lib/proto/feature/strategy_pb_service.js +0 -3
- package/lib/proto/feature/strategy_pb_service.mjs +0 -3
- package/lib/proto/feature/target_pb_service.d.ts +0 -3
- package/lib/proto/feature/target_pb_service.js +0 -3
- package/lib/proto/feature/target_pb_service.mjs +0 -3
- package/lib/proto/feature/variation_pb_service.d.ts +0 -3
- package/lib/proto/feature/variation_pb_service.js +0 -3
- package/lib/proto/feature/variation_pb_service.mjs +0 -3
- package/lib/proto/gateway/service_pb.d.ts +0 -772
- package/lib/proto/gateway/service_pb.js +0 -5249
- package/lib/proto/gateway/service_pb.mjs +0 -6001
- package/lib/proto/gateway/service_pb_service.d.ts +0 -253
- package/lib/proto/gateway/service_pb_service.js +0 -436
- package/lib/proto/gateway/service_pb_service.mjs +0 -461
- package/lib/proto/user/user_pb_service.d.ts +0 -3
- package/lib/proto/user/user_pb_service.js +0 -3
- package/lib/proto/user/user_pb_service.mjs +0 -3
- package/lib/protoc-gen-openapiv2/options/annotations_pb.d.ts +0 -16
- package/lib/protoc-gen-openapiv2/options/annotations_pb.js +0 -100
- package/lib/protoc-gen-openapiv2/options/annotations_pb.mjs +0 -158
- package/lib/protoc-gen-openapiv2/options/annotations_pb_service.d.ts +0 -3
- package/lib/protoc-gen-openapiv2/options/annotations_pb_service.js +0 -3
- package/lib/protoc-gen-openapiv2/options/annotations_pb_service.mjs +0 -3
- package/lib/protoc-gen-openapiv2/options/openapiv2_pb.d.ts +0 -834
- package/lib/protoc-gen-openapiv2/options/openapiv2_pb.js +0 -5456
- package/lib/protoc-gen-openapiv2/options/openapiv2_pb.mjs +0 -6256
- package/lib/protoc-gen-openapiv2/options/openapiv2_pb_service.d.ts +0 -3
- package/lib/protoc-gen-openapiv2/options/openapiv2_pb_service.js +0 -3
- 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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
398
|
-
|
|
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
|
-
|
|
596
|
-
|
|
597
|
-
|
|
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) {
|
|
@@ -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
|
-
|
|
86
|
-
|
|
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) {
|
|
@@ -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
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
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
|
|
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
|
+
|