clarifai-web-grpc 3.0.0 → 4.2.0

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 (67) hide show
  1. package/.github/workflows/ci.yml +0 -2
  2. package/CHANGELOG.md +3 -10
  3. package/README.md +2 -2
  4. package/VERSION +1 -1
  5. package/dist/cjs/index.d.ts +3 -3
  6. package/dist/cjs/index.js +6 -4
  7. package/dist/cjs/proto/clarifai/api/resources_pb.js +8300 -1715
  8. package/dist/cjs/proto/clarifai/api/service_grpc_web_pb.d.ts +5 -0
  9. package/dist/cjs/proto/clarifai/api/service_grpc_web_pb.js +6999 -0
  10. package/dist/cjs/proto/clarifai/api/service_pb.js +20160 -8780
  11. package/dist/cjs/proto/clarifai/api/status/status_code_pb.js +37 -1
  12. package/dist/cjs/proto/clarifai/api/status/status_pb.js +255 -2
  13. package/dist/cjs/proto/clarifai/api/utils/extensions_pb.js +18 -1
  14. package/dist/cjs/proto/clarifai/api/utils/matrix_pb.d.ts +1 -0
  15. package/dist/cjs/proto/clarifai/api/utils/matrix_pb.js +206 -0
  16. package/dist/cjs/proto/clarifai/api/utils/test_proto_pb.js +18 -1
  17. package/dist/cjs/proto/clarifai/auth/scope/scope_pb.js +38 -5
  18. package/dist/cjs/proto/clarifai/auth/types/types_pb.js +18 -1
  19. package/dist/cjs/proto/clarifai/auth/util/extension_pb.js +18 -1
  20. package/dist/esm/index.d.ts +3 -3
  21. package/dist/esm/index.js +3 -3
  22. package/dist/esm/proto/clarifai/api/resources_pb.js +8300 -1715
  23. package/dist/esm/proto/clarifai/api/service_grpc_web_pb.d.ts +5 -0
  24. package/dist/esm/proto/clarifai/api/service_grpc_web_pb.js +6999 -0
  25. package/dist/esm/proto/clarifai/api/service_pb.js +20160 -8780
  26. package/dist/esm/proto/clarifai/api/status/status_code_pb.js +37 -1
  27. package/dist/esm/proto/clarifai/api/status/status_pb.js +255 -2
  28. package/dist/esm/proto/clarifai/api/utils/extensions_pb.js +18 -1
  29. package/dist/esm/proto/clarifai/api/utils/matrix_pb.d.ts +1 -0
  30. package/dist/esm/proto/clarifai/api/utils/matrix_pb.js +206 -0
  31. package/dist/esm/proto/clarifai/api/utils/test_proto_pb.js +18 -1
  32. package/dist/esm/proto/clarifai/auth/scope/scope_pb.js +38 -5
  33. package/dist/esm/proto/clarifai/auth/types/types_pb.js +18 -1
  34. package/dist/esm/proto/clarifai/auth/util/extension_pb.js +18 -1
  35. package/index.ts +3 -3
  36. package/package.json +3 -8
  37. package/package.json-E +52 -0
  38. package/proto/clarifai/api/resources_pb.d.ts +2022 -1020
  39. package/proto/clarifai/api/resources_pb.js +21288 -13035
  40. package/proto/clarifai/api/service_grpc_web_pb.d.ts +2000 -0
  41. package/proto/clarifai/api/service_grpc_web_pb.js +10160 -0
  42. package/proto/clarifai/api/service_pb.d.ts +2788 -1161
  43. package/proto/clarifai/api/service_pb.js +23741 -9706
  44. package/proto/clarifai/api/status/status_code_pb.d.ts +22 -1
  45. package/proto/clarifai/api/status/status_code_pb.js +29 -1
  46. package/proto/clarifai/api/status/status_pb.d.ts +50 -13
  47. package/proto/clarifai/api/status/status_pb.js +304 -2
  48. package/proto/clarifai/api/utils/extensions_pb.d.ts +2 -1
  49. package/proto/clarifai/api/utils/extensions_pb.js +10 -1
  50. package/proto/clarifai/api/utils/matrix_pb.d.ts +28 -0
  51. package/proto/clarifai/api/utils/matrix_pb.js +234 -0
  52. package/proto/clarifai/api/utils/test_proto_pb.d.ts +12 -11
  53. package/proto/clarifai/api/utils/test_proto_pb.js +10 -1
  54. package/proto/clarifai/auth/scope/scope_pb.d.ts +23 -8
  55. package/proto/clarifai/auth/scope/scope_pb.js +30 -5
  56. package/proto/clarifai/auth/types/types_pb.d.ts +3 -1
  57. package/proto/clarifai/auth/types/types_pb.js +10 -1
  58. package/proto/clarifai/auth/util/extension_pb.d.ts +2 -1
  59. package/proto/clarifai/auth/util/extension_pb.js +10 -1
  60. package/.husky/pre-commit +0 -4
  61. package/dist/cjs/proto/clarifai/api/serviceServiceClientPb.d.ts +0 -275
  62. package/dist/cjs/proto/clarifai/api/serviceServiceClientPb.js +0 -908
  63. package/dist/esm/proto/clarifai/api/serviceServiceClientPb.d.ts +0 -275
  64. package/dist/esm/proto/clarifai/api/serviceServiceClientPb.js +0 -904
  65. package/proto/clarifai/api/serviceServiceClientPb.ts +0 -3002
  66. package/tests/basic.test.ts +0 -41
  67. package/tests/package.test.ts +0 -0
@@ -3,14 +3,31 @@
3
3
  /**
4
4
  * @fileoverview
5
5
  * @enhanceable
6
+ * @suppress {missingRequire} reports error on implicit type usages.
6
7
  * @suppress {messageConventions} JS Compiler reports an error if a variable or
7
8
  * field starts with 'MSG_' and isn't a translatable message.
8
9
  * @public
9
10
  */
10
11
  // GENERATED CODE -- DO NOT EDIT!
12
+ /* eslint-disable */
13
+ // @ts-nocheck
11
14
  var jspb = require('google-protobuf');
12
15
  var goog = jspb;
13
- var global = Function('return this')();
16
+ var global = (function () {
17
+ if (this) {
18
+ return this;
19
+ }
20
+ if (typeof window !== 'undefined') {
21
+ return window;
22
+ }
23
+ if (typeof global !== 'undefined') {
24
+ return global;
25
+ }
26
+ if (typeof self !== 'undefined') {
27
+ return self;
28
+ }
29
+ return Function('return this')();
30
+ }.call(null));
14
31
  var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js');
15
32
  goog.object.extend(proto, google_protobuf_descriptor_pb);
16
33
  goog.exportSymbol('proto.clarifai.auth.scope.S', null, global);
@@ -105,8 +122,10 @@ proto.clarifai.auth.scope.ScopeList.deserializeBinaryFromReader = function (msg,
105
122
  var field = reader.getFieldNumber();
106
123
  switch (field) {
107
124
  case 1:
108
- var value = /** @type {!Array<!proto.clarifai.auth.scope.S>} */ (reader.readPackedEnum());
109
- msg.setScopesList(value);
125
+ var values = /** @type {!Array<!proto.clarifai.auth.scope.S>} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]);
126
+ for (var i = 0; i < values.length; i++) {
127
+ msg.addScopes(values[i]);
128
+ }
110
129
  break;
111
130
  case 2:
112
131
  var value = /** @type {string} */ (reader.readString());
@@ -211,7 +230,6 @@ proto.clarifai.auth.scope.S = {
211
230
  UNDEF: 0,
212
231
  ALL: 1,
213
232
  PREDICT: 2,
214
- SEARCH: 3,
215
233
  INPUTS_ADD: 4,
216
234
  INPUTS_GET: 5,
217
235
  INPUTS_PATCH: 7,
@@ -267,7 +285,22 @@ proto.clarifai.auth.scope.S = {
267
285
  USERFEATURECONFIGS_GET: 71,
268
286
  FINDDUPLICATEANNOTATIONSJOBS_ADD: 102,
269
287
  FINDDUPLICATEANNOTATIONSJOBS_GET: 103,
270
- FINDDUPLICATEANNOTATIONSJOBS_DELETE: 104
288
+ FINDDUPLICATEANNOTATIONSJOBS_DELETE: 104,
289
+ DATASETS_GET: 105,
290
+ DATASETS_ADD: 106,
291
+ DATASETS_DELETE: 107,
292
+ SEARCH: 3,
293
+ SAVEDSEARCH_GET: 114,
294
+ SAVEDSEARCH_ADD: 115,
295
+ SAVEDSEARCH_DELETE: 116,
296
+ MODELVERSIONPUBLICATIONS_ADD: 117,
297
+ MODELVERSIONPUBLICATIONS_DELETE: 118,
298
+ WORKFLOWPUBLICATIONS_ADD: 119,
299
+ WORKFLOWPUBLICATIONS_DELETE: 120,
300
+ BULKOPERATION_ADD: 121,
301
+ BULKOPERATION_GET: 122,
302
+ BULKOPERATION_DELETE: 123,
303
+ HISTORICALUSAGE_GET: 124
271
304
  };
272
305
  /**
273
306
  * A tuple of {field number, class constructor} for the extension
@@ -3,14 +3,31 @@
3
3
  /**
4
4
  * @fileoverview
5
5
  * @enhanceable
6
+ * @suppress {missingRequire} reports error on implicit type usages.
6
7
  * @suppress {messageConventions} JS Compiler reports an error if a variable or
7
8
  * field starts with 'MSG_' and isn't a translatable message.
8
9
  * @public
9
10
  */
10
11
  // GENERATED CODE -- DO NOT EDIT!
12
+ /* eslint-disable */
13
+ // @ts-nocheck
11
14
  var jspb = require('google-protobuf');
12
15
  var goog = jspb;
13
- var global = Function('return this')();
16
+ var global = (function () {
17
+ if (this) {
18
+ return this;
19
+ }
20
+ if (typeof window !== 'undefined') {
21
+ return window;
22
+ }
23
+ if (typeof global !== 'undefined') {
24
+ return global;
25
+ }
26
+ if (typeof self !== 'undefined') {
27
+ return self;
28
+ }
29
+ return Function('return this')();
30
+ }.call(null));
14
31
  goog.exportSymbol('proto.clarifai.auth.types.AuthType', null, global);
15
32
  /**
16
33
  * @enum {number}
@@ -3,14 +3,31 @@
3
3
  /**
4
4
  * @fileoverview
5
5
  * @enhanceable
6
+ * @suppress {missingRequire} reports error on implicit type usages.
6
7
  * @suppress {messageConventions} JS Compiler reports an error if a variable or
7
8
  * field starts with 'MSG_' and isn't a translatable message.
8
9
  * @public
9
10
  */
10
11
  // GENERATED CODE -- DO NOT EDIT!
12
+ /* eslint-disable */
13
+ // @ts-nocheck
11
14
  var jspb = require('google-protobuf');
12
15
  var goog = jspb;
13
- var global = Function('return this')();
16
+ var global = (function () {
17
+ if (this) {
18
+ return this;
19
+ }
20
+ if (typeof window !== 'undefined') {
21
+ return window;
22
+ }
23
+ if (typeof global !== 'undefined') {
24
+ return global;
25
+ }
26
+ if (typeof self !== 'undefined') {
27
+ return self;
28
+ }
29
+ return Function('return this')();
30
+ }.call(null));
14
31
  var proto_clarifai_auth_scope_scope_pb = require('../../../../proto/clarifai/auth/scope/scope_pb.js');
15
32
  goog.object.extend(proto, proto_clarifai_auth_scope_scope_pb);
16
33
  var proto_clarifai_auth_types_types_pb = require('../../../../proto/clarifai/auth/types/types_pb.js');
package/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { V2Client } from './proto/clarifai/api/serviceServiceClientPb'
1
+ import { V2Client, V2PromiseClient } from './proto/clarifai/api/service_grpc_web_pb'
2
2
 
3
3
  export class ClarifaiStub {
4
4
  static grpc (hostname = 'api.clarifai.com') {
@@ -6,6 +6,6 @@ export class ClarifaiStub {
6
6
  }
7
7
  }
8
8
 
9
- export { V2Client }
10
- export { Error, Metadata, ClientReadableStream } from 'grpc-web'
9
+ export { V2Client, V2PromiseClient }
10
+ export { RpcError, Metadata, ClientReadableStream } from 'grpc-web'
11
11
  export { BaseResponse } from './proto/clarifai/api/status/status_pb'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clarifai-web-grpc",
3
- "version": "3.0.0",
3
+ "version": "4.2.0",
4
4
  "description": "The official Clarifai gRPC-web client",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -10,7 +10,6 @@
10
10
  "license": "Apache-2.0",
11
11
  "keywords": [],
12
12
  "scripts": {
13
- "test": "mocha",
14
13
  "lint": "standard index.ts resources.ts service.ts",
15
14
  "clean": "rm -rf dist clarifai-web-grpc-*.tgz",
16
15
  "build:cjs": "tsc -b tsconfig.cjs.json",
@@ -21,20 +20,16 @@
21
20
  "prepare": "husky install"
22
21
  },
23
22
  "dependencies": {
24
- "google-protobuf": "~3.14.0",
25
- "grpc-web": "~1.0.5"
23
+ "google-protobuf": "3.19.4",
24
+ "grpc-web": "1.3.1"
26
25
  },
27
26
  "devDependencies": {
28
27
  "@commitlint/cli": "^16.0.1",
29
28
  "@commitlint/config-conventional": "^16.0.0",
30
29
  "@semantic-release/changelog": "^6.0.1",
31
- "@types/chai": "^4.3.0",
32
30
  "@types/google-protobuf": "~3.7.0",
33
- "@types/mocha": "^9.0.0",
34
31
  "@types/node": "~10.17.0",
35
- "chai": "^4.3.4",
36
32
  "husky": "^7.0.4",
37
- "mocha": "^9.1.3",
38
33
  "semantic-release": "^18.0.1",
39
34
  "standard": "^16.0.4",
40
35
  "ts-node": "^10.4.0",
package/package.json-E ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "clarifai-web-grpc",
3
+ "version": "1.0.0",
4
+ "description": "The official Clarifai gRPC-web client",
5
+ "main": "dist/cjs/index.js",
6
+ "module": "dist/esm/index.js",
7
+ "types": "dist/esm/index.d.ts",
8
+ "repository": "https://github.com/Clarifai/clarifai-web-grpc",
9
+ "author": "Clarifai Inc.",
10
+ "license": "Apache-2.0",
11
+ "keywords": [],
12
+ "scripts": {
13
+ "lint": "standard index.ts resources.ts service.ts",
14
+ "clean": "rm -rf dist clarifai-web-grpc-*.tgz",
15
+ "build:cjs": "tsc -b tsconfig.cjs.json",
16
+ "build:esm": "tsc -b",
17
+ "build": "yarn build:esm && yarn build:cjs",
18
+ "prepack": "yarn clean && yarn build",
19
+ "release": "semantic-release",
20
+ "prepare": "husky install"
21
+ },
22
+ "dependencies": {
23
+ "google-protobuf": "3.19.4",
24
+ "grpc-web": "1.3.1"
25
+ },
26
+ "devDependencies": {
27
+ "@commitlint/cli": "^16.0.1",
28
+ "@commitlint/config-conventional": "^16.0.0",
29
+ "@semantic-release/changelog": "^6.0.1",
30
+ "@types/google-protobuf": "~3.7.0",
31
+ "@types/node": "~10.17.0",
32
+ "husky": "^7.0.4",
33
+ "semantic-release": "^18.0.1",
34
+ "standard": "^16.0.4",
35
+ "ts-node": "^10.4.0",
36
+ "typescript": "^4.5.4"
37
+ },
38
+ "release": {
39
+ "plugins": [
40
+ "@semantic-release/commit-analyzer",
41
+ "@semantic-release/release-notes-generator",
42
+ "@semantic-release/changelog",
43
+ "@semantic-release/npm",
44
+ "@semantic-release/github"
45
+ ]
46
+ },
47
+ "commitlint": {
48
+ "extends": [
49
+ "@commitlint/config-conventional"
50
+ ]
51
+ }
52
+ }