@api-client/core 0.14.6 → 0.14.8
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/src/amf/ApiSchemaValues.js.map +1 -1
- package/build/src/modeling/ApiModel.d.ts +27 -17
- package/build/src/modeling/ApiModel.d.ts.map +1 -1
- package/build/src/modeling/ApiModel.js +69 -20
- package/build/src/modeling/ApiModel.js.map +1 -1
- package/build/src/modeling/DataDomain.d.ts +34 -20
- package/build/src/modeling/DataDomain.d.ts.map +1 -1
- package/build/src/modeling/DataDomain.js +64 -24
- package/build/src/modeling/DataDomain.js.map +1 -1
- package/build/src/modeling/DependentModel.d.ts +26 -0
- package/build/src/modeling/DependentModel.d.ts.map +1 -0
- package/build/src/modeling/DependentModel.js +23 -0
- package/build/src/modeling/DependentModel.js.map +1 -0
- package/build/src/modeling/types.d.ts +2 -0
- package/build/src/modeling/types.d.ts.map +1 -1
- package/build/src/modeling/types.js.map +1 -1
- package/build/src/models/store/Backend.d.ts +0 -168
- package/build/src/models/store/Backend.d.ts.map +1 -1
- package/build/src/models/store/Backend.js +1 -12
- package/build/src/models/store/Backend.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/data/models/example-generator-api.json +16 -16
- package/package.json +1 -1
- package/src/amf/ApiSchemaValues.ts +1 -1
- package/src/modeling/ApiModel.ts +74 -31
- package/src/modeling/DataDomain.ts +65 -35
- package/src/modeling/DependentModel.ts +36 -0
- package/src/modeling/types.ts +2 -0
- package/src/models/store/Backend.ts +0 -176
- package/tests/unit/modeling/api_model.spec.ts +17 -15
- package/tests/unit/modeling/data_domain_foreign.spec.ts +172 -39
|
@@ -1,172 +1,4 @@
|
|
|
1
1
|
import type { PatchInfo } from '../../patch/types.js';
|
|
2
|
-
import { type IPatchRevision } from '../../events/BaseEvents.js';
|
|
3
|
-
import { type IHttpHistory, Kind as HttpHistoryKind } from '../HttpHistory.js';
|
|
4
|
-
import { Kind as ProjectExecutionKind } from '../ProjectExecution.js';
|
|
5
|
-
import type { IFile } from './File.js';
|
|
6
|
-
import type { IPermission } from './Permission.js';
|
|
7
|
-
import type { IRevision } from './Revision.js';
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated
|
|
10
|
-
*/
|
|
11
|
-
export declare enum BackendCommandType {
|
|
12
|
-
observe = 0,
|
|
13
|
-
unobserve = 1
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* @deprecated
|
|
17
|
-
*/
|
|
18
|
-
export declare const BackendCommandKind = "Core#BackendCommand";
|
|
19
|
-
/**
|
|
20
|
-
* @deprecated
|
|
21
|
-
*/
|
|
22
|
-
export interface IBackendCommand {
|
|
23
|
-
kind: typeof BackendCommandKind;
|
|
24
|
-
cmd: BackendCommandType;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* @deprecated
|
|
28
|
-
*/
|
|
29
|
-
export interface IBackendObserveCommand extends IBackendCommand {
|
|
30
|
-
path: string;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* @deprecated
|
|
34
|
-
*/
|
|
35
|
-
export interface BroadcastEvent {
|
|
36
|
-
type: 'event';
|
|
37
|
-
operation: string;
|
|
38
|
-
kind: string;
|
|
39
|
-
key: string;
|
|
40
|
-
path: string;
|
|
41
|
-
organization: string;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* @deprecated
|
|
45
|
-
*/
|
|
46
|
-
export interface BackendErrorEvent {
|
|
47
|
-
type: 'error';
|
|
48
|
-
cause: string;
|
|
49
|
-
time: number;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* @deprecated
|
|
53
|
-
*/
|
|
54
|
-
export interface ClearedBroadcastEvent {
|
|
55
|
-
type: 'event';
|
|
56
|
-
operation: 'cleared';
|
|
57
|
-
name: string;
|
|
58
|
-
organization: string;
|
|
59
|
-
path: string;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* @deprecated
|
|
63
|
-
*/
|
|
64
|
-
export interface BroadcastFileData {
|
|
65
|
-
parent?: string;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* @deprecated
|
|
69
|
-
*/
|
|
70
|
-
export interface BroadcastCreatedEvent extends BroadcastEvent {
|
|
71
|
-
operation: 'created';
|
|
72
|
-
data: unknown;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* @deprecated
|
|
76
|
-
*/
|
|
77
|
-
export interface FileCreatedBroadcastEvent extends BroadcastCreatedEvent, BroadcastFileData {
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* @deprecated
|
|
81
|
-
*/
|
|
82
|
-
export interface FileMetaCreatedBroadcastEvent extends FileCreatedBroadcastEvent {
|
|
83
|
-
data: IFile;
|
|
84
|
-
alt: 'meta';
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* @deprecated
|
|
88
|
-
*/
|
|
89
|
-
export interface FileMediaCreatedBroadcastEvent extends FileCreatedBroadcastEvent {
|
|
90
|
-
alt: 'media';
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* @deprecated
|
|
94
|
-
*/
|
|
95
|
-
export interface HistoryCreatedBroadcastEvent extends BroadcastCreatedEvent {
|
|
96
|
-
project: string;
|
|
97
|
-
request: string;
|
|
98
|
-
app: string;
|
|
99
|
-
kind: typeof HttpHistoryKind;
|
|
100
|
-
data: IHttpHistory;
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* @deprecated
|
|
104
|
-
*/
|
|
105
|
-
export interface FileRevisionCreatedBroadcastEvent extends BroadcastCreatedEvent, BroadcastFileData {
|
|
106
|
-
parent: string;
|
|
107
|
-
data: IRevision;
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* @deprecated
|
|
111
|
-
*/
|
|
112
|
-
export interface ProjectExecutionCreatedBroadcastEvent extends BroadcastCreatedEvent {
|
|
113
|
-
project: string;
|
|
114
|
-
kind: typeof ProjectExecutionKind;
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* @deprecated
|
|
118
|
-
*/
|
|
119
|
-
export interface BroadcastPatchEvent extends BroadcastEvent {
|
|
120
|
-
operation: 'patch';
|
|
121
|
-
data: IPatchRevision;
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* @deprecated
|
|
125
|
-
*/
|
|
126
|
-
export interface FilePatchBroadcastEvent extends BroadcastPatchEvent, BroadcastFileData {
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* @deprecated
|
|
130
|
-
*/
|
|
131
|
-
export interface AccessBroadcastEvent extends BroadcastEvent {
|
|
132
|
-
operation: 'access-granted' | 'access-removed';
|
|
133
|
-
data?: IPermission;
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* @deprecated
|
|
137
|
-
*/
|
|
138
|
-
export interface FileAccessBroadcastEvent extends AccessBroadcastEvent {
|
|
139
|
-
parent?: string;
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* @deprecated
|
|
143
|
-
*/
|
|
144
|
-
export interface DeletedBroadcastEvent extends BroadcastEvent {
|
|
145
|
-
operation: 'deleted';
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* @deprecated
|
|
149
|
-
*/
|
|
150
|
-
export interface FileDeletedBroadcastEvent extends DeletedBroadcastEvent, BroadcastFileData {
|
|
151
|
-
/**
|
|
152
|
-
* The key of the created trash entry for the deleted object.
|
|
153
|
-
* This is **always** populated when the file alt is `meta`.
|
|
154
|
-
*/
|
|
155
|
-
trash?: string;
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
* @deprecated
|
|
159
|
-
*/
|
|
160
|
-
export interface ProjectExecutionDeleteBroadcastEvent extends DeletedBroadcastEvent {
|
|
161
|
-
project: string;
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* @deprecated
|
|
165
|
-
*/
|
|
166
|
-
export interface HistoryDeletedBroadcastEvent extends DeletedBroadcastEvent {
|
|
167
|
-
project: string;
|
|
168
|
-
request: string;
|
|
169
|
-
}
|
|
170
2
|
export interface ServerEvent {
|
|
171
3
|
kind: string;
|
|
172
4
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Backend.d.ts","sourceRoot":"","sources":["../../../../src/models/store/Backend.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"Backend.d.ts","sourceRoot":"","sources":["../../../../src/models/store/Backend.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAErD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;CACb;AAED;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD;;OAEG;IACH,IAAI,EAAE,OAAO,CAAA;IACb;;;OAGG;IACH,IAAI,EAAE,OAAO,GAAG,MAAM,CAAA;IACtB;;OAEG;IACH,KAAK,EAAE,SAAS,CAAA;IAChB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IACpD;;OAEG;IACH,IAAI,EAAE,QAAQ,CAAA;IACd;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;CACZ"}
|
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* @deprecated
|
|
3
|
-
*/
|
|
4
|
-
export var BackendCommandType;
|
|
5
|
-
(function (BackendCommandType) {
|
|
6
|
-
BackendCommandType[BackendCommandType["observe"] = 0] = "observe";
|
|
7
|
-
BackendCommandType[BackendCommandType["unobserve"] = 1] = "unobserve";
|
|
8
|
-
})(BackendCommandType || (BackendCommandType = {}));
|
|
9
|
-
/**
|
|
10
|
-
* @deprecated
|
|
11
|
-
*/
|
|
12
|
-
export const BackendCommandKind = 'Core#BackendCommand';
|
|
1
|
+
export {};
|
|
13
2
|
//# sourceMappingURL=Backend.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Backend.js","sourceRoot":"","sources":["../../../../src/models/store/Backend.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Backend.js","sourceRoot":"","sources":["../../../../src/models/store/Backend.ts"],"names":[],"mappings":"","sourcesContent":["import type { PatchInfo } from '../../patch/types.js'\n\nexport interface ServerEvent {\n kind: string\n}\n\n/**\n * A broadcast event dispatched by the server when an object was patched.\n */\nexport interface ServerPatchEvent extends ServerEvent {\n /**\n * Describes this event.\n */\n kind: 'patch'\n /**\n * Whether the object meta data were patched or the media (the content).\n * Note, folders are always meta.\n */\n type: 'media' | 'meta'\n /**\n * The patch information. The exact type depends on the `type` property.\n */\n value: PatchInfo\n /**\n * The id of the user who patched the document.\n */\n uid: string\n /**\n * For files, the old version of the object before the patch.\n */\n version?: number\n /**\n * For files, the new version of the object after the patch.\n */\n newVersion?: number\n}\n\n/**\n * A broadcast event dispatched by the server when an object was deleted.\n */\nexport interface ServerDeleteEvent extends ServerEvent {\n /**\n * Describes this event.\n */\n kind: 'delete'\n /**\n * The id of the user deleting the object.\n */\n uid: string\n}\n"]}
|