@kenji71089/evaluation 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.release-please-manifest.json +3 -0
- package/README.md +9 -0
- package/eslint.config.mjs +27 -0
- package/lib/clauseEvaluator.d.ts +22 -0
- package/lib/clauseEvaluator.js +299 -0
- package/lib/clauseEvaluator.mjs +214 -0
- package/lib/dependencyEvaluator.d.ts +6 -0
- package/lib/dependencyEvaluator.js +46 -0
- package/lib/dependencyEvaluator.mjs +19 -0
- package/lib/errors.d.ts +9 -0
- package/lib/errors.js +15 -0
- package/lib/errors.mjs +12 -0
- package/lib/evaluation.d.ts +25 -0
- package/lib/evaluation.js +503 -0
- package/lib/evaluation.mjs +328 -0
- package/lib/google/api/annotations_pb.d.ts +8 -0
- package/lib/google/api/annotations_pb.js +40 -0
- package/lib/google/api/annotations_pb.mjs +54 -0
- package/lib/google/api/annotations_pb_service.d.ts +3 -0
- package/lib/google/api/annotations_pb_service.js +3 -0
- package/lib/google/api/annotations_pb_service.mjs +3 -0
- package/lib/google/api/http_pb.d.ts +132 -0
- package/lib/google/api/http_pb.js +860 -0
- package/lib/google/api/http_pb.mjs +982 -0
- package/lib/google/api/http_pb_service.d.ts +3 -0
- package/lib/google/api/http_pb_service.js +3 -0
- package/lib/google/api/http_pb_service.mjs +3 -0
- package/lib/google/rpc/code_pb.d.ts +26 -0
- package/lib/google/rpc/code_pb.js +44 -0
- package/lib/google/rpc/code_pb.mjs +48 -0
- package/lib/google/rpc/code_pb_service.d.ts +3 -0
- package/lib/google/rpc/code_pb_service.js +3 -0
- package/lib/google/rpc/code_pb_service.mjs +3 -0
- package/lib/google/rpc/error_details_pb.d.ts +322 -0
- package/lib/google/rpc/error_details_pb.js +2220 -0
- package/lib/google/rpc/error_details_pb.mjs +2499 -0
- package/lib/google/rpc/error_details_pb_service.d.ts +3 -0
- package/lib/google/rpc/error_details_pb_service.js +3 -0
- package/lib/google/rpc/error_details_pb_service.mjs +3 -0
- package/lib/google/rpc/status_pb.d.ts +36 -0
- package/lib/google/rpc/status_pb.js +235 -0
- package/lib/google/rpc/status_pb.mjs +268 -0
- package/lib/google/rpc/status_pb_service.d.ts +3 -0
- package/lib/google/rpc/status_pb_service.js +3 -0
- package/lib/google/rpc/status_pb_service.mjs +3 -0
- package/lib/index.d.ts +20 -0
- package/lib/index.js +199 -0
- package/lib/index.mjs +46 -0
- package/lib/modelFactory.d.ts +64 -0
- package/lib/modelFactory.js +206 -0
- package/lib/modelFactory.mjs +176 -0
- package/lib/proto/event/client/event_pb.d.ts +761 -0
- package/lib/proto/event/client/event_pb.js +5195 -0
- package/lib/proto/event/client/event_pb.mjs +5865 -0
- package/lib/proto/event/client/event_pb_service.d.ts +3 -0
- package/lib/proto/event/client/event_pb_service.js +3 -0
- package/lib/proto/event/client/event_pb_service.mjs +3 -0
- package/lib/proto/event/domain/event_pb.d.ts +4518 -0
- package/lib/proto/event/domain/event_pb.js +10834 -0
- package/lib/proto/event/domain/event_pb.mjs +33315 -0
- package/lib/proto/event/domain/event_pb_service.d.ts +3 -0
- package/lib/proto/event/domain/event_pb_service.js +3 -0
- package/lib/proto/event/domain/event_pb_service.mjs +3 -0
- package/lib/proto/event/domain/localized_message_pb.d.ts +29 -0
- package/lib/proto/event/domain/localized_message_pb.js +183 -0
- package/lib/proto/event/domain/localized_message_pb.mjs +206 -0
- package/lib/proto/event/domain/localized_message_pb_service.d.ts +3 -0
- package/lib/proto/event/domain/localized_message_pb_service.js +3 -0
- package/lib/proto/event/domain/localized_message_pb_service.mjs +3 -0
- package/lib/proto/event/service/feature_pb.d.ts +44 -0
- package/lib/proto/event/service/feature_pb.js +277 -0
- package/lib/proto/event/service/feature_pb.mjs +319 -0
- package/lib/proto/event/service/feature_pb_service.d.ts +3 -0
- package/lib/proto/event/service/feature_pb_service.js +3 -0
- package/lib/proto/event/service/feature_pb_service.mjs +3 -0
- package/lib/proto/event/service/segment_pb.d.ts +51 -0
- package/lib/proto/event/service/segment_pb.js +324 -0
- package/lib/proto/event/service/segment_pb.mjs +375 -0
- package/lib/proto/event/service/segment_pb_service.d.ts +3 -0
- package/lib/proto/event/service/segment_pb_service.js +3 -0
- package/lib/proto/event/service/segment_pb_service.mjs +3 -0
- package/lib/proto/event/service/user_pb.d.ts +49 -0
- package/lib/proto/event/service/user_pb.js +315 -0
- package/lib/proto/event/service/user_pb.mjs +362 -0
- package/lib/proto/event/service/user_pb_service.d.ts +3 -0
- package/lib/proto/event/service/user_pb_service.js +3 -0
- package/lib/proto/event/service/user_pb_service.mjs +3 -0
- package/lib/proto/feature/clause_pb.d.ts +57 -0
- package/lib/proto/feature/clause_pb.js +277 -0
- package/lib/proto/feature/clause_pb.mjs +312 -0
- package/lib/proto/feature/clause_pb_service.d.ts +3 -0
- package/lib/proto/feature/clause_pb_service.js +3 -0
- package/lib/proto/feature/clause_pb_service.mjs +3 -0
- package/lib/proto/feature/command_pb.d.ts +1213 -0
- package/lib/proto/feature/command_pb.js +8260 -0
- package/lib/proto/feature/command_pb.mjs +9275 -0
- package/lib/proto/feature/command_pb_service.d.ts +3 -0
- package/lib/proto/feature/command_pb_service.js +3 -0
- package/lib/proto/feature/command_pb_service.mjs +3 -0
- package/lib/proto/feature/evaluation_pb.d.ts +111 -0
- package/lib/proto/feature/evaluation_pb.js +685 -0
- package/lib/proto/feature/evaluation_pb.mjs +793 -0
- package/lib/proto/feature/evaluation_pb_service.d.ts +3 -0
- package/lib/proto/feature/evaluation_pb_service.js +3 -0
- package/lib/proto/feature/evaluation_pb_service.mjs +3 -0
- package/lib/proto/feature/feature_last_used_info_pb.d.ts +45 -0
- package/lib/proto/feature/feature_last_used_info_pb.js +283 -0
- package/lib/proto/feature/feature_last_used_info_pb.mjs +326 -0
- package/lib/proto/feature/feature_last_used_info_pb_service.d.ts +3 -0
- package/lib/proto/feature/feature_last_used_info_pb_service.js +3 -0
- package/lib/proto/feature/feature_last_used_info_pb_service.mjs +3 -0
- package/lib/proto/feature/feature_pb.d.ts +192 -0
- package/lib/proto/feature/feature_pb.js +1210 -0
- package/lib/proto/feature/feature_pb.mjs +1413 -0
- package/lib/proto/feature/feature_pb_service.d.ts +3 -0
- package/lib/proto/feature/feature_pb_service.js +3 -0
- package/lib/proto/feature/feature_pb_service.mjs +3 -0
- package/lib/proto/feature/flag_trigger_pb.d.ts +84 -0
- package/lib/proto/feature/flag_trigger_pb.js +452 -0
- package/lib/proto/feature/flag_trigger_pb.mjs +525 -0
- package/lib/proto/feature/flag_trigger_pb_service.d.ts +3 -0
- package/lib/proto/feature/flag_trigger_pb_service.js +3 -0
- package/lib/proto/feature/flag_trigger_pb_service.mjs +3 -0
- package/lib/proto/feature/prerequisite_pb.d.ts +29 -0
- package/lib/proto/feature/prerequisite_pb.js +183 -0
- package/lib/proto/feature/prerequisite_pb.mjs +206 -0
- package/lib/proto/feature/prerequisite_pb_service.d.ts +3 -0
- package/lib/proto/feature/prerequisite_pb_service.js +3 -0
- package/lib/proto/feature/prerequisite_pb_service.mjs +3 -0
- package/lib/proto/feature/reason_pb.d.ts +40 -0
- package/lib/proto/feature/reason_pb.js +196 -0
- package/lib/proto/feature/reason_pb.mjs +219 -0
- package/lib/proto/feature/reason_pb_service.d.ts +3 -0
- package/lib/proto/feature/reason_pb_service.js +3 -0
- package/lib/proto/feature/reason_pb_service.mjs +3 -0
- package/lib/proto/feature/rule_pb.d.ts +39 -0
- package/lib/proto/feature/rule_pb.js +254 -0
- package/lib/proto/feature/rule_pb.mjs +291 -0
- package/lib/proto/feature/rule_pb_service.d.ts +3 -0
- package/lib/proto/feature/rule_pb_service.js +3 -0
- package/lib/proto/feature/rule_pb_service.mjs +3 -0
- package/lib/proto/feature/segment_pb.d.ts +161 -0
- package/lib/proto/feature/segment_pb.js +974 -0
- package/lib/proto/feature/segment_pb.mjs +1127 -0
- package/lib/proto/feature/segment_pb_service.d.ts +3 -0
- package/lib/proto/feature/segment_pb_service.js +3 -0
- package/lib/proto/feature/segment_pb_service.mjs +3 -0
- package/lib/proto/feature/service_pb.d.ts +2158 -0
- package/lib/proto/feature/service_pb.js +5363 -0
- package/lib/proto/feature/service_pb.mjs +16348 -0
- package/lib/proto/feature/service_pb_service.d.ts +747 -0
- package/lib/proto/feature/service_pb_service.js +1424 -0
- package/lib/proto/feature/service_pb_service.mjs +1501 -0
- package/lib/proto/feature/strategy_pb.d.ts +110 -0
- package/lib/proto/feature/strategy_pb.js +712 -0
- package/lib/proto/feature/strategy_pb.mjs +803 -0
- package/lib/proto/feature/strategy_pb_service.d.ts +3 -0
- package/lib/proto/feature/strategy_pb_service.js +3 -0
- package/lib/proto/feature/strategy_pb_service.mjs +3 -0
- package/lib/proto/feature/target_pb.d.ts +31 -0
- package/lib/proto/feature/target_pb.js +207 -0
- package/lib/proto/feature/target_pb.mjs +232 -0
- package/lib/proto/feature/target_pb_service.d.ts +3 -0
- package/lib/proto/feature/target_pb_service.js +3 -0
- package/lib/proto/feature/target_pb_service.mjs +3 -0
- package/lib/proto/feature/variation_pb.d.ts +37 -0
- package/lib/proto/feature/variation_pb.js +233 -0
- package/lib/proto/feature/variation_pb.mjs +266 -0
- package/lib/proto/feature/variation_pb_service.d.ts +3 -0
- package/lib/proto/feature/variation_pb_service.js +3 -0
- package/lib/proto/feature/variation_pb_service.mjs +3 -0
- package/lib/proto/gateway/service_pb.d.ts +772 -0
- package/lib/proto/gateway/service_pb.js +5249 -0
- package/lib/proto/gateway/service_pb.mjs +6001 -0
- package/lib/proto/gateway/service_pb_service.d.ts +253 -0
- package/lib/proto/gateway/service_pb_service.js +436 -0
- package/lib/proto/gateway/service_pb_service.mjs +461 -0
- package/lib/proto/user/user_pb.d.ts +58 -0
- package/lib/proto/user/user_pb.js +410 -0
- package/lib/proto/user/user_pb.mjs +460 -0
- package/lib/proto/user/user_pb_service.d.ts +3 -0
- package/lib/proto/user/user_pb_service.js +3 -0
- package/lib/proto/user/user_pb_service.mjs +3 -0
- package/lib/protoc-gen-openapiv2/options/annotations_pb.d.ts +16 -0
- package/lib/protoc-gen-openapiv2/options/annotations_pb.js +100 -0
- package/lib/protoc-gen-openapiv2/options/annotations_pb.mjs +158 -0
- package/lib/protoc-gen-openapiv2/options/annotations_pb_service.d.ts +3 -0
- package/lib/protoc-gen-openapiv2/options/annotations_pb_service.js +3 -0
- package/lib/protoc-gen-openapiv2/options/annotations_pb_service.mjs +3 -0
- package/lib/protoc-gen-openapiv2/options/openapiv2_pb.d.ts +834 -0
- package/lib/protoc-gen-openapiv2/options/openapiv2_pb.js +5456 -0
- package/lib/protoc-gen-openapiv2/options/openapiv2_pb.mjs +6256 -0
- package/lib/protoc-gen-openapiv2/options/openapiv2_pb_service.d.ts +3 -0
- package/lib/protoc-gen-openapiv2/options/openapiv2_pb_service.js +3 -0
- package/lib/protoc-gen-openapiv2/options/openapiv2_pb_service.mjs +3 -0
- package/lib/ruleEvaluator.d.ts +13 -0
- package/lib/ruleEvaluator.js +80 -0
- package/lib/ruleEvaluator.mjs +41 -0
- package/lib/segmentEvaluator.d.ts +7 -0
- package/lib/segmentEvaluator.js +74 -0
- package/lib/segmentEvaluator.mjs +34 -0
- package/lib/strategyEvaluator.d.ts +10 -0
- package/lib/strategyEvaluator.js +135 -0
- package/lib/strategyEvaluator.mjs +83 -0
- package/lib/userEvaluation.d.ts +8 -0
- package/lib/userEvaluation.js +70 -0
- package/lib/userEvaluation.mjs +60 -0
- package/package.json +46 -0
- package/release-please-config.json +22 -0
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
// source: proto/feature/rule.proto
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview
|
|
4
|
+
* @enhanceable
|
|
5
|
+
* @suppress {missingRequire} reports error on implicit type usages.
|
|
6
|
+
* @suppress {messageConventions} JS Compiler reports an error if a variable or
|
|
7
|
+
* field starts with 'MSG_' and isn't a translatable message.
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
// GENERATED CODE -- DO NOT EDIT!
|
|
11
|
+
|
|
12
|
+
// @ts-nocheck
|
|
13
|
+
|
|
14
|
+
var jspb = require('google-protobuf');
|
|
15
|
+
var goog = jspb;
|
|
16
|
+
var global =
|
|
17
|
+
(typeof globalThis !== 'undefined' && globalThis) ||
|
|
18
|
+
(typeof window !== 'undefined' && window) ||
|
|
19
|
+
(typeof global !== 'undefined' && global) ||
|
|
20
|
+
(typeof self !== 'undefined' && self) ||
|
|
21
|
+
(function () { return this; }).call(null) ||
|
|
22
|
+
Function('return this')();
|
|
23
|
+
|
|
24
|
+
var proto_feature_clause_pb = require('../../proto/feature/clause_pb.js');
|
|
25
|
+
goog.object.extend(proto, proto_feature_clause_pb);
|
|
26
|
+
var proto_feature_strategy_pb = require('../../proto/feature/strategy_pb.js');
|
|
27
|
+
goog.object.extend(proto, proto_feature_strategy_pb);
|
|
28
|
+
goog.exportSymbol('proto.bucketeer.feature.Rule', null, global);
|
|
29
|
+
/**
|
|
30
|
+
* Generated by JsPbCodeGenerator.
|
|
31
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
32
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
33
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
34
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
35
|
+
* valid.
|
|
36
|
+
* @extends {jspb.Message}
|
|
37
|
+
* @constructor
|
|
38
|
+
*/
|
|
39
|
+
proto.bucketeer.feature.Rule = function(opt_data) {
|
|
40
|
+
jspb.Message.initialize(this, opt_data, 0, -1, proto.bucketeer.feature.Rule.repeatedFields_, null);
|
|
41
|
+
};
|
|
42
|
+
goog.inherits(proto.bucketeer.feature.Rule, jspb.Message);
|
|
43
|
+
if (goog.DEBUG && !COMPILED) {
|
|
44
|
+
/**
|
|
45
|
+
* @public
|
|
46
|
+
* @override
|
|
47
|
+
*/
|
|
48
|
+
proto.bucketeer.feature.Rule.displayName = 'proto.bucketeer.feature.Rule';
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* List of repeated fields within this message type.
|
|
53
|
+
* @private {!Array<number>}
|
|
54
|
+
* @const
|
|
55
|
+
*/
|
|
56
|
+
proto.bucketeer.feature.Rule.repeatedFields_ = [3];
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
61
|
+
/**
|
|
62
|
+
* Creates an object representation of this proto.
|
|
63
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
64
|
+
* Optional fields that are not set will be set to undefined.
|
|
65
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
66
|
+
* For the list of reserved names please see:
|
|
67
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
68
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
69
|
+
* JSPB instance for transitional soy proto support:
|
|
70
|
+
* http://goto/soy-param-migration
|
|
71
|
+
* @return {!Object}
|
|
72
|
+
*/
|
|
73
|
+
proto.bucketeer.feature.Rule.prototype.toObject = function(opt_includeInstance) {
|
|
74
|
+
return proto.bucketeer.feature.Rule.toObject(opt_includeInstance, this);
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Static version of the {@see toObject} method.
|
|
80
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
81
|
+
* the JSPB instance for transitional soy proto support:
|
|
82
|
+
* http://goto/soy-param-migration
|
|
83
|
+
* @param {!proto.bucketeer.feature.Rule} msg The msg instance to transform.
|
|
84
|
+
* @return {!Object}
|
|
85
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
86
|
+
*/
|
|
87
|
+
proto.bucketeer.feature.Rule.toObject = function(includeInstance, msg) {
|
|
88
|
+
var f, obj = {
|
|
89
|
+
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
90
|
+
strategy: (f = msg.getStrategy()) && proto_feature_strategy_pb.Strategy.toObject(includeInstance, f),
|
|
91
|
+
clausesList: jspb.Message.toObjectList(msg.getClausesList(),
|
|
92
|
+
proto_feature_clause_pb.Clause.toObject, includeInstance)
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
if (includeInstance) {
|
|
96
|
+
obj.$jspbMessageInstance = msg;
|
|
97
|
+
}
|
|
98
|
+
return obj;
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Deserializes binary data (in protobuf wire format).
|
|
105
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
106
|
+
* @return {!proto.bucketeer.feature.Rule}
|
|
107
|
+
*/
|
|
108
|
+
proto.bucketeer.feature.Rule.deserializeBinary = function(bytes) {
|
|
109
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
110
|
+
var msg = new proto.bucketeer.feature.Rule;
|
|
111
|
+
return proto.bucketeer.feature.Rule.deserializeBinaryFromReader(msg, reader);
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
117
|
+
* given reader into the given message object.
|
|
118
|
+
* @param {!proto.bucketeer.feature.Rule} msg The message object to deserialize into.
|
|
119
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
120
|
+
* @return {!proto.bucketeer.feature.Rule}
|
|
121
|
+
*/
|
|
122
|
+
proto.bucketeer.feature.Rule.deserializeBinaryFromReader = function(msg, reader) {
|
|
123
|
+
while (reader.nextField()) {
|
|
124
|
+
if (reader.isEndGroup()) {
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
var field = reader.getFieldNumber();
|
|
128
|
+
switch (field) {
|
|
129
|
+
case 1:
|
|
130
|
+
var value = /** @type {string} */ (reader.readString());
|
|
131
|
+
msg.setId(value);
|
|
132
|
+
break;
|
|
133
|
+
case 2:
|
|
134
|
+
var value = new proto_feature_strategy_pb.Strategy;
|
|
135
|
+
reader.readMessage(value,proto_feature_strategy_pb.Strategy.deserializeBinaryFromReader);
|
|
136
|
+
msg.setStrategy(value);
|
|
137
|
+
break;
|
|
138
|
+
case 3:
|
|
139
|
+
var value = new proto_feature_clause_pb.Clause;
|
|
140
|
+
reader.readMessage(value,proto_feature_clause_pb.Clause.deserializeBinaryFromReader);
|
|
141
|
+
msg.addClauses(value);
|
|
142
|
+
break;
|
|
143
|
+
default:
|
|
144
|
+
reader.skipField();
|
|
145
|
+
break;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return msg;
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
154
|
+
* @return {!Uint8Array}
|
|
155
|
+
*/
|
|
156
|
+
proto.bucketeer.feature.Rule.prototype.serializeBinary = function() {
|
|
157
|
+
var writer = new jspb.BinaryWriter();
|
|
158
|
+
proto.bucketeer.feature.Rule.serializeBinaryToWriter(this, writer);
|
|
159
|
+
return writer.getResultBuffer();
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Serializes the given message to binary data (in protobuf wire
|
|
165
|
+
* format), writing to the given BinaryWriter.
|
|
166
|
+
* @param {!proto.bucketeer.feature.Rule} message
|
|
167
|
+
* @param {!jspb.BinaryWriter} writer
|
|
168
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
169
|
+
*/
|
|
170
|
+
proto.bucketeer.feature.Rule.serializeBinaryToWriter = function(message, writer) {
|
|
171
|
+
var f = undefined;
|
|
172
|
+
f = message.getId();
|
|
173
|
+
if (f.length > 0) {
|
|
174
|
+
writer.writeString(
|
|
175
|
+
1,
|
|
176
|
+
f
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
f = message.getStrategy();
|
|
180
|
+
if (f != null) {
|
|
181
|
+
writer.writeMessage(
|
|
182
|
+
2,
|
|
183
|
+
f,
|
|
184
|
+
proto_feature_strategy_pb.Strategy.serializeBinaryToWriter
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
f = message.getClausesList();
|
|
188
|
+
if (f.length > 0) {
|
|
189
|
+
writer.writeRepeatedMessage(
|
|
190
|
+
3,
|
|
191
|
+
f,
|
|
192
|
+
proto_feature_clause_pb.Clause.serializeBinaryToWriter
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* optional string id = 1;
|
|
200
|
+
* @return {string}
|
|
201
|
+
*/
|
|
202
|
+
proto.bucketeer.feature.Rule.prototype.getId = function() {
|
|
203
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* @param {string} value
|
|
209
|
+
* @return {!proto.bucketeer.feature.Rule} returns this
|
|
210
|
+
*/
|
|
211
|
+
proto.bucketeer.feature.Rule.prototype.setId = function(value) {
|
|
212
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* optional Strategy strategy = 2;
|
|
218
|
+
* @return {?proto.bucketeer.feature.Strategy}
|
|
219
|
+
*/
|
|
220
|
+
proto.bucketeer.feature.Rule.prototype.getStrategy = function() {
|
|
221
|
+
return /** @type{?proto.bucketeer.feature.Strategy} */ (
|
|
222
|
+
jspb.Message.getWrapperField(this, proto_feature_strategy_pb.Strategy, 2));
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* @param {?proto.bucketeer.feature.Strategy|undefined} value
|
|
228
|
+
* @return {!proto.bucketeer.feature.Rule} returns this
|
|
229
|
+
*/
|
|
230
|
+
proto.bucketeer.feature.Rule.prototype.setStrategy = function(value) {
|
|
231
|
+
return jspb.Message.setWrapperField(this, 2, value);
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Clears the message field making it undefined.
|
|
237
|
+
* @return {!proto.bucketeer.feature.Rule} returns this
|
|
238
|
+
*/
|
|
239
|
+
proto.bucketeer.feature.Rule.prototype.clearStrategy = function() {
|
|
240
|
+
return this.setStrategy(undefined);
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Returns whether this field is set.
|
|
246
|
+
* @return {boolean}
|
|
247
|
+
*/
|
|
248
|
+
proto.bucketeer.feature.Rule.prototype.hasStrategy = function() {
|
|
249
|
+
return jspb.Message.getField(this, 2) != null;
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* repeated Clause clauses = 3;
|
|
255
|
+
* @return {!Array<!proto.bucketeer.feature.Clause>}
|
|
256
|
+
*/
|
|
257
|
+
proto.bucketeer.feature.Rule.prototype.getClausesList = function() {
|
|
258
|
+
return /** @type{!Array<!proto.bucketeer.feature.Clause>} */ (
|
|
259
|
+
jspb.Message.getRepeatedWrapperField(this, proto_feature_clause_pb.Clause, 3));
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* @param {!Array<!proto.bucketeer.feature.Clause>} value
|
|
265
|
+
* @return {!proto.bucketeer.feature.Rule} returns this
|
|
266
|
+
*/
|
|
267
|
+
proto.bucketeer.feature.Rule.prototype.setClausesList = function(value) {
|
|
268
|
+
return jspb.Message.setRepeatedWrapperField(this, 3, value);
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* @param {!proto.bucketeer.feature.Clause=} opt_value
|
|
274
|
+
* @param {number=} opt_index
|
|
275
|
+
* @return {!proto.bucketeer.feature.Clause}
|
|
276
|
+
*/
|
|
277
|
+
proto.bucketeer.feature.Rule.prototype.addClauses = function(opt_value, opt_index) {
|
|
278
|
+
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.bucketeer.feature.Clause, opt_index);
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Clears the list making it empty but non-null.
|
|
284
|
+
* @return {!proto.bucketeer.feature.Rule} returns this
|
|
285
|
+
*/
|
|
286
|
+
proto.bucketeer.feature.Rule.prototype.clearClausesList = function() {
|
|
287
|
+
return this.setClausesList([]);
|
|
288
|
+
};
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
goog.object.extend(exports, proto.bucketeer.feature);
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
// package: bucketeer.feature
|
|
2
|
+
// file: proto/feature/segment.proto
|
|
3
|
+
|
|
4
|
+
import * as jspb from 'google-protobuf';
|
|
5
|
+
import * as proto_feature_rule_pb from '../../proto/feature/rule_pb';
|
|
6
|
+
import * as proto_feature_feature_pb from '../../proto/feature/feature_pb';
|
|
7
|
+
|
|
8
|
+
export class Segment extends jspb.Message {
|
|
9
|
+
getId(): string;
|
|
10
|
+
setId(value: string): void;
|
|
11
|
+
|
|
12
|
+
getName(): string;
|
|
13
|
+
setName(value: string): void;
|
|
14
|
+
|
|
15
|
+
getDescription(): string;
|
|
16
|
+
setDescription(value: string): void;
|
|
17
|
+
|
|
18
|
+
clearRulesList(): void;
|
|
19
|
+
getRulesList(): Array<proto_feature_rule_pb.Rule>;
|
|
20
|
+
setRulesList(value: Array<proto_feature_rule_pb.Rule>): void;
|
|
21
|
+
addRules(value?: proto_feature_rule_pb.Rule, index?: number): proto_feature_rule_pb.Rule;
|
|
22
|
+
|
|
23
|
+
getCreatedAt(): number;
|
|
24
|
+
setCreatedAt(value: number): void;
|
|
25
|
+
|
|
26
|
+
getUpdatedAt(): number;
|
|
27
|
+
setUpdatedAt(value: number): void;
|
|
28
|
+
|
|
29
|
+
getVersion(): number;
|
|
30
|
+
setVersion(value: number): void;
|
|
31
|
+
|
|
32
|
+
getDeleted(): boolean;
|
|
33
|
+
setDeleted(value: boolean): void;
|
|
34
|
+
|
|
35
|
+
getIncludedUserCount(): number;
|
|
36
|
+
setIncludedUserCount(value: number): void;
|
|
37
|
+
|
|
38
|
+
getExcludedUserCount(): number;
|
|
39
|
+
setExcludedUserCount(value: number): void;
|
|
40
|
+
|
|
41
|
+
getStatus(): Segment.StatusMap[keyof Segment.StatusMap];
|
|
42
|
+
setStatus(value: Segment.StatusMap[keyof Segment.StatusMap]): void;
|
|
43
|
+
|
|
44
|
+
getIsInUseStatus(): boolean;
|
|
45
|
+
setIsInUseStatus(value: boolean): void;
|
|
46
|
+
|
|
47
|
+
clearFeaturesList(): void;
|
|
48
|
+
getFeaturesList(): Array<proto_feature_feature_pb.Feature>;
|
|
49
|
+
setFeaturesList(value: Array<proto_feature_feature_pb.Feature>): void;
|
|
50
|
+
addFeatures(value?: proto_feature_feature_pb.Feature, index?: number): proto_feature_feature_pb.Feature;
|
|
51
|
+
|
|
52
|
+
serializeBinary(): Uint8Array;
|
|
53
|
+
toObject(includeInstance?: boolean): Segment.AsObject;
|
|
54
|
+
static toObject(includeInstance: boolean, msg: Segment): Segment.AsObject;
|
|
55
|
+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
56
|
+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
57
|
+
static serializeBinaryToWriter(message: Segment, writer: jspb.BinaryWriter): void;
|
|
58
|
+
static deserializeBinary(bytes: Uint8Array): Segment;
|
|
59
|
+
static deserializeBinaryFromReader(message: Segment, reader: jspb.BinaryReader): Segment;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export namespace Segment {
|
|
63
|
+
export type AsObject = {
|
|
64
|
+
id: string,
|
|
65
|
+
name: string,
|
|
66
|
+
description: string,
|
|
67
|
+
rulesList: Array<proto_feature_rule_pb.Rule.AsObject>,
|
|
68
|
+
createdAt: number,
|
|
69
|
+
updatedAt: number,
|
|
70
|
+
version: number,
|
|
71
|
+
deleted: boolean,
|
|
72
|
+
includedUserCount: number,
|
|
73
|
+
excludedUserCount: number,
|
|
74
|
+
status: Segment.StatusMap[keyof Segment.StatusMap],
|
|
75
|
+
isInUseStatus: boolean,
|
|
76
|
+
featuresList: Array<proto_feature_feature_pb.Feature.AsObject>,
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface StatusMap {
|
|
80
|
+
INITIAL: 0;
|
|
81
|
+
UPLOADING: 1;
|
|
82
|
+
SUCEEDED: 2;
|
|
83
|
+
FAILED: 3;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export const Status: StatusMap;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export class SegmentUser extends jspb.Message {
|
|
90
|
+
getId(): string;
|
|
91
|
+
setId(value: string): void;
|
|
92
|
+
|
|
93
|
+
getSegmentId(): string;
|
|
94
|
+
setSegmentId(value: string): void;
|
|
95
|
+
|
|
96
|
+
getUserId(): string;
|
|
97
|
+
setUserId(value: string): void;
|
|
98
|
+
|
|
99
|
+
getState(): SegmentUser.StateMap[keyof SegmentUser.StateMap];
|
|
100
|
+
setState(value: SegmentUser.StateMap[keyof SegmentUser.StateMap]): void;
|
|
101
|
+
|
|
102
|
+
getDeleted(): boolean;
|
|
103
|
+
setDeleted(value: boolean): void;
|
|
104
|
+
|
|
105
|
+
serializeBinary(): Uint8Array;
|
|
106
|
+
toObject(includeInstance?: boolean): SegmentUser.AsObject;
|
|
107
|
+
static toObject(includeInstance: boolean, msg: SegmentUser): SegmentUser.AsObject;
|
|
108
|
+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
109
|
+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
110
|
+
static serializeBinaryToWriter(message: SegmentUser, writer: jspb.BinaryWriter): void;
|
|
111
|
+
static deserializeBinary(bytes: Uint8Array): SegmentUser;
|
|
112
|
+
static deserializeBinaryFromReader(message: SegmentUser, reader: jspb.BinaryReader): SegmentUser;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export namespace SegmentUser {
|
|
116
|
+
export type AsObject = {
|
|
117
|
+
id: string,
|
|
118
|
+
segmentId: string,
|
|
119
|
+
userId: string,
|
|
120
|
+
state: SegmentUser.StateMap[keyof SegmentUser.StateMap],
|
|
121
|
+
deleted: boolean,
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export interface StateMap {
|
|
125
|
+
INCLUDED: 0;
|
|
126
|
+
EXCLUDED: 1;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export const State: StateMap;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export class SegmentUsers extends jspb.Message {
|
|
133
|
+
getSegmentId(): string;
|
|
134
|
+
setSegmentId(value: string): void;
|
|
135
|
+
|
|
136
|
+
clearUsersList(): void;
|
|
137
|
+
getUsersList(): Array<SegmentUser>;
|
|
138
|
+
setUsersList(value: Array<SegmentUser>): void;
|
|
139
|
+
addUsers(value?: SegmentUser, index?: number): SegmentUser;
|
|
140
|
+
|
|
141
|
+
getUpdatedAt(): number;
|
|
142
|
+
setUpdatedAt(value: number): void;
|
|
143
|
+
|
|
144
|
+
serializeBinary(): Uint8Array;
|
|
145
|
+
toObject(includeInstance?: boolean): SegmentUsers.AsObject;
|
|
146
|
+
static toObject(includeInstance: boolean, msg: SegmentUsers): SegmentUsers.AsObject;
|
|
147
|
+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
148
|
+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
149
|
+
static serializeBinaryToWriter(message: SegmentUsers, writer: jspb.BinaryWriter): void;
|
|
150
|
+
static deserializeBinary(bytes: Uint8Array): SegmentUsers;
|
|
151
|
+
static deserializeBinaryFromReader(message: SegmentUsers, reader: jspb.BinaryReader): SegmentUsers;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export namespace SegmentUsers {
|
|
155
|
+
export type AsObject = {
|
|
156
|
+
segmentId: string,
|
|
157
|
+
usersList: Array<SegmentUser.AsObject>,
|
|
158
|
+
updatedAt: number,
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|