@dxs-ts/eveli-ide 0.0.8 → 0.0.13
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/build/index.d.ts +734 -457
- package/build/index.js +25255 -25258
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -1,27 +1,349 @@
|
|
|
1
1
|
import { default as default_2 } from 'react';
|
|
2
2
|
import { Theme } from '@mui/material/styles';
|
|
3
3
|
|
|
4
|
-
declare
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
4
|
+
declare namespace HdesApi {
|
|
5
|
+
type TagId = string;
|
|
6
|
+
type EntityId = string;
|
|
7
|
+
type FlowId = string;
|
|
8
|
+
type ServiceId = string;
|
|
9
|
+
type DecisionId = string;
|
|
10
|
+
type BranchId = string;
|
|
11
|
+
type AstBodyType = "FLOW" | "FLOW_TASK" | "DT" | "TAG" | "BRANCH";
|
|
12
|
+
type Direction = "IN" | "OUT";
|
|
13
|
+
type ValueType = "TIME" | "DATE" | "DATE_TIME" | "INSTANT" | "PERIOD" | "DURATION" | "STRING" | "INTEGER" | "LONG" | "BOOLEAN" | "PERCENT" | "OBJECT" | "ARRAY" | "DECIMAL" | "MAP" | "FLOW_CONTEXT";
|
|
14
|
+
type ProgramStatus = "UP" | "AST_ERROR" | "PROGRAM_ERROR" | "DEPENDENCY_ERROR";
|
|
15
|
+
type HitPolicy = "FIRST" | "ALL";
|
|
16
|
+
type AssociationType = "ONE_TO_ONE" | "ONE_TO_MANY";
|
|
17
|
+
type ColumnExpressionType = "IN" | "EQUALS";
|
|
18
|
+
type FlowCommandMessageType = "ERROR" | "WARNING";
|
|
19
|
+
type AstCommandValue = ("SET" | "ADD" | "DELETE" | "SET_BODY" | "SET_NAME" | "SET_DESCRIPTION" | "IMPORT_CSV" | "IMPORT_ORDERED_CSV" | "MOVE_ROW" | "MOVE_HEADER" | "INSERT_ROW" | "COPY_ROW" | "SET_HEADER_TYPE" | "SET_HEADER_REF" | "SET_HEADER_NAME" | "SET_HEADER_SCRIPT" | "SET_HEADER_DIRECTION" | "SET_HEADER_EXPRESSION" | "SET_HIT_POLICY" | "SET_CELL_VALUE" | "DELETE_CELL" | "DELETE_HEADER" | "DELETE_ROW" | "ADD_LOG" | "ADD_HEADER_IN" | "ADD_HEADER_OUT" | "ADD_ROW" | "SET_VALUE_SET" | "CREATE_BRANCH" | "SET_BRANCH_NAME" | "SET_BRANCH_TAG" | "SET_BRANCH_CREATED");
|
|
20
|
+
interface CommandsAndChanges {
|
|
21
|
+
commands: AstCommand[];
|
|
22
|
+
src: AstChangeset[];
|
|
23
|
+
}
|
|
24
|
+
interface AstChangeset {
|
|
25
|
+
line: number;
|
|
26
|
+
value: string;
|
|
27
|
+
commands: AstCommand[];
|
|
28
|
+
}
|
|
29
|
+
interface ProgramMessage {
|
|
30
|
+
id: string;
|
|
31
|
+
msg: string;
|
|
32
|
+
}
|
|
33
|
+
interface AstCommand {
|
|
34
|
+
id?: string;
|
|
35
|
+
value?: string;
|
|
36
|
+
type: AstCommandValue;
|
|
37
|
+
}
|
|
38
|
+
interface TypeDef {
|
|
39
|
+
id: string;
|
|
40
|
+
name: string;
|
|
41
|
+
order: number;
|
|
42
|
+
data: boolean;
|
|
43
|
+
direction: Direction;
|
|
44
|
+
valueType: ValueType;
|
|
45
|
+
required: boolean;
|
|
46
|
+
properties: TypeDef[];
|
|
47
|
+
values?: string;
|
|
48
|
+
valueSet?: string[];
|
|
49
|
+
}
|
|
50
|
+
interface AstBody {
|
|
51
|
+
name: string;
|
|
52
|
+
description?: string;
|
|
53
|
+
headers: Headers;
|
|
54
|
+
bodyType: AstBodyType;
|
|
55
|
+
}
|
|
56
|
+
interface Headers {
|
|
57
|
+
acceptDefs: TypeDef[];
|
|
58
|
+
returnDefs: TypeDef[];
|
|
59
|
+
}
|
|
60
|
+
interface AstSource {
|
|
61
|
+
id: string;
|
|
62
|
+
hash: string;
|
|
63
|
+
bodyType: AstBodyType;
|
|
64
|
+
commands: AstCommand[];
|
|
65
|
+
}
|
|
66
|
+
interface ProgramAssociation {
|
|
67
|
+
id?: string;
|
|
68
|
+
ref: string;
|
|
69
|
+
refType: AstBodyType;
|
|
70
|
+
refStatus: ProgramStatus;
|
|
71
|
+
owner: string;
|
|
72
|
+
}
|
|
73
|
+
interface Site {
|
|
74
|
+
name: string;
|
|
75
|
+
contentType: "OK" | "NOT_CREATED" | "EMPTY" | "ERRORS" | "NO_CONNECTION";
|
|
76
|
+
tags: Record<TagId, Entity<AstTag>>;
|
|
77
|
+
flows: Record<FlowId, Entity<AstFlow>>;
|
|
78
|
+
services: Record<ServiceId, Entity<AstService>>;
|
|
79
|
+
decisions: Record<DecisionId, Entity<AstDecision>>;
|
|
80
|
+
branches: Record<BranchId, Entity<AstBranch>>;
|
|
81
|
+
}
|
|
82
|
+
interface Entity<A extends AstBody> {
|
|
83
|
+
id: EntityId;
|
|
84
|
+
ast?: A;
|
|
85
|
+
source: AstSource;
|
|
86
|
+
warnings: ProgramMessage[];
|
|
87
|
+
errors: ProgramMessage[];
|
|
88
|
+
associations: ProgramAssociation[];
|
|
89
|
+
status: ProgramStatus;
|
|
90
|
+
}
|
|
91
|
+
interface AstDecision extends AstBody {
|
|
92
|
+
headerTypes: string[];
|
|
93
|
+
headerExpressions: Record<ValueType, string[]>;
|
|
94
|
+
hitPolicy: HitPolicy;
|
|
95
|
+
rows: AstDecisionRow[];
|
|
96
|
+
}
|
|
97
|
+
interface AstDecisionRow {
|
|
98
|
+
id: string;
|
|
99
|
+
order: number;
|
|
100
|
+
cells: AstDecisionCell[];
|
|
101
|
+
}
|
|
102
|
+
interface AstDecisionCell {
|
|
103
|
+
id: string;
|
|
104
|
+
header: string;
|
|
105
|
+
value?: string;
|
|
106
|
+
}
|
|
107
|
+
interface AstFlow extends AstBody {
|
|
108
|
+
src: AstFlowRoot;
|
|
109
|
+
messages: FlowAstCommandMessage[];
|
|
110
|
+
}
|
|
111
|
+
interface FlowAstCommandMessage {
|
|
112
|
+
line: number;
|
|
113
|
+
value: string;
|
|
114
|
+
type: FlowCommandMessageType;
|
|
115
|
+
range?: FlowAstCommandRange;
|
|
116
|
+
}
|
|
117
|
+
interface FlowAstCommandRange {
|
|
118
|
+
start: number;
|
|
119
|
+
end: number;
|
|
120
|
+
}
|
|
121
|
+
interface AstFlowInputType {
|
|
122
|
+
name: string;
|
|
123
|
+
value: string;
|
|
124
|
+
ref?: string;
|
|
125
|
+
}
|
|
126
|
+
interface AstFlowRoot extends AstFlowNode {
|
|
127
|
+
id: AstFlowNode;
|
|
128
|
+
description: AstFlowNode;
|
|
129
|
+
types: AstFlowInputType[];
|
|
130
|
+
inputs: Record<string, AstFlowInputNode>;
|
|
131
|
+
tasks: Record<string, AstFlowTaskNode>;
|
|
132
|
+
}
|
|
133
|
+
interface AstFlowTaskNode extends Omit<AstFlowNode, "switch"> {
|
|
134
|
+
id: AstFlowNode;
|
|
135
|
+
order: number;
|
|
136
|
+
then: AstFlowNode;
|
|
137
|
+
ref: AstFlowRefNode;
|
|
138
|
+
userTask: AstFlowRefNode;
|
|
139
|
+
decisionTable: AstFlowRefNode;
|
|
140
|
+
service: AstFlowRefNode;
|
|
141
|
+
switch: Record<string, AstFlowSwitchNode>;
|
|
142
|
+
}
|
|
143
|
+
interface AstFlowRefNode extends AstFlowNode {
|
|
144
|
+
ref: AstFlowNode;
|
|
145
|
+
collection: AstFlowNode;
|
|
146
|
+
inputsNode: AstFlowNode;
|
|
147
|
+
inputs: Record<string, AstFlowNode>;
|
|
148
|
+
}
|
|
149
|
+
interface AstFlowSwitchNode extends AstFlowNode {
|
|
150
|
+
order: string;
|
|
151
|
+
when: AstFlowNode;
|
|
152
|
+
then: AstFlowNode;
|
|
153
|
+
}
|
|
154
|
+
interface AstFlowInputNode extends AstFlowNode {
|
|
155
|
+
required: AstFlowNode;
|
|
156
|
+
type: AstFlowNode;
|
|
157
|
+
debugValue: AstFlowNode;
|
|
158
|
+
}
|
|
159
|
+
interface AstFlowNode {
|
|
160
|
+
parent: AstFlowNode;
|
|
161
|
+
keyword: string;
|
|
162
|
+
children: Record<string, AstFlowNode>;
|
|
163
|
+
value: string;
|
|
164
|
+
source: AstChangeset;
|
|
165
|
+
start: number;
|
|
166
|
+
end: number;
|
|
167
|
+
service?: AstFlowNode | undefined;
|
|
168
|
+
decisionTable?: AstFlowNode | undefined;
|
|
169
|
+
then?: AstFlowNode | undefined;
|
|
170
|
+
id?: AstFlowNode | undefined;
|
|
171
|
+
switch?: AstFlowNode | undefined;
|
|
172
|
+
}
|
|
173
|
+
interface AstService extends AstBody {
|
|
174
|
+
executorType: "TYPE_0" | "TYPE_1" | "TYPE_2";
|
|
175
|
+
value: string;
|
|
176
|
+
}
|
|
177
|
+
interface AstTag extends AstBody {
|
|
178
|
+
name: string;
|
|
179
|
+
created: string;
|
|
180
|
+
values: AstTagValue[];
|
|
181
|
+
}
|
|
182
|
+
interface AstTagValue {
|
|
183
|
+
hash: string;
|
|
184
|
+
bodyType: AstBodyType;
|
|
185
|
+
commands: AstCommand[];
|
|
186
|
+
}
|
|
187
|
+
interface AstBranch extends AstBody {
|
|
188
|
+
name: string;
|
|
189
|
+
created: string;
|
|
190
|
+
tagId: string;
|
|
191
|
+
}
|
|
192
|
+
interface ServiceErrorMsg {
|
|
193
|
+
id: string;
|
|
194
|
+
value: string;
|
|
195
|
+
}
|
|
196
|
+
interface ServiceErrorProps {
|
|
197
|
+
text: string;
|
|
198
|
+
status: number;
|
|
199
|
+
errors: ServiceErrorMsg[];
|
|
200
|
+
}
|
|
201
|
+
interface DebugRequest {
|
|
202
|
+
id: string;
|
|
203
|
+
input?: string;
|
|
204
|
+
inputCSV?: string;
|
|
205
|
+
}
|
|
206
|
+
interface DebugResponse {
|
|
207
|
+
id: string;
|
|
208
|
+
body?: ProgramResult;
|
|
209
|
+
bodyCsv?: string;
|
|
210
|
+
}
|
|
211
|
+
interface ProgramResult {
|
|
212
|
+
}
|
|
213
|
+
interface ServiceResult extends ProgramResult {
|
|
214
|
+
value: any;
|
|
215
|
+
}
|
|
216
|
+
interface DecisionResult extends ProgramResult {
|
|
217
|
+
rejections: DecisionLog[];
|
|
218
|
+
matches: DecisionLog[];
|
|
219
|
+
}
|
|
220
|
+
interface DecisionLog {
|
|
221
|
+
match: boolean;
|
|
222
|
+
order: number;
|
|
223
|
+
accepts: DecisionLogEntry[];
|
|
224
|
+
returns: DecisionLogEntry[];
|
|
225
|
+
}
|
|
226
|
+
interface DecisionLogEntry {
|
|
227
|
+
match: boolean;
|
|
228
|
+
headerType: TypeDef;
|
|
229
|
+
expression: string;
|
|
230
|
+
usedValue?: any;
|
|
231
|
+
}
|
|
232
|
+
type FlowProgramStepPointerType = "SWITCH" | "THEN" | "END";
|
|
233
|
+
type FlowProgramStepRefType = "SERVICE" | "DT";
|
|
234
|
+
type FlowExecutionStatus = "COMPLETED" | "ERROR";
|
|
235
|
+
interface FlowResult extends ProgramResult {
|
|
236
|
+
stepId: string;
|
|
237
|
+
shortHistory: string;
|
|
238
|
+
logs: FlowResultLog[];
|
|
239
|
+
status: FlowExecutionStatus;
|
|
240
|
+
accepts: Record<string, any>;
|
|
241
|
+
returns: Record<string, any>;
|
|
242
|
+
}
|
|
243
|
+
interface FlowResultLog {
|
|
244
|
+
id: number;
|
|
245
|
+
stepId: string;
|
|
246
|
+
start: string | Date;
|
|
247
|
+
end: string | Date;
|
|
248
|
+
errors: FlowResultErrorLog[];
|
|
249
|
+
status: FlowExecutionStatus;
|
|
250
|
+
accepts: Record<string, any>;
|
|
251
|
+
returns: Record<string, any>;
|
|
252
|
+
}
|
|
253
|
+
interface FlowResultErrorLog {
|
|
254
|
+
id: string;
|
|
255
|
+
msg: string;
|
|
256
|
+
}
|
|
257
|
+
interface Input {
|
|
258
|
+
name: string | null | undefined;
|
|
259
|
+
value: string | null | undefined;
|
|
260
|
+
}
|
|
261
|
+
interface Output {
|
|
262
|
+
name: string | null | undefined;
|
|
263
|
+
value: string | null | undefined;
|
|
264
|
+
}
|
|
265
|
+
interface CsvRow {
|
|
266
|
+
id: string;
|
|
267
|
+
inputs: Input[];
|
|
268
|
+
outputs: Output[];
|
|
269
|
+
}
|
|
270
|
+
interface CreateBuilder {
|
|
271
|
+
site(): Promise<Site>;
|
|
272
|
+
importData(init: string): Promise<Site>;
|
|
273
|
+
tag(props: {
|
|
274
|
+
name: string;
|
|
275
|
+
desc: string;
|
|
276
|
+
}): Promise<Site>;
|
|
277
|
+
flow(name: string): Promise<Site>;
|
|
278
|
+
service(name: string): Promise<Site>;
|
|
279
|
+
decision(name: string): Promise<Site>;
|
|
280
|
+
branch(body: AstCommand[]): Promise<Site>;
|
|
281
|
+
}
|
|
282
|
+
interface DeleteBuilder {
|
|
283
|
+
tag(tagId: TagId): Promise<Site>;
|
|
284
|
+
flow(flowId: FlowId): Promise<Site>;
|
|
285
|
+
service(serviceId: ServiceId): Promise<Site>;
|
|
286
|
+
decision(decisionId: DecisionId): Promise<Site>;
|
|
287
|
+
branch(branchId: BranchId): Promise<Site>;
|
|
288
|
+
}
|
|
289
|
+
interface DiffRequest {
|
|
290
|
+
baseId: string;
|
|
291
|
+
targetId: string;
|
|
292
|
+
}
|
|
293
|
+
interface DiffResponse {
|
|
294
|
+
baseName: string;
|
|
295
|
+
targetName: string;
|
|
296
|
+
baseId: string;
|
|
297
|
+
targetId: string;
|
|
298
|
+
created: string;
|
|
299
|
+
body: string;
|
|
300
|
+
}
|
|
301
|
+
interface AstTagSummaryEntity {
|
|
302
|
+
id: string;
|
|
303
|
+
name: string;
|
|
304
|
+
body: string;
|
|
305
|
+
}
|
|
306
|
+
interface AstTagSummary {
|
|
307
|
+
tagName: string;
|
|
308
|
+
flows: AstTagSummaryEntity[];
|
|
309
|
+
services: AstTagSummaryEntity[];
|
|
310
|
+
decisions: AstTagSummaryEntity[];
|
|
311
|
+
}
|
|
312
|
+
interface VersionEntity {
|
|
313
|
+
version: string;
|
|
314
|
+
built: string;
|
|
315
|
+
}
|
|
316
|
+
interface Service {
|
|
317
|
+
withBranch(branchName?: string): Service;
|
|
318
|
+
branch: string | undefined;
|
|
319
|
+
delete(): DeleteBuilder;
|
|
320
|
+
create(): CreateBuilder;
|
|
321
|
+
update(id: string, body: AstCommand[]): Promise<Site>;
|
|
322
|
+
ast(id: string, body: AstCommand[]): Promise<Entity<any>>;
|
|
323
|
+
debug(input: DebugRequest): Promise<DebugResponse>;
|
|
324
|
+
getSite(): Promise<Site>;
|
|
325
|
+
copy(id: string, name: string): Promise<Site>;
|
|
326
|
+
version(): Promise<VersionEntity>;
|
|
327
|
+
diff(input: DiffRequest): Promise<DiffResponse>;
|
|
328
|
+
summary(tagId: string): Promise<AstTagSummary>;
|
|
329
|
+
}
|
|
330
|
+
interface Store {
|
|
331
|
+
fetch<T>(path: string, init?: RequestInit): Promise<T>;
|
|
332
|
+
}
|
|
333
|
+
interface StoreError extends Error {
|
|
334
|
+
text: string;
|
|
335
|
+
status: number;
|
|
336
|
+
errors: ServiceErrorMsg[];
|
|
337
|
+
}
|
|
338
|
+
interface StoreConfig {
|
|
339
|
+
url: string;
|
|
340
|
+
oidc?: string;
|
|
341
|
+
status?: string;
|
|
342
|
+
csrf?: {
|
|
343
|
+
key: string;
|
|
344
|
+
value: string;
|
|
345
|
+
};
|
|
346
|
+
}
|
|
25
347
|
}
|
|
26
348
|
|
|
27
349
|
export declare const siteTheme: Theme;
|
|
@@ -316,60 +638,53 @@ export declare const stencilIntl: {
|
|
|
316
638
|
[key: string]: any;
|
|
317
639
|
};
|
|
318
640
|
|
|
319
|
-
declare interface Store {
|
|
320
|
-
fetch<T>(path: string, init?: RequestInit): Promise<T>;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
declare interface StoreConfig {
|
|
324
|
-
url: string;
|
|
325
|
-
oidc?: string;
|
|
326
|
-
status?: string;
|
|
327
|
-
csrf?: {
|
|
328
|
-
key: string;
|
|
329
|
-
value: string;
|
|
330
|
-
};
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
declare class StoreErrorImpl extends Error {
|
|
334
|
-
private _props;
|
|
335
|
-
constructor(props: ServiceErrorProps);
|
|
336
|
-
get name(): string;
|
|
337
|
-
get status(): number;
|
|
338
|
-
get errors(): ServiceErrorMsg[];
|
|
339
|
-
}
|
|
340
|
-
|
|
341
641
|
export declare namespace WrenchClient {
|
|
342
|
-
export declare type { TagId, FlowId, ServiceId, DecisionId, AstBodyType, Direction, ValueType, ProgramStatus, HitPolicy, AssociationType, ColumnExpressionType, FlowCommandMessageType, AstCommandValue, CommandsAndChanges, AstChangeset, ProgramMessage, AstCommand, TypeDef, AstBody, Headers, AstSource, ProgramAssociation, Site, Entity, EntityId, CreateBuilder, DeleteBuilder, AstDecision, AstDecisionRow, AstDecisionCell, AstFlow, FlowAstCommandMessage, FlowAstCommandRange, AstFlowInputType, AstFlowRoot, AstFlowTaskNode, AstFlowRefNode, AstFlowSwitchNode, AstFlowInputNode, AstFlowNode, AstService, AstTag, AstTagValue, AstBranch, ServiceErrorMsg, ServiceErrorProps, Service, Store, StoreError, StoreConfig, DebugRequest, DebugResponse, ProgramResult, ServiceResult, DecisionResult, DecisionLog, DecisionLogEntry, FlowProgramStepPointerType, FlowProgramStepRefType, FlowExecutionStatus, FlowResult, FlowResultLog, FlowResultErrorLog, Input, Output, CsvRow, VersionEntity, DiffRequest, DiffResponse, AstTagSummaryEntity, AstTagSummary };
|
|
343
642
|
}
|
|
344
643
|
|
|
345
644
|
export declare namespace WrenchClient {
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
645
|
+
export class StoreErrorImpl extends Error {
|
|
646
|
+
private _props;
|
|
647
|
+
constructor(props: HdesApi.ServiceErrorProps);
|
|
648
|
+
get name(): string;
|
|
649
|
+
get status(): number;
|
|
650
|
+
get errors(): HdesApi.ServiceErrorMsg[];
|
|
651
|
+
}
|
|
652
|
+
export class DefaultStore implements HdesApi.Store {
|
|
653
|
+
private _config;
|
|
654
|
+
private _updateStarted;
|
|
655
|
+
private _iapSessionRefreshWindow;
|
|
656
|
+
private _defRef;
|
|
657
|
+
constructor(config: HdesApi.StoreConfig);
|
|
658
|
+
iapRefresh(): Promise<void>;
|
|
659
|
+
iapLogin(): boolean;
|
|
660
|
+
handle401(): Promise<void>;
|
|
661
|
+
fetch<T>(path: string, req?: RequestInit): Promise<T>;
|
|
662
|
+
}
|
|
663
|
+
export class ServiceImpl implements HdesApi.Service {
|
|
349
664
|
private _store;
|
|
350
665
|
private _branch;
|
|
351
666
|
private _headers;
|
|
352
|
-
constructor(store:
|
|
353
|
-
withBranch(branchName?: string):
|
|
667
|
+
constructor(store: HdesApi.Store, branchName?: string);
|
|
668
|
+
withBranch(branchName?: string): ServiceImpl;
|
|
354
669
|
get branch(): string | undefined;
|
|
355
|
-
create():
|
|
356
|
-
delete():
|
|
357
|
-
update(id: string, body:
|
|
358
|
-
createAsset(name: string, desc: string | undefined, type:
|
|
359
|
-
ast(id: string, body:
|
|
360
|
-
getSite(): Promise<
|
|
361
|
-
debug(debug:
|
|
362
|
-
copy(id: string, name: string): Promise<
|
|
363
|
-
version(): Promise<
|
|
364
|
-
diff(input:
|
|
365
|
-
summary(tagId: string): Promise<
|
|
670
|
+
create(): HdesApi.CreateBuilder;
|
|
671
|
+
delete(): HdesApi.DeleteBuilder;
|
|
672
|
+
update(id: string, body: HdesApi.AstCommand[]): Promise<HdesApi.Site>;
|
|
673
|
+
createAsset(name: string, desc: string | undefined, type: HdesApi.AstBodyType | "SITE", body?: HdesApi.AstCommand[]): Promise<HdesApi.Site>;
|
|
674
|
+
ast(id: string, body: HdesApi.AstCommand[]): Promise<HdesApi.Entity<any>>;
|
|
675
|
+
getSite(): Promise<HdesApi.Site>;
|
|
676
|
+
debug(debug: HdesApi.DebugRequest): Promise<HdesApi.DebugResponse>;
|
|
677
|
+
copy(id: string, name: string): Promise<HdesApi.Site>;
|
|
678
|
+
version(): Promise<HdesApi.VersionEntity>;
|
|
679
|
+
diff(input: HdesApi.DiffRequest): Promise<HdesApi.DiffResponse>;
|
|
680
|
+
summary(tagId: string): Promise<HdesApi.AstTagSummary>;
|
|
366
681
|
}
|
|
367
682
|
}
|
|
368
683
|
|
|
369
684
|
export declare const WrenchComposer: default_2.FC<WrenchComposerProps>;
|
|
370
685
|
|
|
371
686
|
declare interface WrenchComposerProps {
|
|
372
|
-
service:
|
|
687
|
+
service: HdesApi.Service;
|
|
373
688
|
locked?: boolean;
|
|
374
689
|
}
|
|
375
690
|
|
|
@@ -380,64 +695,6 @@ export declare const wrenchIntl: {
|
|
|
380
695
|
export { }
|
|
381
696
|
|
|
382
697
|
|
|
383
|
-
declare namespace Burger {
|
|
384
|
-
const Provider: import("react").FC<AppProviderProps>;
|
|
385
|
-
const useApps: () => AppContextType;
|
|
386
|
-
const useDrawer: () => DrawerContextType;
|
|
387
|
-
const useTabs: () => TabsContextType;
|
|
388
|
-
const useSecondary: () => SecondaryContextType;
|
|
389
|
-
const Dialog: import("react").FC<StyledDialogProps>;
|
|
390
|
-
const Select: import("react").FC<StyledSelectProps<string>>;
|
|
391
|
-
const SelectMultiple: import("react").FC<{
|
|
392
|
-
multiline?: boolean;
|
|
393
|
-
open?: boolean;
|
|
394
|
-
helpers?: {
|
|
395
|
-
id: string;
|
|
396
|
-
value: string | React.ReactChild;
|
|
397
|
-
sx?: import("@mui/system").SxProps<import("@mui/material").Theme>;
|
|
398
|
-
}[];
|
|
399
|
-
renderValue?: (values: string[]) => React.ReactNode;
|
|
400
|
-
} & StyledSelectProps<string[]>>;
|
|
401
|
-
const TextField: import("react").FC<StyledInputFieldProps<string>>;
|
|
402
|
-
const NumberField: import("react").FC<StyledInputFieldProps<number>>;
|
|
403
|
-
const FileField: import("react").FC<StyledInputFieldProps<string>>;
|
|
404
|
-
const DateField: import("react").FC<StyledInputFieldProps<string>>;
|
|
405
|
-
const DateTimeField: import("react").FC<StyledInputFieldProps<string>>;
|
|
406
|
-
const TreeItem: import("react").FC<StyledTreeItemProps>;
|
|
407
|
-
const TreeItemRoot: import("@emotion/styled").StyledComponent<import("@mui/lab/TreeItem").TreeItemProps & import("react").RefAttributes<HTMLLIElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
408
|
-
const TreeItemOption: import("react").FC<{
|
|
409
|
-
labelText: React.ReactNode;
|
|
410
|
-
nodeId: string;
|
|
411
|
-
color: string;
|
|
412
|
-
icon?: React.ElementType<import("@mui/material").SvgIconProps>;
|
|
413
|
-
onClick: () => void;
|
|
414
|
-
}>;
|
|
415
|
-
const SearchField: import("react").FC<StyledInputFieldProps<string>>;
|
|
416
|
-
const TransferList: import("react").FC<StyledTransferListProps>;
|
|
417
|
-
const PrimaryButton: import("react").FC<{
|
|
418
|
-
label: string;
|
|
419
|
-
onClick: (event: React.MouseEvent<HTMLElement>) => void;
|
|
420
|
-
sx?: import("@mui/system").SxProps<import("@mui/material").Theme>;
|
|
421
|
-
disabled?: boolean;
|
|
422
|
-
}>;
|
|
423
|
-
const SecondaryButton: import("react").FC<{
|
|
424
|
-
label?: string;
|
|
425
|
-
onClick: (event: React.MouseEvent<HTMLElement>) => void;
|
|
426
|
-
sx?: import("@mui/system").SxProps<import("@mui/material").Theme>;
|
|
427
|
-
disabled?: boolean;
|
|
428
|
-
}>;
|
|
429
|
-
const Checkbox: import("react").FC<{
|
|
430
|
-
checked: boolean;
|
|
431
|
-
onChange?: (newValue: boolean) => void;
|
|
432
|
-
sx?: import("@mui/system").SxProps<import("@mui/material").Theme>;
|
|
433
|
-
}>;
|
|
434
|
-
const Switch: import("react").FC<StyledSwitchProps>;
|
|
435
|
-
const RadioButton: import("@emotion/styled").StyledComponent<import("@mui/material").RadioProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
436
|
-
const DateTimeFormatter: import("react").FC<DateTimeFormatProps>;
|
|
437
|
-
const ReleaseTable: import("react").FC<ReleaseTableProps>;
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
|
|
441
698
|
declare module 'react' {
|
|
442
699
|
interface CSSProperties {
|
|
443
700
|
'--tree-view-text-color'?: string;
|
|
@@ -491,101 +748,365 @@ declare module '@mui/material/styles' {
|
|
|
491
748
|
|
|
492
749
|
|
|
493
750
|
declare namespace HdesClient {
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
|
|
754
|
+
declare namespace HdesClient {
|
|
755
|
+
class StoreErrorImpl extends Error {
|
|
756
|
+
private _props;
|
|
757
|
+
constructor(props: HdesApi.ServiceErrorProps);
|
|
758
|
+
get name(): string;
|
|
759
|
+
get status(): number;
|
|
760
|
+
get errors(): HdesApi.ServiceErrorMsg[];
|
|
761
|
+
}
|
|
762
|
+
class DefaultStore implements HdesApi.Store {
|
|
763
|
+
private _config;
|
|
764
|
+
private _updateStarted;
|
|
765
|
+
private _iapSessionRefreshWindow;
|
|
766
|
+
private _defRef;
|
|
767
|
+
constructor(config: HdesApi.StoreConfig);
|
|
768
|
+
iapRefresh(): Promise<void>;
|
|
769
|
+
iapLogin(): boolean;
|
|
770
|
+
handle401(): Promise<void>;
|
|
771
|
+
fetch<T>(path: string, req?: RequestInit): Promise<T>;
|
|
772
|
+
}
|
|
773
|
+
class ServiceImpl implements HdesApi.Service {
|
|
497
774
|
private _store;
|
|
498
775
|
private _branch;
|
|
499
776
|
private _headers;
|
|
500
|
-
constructor(store:
|
|
501
|
-
withBranch(branchName?: string):
|
|
777
|
+
constructor(store: HdesApi.Store, branchName?: string);
|
|
778
|
+
withBranch(branchName?: string): ServiceImpl;
|
|
502
779
|
get branch(): string | undefined;
|
|
503
|
-
create():
|
|
504
|
-
delete():
|
|
505
|
-
update(id: string, body:
|
|
506
|
-
createAsset(name: string, desc: string | undefined, type:
|
|
507
|
-
ast(id: string, body:
|
|
508
|
-
getSite(): Promise<
|
|
509
|
-
debug(debug:
|
|
510
|
-
copy(id: string, name: string): Promise<
|
|
511
|
-
version(): Promise<
|
|
512
|
-
diff(input:
|
|
513
|
-
summary(tagId: string): Promise<
|
|
780
|
+
create(): HdesApi.CreateBuilder;
|
|
781
|
+
delete(): HdesApi.DeleteBuilder;
|
|
782
|
+
update(id: string, body: HdesApi.AstCommand[]): Promise<HdesApi.Site>;
|
|
783
|
+
createAsset(name: string, desc: string | undefined, type: HdesApi.AstBodyType | "SITE", body?: HdesApi.AstCommand[]): Promise<HdesApi.Site>;
|
|
784
|
+
ast(id: string, body: HdesApi.AstCommand[]): Promise<HdesApi.Entity<any>>;
|
|
785
|
+
getSite(): Promise<HdesApi.Site>;
|
|
786
|
+
debug(debug: HdesApi.DebugRequest): Promise<HdesApi.DebugResponse>;
|
|
787
|
+
copy(id: string, name: string): Promise<HdesApi.Site>;
|
|
788
|
+
version(): Promise<HdesApi.VersionEntity>;
|
|
789
|
+
diff(input: HdesApi.DiffRequest): Promise<HdesApi.DiffResponse>;
|
|
790
|
+
summary(tagId: string): Promise<HdesApi.AstTagSummary>;
|
|
514
791
|
}
|
|
515
792
|
}
|
|
516
793
|
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
type WorkflowId = string;
|
|
522
|
-
type LocaleId = string;
|
|
523
|
-
type Locale = string;
|
|
524
|
-
type LocalisedMarkdown = string;
|
|
525
|
-
type LocalisedContent = string;
|
|
526
|
-
type ReleaseId = string;
|
|
527
|
-
type TemplateId = string;
|
|
528
|
-
type LinkType = "internal" | "external" | "phone";
|
|
529
|
-
type TemplateType = "page";
|
|
530
|
-
interface Site {
|
|
531
|
-
name: string;
|
|
532
|
-
contentType: "OK" | "NOT_CREATED" | "EMPTY" | "ERRORS" | "NO_CONNECTION";
|
|
533
|
-
locales: Record<string, SiteLocale>;
|
|
534
|
-
pages: Record<PageId, Page>;
|
|
535
|
-
links: Record<LinkId, Link>;
|
|
536
|
-
articles: Record<ArticleId, Article>;
|
|
537
|
-
workflows: Record<WorkflowId, Workflow>;
|
|
538
|
-
releases: Record<ReleaseId, Release>;
|
|
539
|
-
templates: Record<TemplateId, Template>;
|
|
540
|
-
}
|
|
541
|
-
interface SiteLocale {
|
|
542
|
-
id: LocaleId;
|
|
543
|
-
body: {
|
|
544
|
-
value: Locale;
|
|
545
|
-
enabled: boolean;
|
|
546
|
-
};
|
|
794
|
+
|
|
795
|
+
declare namespace Composer {
|
|
796
|
+
interface Nav {
|
|
797
|
+
value?: string | null;
|
|
547
798
|
}
|
|
548
|
-
interface
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
enabled: boolean;
|
|
799
|
+
interface TabData {
|
|
800
|
+
nav?: Nav;
|
|
801
|
+
withNav(nav: Nav): TabData;
|
|
552
802
|
}
|
|
553
|
-
interface
|
|
554
|
-
id: PageId;
|
|
555
|
-
created: string;
|
|
556
|
-
modified: string;
|
|
557
|
-
body: {
|
|
558
|
-
article: ArticleId;
|
|
559
|
-
locale: Locale;
|
|
560
|
-
content: LocalisedMarkdown;
|
|
561
|
-
devMode?: boolean;
|
|
562
|
-
};
|
|
803
|
+
interface Tab extends BurgerApi.TabSession<TabData> {
|
|
563
804
|
}
|
|
564
|
-
interface
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
805
|
+
interface DebugSession {
|
|
806
|
+
error?: HdesApi.StoreError;
|
|
807
|
+
debug?: HdesApi.DebugResponse;
|
|
808
|
+
csv?: string;
|
|
809
|
+
json?: string;
|
|
810
|
+
selected: HdesApi.EntityId;
|
|
811
|
+
inputType: DebugInputType;
|
|
569
812
|
}
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
name: string;
|
|
575
|
-
description: string;
|
|
576
|
-
content: string;
|
|
577
|
-
};
|
|
813
|
+
type DebugInputType = "CSV" | "JSON";
|
|
814
|
+
interface DebugSessions {
|
|
815
|
+
selected?: HdesApi.EntityId;
|
|
816
|
+
values: Record<HdesApi.EntityId, DebugSession>;
|
|
578
817
|
}
|
|
579
|
-
interface
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
content: string;
|
|
818
|
+
interface PageUpdate {
|
|
819
|
+
saved: boolean;
|
|
820
|
+
origin: HdesApi.Entity<any>;
|
|
821
|
+
value: HdesApi.AstCommand[];
|
|
822
|
+
withValue(value: HdesApi.AstCommand[]): PageUpdate;
|
|
585
823
|
}
|
|
586
|
-
interface
|
|
587
|
-
|
|
588
|
-
|
|
824
|
+
interface Session {
|
|
825
|
+
site: HdesApi.Site;
|
|
826
|
+
pages: Record<HdesApi.EntityId, PageUpdate>;
|
|
827
|
+
debug: DebugSessions;
|
|
828
|
+
branchName?: string;
|
|
829
|
+
getDecision(decisionName: string): undefined | HdesApi.Entity<HdesApi.AstDecision>;
|
|
830
|
+
getFlow(flowName: string): undefined | HdesApi.Entity<HdesApi.AstFlow>;
|
|
831
|
+
getService(serviceName: string): undefined | HdesApi.Entity<HdesApi.AstService>;
|
|
832
|
+
getEntity(id: HdesApi.EntityId): undefined | HdesApi.Entity<any>;
|
|
833
|
+
withDebug(page: DebugSession): Session;
|
|
834
|
+
withPage(page: HdesApi.EntityId): Session;
|
|
835
|
+
withPageValue(page: HdesApi.EntityId, value: HdesApi.AstCommand[]): Session;
|
|
836
|
+
withoutPages(pages: HdesApi.EntityId[]): Session;
|
|
837
|
+
withBranch(branchName?: string): Session;
|
|
838
|
+
withSite(site: HdesApi.Site): Session;
|
|
839
|
+
}
|
|
840
|
+
interface Actions {
|
|
841
|
+
handleLoad(): Promise<void>;
|
|
842
|
+
handleLoadSite(site?: HdesApi.Site): Promise<void>;
|
|
843
|
+
handleDebugUpdate(debug: DebugSession): void;
|
|
844
|
+
handlePageUpdate(page: HdesApi.EntityId, value: HdesApi.AstCommand[]): void;
|
|
845
|
+
handlePageUpdateRemove(pages: HdesApi.EntityId[]): void;
|
|
846
|
+
handleBranchUpdate(branchName?: string): void;
|
|
847
|
+
}
|
|
848
|
+
interface ContextType {
|
|
849
|
+
session: Session;
|
|
850
|
+
actions: Actions;
|
|
851
|
+
service: HdesApi.Service;
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
|
|
856
|
+
declare namespace Composer {
|
|
857
|
+
const createTab: (props: {
|
|
858
|
+
nav: Composer.Nav;
|
|
859
|
+
page?: HdesApi.Entity<any>;
|
|
860
|
+
}) => ImmutableTabData;
|
|
861
|
+
const ComposerContext: React.Context<ContextType>;
|
|
862
|
+
const useUnsaved: (entity: HdesApi.Entity<any>) => boolean;
|
|
863
|
+
const useComposer: () => {
|
|
864
|
+
session: Session;
|
|
865
|
+
service: HdesApi.Service;
|
|
866
|
+
actions: Actions;
|
|
867
|
+
site: HdesApi.Site;
|
|
868
|
+
isArticleSaved: (entity: HdesApi.Entity<any>) => boolean;
|
|
869
|
+
};
|
|
870
|
+
const useSite: () => HdesApi.Site;
|
|
871
|
+
const useBranchName: () => string | undefined;
|
|
872
|
+
const useSession: () => Session;
|
|
873
|
+
const useNav: () => {
|
|
874
|
+
handleInTab: (props: {
|
|
875
|
+
article: HdesApi.Entity<any>;
|
|
876
|
+
}) => void;
|
|
877
|
+
findTab: (article: HdesApi.Entity<any>) => Composer.Tab | undefined;
|
|
878
|
+
};
|
|
879
|
+
const useDebug: () => {
|
|
880
|
+
handleDebugInit: (selected: HdesApi.EntityId) => void;
|
|
881
|
+
};
|
|
882
|
+
const Provider: React.FC<{
|
|
883
|
+
children: React.ReactNode;
|
|
884
|
+
service: HdesApi.Service;
|
|
885
|
+
}>;
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
|
|
889
|
+
declare namespace Composer {
|
|
890
|
+
interface SearchData {
|
|
891
|
+
values: readonly SearchDataEntry[];
|
|
892
|
+
filterLinks(keyword: string): readonly SearchResult[];
|
|
893
|
+
filterWorkflows(keyword: string): readonly SearchResult[];
|
|
894
|
+
filterArticles(keyword: string): readonly SearchResult[];
|
|
895
|
+
}
|
|
896
|
+
interface SearchDataEntry {
|
|
897
|
+
id: string;
|
|
898
|
+
type: "ARTICLE" | "LINK" | "WORKFLOW";
|
|
899
|
+
values: readonly SearchableValue[];
|
|
900
|
+
}
|
|
901
|
+
interface SearchResult {
|
|
902
|
+
source: SearchDataEntry;
|
|
903
|
+
matches: SearchableValue[];
|
|
904
|
+
}
|
|
905
|
+
interface SearchableValue {
|
|
906
|
+
id: string;
|
|
907
|
+
value: string;
|
|
908
|
+
type: "ARTICLE_NAME" | "ARTICLE_PAGE" | "WORKFLOW_NAME" | "WORKFLOW_LABEL" | "LINK_VALUE" | "LINK_LABEL";
|
|
909
|
+
}
|
|
910
|
+
type NavType = "ARTICLE_LINKS" | "ARTICLE_WORKFLOWS" | "ARTICLE_PAGES";
|
|
911
|
+
interface Nav {
|
|
912
|
+
type: NavType;
|
|
913
|
+
value?: string | null;
|
|
914
|
+
value2?: string | null;
|
|
915
|
+
}
|
|
916
|
+
interface TabData {
|
|
917
|
+
nav?: Nav;
|
|
918
|
+
withNav(nav: Nav): TabData;
|
|
919
|
+
}
|
|
920
|
+
interface Tab extends BurgerApi.TabSession<TabData> {
|
|
921
|
+
}
|
|
922
|
+
interface PageUpdate {
|
|
923
|
+
saved: boolean;
|
|
924
|
+
origin: StencilClient.Page;
|
|
925
|
+
value: StencilClient.LocalisedContent;
|
|
926
|
+
withValue(value: StencilClient.LocalisedContent): PageUpdate;
|
|
927
|
+
}
|
|
928
|
+
interface SessionFilter {
|
|
929
|
+
locale?: StencilClient.LocaleId;
|
|
930
|
+
withLocale(locale?: StencilClient.LocaleId): SessionFilter;
|
|
931
|
+
}
|
|
932
|
+
interface Session {
|
|
933
|
+
site: StencilClient.Site;
|
|
934
|
+
pages: Record<StencilClient.PageId, PageUpdate>;
|
|
935
|
+
articles: ArticleView[];
|
|
936
|
+
workflows: WorkflowView[];
|
|
937
|
+
links: LinkView[];
|
|
938
|
+
search: SearchData;
|
|
939
|
+
filter: SessionFilter;
|
|
940
|
+
getArticleName(articleId: StencilClient.ArticleId): {
|
|
941
|
+
missing: boolean;
|
|
942
|
+
name: string;
|
|
943
|
+
};
|
|
944
|
+
getArticleView(articleId: StencilClient.ArticleId): ArticleView;
|
|
945
|
+
getLinkView(linkId: StencilClient.LinkId): LinkView;
|
|
946
|
+
getLinkName(linkId: StencilClient.LinkId): {
|
|
947
|
+
missing: boolean;
|
|
948
|
+
name: string;
|
|
949
|
+
};
|
|
950
|
+
getWorkflowView(workflowId: StencilClient.WorkflowId): WorkflowView;
|
|
951
|
+
getWorkflowName(workflowId: StencilClient.WorkflowId): {
|
|
952
|
+
missing: boolean;
|
|
953
|
+
name: string;
|
|
954
|
+
};
|
|
955
|
+
getArticlesForLocale(locale: StencilClient.LocaleId): StencilClient.Article[];
|
|
956
|
+
getArticlesForLocales(locales: StencilClient.LocaleId[]): StencilClient.Article[];
|
|
957
|
+
withPage(page: StencilClient.PageId): Session;
|
|
958
|
+
withPageValue(page: StencilClient.PageId, value: StencilClient.LocalisedContent): Session;
|
|
959
|
+
withoutPages(pages: StencilClient.PageId[]): Session;
|
|
960
|
+
withLocaleFilter(locale?: StencilClient.LocaleId): Session;
|
|
961
|
+
withSite(site: StencilClient.Site): Session;
|
|
962
|
+
}
|
|
963
|
+
interface Actions {
|
|
964
|
+
handleLoad(): Promise<void>;
|
|
965
|
+
handleLoadSite(): Promise<void>;
|
|
966
|
+
handlePageUpdate(page: StencilClient.PageId, value: StencilClient.LocalisedContent): void;
|
|
967
|
+
handlePageUpdateRemove(pages: StencilClient.PageId[]): void;
|
|
968
|
+
handleLocaleFilter(locale?: StencilClient.LocaleId): void;
|
|
969
|
+
}
|
|
970
|
+
interface ContextType {
|
|
971
|
+
session: Session;
|
|
972
|
+
actions: Actions;
|
|
973
|
+
service: StencilClient.Service;
|
|
974
|
+
}
|
|
975
|
+
interface ArticleView {
|
|
976
|
+
article: StencilClient.Article;
|
|
977
|
+
pages: PageView[];
|
|
978
|
+
canCreate: StencilClient.SiteLocale[];
|
|
979
|
+
links: LinkView[];
|
|
980
|
+
workflows: WorkflowView[];
|
|
981
|
+
children: Composer.ArticleView[];
|
|
982
|
+
displayOrder: number;
|
|
983
|
+
getPageById(pageId: StencilClient.PageId): PageView;
|
|
984
|
+
getPageByLocaleId(localeId: StencilClient.LocaleId): PageView;
|
|
985
|
+
findPageByLocaleId(localeId: StencilClient.LocaleId): PageView | undefined;
|
|
986
|
+
}
|
|
987
|
+
interface PageView {
|
|
988
|
+
title: string;
|
|
989
|
+
page: StencilClient.Page;
|
|
990
|
+
locale: StencilClient.SiteLocale;
|
|
991
|
+
}
|
|
992
|
+
interface LinkView {
|
|
993
|
+
link: StencilClient.Link;
|
|
994
|
+
labels: LabelView[];
|
|
995
|
+
}
|
|
996
|
+
interface WorkflowView {
|
|
997
|
+
workflow: StencilClient.Workflow;
|
|
998
|
+
labels: LabelView[];
|
|
999
|
+
}
|
|
1000
|
+
interface LabelView {
|
|
1001
|
+
label: StencilClient.LocaleLabel;
|
|
1002
|
+
locale: StencilClient.SiteLocale;
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
|
|
1007
|
+
declare namespace Composer {
|
|
1008
|
+
const createTab: (props: {
|
|
1009
|
+
nav: Composer.Nav;
|
|
1010
|
+
page?: StencilClient.Page;
|
|
1011
|
+
}) => ImmutableTabData;
|
|
1012
|
+
const ComposerContext: React.Context<ContextType>;
|
|
1013
|
+
const useUnsaved: (article: StencilClient.Article) => boolean;
|
|
1014
|
+
const useComposer: () => {
|
|
1015
|
+
session: Session;
|
|
1016
|
+
service: StencilClient.Service;
|
|
1017
|
+
actions: Actions;
|
|
1018
|
+
site: StencilClient.Site;
|
|
1019
|
+
isArticleSaved: (article: StencilClient.Article) => boolean;
|
|
1020
|
+
};
|
|
1021
|
+
const useSite: () => StencilClient.Site;
|
|
1022
|
+
const useSession: () => Session;
|
|
1023
|
+
const useNav: () => {
|
|
1024
|
+
handleInTab: (props: {
|
|
1025
|
+
article: StencilClient.Article;
|
|
1026
|
+
type: Composer.NavType;
|
|
1027
|
+
locale?: string | null;
|
|
1028
|
+
secondary?: boolean;
|
|
1029
|
+
}) => void;
|
|
1030
|
+
findTab: (article: StencilClient.Article) => Composer.Tab | undefined;
|
|
1031
|
+
};
|
|
1032
|
+
const Provider: React.FC<{
|
|
1033
|
+
children: React.ReactNode;
|
|
1034
|
+
service: StencilClient.Service;
|
|
1035
|
+
}>;
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
declare namespace StencilClient {
|
|
1039
|
+
type PageId = string;
|
|
1040
|
+
type LinkId = string;
|
|
1041
|
+
type ArticleId = string;
|
|
1042
|
+
type WorkflowId = string;
|
|
1043
|
+
type LocaleId = string;
|
|
1044
|
+
type Locale = string;
|
|
1045
|
+
type LocalisedMarkdown = string;
|
|
1046
|
+
type LocalisedContent = string;
|
|
1047
|
+
type ReleaseId = string;
|
|
1048
|
+
type TemplateId = string;
|
|
1049
|
+
type LinkType = "internal" | "external" | "phone";
|
|
1050
|
+
type TemplateType = "page";
|
|
1051
|
+
interface Site {
|
|
1052
|
+
name: string;
|
|
1053
|
+
contentType: "OK" | "NOT_CREATED" | "EMPTY" | "ERRORS" | "NO_CONNECTION";
|
|
1054
|
+
locales: Record<string, SiteLocale>;
|
|
1055
|
+
pages: Record<PageId, Page>;
|
|
1056
|
+
links: Record<LinkId, Link>;
|
|
1057
|
+
articles: Record<ArticleId, Article>;
|
|
1058
|
+
workflows: Record<WorkflowId, Workflow>;
|
|
1059
|
+
releases: Record<ReleaseId, Release>;
|
|
1060
|
+
templates: Record<TemplateId, Template>;
|
|
1061
|
+
}
|
|
1062
|
+
interface SiteLocale {
|
|
1063
|
+
id: LocaleId;
|
|
1064
|
+
body: {
|
|
1065
|
+
value: Locale;
|
|
1066
|
+
enabled: boolean;
|
|
1067
|
+
};
|
|
1068
|
+
}
|
|
1069
|
+
interface LocaleMutator {
|
|
1070
|
+
localeId: LocaleId;
|
|
1071
|
+
value: string;
|
|
1072
|
+
enabled: boolean;
|
|
1073
|
+
}
|
|
1074
|
+
interface Page {
|
|
1075
|
+
id: PageId;
|
|
1076
|
+
created: string;
|
|
1077
|
+
modified: string;
|
|
1078
|
+
body: {
|
|
1079
|
+
article: ArticleId;
|
|
1080
|
+
locale: Locale;
|
|
1081
|
+
content: LocalisedMarkdown;
|
|
1082
|
+
devMode?: boolean;
|
|
1083
|
+
};
|
|
1084
|
+
}
|
|
1085
|
+
interface PageMutator {
|
|
1086
|
+
pageId: PageId;
|
|
1087
|
+
locale: Locale;
|
|
1088
|
+
content: LocalisedContent;
|
|
1089
|
+
devMode: boolean | undefined;
|
|
1090
|
+
}
|
|
1091
|
+
interface Template {
|
|
1092
|
+
id: TemplateId;
|
|
1093
|
+
body: {
|
|
1094
|
+
type: TemplateType;
|
|
1095
|
+
name: string;
|
|
1096
|
+
description: string;
|
|
1097
|
+
content: string;
|
|
1098
|
+
};
|
|
1099
|
+
}
|
|
1100
|
+
interface TemplateMutator {
|
|
1101
|
+
id: TemplateId;
|
|
1102
|
+
type: TemplateType;
|
|
1103
|
+
name: string;
|
|
1104
|
+
description: string;
|
|
1105
|
+
content: string;
|
|
1106
|
+
}
|
|
1107
|
+
interface Article {
|
|
1108
|
+
id: ArticleId;
|
|
1109
|
+
body: {
|
|
589
1110
|
parentId?: ArticleId;
|
|
590
1111
|
name: string;
|
|
591
1112
|
order: number;
|
|
@@ -794,276 +1315,32 @@ declare namespace StencilClient {
|
|
|
794
1315
|
}) => Service;
|
|
795
1316
|
}
|
|
796
1317
|
|
|
797
|
-
|
|
798
|
-
declare namespace Composer {
|
|
799
|
-
interface SearchData {
|
|
800
|
-
values: readonly SearchDataEntry[];
|
|
801
|
-
filterLinks(keyword: string): readonly SearchResult[];
|
|
802
|
-
filterWorkflows(keyword: string): readonly SearchResult[];
|
|
803
|
-
filterArticles(keyword: string): readonly SearchResult[];
|
|
804
|
-
}
|
|
805
|
-
interface SearchDataEntry {
|
|
806
|
-
id: string;
|
|
807
|
-
type: "ARTICLE" | "LINK" | "WORKFLOW";
|
|
808
|
-
values: readonly SearchableValue[];
|
|
809
|
-
}
|
|
810
|
-
interface SearchResult {
|
|
811
|
-
source: SearchDataEntry;
|
|
812
|
-
matches: SearchableValue[];
|
|
813
|
-
}
|
|
814
|
-
interface SearchableValue {
|
|
815
|
-
id: string;
|
|
816
|
-
value: string;
|
|
817
|
-
type: "ARTICLE_NAME" | "ARTICLE_PAGE" | "WORKFLOW_NAME" | "WORKFLOW_LABEL" | "LINK_VALUE" | "LINK_LABEL";
|
|
818
|
-
}
|
|
819
|
-
type NavType = "ARTICLE_LINKS" | "ARTICLE_WORKFLOWS" | "ARTICLE_PAGES";
|
|
820
|
-
interface Nav {
|
|
821
|
-
type: NavType;
|
|
822
|
-
value?: string | null;
|
|
823
|
-
value2?: string | null;
|
|
824
|
-
}
|
|
825
|
-
interface TabData {
|
|
826
|
-
nav?: Nav;
|
|
827
|
-
withNav(nav: Nav): TabData;
|
|
828
|
-
}
|
|
829
|
-
interface Tab extends Burger.TabSession<TabData> {
|
|
830
|
-
}
|
|
831
|
-
interface PageUpdate {
|
|
832
|
-
saved: boolean;
|
|
833
|
-
origin: StencilClient.Page;
|
|
834
|
-
value: StencilClient.LocalisedContent;
|
|
835
|
-
withValue(value: StencilClient.LocalisedContent): PageUpdate;
|
|
836
|
-
}
|
|
837
|
-
interface SessionFilter {
|
|
838
|
-
locale?: StencilClient.LocaleId;
|
|
839
|
-
withLocale(locale?: StencilClient.LocaleId): SessionFilter;
|
|
840
|
-
}
|
|
841
|
-
interface Session {
|
|
842
|
-
site: StencilClient.Site;
|
|
843
|
-
pages: Record<StencilClient.PageId, PageUpdate>;
|
|
844
|
-
articles: ArticleView[];
|
|
845
|
-
workflows: WorkflowView[];
|
|
846
|
-
links: LinkView[];
|
|
847
|
-
search: SearchData;
|
|
848
|
-
filter: SessionFilter;
|
|
849
|
-
getArticleName(articleId: StencilClient.ArticleId): {
|
|
850
|
-
missing: boolean;
|
|
851
|
-
name: string;
|
|
852
|
-
};
|
|
853
|
-
getArticleView(articleId: StencilClient.ArticleId): ArticleView;
|
|
854
|
-
getLinkView(linkId: StencilClient.LinkId): LinkView;
|
|
855
|
-
getLinkName(linkId: StencilClient.LinkId): {
|
|
856
|
-
missing: boolean;
|
|
857
|
-
name: string;
|
|
858
|
-
};
|
|
859
|
-
getWorkflowView(workflowId: StencilClient.WorkflowId): WorkflowView;
|
|
860
|
-
getWorkflowName(workflowId: StencilClient.WorkflowId): {
|
|
861
|
-
missing: boolean;
|
|
862
|
-
name: string;
|
|
863
|
-
};
|
|
864
|
-
getArticlesForLocale(locale: StencilClient.LocaleId): StencilClient.Article[];
|
|
865
|
-
getArticlesForLocales(locales: StencilClient.LocaleId[]): StencilClient.Article[];
|
|
866
|
-
withPage(page: StencilClient.PageId): Session;
|
|
867
|
-
withPageValue(page: StencilClient.PageId, value: StencilClient.LocalisedContent): Session;
|
|
868
|
-
withoutPages(pages: StencilClient.PageId[]): Session;
|
|
869
|
-
withLocaleFilter(locale?: StencilClient.LocaleId): Session;
|
|
870
|
-
withSite(site: StencilClient.Site): Session;
|
|
871
|
-
}
|
|
872
|
-
interface Actions {
|
|
873
|
-
handleLoad(): Promise<void>;
|
|
874
|
-
handleLoadSite(): Promise<void>;
|
|
875
|
-
handlePageUpdate(page: StencilClient.PageId, value: StencilClient.LocalisedContent): void;
|
|
876
|
-
handlePageUpdateRemove(pages: StencilClient.PageId[]): void;
|
|
877
|
-
handleLocaleFilter(locale?: StencilClient.LocaleId): void;
|
|
878
|
-
}
|
|
879
|
-
interface ContextType {
|
|
880
|
-
session: Session;
|
|
881
|
-
actions: Actions;
|
|
882
|
-
service: StencilClient.Service;
|
|
883
|
-
}
|
|
884
|
-
interface ArticleView {
|
|
885
|
-
article: StencilClient.Article;
|
|
886
|
-
pages: PageView[];
|
|
887
|
-
canCreate: StencilClient.SiteLocale[];
|
|
888
|
-
links: LinkView[];
|
|
889
|
-
workflows: WorkflowView[];
|
|
890
|
-
children: Composer.ArticleView[];
|
|
891
|
-
displayOrder: number;
|
|
892
|
-
getPageById(pageId: StencilClient.PageId): PageView;
|
|
893
|
-
getPageByLocaleId(localeId: StencilClient.LocaleId): PageView;
|
|
894
|
-
findPageByLocaleId(localeId: StencilClient.LocaleId): PageView | undefined;
|
|
895
|
-
}
|
|
896
|
-
interface PageView {
|
|
897
|
-
title: string;
|
|
898
|
-
page: StencilClient.Page;
|
|
899
|
-
locale: StencilClient.SiteLocale;
|
|
900
|
-
}
|
|
901
|
-
interface LinkView {
|
|
902
|
-
link: StencilClient.Link;
|
|
903
|
-
labels: LabelView[];
|
|
904
|
-
}
|
|
905
|
-
interface WorkflowView {
|
|
906
|
-
workflow: StencilClient.Workflow;
|
|
907
|
-
labels: LabelView[];
|
|
908
|
-
}
|
|
909
|
-
interface LabelView {
|
|
910
|
-
label: StencilClient.LocaleLabel;
|
|
911
|
-
locale: StencilClient.SiteLocale;
|
|
912
|
-
}
|
|
913
|
-
}
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
declare namespace Composer {
|
|
917
|
-
const createTab: (props: {
|
|
918
|
-
nav: Composer.Nav;
|
|
919
|
-
page?: StencilClient.Page;
|
|
920
|
-
}) => ImmutableTabData;
|
|
921
|
-
const ComposerContext: React.Context<ContextType>;
|
|
922
|
-
const useUnsaved: (article: StencilClient.Article) => boolean;
|
|
923
|
-
const useComposer: () => {
|
|
924
|
-
session: Session;
|
|
925
|
-
service: StencilClient.Service;
|
|
926
|
-
actions: Actions;
|
|
927
|
-
site: StencilClient.Site;
|
|
928
|
-
isArticleSaved: (article: StencilClient.Article) => boolean;
|
|
929
|
-
};
|
|
930
|
-
const useSite: () => StencilClient.Site;
|
|
931
|
-
const useSession: () => Session;
|
|
932
|
-
const useNav: () => {
|
|
933
|
-
handleInTab: (props: {
|
|
934
|
-
article: StencilClient.Article;
|
|
935
|
-
type: Composer.NavType;
|
|
936
|
-
locale?: string | null;
|
|
937
|
-
secondary?: boolean;
|
|
938
|
-
}) => void;
|
|
939
|
-
findTab: (article: StencilClient.Article) => Composer.Tab | undefined;
|
|
940
|
-
};
|
|
941
|
-
const Provider: React.FC<{
|
|
942
|
-
children: React.ReactNode;
|
|
943
|
-
service: StencilClient.Service;
|
|
944
|
-
}>;
|
|
945
|
-
}
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
declare namespace Composer {
|
|
949
|
-
interface Nav {
|
|
950
|
-
value?: string | null;
|
|
951
|
-
}
|
|
952
|
-
interface TabData {
|
|
953
|
-
nav?: Nav;
|
|
954
|
-
withNav(nav: Nav): TabData;
|
|
955
|
-
}
|
|
956
|
-
interface Tab extends Burger.TabSession<TabData> {
|
|
957
|
-
}
|
|
958
|
-
interface DebugSession {
|
|
959
|
-
error?: HdesClient.StoreError;
|
|
960
|
-
debug?: HdesClient.DebugResponse;
|
|
961
|
-
csv?: string;
|
|
962
|
-
json?: string;
|
|
963
|
-
selected: HdesClient.EntityId;
|
|
964
|
-
inputType: DebugInputType;
|
|
965
|
-
}
|
|
966
|
-
type DebugInputType = "CSV" | "JSON";
|
|
967
|
-
interface DebugSessions {
|
|
968
|
-
selected?: HdesClient.EntityId;
|
|
969
|
-
values: Record<HdesClient.EntityId, DebugSession>;
|
|
970
|
-
}
|
|
971
|
-
interface PageUpdate {
|
|
972
|
-
saved: boolean;
|
|
973
|
-
origin: HdesClient.Entity<any>;
|
|
974
|
-
value: HdesClient.AstCommand[];
|
|
975
|
-
withValue(value: HdesClient.AstCommand[]): PageUpdate;
|
|
976
|
-
}
|
|
977
|
-
interface Session {
|
|
978
|
-
site: HdesClient.Site;
|
|
979
|
-
pages: Record<HdesClient.EntityId, PageUpdate>;
|
|
980
|
-
debug: DebugSessions;
|
|
981
|
-
branchName?: string;
|
|
982
|
-
getDecision(decisionName: string): undefined | HdesClient.Entity<HdesClient.AstDecision>;
|
|
983
|
-
getFlow(flowName: string): undefined | HdesClient.Entity<HdesClient.AstFlow>;
|
|
984
|
-
getService(serviceName: string): undefined | HdesClient.Entity<HdesClient.AstService>;
|
|
985
|
-
getEntity(id: HdesClient.EntityId): undefined | HdesClient.Entity<any>;
|
|
986
|
-
withDebug(page: DebugSession): Session;
|
|
987
|
-
withPage(page: HdesClient.EntityId): Session;
|
|
988
|
-
withPageValue(page: HdesClient.EntityId, value: HdesClient.AstCommand[]): Session;
|
|
989
|
-
withoutPages(pages: HdesClient.EntityId[]): Session;
|
|
990
|
-
withBranch(branchName?: string): Session;
|
|
991
|
-
withSite(site: HdesClient.Site): Session;
|
|
992
|
-
}
|
|
993
|
-
interface Actions {
|
|
994
|
-
handleLoad(): Promise<void>;
|
|
995
|
-
handleLoadSite(site?: HdesClient.Site): Promise<void>;
|
|
996
|
-
handleDebugUpdate(debug: DebugSession): void;
|
|
997
|
-
handlePageUpdate(page: HdesClient.EntityId, value: HdesClient.AstCommand[]): void;
|
|
998
|
-
handlePageUpdateRemove(pages: HdesClient.EntityId[]): void;
|
|
999
|
-
handleBranchUpdate(branchName?: string): void;
|
|
1000
|
-
}
|
|
1001
|
-
interface ContextType {
|
|
1002
|
-
session: Session;
|
|
1003
|
-
actions: Actions;
|
|
1004
|
-
service: HdesClient.Service;
|
|
1005
|
-
}
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
declare namespace Composer {
|
|
1010
|
-
const createTab: (props: {
|
|
1011
|
-
nav: Composer.Nav;
|
|
1012
|
-
page?: HdesClient.Entity<any>;
|
|
1013
|
-
}) => ImmutableTabData;
|
|
1014
|
-
const ComposerContext: React.Context<ContextType>;
|
|
1015
|
-
const useUnsaved: (entity: HdesClient.Entity<any>) => boolean;
|
|
1016
|
-
const useComposer: () => {
|
|
1017
|
-
session: Session;
|
|
1018
|
-
service: HdesClient.Service;
|
|
1019
|
-
actions: Actions;
|
|
1020
|
-
site: HdesClient.Site;
|
|
1021
|
-
isArticleSaved: (entity: HdesClient.Entity<any>) => boolean;
|
|
1022
|
-
};
|
|
1023
|
-
const useSite: () => HdesClient.Site;
|
|
1024
|
-
const useBranchName: () => string | undefined;
|
|
1025
|
-
const useSession: () => Session;
|
|
1026
|
-
const useNav: () => {
|
|
1027
|
-
handleInTab: (props: {
|
|
1028
|
-
article: HdesClient.Entity<any>;
|
|
1029
|
-
}) => void;
|
|
1030
|
-
findTab: (article: HdesClient.Entity<any>) => Composer.Tab | undefined;
|
|
1031
|
-
};
|
|
1032
|
-
const useDebug: () => {
|
|
1033
|
-
handleDebugInit: (selected: HdesClient.EntityId) => void;
|
|
1034
|
-
};
|
|
1035
|
-
const Provider: React.FC<{
|
|
1036
|
-
children: React.ReactNode;
|
|
1037
|
-
service: HdesClient.Service;
|
|
1038
|
-
}>;
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
1318
|
declare namespace Decision {
|
|
1042
1319
|
const Table: import("react").FC<{
|
|
1043
|
-
ast: import("../../client
|
|
1320
|
+
ast: import("../../client").HdesApi.AstDecision;
|
|
1044
1321
|
renderHeader: (props: import("./DecisionTable").RenderHeaderProps) => React.ReactNode;
|
|
1045
1322
|
renderRow: (props: import("./DecisionTable").RenderRowProps) => React.ReactNode;
|
|
1046
1323
|
renderCell: (props: import("./DecisionTable").RenderCellProps) => React.ReactNode;
|
|
1047
1324
|
}>;
|
|
1048
1325
|
const Cell: import("react").FC<{
|
|
1049
|
-
row: import("../../client
|
|
1050
|
-
header: import("../../client
|
|
1051
|
-
cell: import("../../client
|
|
1326
|
+
row: import("../../client").HdesApi.AstDecisionRow;
|
|
1327
|
+
header: import("../../client").HdesApi.TypeDef;
|
|
1328
|
+
cell: import("../../client").HdesApi.AstDecisionCell;
|
|
1052
1329
|
onClick: () => void;
|
|
1053
1330
|
}>;
|
|
1054
1331
|
const Header: import("react").FC<{
|
|
1055
|
-
ast: import("../../client
|
|
1056
|
-
headers: import("../../client
|
|
1332
|
+
ast: import("../../client").HdesApi.AstDecision;
|
|
1333
|
+
headers: import("../../client").HdesApi.TypeDef[];
|
|
1057
1334
|
children: React.ReactNode;
|
|
1058
|
-
onClick: (header: import("../../client
|
|
1335
|
+
onClick: (header: import("../../client").HdesApi.TypeDef) => void;
|
|
1059
1336
|
}>;
|
|
1060
1337
|
const Row: import("react").FC<{
|
|
1061
|
-
row: import("../../client
|
|
1062
|
-
headers: import("../../client
|
|
1338
|
+
row: import("../../client").HdesApi.AstDecisionRow;
|
|
1339
|
+
headers: import("../../client").HdesApi.TypeDef[];
|
|
1063
1340
|
renderCell: (props: {
|
|
1064
|
-
row: import("../../client
|
|
1065
|
-
header: import("../../client
|
|
1066
|
-
cell: import("../../client
|
|
1341
|
+
row: import("../../client").HdesApi.AstDecisionRow;
|
|
1342
|
+
header: import("../../client").HdesApi.TypeDef;
|
|
1343
|
+
cell: import("../../client").HdesApi.AstDecisionCell;
|
|
1067
1344
|
}) => React.ReactNode;
|
|
1068
1345
|
}>;
|
|
1069
1346
|
}
|