instill-sdk 0.0.1
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/README.md +369 -0
- package/dist/chunk-2VZRNT6D.mjs +0 -0
- package/dist/chunk-3VVR3XHW.mjs +56 -0
- package/dist/chunk-42SCMPQP.mjs +0 -0
- package/dist/chunk-4KLHN5HK.mjs +0 -0
- package/dist/chunk-4TKUHGUZ.mjs +244 -0
- package/dist/chunk-4VWYH26Q.mjs +145 -0
- package/dist/chunk-6M57XUNI.mjs +64 -0
- package/dist/chunk-6NTCWRRC.mjs +0 -0
- package/dist/chunk-6ZXT6X3H.mjs +0 -0
- package/dist/chunk-73EPIL2R.mjs +0 -0
- package/dist/chunk-7KV3Y36U.mjs +17 -0
- package/dist/chunk-D5OKZ665.mjs +32 -0
- package/dist/chunk-DXEIDDIA.mjs +32 -0
- package/dist/chunk-EBWGEVUX.mjs +33 -0
- package/dist/chunk-ECC5KF6S.mjs +150 -0
- package/dist/chunk-EHG2FVLQ.mjs +0 -0
- package/dist/chunk-EXJ4UK7Q.mjs +49 -0
- package/dist/chunk-FAXYADOP.mjs +0 -0
- package/dist/chunk-FNCXOA62.mjs +0 -0
- package/dist/chunk-GPM5FDRS.mjs +154 -0
- package/dist/chunk-IB43VC55.mjs +41 -0
- package/dist/chunk-IPW3WQCQ.mjs +35 -0
- package/dist/chunk-IWAQMUMR.mjs +42 -0
- package/dist/chunk-JONZWFL5.mjs +168 -0
- package/dist/chunk-JTTE7IZY.mjs +14 -0
- package/dist/chunk-JY37AKV6.mjs +0 -0
- package/dist/chunk-KCKTAMXW.mjs +0 -0
- package/dist/chunk-KHFNAMT4.mjs +160 -0
- package/dist/chunk-NRP5M7FG.mjs +128 -0
- package/dist/chunk-QLWRKSUE.mjs +104 -0
- package/dist/chunk-QV7PYP7E.mjs +0 -0
- package/dist/chunk-QZOKJQTL.mjs +102 -0
- package/dist/chunk-RVRM4NPL.mjs +29 -0
- package/dist/chunk-VASX6R4R.mjs +0 -0
- package/dist/chunk-VIPORJ6H.mjs +77 -0
- package/dist/chunk-WBQAMGXK.mjs +0 -0
- package/dist/chunk-WL54JNC6.mjs +64 -0
- package/dist/chunk-WLPBUHMI.mjs +0 -0
- package/dist/chunk-YT6ZGA4J.mjs +46 -0
- package/dist/chunk-YXNMG2RZ.mjs +98 -0
- package/dist/chunk-ZRC43MN3.mjs +111 -0
- package/dist/chunk-magic-string.3a794426-OWTMMGNR.mjs +1253 -0
- package/dist/connector/ConnectorClient.d.ts +54 -0
- package/dist/connector/ConnectorClient.js +457 -0
- package/dist/connector/ConnectorClient.mjs +16 -0
- package/dist/connector/action.d.ts +13 -0
- package/dist/connector/action.js +72 -0
- package/dist/connector/action.mjs +11 -0
- package/dist/connector/index.d.ts +2 -0
- package/dist/connector/index.js +37 -0
- package/dist/connector/index.mjs +13 -0
- package/dist/connector/mutation.d.ts +19 -0
- package/dist/connector/mutation.js +91 -0
- package/dist/connector/mutation.mjs +13 -0
- package/dist/connector/queries.d.ts +34 -0
- package/dist/connector/queries.js +227 -0
- package/dist/connector/queries.mjs +23 -0
- package/dist/connector/types.d.ts +102 -0
- package/dist/connector/types.js +18 -0
- package/dist/connector/types.mjs +1 -0
- package/dist/helper/axiosInstance.d.ts +3 -0
- package/dist/helper/axiosInstance.js +44 -0
- package/dist/helper/axiosInstance.mjs +7 -0
- package/dist/helper/config.d.ts +1 -0
- package/dist/helper/config.js +53 -0
- package/dist/helper/config.mjs +7 -0
- package/dist/helper/createClient.d.ts +2 -0
- package/dist/helper/createClient.js +90 -0
- package/dist/helper/createClient.mjs +8 -0
- package/dist/helper/getInstillApiErrorMessage.d.ts +2 -0
- package/dist/helper/getInstillApiErrorMessage.js +41 -0
- package/dist/helper/getInstillApiErrorMessage.mjs +7 -0
- package/dist/helper/getQueryString.d.ts +7 -0
- package/dist/helper/getQueryString.js +57 -0
- package/dist/helper/getQueryString.mjs +7 -0
- package/dist/helper/getQueryString.test.d.ts +1 -0
- package/dist/helper/getQueryString.test.js +15769 -0
- package/dist/helper/getQueryString.test.mjs +14458 -0
- package/dist/helper/index.d.ts +5 -0
- package/dist/helper/index.js +145 -0
- package/dist/helper/index.mjs +21 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +1978 -0
- package/dist/index.mjs +87 -0
- package/dist/metric/MetricClient.d.ts +21 -0
- package/dist/metric/MetricClient.js +215 -0
- package/dist/metric/MetricClient.mjs +14 -0
- package/dist/metric/index.d.ts +1 -0
- package/dist/metric/index.js +18 -0
- package/dist/metric/index.mjs +3 -0
- package/dist/metric/pipeline/index.d.ts +1 -0
- package/dist/metric/pipeline/index.js +18 -0
- package/dist/metric/pipeline/index.mjs +2 -0
- package/dist/metric/pipeline/queries.d.ts +21 -0
- package/dist/metric/pipeline/queries.js +168 -0
- package/dist/metric/pipeline/queries.mjs +17 -0
- package/dist/metric/pipeline/types.d.ts +63 -0
- package/dist/metric/pipeline/types.js +18 -0
- package/dist/metric/pipeline/types.mjs +1 -0
- package/dist/mgmt/AuthClient.d.ts +35 -0
- package/dist/mgmt/AuthClient.js +308 -0
- package/dist/mgmt/AuthClient.mjs +16 -0
- package/dist/mgmt/action.d.ts +8 -0
- package/dist/mgmt/action.js +61 -0
- package/dist/mgmt/action.mjs +11 -0
- package/dist/mgmt/index.d.ts +2 -0
- package/dist/mgmt/index.js +37 -0
- package/dist/mgmt/index.mjs +13 -0
- package/dist/mgmt/mutation.d.ts +18 -0
- package/dist/mgmt/mutation.js +83 -0
- package/dist/mgmt/mutation.mjs +13 -0
- package/dist/mgmt/queries.d.ts +17 -0
- package/dist/mgmt/queries.js +148 -0
- package/dist/mgmt/queries.mjs +19 -0
- package/dist/mgmt/types.d.ts +62 -0
- package/dist/mgmt/types.js +18 -0
- package/dist/mgmt/types.mjs +1 -0
- package/dist/model/ModelClient.d.ts +48 -0
- package/dist/model/ModelClient.js +466 -0
- package/dist/model/ModelClient.mjs +16 -0
- package/dist/model/action.d.ts +9 -0
- package/dist/model/action.js +57 -0
- package/dist/model/action.mjs +9 -0
- package/dist/model/index.d.ts +2 -0
- package/dist/model/index.js +37 -0
- package/dist/model/index.mjs +13 -0
- package/dist/model/mutation.d.ts +15 -0
- package/dist/model/mutation.js +128 -0
- package/dist/model/mutation.mjs +11 -0
- package/dist/model/queries.d.ts +35 -0
- package/dist/model/queries.js +234 -0
- package/dist/model/queries.mjs +25 -0
- package/dist/model/types.d.ts +141 -0
- package/dist/model/types.js +18 -0
- package/dist/model/types.mjs +1 -0
- package/dist/operation/OperationClient.d.ts +11 -0
- package/dist/operation/OperationClient.js +106 -0
- package/dist/operation/OperationClient.mjs +8 -0
- package/dist/operation/index.d.ts +2 -0
- package/dist/operation/index.js +31 -0
- package/dist/operation/index.mjs +5 -0
- package/dist/operation/queries.d.ts +9 -0
- package/dist/operation/queries.js +67 -0
- package/dist/operation/queries.mjs +9 -0
- package/dist/operation/types.d.ts +9 -0
- package/dist/operation/types.js +18 -0
- package/dist/operation/types.mjs +1 -0
- package/dist/pipeline/PipelineClient.d.ts +80 -0
- package/dist/pipeline/PipelineClient.js +639 -0
- package/dist/pipeline/PipelineClient.mjs +16 -0
- package/dist/pipeline/action.d.ts +34 -0
- package/dist/pipeline/action.js +157 -0
- package/dist/pipeline/action.mjs +17 -0
- package/dist/pipeline/index.d.ts +2 -0
- package/dist/pipeline/index.js +37 -0
- package/dist/pipeline/index.mjs +13 -0
- package/dist/pipeline/mutation.d.ts +33 -0
- package/dist/pipeline/mutation.js +134 -0
- package/dist/pipeline/mutation.mjs +19 -0
- package/dist/pipeline/queries.d.ts +32 -0
- package/dist/pipeline/queries.js +223 -0
- package/dist/pipeline/queries.mjs +23 -0
- package/dist/pipeline/types.d.ts +204 -0
- package/dist/pipeline/types.js +18 -0
- package/dist/pipeline/types.mjs +1 -0
- package/dist/protogen-ts/base/metric/v1alpha/metric.ts +4522 -0
- package/dist/protogen-ts/base/metric/v1alpha/metric_service.ts +314 -0
- package/dist/protogen-ts/base/mgmt/v1alpha/metric.ts +2486 -0
- package/dist/protogen-ts/base/mgmt/v1alpha/mgmt.ts +3787 -0
- package/dist/protogen-ts/base/mgmt/v1alpha/mgmt_private_service.ts +107 -0
- package/dist/protogen-ts/base/mgmt/v1alpha/mgmt_public_service.ts +326 -0
- package/dist/protogen-ts/base/usage/v1alpha/usage.ts +2185 -0
- package/dist/protogen-ts/base/usage/v1alpha/usage_service.ts +81 -0
- package/dist/protogen-ts/common/healthcheck/v1alpha/healthcheck.ts +188 -0
- package/dist/protogen-ts/common/task/v1alpha/task.ts +109 -0
- package/dist/protogen-ts/google/api/annotations.ts +3 -0
- package/dist/protogen-ts/google/api/client.ts +2073 -0
- package/dist/protogen-ts/google/api/field_behavior.ts +119 -0
- package/dist/protogen-ts/google/api/http.ts +745 -0
- package/dist/protogen-ts/google/api/launch_stage.ts +115 -0
- package/dist/protogen-ts/google/api/resource.ts +529 -0
- package/dist/protogen-ts/google/longrunning/operations.ts +890 -0
- package/dist/protogen-ts/google/protobuf/any.ts +259 -0
- package/dist/protogen-ts/google/protobuf/descriptor.ts +4831 -0
- package/dist/protogen-ts/google/protobuf/duration.ts +203 -0
- package/dist/protogen-ts/google/protobuf/empty.ts +70 -0
- package/dist/protogen-ts/google/protobuf/field_mask.ts +289 -0
- package/dist/protogen-ts/google/protobuf/struct.ts +543 -0
- package/dist/protogen-ts/google/protobuf/timestamp.ts +232 -0
- package/dist/protogen-ts/google/rpc/status.ts +138 -0
- package/dist/protogen-ts/model/controller/v1alpha/controller.ts +823 -0
- package/dist/protogen-ts/model/controller/v1alpha/controller_service.ts +95 -0
- package/dist/protogen-ts/model/model/v1alpha/common.ts +135 -0
- package/dist/protogen-ts/model/model/v1alpha/model.ts +5682 -0
- package/dist/protogen-ts/model/model/v1alpha/model_definition.ts +775 -0
- package/dist/protogen-ts/model/model/v1alpha/model_private_service.ts +87 -0
- package/dist/protogen-ts/model/model/v1alpha/model_public_service.ts +383 -0
- package/dist/protogen-ts/model/model/v1alpha/task_classification.ts +326 -0
- package/dist/protogen-ts/model/model/v1alpha/task_detection.ts +411 -0
- package/dist/protogen-ts/model/model/v1alpha/task_instance_segmentation.ts +435 -0
- package/dist/protogen-ts/model/model/v1alpha/task_keypoint.ts +510 -0
- package/dist/protogen-ts/model/model/v1alpha/task_ocr.ts +406 -0
- package/dist/protogen-ts/model/model/v1alpha/task_semantic_segmentation.ts +396 -0
- package/dist/protogen-ts/model/model/v1alpha/task_text_generation.ts +247 -0
- package/dist/protogen-ts/model/model/v1alpha/task_text_to_image.ts +221 -0
- package/dist/protogen-ts/model/model/v1alpha/task_unspecified.ts +142 -0
- package/dist/protogen-ts/protoc-gen-openapiv2/options/annotations.ts +3 -0
- package/dist/protogen-ts/protoc-gen-openapiv2/options/openapiv2.ts +5095 -0
- package/dist/protogen-ts/vdp/connector/v1alpha/connector.ts +3637 -0
- package/dist/protogen-ts/vdp/connector/v1alpha/connector_definition.ts +1043 -0
- package/dist/protogen-ts/vdp/connector/v1alpha/connector_private_service.ts +92 -0
- package/dist/protogen-ts/vdp/connector/v1alpha/connector_public_service.ts +310 -0
- package/dist/protogen-ts/vdp/connector/v1alpha/spec.ts +126 -0
- package/dist/protogen-ts/vdp/controller/v1alpha/controller.ts +853 -0
- package/dist/protogen-ts/vdp/controller/v1alpha/controller_service.ts +95 -0
- package/dist/protogen-ts/vdp/pipeline/v1alpha/common.ts +498 -0
- package/dist/protogen-ts/vdp/pipeline/v1alpha/operator_definition.ts +948 -0
- package/dist/protogen-ts/vdp/pipeline/v1alpha/pipeline.ts +6006 -0
- package/dist/protogen-ts/vdp/pipeline/v1alpha/pipeline_private_service.ts +83 -0
- package/dist/protogen-ts/vdp/pipeline/v1alpha/pipeline_public_service.ts +413 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types.d.ts +23 -0
- package/dist/types.js +18 -0
- package/dist/types.mjs +1 -0
- package/package.json +50 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import * as _m0 from "protobufjs/minimal";
|
|
3
|
+
import {
|
|
4
|
+
CreateSessionRequest,
|
|
5
|
+
CreateSessionResponse,
|
|
6
|
+
LivenessRequest,
|
|
7
|
+
LivenessResponse,
|
|
8
|
+
ReadinessRequest,
|
|
9
|
+
ReadinessResponse,
|
|
10
|
+
SendSessionReportRequest,
|
|
11
|
+
SendSessionReportResponse,
|
|
12
|
+
} from "./usage";
|
|
13
|
+
|
|
14
|
+
export const protobufPackage = "base.usage.v1alpha";
|
|
15
|
+
|
|
16
|
+
/** UsageService responds to incoming usage requests. */
|
|
17
|
+
export interface UsageService {
|
|
18
|
+
/**
|
|
19
|
+
* Liveness method receives a LivenessRequest message and returns a
|
|
20
|
+
* LivenessResponse message.
|
|
21
|
+
* See https://github.com/grpc/grpc/blob/master/doc/health-checking.md
|
|
22
|
+
*/
|
|
23
|
+
Liveness(request: LivenessRequest): Promise<LivenessResponse>;
|
|
24
|
+
/**
|
|
25
|
+
* Readiness method receives a ReadinessRequest message and returns a
|
|
26
|
+
* ReadinessResponse message.
|
|
27
|
+
* See https://github.com/grpc/grpc/blob/master/doc/health-checking.md
|
|
28
|
+
*/
|
|
29
|
+
Readiness(request: ReadinessRequest): Promise<ReadinessResponse>;
|
|
30
|
+
/**
|
|
31
|
+
* CreateSession method receives a CreateSessionRequest message and returns
|
|
32
|
+
* a CreateSessionResponse message.
|
|
33
|
+
*/
|
|
34
|
+
CreateSession(request: CreateSessionRequest): Promise<CreateSessionResponse>;
|
|
35
|
+
/**
|
|
36
|
+
* SendSessionReport method receives a SendSessionReportRequest message and
|
|
37
|
+
* returns a SendSessionReportResponse message.
|
|
38
|
+
*/
|
|
39
|
+
SendSessionReport(request: SendSessionReportRequest): Promise<SendSessionReportResponse>;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export const UsageServiceServiceName = "base.usage.v1alpha.UsageService";
|
|
43
|
+
export class UsageServiceClientImpl implements UsageService {
|
|
44
|
+
private readonly rpc: Rpc;
|
|
45
|
+
private readonly service: string;
|
|
46
|
+
constructor(rpc: Rpc, opts?: { service?: string }) {
|
|
47
|
+
this.service = opts?.service || UsageServiceServiceName;
|
|
48
|
+
this.rpc = rpc;
|
|
49
|
+
this.Liveness = this.Liveness.bind(this);
|
|
50
|
+
this.Readiness = this.Readiness.bind(this);
|
|
51
|
+
this.CreateSession = this.CreateSession.bind(this);
|
|
52
|
+
this.SendSessionReport = this.SendSessionReport.bind(this);
|
|
53
|
+
}
|
|
54
|
+
Liveness(request: LivenessRequest): Promise<LivenessResponse> {
|
|
55
|
+
const data = LivenessRequest.encode(request).finish();
|
|
56
|
+
const promise = this.rpc.request(this.service, "Liveness", data);
|
|
57
|
+
return promise.then((data) => LivenessResponse.decode(_m0.Reader.create(data)));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
Readiness(request: ReadinessRequest): Promise<ReadinessResponse> {
|
|
61
|
+
const data = ReadinessRequest.encode(request).finish();
|
|
62
|
+
const promise = this.rpc.request(this.service, "Readiness", data);
|
|
63
|
+
return promise.then((data) => ReadinessResponse.decode(_m0.Reader.create(data)));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
CreateSession(request: CreateSessionRequest): Promise<CreateSessionResponse> {
|
|
67
|
+
const data = CreateSessionRequest.encode(request).finish();
|
|
68
|
+
const promise = this.rpc.request(this.service, "CreateSession", data);
|
|
69
|
+
return promise.then((data) => CreateSessionResponse.decode(_m0.Reader.create(data)));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
SendSessionReport(request: SendSessionReportRequest): Promise<SendSessionReportResponse> {
|
|
73
|
+
const data = SendSessionReportRequest.encode(request).finish();
|
|
74
|
+
const promise = this.rpc.request(this.service, "SendSessionReport", data);
|
|
75
|
+
return promise.then((data) => SendSessionReportResponse.decode(_m0.Reader.create(data)));
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
interface Rpc {
|
|
80
|
+
request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
|
|
81
|
+
}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import * as _m0 from "protobufjs/minimal";
|
|
3
|
+
|
|
4
|
+
export const protobufPackage = "common.healthcheck.v1alpha";
|
|
5
|
+
|
|
6
|
+
/** HealthCheckRequest represents a request to health check a service */
|
|
7
|
+
export interface HealthCheckRequest {
|
|
8
|
+
/** Service name to check for its readiness status */
|
|
9
|
+
service?: string | undefined;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/** HealthCheckResponse represents a response for a service heath status */
|
|
13
|
+
export interface HealthCheckResponse {
|
|
14
|
+
/** Status is the instance of the enum type ServingStatus */
|
|
15
|
+
status: HealthCheckResponse_ServingStatus;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** ServingStatus enumerates the status of a queried service */
|
|
19
|
+
export enum HealthCheckResponse_ServingStatus {
|
|
20
|
+
/** SERVING_STATUS_UNSPECIFIED - Serving status: UNSPECIFIED */
|
|
21
|
+
SERVING_STATUS_UNSPECIFIED = 0,
|
|
22
|
+
/** SERVING_STATUS_SERVING - Serving status: SERVING */
|
|
23
|
+
SERVING_STATUS_SERVING = 1,
|
|
24
|
+
/** SERVING_STATUS_NOT_SERVING - Serving status: NOT SERVING */
|
|
25
|
+
SERVING_STATUS_NOT_SERVING = 2,
|
|
26
|
+
UNRECOGNIZED = -1,
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function healthCheckResponse_ServingStatusFromJSON(object: any): HealthCheckResponse_ServingStatus {
|
|
30
|
+
switch (object) {
|
|
31
|
+
case 0:
|
|
32
|
+
case "SERVING_STATUS_UNSPECIFIED":
|
|
33
|
+
return HealthCheckResponse_ServingStatus.SERVING_STATUS_UNSPECIFIED;
|
|
34
|
+
case 1:
|
|
35
|
+
case "SERVING_STATUS_SERVING":
|
|
36
|
+
return HealthCheckResponse_ServingStatus.SERVING_STATUS_SERVING;
|
|
37
|
+
case 2:
|
|
38
|
+
case "SERVING_STATUS_NOT_SERVING":
|
|
39
|
+
return HealthCheckResponse_ServingStatus.SERVING_STATUS_NOT_SERVING;
|
|
40
|
+
case -1:
|
|
41
|
+
case "UNRECOGNIZED":
|
|
42
|
+
default:
|
|
43
|
+
return HealthCheckResponse_ServingStatus.UNRECOGNIZED;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function healthCheckResponse_ServingStatusToJSON(object: HealthCheckResponse_ServingStatus): string {
|
|
48
|
+
switch (object) {
|
|
49
|
+
case HealthCheckResponse_ServingStatus.SERVING_STATUS_UNSPECIFIED:
|
|
50
|
+
return "SERVING_STATUS_UNSPECIFIED";
|
|
51
|
+
case HealthCheckResponse_ServingStatus.SERVING_STATUS_SERVING:
|
|
52
|
+
return "SERVING_STATUS_SERVING";
|
|
53
|
+
case HealthCheckResponse_ServingStatus.SERVING_STATUS_NOT_SERVING:
|
|
54
|
+
return "SERVING_STATUS_NOT_SERVING";
|
|
55
|
+
case HealthCheckResponse_ServingStatus.UNRECOGNIZED:
|
|
56
|
+
default:
|
|
57
|
+
return "UNRECOGNIZED";
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function createBaseHealthCheckRequest(): HealthCheckRequest {
|
|
62
|
+
return { service: undefined };
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export const HealthCheckRequest = {
|
|
66
|
+
encode(message: HealthCheckRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
67
|
+
if (message.service !== undefined) {
|
|
68
|
+
writer.uint32(10).string(message.service);
|
|
69
|
+
}
|
|
70
|
+
return writer;
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): HealthCheckRequest {
|
|
74
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
75
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
76
|
+
const message = createBaseHealthCheckRequest();
|
|
77
|
+
while (reader.pos < end) {
|
|
78
|
+
const tag = reader.uint32();
|
|
79
|
+
switch (tag >>> 3) {
|
|
80
|
+
case 1:
|
|
81
|
+
if (tag !== 10) {
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
message.service = reader.string();
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
reader.skipType(tag & 7);
|
|
92
|
+
}
|
|
93
|
+
return message;
|
|
94
|
+
},
|
|
95
|
+
|
|
96
|
+
fromJSON(object: any): HealthCheckRequest {
|
|
97
|
+
return { service: isSet(object.service) ? String(object.service) : undefined };
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
toJSON(message: HealthCheckRequest): unknown {
|
|
101
|
+
const obj: any = {};
|
|
102
|
+
if (message.service !== undefined) {
|
|
103
|
+
obj.service = message.service;
|
|
104
|
+
}
|
|
105
|
+
return obj;
|
|
106
|
+
},
|
|
107
|
+
|
|
108
|
+
create<I extends Exact<DeepPartial<HealthCheckRequest>, I>>(base?: I): HealthCheckRequest {
|
|
109
|
+
return HealthCheckRequest.fromPartial(base ?? ({} as any));
|
|
110
|
+
},
|
|
111
|
+
fromPartial<I extends Exact<DeepPartial<HealthCheckRequest>, I>>(object: I): HealthCheckRequest {
|
|
112
|
+
const message = createBaseHealthCheckRequest();
|
|
113
|
+
message.service = object.service ?? undefined;
|
|
114
|
+
return message;
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
function createBaseHealthCheckResponse(): HealthCheckResponse {
|
|
119
|
+
return { status: 0 };
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export const HealthCheckResponse = {
|
|
123
|
+
encode(message: HealthCheckResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
124
|
+
if (message.status !== 0) {
|
|
125
|
+
writer.uint32(8).int32(message.status);
|
|
126
|
+
}
|
|
127
|
+
return writer;
|
|
128
|
+
},
|
|
129
|
+
|
|
130
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): HealthCheckResponse {
|
|
131
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
132
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
133
|
+
const message = createBaseHealthCheckResponse();
|
|
134
|
+
while (reader.pos < end) {
|
|
135
|
+
const tag = reader.uint32();
|
|
136
|
+
switch (tag >>> 3) {
|
|
137
|
+
case 1:
|
|
138
|
+
if (tag !== 8) {
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
message.status = reader.int32() as any;
|
|
143
|
+
continue;
|
|
144
|
+
}
|
|
145
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
146
|
+
break;
|
|
147
|
+
}
|
|
148
|
+
reader.skipType(tag & 7);
|
|
149
|
+
}
|
|
150
|
+
return message;
|
|
151
|
+
},
|
|
152
|
+
|
|
153
|
+
fromJSON(object: any): HealthCheckResponse {
|
|
154
|
+
return { status: isSet(object.status) ? healthCheckResponse_ServingStatusFromJSON(object.status) : 0 };
|
|
155
|
+
},
|
|
156
|
+
|
|
157
|
+
toJSON(message: HealthCheckResponse): unknown {
|
|
158
|
+
const obj: any = {};
|
|
159
|
+
if (message.status !== 0) {
|
|
160
|
+
obj.status = healthCheckResponse_ServingStatusToJSON(message.status);
|
|
161
|
+
}
|
|
162
|
+
return obj;
|
|
163
|
+
},
|
|
164
|
+
|
|
165
|
+
create<I extends Exact<DeepPartial<HealthCheckResponse>, I>>(base?: I): HealthCheckResponse {
|
|
166
|
+
return HealthCheckResponse.fromPartial(base ?? ({} as any));
|
|
167
|
+
},
|
|
168
|
+
fromPartial<I extends Exact<DeepPartial<HealthCheckResponse>, I>>(object: I): HealthCheckResponse {
|
|
169
|
+
const message = createBaseHealthCheckResponse();
|
|
170
|
+
message.status = object.status ?? 0;
|
|
171
|
+
return message;
|
|
172
|
+
},
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
176
|
+
|
|
177
|
+
export type DeepPartial<T> = T extends Builtin ? T
|
|
178
|
+
: T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
179
|
+
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
180
|
+
: Partial<T>;
|
|
181
|
+
|
|
182
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
183
|
+
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
184
|
+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
185
|
+
|
|
186
|
+
function isSet(value: any): boolean {
|
|
187
|
+
return value !== null && value !== undefined;
|
|
188
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
|
|
3
|
+
export const protobufPackage = "common.task.v1alpha";
|
|
4
|
+
|
|
5
|
+
/** Task enumerates the AI task type */
|
|
6
|
+
export enum Task {
|
|
7
|
+
/** TASK_UNSPECIFIED - Task: UNSPECIFIED */
|
|
8
|
+
TASK_UNSPECIFIED = 0,
|
|
9
|
+
/** TASK_CLASSIFICATION - Task: CLASSIFICATION */
|
|
10
|
+
TASK_CLASSIFICATION = 1,
|
|
11
|
+
/** TASK_DETECTION - Task: DETECTION */
|
|
12
|
+
TASK_DETECTION = 2,
|
|
13
|
+
/** TASK_KEYPOINT - Task: KEYPOINT */
|
|
14
|
+
TASK_KEYPOINT = 3,
|
|
15
|
+
/** TASK_OCR - Task: OCR */
|
|
16
|
+
TASK_OCR = 4,
|
|
17
|
+
/** TASK_INSTANCE_SEGMENTATION - Task: INSTANCE SEGMENTATION */
|
|
18
|
+
TASK_INSTANCE_SEGMENTATION = 5,
|
|
19
|
+
/** TASK_SEMANTIC_SEGMENTATION - Task: SEMANTIC SEGMENTATION */
|
|
20
|
+
TASK_SEMANTIC_SEGMENTATION = 6,
|
|
21
|
+
/** TASK_TEXT_TO_IMAGE - Task: TEXT TO IMAGE */
|
|
22
|
+
TASK_TEXT_TO_IMAGE = 7,
|
|
23
|
+
/** TASK_TEXT_GENERATION - Task: TEXT GENERATION */
|
|
24
|
+
TASK_TEXT_GENERATION = 8,
|
|
25
|
+
/** TASK_IMAGE_TO_IMAGE - Task: IMAGE TO IMAGE */
|
|
26
|
+
TASK_IMAGE_TO_IMAGE = 9,
|
|
27
|
+
/** TASK_TEXT_EMBEDDINGS - Task: TEXT EMBEDDINGS */
|
|
28
|
+
TASK_TEXT_EMBEDDINGS = 10,
|
|
29
|
+
/** TASK_SPEECH_RECOGNITION - Task: SPEECH RECOGNITION */
|
|
30
|
+
TASK_SPEECH_RECOGNITION = 11,
|
|
31
|
+
UNRECOGNIZED = -1,
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function taskFromJSON(object: any): Task {
|
|
35
|
+
switch (object) {
|
|
36
|
+
case 0:
|
|
37
|
+
case "TASK_UNSPECIFIED":
|
|
38
|
+
return Task.TASK_UNSPECIFIED;
|
|
39
|
+
case 1:
|
|
40
|
+
case "TASK_CLASSIFICATION":
|
|
41
|
+
return Task.TASK_CLASSIFICATION;
|
|
42
|
+
case 2:
|
|
43
|
+
case "TASK_DETECTION":
|
|
44
|
+
return Task.TASK_DETECTION;
|
|
45
|
+
case 3:
|
|
46
|
+
case "TASK_KEYPOINT":
|
|
47
|
+
return Task.TASK_KEYPOINT;
|
|
48
|
+
case 4:
|
|
49
|
+
case "TASK_OCR":
|
|
50
|
+
return Task.TASK_OCR;
|
|
51
|
+
case 5:
|
|
52
|
+
case "TASK_INSTANCE_SEGMENTATION":
|
|
53
|
+
return Task.TASK_INSTANCE_SEGMENTATION;
|
|
54
|
+
case 6:
|
|
55
|
+
case "TASK_SEMANTIC_SEGMENTATION":
|
|
56
|
+
return Task.TASK_SEMANTIC_SEGMENTATION;
|
|
57
|
+
case 7:
|
|
58
|
+
case "TASK_TEXT_TO_IMAGE":
|
|
59
|
+
return Task.TASK_TEXT_TO_IMAGE;
|
|
60
|
+
case 8:
|
|
61
|
+
case "TASK_TEXT_GENERATION":
|
|
62
|
+
return Task.TASK_TEXT_GENERATION;
|
|
63
|
+
case 9:
|
|
64
|
+
case "TASK_IMAGE_TO_IMAGE":
|
|
65
|
+
return Task.TASK_IMAGE_TO_IMAGE;
|
|
66
|
+
case 10:
|
|
67
|
+
case "TASK_TEXT_EMBEDDINGS":
|
|
68
|
+
return Task.TASK_TEXT_EMBEDDINGS;
|
|
69
|
+
case 11:
|
|
70
|
+
case "TASK_SPEECH_RECOGNITION":
|
|
71
|
+
return Task.TASK_SPEECH_RECOGNITION;
|
|
72
|
+
case -1:
|
|
73
|
+
case "UNRECOGNIZED":
|
|
74
|
+
default:
|
|
75
|
+
return Task.UNRECOGNIZED;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function taskToJSON(object: Task): string {
|
|
80
|
+
switch (object) {
|
|
81
|
+
case Task.TASK_UNSPECIFIED:
|
|
82
|
+
return "TASK_UNSPECIFIED";
|
|
83
|
+
case Task.TASK_CLASSIFICATION:
|
|
84
|
+
return "TASK_CLASSIFICATION";
|
|
85
|
+
case Task.TASK_DETECTION:
|
|
86
|
+
return "TASK_DETECTION";
|
|
87
|
+
case Task.TASK_KEYPOINT:
|
|
88
|
+
return "TASK_KEYPOINT";
|
|
89
|
+
case Task.TASK_OCR:
|
|
90
|
+
return "TASK_OCR";
|
|
91
|
+
case Task.TASK_INSTANCE_SEGMENTATION:
|
|
92
|
+
return "TASK_INSTANCE_SEGMENTATION";
|
|
93
|
+
case Task.TASK_SEMANTIC_SEGMENTATION:
|
|
94
|
+
return "TASK_SEMANTIC_SEGMENTATION";
|
|
95
|
+
case Task.TASK_TEXT_TO_IMAGE:
|
|
96
|
+
return "TASK_TEXT_TO_IMAGE";
|
|
97
|
+
case Task.TASK_TEXT_GENERATION:
|
|
98
|
+
return "TASK_TEXT_GENERATION";
|
|
99
|
+
case Task.TASK_IMAGE_TO_IMAGE:
|
|
100
|
+
return "TASK_IMAGE_TO_IMAGE";
|
|
101
|
+
case Task.TASK_TEXT_EMBEDDINGS:
|
|
102
|
+
return "TASK_TEXT_EMBEDDINGS";
|
|
103
|
+
case Task.TASK_SPEECH_RECOGNITION:
|
|
104
|
+
return "TASK_SPEECH_RECOGNITION";
|
|
105
|
+
case Task.UNRECOGNIZED:
|
|
106
|
+
default:
|
|
107
|
+
return "UNRECOGNIZED";
|
|
108
|
+
}
|
|
109
|
+
}
|