@kenji71089/evaluation 0.0.1 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (196) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/README.md +36 -6
  3. package/lib/bucketeer.d.ts +6 -0
  4. package/lib/bucketeer.js +65 -0
  5. package/lib/bucketeer.mjs +38 -0
  6. package/lib/clauseEvaluator.js +49 -7
  7. package/lib/clauseEvaluator.mjs +41 -7
  8. package/lib/evaluation.d.ts +10 -1
  9. package/lib/evaluation.js +184 -27
  10. package/lib/evaluation.mjs +141 -10
  11. package/lib/index.d.ts +12 -10
  12. package/lib/index.js +61 -40
  13. package/lib/index.mjs +16 -10
  14. package/lib/modelFactory.d.ts +1 -0
  15. package/lib/modelFactory.js +2 -0
  16. package/lib/modelFactory.mjs +2 -0
  17. package/lib/proto/event/client/event_pb.d.ts +19 -9
  18. package/lib/proto/event/client/event_pb.js +22 -12
  19. package/lib/proto/event/client/event_pb.mjs +100 -90
  20. package/lib/proto/feature/clause_pb.d.ts +2 -1
  21. package/lib/proto/feature/clause_pb.js +3 -2
  22. package/lib/proto/feature/clause_pb.mjs +7 -6
  23. package/lib/proto/feature/evaluation_pb.d.ts +3 -3
  24. package/lib/proto/feature/evaluation_pb.js +1 -1
  25. package/lib/proto/feature/evaluation_pb.mjs +15 -15
  26. package/lib/proto/feature/feature_last_used_info_pb.d.ts +10 -1
  27. package/lib/proto/feature/feature_last_used_info_pb.js +12 -1
  28. package/lib/proto/feature/feature_last_used_info_pb.mjs +18 -7
  29. package/lib/proto/feature/feature_pb.d.ts +72 -7
  30. package/lib/proto/feature/feature_pb.js +446 -4
  31. package/lib/proto/feature/feature_pb.mjs +535 -29
  32. package/lib/proto/feature/prerequisite_pb.d.ts +1 -1
  33. package/lib/proto/feature/prerequisite_pb.js +1 -1
  34. package/lib/proto/feature/prerequisite_pb.mjs +3 -3
  35. package/lib/proto/feature/reason_pb.d.ts +8 -1
  36. package/lib/proto/feature/reason_pb.js +9 -2
  37. package/lib/proto/feature/reason_pb.mjs +11 -4
  38. package/lib/proto/feature/rule_pb.d.ts +3 -3
  39. package/lib/proto/feature/rule_pb.js +1 -1
  40. package/lib/proto/feature/rule_pb.mjs +4 -4
  41. package/lib/proto/feature/segment_pb.d.ts +3 -3
  42. package/lib/proto/feature/segment_pb.js +1 -1
  43. package/lib/proto/feature/segment_pb.mjs +22 -22
  44. package/lib/proto/feature/strategy_pb.d.ts +31 -1
  45. package/lib/proto/feature/strategy_pb.js +206 -2
  46. package/lib/proto/feature/strategy_pb.mjs +242 -9
  47. package/lib/proto/feature/target_pb.d.ts +1 -1
  48. package/lib/proto/feature/target_pb.js +1 -1
  49. package/lib/proto/feature/target_pb.mjs +3 -3
  50. package/lib/proto/feature/variation_pb.d.ts +1 -1
  51. package/lib/proto/feature/variation_pb.js +1 -1
  52. package/lib/proto/feature/variation_pb.mjs +5 -5
  53. package/lib/proto/user/user_pb.d.ts +53 -1
  54. package/lib/proto/user/user_pb.js +374 -1
  55. package/lib/proto/user/user_pb.mjs +427 -7
  56. package/lib/strategyEvaluator.d.ts +0 -2
  57. package/lib/strategyEvaluator.js +23 -57
  58. package/lib/strategyEvaluator.mjs +23 -46
  59. package/lib/userEvaluation.js +13 -3
  60. package/lib/userEvaluation.mjs +13 -3
  61. package/package.json +15 -8
  62. package/lib/google/api/annotations_pb.d.ts +0 -8
  63. package/lib/google/api/annotations_pb.js +0 -40
  64. package/lib/google/api/annotations_pb.mjs +0 -54
  65. package/lib/google/api/annotations_pb_service.d.ts +0 -3
  66. package/lib/google/api/annotations_pb_service.js +0 -3
  67. package/lib/google/api/annotations_pb_service.mjs +0 -3
  68. package/lib/google/api/http_pb.d.ts +0 -132
  69. package/lib/google/api/http_pb.js +0 -860
  70. package/lib/google/api/http_pb.mjs +0 -982
  71. package/lib/google/api/http_pb_service.d.ts +0 -3
  72. package/lib/google/api/http_pb_service.js +0 -3
  73. package/lib/google/api/http_pb_service.mjs +0 -3
  74. package/lib/google/rpc/code_pb.d.ts +0 -26
  75. package/lib/google/rpc/code_pb.js +0 -44
  76. package/lib/google/rpc/code_pb.mjs +0 -48
  77. package/lib/google/rpc/code_pb_service.d.ts +0 -3
  78. package/lib/google/rpc/code_pb_service.js +0 -3
  79. package/lib/google/rpc/code_pb_service.mjs +0 -3
  80. package/lib/google/rpc/error_details_pb.d.ts +0 -322
  81. package/lib/google/rpc/error_details_pb.js +0 -2220
  82. package/lib/google/rpc/error_details_pb.mjs +0 -2499
  83. package/lib/google/rpc/error_details_pb_service.d.ts +0 -3
  84. package/lib/google/rpc/error_details_pb_service.js +0 -3
  85. package/lib/google/rpc/error_details_pb_service.mjs +0 -3
  86. package/lib/google/rpc/status_pb.d.ts +0 -36
  87. package/lib/google/rpc/status_pb.js +0 -235
  88. package/lib/google/rpc/status_pb.mjs +0 -268
  89. package/lib/google/rpc/status_pb_service.d.ts +0 -3
  90. package/lib/google/rpc/status_pb_service.js +0 -3
  91. package/lib/google/rpc/status_pb_service.mjs +0 -3
  92. package/lib/proto/event/client/event_pb_service.d.ts +0 -3
  93. package/lib/proto/event/client/event_pb_service.js +0 -3
  94. package/lib/proto/event/client/event_pb_service.mjs +0 -3
  95. package/lib/proto/event/domain/event_pb.d.ts +0 -4518
  96. package/lib/proto/event/domain/event_pb.js +0 -10834
  97. package/lib/proto/event/domain/event_pb.mjs +0 -33315
  98. package/lib/proto/event/domain/event_pb_service.d.ts +0 -3
  99. package/lib/proto/event/domain/event_pb_service.js +0 -3
  100. package/lib/proto/event/domain/event_pb_service.mjs +0 -3
  101. package/lib/proto/event/domain/localized_message_pb.d.ts +0 -29
  102. package/lib/proto/event/domain/localized_message_pb.js +0 -183
  103. package/lib/proto/event/domain/localized_message_pb.mjs +0 -206
  104. package/lib/proto/event/domain/localized_message_pb_service.d.ts +0 -3
  105. package/lib/proto/event/domain/localized_message_pb_service.js +0 -3
  106. package/lib/proto/event/domain/localized_message_pb_service.mjs +0 -3
  107. package/lib/proto/event/service/feature_pb.d.ts +0 -44
  108. package/lib/proto/event/service/feature_pb.js +0 -277
  109. package/lib/proto/event/service/feature_pb.mjs +0 -319
  110. package/lib/proto/event/service/feature_pb_service.d.ts +0 -3
  111. package/lib/proto/event/service/feature_pb_service.js +0 -3
  112. package/lib/proto/event/service/feature_pb_service.mjs +0 -3
  113. package/lib/proto/event/service/segment_pb.d.ts +0 -51
  114. package/lib/proto/event/service/segment_pb.js +0 -324
  115. package/lib/proto/event/service/segment_pb.mjs +0 -375
  116. package/lib/proto/event/service/segment_pb_service.d.ts +0 -3
  117. package/lib/proto/event/service/segment_pb_service.js +0 -3
  118. package/lib/proto/event/service/segment_pb_service.mjs +0 -3
  119. package/lib/proto/event/service/user_pb.d.ts +0 -49
  120. package/lib/proto/event/service/user_pb.js +0 -315
  121. package/lib/proto/event/service/user_pb.mjs +0 -362
  122. package/lib/proto/event/service/user_pb_service.d.ts +0 -3
  123. package/lib/proto/event/service/user_pb_service.js +0 -3
  124. package/lib/proto/event/service/user_pb_service.mjs +0 -3
  125. package/lib/proto/feature/clause_pb_service.d.ts +0 -3
  126. package/lib/proto/feature/clause_pb_service.js +0 -3
  127. package/lib/proto/feature/clause_pb_service.mjs +0 -3
  128. package/lib/proto/feature/command_pb.d.ts +0 -1213
  129. package/lib/proto/feature/command_pb.js +0 -8260
  130. package/lib/proto/feature/command_pb.mjs +0 -9275
  131. package/lib/proto/feature/command_pb_service.d.ts +0 -3
  132. package/lib/proto/feature/command_pb_service.js +0 -3
  133. package/lib/proto/feature/command_pb_service.mjs +0 -3
  134. package/lib/proto/feature/evaluation_pb_service.d.ts +0 -3
  135. package/lib/proto/feature/evaluation_pb_service.js +0 -3
  136. package/lib/proto/feature/evaluation_pb_service.mjs +0 -3
  137. package/lib/proto/feature/feature_last_used_info_pb_service.d.ts +0 -3
  138. package/lib/proto/feature/feature_last_used_info_pb_service.js +0 -3
  139. package/lib/proto/feature/feature_last_used_info_pb_service.mjs +0 -3
  140. package/lib/proto/feature/feature_pb_service.d.ts +0 -3
  141. package/lib/proto/feature/feature_pb_service.js +0 -3
  142. package/lib/proto/feature/feature_pb_service.mjs +0 -3
  143. package/lib/proto/feature/flag_trigger_pb.d.ts +0 -84
  144. package/lib/proto/feature/flag_trigger_pb.js +0 -452
  145. package/lib/proto/feature/flag_trigger_pb.mjs +0 -525
  146. package/lib/proto/feature/flag_trigger_pb_service.d.ts +0 -3
  147. package/lib/proto/feature/flag_trigger_pb_service.js +0 -3
  148. package/lib/proto/feature/flag_trigger_pb_service.mjs +0 -3
  149. package/lib/proto/feature/prerequisite_pb_service.d.ts +0 -3
  150. package/lib/proto/feature/prerequisite_pb_service.js +0 -3
  151. package/lib/proto/feature/prerequisite_pb_service.mjs +0 -3
  152. package/lib/proto/feature/reason_pb_service.d.ts +0 -3
  153. package/lib/proto/feature/reason_pb_service.js +0 -3
  154. package/lib/proto/feature/reason_pb_service.mjs +0 -3
  155. package/lib/proto/feature/rule_pb_service.d.ts +0 -3
  156. package/lib/proto/feature/rule_pb_service.js +0 -3
  157. package/lib/proto/feature/rule_pb_service.mjs +0 -3
  158. package/lib/proto/feature/segment_pb_service.d.ts +0 -3
  159. package/lib/proto/feature/segment_pb_service.js +0 -3
  160. package/lib/proto/feature/segment_pb_service.mjs +0 -3
  161. package/lib/proto/feature/service_pb.d.ts +0 -2158
  162. package/lib/proto/feature/service_pb.js +0 -5363
  163. package/lib/proto/feature/service_pb.mjs +0 -16348
  164. package/lib/proto/feature/service_pb_service.d.ts +0 -747
  165. package/lib/proto/feature/service_pb_service.js +0 -1424
  166. package/lib/proto/feature/service_pb_service.mjs +0 -1501
  167. package/lib/proto/feature/strategy_pb_service.d.ts +0 -3
  168. package/lib/proto/feature/strategy_pb_service.js +0 -3
  169. package/lib/proto/feature/strategy_pb_service.mjs +0 -3
  170. package/lib/proto/feature/target_pb_service.d.ts +0 -3
  171. package/lib/proto/feature/target_pb_service.js +0 -3
  172. package/lib/proto/feature/target_pb_service.mjs +0 -3
  173. package/lib/proto/feature/variation_pb_service.d.ts +0 -3
  174. package/lib/proto/feature/variation_pb_service.js +0 -3
  175. package/lib/proto/feature/variation_pb_service.mjs +0 -3
  176. package/lib/proto/gateway/service_pb.d.ts +0 -772
  177. package/lib/proto/gateway/service_pb.js +0 -5249
  178. package/lib/proto/gateway/service_pb.mjs +0 -6001
  179. package/lib/proto/gateway/service_pb_service.d.ts +0 -253
  180. package/lib/proto/gateway/service_pb_service.js +0 -436
  181. package/lib/proto/gateway/service_pb_service.mjs +0 -461
  182. package/lib/proto/user/user_pb_service.d.ts +0 -3
  183. package/lib/proto/user/user_pb_service.js +0 -3
  184. package/lib/proto/user/user_pb_service.mjs +0 -3
  185. package/lib/protoc-gen-openapiv2/options/annotations_pb.d.ts +0 -16
  186. package/lib/protoc-gen-openapiv2/options/annotations_pb.js +0 -100
  187. package/lib/protoc-gen-openapiv2/options/annotations_pb.mjs +0 -158
  188. package/lib/protoc-gen-openapiv2/options/annotations_pb_service.d.ts +0 -3
  189. package/lib/protoc-gen-openapiv2/options/annotations_pb_service.js +0 -3
  190. package/lib/protoc-gen-openapiv2/options/annotations_pb_service.mjs +0 -3
  191. package/lib/protoc-gen-openapiv2/options/openapiv2_pb.d.ts +0 -834
  192. package/lib/protoc-gen-openapiv2/options/openapiv2_pb.js +0 -5456
  193. package/lib/protoc-gen-openapiv2/options/openapiv2_pb.mjs +0 -6256
  194. package/lib/protoc-gen-openapiv2/options/openapiv2_pb_service.d.ts +0 -3
  195. package/lib/protoc-gen-openapiv2/options/openapiv2_pb_service.js +0 -3
  196. package/lib/protoc-gen-openapiv2/options/openapiv2_pb_service.mjs +0 -3
package/lib/index.d.ts CHANGED
@@ -1,20 +1,22 @@
1
- import { Evaluator } from './evaluation';
1
+ import { Evaluator, getFeatureIDsDependsOn } from './evaluation';
2
2
  import { SegmentUser, SegmentUsers } from './proto/feature/segment_pb';
3
3
  import { Feature } from './proto/feature/feature_pb';
4
4
  import { NewUserEvaluations } from './userEvaluation';
5
5
  import { User } from './proto/user/user_pb';
6
6
  import { Evaluation, UserEvaluations } from './proto/feature/evaluation_pb';
7
- import { Strategy } from './proto/feature/strategy_pb';
7
+ import { Strategy, RolloutStrategy, FixedStrategy } from './proto/feature/strategy_pb';
8
8
  import { Clause } from './proto/feature/clause_pb';
9
9
  import { Reason } from './proto/feature/reason_pb';
10
- import { createClause, createFixedStrategy, createRolloutStrategy, createReason, createRule, createPrerequisite, createFeature, createEvaluation, createSegmentUser, createStrategy, createTarget, createUser, createVariation } from './modelFactory';
11
- import { GetFeatureFlagsRequest, GetFeatureFlagsResponse, GetSegmentUsersRequest, GetSegmentUsersResponse } from './proto/gateway/service_pb';
10
+ import { Rule } from './proto/feature/rule_pb';
11
+ import { Target } from './proto/feature/target_pb';
12
+ import { Variation } from './proto/feature/variation_pb';
13
+ import { Prerequisite } from './proto/feature/prerequisite_pb';
14
+ import { FeatureLastUsedInfo } from './proto/feature/feature_last_used_info_pb';
12
15
  import { SourceId } from './proto/event/client/event_pb';
13
- import { GatewayClient, ServiceError } from './proto/gateway/service_pb_service';
14
- export { Evaluator, NewUserEvaluations, Evaluation, UserEvaluations };
16
+ import { createClause, createFixedStrategy, createRolloutStrategy, createReason, createRule, createPrerequisite, createFeature, createEvaluation, createSegmentUser, createStrategy, createTarget, createUser, createVariation } from './modelFactory';
17
+ export { Evaluator, NewUserEvaluations, Evaluation, UserEvaluations, getFeatureIDsDependsOn };
15
18
  export { User, SegmentUser, SegmentUsers, Feature };
16
- export { Strategy, Clause, Reason };
17
- export { createClause, createFixedStrategy, createRolloutStrategy, createReason, createRule, createPrerequisite, createFeature, createEvaluation, createSegmentUser, createStrategy, createTarget, createUser, createVariation, };
18
- export { GetFeatureFlagsRequest, GetFeatureFlagsResponse, GetSegmentUsersRequest, GetSegmentUsersResponse, };
19
+ export { Strategy, Clause, Reason, Rule, Target, Variation, Prerequisite, FeatureLastUsedInfo };
19
20
  export { SourceId };
20
- export { GatewayClient, ServiceError };
21
+ export { RolloutStrategy, FixedStrategy };
22
+ export { createClause, createFixedStrategy, createRolloutStrategy, createReason, createRule, createPrerequisite, createFeature, createEvaluation, createSegmentUser, createStrategy, createTarget, createUser, createVariation, };
package/lib/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.GatewayClient = exports.SourceId = exports.GetSegmentUsersResponse = exports.GetSegmentUsersRequest = exports.GetFeatureFlagsResponse = exports.GetFeatureFlagsRequest = exports.createVariation = exports.createUser = exports.createTarget = exports.createStrategy = exports.createSegmentUser = exports.createEvaluation = exports.createFeature = exports.createPrerequisite = exports.createRule = exports.createReason = exports.createRolloutStrategy = exports.createFixedStrategy = exports.createClause = exports.Reason = exports.Clause = exports.Strategy = exports.Feature = exports.SegmentUsers = exports.SegmentUser = exports.User = exports.UserEvaluations = exports.Evaluation = exports.NewUserEvaluations = exports.Evaluator = void 0;
6
+ exports.createVariation = exports.createUser = exports.createTarget = exports.createStrategy = exports.createSegmentUser = exports.createEvaluation = exports.createFeature = exports.createPrerequisite = exports.createRule = exports.createReason = exports.createRolloutStrategy = exports.createFixedStrategy = exports.createClause = exports.FixedStrategy = exports.RolloutStrategy = exports.SourceId = exports.FeatureLastUsedInfo = exports.Prerequisite = exports.Variation = exports.Target = exports.Rule = exports.Reason = exports.Clause = exports.Strategy = exports.Feature = exports.SegmentUsers = exports.SegmentUser = exports.User = exports.getFeatureIDsDependsOn = exports.UserEvaluations = exports.Evaluation = exports.NewUserEvaluations = exports.Evaluator = void 0;
7
7
  var evaluation_1 = require("./evaluation");
8
8
  Object.defineProperty(exports, "Evaluator", {
9
9
  enumerable: true,
@@ -11,6 +11,12 @@ Object.defineProperty(exports, "Evaluator", {
11
11
  return evaluation_1.Evaluator;
12
12
  }
13
13
  });
14
+ Object.defineProperty(exports, "getFeatureIDsDependsOn", {
15
+ enumerable: true,
16
+ get: function get() {
17
+ return evaluation_1.getFeatureIDsDependsOn;
18
+ }
19
+ });
14
20
  var segment_pb_1 = require("./proto/feature/segment_pb");
15
21
  Object.defineProperty(exports, "SegmentUser", {
16
22
  enumerable: true,
@@ -65,6 +71,18 @@ Object.defineProperty(exports, "Strategy", {
65
71
  return strategy_pb_1.Strategy;
66
72
  }
67
73
  });
74
+ Object.defineProperty(exports, "RolloutStrategy", {
75
+ enumerable: true,
76
+ get: function get() {
77
+ return strategy_pb_1.RolloutStrategy;
78
+ }
79
+ });
80
+ Object.defineProperty(exports, "FixedStrategy", {
81
+ enumerable: true,
82
+ get: function get() {
83
+ return strategy_pb_1.FixedStrategy;
84
+ }
85
+ });
68
86
  var clause_pb_1 = require("./proto/feature/clause_pb");
69
87
  Object.defineProperty(exports, "Clause", {
70
88
  enumerable: true,
@@ -79,6 +97,48 @@ Object.defineProperty(exports, "Reason", {
79
97
  return reason_pb_1.Reason;
80
98
  }
81
99
  });
100
+ var rule_pb_1 = require("./proto/feature/rule_pb");
101
+ Object.defineProperty(exports, "Rule", {
102
+ enumerable: true,
103
+ get: function get() {
104
+ return rule_pb_1.Rule;
105
+ }
106
+ });
107
+ var target_pb_1 = require("./proto/feature/target_pb");
108
+ Object.defineProperty(exports, "Target", {
109
+ enumerable: true,
110
+ get: function get() {
111
+ return target_pb_1.Target;
112
+ }
113
+ });
114
+ var variation_pb_1 = require("./proto/feature/variation_pb");
115
+ Object.defineProperty(exports, "Variation", {
116
+ enumerable: true,
117
+ get: function get() {
118
+ return variation_pb_1.Variation;
119
+ }
120
+ });
121
+ var prerequisite_pb_1 = require("./proto/feature/prerequisite_pb");
122
+ Object.defineProperty(exports, "Prerequisite", {
123
+ enumerable: true,
124
+ get: function get() {
125
+ return prerequisite_pb_1.Prerequisite;
126
+ }
127
+ });
128
+ var feature_last_used_info_pb_1 = require("./proto/feature/feature_last_used_info_pb");
129
+ Object.defineProperty(exports, "FeatureLastUsedInfo", {
130
+ enumerable: true,
131
+ get: function get() {
132
+ return feature_last_used_info_pb_1.FeatureLastUsedInfo;
133
+ }
134
+ });
135
+ var event_pb_1 = require("./proto/event/client/event_pb");
136
+ Object.defineProperty(exports, "SourceId", {
137
+ enumerable: true,
138
+ get: function get() {
139
+ return event_pb_1.SourceId;
140
+ }
141
+ });
82
142
  var modelFactory_1 = require("./modelFactory");
83
143
  Object.defineProperty(exports, "createClause", {
84
144
  enumerable: true,
@@ -157,43 +217,4 @@ Object.defineProperty(exports, "createVariation", {
157
217
  get: function get() {
158
218
  return modelFactory_1.createVariation;
159
219
  }
160
- });
161
- var service_pb_1 = require("./proto/gateway/service_pb");
162
- Object.defineProperty(exports, "GetFeatureFlagsRequest", {
163
- enumerable: true,
164
- get: function get() {
165
- return service_pb_1.GetFeatureFlagsRequest;
166
- }
167
- });
168
- Object.defineProperty(exports, "GetFeatureFlagsResponse", {
169
- enumerable: true,
170
- get: function get() {
171
- return service_pb_1.GetFeatureFlagsResponse;
172
- }
173
- });
174
- Object.defineProperty(exports, "GetSegmentUsersRequest", {
175
- enumerable: true,
176
- get: function get() {
177
- return service_pb_1.GetSegmentUsersRequest;
178
- }
179
- });
180
- Object.defineProperty(exports, "GetSegmentUsersResponse", {
181
- enumerable: true,
182
- get: function get() {
183
- return service_pb_1.GetSegmentUsersResponse;
184
- }
185
- });
186
- var event_pb_1 = require("./proto/event/client/event_pb");
187
- Object.defineProperty(exports, "SourceId", {
188
- enumerable: true,
189
- get: function get() {
190
- return event_pb_1.SourceId;
191
- }
192
- });
193
- var service_pb_service_1 = require("./proto/gateway/service_pb_service");
194
- Object.defineProperty(exports, "GatewayClient", {
195
- enumerable: true,
196
- get: function get() {
197
- return service_pb_service_1.GatewayClient;
198
- }
199
220
  });
package/lib/index.mjs CHANGED
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GatewayClient = exports.SourceId = exports.GetSegmentUsersResponse = exports.GetSegmentUsersRequest = exports.GetFeatureFlagsResponse = exports.GetFeatureFlagsRequest = exports.createVariation = exports.createUser = exports.createTarget = exports.createStrategy = exports.createSegmentUser = exports.createEvaluation = exports.createFeature = exports.createPrerequisite = exports.createRule = exports.createReason = exports.createRolloutStrategy = exports.createFixedStrategy = exports.createClause = exports.Reason = exports.Clause = exports.Strategy = exports.Feature = exports.SegmentUsers = exports.SegmentUser = exports.User = exports.UserEvaluations = exports.Evaluation = exports.NewUserEvaluations = exports.Evaluator = void 0;
3
+ exports.createVariation = exports.createUser = exports.createTarget = exports.createStrategy = exports.createSegmentUser = exports.createEvaluation = exports.createFeature = exports.createPrerequisite = exports.createRule = exports.createReason = exports.createRolloutStrategy = exports.createFixedStrategy = exports.createClause = exports.FixedStrategy = exports.RolloutStrategy = exports.SourceId = exports.FeatureLastUsedInfo = exports.Prerequisite = exports.Variation = exports.Target = exports.Rule = exports.Reason = exports.Clause = exports.Strategy = exports.Feature = exports.SegmentUsers = exports.SegmentUser = exports.User = exports.getFeatureIDsDependsOn = exports.UserEvaluations = exports.Evaluation = exports.NewUserEvaluations = exports.Evaluator = void 0;
4
4
  const evaluation_1 = require("./evaluation");
5
5
  Object.defineProperty(exports, "Evaluator", { enumerable: true, get: function () { return evaluation_1.Evaluator; } });
6
+ Object.defineProperty(exports, "getFeatureIDsDependsOn", { enumerable: true, get: function () { return evaluation_1.getFeatureIDsDependsOn; } });
6
7
  const segment_pb_1 = require("./proto/feature/segment_pb");
7
8
  Object.defineProperty(exports, "SegmentUser", { enumerable: true, get: function () { return segment_pb_1.SegmentUser; } });
8
9
  Object.defineProperty(exports, "SegmentUsers", { enumerable: true, get: function () { return segment_pb_1.SegmentUsers; } });
@@ -17,10 +18,24 @@ Object.defineProperty(exports, "Evaluation", { enumerable: true, get: function (
17
18
  Object.defineProperty(exports, "UserEvaluations", { enumerable: true, get: function () { return evaluation_pb_1.UserEvaluations; } });
18
19
  const strategy_pb_1 = require("./proto/feature/strategy_pb");
19
20
  Object.defineProperty(exports, "Strategy", { enumerable: true, get: function () { return strategy_pb_1.Strategy; } });
21
+ Object.defineProperty(exports, "RolloutStrategy", { enumerable: true, get: function () { return strategy_pb_1.RolloutStrategy; } });
22
+ Object.defineProperty(exports, "FixedStrategy", { enumerable: true, get: function () { return strategy_pb_1.FixedStrategy; } });
20
23
  const clause_pb_1 = require("./proto/feature/clause_pb");
21
24
  Object.defineProperty(exports, "Clause", { enumerable: true, get: function () { return clause_pb_1.Clause; } });
22
25
  const reason_pb_1 = require("./proto/feature/reason_pb");
23
26
  Object.defineProperty(exports, "Reason", { enumerable: true, get: function () { return reason_pb_1.Reason; } });
27
+ const rule_pb_1 = require("./proto/feature/rule_pb");
28
+ Object.defineProperty(exports, "Rule", { enumerable: true, get: function () { return rule_pb_1.Rule; } });
29
+ const target_pb_1 = require("./proto/feature/target_pb");
30
+ Object.defineProperty(exports, "Target", { enumerable: true, get: function () { return target_pb_1.Target; } });
31
+ const variation_pb_1 = require("./proto/feature/variation_pb");
32
+ Object.defineProperty(exports, "Variation", { enumerable: true, get: function () { return variation_pb_1.Variation; } });
33
+ const prerequisite_pb_1 = require("./proto/feature/prerequisite_pb");
34
+ Object.defineProperty(exports, "Prerequisite", { enumerable: true, get: function () { return prerequisite_pb_1.Prerequisite; } });
35
+ const feature_last_used_info_pb_1 = require("./proto/feature/feature_last_used_info_pb");
36
+ Object.defineProperty(exports, "FeatureLastUsedInfo", { enumerable: true, get: function () { return feature_last_used_info_pb_1.FeatureLastUsedInfo; } });
37
+ const event_pb_1 = require("./proto/event/client/event_pb");
38
+ Object.defineProperty(exports, "SourceId", { enumerable: true, get: function () { return event_pb_1.SourceId; } });
24
39
  const modelFactory_1 = require("./modelFactory");
25
40
  Object.defineProperty(exports, "createClause", { enumerable: true, get: function () { return modelFactory_1.createClause; } });
26
41
  Object.defineProperty(exports, "createFixedStrategy", { enumerable: true, get: function () { return modelFactory_1.createFixedStrategy; } });
@@ -35,12 +50,3 @@ Object.defineProperty(exports, "createStrategy", { enumerable: true, get: functi
35
50
  Object.defineProperty(exports, "createTarget", { enumerable: true, get: function () { return modelFactory_1.createTarget; } });
36
51
  Object.defineProperty(exports, "createUser", { enumerable: true, get: function () { return modelFactory_1.createUser; } });
37
52
  Object.defineProperty(exports, "createVariation", { enumerable: true, get: function () { return modelFactory_1.createVariation; } });
38
- const service_pb_1 = require("./proto/gateway/service_pb");
39
- Object.defineProperty(exports, "GetFeatureFlagsRequest", { enumerable: true, get: function () { return service_pb_1.GetFeatureFlagsRequest; } });
40
- Object.defineProperty(exports, "GetFeatureFlagsResponse", { enumerable: true, get: function () { return service_pb_1.GetFeatureFlagsResponse; } });
41
- Object.defineProperty(exports, "GetSegmentUsersRequest", { enumerable: true, get: function () { return service_pb_1.GetSegmentUsersRequest; } });
42
- Object.defineProperty(exports, "GetSegmentUsersResponse", { enumerable: true, get: function () { return service_pb_1.GetSegmentUsersResponse; } });
43
- const event_pb_1 = require("./proto/event/client/event_pb");
44
- Object.defineProperty(exports, "SourceId", { enumerable: true, get: function () { return event_pb_1.SourceId; } });
45
- const service_pb_service_1 = require("./proto/gateway/service_pb_service");
46
- Object.defineProperty(exports, "GatewayClient", { enumerable: true, get: function () { return service_pb_service_1.GatewayClient; } });
@@ -16,6 +16,7 @@ export declare function createFeature(options?: {
16
16
  version?: number;
17
17
  enabled?: boolean;
18
18
  createdAt?: number;
19
+ updatedAt?: number;
19
20
  variationType?: Feature.VariationTypeMap[keyof Feature.VariationTypeMap];
20
21
  variations?: Array<{
21
22
  id: string;
@@ -62,6 +62,7 @@ function createFeature() {
62
62
  version: 0,
63
63
  enabled: false,
64
64
  createdAt: Date.now(),
65
+ updatedAt: Date.now(),
65
66
  variationType: feature_pb_1.Feature.VariationType.STRING,
66
67
  variations: [],
67
68
  targets: [],
@@ -78,6 +79,7 @@ function createFeature() {
78
79
  feature.setVersion(finalOptions.version);
79
80
  feature.setEnabled(finalOptions.enabled);
80
81
  feature.setCreatedAt(finalOptions.createdAt);
82
+ feature.setUpdatedAt(finalOptions.updatedAt);
81
83
  feature.setVariationType(finalOptions.variationType);
82
84
  // Set variations
83
85
  var variationList = finalOptions.variations.map(function (v) {
@@ -41,6 +41,7 @@ function createFeature(options = {}) {
41
41
  version: 0,
42
42
  enabled: false,
43
43
  createdAt: Date.now(),
44
+ updatedAt: Date.now(),
44
45
  variationType: feature_pb_1.Feature.VariationType.STRING,
45
46
  variations: [],
46
47
  targets: [],
@@ -57,6 +58,7 @@ function createFeature(options = {}) {
57
58
  feature.setVersion(finalOptions.version);
58
59
  feature.setEnabled(finalOptions.enabled);
59
60
  feature.setCreatedAt(finalOptions.createdAt);
61
+ feature.setUpdatedAt(finalOptions.updatedAt);
60
62
  feature.setVariationType(finalOptions.variationType);
61
63
  // Set variations
62
64
  const variationList = finalOptions.variations.map((v) => createVariation(v.id, v.value, v.name, v.description));
@@ -1,12 +1,12 @@
1
1
  // package: bucketeer.event.client
2
2
  // file: proto/event/client/event.proto
3
3
 
4
- import * as jspb from 'google-protobuf';
5
- import * as google_protobuf_any_pb from 'google-protobuf/google/protobuf/any_pb';
6
- import * as google_protobuf_duration_pb from 'google-protobuf/google/protobuf/duration_pb';
7
- import * as proto_feature_evaluation_pb from '../../../proto/feature/evaluation_pb';
8
- import * as proto_feature_reason_pb from '../../../proto/feature/reason_pb';
9
- import * as proto_user_user_pb from '../../../proto/user/user_pb';
4
+ import * as jspb from "google-protobuf";
5
+ import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb";
6
+ import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb";
7
+ import * as proto_feature_evaluation_pb from "../../../proto/feature/evaluation_pb";
8
+ import * as proto_feature_reason_pb from "../../../proto/feature/reason_pb";
9
+ import * as proto_user_user_pb from "../../../proto/user/user_pb";
10
10
 
11
11
  export class Event extends jspb.Message {
12
12
  getId(): string;
@@ -17,8 +17,8 @@ export class Event extends jspb.Message {
17
17
  getEvent(): google_protobuf_any_pb.Any | undefined;
18
18
  setEvent(value?: google_protobuf_any_pb.Any): void;
19
19
 
20
- getEnvironmentNamespace(): string;
21
- setEnvironmentNamespace(value: string): void;
20
+ getEnvironmentId(): string;
21
+ setEnvironmentId(value: string): void;
22
22
 
23
23
  serializeBinary(): Uint8Array;
24
24
  toObject(includeInstance?: boolean): Event.AsObject;
@@ -34,7 +34,7 @@ export namespace Event {
34
34
  export type AsObject = {
35
35
  id: string,
36
36
  event?: google_protobuf_any_pb.Any.AsObject,
37
- environmentNamespace: string,
37
+ environmentId: string,
38
38
  }
39
39
  }
40
40
 
@@ -743,6 +743,16 @@ export interface SourceIdMap {
743
743
  GO_SERVER: 5;
744
744
  NODE_SERVER: 6;
745
745
  JAVASCRIPT: 7;
746
+ FLUTTER: 8;
747
+ REACT: 9;
748
+ REACT_NATIVE: 10;
749
+ OPEN_FEATURE_KOTLIN: 100;
750
+ OPEN_FEATURE_SWIFT: 101;
751
+ OPEN_FEATURE_JAVASCRIPT: 102;
752
+ OPEN_FEATURE_GO: 103;
753
+ OPEN_FEATURE_NODE: 104;
754
+ OPEN_FEATURE_REACT: 105;
755
+ OPEN_FEATURE_REACT_NATIVE: 106;
746
756
  }
747
757
 
748
758
  export const SourceId: SourceIdMap;
@@ -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');
@@ -633,7 +633,7 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
633
633
  obj = {
634
634
  id: jspb.Message.getFieldWithDefault(msg, 1, ""),
635
635
  event: (f = msg.getEvent()) && google_protobuf_any_pb.Any.toObject(includeInstance, f),
636
- environmentNamespace: jspb.Message.getFieldWithDefault(msg, 3, "")
636
+ environmentId: jspb.Message.getFieldWithDefault(msg, 4, "")
637
637
  };
638
638
  if (includeInstance) {
639
639
  obj.$jspbMessageInstance = msg;
@@ -676,9 +676,9 @@ proto.bucketeer.event.client.Event.deserializeBinaryFromReader = function (msg,
676
676
  reader.readMessage(value, google_protobuf_any_pb.Any.deserializeBinaryFromReader);
677
677
  msg.setEvent(value);
678
678
  break;
679
- case 3:
679
+ case 4:
680
680
  var value = /** @type {string} */reader.readString();
681
- msg.setEnvironmentNamespace(value);
681
+ msg.setEnvironmentId(value);
682
682
  break;
683
683
  default:
684
684
  reader.skipField();
@@ -715,9 +715,9 @@ proto.bucketeer.event.client.Event.serializeBinaryToWriter = function (message,
715
715
  if (f != null) {
716
716
  writer.writeMessage(2, f, google_protobuf_any_pb.Any.serializeBinaryToWriter);
717
717
  }
718
- f = message.getEnvironmentNamespace();
718
+ f = message.getEnvironmentId();
719
719
  if (f.length > 0) {
720
- writer.writeString(3, f);
720
+ writer.writeString(4, f);
721
721
  }
722
722
  };
723
723
 
@@ -770,19 +770,19 @@ proto.bucketeer.event.client.Event.prototype.hasEvent = function () {
770
770
  };
771
771
 
772
772
  /**
773
- * optional string environment_namespace = 3;
773
+ * optional string environment_id = 4;
774
774
  * @return {string}
775
775
  */
776
- proto.bucketeer.event.client.Event.prototype.getEnvironmentNamespace = function () {
777
- return /** @type {string} */jspb.Message.getFieldWithDefault(this, 3, "");
776
+ proto.bucketeer.event.client.Event.prototype.getEnvironmentId = function () {
777
+ return /** @type {string} */jspb.Message.getFieldWithDefault(this, 4, "");
778
778
  };
779
779
 
780
780
  /**
781
781
  * @param {string} value
782
782
  * @return {!proto.bucketeer.event.client.Event} returns this
783
783
  */
784
- proto.bucketeer.event.client.Event.prototype.setEnvironmentNamespace = function (value) {
785
- return jspb.Message.setProto3StringField(this, 3, value);
784
+ proto.bucketeer.event.client.Event.prototype.setEnvironmentId = function (value) {
785
+ return jspb.Message.setProto3StringField(this, 4, value);
786
786
  };
787
787
  if (jspb.Message.GENERATE_TO_OBJECT) {
788
788
  /**
@@ -5177,7 +5177,17 @@ proto.bucketeer.event.client.SourceId = {
5177
5177
  WEB: 3,
5178
5178
  GO_SERVER: 5,
5179
5179
  NODE_SERVER: 6,
5180
- JAVASCRIPT: 7
5180
+ JAVASCRIPT: 7,
5181
+ FLUTTER: 8,
5182
+ REACT: 9,
5183
+ REACT_NATIVE: 10,
5184
+ OPEN_FEATURE_KOTLIN: 100,
5185
+ OPEN_FEATURE_SWIFT: 101,
5186
+ OPEN_FEATURE_JAVASCRIPT: 102,
5187
+ OPEN_FEATURE_GO: 103,
5188
+ OPEN_FEATURE_NODE: 104,
5189
+ OPEN_FEATURE_REACT: 105,
5190
+ OPEN_FEATURE_REACT_NATIVE: 106
5181
5191
  };
5182
5192
 
5183
5193
  /**