Skip to content
This repository has been archived by the owner on Nov 14, 2019. It is now read-only.

Remove core api #141

Merged
merged 1 commit into from
Sep 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion copy-proto
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,3 @@ do
npx pbts --path ./src -o "./src/api/typedef/$ressource.d.ts" --name mesg "./src/api/typedef/$ressource.js"
rm "./src/api/typedef/$ressource.js"
done
curl -so "./src/protobuf/api/core.proto" "$PROTO_PATH/coreapi/api.proto"
5 changes: 0 additions & 5 deletions src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
InstanceCreateInputs, InstanceGetInputs, InstanceListInputs, InstanceDeleteInputs, InstanceCreateOutputs, InstanceGetOutputs, InstanceListOutputs, InstanceDeleteOutputs,
ServiceCreateInputs, ServiceGetInputs, ServiceListInputs, ServiceDeleteInputs, ServiceCreateOutputs, ServiceGetOutputs, ServiceListOutputs, ServiceDeleteOutputs,
ProcessCreateInputs, ProcessGetInputs, ProcessListInputs, ProcessDeleteInputs, ProcessCreateOutputs, ProcessGetOutputs, ProcessListOutputs, ProcessDeleteOutputs,
InfoOutputs,
Credential
} from './types'

Expand All @@ -28,7 +27,6 @@ export default (endpoint: string): API => {
const instance = createClient('Instance', 'protobuf/api/instance.proto', endpoint)
const service = createClient('Service', 'protobuf/api/service.proto', endpoint)
const process = createClient('Process', 'protobuf/api/process.proto', endpoint)
const core = createClient('Core', 'protobuf/api/core.proto', endpoint)
return {
account: {
get: promisify(account, 'Get') as (request: AccountGetInputs, credential?: Credential) => AccountGetOutputs,
Expand Down Expand Up @@ -63,9 +61,6 @@ export default (endpoint: string): API => {
get: promisify(process, 'Get') as (request: ProcessGetInputs, credential?: Credential) => ProcessGetOutputs,
list: promisify(process, 'List') as (request: ProcessListInputs, credential?: Credential) => ProcessListOutputs,
delete: promisify(process, 'Delete') as (request: ProcessDeleteInputs, credential?: Credential) => ProcessDeleteOutputs
},
core: {
info: promisify(core, 'Info') as () => InfoOutputs
}
}
}
Expand Down
3 changes: 0 additions & 3 deletions src/api/mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ export default (endpoint: string): API => ({
get() { return Promise.resolve({ }) },
list() { return Promise.resolve({ processes: [] }) },
delete() { return Promise.resolve({}) },
},
core: {
info() { return Promise.resolve({ version: '0', services: [] }) }
}
})

Expand Down
5 changes: 0 additions & 5 deletions src/api/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ export type ProcessCreateOutputs = Promise<ProcessType.mesg.api.ICreateProcessRe
export type ProcessDeleteInputs = ProcessType.mesg.api.IDeleteProcessRequest
export type ProcessDeleteOutputs = Promise<ProcessType.mesg.api.IDeleteProcessResponse>

export type InfoOutputs = Promise<{ version: string, services: { sid: string, hash: hash, url: string, key: string }[] }>

export type API = {
account: {
get: (request: AccountGetInputs, credential?: Credential) => AccountGetOutputs
Expand Down Expand Up @@ -135,8 +133,5 @@ export type API = {
list: (request: ProcessListInputs, credential?: Credential) => ProcessListOutputs
create: (request: ProcessCreateInputs, credential?: Credential) => ProcessCreateOutputs
delete: (request: ProcessDeleteInputs, credential?: Credential) => ProcessDeleteOutputs
},
core: {
info: () => InfoOutputs
}
}
33 changes: 0 additions & 33 deletions src/protobuf/api/core.proto

This file was deleted.