@nyrra/prismantix-cli 0.0.1 → 0.0.2-next.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 +20 -28
- package/bin/dev.js +1 -3
- package/bin/run.js +1 -3
- package/dist/api.d.ts +201 -173
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +237 -110
- package/dist/command-support.d.ts +13 -0
- package/dist/command-support.d.ts.map +1 -0
- package/dist/command-support.js +40 -0
- package/dist/commands/object/details.d.ts +13 -0
- package/dist/commands/object/details.d.ts.map +1 -0
- package/dist/commands/object/details.js +28 -0
- package/dist/commands/object/list.d.ts +13 -0
- package/dist/commands/object/list.d.ts.map +1 -0
- package/dist/commands/object/list.js +27 -0
- package/dist/commands/ontology/list.d.ts +10 -0
- package/dist/commands/ontology/list.d.ts.map +1 -0
- package/dist/commands/ontology/list.js +25 -0
- package/dist/commands/records/cancel.d.ts +13 -0
- package/dist/commands/records/cancel.d.ts.map +1 -0
- package/dist/commands/records/cancel.js +21 -0
- package/dist/commands/records/generate.d.ts +15 -0
- package/dist/commands/records/generate.d.ts.map +1 -0
- package/dist/commands/records/generate.js +56 -0
- package/dist/commands/{download.d.ts → records/pull.d.ts} +5 -11
- package/dist/commands/records/pull.d.ts.map +1 -0
- package/dist/commands/records/pull.js +59 -0
- package/dist/commands/records/status.d.ts +13 -0
- package/dist/commands/records/status.d.ts.map +1 -0
- package/dist/commands/records/status.js +22 -0
- package/dist/constants.d.ts +2 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +2 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +39 -0
- package/dist/generation.d.ts +13 -0
- package/dist/generation.d.ts.map +1 -0
- package/dist/generation.js +77 -0
- package/dist/io.d.ts.map +1 -1
- package/dist/io.js +1 -1
- package/dist/runtime.d.ts +3 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +10 -0
- package/dist/workflow.d.ts +3 -14
- package/dist/workflow.d.ts.map +1 -1
- package/dist/workflow.js +85 -61
- package/oclif.manifest.json +266 -40
- package/package.json +74 -74
- package/dist/commands/download.d.ts.map +0 -1
- package/dist/commands/download.js +0 -136
- package/dist/commands/guided.d.ts +0 -7
- package/dist/commands/guided.d.ts.map +0 -1
- package/dist/commands/guided.js +0 -15
- package/dist/ui/guided-flow.d.ts +0 -20
- package/dist/ui/guided-flow.d.ts.map +0 -1
- package/dist/ui/guided-flow.js +0 -156
package/README.md
CHANGED
|
@@ -1,42 +1,34 @@
|
|
|
1
1
|
# @nyrra/prismantix-cli
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
|
|
7
|
-
Run the guided export flow:
|
|
3
|
+
The public PrismantiX ontology catalog and client-record CLI. The package installs one executable: `prismantix`.
|
|
8
4
|
|
|
9
5
|
```sh
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
The guided flow reads `PRISMANTIX_API_KEY` when it is set. If it is missing, the CLI prompts for the key with masked input. The default API base is `https://api.prismantix.com`.
|
|
6
|
+
npm install --global @nyrra/prismantix-cli
|
|
7
|
+
export PRISMANTIX_API_KEY="sk_..."
|
|
14
8
|
|
|
15
|
-
|
|
9
|
+
prismantix ontology list
|
|
10
|
+
prismantix object list healthcare
|
|
11
|
+
prismantix object details deviations
|
|
12
|
+
prismantix records pull --client NVO
|
|
13
|
+
prismantix records generate --client NVO --ontology pharma
|
|
14
|
+
prismantix records status <operation-id>
|
|
15
|
+
prismantix records cancel <operation-id>
|
|
16
|
+
```
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
Every command supports `--json`. JSON mode reserves stdout for one result; progress and diagnostics go to stderr. `--api-base` overrides `PRISMANTIX_API_BASE`, whose default is `https://api.prismantix.com`.
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
export PRISMANTIX_API_KEY="sk_..."
|
|
21
|
-
npx -y @nyrra/prismantix-cli download --client LLY --yes --json
|
|
22
|
-
```
|
|
20
|
+
`records generate` waits for completion by default with a 30-minute timeout. Use `--no-wait`, `--timeout`, and `--poll-interval` for operational control. A completed operation exits 0. A failed operation or an operation canceled while this command is waiting exits 1 with a typed error; an explicitly acknowledged `records cancel` request exits 0.
|
|
23
21
|
|
|
24
|
-
|
|
22
|
+
`records pull` creates and waits for a CSV-bundle export, then writes `manifest.json` and its files under `./prismantix-exports/<canonical-client-id>/<export-id>/`. Use `--output`, repeatable `--table`, `--timeout`, and `--poll-interval` when needed.
|
|
25
23
|
|
|
26
|
-
|
|
27
|
-
export PRISMANTIX_API_KEY="sk_..."
|
|
28
|
-
npx -y @nyrra/prismantix-cli download --export-id <export-id> --json
|
|
29
|
-
```
|
|
24
|
+
## Restricted Foundry plugin
|
|
30
25
|
|
|
31
|
-
|
|
26
|
+
Foundry import is intentionally not bundled with the anonymous public CLI. Authorized Shpitdev operators install the restricted plugin explicitly:
|
|
32
27
|
|
|
33
28
|
```sh
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
--yes \
|
|
38
|
-
--output ./prismantix-exports \
|
|
39
|
-
--json
|
|
29
|
+
npm login --scope=@shpitdev --registry=https://registry.npmjs.org
|
|
30
|
+
prismantix plugins install @shpitdev/foundry-import
|
|
31
|
+
prismantix foundry import --help
|
|
40
32
|
```
|
|
41
33
|
|
|
42
|
-
|
|
34
|
+
CI must use an npm token scoped to read restricted `@shpitdev` packages. Never commit a populated user `.npmrc`.
|
package/bin/dev.js
CHANGED
package/bin/run.js
CHANGED
package/dist/api.d.ts
CHANGED
|
@@ -1,179 +1,207 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const
|
|
3
|
-
|
|
4
|
-
fileName:
|
|
5
|
-
mimeType:
|
|
6
|
-
rowCount:
|
|
7
|
-
sha256:
|
|
8
|
-
sizeBytes:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
1
|
+
import { ConfigProvider, Context, Effect, Layer, Schema } from "effect";
|
|
2
|
+
declare const ManifestFileSchema: Schema.Struct<{
|
|
3
|
+
readonly columns: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
4
|
+
readonly fileName: Schema.String;
|
|
5
|
+
readonly mimeType: Schema.optionalKey<Schema.String>;
|
|
6
|
+
readonly rowCount: Schema.optionalKey<Schema.Number>;
|
|
7
|
+
readonly sha256: Schema.optionalKey<Schema.String>;
|
|
8
|
+
readonly sizeBytes: Schema.optionalKey<Schema.Number>;
|
|
9
|
+
readonly storageKey: Schema.optionalKey<Schema.String>;
|
|
10
|
+
readonly tableName: Schema.String;
|
|
11
|
+
}>;
|
|
12
|
+
export interface ExportManifestFile extends Schema.Schema.Type<typeof ManifestFileSchema> {
|
|
13
|
+
readonly downloadUrl?: string | null;
|
|
14
|
+
}
|
|
15
|
+
declare const ExportManifestSchema: Schema.Struct<{
|
|
16
|
+
readonly clientId: Schema.String;
|
|
17
|
+
readonly completedAt: Schema.optionalKey<Schema.Number>;
|
|
18
|
+
readonly createdAt: Schema.optionalKey<Schema.Number>;
|
|
19
|
+
readonly exportId: Schema.String;
|
|
20
|
+
readonly files: Schema.$Array<Schema.Struct<{
|
|
21
|
+
readonly columns: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
22
|
+
readonly fileName: Schema.String;
|
|
23
|
+
readonly mimeType: Schema.optionalKey<Schema.String>;
|
|
24
|
+
readonly rowCount: Schema.optionalKey<Schema.Number>;
|
|
25
|
+
readonly sha256: Schema.optionalKey<Schema.String>;
|
|
26
|
+
readonly sizeBytes: Schema.optionalKey<Schema.Number>;
|
|
27
|
+
readonly storageKey: Schema.optionalKey<Schema.String>;
|
|
28
|
+
readonly tableName: Schema.String;
|
|
29
|
+
}>>;
|
|
30
|
+
readonly output: Schema.Union<readonly [Schema.Struct<{
|
|
31
|
+
readonly kind: Schema.Literal<"csv_bundle">;
|
|
32
|
+
}>, Schema.Struct<{
|
|
33
|
+
readonly kind: Schema.Literal<"sqlite_seed_script">;
|
|
34
|
+
}>]>;
|
|
35
|
+
readonly schemaVersion: Schema.optionalKey<Schema.String>;
|
|
36
|
+
readonly totalRows: Schema.Number;
|
|
37
|
+
}>;
|
|
38
|
+
export interface ExportManifest extends Schema.Schema.Type<typeof ExportManifestSchema> {
|
|
39
|
+
}
|
|
40
|
+
declare const ExportStatusSchema: Schema.Struct<{
|
|
41
|
+
readonly clientId: Schema.String;
|
|
42
|
+
readonly completedAt: Schema.optionalKey<Schema.Number>;
|
|
43
|
+
readonly createdAt: Schema.optionalKey<Schema.Number>;
|
|
44
|
+
readonly errorMessage: Schema.optionalKey<Schema.String>;
|
|
45
|
+
readonly exportId: Schema.String;
|
|
46
|
+
readonly failedAt: Schema.optionalKey<Schema.Number>;
|
|
47
|
+
readonly files: Schema.$Array<Schema.Struct<{
|
|
48
|
+
readonly downloadUrl: Schema.NullOr<Schema.String>;
|
|
49
|
+
readonly fileName: Schema.String;
|
|
50
|
+
readonly mimeType: Schema.optionalKey<Schema.String>;
|
|
51
|
+
readonly rowCount: Schema.optionalKey<Schema.Number>;
|
|
52
|
+
readonly sha256: Schema.optionalKey<Schema.String>;
|
|
53
|
+
readonly sizeBytes: Schema.optionalKey<Schema.Number>;
|
|
54
|
+
readonly tableName: Schema.String;
|
|
55
|
+
}>>;
|
|
56
|
+
readonly manifestUrl: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
57
|
+
readonly output: Schema.Union<readonly [Schema.Struct<{
|
|
58
|
+
readonly kind: Schema.Literal<"csv_bundle">;
|
|
59
|
+
}>, Schema.Struct<{
|
|
60
|
+
readonly kind: Schema.Literal<"sqlite_seed_script">;
|
|
61
|
+
}>]>;
|
|
62
|
+
readonly startedAt: Schema.optionalKey<Schema.Number>;
|
|
63
|
+
readonly status: Schema.Literals<readonly ["completed", "failed", "queued", "running"]>;
|
|
64
|
+
readonly totalFiles: Schema.optionalKey<Schema.Number>;
|
|
65
|
+
readonly totalRows: Schema.optionalKey<Schema.Number>;
|
|
66
|
+
}>;
|
|
67
|
+
export interface ExportStatus extends Schema.Schema.Type<typeof ExportStatusSchema> {
|
|
68
|
+
}
|
|
69
|
+
declare const ExportCreatedSchema: Schema.Struct<{
|
|
70
|
+
readonly clientId: Schema.String;
|
|
71
|
+
readonly exportId: Schema.String;
|
|
72
|
+
readonly status: Schema.Literal<"queued">;
|
|
73
|
+
}>;
|
|
74
|
+
interface ExportCreated extends Schema.Schema.Type<typeof ExportCreatedSchema> {
|
|
75
|
+
}
|
|
76
|
+
declare const OntologySummarySchema: Schema.Struct<{
|
|
77
|
+
readonly description: Schema.String;
|
|
78
|
+
readonly displayName: Schema.String;
|
|
79
|
+
readonly id: Schema.String;
|
|
80
|
+
readonly objectCount: Schema.Number;
|
|
81
|
+
}>;
|
|
82
|
+
interface OntologySummary extends Schema.Schema.Type<typeof OntologySummarySchema> {
|
|
83
|
+
}
|
|
84
|
+
declare const OntologyObjectSummarySchema: Schema.Struct<{
|
|
85
|
+
readonly defaultRecordCount: Schema.NullOr<Schema.Number>;
|
|
86
|
+
readonly description: Schema.String;
|
|
87
|
+
readonly displayName: Schema.String;
|
|
88
|
+
readonly generationEligible: Schema.Boolean;
|
|
89
|
+
readonly owningOntologyId: Schema.String;
|
|
90
|
+
readonly pluralDisplayName: Schema.String;
|
|
91
|
+
readonly slug: Schema.String;
|
|
92
|
+
}>;
|
|
93
|
+
interface OntologyObjectSummary extends Schema.Schema.Type<typeof OntologyObjectSummarySchema> {
|
|
94
|
+
}
|
|
95
|
+
declare const OntologyObjectDetailSchema: Schema.Struct<{
|
|
96
|
+
readonly fields: Schema.$Array<Schema.Struct<{
|
|
97
|
+
readonly array: Schema.Boolean;
|
|
98
|
+
readonly description: Schema.String;
|
|
99
|
+
readonly displayName: Schema.String;
|
|
100
|
+
readonly enumValues: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
101
|
+
readonly name: Schema.String;
|
|
102
|
+
readonly nullable: Schema.Boolean;
|
|
103
|
+
readonly optional: Schema.Boolean;
|
|
104
|
+
readonly type: Schema.String;
|
|
105
|
+
}>>;
|
|
106
|
+
readonly generationDependencies: Schema.$Array<Schema.String>;
|
|
107
|
+
readonly guidance: Schema.$Array<Schema.String>;
|
|
108
|
+
readonly primaryKeyField: Schema.String;
|
|
109
|
+
readonly relationships: Schema.$Array<Schema.Struct<{
|
|
110
|
+
readonly field: Schema.String;
|
|
111
|
+
readonly many: Schema.Boolean;
|
|
112
|
+
readonly targetObjectSlug: Schema.String;
|
|
113
|
+
}>>;
|
|
114
|
+
readonly defaultRecordCount: Schema.NullOr<Schema.Number>;
|
|
115
|
+
readonly description: Schema.String;
|
|
116
|
+
readonly displayName: Schema.String;
|
|
117
|
+
readonly generationEligible: Schema.Boolean;
|
|
118
|
+
readonly owningOntologyId: Schema.String;
|
|
119
|
+
readonly pluralDisplayName: Schema.String;
|
|
120
|
+
readonly slug: Schema.String;
|
|
121
|
+
}>;
|
|
122
|
+
interface OntologyObjectDetail extends Schema.Schema.Type<typeof OntologyObjectDetailSchema> {
|
|
123
|
+
}
|
|
124
|
+
declare const RecordGenerationCreatedSchema: Schema.Struct<{
|
|
125
|
+
readonly clientId: Schema.String;
|
|
126
|
+
readonly createdAt: Schema.Number;
|
|
127
|
+
readonly ontologyId: Schema.String;
|
|
128
|
+
readonly operationId: Schema.String;
|
|
129
|
+
readonly status: Schema.Literal<"queued">;
|
|
130
|
+
readonly statusUrl: Schema.String;
|
|
131
|
+
}>;
|
|
132
|
+
export interface RecordGenerationCreated extends Schema.Schema.Type<typeof RecordGenerationCreatedSchema> {
|
|
133
|
+
}
|
|
134
|
+
declare const RecordGenerationStatusSchema: Schema.Struct<{
|
|
135
|
+
readonly canceledAt: Schema.optionalKey<Schema.Number>;
|
|
136
|
+
readonly clientId: Schema.String;
|
|
137
|
+
readonly completedAt: Schema.optionalKey<Schema.Number>;
|
|
138
|
+
readonly createdAt: Schema.Number;
|
|
139
|
+
readonly failure: Schema.optionalKey<Schema.Struct<{
|
|
140
|
+
readonly code: Schema.String;
|
|
141
|
+
readonly message: Schema.String;
|
|
142
|
+
}>>;
|
|
143
|
+
readonly ontologyId: Schema.String;
|
|
144
|
+
readonly operationId: Schema.String;
|
|
145
|
+
readonly startedAt: Schema.optionalKey<Schema.Number>;
|
|
146
|
+
readonly status: Schema.Literals<readonly ["queued", "running", "completed", "failed", "canceled"]>;
|
|
147
|
+
readonly steps: Schema.$Array<Schema.Struct<{
|
|
148
|
+
readonly issues: Schema.$Array<Schema.String>;
|
|
149
|
+
readonly objectSlug: Schema.String;
|
|
150
|
+
readonly persistedCount: Schema.Number;
|
|
151
|
+
readonly requestedCount: Schema.Number;
|
|
152
|
+
readonly state: Schema.Literals<readonly ["queued", "running", "completed", "failed", "canceled"]>;
|
|
153
|
+
}>>;
|
|
154
|
+
readonly totals: Schema.Struct<{
|
|
155
|
+
readonly objectCount: Schema.Number;
|
|
156
|
+
readonly persistedCount: Schema.Number;
|
|
157
|
+
readonly requestedCount: Schema.Number;
|
|
41
158
|
}>;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
declare const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
format?: "csv" | undefined;
|
|
84
|
-
medium?: "csv_bundle" | undefined;
|
|
85
|
-
mode?: "current_client_snapshot" | undefined;
|
|
86
|
-
schemaVersion?: string | undefined;
|
|
87
|
-
}, {
|
|
88
|
-
clientId: string;
|
|
89
|
-
exportId: string;
|
|
90
|
-
files: {
|
|
91
|
-
fileName: string;
|
|
92
|
-
tableName: string;
|
|
93
|
-
downloadUrl?: string | null | undefined;
|
|
94
|
-
mimeType?: string | undefined;
|
|
95
|
-
rowCount?: number | undefined;
|
|
96
|
-
sha256?: string | undefined;
|
|
97
|
-
sizeBytes?: number | undefined;
|
|
98
|
-
columns?: string[] | undefined;
|
|
99
|
-
storageKey?: string | undefined;
|
|
100
|
-
}[];
|
|
101
|
-
completedAt?: number | undefined;
|
|
102
|
-
createdAt?: number | undefined;
|
|
103
|
-
format?: "csv" | undefined;
|
|
104
|
-
medium?: "csv_bundle" | undefined;
|
|
105
|
-
mode?: "current_client_snapshot" | undefined;
|
|
106
|
-
schemaVersion?: string | undefined;
|
|
107
|
-
totalRows?: number | undefined;
|
|
108
|
-
}>>;
|
|
109
|
-
export type ExportCreated = z.infer<typeof exportCreatedSchema>;
|
|
110
|
-
export type ExportFile = z.infer<typeof exportFileSchema>;
|
|
111
|
-
export type ExportManifest = z.output<typeof exportManifestSchema>;
|
|
112
|
-
export type ExportManifestFile = ExportManifest["files"][number];
|
|
113
|
-
export type ExportStatus = z.infer<typeof exportStatusSchema>;
|
|
114
|
-
export interface PrismantixApiClientOptions {
|
|
159
|
+
}>;
|
|
160
|
+
export interface RecordGenerationStatus extends Schema.Schema.Type<typeof RecordGenerationStatusSchema> {
|
|
161
|
+
}
|
|
162
|
+
declare const ApiConfigurationError_base: Schema.Class<ApiConfigurationError, Schema.TaggedStruct<"ApiConfigurationError", {
|
|
163
|
+
readonly message: Schema.String;
|
|
164
|
+
}>, import("effect/Cause").YieldableError>;
|
|
165
|
+
export declare class ApiConfigurationError extends ApiConfigurationError_base {
|
|
166
|
+
}
|
|
167
|
+
declare const ApiHttpError_base: Schema.Class<ApiHttpError, Schema.TaggedStruct<"ApiHttpError", {
|
|
168
|
+
readonly message: Schema.String;
|
|
169
|
+
readonly status: Schema.Number;
|
|
170
|
+
}>, import("effect/Cause").YieldableError>;
|
|
171
|
+
export declare class ApiHttpError extends ApiHttpError_base {
|
|
172
|
+
}
|
|
173
|
+
declare const ApiTransportError_base: Schema.Class<ApiTransportError, Schema.TaggedStruct<"ApiTransportError", {
|
|
174
|
+
readonly message: Schema.String;
|
|
175
|
+
}>, import("effect/Cause").YieldableError>;
|
|
176
|
+
export declare class ApiTransportError extends ApiTransportError_base {
|
|
177
|
+
}
|
|
178
|
+
declare const ApiDecodeError_base: Schema.Class<ApiDecodeError, Schema.TaggedStruct<"ApiDecodeError", {
|
|
179
|
+
readonly message: Schema.String;
|
|
180
|
+
}>, import("effect/Cause").YieldableError>;
|
|
181
|
+
export declare class ApiDecodeError extends ApiDecodeError_base {
|
|
182
|
+
}
|
|
183
|
+
type ApiClientError = ApiConfigurationError | ApiDecodeError | ApiHttpError | ApiTransportError;
|
|
184
|
+
interface PrismantixApiClientService {
|
|
185
|
+
readonly cancelRecordGeneration: (operationId: string) => Effect.Effect<RecordGenerationStatus, ApiClientError>;
|
|
186
|
+
readonly createExport: (clientId: string) => Effect.Effect<ExportCreated, ApiClientError>;
|
|
187
|
+
readonly createRecordGeneration: (clientId: string, ontologyId: string, idempotencyKey: string) => Effect.Effect<RecordGenerationCreated, ApiClientError>;
|
|
188
|
+
readonly getExportStatus: (exportId: string) => Effect.Effect<ExportStatus, ApiClientError>;
|
|
189
|
+
readonly getFile: (exportId: string, tableName: string) => Effect.Effect<Response, ApiClientError>;
|
|
190
|
+
readonly getManifest: (exportId: string) => Effect.Effect<ExportManifest, ApiClientError>;
|
|
191
|
+
readonly getOntologyObject: (objectSlug: string) => Effect.Effect<OntologyObjectDetail, ApiClientError>;
|
|
192
|
+
readonly getRecordGeneration: (operationId: string) => Effect.Effect<RecordGenerationStatus, ApiClientError>;
|
|
193
|
+
readonly listOntologies: () => Effect.Effect<readonly OntologySummary[], ApiClientError>;
|
|
194
|
+
readonly listOntologyObjects: (ontologyId: string) => Effect.Effect<readonly OntologyObjectSummary[], ApiClientError>;
|
|
195
|
+
}
|
|
196
|
+
declare const PrismantixApiClient_base: Context.ServiceClass<PrismantixApiClient, "@prismantix/cli/PrismantixApiClient", PrismantixApiClientService>;
|
|
197
|
+
export declare class PrismantixApiClient extends PrismantixApiClient_base {
|
|
198
|
+
}
|
|
199
|
+
interface PrismantixApiClientLayerOptions {
|
|
115
200
|
readonly apiBaseUrl?: string;
|
|
116
|
-
readonly apiKey
|
|
201
|
+
readonly apiKey?: string;
|
|
202
|
+
readonly configProvider?: ConfigProvider.ConfigProvider;
|
|
117
203
|
readonly fetchImpl?: typeof fetch;
|
|
118
204
|
}
|
|
119
|
-
export declare
|
|
120
|
-
private readonly apiBaseUrl;
|
|
121
|
-
private readonly apiKey;
|
|
122
|
-
private readonly fetchImpl;
|
|
123
|
-
constructor(options: PrismantixApiClientOptions);
|
|
124
|
-
createExport(clientId: string): Promise<{
|
|
125
|
-
clientId: string;
|
|
126
|
-
exportId: string;
|
|
127
|
-
manifestUrl?: string | undefined;
|
|
128
|
-
status?: "queued" | undefined;
|
|
129
|
-
statusUrl?: string | undefined;
|
|
130
|
-
}>;
|
|
131
|
-
getExportStatus(exportId: string): Promise<{
|
|
132
|
-
clientId: string;
|
|
133
|
-
exportId: string;
|
|
134
|
-
files: {
|
|
135
|
-
fileName: string;
|
|
136
|
-
tableName: string;
|
|
137
|
-
downloadUrl?: string | null | undefined;
|
|
138
|
-
mimeType?: string | undefined;
|
|
139
|
-
rowCount?: number | undefined;
|
|
140
|
-
sha256?: string | undefined;
|
|
141
|
-
sizeBytes?: number | undefined;
|
|
142
|
-
}[];
|
|
143
|
-
status: "queued" | "running" | "completed" | "failed";
|
|
144
|
-
completedAt?: number | undefined;
|
|
145
|
-
createdAt?: number | undefined;
|
|
146
|
-
errorMessage?: string | undefined;
|
|
147
|
-
failedAt?: number | undefined;
|
|
148
|
-
manifestUrl?: string | null | undefined;
|
|
149
|
-
startedAt?: number | undefined;
|
|
150
|
-
totalFiles?: number | undefined;
|
|
151
|
-
totalRows?: number | undefined;
|
|
152
|
-
}>;
|
|
153
|
-
getManifest(exportId: string): Promise<{
|
|
154
|
-
totalRows: number;
|
|
155
|
-
clientId: string;
|
|
156
|
-
exportId: string;
|
|
157
|
-
files: {
|
|
158
|
-
fileName: string;
|
|
159
|
-
tableName: string;
|
|
160
|
-
downloadUrl?: string | null | undefined;
|
|
161
|
-
mimeType?: string | undefined;
|
|
162
|
-
rowCount?: number | undefined;
|
|
163
|
-
sha256?: string | undefined;
|
|
164
|
-
sizeBytes?: number | undefined;
|
|
165
|
-
columns?: string[] | undefined;
|
|
166
|
-
storageKey?: string | undefined;
|
|
167
|
-
}[];
|
|
168
|
-
completedAt?: number | undefined;
|
|
169
|
-
createdAt?: number | undefined;
|
|
170
|
-
format?: "csv" | undefined;
|
|
171
|
-
medium?: "csv_bundle" | undefined;
|
|
172
|
-
mode?: "current_client_snapshot" | undefined;
|
|
173
|
-
schemaVersion?: string | undefined;
|
|
174
|
-
}>;
|
|
175
|
-
getFile(exportId: string, tableName: string): Promise<Response>;
|
|
176
|
-
private request;
|
|
177
|
-
}
|
|
205
|
+
export declare const makePrismantixApiClientLayer: (options?: PrismantixApiClientLayerOptions) => Layer.Layer<PrismantixApiClient, ApiConfigurationError, never>;
|
|
178
206
|
export {};
|
|
179
207
|
//# sourceMappingURL=api.d.ts.map
|
package/dist/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,cAAc,EACd,OAAO,EACP,MAAM,EACN,KAAK,EAGL,MAAM,EACN,MAAM,QAAQ,CAAC;AAOhB,QAAA,MAAM,kBAAkB;;;;;;;;;EAStB,CAAC;AACH,MAAM,WAAW,kBAAmB,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,kBAAkB,CAAC;IACxF,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrC;AAED,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;EASxB,CAAC;AACH,MAAM,WAAW,cAAe,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,oBAAoB,CAAC;CAAG;AAW1F,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;EActB,CAAC;AACH,MAAM,WAAW,YAAa,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,kBAAkB,CAAC;CAAG;AAEtF,QAAA,MAAM,mBAAmB;;;;EAIvB,CAAC;AACH,UAAU,aAAc,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,mBAAmB,CAAC;CAAG;AAEjF,QAAA,MAAM,qBAAqB;;;;;EAKzB,CAAC;AACH,UAAU,eAAgB,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,qBAAqB,CAAC;CAAG;AAErF,QAAA,MAAM,2BAA2B;;;;;;;;EAQ/B,CAAC;AACH,UAAU,qBAAsB,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,2BAA2B,CAAC;CAAG;AAEjG,QAAA,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;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