clarifai-web-grpc 2.0.2 → 4.1.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 (101) hide show
  1. package/.github/workflows/ci.yml +2 -0
  2. package/.mocharc.yml +5 -0
  3. package/CHANGELOG.md +3 -3
  4. package/README.md +2 -2
  5. package/VERSION +1 -1
  6. package/{lib → dist/cjs}/google/api/annotations_pb.d.ts +0 -0
  7. package/{lib → dist/cjs}/google/api/annotations_pb.js +0 -0
  8. package/{lib → dist/cjs}/google/api/http_pb.d.ts +0 -0
  9. package/{lib → dist/cjs}/google/api/http_pb.js +0 -0
  10. package/dist/cjs/index.d.ts +7 -0
  11. package/dist/cjs/index.js +17 -0
  12. package/{lib → dist/cjs}/proto/clarifai/api/resources_pb.d.ts +0 -0
  13. package/{lib → dist/cjs}/proto/clarifai/api/resources_pb.js +3595 -302
  14. package/dist/cjs/proto/clarifai/api/service_grpc_web_pb.d.ts +5 -0
  15. package/dist/cjs/proto/clarifai/api/service_grpc_web_pb.js +6663 -0
  16. package/{lib → dist/cjs}/proto/clarifai/api/service_pb.d.ts +0 -0
  17. package/{lib → dist/cjs}/proto/clarifai/api/service_pb.js +16838 -7904
  18. package/{lib → dist/cjs}/proto/clarifai/api/status/status_code_pb.d.ts +0 -0
  19. package/{lib → dist/cjs}/proto/clarifai/api/status/status_code_pb.js +23 -1
  20. package/{lib → dist/cjs}/proto/clarifai/api/status/status_pb.d.ts +0 -0
  21. package/{lib → dist/cjs}/proto/clarifai/api/status/status_pb.js +18 -1
  22. package/{lib → dist/cjs}/proto/clarifai/api/utils/extensions_pb.d.ts +0 -0
  23. package/{lib → dist/cjs}/proto/clarifai/api/utils/extensions_pb.js +18 -1
  24. package/{lib/proto/clarifai/api/utils/test_proto_pb.d.ts → dist/cjs/proto/clarifai/api/utils/matrix_pb.d.ts} +0 -0
  25. package/dist/cjs/proto/clarifai/api/utils/matrix_pb.js +206 -0
  26. package/{lib/proto/clarifai/auth/scope/scope_pb.d.ts → dist/cjs/proto/clarifai/api/utils/test_proto_pb.d.ts} +0 -0
  27. package/{lib → dist/cjs}/proto/clarifai/api/utils/test_proto_pb.js +18 -1
  28. package/{lib/proto/clarifai/auth/types/types_pb.d.ts → dist/cjs/proto/clarifai/auth/scope/scope_pb.d.ts} +0 -0
  29. package/{lib → dist/cjs}/proto/clarifai/auth/scope/scope_pb.js +37 -5
  30. package/{lib/proto/clarifai/auth/util/extension_pb.d.ts → dist/cjs/proto/clarifai/auth/types/types_pb.d.ts} +0 -0
  31. package/{lib → dist/cjs}/proto/clarifai/auth/types/types_pb.js +18 -1
  32. package/dist/cjs/proto/clarifai/auth/util/extension_pb.d.ts +1 -0
  33. package/{lib → dist/cjs}/proto/clarifai/auth/util/extension_pb.js +18 -1
  34. package/dist/cjs/resources.d.ts +1 -0
  35. package/dist/cjs/resources.js +13 -0
  36. package/dist/cjs/service.d.ts +1 -0
  37. package/dist/cjs/service.js +13 -0
  38. package/dist/esm/google/api/annotations_pb.d.ts +1 -0
  39. package/dist/esm/google/api/annotations_pb.js +32 -0
  40. package/dist/esm/google/api/http_pb.d.ts +1 -0
  41. package/dist/esm/google/api/http_pb.js +813 -0
  42. package/dist/esm/index.d.ts +7 -0
  43. package/dist/esm/index.js +9 -0
  44. package/dist/esm/proto/clarifai/api/resources_pb.d.ts +1 -0
  45. package/dist/esm/proto/clarifai/api/resources_pb.js +36250 -0
  46. package/dist/esm/proto/clarifai/api/service_grpc_web_pb.d.ts +5 -0
  47. package/dist/esm/proto/clarifai/api/service_grpc_web_pb.js +6663 -0
  48. package/dist/esm/proto/clarifai/api/service_pb.d.ts +1 -0
  49. package/dist/esm/proto/clarifai/api/service_pb.js +47725 -0
  50. package/dist/esm/proto/clarifai/api/status/status_code_pb.d.ts +1 -0
  51. package/dist/esm/proto/clarifai/api/status/status_code_pb.js +334 -0
  52. package/dist/esm/proto/clarifai/api/status/status_pb.d.ts +1 -0
  53. package/dist/esm/proto/clarifai/api/status/status_pb.js +490 -0
  54. package/dist/esm/proto/clarifai/api/utils/extensions_pb.d.ts +1 -0
  55. package/dist/esm/proto/clarifai/api/utils/extensions_pb.js +69 -0
  56. package/dist/esm/proto/clarifai/api/utils/matrix_pb.d.ts +1 -0
  57. package/dist/esm/proto/clarifai/api/utils/matrix_pb.js +206 -0
  58. package/dist/esm/proto/clarifai/api/utils/test_proto_pb.d.ts +1 -0
  59. package/dist/esm/proto/clarifai/api/utils/test_proto_pb.js +538 -0
  60. package/dist/esm/proto/clarifai/auth/scope/scope_pb.d.ts +1 -0
  61. package/dist/esm/proto/clarifai/auth/scope/scope_pb.js +326 -0
  62. package/dist/esm/proto/clarifai/auth/types/types_pb.d.ts +1 -0
  63. package/dist/esm/proto/clarifai/auth/types/types_pb.js +43 -0
  64. package/dist/esm/proto/clarifai/auth/util/extension_pb.d.ts +1 -0
  65. package/dist/esm/proto/clarifai/auth/util/extension_pb.js +97 -0
  66. package/dist/esm/resources.d.ts +1 -0
  67. package/dist/esm/resources.js +1 -0
  68. package/dist/esm/service.d.ts +1 -0
  69. package/dist/esm/service.js +1 -0
  70. package/index.ts +11 -0
  71. package/package.json +12 -18
  72. package/proto/clarifai/api/resources_pb.d.ts +1522 -1014
  73. package/proto/clarifai/api/resources_pb.js +7122 -2949
  74. package/proto/clarifai/api/service_grpc_web_pb.d.ts +1904 -0
  75. package/proto/clarifai/api/service_grpc_web_pb.js +9672 -0
  76. package/proto/clarifai/api/service_pb.d.ts +2235 -962
  77. package/proto/clarifai/api/service_pb.js +20033 -9036
  78. package/proto/clarifai/api/status/status_code_pb.d.ts +8 -1
  79. package/proto/clarifai/api/status/status_code_pb.js +15 -1
  80. package/proto/clarifai/api/status/status_pb.d.ts +14 -13
  81. package/proto/clarifai/api/status/status_pb.js +10 -1
  82. package/proto/clarifai/api/utils/extensions_pb.d.ts +2 -1
  83. package/proto/clarifai/api/utils/extensions_pb.js +10 -1
  84. package/proto/clarifai/api/utils/matrix_pb.d.ts +28 -0
  85. package/proto/clarifai/api/utils/matrix_pb.js +234 -0
  86. package/proto/clarifai/api/utils/test_proto_pb.d.ts +12 -11
  87. package/proto/clarifai/api/utils/test_proto_pb.js +10 -1
  88. package/proto/clarifai/auth/scope/scope_pb.d.ts +22 -8
  89. package/proto/clarifai/auth/scope/scope_pb.js +29 -5
  90. package/proto/clarifai/auth/types/types_pb.d.ts +3 -1
  91. package/proto/clarifai/auth/types/types_pb.js +10 -1
  92. package/proto/clarifai/auth/util/extension_pb.d.ts +2 -1
  93. package/proto/clarifai/auth/util/extension_pb.js +10 -1
  94. package/resources.ts +1 -0
  95. package/service.ts +1 -0
  96. package/tsconfig.cjs.json +7 -0
  97. package/tsconfig.json +11 -3
  98. package/.eslintrc.yml +0 -12
  99. package/lib/proto/clarifai/api/serviceServiceClientPb.d.ts +0 -275
  100. package/lib/proto/clarifai/api/serviceServiceClientPb.js +0 -904
  101. package/proto/clarifai/api/serviceServiceClientPb.ts +0 -3002
@@ -0,0 +1,326 @@
1
+ "use strict";
2
+ // source: proto/clarifai/auth/scope/scope.proto
3
+ /**
4
+ * @fileoverview
5
+ * @enhanceable
6
+ * @suppress {missingRequire} reports error on implicit type usages.
7
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
8
+ * field starts with 'MSG_' and isn't a translatable message.
9
+ * @public
10
+ */
11
+ // GENERATED CODE -- DO NOT EDIT!
12
+ /* eslint-disable */
13
+ // @ts-nocheck
14
+ var jspb = require('google-protobuf');
15
+ var goog = jspb;
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));
31
+ var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js');
32
+ goog.object.extend(proto, google_protobuf_descriptor_pb);
33
+ goog.exportSymbol('proto.clarifai.auth.scope.S', null, global);
34
+ goog.exportSymbol('proto.clarifai.auth.scope.ScopeList', null, global);
35
+ goog.exportSymbol('proto.clarifai.auth.scope.clarfaiExposed', null, global);
36
+ goog.exportSymbol('proto.clarifai.auth.scope.clarifaiDependingScopesList', null, global);
37
+ /**
38
+ * Generated by JsPbCodeGenerator.
39
+ * @param {Array=} opt_data Optional initial data array, typically from a
40
+ * server response, or constructed directly in Javascript. The array is used
41
+ * in place and becomes part of the constructed object. It is not cloned.
42
+ * If no data is provided, the constructed object will be empty, but still
43
+ * valid.
44
+ * @extends {jspb.Message}
45
+ * @constructor
46
+ */
47
+ proto.clarifai.auth.scope.ScopeList = function (opt_data) {
48
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.clarifai.auth.scope.ScopeList.repeatedFields_, null);
49
+ };
50
+ goog.inherits(proto.clarifai.auth.scope.ScopeList, jspb.Message);
51
+ if (goog.DEBUG && !COMPILED) {
52
+ /**
53
+ * @public
54
+ * @override
55
+ */
56
+ proto.clarifai.auth.scope.ScopeList.displayName = 'proto.clarifai.auth.scope.ScopeList';
57
+ }
58
+ /**
59
+ * List of repeated fields within this message type.
60
+ * @private {!Array<number>}
61
+ * @const
62
+ */
63
+ proto.clarifai.auth.scope.ScopeList.repeatedFields_ = [1, 2];
64
+ if (jspb.Message.GENERATE_TO_OBJECT) {
65
+ /**
66
+ * Creates an object representation of this proto.
67
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
68
+ * Optional fields that are not set will be set to undefined.
69
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
70
+ * For the list of reserved names please see:
71
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
72
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
73
+ * JSPB instance for transitional soy proto support:
74
+ * http://goto/soy-param-migration
75
+ * @return {!Object}
76
+ */
77
+ proto.clarifai.auth.scope.ScopeList.prototype.toObject = function (opt_includeInstance) {
78
+ return proto.clarifai.auth.scope.ScopeList.toObject(opt_includeInstance, this);
79
+ };
80
+ /**
81
+ * Static version of the {@see toObject} method.
82
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
83
+ * the JSPB instance for transitional soy proto support:
84
+ * http://goto/soy-param-migration
85
+ * @param {!proto.clarifai.auth.scope.ScopeList} msg The msg instance to transform.
86
+ * @return {!Object}
87
+ * @suppress {unusedLocalVariables} f is only used for nested messages
88
+ */
89
+ proto.clarifai.auth.scope.ScopeList.toObject = function (includeInstance, msg) {
90
+ var f, obj = {
91
+ scopesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f,
92
+ endpointsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f
93
+ };
94
+ if (includeInstance) {
95
+ obj.$jspbMessageInstance = msg;
96
+ }
97
+ return obj;
98
+ };
99
+ }
100
+ /**
101
+ * Deserializes binary data (in protobuf wire format).
102
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
103
+ * @return {!proto.clarifai.auth.scope.ScopeList}
104
+ */
105
+ proto.clarifai.auth.scope.ScopeList.deserializeBinary = function (bytes) {
106
+ var reader = new jspb.BinaryReader(bytes);
107
+ var msg = new proto.clarifai.auth.scope.ScopeList;
108
+ return proto.clarifai.auth.scope.ScopeList.deserializeBinaryFromReader(msg, reader);
109
+ };
110
+ /**
111
+ * Deserializes binary data (in protobuf wire format) from the
112
+ * given reader into the given message object.
113
+ * @param {!proto.clarifai.auth.scope.ScopeList} msg The message object to deserialize into.
114
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
115
+ * @return {!proto.clarifai.auth.scope.ScopeList}
116
+ */
117
+ proto.clarifai.auth.scope.ScopeList.deserializeBinaryFromReader = function (msg, reader) {
118
+ while (reader.nextField()) {
119
+ if (reader.isEndGroup()) {
120
+ break;
121
+ }
122
+ var field = reader.getFieldNumber();
123
+ switch (field) {
124
+ case 1:
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
+ }
129
+ break;
130
+ case 2:
131
+ var value = /** @type {string} */ (reader.readString());
132
+ msg.addEndpoints(value);
133
+ break;
134
+ default:
135
+ reader.skipField();
136
+ break;
137
+ }
138
+ }
139
+ return msg;
140
+ };
141
+ /**
142
+ * Serializes the message to binary data (in protobuf wire format).
143
+ * @return {!Uint8Array}
144
+ */
145
+ proto.clarifai.auth.scope.ScopeList.prototype.serializeBinary = function () {
146
+ var writer = new jspb.BinaryWriter();
147
+ proto.clarifai.auth.scope.ScopeList.serializeBinaryToWriter(this, writer);
148
+ return writer.getResultBuffer();
149
+ };
150
+ /**
151
+ * Serializes the given message to binary data (in protobuf wire
152
+ * format), writing to the given BinaryWriter.
153
+ * @param {!proto.clarifai.auth.scope.ScopeList} message
154
+ * @param {!jspb.BinaryWriter} writer
155
+ * @suppress {unusedLocalVariables} f is only used for nested messages
156
+ */
157
+ proto.clarifai.auth.scope.ScopeList.serializeBinaryToWriter = function (message, writer) {
158
+ var f = undefined;
159
+ f = message.getScopesList();
160
+ if (f.length > 0) {
161
+ writer.writePackedEnum(1, f);
162
+ }
163
+ f = message.getEndpointsList();
164
+ if (f.length > 0) {
165
+ writer.writeRepeatedString(2, f);
166
+ }
167
+ };
168
+ /**
169
+ * repeated S scopes = 1;
170
+ * @return {!Array<!proto.clarifai.auth.scope.S>}
171
+ */
172
+ proto.clarifai.auth.scope.ScopeList.prototype.getScopesList = function () {
173
+ return /** @type {!Array<!proto.clarifai.auth.scope.S>} */ (jspb.Message.getRepeatedField(this, 1));
174
+ };
175
+ /**
176
+ * @param {!Array<!proto.clarifai.auth.scope.S>} value
177
+ * @return {!proto.clarifai.auth.scope.ScopeList} returns this
178
+ */
179
+ proto.clarifai.auth.scope.ScopeList.prototype.setScopesList = function (value) {
180
+ return jspb.Message.setField(this, 1, value || []);
181
+ };
182
+ /**
183
+ * @param {!proto.clarifai.auth.scope.S} value
184
+ * @param {number=} opt_index
185
+ * @return {!proto.clarifai.auth.scope.ScopeList} returns this
186
+ */
187
+ proto.clarifai.auth.scope.ScopeList.prototype.addScopes = function (value, opt_index) {
188
+ return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
189
+ };
190
+ /**
191
+ * Clears the list making it empty but non-null.
192
+ * @return {!proto.clarifai.auth.scope.ScopeList} returns this
193
+ */
194
+ proto.clarifai.auth.scope.ScopeList.prototype.clearScopesList = function () {
195
+ return this.setScopesList([]);
196
+ };
197
+ /**
198
+ * repeated string endpoints = 2;
199
+ * @return {!Array<string>}
200
+ */
201
+ proto.clarifai.auth.scope.ScopeList.prototype.getEndpointsList = function () {
202
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2));
203
+ };
204
+ /**
205
+ * @param {!Array<string>} value
206
+ * @return {!proto.clarifai.auth.scope.ScopeList} returns this
207
+ */
208
+ proto.clarifai.auth.scope.ScopeList.prototype.setEndpointsList = function (value) {
209
+ return jspb.Message.setField(this, 2, value || []);
210
+ };
211
+ /**
212
+ * @param {string} value
213
+ * @param {number=} opt_index
214
+ * @return {!proto.clarifai.auth.scope.ScopeList} returns this
215
+ */
216
+ proto.clarifai.auth.scope.ScopeList.prototype.addEndpoints = function (value, opt_index) {
217
+ return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
218
+ };
219
+ /**
220
+ * Clears the list making it empty but non-null.
221
+ * @return {!proto.clarifai.auth.scope.ScopeList} returns this
222
+ */
223
+ proto.clarifai.auth.scope.ScopeList.prototype.clearEndpointsList = function () {
224
+ return this.setEndpointsList([]);
225
+ };
226
+ /**
227
+ * @enum {number}
228
+ */
229
+ proto.clarifai.auth.scope.S = {
230
+ UNDEF: 0,
231
+ ALL: 1,
232
+ PREDICT: 2,
233
+ INPUTS_ADD: 4,
234
+ INPUTS_GET: 5,
235
+ INPUTS_PATCH: 7,
236
+ INPUTS_DELETE: 8,
237
+ OUTPUTS_PATCH: 9,
238
+ CONCEPTS_ADD: 10,
239
+ CONCEPTS_GET: 11,
240
+ CONCEPTS_PATCH: 12,
241
+ CONCEPTS_DELETE: 13,
242
+ MODELS_ADD: 14,
243
+ MODELS_GET: 15,
244
+ MODELS_PATCH: 16,
245
+ MODELS_DELETE: 17,
246
+ MODELS_TRAIN: 26,
247
+ MODELS_SYNC: 27,
248
+ WORKFLOWS_ADD: 18,
249
+ WORKFLOWS_GET: 19,
250
+ WORKFLOWS_PATCH: 20,
251
+ WORKFLOWS_DELETE: 21,
252
+ WORKFLOWMETRICS_GET: 96,
253
+ WORKFLOWMETRICS_ADD: 97,
254
+ WORKFLOWMETRICS_DELETE: 98,
255
+ TSNEVISUALIZATIONS_ADD: 24,
256
+ TSNEVISUALIZATIONS_GET: 25,
257
+ ANNOTATIONS_ADD: 37,
258
+ ANNOTATIONS_GET: 38,
259
+ ANNOTATIONS_PATCH: 39,
260
+ ANNOTATIONS_DELETE: 40,
261
+ COLLECTORS_ADD: 41,
262
+ COLLECTORS_GET: 42,
263
+ COLLECTORS_DELETE: 43,
264
+ APPS_ADD: 44,
265
+ APPS_GET: 45,
266
+ APPS_DELETE: 46,
267
+ KEYS_ADD: 47,
268
+ KEYS_GET: 48,
269
+ KEYS_DELETE: 49,
270
+ COLLABORATORS_ADD: 51,
271
+ COLLABORATORS_GET: 50,
272
+ COLLABORATORS_DELETE: 52,
273
+ METRICS_ADD: 54,
274
+ METRICS_GET: 53,
275
+ METRICS_DELETE: 63,
276
+ TASKS_ADD: 55,
277
+ TASKS_GET: 56,
278
+ TASKS_DELETE: 70,
279
+ PASSWORDPOLICIES_ADD: 57,
280
+ PASSWORDPOLICIES_GET: 58,
281
+ PASSWORDPOLICIES_DELETE: 59,
282
+ LABELORDERS_GET: 67,
283
+ LABELORDERS_ADD: 68,
284
+ LABELORDERS_DELETE: 69,
285
+ USERFEATURECONFIGS_GET: 71,
286
+ FINDDUPLICATEANNOTATIONSJOBS_ADD: 102,
287
+ FINDDUPLICATEANNOTATIONSJOBS_GET: 103,
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
+ };
304
+ /**
305
+ * A tuple of {field number, class constructor} for the extension
306
+ * field named `clarfaiExposed`.
307
+ * @type {!jspb.ExtensionFieldInfo<boolean>}
308
+ */
309
+ proto.clarifai.auth.scope.clarfaiExposed = new jspb.ExtensionFieldInfo(80318, { clarfaiExposed: 0 }, null,
310
+ /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (null), 0);
311
+ google_protobuf_descriptor_pb.EnumValueOptions.extensionsBinary[80318] = new jspb.ExtensionFieldBinaryInfo(proto.clarifai.auth.scope.clarfaiExposed, jspb.BinaryReader.prototype.readBool, jspb.BinaryWriter.prototype.writeBool, undefined, undefined, false);
312
+ // This registers the extension field with the extended class, so that
313
+ // toObject() will function correctly.
314
+ google_protobuf_descriptor_pb.EnumValueOptions.extensions[80318] = proto.clarifai.auth.scope.clarfaiExposed;
315
+ /**
316
+ * A tuple of {field number, class constructor} for the extension
317
+ * field named `clarifaiDependingScopesList`.
318
+ * @type {!jspb.ExtensionFieldInfo<!Array<!proto.clarifai.auth.scope.S>>}
319
+ */
320
+ proto.clarifai.auth.scope.clarifaiDependingScopesList = new jspb.ExtensionFieldInfo(80319, { clarifaiDependingScopesList: 0 }, null,
321
+ /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (null), 1);
322
+ google_protobuf_descriptor_pb.EnumValueOptions.extensionsBinary[80319] = new jspb.ExtensionFieldBinaryInfo(proto.clarifai.auth.scope.clarifaiDependingScopesList, jspb.BinaryReader.prototype.readPackedEnum, jspb.BinaryWriter.prototype.writePackedEnum, undefined, undefined, true);
323
+ // This registers the extension field with the extended class, so that
324
+ // toObject() will function correctly.
325
+ google_protobuf_descriptor_pb.EnumValueOptions.extensions[80319] = proto.clarifai.auth.scope.clarifaiDependingScopesList;
326
+ goog.object.extend(exports, proto.clarifai.auth.scope);
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ // source: proto/clarifai/auth/types/types.proto
3
+ /**
4
+ * @fileoverview
5
+ * @enhanceable
6
+ * @suppress {missingRequire} reports error on implicit type usages.
7
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
8
+ * field starts with 'MSG_' and isn't a translatable message.
9
+ * @public
10
+ */
11
+ // GENERATED CODE -- DO NOT EDIT!
12
+ /* eslint-disable */
13
+ // @ts-nocheck
14
+ var jspb = require('google-protobuf');
15
+ var goog = jspb;
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));
31
+ goog.exportSymbol('proto.clarifai.auth.types.AuthType', null, global);
32
+ /**
33
+ * @enum {number}
34
+ */
35
+ proto.clarifai.auth.types.AuthType = {
36
+ UNDEF: 0,
37
+ NOAUTH: 1,
38
+ KEYAUTH: 2,
39
+ SESSIONTOKENAUTH: 3,
40
+ ADMINAUTH: 4,
41
+ PATAUTH: 5
42
+ };
43
+ goog.object.extend(exports, proto.clarifai.auth.types);
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+ // source: proto/clarifai/auth/util/extension.proto
3
+ /**
4
+ * @fileoverview
5
+ * @enhanceable
6
+ * @suppress {missingRequire} reports error on implicit type usages.
7
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
8
+ * field starts with 'MSG_' and isn't a translatable message.
9
+ * @public
10
+ */
11
+ // GENERATED CODE -- DO NOT EDIT!
12
+ /* eslint-disable */
13
+ // @ts-nocheck
14
+ var jspb = require('google-protobuf');
15
+ var goog = jspb;
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));
31
+ var proto_clarifai_auth_scope_scope_pb = require('../../../../proto/clarifai/auth/scope/scope_pb.js');
32
+ goog.object.extend(proto, proto_clarifai_auth_scope_scope_pb);
33
+ var proto_clarifai_auth_types_types_pb = require('../../../../proto/clarifai/auth/types/types_pb.js');
34
+ goog.object.extend(proto, proto_clarifai_auth_types_types_pb);
35
+ var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js');
36
+ goog.object.extend(proto, google_protobuf_descriptor_pb);
37
+ goog.exportSymbol('proto.clarifai.auth.util.clAuthType', null, global);
38
+ goog.exportSymbol('proto.clarifai.auth.util.clDependingScopesList', null, global);
39
+ goog.exportSymbol('proto.clarifai.auth.util.clPrivateField', null, global);
40
+ goog.exportSymbol('proto.clarifai.auth.util.clPrivateMessage', null, global);
41
+ goog.exportSymbol('proto.clarifai.auth.util.clPrivateRpc', null, global);
42
+ /**
43
+ * A tuple of {field number, class constructor} for the extension
44
+ * field named `clPrivateField`.
45
+ * @type {!jspb.ExtensionFieldInfo<boolean>}
46
+ */
47
+ proto.clarifai.auth.util.clPrivateField = new jspb.ExtensionFieldInfo(80320, { clPrivateField: 0 }, null,
48
+ /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (null), 0);
49
+ 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);
50
+ // This registers the extension field with the extended class, so that
51
+ // toObject() will function correctly.
52
+ google_protobuf_descriptor_pb.FieldOptions.extensions[80320] = proto.clarifai.auth.util.clPrivateField;
53
+ /**
54
+ * A tuple of {field number, class constructor} for the extension
55
+ * field named `clPrivateRpc`.
56
+ * @type {!jspb.ExtensionFieldInfo<boolean>}
57
+ */
58
+ proto.clarifai.auth.util.clPrivateRpc = new jspb.ExtensionFieldInfo(80321, { clPrivateRpc: 0 }, null,
59
+ /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (null), 0);
60
+ 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);
61
+ // This registers the extension field with the extended class, so that
62
+ // toObject() will function correctly.
63
+ google_protobuf_descriptor_pb.MethodOptions.extensions[80321] = proto.clarifai.auth.util.clPrivateRpc;
64
+ /**
65
+ * A tuple of {field number, class constructor} for the extension
66
+ * field named `clDependingScopesList`.
67
+ * @type {!jspb.ExtensionFieldInfo<!Array<!proto.clarifai.auth.scope.S>>}
68
+ */
69
+ proto.clarifai.auth.util.clDependingScopesList = new jspb.ExtensionFieldInfo(80322, { clDependingScopesList: 0 }, null,
70
+ /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (null), 1);
71
+ 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);
72
+ // This registers the extension field with the extended class, so that
73
+ // toObject() will function correctly.
74
+ google_protobuf_descriptor_pb.MethodOptions.extensions[80322] = proto.clarifai.auth.util.clDependingScopesList;
75
+ /**
76
+ * A tuple of {field number, class constructor} for the extension
77
+ * field named `clAuthType`.
78
+ * @type {!jspb.ExtensionFieldInfo<!proto.clarifai.auth.types.AuthType>}
79
+ */
80
+ proto.clarifai.auth.util.clAuthType = new jspb.ExtensionFieldInfo(80323, { clAuthType: 0 }, null,
81
+ /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (null), 0);
82
+ 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);
83
+ // This registers the extension field with the extended class, so that
84
+ // toObject() will function correctly.
85
+ google_protobuf_descriptor_pb.MethodOptions.extensions[80323] = proto.clarifai.auth.util.clAuthType;
86
+ /**
87
+ * A tuple of {field number, class constructor} for the extension
88
+ * field named `clPrivateMessage`.
89
+ * @type {!jspb.ExtensionFieldInfo<boolean>}
90
+ */
91
+ proto.clarifai.auth.util.clPrivateMessage = new jspb.ExtensionFieldInfo(80324, { clPrivateMessage: 0 }, null,
92
+ /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (null), 0);
93
+ 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);
94
+ // This registers the extension field with the extended class, so that
95
+ // toObject() will function correctly.
96
+ google_protobuf_descriptor_pb.MessageOptions.extensions[80324] = proto.clarifai.auth.util.clPrivateMessage;
97
+ goog.object.extend(exports, proto.clarifai.auth.util);
@@ -0,0 +1 @@
1
+ export * from './proto/clarifai/api/resources_pb';
@@ -0,0 +1 @@
1
+ export * from './proto/clarifai/api/resources_pb';
@@ -0,0 +1 @@
1
+ export * from './proto/clarifai/api/service_pb';
@@ -0,0 +1 @@
1
+ export * from './proto/clarifai/api/service_pb';
package/index.ts ADDED
@@ -0,0 +1,11 @@
1
+ import { V2Client, V2PromiseClient } from './proto/clarifai/api/service_grpc_web_pb'
2
+
3
+ export class ClarifaiStub {
4
+ static grpc (hostname = 'api.clarifai.com') {
5
+ return new V2Client(hostname)
6
+ }
7
+ }
8
+
9
+ export { V2Client, V2PromiseClient }
10
+ export { RpcError, Metadata, ClientReadableStream } from 'grpc-web'
11
+ export { BaseResponse } from './proto/clarifai/api/status/status_pb'
package/package.json CHANGED
@@ -1,41 +1,35 @@
1
1
  {
2
2
  "name": "clarifai-web-grpc",
3
- "version": "2.0.2",
3
+ "version": "4.1.0",
4
4
  "description": "The official Clarifai gRPC-web client",
5
- "type": "module",
5
+ "main": "dist/cjs/index.js",
6
+ "module": "dist/esm/index.js",
7
+ "types": "dist/esm/index.d.ts",
6
8
  "repository": "https://github.com/Clarifai/clarifai-web-grpc",
7
9
  "author": "Clarifai Inc.",
8
10
  "license": "Apache-2.0",
9
11
  "keywords": [],
10
12
  "scripts": {
11
- "build": "tsc -b",
12
- "clean": "rm -rf lib clarifai-web-grpc-*.tgz",
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",
13
18
  "prepack": "yarn clean && yarn build",
14
19
  "release": "semantic-release",
15
20
  "prepare": "husky install"
16
21
  },
17
22
  "dependencies": {
18
- "google-protobuf": "^3.19.4",
19
- "grpc-web": "~1.0.5"
23
+ "google-protobuf": "3.19.4",
24
+ "grpc-web": "1.3.1"
20
25
  },
21
26
  "devDependencies": {
22
27
  "@commitlint/cli": "^16.0.1",
23
28
  "@commitlint/config-conventional": "^16.0.0",
24
29
  "@semantic-release/changelog": "^6.0.1",
25
- "@types/chai": "^4.3.0",
26
- "@types/google-protobuf": "^3.15.5",
27
- "@types/mocha": "^9.0.0",
30
+ "@types/google-protobuf": "~3.7.0",
28
31
  "@types/node": "~10.17.0",
29
- "@typescript-eslint/eslint-plugin": "^5.10.1",
30
- "@typescript-eslint/parser": "^5.10.1",
31
- "chai": "^4.3.4",
32
- "eslint": "^7.32.0",
33
- "eslint-config-standard": "^16.0.3",
34
- "eslint-plugin-import": "^2.25.4",
35
- "eslint-plugin-node": "^11.1.0",
36
- "eslint-plugin-promise": "^5.2.0",
37
32
  "husky": "^7.0.4",
38
- "mocha": "^9.1.3",
39
33
  "semantic-release": "^18.0.1",
40
34
  "standard": "^16.0.4",
41
35
  "ts-node": "^10.4.0",