clarifai-web-grpc 1.1.7 → 2.0.2

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 (58) hide show
  1. package/.github/workflows/ci.yml +0 -2
  2. package/CHANGELOG.md +2 -3
  3. package/{lib/google → google}/api/annotations_grpc_pb.js +0 -0
  4. package/{src/google → google}/api/annotations_pb.js +0 -0
  5. package/{lib/google → google}/api/http_grpc_pb.js +0 -0
  6. package/{src/google → google}/api/http_pb.js +0 -0
  7. package/lib/google/api/annotations_pb.js +4 -19
  8. package/lib/google/api/http_pb.js +414 -606
  9. package/lib/proto/clarifai/api/resources_pb.d.ts +1 -5052
  10. package/lib/proto/clarifai/api/resources_pb.js +17880 -26127
  11. package/lib/proto/clarifai/api/service_pb.d.ts +1 -5582
  12. package/lib/proto/clarifai/api/service_pb.js +20941 -30047
  13. package/lib/proto/clarifai/api/status/status_code_pb.d.ts +1 -296
  14. package/lib/proto/clarifai/api/status/status_code_pb.js +293 -295
  15. package/lib/proto/clarifai/api/status/status_pb.d.ts +1 -73
  16. package/lib/proto/clarifai/api/status/status_pb.js +250 -357
  17. package/lib/proto/clarifai/api/utils/extensions_pb.d.ts +1 -4
  18. package/lib/proto/clarifai/api/utils/extensions_pb.js +10 -53
  19. package/lib/proto/clarifai/api/utils/test_proto_pb.d.ts +1 -81
  20. package/lib/proto/clarifai/api/utils/test_proto_pb.js +266 -385
  21. package/lib/proto/clarifai/auth/scope/scope_pb.d.ts +1 -92
  22. package/lib/proto/clarifai/auth/scope/scope_pb.js +163 -232
  23. package/lib/proto/clarifai/auth/types/types_pb.d.ts +1 -10
  24. package/lib/proto/clarifai/auth/types/types_pb.js +7 -9
  25. package/lib/proto/clarifai/auth/util/extension_pb.d.ts +1 -6
  26. package/lib/proto/clarifai/auth/util/extension_pb.js +16 -87
  27. package/package.json +5 -30
  28. package/{src/proto → proto}/clarifai/api/resources_pb.d.ts +0 -0
  29. package/{src/proto → proto}/clarifai/api/resources_pb.js +0 -0
  30. package/{lib/proto → proto}/clarifai/api/serviceServiceClientPb.ts +0 -0
  31. package/{src/proto → proto}/clarifai/api/service_pb.d.ts +0 -0
  32. package/{src/proto → proto}/clarifai/api/service_pb.js +0 -0
  33. package/{src/proto → proto}/clarifai/api/status/status_code_pb.d.ts +0 -0
  34. package/{src/proto → proto}/clarifai/api/status/status_code_pb.js +0 -0
  35. package/{src/proto → proto}/clarifai/api/status/status_pb.d.ts +0 -0
  36. package/{src/proto → proto}/clarifai/api/status/status_pb.js +0 -0
  37. package/{src/proto → proto}/clarifai/api/utils/extensions_pb.d.ts +0 -0
  38. package/{src/proto → proto}/clarifai/api/utils/extensions_pb.js +0 -0
  39. package/{src/proto → proto}/clarifai/api/utils/test_proto_pb.d.ts +0 -0
  40. package/{src/proto → proto}/clarifai/api/utils/test_proto_pb.js +0 -0
  41. package/{src/proto → proto}/clarifai/auth/scope/scope_pb.d.ts +0 -0
  42. package/{src/proto → proto}/clarifai/auth/scope/scope_pb.js +0 -0
  43. package/{src/proto → proto}/clarifai/auth/types/types_pb.d.ts +0 -0
  44. package/{src/proto → proto}/clarifai/auth/types/types_pb.js +0 -0
  45. package/{src/proto → proto}/clarifai/auth/util/extension_pb.d.ts +0 -0
  46. package/{src/proto → proto}/clarifai/auth/util/extension_pb.js +0 -0
  47. package/tsconfig.json +3 -10
  48. package/lib/google/api/annotations_grpc_pb.d.ts +0 -0
  49. package/lib/google/api/http_grpc_pb.d.ts +0 -0
  50. package/lib/index.d.ts +0 -5
  51. package/lib/index.js +0 -7
  52. package/lib/resources.d.ts +0 -12
  53. package/lib/resources.js +0 -11
  54. package/lib/service.d.ts +0 -1
  55. package/lib/service.js +0 -1
  56. package/src/google/api/annotations_grpc_pb.js +0 -1
  57. package/src/google/api/http_grpc_pb.js +0 -1
  58. package/src/proto/clarifai/api/serviceServiceClientPb.ts +0 -3002
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  // source: proto/clarifai/auth/util/extension.proto
2
3
  /**
3
4
  * @fileoverview
@@ -7,11 +8,9 @@
7
8
  * @public
8
9
  */
9
10
  // 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
-
15
14
  var proto_clarifai_auth_scope_scope_pb = require('../../../../proto/clarifai/auth/scope/scope_pb.js');
16
15
  goog.object.extend(proto, proto_clarifai_auth_scope_scope_pb);
17
16
  var proto_clarifai_auth_types_types_pb = require('../../../../proto/clarifai/auth/types/types_pb.js');
@@ -23,129 +22,59 @@ goog.exportSymbol('proto.clarifai.auth.util.clDependingScopesList', null, global
23
22
  goog.exportSymbol('proto.clarifai.auth.util.clPrivateField', null, global);
24
23
  goog.exportSymbol('proto.clarifai.auth.util.clPrivateMessage', null, global);
25
24
  goog.exportSymbol('proto.clarifai.auth.util.clPrivateRpc', null, global);
26
-
27
25
  /**
28
26
  * A tuple of {field number, class constructor} for the extension
29
27
  * field named `clPrivateField`.
30
28
  * @type {!jspb.ExtensionFieldInfo<boolean>}
31
29
  */
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);
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);
47
33
  // This registers the extension field with the extended class, so that
48
34
  // toObject() will function correctly.
49
35
  google_protobuf_descriptor_pb.FieldOptions.extensions[80320] = proto.clarifai.auth.util.clPrivateField;
50
-
51
-
52
36
  /**
53
37
  * A tuple of {field number, class constructor} for the extension
54
38
  * field named `clPrivateRpc`.
55
39
  * @type {!jspb.ExtensionFieldInfo<boolean>}
56
40
  */
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);
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);
72
44
  // This registers the extension field with the extended class, so that
73
45
  // toObject() will function correctly.
74
46
  google_protobuf_descriptor_pb.MethodOptions.extensions[80321] = proto.clarifai.auth.util.clPrivateRpc;
75
-
76
-
77
47
  /**
78
48
  * A tuple of {field number, class constructor} for the extension
79
49
  * field named `clDependingScopesList`.
80
50
  * @type {!jspb.ExtensionFieldInfo<!Array<!proto.clarifai.auth.scope.S>>}
81
51
  */
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);
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);
97
55
  // This registers the extension field with the extended class, so that
98
56
  // toObject() will function correctly.
99
57
  google_protobuf_descriptor_pb.MethodOptions.extensions[80322] = proto.clarifai.auth.util.clDependingScopesList;
100
-
101
-
102
58
  /**
103
59
  * A tuple of {field number, class constructor} for the extension
104
60
  * field named `clAuthType`.
105
61
  * @type {!jspb.ExtensionFieldInfo<!proto.clarifai.auth.types.AuthType>}
106
62
  */
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);
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);
122
66
  // This registers the extension field with the extended class, so that
123
67
  // toObject() will function correctly.
124
68
  google_protobuf_descriptor_pb.MethodOptions.extensions[80323] = proto.clarifai.auth.util.clAuthType;
125
-
126
-
127
69
  /**
128
70
  * A tuple of {field number, class constructor} for the extension
129
71
  * field named `clPrivateMessage`.
130
72
  * @type {!jspb.ExtensionFieldInfo<boolean>}
131
73
  */
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);
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);
147
77
  // This registers the extension field with the extended class, so that
148
78
  // toObject() will function correctly.
149
79
  google_protobuf_descriptor_pb.MessageOptions.extensions[80324] = proto.clarifai.auth.util.clPrivateMessage;
150
-
151
80
  goog.object.extend(exports, proto.clarifai.auth.util);
package/package.json CHANGED
@@ -1,46 +1,21 @@
1
1
  {
2
2
  "name": "clarifai-web-grpc",
3
- "version": "1.1.7",
3
+ "version": "2.0.2",
4
4
  "description": "The official Clarifai gRPC-web client",
5
5
  "type": "module",
6
- "main": "lib/index.js",
7
- "module": "lib/index.js",
8
- "types": "lib/index.d.ts",
9
- "exports": {
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
- ]
25
- }
26
- },
27
6
  "repository": "https://github.com/Clarifai/clarifai-web-grpc",
28
7
  "author": "Clarifai Inc.",
29
8
  "license": "Apache-2.0",
30
9
  "keywords": [],
31
10
  "scripts": {
32
- "test": "mocha",
33
- "lint": "eslint ./src/index.ts ./src/resources.ts ./src/service.ts",
11
+ "build": "tsc -b",
34
12
  "clean": "rm -rf lib clarifai-web-grpc-*.tgz",
35
- "typecheck": "tsc --pretty --noEmit",
36
- "build": "tsc -b && yarn copy-generated-protos",
37
13
  "prepack": "yarn clean && yarn build",
38
14
  "release": "semantic-release",
39
- "prepare": "husky install",
40
- "copy-generated-protos": "cp -R src/proto src/google lib"
15
+ "prepare": "husky install"
41
16
  },
42
17
  "dependencies": {
43
- "google-protobuf": "~3.14.0",
18
+ "google-protobuf": "^3.19.4",
44
19
  "grpc-web": "~1.0.5"
45
20
  },
46
21
  "devDependencies": {
@@ -48,7 +23,7 @@
48
23
  "@commitlint/config-conventional": "^16.0.0",
49
24
  "@semantic-release/changelog": "^6.0.1",
50
25
  "@types/chai": "^4.3.0",
51
- "@types/google-protobuf": "~3.7.0",
26
+ "@types/google-protobuf": "^3.15.5",
52
27
  "@types/mocha": "^9.0.0",
53
28
  "@types/node": "~10.17.0",
54
29
  "@typescript-eslint/eslint-plugin": "^5.10.1",
File without changes
package/tsconfig.json CHANGED
@@ -6,19 +6,12 @@
6
6
  "declaration": true,
7
7
  "allowJs": true,
8
8
  "outDir": "./lib",
9
- "moduleResolution": "node",
10
- "esModuleInterop": true,
11
- "baseUrl": "."
9
+ "moduleResolution": "node"
12
10
  },
13
11
  "include": [
14
- "src"
12
+ "proto",
15
13
  ],
16
14
  "exclude": [
17
15
  "node_modules"
18
- ],
19
- "ts-node": {
20
- "compilerOptions": {
21
- "module": "CommonJS",
22
- },
23
- }
16
+ ]
24
17
  }
File without changes
File without changes
package/lib/index.d.ts DELETED
@@ -1,5 +0,0 @@
1
- import { V2Client } from './proto/clarifai/api/serviceServiceClientPb';
2
- export declare class ClarifaiStub {
3
- static grpc(hostname?: string): V2Client;
4
- }
5
- export { V2Client };
package/lib/index.js DELETED
@@ -1,7 +0,0 @@
1
- import { V2Client } from './proto/clarifai/api/serviceServiceClientPb';
2
- export class ClarifaiStub {
3
- static grpc(hostname = 'api-grpc-web.clarifai.com') {
4
- return new V2Client(hostname);
5
- }
6
- }
7
- export { V2Client };
@@ -1,12 +0,0 @@
1
- export * from './proto/clarifai/api/resources_pb';
2
- export { Any } from 'google-protobuf/google/protobuf/any_pb';
3
- export { Api } from 'google-protobuf/google/protobuf/api_pb';
4
- export { Duration } from 'google-protobuf/google/protobuf/duration_pb';
5
- export { Empty } from 'google-protobuf/google/protobuf/empty_pb';
6
- export { Struct } from 'google-protobuf/google/protobuf/struct_pb';
7
- export { Timestamp } from 'google-protobuf/google/protobuf/timestamp_pb';
8
- export { Type, Field, Enum, EnumValue, Option } from 'google-protobuf/google/protobuf/type_pb';
9
- export { DoubleValue, FloatValue, Int64Value, UInt64Value, Int32Value, UInt32Value, BoolValue, StringValue, BytesValue } from 'google-protobuf/google/protobuf/wrappers_pb';
10
- export type { Error, Metadata } from 'grpc-web';
11
- export { Status, BaseResponse } from './proto/clarifai/api/status/status_pb';
12
- export { StatusCode } from './proto/clarifai/api/status/status_code_pb';
package/lib/resources.js DELETED
@@ -1,11 +0,0 @@
1
- export * from './proto/clarifai/api/resources_pb';
2
- export { Any } from 'google-protobuf/google/protobuf/any_pb';
3
- export { Api } from 'google-protobuf/google/protobuf/api_pb';
4
- export { Duration } from 'google-protobuf/google/protobuf/duration_pb';
5
- export { Empty } from 'google-protobuf/google/protobuf/empty_pb';
6
- export { Struct } from 'google-protobuf/google/protobuf/struct_pb';
7
- export { Timestamp } from 'google-protobuf/google/protobuf/timestamp_pb';
8
- export { Type, Field, Enum, EnumValue, Option } from 'google-protobuf/google/protobuf/type_pb';
9
- export { DoubleValue, FloatValue, Int64Value, UInt64Value, Int32Value, UInt32Value, BoolValue, StringValue, BytesValue } from 'google-protobuf/google/protobuf/wrappers_pb';
10
- export { Status, BaseResponse } from './proto/clarifai/api/status/status_pb';
11
- export { StatusCode } from './proto/clarifai/api/status/status_code_pb';
package/lib/service.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './proto/clarifai/api/service_pb';
package/lib/service.js DELETED
@@ -1 +0,0 @@
1
- export * from './proto/clarifai/api/service_pb';
@@ -1 +0,0 @@
1
- // GENERATED CODE -- NO SERVICES IN PROTO
@@ -1 +0,0 @@
1
- // GENERATED CODE -- NO SERVICES IN PROTO