@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
package/lib/userEvaluation.js
CHANGED
|
@@ -30,6 +30,11 @@ function sortMapKeys(data) {
|
|
|
30
30
|
keys.sort(); // Sort keys alphabetically
|
|
31
31
|
return keys;
|
|
32
32
|
}
|
|
33
|
+
// GenerateFeaturesID generates a hash ID for the server SDK to detect feature flag changes.
|
|
34
|
+
// It uses FNV-1a 64-bit hash algorithm which is:
|
|
35
|
+
// - Fast enough for SDK polling frequency
|
|
36
|
+
// - 64-bit provides negligible collision risk for feature flag counts
|
|
37
|
+
// - No cryptographic requirements for change detection
|
|
33
38
|
function GenerateFeaturesID(features) {
|
|
34
39
|
// Sort features based on the 'id'
|
|
35
40
|
features.sort(function (a, b) {
|
|
@@ -37,14 +42,19 @@ function GenerateFeaturesID(features) {
|
|
|
37
42
|
});
|
|
38
43
|
// Initialize FNV-1a 64-bit hash string
|
|
39
44
|
var hashInput = '';
|
|
40
|
-
// Concatenate each feature's 'id' and '
|
|
45
|
+
// Concatenate each feature's 'id' and 'updatedAt' into the hash input
|
|
41
46
|
features.forEach(function (feature) {
|
|
42
|
-
hashInput += "".concat(feature.getId(), ":").concat(feature.
|
|
47
|
+
hashInput += "".concat(feature.getId(), ":").concat(feature.getUpdatedAt());
|
|
43
48
|
});
|
|
44
49
|
// Generate the FNV-1a 64-bit hash and return it as a decimal string
|
|
45
50
|
var hash = fnv_plus_1["default"].hash(hashInput, 64);
|
|
46
51
|
return hash.dec();
|
|
47
52
|
}
|
|
53
|
+
// UserEvaluationsID generates a hash ID for the client SDK to detect evaluation changes.
|
|
54
|
+
// It uses FNV-1a 64-bit hash algorithm which is:
|
|
55
|
+
// - Fast enough for SDK polling frequency
|
|
56
|
+
// - 64-bit provides negligible collision risk for feature flag counts
|
|
57
|
+
// - No cryptographic requirements for change detection
|
|
48
58
|
function UserEvaluationsID(userID, userMetadata,
|
|
49
59
|
// equivalent to map[string]string in Go
|
|
50
60
|
features) {
|
|
@@ -61,7 +71,7 @@ features) {
|
|
|
61
71
|
});
|
|
62
72
|
// Append feature details to the hash input
|
|
63
73
|
features.forEach(function (feature) {
|
|
64
|
-
hashInput += "".concat(feature.getId(), ":").concat(feature.
|
|
74
|
+
hashInput += "".concat(feature.getId(), ":").concat(feature.getUpdatedAt());
|
|
65
75
|
});
|
|
66
76
|
// Generate the FNV-1a 64-bit hash
|
|
67
77
|
var hash = fnv_plus_1["default"].hash(hashInput, 64);
|
package/lib/userEvaluation.mjs
CHANGED
|
@@ -25,19 +25,29 @@ function sortMapKeys(data) {
|
|
|
25
25
|
keys.sort(); // Sort keys alphabetically
|
|
26
26
|
return keys;
|
|
27
27
|
}
|
|
28
|
+
// GenerateFeaturesID generates a hash ID for the server SDK to detect feature flag changes.
|
|
29
|
+
// It uses FNV-1a 64-bit hash algorithm which is:
|
|
30
|
+
// - Fast enough for SDK polling frequency
|
|
31
|
+
// - 64-bit provides negligible collision risk for feature flag counts
|
|
32
|
+
// - No cryptographic requirements for change detection
|
|
28
33
|
function GenerateFeaturesID(features) {
|
|
29
34
|
// Sort features based on the 'id'
|
|
30
35
|
features.sort((a, b) => (a.getId() < b.getId() ? -1 : 1));
|
|
31
36
|
// Initialize FNV-1a 64-bit hash string
|
|
32
37
|
let hashInput = '';
|
|
33
|
-
// Concatenate each feature's 'id' and '
|
|
38
|
+
// Concatenate each feature's 'id' and 'updatedAt' into the hash input
|
|
34
39
|
features.forEach((feature) => {
|
|
35
|
-
hashInput += `${feature.getId()}:${feature.
|
|
40
|
+
hashInput += `${feature.getId()}:${feature.getUpdatedAt()}`;
|
|
36
41
|
});
|
|
37
42
|
// Generate the FNV-1a 64-bit hash and return it as a decimal string
|
|
38
43
|
const hash = fnv_plus_1.default.hash(hashInput, 64);
|
|
39
44
|
return hash.dec();
|
|
40
45
|
}
|
|
46
|
+
// UserEvaluationsID generates a hash ID for the client SDK to detect evaluation changes.
|
|
47
|
+
// It uses FNV-1a 64-bit hash algorithm which is:
|
|
48
|
+
// - Fast enough for SDK polling frequency
|
|
49
|
+
// - 64-bit provides negligible collision risk for feature flag counts
|
|
50
|
+
// - No cryptographic requirements for change detection
|
|
41
51
|
function UserEvaluationsID(userID, userMetadata, // equivalent to map[string]string in Go
|
|
42
52
|
features) {
|
|
43
53
|
// Sort features by ID
|
|
@@ -51,7 +61,7 @@ features) {
|
|
|
51
61
|
});
|
|
52
62
|
// Append feature details to the hash input
|
|
53
63
|
features.forEach((feature) => {
|
|
54
|
-
hashInput += `${feature.getId()}:${feature.
|
|
64
|
+
hashInput += `${feature.getId()}:${feature.getUpdatedAt()}`;
|
|
55
65
|
});
|
|
56
66
|
// Generate the FNV-1a 64-bit hash
|
|
57
67
|
const hash = fnv_plus_1.default.hash(hashInput, 64);
|
package/package.json
CHANGED
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kenji71089/evaluation",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
7
7
|
"author": "",
|
|
8
8
|
"license": "ISC",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@improbable-eng/grpc-web": "^0.15.0",
|
|
11
10
|
"@types/fnv-plus": "^1.3.2",
|
|
12
11
|
"@types/google-protobuf": "^3.15.12",
|
|
12
|
+
"@types/murmurhash3js": "^3.0.7",
|
|
13
13
|
"@types/semver": "^7.5.8",
|
|
14
|
+
"fnv-plus": "^1.3.1",
|
|
14
15
|
"google-protobuf": "3.14.0",
|
|
15
|
-
"
|
|
16
|
+
"js-yaml": "^4.1.0",
|
|
17
|
+
"murmurhash3js": "^3.0.1"
|
|
16
18
|
},
|
|
17
19
|
"devDependencies": {
|
|
18
|
-
"@eslint/js": "^9.8.0",
|
|
19
|
-
"@types/eslint": "^9.6.0",
|
|
20
|
-
"@types/eslint__js": "^8.42.3",
|
|
21
|
-
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
22
|
-
"@typescript-eslint/parser": "^8.0.0",
|
|
23
20
|
"@babel/cli": "7.24.8",
|
|
24
21
|
"@babel/core": "7.25.2",
|
|
25
22
|
"@babel/preset-env": "7.25.3",
|
|
@@ -28,6 +25,13 @@
|
|
|
28
25
|
"@bazel/rollup": "5.8.1",
|
|
29
26
|
"@bazel/terser": "5.8.1",
|
|
30
27
|
"@bazel/typescript": "5.8.1",
|
|
28
|
+
"@eslint/js": "^9.8.0",
|
|
29
|
+
"@types/node": "^22.15.35",
|
|
30
|
+
"@types/eslint": "^9.6.0",
|
|
31
|
+
"@types/eslint__js": "^8.42.3",
|
|
32
|
+
"@types/js-yaml": "^4.0.9",
|
|
33
|
+
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
34
|
+
"@typescript-eslint/parser": "^8.0.0",
|
|
31
35
|
"ava": "6.1.3",
|
|
32
36
|
"cpx": "1.5.0",
|
|
33
37
|
"eslint": "^9.8.0",
|
|
@@ -42,5 +46,8 @@
|
|
|
42
46
|
"tsx": "^4.19.1",
|
|
43
47
|
"typescript": "^5.5.4",
|
|
44
48
|
"typescript-eslint": "^8.7.0"
|
|
49
|
+
},
|
|
50
|
+
"resolutions": {
|
|
51
|
+
"tar": "^7.5.4"
|
|
45
52
|
}
|
|
46
53
|
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
// source: google/api/annotations.proto
|
|
4
|
-
/**
|
|
5
|
-
* @fileoverview
|
|
6
|
-
* @enhanceable
|
|
7
|
-
* @suppress {missingRequire} reports error on implicit type usages.
|
|
8
|
-
* @suppress {messageConventions} JS Compiler reports an error if a variable or
|
|
9
|
-
* field starts with 'MSG_' and isn't a translatable message.
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
12
|
-
// GENERATED CODE -- DO NOT EDIT!
|
|
13
|
-
|
|
14
|
-
// @ts-nocheck
|
|
15
|
-
|
|
16
|
-
var jspb = require('google-protobuf');
|
|
17
|
-
var goog = jspb;
|
|
18
|
-
var global = typeof globalThis !== 'undefined' && globalThis || typeof window !== 'undefined' && window || typeof global !== 'undefined' && global || typeof self !== 'undefined' && self || function () {
|
|
19
|
-
return this;
|
|
20
|
-
}.call(null) || Function('return this')();
|
|
21
|
-
var google_api_http_pb = require('../../google/api/http_pb.js');
|
|
22
|
-
goog.object.extend(proto, google_api_http_pb);
|
|
23
|
-
var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js');
|
|
24
|
-
goog.object.extend(proto, google_protobuf_descriptor_pb);
|
|
25
|
-
goog.exportSymbol('proto.google.api.http', null, global);
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* A tuple of {field number, class constructor} for the extension
|
|
29
|
-
* field named `http`.
|
|
30
|
-
* @type {!jspb.ExtensionFieldInfo<!proto.google.api.HttpRule>}
|
|
31
|
-
*/
|
|
32
|
-
proto.google.api.http = new jspb.ExtensionFieldInfo(72295728, {
|
|
33
|
-
http: 0
|
|
34
|
-
}, google_api_http_pb.HttpRule, /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */
|
|
35
|
-
google_api_http_pb.HttpRule.toObject, 0);
|
|
36
|
-
google_protobuf_descriptor_pb.MethodOptions.extensionsBinary[72295728] = new jspb.ExtensionFieldBinaryInfo(proto.google.api.http, jspb.BinaryReader.prototype.readMessage, jspb.BinaryWriter.prototype.writeMessage, google_api_http_pb.HttpRule.serializeBinaryToWriter, google_api_http_pb.HttpRule.deserializeBinaryFromReader, false);
|
|
37
|
-
// This registers the extension field with the extended class, so that
|
|
38
|
-
// toObject() will function correctly.
|
|
39
|
-
google_protobuf_descriptor_pb.MethodOptions.extensions[72295728] = proto.google.api.http;
|
|
40
|
-
goog.object.extend(exports, proto.google.api);
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
// source: google/api/annotations.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 google_api_http_pb = require('../../google/api/http_pb.js');
|
|
25
|
-
goog.object.extend(proto, google_api_http_pb);
|
|
26
|
-
var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js');
|
|
27
|
-
goog.object.extend(proto, google_protobuf_descriptor_pb);
|
|
28
|
-
goog.exportSymbol('proto.google.api.http', null, global);
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* A tuple of {field number, class constructor} for the extension
|
|
32
|
-
* field named `http`.
|
|
33
|
-
* @type {!jspb.ExtensionFieldInfo<!proto.google.api.HttpRule>}
|
|
34
|
-
*/
|
|
35
|
-
proto.google.api.http = new jspb.ExtensionFieldInfo(
|
|
36
|
-
72295728,
|
|
37
|
-
{http: 0},
|
|
38
|
-
google_api_http_pb.HttpRule,
|
|
39
|
-
/** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (
|
|
40
|
-
google_api_http_pb.HttpRule.toObject),
|
|
41
|
-
0);
|
|
42
|
-
|
|
43
|
-
google_protobuf_descriptor_pb.MethodOptions.extensionsBinary[72295728] = new jspb.ExtensionFieldBinaryInfo(
|
|
44
|
-
proto.google.api.http,
|
|
45
|
-
jspb.BinaryReader.prototype.readMessage,
|
|
46
|
-
jspb.BinaryWriter.prototype.writeMessage,
|
|
47
|
-
google_api_http_pb.HttpRule.serializeBinaryToWriter,
|
|
48
|
-
google_api_http_pb.HttpRule.deserializeBinaryFromReader,
|
|
49
|
-
false);
|
|
50
|
-
// This registers the extension field with the extended class, so that
|
|
51
|
-
// toObject() will function correctly.
|
|
52
|
-
google_protobuf_descriptor_pb.MethodOptions.extensions[72295728] = proto.google.api.http;
|
|
53
|
-
|
|
54
|
-
goog.object.extend(exports, proto.google.api);
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
// package: google.api
|
|
2
|
-
// file: google/api/http.proto
|
|
3
|
-
|
|
4
|
-
import * as jspb from 'google-protobuf';
|
|
5
|
-
|
|
6
|
-
export class Http extends jspb.Message {
|
|
7
|
-
clearRulesList(): void;
|
|
8
|
-
getRulesList(): Array<HttpRule>;
|
|
9
|
-
setRulesList(value: Array<HttpRule>): void;
|
|
10
|
-
addRules(value?: HttpRule, index?: number): HttpRule;
|
|
11
|
-
|
|
12
|
-
getFullyDecodeReservedExpansion(): boolean;
|
|
13
|
-
setFullyDecodeReservedExpansion(value: boolean): void;
|
|
14
|
-
|
|
15
|
-
serializeBinary(): Uint8Array;
|
|
16
|
-
toObject(includeInstance?: boolean): Http.AsObject;
|
|
17
|
-
static toObject(includeInstance: boolean, msg: Http): Http.AsObject;
|
|
18
|
-
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
19
|
-
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
20
|
-
static serializeBinaryToWriter(message: Http, writer: jspb.BinaryWriter): void;
|
|
21
|
-
static deserializeBinary(bytes: Uint8Array): Http;
|
|
22
|
-
static deserializeBinaryFromReader(message: Http, reader: jspb.BinaryReader): Http;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export namespace Http {
|
|
26
|
-
export type AsObject = {
|
|
27
|
-
rulesList: Array<HttpRule.AsObject>,
|
|
28
|
-
fullyDecodeReservedExpansion: boolean,
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export class HttpRule extends jspb.Message {
|
|
33
|
-
getSelector(): string;
|
|
34
|
-
setSelector(value: string): void;
|
|
35
|
-
|
|
36
|
-
hasGet(): boolean;
|
|
37
|
-
clearGet(): void;
|
|
38
|
-
getGet(): string;
|
|
39
|
-
setGet(value: string): void;
|
|
40
|
-
|
|
41
|
-
hasPut(): boolean;
|
|
42
|
-
clearPut(): void;
|
|
43
|
-
getPut(): string;
|
|
44
|
-
setPut(value: string): void;
|
|
45
|
-
|
|
46
|
-
hasPost(): boolean;
|
|
47
|
-
clearPost(): void;
|
|
48
|
-
getPost(): string;
|
|
49
|
-
setPost(value: string): void;
|
|
50
|
-
|
|
51
|
-
hasDelete(): boolean;
|
|
52
|
-
clearDelete(): void;
|
|
53
|
-
getDelete(): string;
|
|
54
|
-
setDelete(value: string): void;
|
|
55
|
-
|
|
56
|
-
hasPatch(): boolean;
|
|
57
|
-
clearPatch(): void;
|
|
58
|
-
getPatch(): string;
|
|
59
|
-
setPatch(value: string): void;
|
|
60
|
-
|
|
61
|
-
hasCustom(): boolean;
|
|
62
|
-
clearCustom(): void;
|
|
63
|
-
getCustom(): CustomHttpPattern | undefined;
|
|
64
|
-
setCustom(value?: CustomHttpPattern): void;
|
|
65
|
-
|
|
66
|
-
getBody(): string;
|
|
67
|
-
setBody(value: string): void;
|
|
68
|
-
|
|
69
|
-
clearAdditionalBindingsList(): void;
|
|
70
|
-
getAdditionalBindingsList(): Array<HttpRule>;
|
|
71
|
-
setAdditionalBindingsList(value: Array<HttpRule>): void;
|
|
72
|
-
addAdditionalBindings(value?: HttpRule, index?: number): HttpRule;
|
|
73
|
-
|
|
74
|
-
getPatternCase(): HttpRule.PatternCase;
|
|
75
|
-
serializeBinary(): Uint8Array;
|
|
76
|
-
toObject(includeInstance?: boolean): HttpRule.AsObject;
|
|
77
|
-
static toObject(includeInstance: boolean, msg: HttpRule): HttpRule.AsObject;
|
|
78
|
-
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
79
|
-
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
80
|
-
static serializeBinaryToWriter(message: HttpRule, writer: jspb.BinaryWriter): void;
|
|
81
|
-
static deserializeBinary(bytes: Uint8Array): HttpRule;
|
|
82
|
-
static deserializeBinaryFromReader(message: HttpRule, reader: jspb.BinaryReader): HttpRule;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export namespace HttpRule {
|
|
86
|
-
export type AsObject = {
|
|
87
|
-
selector: string,
|
|
88
|
-
get: string,
|
|
89
|
-
put: string,
|
|
90
|
-
post: string,
|
|
91
|
-
pb_delete: string,
|
|
92
|
-
patch: string,
|
|
93
|
-
custom?: CustomHttpPattern.AsObject,
|
|
94
|
-
body: string,
|
|
95
|
-
additionalBindingsList: Array<HttpRule.AsObject>,
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export enum PatternCase {
|
|
99
|
-
PATTERN_NOT_SET = 0,
|
|
100
|
-
GET = 2,
|
|
101
|
-
PUT = 3,
|
|
102
|
-
POST = 4,
|
|
103
|
-
DELETE = 5,
|
|
104
|
-
PATCH = 6,
|
|
105
|
-
CUSTOM = 8,
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
export class CustomHttpPattern extends jspb.Message {
|
|
110
|
-
getKind(): string;
|
|
111
|
-
setKind(value: string): void;
|
|
112
|
-
|
|
113
|
-
getPath(): string;
|
|
114
|
-
setPath(value: string): void;
|
|
115
|
-
|
|
116
|
-
serializeBinary(): Uint8Array;
|
|
117
|
-
toObject(includeInstance?: boolean): CustomHttpPattern.AsObject;
|
|
118
|
-
static toObject(includeInstance: boolean, msg: CustomHttpPattern): CustomHttpPattern.AsObject;
|
|
119
|
-
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
120
|
-
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
121
|
-
static serializeBinaryToWriter(message: CustomHttpPattern, writer: jspb.BinaryWriter): void;
|
|
122
|
-
static deserializeBinary(bytes: Uint8Array): CustomHttpPattern;
|
|
123
|
-
static deserializeBinaryFromReader(message: CustomHttpPattern, reader: jspb.BinaryReader): CustomHttpPattern;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
export namespace CustomHttpPattern {
|
|
127
|
-
export type AsObject = {
|
|
128
|
-
kind: string,
|
|
129
|
-
path: string,
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|