From e55d7b98f85b12c428d3672ae248dfa267a9c4ff Mon Sep 17 00:00:00 2001 From: Luka Svalina Date: Mon, 6 Feb 2023 15:03:38 +0100 Subject: [PATCH] Improvement | WOLF-123 | Mdctl missing reference --- packages/mdctl-api/index.d.ts | 40 +++++++++++++++++ packages/mdctl-api/package.json | 1 + packages/mdctl-axon-tools/index.d.ts | 13 ++++++ packages/mdctl-axon-tools/package.json | 1 + packages/mdctl-core-utils/index.d.ts | 1 + packages/mdctl-core-utils/package.json | 1 + packages/mdctl-core-utils/values.d.ts | 5 +++ packages/mdctl-core/index.d.ts | 44 +++++++++++++++++++ packages/mdctl-core/package.json | 1 + packages/mdctl-export-adapter-tree/index.d.ts | 4 ++ .../mdctl-export-adapter-tree/package.json | 1 + 11 files changed, 112 insertions(+) create mode 100644 packages/mdctl-api/index.d.ts create mode 100644 packages/mdctl-axon-tools/index.d.ts create mode 100644 packages/mdctl-core-utils/index.d.ts create mode 100644 packages/mdctl-core-utils/values.d.ts create mode 100644 packages/mdctl-core/index.d.ts create mode 100644 packages/mdctl-export-adapter-tree/index.d.ts diff --git a/packages/mdctl-api/index.d.ts b/packages/mdctl-api/index.d.ts new file mode 100644 index 00000000..adc4e50d --- /dev/null +++ b/packages/mdctl-api/index.d.ts @@ -0,0 +1,40 @@ +export class Environment { + + constructor(input: string) + url: string + +} + +export class Client { + + environment: Environment + + constructor(params: { + environment: + | { + endpoint: string + env: string + } + | string + credentials: { + type?: string + token?: string + apiKey?: string + } + sessions: boolean + requestOptions: { + strictSSL: boolean + } + }) + + put(url: string, params: P): Promise + delete(url: string): Promise + post( + url: string, + params: P, + param?: P2 + ): Promise + + get(url: string, params?: P): Promise + +} diff --git a/packages/mdctl-api/package.json b/packages/mdctl-api/package.json index 9f34c7b0..41531a4b 100644 --- a/packages/mdctl-api/package.json +++ b/packages/mdctl-api/package.json @@ -2,6 +2,7 @@ "name": "@medable/mdctl-api", "version": "1.0.68", "description": "Medable Developer Client Tools :: API", + "types": "index.d.ts", "repository": { "type": "git", "url": "git+https://github.com/Medable/mdctl.git" diff --git a/packages/mdctl-axon-tools/index.d.ts b/packages/mdctl-axon-tools/index.d.ts new file mode 100644 index 00000000..477ef7c0 --- /dev/null +++ b/packages/mdctl-axon-tools/index.d.ts @@ -0,0 +1,13 @@ +import { Client } from '../mdctl-api' + +export class StudyManifestTools { + + constructor(client: Client, options: Object) + getStudyManifest(manifest?: string): Promise<{ + manifest: unknown + removedEntities: unknown + mappingScript: unknown + ingestTransform: string + }> + +} \ No newline at end of file diff --git a/packages/mdctl-axon-tools/package.json b/packages/mdctl-axon-tools/package.json index b5ad9d52..eef307c6 100644 --- a/packages/mdctl-axon-tools/package.json +++ b/packages/mdctl-axon-tools/package.json @@ -2,6 +2,7 @@ "name": "@medable/mdctl-axon-tools", "version": "1.0.68", "description": "Medable Axon Tools :: Tools For interaction with Axon orgs", + "types": "index.d.ts", "repository": { "type": "git", "url": "git+https://github.com/Medable/mdctl.git" diff --git a/packages/mdctl-core-utils/index.d.ts b/packages/mdctl-core-utils/index.d.ts new file mode 100644 index 00000000..d11d5b52 --- /dev/null +++ b/packages/mdctl-core-utils/index.d.ts @@ -0,0 +1 @@ +export * from './values' diff --git a/packages/mdctl-core-utils/package.json b/packages/mdctl-core-utils/package.json index b1c08806..7246e0dc 100644 --- a/packages/mdctl-core-utils/package.json +++ b/packages/mdctl-core-utils/package.json @@ -2,6 +2,7 @@ "name": "@medable/mdctl-core-utils", "version": "1.0.68", "description": "Medable Developer Client Tools :: Utils", + "types": "index.d.ts", "repository": { "type": "git", "url": "git+https://github.com/Medable/mdctl.git" diff --git a/packages/mdctl-core-utils/values.d.ts b/packages/mdctl-core-utils/values.d.ts new file mode 100644 index 00000000..0a5168a0 --- /dev/null +++ b/packages/mdctl-core-utils/values.d.ts @@ -0,0 +1,5 @@ +export function pathTo( + object: object, + propertyPath: string, + value: unknown +): object diff --git a/packages/mdctl-core/index.d.ts b/packages/mdctl-core/index.d.ts new file mode 100644 index 00000000..38d2a745 --- /dev/null +++ b/packages/mdctl-core/index.d.ts @@ -0,0 +1,44 @@ +export class Config { + + constructor() + static get global(): Config + get credentials(): unknown + get client(): { + environment: + | { + endpoint: string + env: string + } + | string + credentials: { + type: string + token: string + } + sessions: boolean + requestOptions: { + strictSSL: boolean + } + } + + get environment(): unknown + +} + +export class Fault extends Error { + + errCode: string + code: string + statusCode: number + name: string + reason: unknown + path: string + resource: string + trace: unknown + index: unknown + message: string + + static from(err: unknown, forceError?: boolean): Fault | null + + static create(code: string, message: string, statusCode: number): Fault + +} diff --git a/packages/mdctl-core/package.json b/packages/mdctl-core/package.json index 0128b2f7..034a6720 100644 --- a/packages/mdctl-core/package.json +++ b/packages/mdctl-core/package.json @@ -2,6 +2,7 @@ "name": "@medable/mdctl-core", "version": "1.0.68", "description": "Medable Developer Client Tools :: Core", + "types": "index.d.ts", "repository": { "type": "git", "url": "git+https://github.com/Medable/mdctl.git" diff --git a/packages/mdctl-export-adapter-tree/index.d.ts b/packages/mdctl-export-adapter-tree/index.d.ts new file mode 100644 index 00000000..672f9a24 --- /dev/null +++ b/packages/mdctl-export-adapter-tree/index.d.ts @@ -0,0 +1,4 @@ + +declare class ExportFileTreeAdapter {} + +export = ExportFileTreeAdapter diff --git a/packages/mdctl-export-adapter-tree/package.json b/packages/mdctl-export-adapter-tree/package.json index 1c115491..ba14163d 100644 --- a/packages/mdctl-export-adapter-tree/package.json +++ b/packages/mdctl-export-adapter-tree/package.json @@ -2,6 +2,7 @@ "name": "@medable/mdctl-export-adapter-tree", "version": "1.0.68", "description": "Medable Developer Client Tools :: Export Tree Adapter", + "types": "index.d.ts", "repository": { "type": "git", "url": "git+https://github.com/Medable/mdctl.git"