clarifai-web-grpc 1.1.3 → 1.1.7

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 (66) hide show
  1. package/.github/workflows/ci.yml +0 -2
  2. package/CHANGELOG.md +3 -3
  3. package/lib/google/api/annotations_grpc_pb.js +1 -2
  4. package/lib/google/api/annotations_pb.js +19 -4
  5. package/lib/google/api/http_grpc_pb.js +1 -2
  6. package/lib/google/api/http_pb.js +606 -414
  7. package/lib/proto/clarifai/api/resources_pb.d.ts +5052 -1
  8. package/lib/proto/clarifai/api/resources_pb.js +26126 -17879
  9. package/lib/proto/clarifai/api/serviceServiceClientPb.ts +3002 -0
  10. package/lib/proto/clarifai/api/service_pb.d.ts +5582 -1
  11. package/lib/proto/clarifai/api/service_pb.js +30050 -20944
  12. package/lib/proto/clarifai/api/status/status_code_pb.d.ts +296 -1
  13. package/lib/proto/clarifai/api/status/status_code_pb.js +295 -293
  14. package/lib/proto/clarifai/api/status/status_pb.d.ts +73 -1
  15. package/lib/proto/clarifai/api/status/status_pb.js +357 -250
  16. package/lib/proto/clarifai/api/utils/extensions_pb.d.ts +4 -1
  17. package/lib/proto/clarifai/api/utils/extensions_pb.js +53 -10
  18. package/lib/proto/clarifai/api/utils/test_proto_pb.d.ts +81 -1
  19. package/lib/proto/clarifai/api/utils/test_proto_pb.js +385 -266
  20. package/lib/proto/clarifai/auth/scope/scope_pb.d.ts +92 -1
  21. package/lib/proto/clarifai/auth/scope/scope_pb.js +232 -163
  22. package/lib/proto/clarifai/auth/types/types_pb.d.ts +10 -1
  23. package/lib/proto/clarifai/auth/types/types_pb.js +9 -7
  24. package/lib/proto/clarifai/auth/util/extension_pb.d.ts +6 -1
  25. package/lib/proto/clarifai/auth/util/extension_pb.js +87 -16
  26. package/package.json +22 -18
  27. package/tsconfig.json +6 -4
  28. package/.husky/pre-commit +0 -4
  29. package/.mocharc.yml +0 -5
  30. package/dist/google/api/annotations_grpc_pb.d.ts +0 -0
  31. package/dist/google/api/annotations_grpc_pb.js +0 -2
  32. package/dist/google/api/annotations_pb.d.ts +0 -1
  33. package/dist/google/api/annotations_pb.js +0 -32
  34. package/dist/google/api/http_grpc_pb.d.ts +0 -0
  35. package/dist/google/api/http_grpc_pb.js +0 -2
  36. package/dist/google/api/http_pb.d.ts +0 -1
  37. package/dist/google/api/http_pb.js +0 -813
  38. package/dist/index.d.ts +0 -5
  39. package/dist/index.js +0 -11
  40. package/dist/proto/clarifai/api/resources_pb.d.ts +0 -1
  41. package/dist/proto/clarifai/api/resources_pb.js +0 -32957
  42. package/dist/proto/clarifai/api/serviceServiceClientPb.d.ts +0 -275
  43. package/dist/proto/clarifai/api/serviceServiceClientPb.js +0 -908
  44. package/dist/proto/clarifai/api/service_pb.d.ts +0 -1
  45. package/dist/proto/clarifai/api/service_pb.js +0 -38791
  46. package/dist/proto/clarifai/api/status/status_code_pb.d.ts +0 -1
  47. package/dist/proto/clarifai/api/status/status_code_pb.js +0 -312
  48. package/dist/proto/clarifai/api/status/status_pb.d.ts +0 -1
  49. package/dist/proto/clarifai/api/status/status_pb.js +0 -473
  50. package/dist/proto/clarifai/api/utils/extensions_pb.d.ts +0 -1
  51. package/dist/proto/clarifai/api/utils/extensions_pb.js +0 -52
  52. package/dist/proto/clarifai/api/utils/test_proto_pb.d.ts +0 -1
  53. package/dist/proto/clarifai/api/utils/test_proto_pb.js +0 -521
  54. package/dist/proto/clarifai/auth/scope/scope_pb.d.ts +0 -1
  55. package/dist/proto/clarifai/auth/scope/scope_pb.js +0 -294
  56. package/dist/proto/clarifai/auth/types/types_pb.d.ts +0 -1
  57. package/dist/proto/clarifai/auth/types/types_pb.js +0 -26
  58. package/dist/proto/clarifai/auth/util/extension_pb.d.ts +0 -1
  59. package/dist/proto/clarifai/auth/util/extension_pb.js +0 -80
  60. package/dist/resources.d.ts +0 -12
  61. package/dist/resources.js +0 -47
  62. package/dist/service.d.ts +0 -1
  63. package/dist/service.js +0 -13
  64. package/tests/basic.test.ts +0 -41
  65. package/tests/helpers.test.ts +0 -47
  66. package/tsconfig.cjs.json +0 -7
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  // source: proto/clarifai/auth/util/extension.proto
3
2
  /**
4
3
  * @fileoverview
@@ -8,9 +7,11 @@
8
7
  * @public
9
8
  */
10
9
  // GENERATED CODE -- DO NOT EDIT!
10
+
11
11
  var jspb = require('google-protobuf');
12
12
  var goog = jspb;
13
13
  var global = Function('return this')();
14
+
14
15
  var proto_clarifai_auth_scope_scope_pb = require('../../../../proto/clarifai/auth/scope/scope_pb.js');
15
16
  goog.object.extend(proto, proto_clarifai_auth_scope_scope_pb);
16
17
  var proto_clarifai_auth_types_types_pb = require('../../../../proto/clarifai/auth/types/types_pb.js');
@@ -22,59 +23,129 @@ goog.exportSymbol('proto.clarifai.auth.util.clDependingScopesList', null, global
22
23
  goog.exportSymbol('proto.clarifai.auth.util.clPrivateField', null, global);
23
24
  goog.exportSymbol('proto.clarifai.auth.util.clPrivateMessage', null, global);
24
25
  goog.exportSymbol('proto.clarifai.auth.util.clPrivateRpc', null, global);
26
+
25
27
  /**
26
28
  * A tuple of {field number, class constructor} for the extension
27
29
  * field named `clPrivateField`.
28
30
  * @type {!jspb.ExtensionFieldInfo<boolean>}
29
31
  */
30
- proto.clarifai.auth.util.clPrivateField = new jspb.ExtensionFieldInfo(80320, { clPrivateField: 0 }, null,
31
- /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (null), 0);
32
- google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[80320] = new jspb.ExtensionFieldBinaryInfo(proto.clarifai.auth.util.clPrivateField, jspb.BinaryReader.prototype.readBool, jspb.BinaryWriter.prototype.writeBool, undefined, undefined, false);
32
+ proto.clarifai.auth.util.clPrivateField = new jspb.ExtensionFieldInfo(
33
+ 80320,
34
+ {clPrivateField: 0},
35
+ null,
36
+ /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (
37
+ null),
38
+ 0);
39
+
40
+ google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[80320] = new jspb.ExtensionFieldBinaryInfo(
41
+ proto.clarifai.auth.util.clPrivateField,
42
+ jspb.BinaryReader.prototype.readBool,
43
+ jspb.BinaryWriter.prototype.writeBool,
44
+ undefined,
45
+ undefined,
46
+ false);
33
47
  // This registers the extension field with the extended class, so that
34
48
  // toObject() will function correctly.
35
49
  google_protobuf_descriptor_pb.FieldOptions.extensions[80320] = proto.clarifai.auth.util.clPrivateField;
50
+
51
+
36
52
  /**
37
53
  * A tuple of {field number, class constructor} for the extension
38
54
  * field named `clPrivateRpc`.
39
55
  * @type {!jspb.ExtensionFieldInfo<boolean>}
40
56
  */
41
- proto.clarifai.auth.util.clPrivateRpc = new jspb.ExtensionFieldInfo(80321, { clPrivateRpc: 0 }, null,
42
- /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (null), 0);
43
- google_protobuf_descriptor_pb.MethodOptions.extensionsBinary[80321] = new jspb.ExtensionFieldBinaryInfo(proto.clarifai.auth.util.clPrivateRpc, jspb.BinaryReader.prototype.readBool, jspb.BinaryWriter.prototype.writeBool, undefined, undefined, false);
57
+ proto.clarifai.auth.util.clPrivateRpc = new jspb.ExtensionFieldInfo(
58
+ 80321,
59
+ {clPrivateRpc: 0},
60
+ null,
61
+ /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (
62
+ null),
63
+ 0);
64
+
65
+ google_protobuf_descriptor_pb.MethodOptions.extensionsBinary[80321] = new jspb.ExtensionFieldBinaryInfo(
66
+ proto.clarifai.auth.util.clPrivateRpc,
67
+ jspb.BinaryReader.prototype.readBool,
68
+ jspb.BinaryWriter.prototype.writeBool,
69
+ undefined,
70
+ undefined,
71
+ false);
44
72
  // This registers the extension field with the extended class, so that
45
73
  // toObject() will function correctly.
46
74
  google_protobuf_descriptor_pb.MethodOptions.extensions[80321] = proto.clarifai.auth.util.clPrivateRpc;
75
+
76
+
47
77
  /**
48
78
  * A tuple of {field number, class constructor} for the extension
49
79
  * field named `clDependingScopesList`.
50
80
  * @type {!jspb.ExtensionFieldInfo<!Array<!proto.clarifai.auth.scope.S>>}
51
81
  */
52
- proto.clarifai.auth.util.clDependingScopesList = new jspb.ExtensionFieldInfo(80322, { clDependingScopesList: 0 }, null,
53
- /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (null), 1);
54
- google_protobuf_descriptor_pb.MethodOptions.extensionsBinary[80322] = new jspb.ExtensionFieldBinaryInfo(proto.clarifai.auth.util.clDependingScopesList, jspb.BinaryReader.prototype.readPackedEnum, jspb.BinaryWriter.prototype.writePackedEnum, undefined, undefined, true);
82
+ proto.clarifai.auth.util.clDependingScopesList = new jspb.ExtensionFieldInfo(
83
+ 80322,
84
+ {clDependingScopesList: 0},
85
+ null,
86
+ /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (
87
+ null),
88
+ 1);
89
+
90
+ google_protobuf_descriptor_pb.MethodOptions.extensionsBinary[80322] = new jspb.ExtensionFieldBinaryInfo(
91
+ proto.clarifai.auth.util.clDependingScopesList,
92
+ jspb.BinaryReader.prototype.readPackedEnum,
93
+ jspb.BinaryWriter.prototype.writePackedEnum,
94
+ undefined,
95
+ undefined,
96
+ true);
55
97
  // This registers the extension field with the extended class, so that
56
98
  // toObject() will function correctly.
57
99
  google_protobuf_descriptor_pb.MethodOptions.extensions[80322] = proto.clarifai.auth.util.clDependingScopesList;
100
+
101
+
58
102
  /**
59
103
  * A tuple of {field number, class constructor} for the extension
60
104
  * field named `clAuthType`.
61
105
  * @type {!jspb.ExtensionFieldInfo<!proto.clarifai.auth.types.AuthType>}
62
106
  */
63
- proto.clarifai.auth.util.clAuthType = new jspb.ExtensionFieldInfo(80323, { clAuthType: 0 }, null,
64
- /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (null), 0);
65
- google_protobuf_descriptor_pb.MethodOptions.extensionsBinary[80323] = new jspb.ExtensionFieldBinaryInfo(proto.clarifai.auth.util.clAuthType, jspb.BinaryReader.prototype.readEnum, jspb.BinaryWriter.prototype.writeEnum, undefined, undefined, false);
107
+ proto.clarifai.auth.util.clAuthType = new jspb.ExtensionFieldInfo(
108
+ 80323,
109
+ {clAuthType: 0},
110
+ null,
111
+ /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (
112
+ null),
113
+ 0);
114
+
115
+ google_protobuf_descriptor_pb.MethodOptions.extensionsBinary[80323] = new jspb.ExtensionFieldBinaryInfo(
116
+ proto.clarifai.auth.util.clAuthType,
117
+ jspb.BinaryReader.prototype.readEnum,
118
+ jspb.BinaryWriter.prototype.writeEnum,
119
+ undefined,
120
+ undefined,
121
+ false);
66
122
  // This registers the extension field with the extended class, so that
67
123
  // toObject() will function correctly.
68
124
  google_protobuf_descriptor_pb.MethodOptions.extensions[80323] = proto.clarifai.auth.util.clAuthType;
125
+
126
+
69
127
  /**
70
128
  * A tuple of {field number, class constructor} for the extension
71
129
  * field named `clPrivateMessage`.
72
130
  * @type {!jspb.ExtensionFieldInfo<boolean>}
73
131
  */
74
- proto.clarifai.auth.util.clPrivateMessage = new jspb.ExtensionFieldInfo(80324, { clPrivateMessage: 0 }, null,
75
- /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (null), 0);
76
- google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[80324] = new jspb.ExtensionFieldBinaryInfo(proto.clarifai.auth.util.clPrivateMessage, jspb.BinaryReader.prototype.readBool, jspb.BinaryWriter.prototype.writeBool, undefined, undefined, false);
132
+ proto.clarifai.auth.util.clPrivateMessage = new jspb.ExtensionFieldInfo(
133
+ 80324,
134
+ {clPrivateMessage: 0},
135
+ null,
136
+ /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (
137
+ null),
138
+ 0);
139
+
140
+ google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[80324] = new jspb.ExtensionFieldBinaryInfo(
141
+ proto.clarifai.auth.util.clPrivateMessage,
142
+ jspb.BinaryReader.prototype.readBool,
143
+ jspb.BinaryWriter.prototype.writeBool,
144
+ undefined,
145
+ undefined,
146
+ false);
77
147
  // This registers the extension field with the extended class, so that
78
148
  // toObject() will function correctly.
79
149
  google_protobuf_descriptor_pb.MessageOptions.extensions[80324] = proto.clarifai.auth.util.clPrivateMessage;
150
+
80
151
  goog.object.extend(exports, proto.clarifai.auth.util);
package/package.json CHANGED
@@ -1,22 +1,27 @@
1
1
  {
2
2
  "name": "clarifai-web-grpc",
3
- "version": "1.1.3",
3
+ "version": "1.1.7",
4
4
  "description": "The official Clarifai gRPC-web client",
5
- "main": "dist/index.js",
5
+ "type": "module",
6
+ "main": "lib/index.js",
6
7
  "module": "lib/index.js",
7
8
  "types": "lib/index.d.ts",
8
9
  "exports": {
9
- ".": {
10
- "import": "./lib/index.js",
11
- "require": "./dist/index.js"
12
- },
13
- "./resources": {
14
- "import": "./lib/resources.js",
15
- "require": "./dist/resources.js"
16
- },
17
- "./service": {
18
- "import": "./lib/service.js",
19
- "require": "./dist/service.js"
10
+ ".": "./lib/index.js",
11
+ "./resources": "./lib/resources.js",
12
+ "./service": "./lib/service.js"
13
+ },
14
+ "typesVersions": {
15
+ "*": {
16
+ "index": [
17
+ "lib/index.d.ts"
18
+ ],
19
+ "resources": [
20
+ "lib/resources.d.ts"
21
+ ],
22
+ "service": [
23
+ "lib/service.d.ts"
24
+ ]
20
25
  }
21
26
  },
22
27
  "repository": "https://github.com/Clarifai/clarifai-web-grpc",
@@ -26,14 +31,13 @@
26
31
  "scripts": {
27
32
  "test": "mocha",
28
33
  "lint": "eslint ./src/index.ts ./src/resources.ts ./src/service.ts",
29
- "clean": "rm -rf dist lib clarifai-web-grpc-*.tgz",
34
+ "clean": "rm -rf lib clarifai-web-grpc-*.tgz",
30
35
  "typecheck": "tsc --pretty --noEmit",
31
- "build:cjs": "tsc -b tsconfig.cjs.json",
32
- "build:esm": "tsc -b",
33
- "build": "yarn build:esm && yarn build:cjs",
36
+ "build": "tsc -b && yarn copy-generated-protos",
34
37
  "prepack": "yarn clean && yarn build",
35
38
  "release": "semantic-release",
36
- "prepare": "husky install"
39
+ "prepare": "husky install",
40
+ "copy-generated-protos": "cp -R src/proto src/google lib"
37
41
  },
38
42
  "dependencies": {
39
43
  "google-protobuf": "~3.14.0",
package/tsconfig.json CHANGED
@@ -6,17 +6,19 @@
6
6
  "declaration": true,
7
7
  "allowJs": true,
8
8
  "outDir": "./lib",
9
- "moduleResolution": "node"
9
+ "moduleResolution": "node",
10
+ "esModuleInterop": true,
11
+ "baseUrl": "."
10
12
  },
11
13
  "include": [
12
- "./src",
14
+ "src"
13
15
  ],
14
16
  "exclude": [
15
17
  "node_modules"
16
18
  ],
17
19
  "ts-node": {
18
20
  "compilerOptions": {
19
- "module": "CommonJS"
20
- }
21
+ "module": "CommonJS",
22
+ },
21
23
  }
22
24
  }
package/.husky/pre-commit DELETED
@@ -1,4 +0,0 @@
1
- #!/bin/sh
2
- . "$(dirname "$0")/_/husky.sh"
3
-
4
- yarn test
package/.mocharc.yml DELETED
@@ -1,5 +0,0 @@
1
- color: true
2
- extension:
3
- - ts
4
- require: ts-node/register
5
- spec: tests/**/*.test.ts
File without changes
@@ -1,2 +0,0 @@
1
- "use strict";
2
- // GENERATED CODE -- NO SERVICES IN PROTO
@@ -1 +0,0 @@
1
- export {};
@@ -1,32 +0,0 @@
1
- "use strict";
2
- // source: google/api/annotations.proto
3
- /**
4
- * @fileoverview
5
- * @enhanceable
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
- /* eslint-disable */
12
- // @ts-nocheck
13
- var jspb = require('google-protobuf');
14
- var goog = jspb;
15
- var global = Function('return this')();
16
- var google_api_http_pb = require('../../google/api/http_pb.js');
17
- goog.object.extend(proto, google_api_http_pb);
18
- var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js');
19
- goog.object.extend(proto, google_protobuf_descriptor_pb);
20
- goog.exportSymbol('proto.google.api.http', null, global);
21
- /**
22
- * A tuple of {field number, class constructor} for the extension
23
- * field named `http`.
24
- * @type {!jspb.ExtensionFieldInfo<!proto.google.api.HttpRule>}
25
- */
26
- proto.google.api.http = new jspb.ExtensionFieldInfo(72295728, { http: 0 }, google_api_http_pb.HttpRule,
27
- /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (google_api_http_pb.HttpRule.toObject), 0);
28
- 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);
29
- // This registers the extension field with the extended class, so that
30
- // toObject() will function correctly.
31
- google_protobuf_descriptor_pb.MethodOptions.extensions[72295728] = proto.google.api.http;
32
- goog.object.extend(exports, proto.google.api);
File without changes
@@ -1,2 +0,0 @@
1
- "use strict";
2
- // GENERATED CODE -- NO SERVICES IN PROTO
@@ -1 +0,0 @@
1
- export {};