@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// package: bucketeer.feature
|
|
2
2
|
// file: proto/feature/reason.proto
|
|
3
3
|
|
|
4
|
-
import * as jspb from
|
|
4
|
+
import * as jspb from "google-protobuf";
|
|
5
5
|
|
|
6
6
|
export class Reason extends jspb.Message {
|
|
7
7
|
getType(): Reason.TypeMap[keyof Reason.TypeMap];
|
|
@@ -33,6 +33,13 @@ export namespace Reason {
|
|
|
33
33
|
CLIENT: 4;
|
|
34
34
|
OFF_VARIATION: 5;
|
|
35
35
|
PREREQUISITE: 6;
|
|
36
|
+
ERROR_NO_EVALUATIONS: 20;
|
|
37
|
+
ERROR_FLAG_NOT_FOUND: 21;
|
|
38
|
+
ERROR_WRONG_TYPE: 22;
|
|
39
|
+
ERROR_USER_ID_NOT_SPECIFIED: 23;
|
|
40
|
+
ERROR_FEATURE_FLAG_ID_NOT_SPECIFIED: 24;
|
|
41
|
+
ERROR_EXCEPTION: 25;
|
|
42
|
+
ERROR_CACHE_NOT_FOUND: 26;
|
|
36
43
|
}
|
|
37
44
|
|
|
38
45
|
export const Type: TypeMap;
|
|
@@ -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');
|
|
@@ -159,7 +159,14 @@ proto.bucketeer.feature.Reason.Type = {
|
|
|
159
159
|
DEFAULT: 3,
|
|
160
160
|
CLIENT: 4,
|
|
161
161
|
OFF_VARIATION: 5,
|
|
162
|
-
PREREQUISITE: 6
|
|
162
|
+
PREREQUISITE: 6,
|
|
163
|
+
ERROR_NO_EVALUATIONS: 20,
|
|
164
|
+
ERROR_FLAG_NOT_FOUND: 21,
|
|
165
|
+
ERROR_WRONG_TYPE: 22,
|
|
166
|
+
ERROR_USER_ID_NOT_SPECIFIED: 23,
|
|
167
|
+
ERROR_FEATURE_FLAG_ID_NOT_SPECIFIED: 24,
|
|
168
|
+
ERROR_EXCEPTION: 25,
|
|
169
|
+
ERROR_CACHE_NOT_FOUND: 26
|
|
163
170
|
};
|
|
164
171
|
|
|
165
172
|
/**
|
|
@@ -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');
|
|
@@ -76,8 +76,8 @@ proto.bucketeer.feature.Reason.prototype.toObject = function(opt_includeInstance
|
|
|
76
76
|
*/
|
|
77
77
|
proto.bucketeer.feature.Reason.toObject = function(includeInstance, msg) {
|
|
78
78
|
var f, obj = {
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
type: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
|
80
|
+
ruleId: jspb.Message.getFieldWithDefault(msg, 2, "")
|
|
81
81
|
};
|
|
82
82
|
|
|
83
83
|
if (includeInstance) {
|
|
@@ -177,7 +177,14 @@ proto.bucketeer.feature.Reason.Type = {
|
|
|
177
177
|
DEFAULT: 3,
|
|
178
178
|
CLIENT: 4,
|
|
179
179
|
OFF_VARIATION: 5,
|
|
180
|
-
PREREQUISITE: 6
|
|
180
|
+
PREREQUISITE: 6,
|
|
181
|
+
ERROR_NO_EVALUATIONS: 20,
|
|
182
|
+
ERROR_FLAG_NOT_FOUND: 21,
|
|
183
|
+
ERROR_WRONG_TYPE: 22,
|
|
184
|
+
ERROR_USER_ID_NOT_SPECIFIED: 23,
|
|
185
|
+
ERROR_FEATURE_FLAG_ID_NOT_SPECIFIED: 24,
|
|
186
|
+
ERROR_EXCEPTION: 25,
|
|
187
|
+
ERROR_CACHE_NOT_FOUND: 26
|
|
181
188
|
};
|
|
182
189
|
|
|
183
190
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// package: bucketeer.feature
|
|
2
2
|
// file: proto/feature/rule.proto
|
|
3
3
|
|
|
4
|
-
import * as jspb from
|
|
5
|
-
import * as proto_feature_clause_pb from
|
|
6
|
-
import * as proto_feature_strategy_pb from
|
|
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
7
|
|
|
8
8
|
export class Rule extends jspb.Message {
|
|
9
9
|
getId(): string;
|
|
@@ -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');
|
|
@@ -86,9 +86,9 @@ proto.bucketeer.feature.Rule.prototype.toObject = function(opt_includeInstance)
|
|
|
86
86
|
*/
|
|
87
87
|
proto.bucketeer.feature.Rule.toObject = function(includeInstance, msg) {
|
|
88
88
|
var f, obj = {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
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
92
|
proto_feature_clause_pb.Clause.toObject, includeInstance)
|
|
93
93
|
};
|
|
94
94
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// package: bucketeer.feature
|
|
2
2
|
// file: proto/feature/segment.proto
|
|
3
3
|
|
|
4
|
-
import * as jspb from
|
|
5
|
-
import * as proto_feature_rule_pb from
|
|
6
|
-
import * as proto_feature_feature_pb from
|
|
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
7
|
|
|
8
8
|
export class Segment extends jspb.Message {
|
|
9
9
|
getId(): string;
|
|
@@ -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');
|
|
@@ -132,20 +132,20 @@ proto.bucketeer.feature.Segment.prototype.toObject = function(opt_includeInstanc
|
|
|
132
132
|
*/
|
|
133
133
|
proto.bucketeer.feature.Segment.toObject = function(includeInstance, msg) {
|
|
134
134
|
var f, obj = {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
135
|
+
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
136
|
+
name: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
137
|
+
description: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
|
138
|
+
rulesList: jspb.Message.toObjectList(msg.getRulesList(),
|
|
139
139
|
proto_feature_rule_pb.Rule.toObject, includeInstance),
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
140
|
+
createdAt: jspb.Message.getFieldWithDefault(msg, 5, 0),
|
|
141
|
+
updatedAt: jspb.Message.getFieldWithDefault(msg, 6, 0),
|
|
142
|
+
version: jspb.Message.getFieldWithDefault(msg, 7, 0),
|
|
143
|
+
deleted: jspb.Message.getBooleanFieldWithDefault(msg, 8, false),
|
|
144
|
+
includedUserCount: jspb.Message.getFieldWithDefault(msg, 9, 0),
|
|
145
|
+
excludedUserCount: jspb.Message.getFieldWithDefault(msg, 10, 0),
|
|
146
|
+
status: jspb.Message.getFieldWithDefault(msg, 11, 0),
|
|
147
|
+
isInUseStatus: jspb.Message.getBooleanFieldWithDefault(msg, 12, false),
|
|
148
|
+
featuresList: jspb.Message.toObjectList(msg.getFeaturesList(),
|
|
149
149
|
proto_feature_feature_pb.Feature.toObject, includeInstance)
|
|
150
150
|
};
|
|
151
151
|
|
|
@@ -678,11 +678,11 @@ proto.bucketeer.feature.SegmentUser.prototype.toObject = function(opt_includeIns
|
|
|
678
678
|
*/
|
|
679
679
|
proto.bucketeer.feature.SegmentUser.toObject = function(includeInstance, msg) {
|
|
680
680
|
var f, obj = {
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
681
|
+
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
682
|
+
segmentId: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
683
|
+
userId: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
|
684
|
+
state: jspb.Message.getFieldWithDefault(msg, 4, 0),
|
|
685
|
+
deleted: jspb.Message.getBooleanFieldWithDefault(msg, 5, false)
|
|
686
686
|
};
|
|
687
687
|
|
|
688
688
|
if (includeInstance) {
|
|
@@ -943,10 +943,10 @@ proto.bucketeer.feature.SegmentUsers.prototype.toObject = function(opt_includeIn
|
|
|
943
943
|
*/
|
|
944
944
|
proto.bucketeer.feature.SegmentUsers.toObject = function(includeInstance, msg) {
|
|
945
945
|
var f, obj = {
|
|
946
|
-
|
|
947
|
-
|
|
946
|
+
segmentId: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
947
|
+
usersList: jspb.Message.toObjectList(msg.getUsersList(),
|
|
948
948
|
proto.bucketeer.feature.SegmentUser.toObject, includeInstance),
|
|
949
|
-
|
|
949
|
+
updatedAt: jspb.Message.getFieldWithDefault(msg, 3, 0)
|
|
950
950
|
};
|
|
951
951
|
|
|
952
952
|
if (includeInstance) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// package: bucketeer.feature
|
|
2
2
|
// file: proto/feature/strategy.proto
|
|
3
3
|
|
|
4
|
-
import * as jspb from
|
|
4
|
+
import * as jspb from "google-protobuf";
|
|
5
5
|
|
|
6
6
|
export class FixedStrategy extends jspb.Message {
|
|
7
7
|
getVariation(): string;
|
|
@@ -23,12 +23,41 @@ export namespace FixedStrategy {
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
export class Audience extends jspb.Message {
|
|
27
|
+
getPercentage(): number;
|
|
28
|
+
setPercentage(value: number): void;
|
|
29
|
+
|
|
30
|
+
getDefaultVariation(): string;
|
|
31
|
+
setDefaultVariation(value: string): void;
|
|
32
|
+
|
|
33
|
+
serializeBinary(): Uint8Array;
|
|
34
|
+
toObject(includeInstance?: boolean): Audience.AsObject;
|
|
35
|
+
static toObject(includeInstance: boolean, msg: Audience): Audience.AsObject;
|
|
36
|
+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
37
|
+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
38
|
+
static serializeBinaryToWriter(message: Audience, writer: jspb.BinaryWriter): void;
|
|
39
|
+
static deserializeBinary(bytes: Uint8Array): Audience;
|
|
40
|
+
static deserializeBinaryFromReader(message: Audience, reader: jspb.BinaryReader): Audience;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export namespace Audience {
|
|
44
|
+
export type AsObject = {
|
|
45
|
+
percentage: number,
|
|
46
|
+
defaultVariation: string,
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
26
50
|
export class RolloutStrategy extends jspb.Message {
|
|
27
51
|
clearVariationsList(): void;
|
|
28
52
|
getVariationsList(): Array<RolloutStrategy.Variation>;
|
|
29
53
|
setVariationsList(value: Array<RolloutStrategy.Variation>): void;
|
|
30
54
|
addVariations(value?: RolloutStrategy.Variation, index?: number): RolloutStrategy.Variation;
|
|
31
55
|
|
|
56
|
+
hasAudience(): boolean;
|
|
57
|
+
clearAudience(): void;
|
|
58
|
+
getAudience(): Audience | undefined;
|
|
59
|
+
setAudience(value?: Audience): void;
|
|
60
|
+
|
|
32
61
|
serializeBinary(): Uint8Array;
|
|
33
62
|
toObject(includeInstance?: boolean): RolloutStrategy.AsObject;
|
|
34
63
|
static toObject(includeInstance: boolean, msg: RolloutStrategy): RolloutStrategy.AsObject;
|
|
@@ -42,6 +71,7 @@ export class RolloutStrategy extends jspb.Message {
|
|
|
42
71
|
export namespace RolloutStrategy {
|
|
43
72
|
export type AsObject = {
|
|
44
73
|
variationsList: Array<RolloutStrategy.Variation.AsObject>,
|
|
74
|
+
audience?: Audience.AsObject,
|
|
45
75
|
}
|
|
46
76
|
|
|
47
77
|
export class Variation extends jspb.Message {
|
|
@@ -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');
|
|
@@ -18,6 +18,7 @@ var goog = jspb;
|
|
|
18
18
|
var global = typeof globalThis !== 'undefined' && globalThis || typeof window !== 'undefined' && window || typeof global !== 'undefined' && global || typeof self !== 'undefined' && self || function () {
|
|
19
19
|
return this;
|
|
20
20
|
}.call(null) || Function('return this')();
|
|
21
|
+
goog.exportSymbol('proto.bucketeer.feature.Audience', null, global);
|
|
21
22
|
goog.exportSymbol('proto.bucketeer.feature.FixedStrategy', null, global);
|
|
22
23
|
goog.exportSymbol('proto.bucketeer.feature.RolloutStrategy', null, global);
|
|
23
24
|
goog.exportSymbol('proto.bucketeer.feature.RolloutStrategy.Variation', null, global);
|
|
@@ -44,6 +45,27 @@ if (goog.DEBUG && !COMPILED) {
|
|
|
44
45
|
*/
|
|
45
46
|
proto.bucketeer.feature.FixedStrategy.displayName = 'proto.bucketeer.feature.FixedStrategy';
|
|
46
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* Generated by JsPbCodeGenerator.
|
|
50
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
51
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
52
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
53
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
54
|
+
* valid.
|
|
55
|
+
* @extends {jspb.Message}
|
|
56
|
+
* @constructor
|
|
57
|
+
*/
|
|
58
|
+
proto.bucketeer.feature.Audience = function (opt_data) {
|
|
59
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
60
|
+
};
|
|
61
|
+
goog.inherits(proto.bucketeer.feature.Audience, jspb.Message);
|
|
62
|
+
if (goog.DEBUG && !COMPILED) {
|
|
63
|
+
/**
|
|
64
|
+
* @public
|
|
65
|
+
* @override
|
|
66
|
+
*/
|
|
67
|
+
proto.bucketeer.feature.Audience.displayName = 'proto.bucketeer.feature.Audience';
|
|
68
|
+
}
|
|
47
69
|
/**
|
|
48
70
|
* Generated by JsPbCodeGenerator.
|
|
49
71
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
@@ -222,6 +244,146 @@ proto.bucketeer.feature.FixedStrategy.prototype.getVariation = function () {
|
|
|
222
244
|
proto.bucketeer.feature.FixedStrategy.prototype.setVariation = function (value) {
|
|
223
245
|
return jspb.Message.setProto3StringField(this, 1, value);
|
|
224
246
|
};
|
|
247
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
248
|
+
/**
|
|
249
|
+
* Creates an object representation of this proto.
|
|
250
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
251
|
+
* Optional fields that are not set will be set to undefined.
|
|
252
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
253
|
+
* For the list of reserved names please see:
|
|
254
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
255
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
256
|
+
* JSPB instance for transitional soy proto support:
|
|
257
|
+
* http://goto/soy-param-migration
|
|
258
|
+
* @return {!Object}
|
|
259
|
+
*/
|
|
260
|
+
proto.bucketeer.feature.Audience.prototype.toObject = function (opt_includeInstance) {
|
|
261
|
+
return proto.bucketeer.feature.Audience.toObject(opt_includeInstance, this);
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Static version of the {@see toObject} method.
|
|
266
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
267
|
+
* the JSPB instance for transitional soy proto support:
|
|
268
|
+
* http://goto/soy-param-migration
|
|
269
|
+
* @param {!proto.bucketeer.feature.Audience} msg The msg instance to transform.
|
|
270
|
+
* @return {!Object}
|
|
271
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
272
|
+
*/
|
|
273
|
+
proto.bucketeer.feature.Audience.toObject = function (includeInstance, msg) {
|
|
274
|
+
var f,
|
|
275
|
+
obj = {
|
|
276
|
+
percentage: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
|
277
|
+
defaultVariation: jspb.Message.getFieldWithDefault(msg, 2, "")
|
|
278
|
+
};
|
|
279
|
+
if (includeInstance) {
|
|
280
|
+
obj.$jspbMessageInstance = msg;
|
|
281
|
+
}
|
|
282
|
+
return obj;
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Deserializes binary data (in protobuf wire format).
|
|
288
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
289
|
+
* @return {!proto.bucketeer.feature.Audience}
|
|
290
|
+
*/
|
|
291
|
+
proto.bucketeer.feature.Audience.deserializeBinary = function (bytes) {
|
|
292
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
293
|
+
var msg = new proto.bucketeer.feature.Audience();
|
|
294
|
+
return proto.bucketeer.feature.Audience.deserializeBinaryFromReader(msg, reader);
|
|
295
|
+
};
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
299
|
+
* given reader into the given message object.
|
|
300
|
+
* @param {!proto.bucketeer.feature.Audience} msg The message object to deserialize into.
|
|
301
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
302
|
+
* @return {!proto.bucketeer.feature.Audience}
|
|
303
|
+
*/
|
|
304
|
+
proto.bucketeer.feature.Audience.deserializeBinaryFromReader = function (msg, reader) {
|
|
305
|
+
while (reader.nextField()) {
|
|
306
|
+
if (reader.isEndGroup()) {
|
|
307
|
+
break;
|
|
308
|
+
}
|
|
309
|
+
var field = reader.getFieldNumber();
|
|
310
|
+
switch (field) {
|
|
311
|
+
case 1:
|
|
312
|
+
var value = /** @type {number} */reader.readInt32();
|
|
313
|
+
msg.setPercentage(value);
|
|
314
|
+
break;
|
|
315
|
+
case 2:
|
|
316
|
+
var value = /** @type {string} */reader.readString();
|
|
317
|
+
msg.setDefaultVariation(value);
|
|
318
|
+
break;
|
|
319
|
+
default:
|
|
320
|
+
reader.skipField();
|
|
321
|
+
break;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
return msg;
|
|
325
|
+
};
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
329
|
+
* @return {!Uint8Array}
|
|
330
|
+
*/
|
|
331
|
+
proto.bucketeer.feature.Audience.prototype.serializeBinary = function () {
|
|
332
|
+
var writer = new jspb.BinaryWriter();
|
|
333
|
+
proto.bucketeer.feature.Audience.serializeBinaryToWriter(this, writer);
|
|
334
|
+
return writer.getResultBuffer();
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* Serializes the given message to binary data (in protobuf wire
|
|
339
|
+
* format), writing to the given BinaryWriter.
|
|
340
|
+
* @param {!proto.bucketeer.feature.Audience} message
|
|
341
|
+
* @param {!jspb.BinaryWriter} writer
|
|
342
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
343
|
+
*/
|
|
344
|
+
proto.bucketeer.feature.Audience.serializeBinaryToWriter = function (message, writer) {
|
|
345
|
+
var f = undefined;
|
|
346
|
+
f = message.getPercentage();
|
|
347
|
+
if (f !== 0) {
|
|
348
|
+
writer.writeInt32(1, f);
|
|
349
|
+
}
|
|
350
|
+
f = message.getDefaultVariation();
|
|
351
|
+
if (f.length > 0) {
|
|
352
|
+
writer.writeString(2, f);
|
|
353
|
+
}
|
|
354
|
+
};
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* optional int32 percentage = 1;
|
|
358
|
+
* @return {number}
|
|
359
|
+
*/
|
|
360
|
+
proto.bucketeer.feature.Audience.prototype.getPercentage = function () {
|
|
361
|
+
return /** @type {number} */jspb.Message.getFieldWithDefault(this, 1, 0);
|
|
362
|
+
};
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* @param {number} value
|
|
366
|
+
* @return {!proto.bucketeer.feature.Audience} returns this
|
|
367
|
+
*/
|
|
368
|
+
proto.bucketeer.feature.Audience.prototype.setPercentage = function (value) {
|
|
369
|
+
return jspb.Message.setProto3IntField(this, 1, value);
|
|
370
|
+
};
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* optional string default_variation = 2;
|
|
374
|
+
* @return {string}
|
|
375
|
+
*/
|
|
376
|
+
proto.bucketeer.feature.Audience.prototype.getDefaultVariation = function () {
|
|
377
|
+
return /** @type {string} */jspb.Message.getFieldWithDefault(this, 2, "");
|
|
378
|
+
};
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* @param {string} value
|
|
382
|
+
* @return {!proto.bucketeer.feature.Audience} returns this
|
|
383
|
+
*/
|
|
384
|
+
proto.bucketeer.feature.Audience.prototype.setDefaultVariation = function (value) {
|
|
385
|
+
return jspb.Message.setProto3StringField(this, 2, value);
|
|
386
|
+
};
|
|
225
387
|
|
|
226
388
|
/**
|
|
227
389
|
* List of repeated fields within this message type.
|
|
@@ -258,7 +420,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
|
258
420
|
proto.bucketeer.feature.RolloutStrategy.toObject = function (includeInstance, msg) {
|
|
259
421
|
var f,
|
|
260
422
|
obj = {
|
|
261
|
-
variationsList: jspb.Message.toObjectList(msg.getVariationsList(), proto.bucketeer.feature.RolloutStrategy.Variation.toObject, includeInstance)
|
|
423
|
+
variationsList: jspb.Message.toObjectList(msg.getVariationsList(), proto.bucketeer.feature.RolloutStrategy.Variation.toObject, includeInstance),
|
|
424
|
+
audience: (f = msg.getAudience()) && proto.bucketeer.feature.Audience.toObject(includeInstance, f)
|
|
262
425
|
};
|
|
263
426
|
if (includeInstance) {
|
|
264
427
|
obj.$jspbMessageInstance = msg;
|
|
@@ -297,6 +460,11 @@ proto.bucketeer.feature.RolloutStrategy.deserializeBinaryFromReader = function (
|
|
|
297
460
|
reader.readMessage(value, proto.bucketeer.feature.RolloutStrategy.Variation.deserializeBinaryFromReader);
|
|
298
461
|
msg.addVariations(value);
|
|
299
462
|
break;
|
|
463
|
+
case 2:
|
|
464
|
+
var value = new proto.bucketeer.feature.Audience();
|
|
465
|
+
reader.readMessage(value, proto.bucketeer.feature.Audience.deserializeBinaryFromReader);
|
|
466
|
+
msg.setAudience(value);
|
|
467
|
+
break;
|
|
300
468
|
default:
|
|
301
469
|
reader.skipField();
|
|
302
470
|
break;
|
|
@@ -328,6 +496,10 @@ proto.bucketeer.feature.RolloutStrategy.serializeBinaryToWriter = function (mess
|
|
|
328
496
|
if (f.length > 0) {
|
|
329
497
|
writer.writeRepeatedMessage(1, f, proto.bucketeer.feature.RolloutStrategy.Variation.serializeBinaryToWriter);
|
|
330
498
|
}
|
|
499
|
+
f = message.getAudience();
|
|
500
|
+
if (f != null) {
|
|
501
|
+
writer.writeMessage(2, f, proto.bucketeer.feature.Audience.serializeBinaryToWriter);
|
|
502
|
+
}
|
|
331
503
|
};
|
|
332
504
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
333
505
|
/**
|
|
@@ -502,6 +674,38 @@ proto.bucketeer.feature.RolloutStrategy.prototype.addVariations = function (opt_
|
|
|
502
674
|
proto.bucketeer.feature.RolloutStrategy.prototype.clearVariationsList = function () {
|
|
503
675
|
return this.setVariationsList([]);
|
|
504
676
|
};
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* optional Audience audience = 2;
|
|
680
|
+
* @return {?proto.bucketeer.feature.Audience}
|
|
681
|
+
*/
|
|
682
|
+
proto.bucketeer.feature.RolloutStrategy.prototype.getAudience = function () {
|
|
683
|
+
return /** @type{?proto.bucketeer.feature.Audience} */jspb.Message.getWrapperField(this, proto.bucketeer.feature.Audience, 2);
|
|
684
|
+
};
|
|
685
|
+
|
|
686
|
+
/**
|
|
687
|
+
* @param {?proto.bucketeer.feature.Audience|undefined} value
|
|
688
|
+
* @return {!proto.bucketeer.feature.RolloutStrategy} returns this
|
|
689
|
+
*/
|
|
690
|
+
proto.bucketeer.feature.RolloutStrategy.prototype.setAudience = function (value) {
|
|
691
|
+
return jspb.Message.setWrapperField(this, 2, value);
|
|
692
|
+
};
|
|
693
|
+
|
|
694
|
+
/**
|
|
695
|
+
* Clears the message field making it undefined.
|
|
696
|
+
* @return {!proto.bucketeer.feature.RolloutStrategy} returns this
|
|
697
|
+
*/
|
|
698
|
+
proto.bucketeer.feature.RolloutStrategy.prototype.clearAudience = function () {
|
|
699
|
+
return this.setAudience(undefined);
|
|
700
|
+
};
|
|
701
|
+
|
|
702
|
+
/**
|
|
703
|
+
* Returns whether this field is set.
|
|
704
|
+
* @return {boolean}
|
|
705
|
+
*/
|
|
706
|
+
proto.bucketeer.feature.RolloutStrategy.prototype.hasAudience = function () {
|
|
707
|
+
return jspb.Message.getField(this, 2) != null;
|
|
708
|
+
};
|
|
505
709
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
506
710
|
/**
|
|
507
711
|
* Creates an object representation of this proto.
|