clarifai-web-grpc 1.0.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.
- package/.github/workflows/ci.yml +41 -0
- package/.husky/commit-msg +4 -0
- package/.husky/pre-commit +4 -0
- package/.mocharc.yml +5 -0
- package/CHANGELOG.md +6 -0
- package/LICENCE +13 -0
- package/README.md +43 -0
- package/VERSION +1 -0
- package/dist/google/api/annotations_pb.d.ts +1 -0
- package/dist/google/api/annotations_pb.js +32 -0
- package/dist/google/api/http_pb.d.ts +1 -0
- package/dist/google/api/http_pb.js +813 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +7 -0
- package/dist/proto/clarifai/api/resources_pb.d.ts +1 -0
- package/dist/proto/clarifai/api/resources_pb.js +32957 -0
- package/dist/proto/clarifai/api/serviceServiceClientPb.d.ts +275 -0
- package/dist/proto/clarifai/api/serviceServiceClientPb.js +904 -0
- package/dist/proto/clarifai/api/service_pb.d.ts +1 -0
- package/dist/proto/clarifai/api/service_pb.js +38791 -0
- package/dist/proto/clarifai/api/status/status_code_pb.d.ts +1 -0
- package/dist/proto/clarifai/api/status/status_code_pb.js +312 -0
- package/dist/proto/clarifai/api/status/status_pb.d.ts +1 -0
- package/dist/proto/clarifai/api/status/status_pb.js +473 -0
- package/dist/proto/clarifai/api/utils/extensions_pb.d.ts +1 -0
- package/dist/proto/clarifai/api/utils/extensions_pb.js +52 -0
- package/dist/proto/clarifai/api/utils/test_proto_pb.d.ts +1 -0
- package/dist/proto/clarifai/api/utils/test_proto_pb.js +521 -0
- package/dist/proto/clarifai/auth/scope/scope_pb.d.ts +1 -0
- package/dist/proto/clarifai/auth/scope/scope_pb.js +294 -0
- package/dist/proto/clarifai/auth/types/types_pb.d.ts +1 -0
- package/dist/proto/clarifai/auth/types/types_pb.js +26 -0
- package/dist/proto/clarifai/auth/util/extension_pb.d.ts +1 -0
- package/dist/proto/clarifai/auth/util/extension_pb.js +80 -0
- package/dist/resources.d.ts +1 -0
- package/dist/resources.js +1 -0
- package/dist/service.d.ts +1 -0
- package/dist/service.js +1 -0
- package/google/api/annotations_grpc_pb.js +1 -0
- package/google/api/annotations_pb.js +47 -0
- package/google/api/http_grpc_pb.js +1 -0
- package/google/api/http_pb.js +1005 -0
- package/index.ts +9 -0
- package/package.json +52 -0
- package/proto/clarifai/api/resources_pb.d.ts +5052 -0
- package/proto/clarifai/api/resources_pb.js +41204 -0
- package/proto/clarifai/api/serviceServiceClientPb.ts +3002 -0
- package/proto/clarifai/api/service_pb.d.ts +5582 -0
- package/proto/clarifai/api/service_pb.js +47897 -0
- package/proto/clarifai/api/status/status_code_pb.d.ts +296 -0
- package/proto/clarifai/api/status/status_code_pb.js +314 -0
- package/proto/clarifai/api/status/status_pb.d.ts +73 -0
- package/proto/clarifai/api/status/status_pb.js +580 -0
- package/proto/clarifai/api/utils/extensions_pb.d.ts +4 -0
- package/proto/clarifai/api/utils/extensions_pb.js +95 -0
- package/proto/clarifai/api/utils/test_proto_pb.d.ts +81 -0
- package/proto/clarifai/api/utils/test_proto_pb.js +640 -0
- package/proto/clarifai/auth/scope/scope_pb.d.ts +92 -0
- package/proto/clarifai/auth/scope/scope_pb.js +363 -0
- package/proto/clarifai/auth/types/types_pb.d.ts +10 -0
- package/proto/clarifai/auth/types/types_pb.js +28 -0
- package/proto/clarifai/auth/util/extension_pb.d.ts +6 -0
- package/proto/clarifai/auth/util/extension_pb.js +151 -0
- package/resources.ts +1 -0
- package/service.desc +10 -0
- package/service.ts +1 -0
- package/tests/basic.test.ts +14 -0
- package/tsconfig.json +25 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import * as jspb from "google-protobuf"
|
|
2
|
+
|
|
3
|
+
import * as google_protobuf_descriptor_pb from 'google-protobuf/google/protobuf/descriptor_pb';
|
|
4
|
+
|
|
5
|
+
export class ScopeList extends jspb.Message {
|
|
6
|
+
getScopesList(): Array<S>;
|
|
7
|
+
setScopesList(value: Array<S>): void;
|
|
8
|
+
clearScopesList(): void;
|
|
9
|
+
addScopes(value: S, index?: number): void;
|
|
10
|
+
|
|
11
|
+
getEndpointsList(): Array<string>;
|
|
12
|
+
setEndpointsList(value: Array<string>): void;
|
|
13
|
+
clearEndpointsList(): void;
|
|
14
|
+
addEndpoints(value: string, index?: number): void;
|
|
15
|
+
|
|
16
|
+
serializeBinary(): Uint8Array;
|
|
17
|
+
toObject(includeInstance?: boolean): ScopeList.AsObject;
|
|
18
|
+
static toObject(includeInstance: boolean, msg: ScopeList): ScopeList.AsObject;
|
|
19
|
+
static serializeBinaryToWriter(message: ScopeList, writer: jspb.BinaryWriter): void;
|
|
20
|
+
static deserializeBinary(bytes: Uint8Array): ScopeList;
|
|
21
|
+
static deserializeBinaryFromReader(message: ScopeList, reader: jspb.BinaryReader): ScopeList;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export namespace ScopeList {
|
|
25
|
+
export type AsObject = {
|
|
26
|
+
scopesList: Array<S>,
|
|
27
|
+
endpointsList: Array<string>,
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export enum S {
|
|
32
|
+
UNDEF = 0,
|
|
33
|
+
ALL = 1,
|
|
34
|
+
PREDICT = 2,
|
|
35
|
+
SEARCH = 3,
|
|
36
|
+
INPUTS_ADD = 4,
|
|
37
|
+
INPUTS_GET = 5,
|
|
38
|
+
INPUTS_PATCH = 7,
|
|
39
|
+
INPUTS_DELETE = 8,
|
|
40
|
+
OUTPUTS_PATCH = 9,
|
|
41
|
+
CONCEPTS_ADD = 10,
|
|
42
|
+
CONCEPTS_GET = 11,
|
|
43
|
+
CONCEPTS_PATCH = 12,
|
|
44
|
+
CONCEPTS_DELETE = 13,
|
|
45
|
+
MODELS_ADD = 14,
|
|
46
|
+
MODELS_GET = 15,
|
|
47
|
+
MODELS_PATCH = 16,
|
|
48
|
+
MODELS_DELETE = 17,
|
|
49
|
+
MODELS_TRAIN = 26,
|
|
50
|
+
MODELS_SYNC = 27,
|
|
51
|
+
WORKFLOWS_ADD = 18,
|
|
52
|
+
WORKFLOWS_GET = 19,
|
|
53
|
+
WORKFLOWS_PATCH = 20,
|
|
54
|
+
WORKFLOWS_DELETE = 21,
|
|
55
|
+
WORKFLOWMETRICS_GET = 96,
|
|
56
|
+
WORKFLOWMETRICS_ADD = 97,
|
|
57
|
+
WORKFLOWMETRICS_DELETE = 98,
|
|
58
|
+
TSNEVISUALIZATIONS_ADD = 24,
|
|
59
|
+
TSNEVISUALIZATIONS_GET = 25,
|
|
60
|
+
ANNOTATIONS_ADD = 37,
|
|
61
|
+
ANNOTATIONS_GET = 38,
|
|
62
|
+
ANNOTATIONS_PATCH = 39,
|
|
63
|
+
ANNOTATIONS_DELETE = 40,
|
|
64
|
+
COLLECTORS_ADD = 41,
|
|
65
|
+
COLLECTORS_GET = 42,
|
|
66
|
+
COLLECTORS_DELETE = 43,
|
|
67
|
+
APPS_ADD = 44,
|
|
68
|
+
APPS_GET = 45,
|
|
69
|
+
APPS_DELETE = 46,
|
|
70
|
+
KEYS_ADD = 47,
|
|
71
|
+
KEYS_GET = 48,
|
|
72
|
+
KEYS_DELETE = 49,
|
|
73
|
+
COLLABORATORS_ADD = 51,
|
|
74
|
+
COLLABORATORS_GET = 50,
|
|
75
|
+
COLLABORATORS_DELETE = 52,
|
|
76
|
+
METRICS_ADD = 54,
|
|
77
|
+
METRICS_GET = 53,
|
|
78
|
+
METRICS_DELETE = 63,
|
|
79
|
+
TASKS_ADD = 55,
|
|
80
|
+
TASKS_GET = 56,
|
|
81
|
+
TASKS_DELETE = 70,
|
|
82
|
+
PASSWORDPOLICIES_ADD = 57,
|
|
83
|
+
PASSWORDPOLICIES_GET = 58,
|
|
84
|
+
PASSWORDPOLICIES_DELETE = 59,
|
|
85
|
+
LABELORDERS_GET = 67,
|
|
86
|
+
LABELORDERS_ADD = 68,
|
|
87
|
+
LABELORDERS_DELETE = 69,
|
|
88
|
+
USERFEATURECONFIGS_GET = 71,
|
|
89
|
+
FINDDUPLICATEANNOTATIONSJOBS_ADD = 102,
|
|
90
|
+
FINDDUPLICATEANNOTATIONSJOBS_GET = 103,
|
|
91
|
+
FINDDUPLICATEANNOTATIONSJOBS_DELETE = 104,
|
|
92
|
+
}
|
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
// source: proto/clarifai/auth/scope/scope.proto
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview
|
|
4
|
+
* @enhanceable
|
|
5
|
+
* @suppress {messageConventions} JS Compiler reports an error if a variable or
|
|
6
|
+
* field starts with 'MSG_' and isn't a translatable message.
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
// GENERATED CODE -- DO NOT EDIT!
|
|
10
|
+
|
|
11
|
+
var jspb = require('google-protobuf');
|
|
12
|
+
var goog = jspb;
|
|
13
|
+
var global = Function('return this')();
|
|
14
|
+
|
|
15
|
+
var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js');
|
|
16
|
+
goog.object.extend(proto, google_protobuf_descriptor_pb);
|
|
17
|
+
goog.exportSymbol('proto.clarifai.auth.scope.S', null, global);
|
|
18
|
+
goog.exportSymbol('proto.clarifai.auth.scope.ScopeList', null, global);
|
|
19
|
+
goog.exportSymbol('proto.clarifai.auth.scope.clarfaiExposed', null, global);
|
|
20
|
+
goog.exportSymbol('proto.clarifai.auth.scope.clarifaiDependingScopesList', null, global);
|
|
21
|
+
/**
|
|
22
|
+
* Generated by JsPbCodeGenerator.
|
|
23
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
24
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
25
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
26
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
27
|
+
* valid.
|
|
28
|
+
* @extends {jspb.Message}
|
|
29
|
+
* @constructor
|
|
30
|
+
*/
|
|
31
|
+
proto.clarifai.auth.scope.ScopeList = function(opt_data) {
|
|
32
|
+
jspb.Message.initialize(this, opt_data, 0, -1, proto.clarifai.auth.scope.ScopeList.repeatedFields_, null);
|
|
33
|
+
};
|
|
34
|
+
goog.inherits(proto.clarifai.auth.scope.ScopeList, jspb.Message);
|
|
35
|
+
if (goog.DEBUG && !COMPILED) {
|
|
36
|
+
/**
|
|
37
|
+
* @public
|
|
38
|
+
* @override
|
|
39
|
+
*/
|
|
40
|
+
proto.clarifai.auth.scope.ScopeList.displayName = 'proto.clarifai.auth.scope.ScopeList';
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* List of repeated fields within this message type.
|
|
45
|
+
* @private {!Array<number>}
|
|
46
|
+
* @const
|
|
47
|
+
*/
|
|
48
|
+
proto.clarifai.auth.scope.ScopeList.repeatedFields_ = [1,2];
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
53
|
+
/**
|
|
54
|
+
* Creates an object representation of this proto.
|
|
55
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
56
|
+
* Optional fields that are not set will be set to undefined.
|
|
57
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
58
|
+
* For the list of reserved names please see:
|
|
59
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
60
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
61
|
+
* JSPB instance for transitional soy proto support:
|
|
62
|
+
* http://goto/soy-param-migration
|
|
63
|
+
* @return {!Object}
|
|
64
|
+
*/
|
|
65
|
+
proto.clarifai.auth.scope.ScopeList.prototype.toObject = function(opt_includeInstance) {
|
|
66
|
+
return proto.clarifai.auth.scope.ScopeList.toObject(opt_includeInstance, this);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Static version of the {@see toObject} method.
|
|
72
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
73
|
+
* the JSPB instance for transitional soy proto support:
|
|
74
|
+
* http://goto/soy-param-migration
|
|
75
|
+
* @param {!proto.clarifai.auth.scope.ScopeList} msg The msg instance to transform.
|
|
76
|
+
* @return {!Object}
|
|
77
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
78
|
+
*/
|
|
79
|
+
proto.clarifai.auth.scope.ScopeList.toObject = function(includeInstance, msg) {
|
|
80
|
+
var f, obj = {
|
|
81
|
+
scopesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f,
|
|
82
|
+
endpointsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
if (includeInstance) {
|
|
86
|
+
obj.$jspbMessageInstance = msg;
|
|
87
|
+
}
|
|
88
|
+
return obj;
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Deserializes binary data (in protobuf wire format).
|
|
95
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
96
|
+
* @return {!proto.clarifai.auth.scope.ScopeList}
|
|
97
|
+
*/
|
|
98
|
+
proto.clarifai.auth.scope.ScopeList.deserializeBinary = function(bytes) {
|
|
99
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
100
|
+
var msg = new proto.clarifai.auth.scope.ScopeList;
|
|
101
|
+
return proto.clarifai.auth.scope.ScopeList.deserializeBinaryFromReader(msg, reader);
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
107
|
+
* given reader into the given message object.
|
|
108
|
+
* @param {!proto.clarifai.auth.scope.ScopeList} msg The message object to deserialize into.
|
|
109
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
110
|
+
* @return {!proto.clarifai.auth.scope.ScopeList}
|
|
111
|
+
*/
|
|
112
|
+
proto.clarifai.auth.scope.ScopeList.deserializeBinaryFromReader = function(msg, reader) {
|
|
113
|
+
while (reader.nextField()) {
|
|
114
|
+
if (reader.isEndGroup()) {
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
var field = reader.getFieldNumber();
|
|
118
|
+
switch (field) {
|
|
119
|
+
case 1:
|
|
120
|
+
var value = /** @type {!Array<!proto.clarifai.auth.scope.S>} */ (reader.readPackedEnum());
|
|
121
|
+
msg.setScopesList(value);
|
|
122
|
+
break;
|
|
123
|
+
case 2:
|
|
124
|
+
var value = /** @type {string} */ (reader.readString());
|
|
125
|
+
msg.addEndpoints(value);
|
|
126
|
+
break;
|
|
127
|
+
default:
|
|
128
|
+
reader.skipField();
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
return msg;
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
138
|
+
* @return {!Uint8Array}
|
|
139
|
+
*/
|
|
140
|
+
proto.clarifai.auth.scope.ScopeList.prototype.serializeBinary = function() {
|
|
141
|
+
var writer = new jspb.BinaryWriter();
|
|
142
|
+
proto.clarifai.auth.scope.ScopeList.serializeBinaryToWriter(this, writer);
|
|
143
|
+
return writer.getResultBuffer();
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Serializes the given message to binary data (in protobuf wire
|
|
149
|
+
* format), writing to the given BinaryWriter.
|
|
150
|
+
* @param {!proto.clarifai.auth.scope.ScopeList} message
|
|
151
|
+
* @param {!jspb.BinaryWriter} writer
|
|
152
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
153
|
+
*/
|
|
154
|
+
proto.clarifai.auth.scope.ScopeList.serializeBinaryToWriter = function(message, writer) {
|
|
155
|
+
var f = undefined;
|
|
156
|
+
f = message.getScopesList();
|
|
157
|
+
if (f.length > 0) {
|
|
158
|
+
writer.writePackedEnum(
|
|
159
|
+
1,
|
|
160
|
+
f
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
f = message.getEndpointsList();
|
|
164
|
+
if (f.length > 0) {
|
|
165
|
+
writer.writeRepeatedString(
|
|
166
|
+
2,
|
|
167
|
+
f
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* repeated S scopes = 1;
|
|
175
|
+
* @return {!Array<!proto.clarifai.auth.scope.S>}
|
|
176
|
+
*/
|
|
177
|
+
proto.clarifai.auth.scope.ScopeList.prototype.getScopesList = function() {
|
|
178
|
+
return /** @type {!Array<!proto.clarifai.auth.scope.S>} */ (jspb.Message.getRepeatedField(this, 1));
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* @param {!Array<!proto.clarifai.auth.scope.S>} value
|
|
184
|
+
* @return {!proto.clarifai.auth.scope.ScopeList} returns this
|
|
185
|
+
*/
|
|
186
|
+
proto.clarifai.auth.scope.ScopeList.prototype.setScopesList = function(value) {
|
|
187
|
+
return jspb.Message.setField(this, 1, value || []);
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* @param {!proto.clarifai.auth.scope.S} value
|
|
193
|
+
* @param {number=} opt_index
|
|
194
|
+
* @return {!proto.clarifai.auth.scope.ScopeList} returns this
|
|
195
|
+
*/
|
|
196
|
+
proto.clarifai.auth.scope.ScopeList.prototype.addScopes = function(value, opt_index) {
|
|
197
|
+
return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Clears the list making it empty but non-null.
|
|
203
|
+
* @return {!proto.clarifai.auth.scope.ScopeList} returns this
|
|
204
|
+
*/
|
|
205
|
+
proto.clarifai.auth.scope.ScopeList.prototype.clearScopesList = function() {
|
|
206
|
+
return this.setScopesList([]);
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* repeated string endpoints = 2;
|
|
212
|
+
* @return {!Array<string>}
|
|
213
|
+
*/
|
|
214
|
+
proto.clarifai.auth.scope.ScopeList.prototype.getEndpointsList = function() {
|
|
215
|
+
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2));
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* @param {!Array<string>} value
|
|
221
|
+
* @return {!proto.clarifai.auth.scope.ScopeList} returns this
|
|
222
|
+
*/
|
|
223
|
+
proto.clarifai.auth.scope.ScopeList.prototype.setEndpointsList = function(value) {
|
|
224
|
+
return jspb.Message.setField(this, 2, value || []);
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* @param {string} value
|
|
230
|
+
* @param {number=} opt_index
|
|
231
|
+
* @return {!proto.clarifai.auth.scope.ScopeList} returns this
|
|
232
|
+
*/
|
|
233
|
+
proto.clarifai.auth.scope.ScopeList.prototype.addEndpoints = function(value, opt_index) {
|
|
234
|
+
return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Clears the list making it empty but non-null.
|
|
240
|
+
* @return {!proto.clarifai.auth.scope.ScopeList} returns this
|
|
241
|
+
*/
|
|
242
|
+
proto.clarifai.auth.scope.ScopeList.prototype.clearEndpointsList = function() {
|
|
243
|
+
return this.setEndpointsList([]);
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* @enum {number}
|
|
249
|
+
*/
|
|
250
|
+
proto.clarifai.auth.scope.S = {
|
|
251
|
+
UNDEF: 0,
|
|
252
|
+
ALL: 1,
|
|
253
|
+
PREDICT: 2,
|
|
254
|
+
SEARCH: 3,
|
|
255
|
+
INPUTS_ADD: 4,
|
|
256
|
+
INPUTS_GET: 5,
|
|
257
|
+
INPUTS_PATCH: 7,
|
|
258
|
+
INPUTS_DELETE: 8,
|
|
259
|
+
OUTPUTS_PATCH: 9,
|
|
260
|
+
CONCEPTS_ADD: 10,
|
|
261
|
+
CONCEPTS_GET: 11,
|
|
262
|
+
CONCEPTS_PATCH: 12,
|
|
263
|
+
CONCEPTS_DELETE: 13,
|
|
264
|
+
MODELS_ADD: 14,
|
|
265
|
+
MODELS_GET: 15,
|
|
266
|
+
MODELS_PATCH: 16,
|
|
267
|
+
MODELS_DELETE: 17,
|
|
268
|
+
MODELS_TRAIN: 26,
|
|
269
|
+
MODELS_SYNC: 27,
|
|
270
|
+
WORKFLOWS_ADD: 18,
|
|
271
|
+
WORKFLOWS_GET: 19,
|
|
272
|
+
WORKFLOWS_PATCH: 20,
|
|
273
|
+
WORKFLOWS_DELETE: 21,
|
|
274
|
+
WORKFLOWMETRICS_GET: 96,
|
|
275
|
+
WORKFLOWMETRICS_ADD: 97,
|
|
276
|
+
WORKFLOWMETRICS_DELETE: 98,
|
|
277
|
+
TSNEVISUALIZATIONS_ADD: 24,
|
|
278
|
+
TSNEVISUALIZATIONS_GET: 25,
|
|
279
|
+
ANNOTATIONS_ADD: 37,
|
|
280
|
+
ANNOTATIONS_GET: 38,
|
|
281
|
+
ANNOTATIONS_PATCH: 39,
|
|
282
|
+
ANNOTATIONS_DELETE: 40,
|
|
283
|
+
COLLECTORS_ADD: 41,
|
|
284
|
+
COLLECTORS_GET: 42,
|
|
285
|
+
COLLECTORS_DELETE: 43,
|
|
286
|
+
APPS_ADD: 44,
|
|
287
|
+
APPS_GET: 45,
|
|
288
|
+
APPS_DELETE: 46,
|
|
289
|
+
KEYS_ADD: 47,
|
|
290
|
+
KEYS_GET: 48,
|
|
291
|
+
KEYS_DELETE: 49,
|
|
292
|
+
COLLABORATORS_ADD: 51,
|
|
293
|
+
COLLABORATORS_GET: 50,
|
|
294
|
+
COLLABORATORS_DELETE: 52,
|
|
295
|
+
METRICS_ADD: 54,
|
|
296
|
+
METRICS_GET: 53,
|
|
297
|
+
METRICS_DELETE: 63,
|
|
298
|
+
TASKS_ADD: 55,
|
|
299
|
+
TASKS_GET: 56,
|
|
300
|
+
TASKS_DELETE: 70,
|
|
301
|
+
PASSWORDPOLICIES_ADD: 57,
|
|
302
|
+
PASSWORDPOLICIES_GET: 58,
|
|
303
|
+
PASSWORDPOLICIES_DELETE: 59,
|
|
304
|
+
LABELORDERS_GET: 67,
|
|
305
|
+
LABELORDERS_ADD: 68,
|
|
306
|
+
LABELORDERS_DELETE: 69,
|
|
307
|
+
USERFEATURECONFIGS_GET: 71,
|
|
308
|
+
FINDDUPLICATEANNOTATIONSJOBS_ADD: 102,
|
|
309
|
+
FINDDUPLICATEANNOTATIONSJOBS_GET: 103,
|
|
310
|
+
FINDDUPLICATEANNOTATIONSJOBS_DELETE: 104
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* A tuple of {field number, class constructor} for the extension
|
|
316
|
+
* field named `clarfaiExposed`.
|
|
317
|
+
* @type {!jspb.ExtensionFieldInfo<boolean>}
|
|
318
|
+
*/
|
|
319
|
+
proto.clarifai.auth.scope.clarfaiExposed = new jspb.ExtensionFieldInfo(
|
|
320
|
+
80318,
|
|
321
|
+
{clarfaiExposed: 0},
|
|
322
|
+
null,
|
|
323
|
+
/** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (
|
|
324
|
+
null),
|
|
325
|
+
0);
|
|
326
|
+
|
|
327
|
+
google_protobuf_descriptor_pb.EnumValueOptions.extensionsBinary[80318] = new jspb.ExtensionFieldBinaryInfo(
|
|
328
|
+
proto.clarifai.auth.scope.clarfaiExposed,
|
|
329
|
+
jspb.BinaryReader.prototype.readBool,
|
|
330
|
+
jspb.BinaryWriter.prototype.writeBool,
|
|
331
|
+
undefined,
|
|
332
|
+
undefined,
|
|
333
|
+
false);
|
|
334
|
+
// This registers the extension field with the extended class, so that
|
|
335
|
+
// toObject() will function correctly.
|
|
336
|
+
google_protobuf_descriptor_pb.EnumValueOptions.extensions[80318] = proto.clarifai.auth.scope.clarfaiExposed;
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* A tuple of {field number, class constructor} for the extension
|
|
341
|
+
* field named `clarifaiDependingScopesList`.
|
|
342
|
+
* @type {!jspb.ExtensionFieldInfo<!Array<!proto.clarifai.auth.scope.S>>}
|
|
343
|
+
*/
|
|
344
|
+
proto.clarifai.auth.scope.clarifaiDependingScopesList = new jspb.ExtensionFieldInfo(
|
|
345
|
+
80319,
|
|
346
|
+
{clarifaiDependingScopesList: 0},
|
|
347
|
+
null,
|
|
348
|
+
/** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (
|
|
349
|
+
null),
|
|
350
|
+
1);
|
|
351
|
+
|
|
352
|
+
google_protobuf_descriptor_pb.EnumValueOptions.extensionsBinary[80319] = new jspb.ExtensionFieldBinaryInfo(
|
|
353
|
+
proto.clarifai.auth.scope.clarifaiDependingScopesList,
|
|
354
|
+
jspb.BinaryReader.prototype.readPackedEnum,
|
|
355
|
+
jspb.BinaryWriter.prototype.writePackedEnum,
|
|
356
|
+
undefined,
|
|
357
|
+
undefined,
|
|
358
|
+
true);
|
|
359
|
+
// This registers the extension field with the extended class, so that
|
|
360
|
+
// toObject() will function correctly.
|
|
361
|
+
google_protobuf_descriptor_pb.EnumValueOptions.extensions[80319] = proto.clarifai.auth.scope.clarifaiDependingScopesList;
|
|
362
|
+
|
|
363
|
+
goog.object.extend(exports, proto.clarifai.auth.scope);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// source: proto/clarifai/auth/types/types.proto
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview
|
|
4
|
+
* @enhanceable
|
|
5
|
+
* @suppress {messageConventions} JS Compiler reports an error if a variable or
|
|
6
|
+
* field starts with 'MSG_' and isn't a translatable message.
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
// GENERATED CODE -- DO NOT EDIT!
|
|
10
|
+
|
|
11
|
+
var jspb = require('google-protobuf');
|
|
12
|
+
var goog = jspb;
|
|
13
|
+
var global = Function('return this')();
|
|
14
|
+
|
|
15
|
+
goog.exportSymbol('proto.clarifai.auth.types.AuthType', null, global);
|
|
16
|
+
/**
|
|
17
|
+
* @enum {number}
|
|
18
|
+
*/
|
|
19
|
+
proto.clarifai.auth.types.AuthType = {
|
|
20
|
+
UNDEF: 0,
|
|
21
|
+
NOAUTH: 1,
|
|
22
|
+
KEYAUTH: 2,
|
|
23
|
+
SESSIONTOKENAUTH: 3,
|
|
24
|
+
ADMINAUTH: 4,
|
|
25
|
+
PATAUTH: 5
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
goog.object.extend(exports, proto.clarifai.auth.types);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as jspb from "google-protobuf"
|
|
2
|
+
|
|
3
|
+
import * as proto_clarifai_auth_scope_scope_pb from '../../../../proto/clarifai/auth/scope/scope_pb';
|
|
4
|
+
import * as proto_clarifai_auth_types_types_pb from '../../../../proto/clarifai/auth/types/types_pb';
|
|
5
|
+
import * as google_protobuf_descriptor_pb from 'google-protobuf/google/protobuf/descriptor_pb';
|
|
6
|
+
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
// source: proto/clarifai/auth/util/extension.proto
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview
|
|
4
|
+
* @enhanceable
|
|
5
|
+
* @suppress {messageConventions} JS Compiler reports an error if a variable or
|
|
6
|
+
* field starts with 'MSG_' and isn't a translatable message.
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
// GENERATED CODE -- DO NOT EDIT!
|
|
10
|
+
|
|
11
|
+
var jspb = require('google-protobuf');
|
|
12
|
+
var goog = jspb;
|
|
13
|
+
var global = Function('return this')();
|
|
14
|
+
|
|
15
|
+
var proto_clarifai_auth_scope_scope_pb = require('../../../../proto/clarifai/auth/scope/scope_pb.js');
|
|
16
|
+
goog.object.extend(proto, proto_clarifai_auth_scope_scope_pb);
|
|
17
|
+
var proto_clarifai_auth_types_types_pb = require('../../../../proto/clarifai/auth/types/types_pb.js');
|
|
18
|
+
goog.object.extend(proto, proto_clarifai_auth_types_types_pb);
|
|
19
|
+
var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js');
|
|
20
|
+
goog.object.extend(proto, google_protobuf_descriptor_pb);
|
|
21
|
+
goog.exportSymbol('proto.clarifai.auth.util.clAuthType', null, global);
|
|
22
|
+
goog.exportSymbol('proto.clarifai.auth.util.clDependingScopesList', null, global);
|
|
23
|
+
goog.exportSymbol('proto.clarifai.auth.util.clPrivateField', null, global);
|
|
24
|
+
goog.exportSymbol('proto.clarifai.auth.util.clPrivateMessage', null, global);
|
|
25
|
+
goog.exportSymbol('proto.clarifai.auth.util.clPrivateRpc', null, global);
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* A tuple of {field number, class constructor} for the extension
|
|
29
|
+
* field named `clPrivateField`.
|
|
30
|
+
* @type {!jspb.ExtensionFieldInfo<boolean>}
|
|
31
|
+
*/
|
|
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);
|
|
47
|
+
// This registers the extension field with the extended class, so that
|
|
48
|
+
// toObject() will function correctly.
|
|
49
|
+
google_protobuf_descriptor_pb.FieldOptions.extensions[80320] = proto.clarifai.auth.util.clPrivateField;
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* A tuple of {field number, class constructor} for the extension
|
|
54
|
+
* field named `clPrivateRpc`.
|
|
55
|
+
* @type {!jspb.ExtensionFieldInfo<boolean>}
|
|
56
|
+
*/
|
|
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);
|
|
72
|
+
// This registers the extension field with the extended class, so that
|
|
73
|
+
// toObject() will function correctly.
|
|
74
|
+
google_protobuf_descriptor_pb.MethodOptions.extensions[80321] = proto.clarifai.auth.util.clPrivateRpc;
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* A tuple of {field number, class constructor} for the extension
|
|
79
|
+
* field named `clDependingScopesList`.
|
|
80
|
+
* @type {!jspb.ExtensionFieldInfo<!Array<!proto.clarifai.auth.scope.S>>}
|
|
81
|
+
*/
|
|
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);
|
|
97
|
+
// This registers the extension field with the extended class, so that
|
|
98
|
+
// toObject() will function correctly.
|
|
99
|
+
google_protobuf_descriptor_pb.MethodOptions.extensions[80322] = proto.clarifai.auth.util.clDependingScopesList;
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* A tuple of {field number, class constructor} for the extension
|
|
104
|
+
* field named `clAuthType`.
|
|
105
|
+
* @type {!jspb.ExtensionFieldInfo<!proto.clarifai.auth.types.AuthType>}
|
|
106
|
+
*/
|
|
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);
|
|
122
|
+
// This registers the extension field with the extended class, so that
|
|
123
|
+
// toObject() will function correctly.
|
|
124
|
+
google_protobuf_descriptor_pb.MethodOptions.extensions[80323] = proto.clarifai.auth.util.clAuthType;
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* A tuple of {field number, class constructor} for the extension
|
|
129
|
+
* field named `clPrivateMessage`.
|
|
130
|
+
* @type {!jspb.ExtensionFieldInfo<boolean>}
|
|
131
|
+
*/
|
|
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);
|
|
147
|
+
// This registers the extension field with the extended class, so that
|
|
148
|
+
// toObject() will function correctly.
|
|
149
|
+
google_protobuf_descriptor_pb.MessageOptions.extensions[80324] = proto.clarifai.auth.util.clPrivateMessage;
|
|
150
|
+
|
|
151
|
+
goog.object.extend(exports, proto.clarifai.auth.util);
|
package/resources.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './proto/clarifai/api/resources_pb'
|
package/service.desc
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
|
|
2
|
+
�
|
|
3
|
+
(proto/clarifai/auth/util/extension.protoclarifai.auth.util%proto/clarifai/auth/scope/scope.proto%proto/clarifai/auth/types/types.proto google/protobuf/descriptor.proto:I
|
|
4
|
+
cl_private_field.google.protobuf.FieldOptions�� (RclPrivateField:F
|
|
5
|
+
cl_private_rpc.google.protobuf.MethodOptions�� (RclPrivateRpc:h
|
|
6
|
+
cl_depending_scopes.google.protobuf.MethodOptions�� (2.clarifai.auth.scope.SRclDependingScopes:a
|
|
7
|
+
cl_auth_type.google.protobuf.MethodOptions�� (2.clarifai.auth.types.AuthTypeR
|
|
8
|
+
clAuthType:O
|
|
9
|
+
cl_private_message.google.protobuf.MessageOptions�� (RclPrivateMessageB�
|
|
10
|
+
com.clarifai.grpc.auth.utilPZvgithub.com/Clarifai/clarifai-go-grpc/proto/clarifai/auth/github.com/Clarifai/clarifai-go-grpc/proto/clarifai/auth/util�CAIPbproto3
|
package/service.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './proto/clarifai/api/service_pb'
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ClarifaiStub } from '../index'
|
|
2
|
+
import { expect } from 'chai'
|
|
3
|
+
|
|
4
|
+
describe('Basic Client Stub', () => {
|
|
5
|
+
it('works', () => {
|
|
6
|
+
const client = ClarifaiStub.grpc()
|
|
7
|
+
expect(client.hostname_).to.equal('api.clarifai.com')
|
|
8
|
+
})
|
|
9
|
+
|
|
10
|
+
it('allows custom hostname', () => {
|
|
11
|
+
const client = ClarifaiStub.grpc('api-dev.clarifai.com')
|
|
12
|
+
expect(client.hostname_).to.equal('api-dev.clarifai.com')
|
|
13
|
+
})
|
|
14
|
+
})
|