@deployport/api-services-corelib 0.1.4 → 0.3.0
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/.github/workflows/npm.yaml +9 -5
- package/configurator/config.d.ts +54 -0
- package/configurator/config.js +16 -0
- package/configurator/config.ts +69 -0
- package/configurator/index.d.ts +11 -1
- package/configurator/index.js +26 -7
- package/configurator/index.ts +29 -7
- package/configurator/loader.browser.d.ts +14 -0
- package/configurator/loader.browser.js +28 -0
- package/configurator/loader.browser.ts +36 -0
- package/configurator/loader.node.d.ts +18 -0
- package/configurator/loader.node.js +166 -0
- package/configurator/loader.node.ts +240 -0
- package/configurator/loader.test.ts +243 -0
- package/configurator/signer.d.ts +7 -7
- package/configurator/signer.js +21 -21
- package/configurator/signer.test.ts +30 -0
- package/configurator/signer.ts +22 -29
- package/package.json +35 -6
- package/specular.d.ts +94 -3
- package/specular.js +98 -9
- package/specular.ts +175 -31
- package/specular.yaml +3 -3
- package/tsconfig.json +12 -0
package/specular.ts
CHANGED
|
@@ -1,72 +1,216 @@
|
|
|
1
|
-
// JS gen package
|
|
2
1
|
import {
|
|
3
2
|
Runtime,
|
|
4
3
|
Metadata,
|
|
5
4
|
} from '@deployport/specular-runtime';
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
/** Marks an operation with digital signature authentication for id4ntity verification
|
|
7
|
+
*/
|
|
9
8
|
export class SignedOperationV1 {
|
|
10
9
|
}
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
/** entity ServiceSignatureV1
|
|
12
|
+
*/
|
|
13
13
|
export class ServiceSignatureV1 {
|
|
14
|
+
/** serviceName parameter
|
|
15
|
+
*/
|
|
14
16
|
public ServiceName: string = '';
|
|
15
17
|
}
|
|
16
18
|
|
|
17
19
|
const _pkg = new Metadata.Package(
|
|
18
|
-
"deployport",
|
|
20
|
+
"deployport",
|
|
19
21
|
"corelib",
|
|
20
22
|
);
|
|
21
23
|
|
|
24
|
+
/** Struct metadata
|
|
25
|
+
*/
|
|
22
26
|
export const AccessDeniedProblemMeta = new Metadata.Struct(
|
|
23
|
-
_pkg,
|
|
24
|
-
"AccessDeniedProblem",
|
|
27
|
+
_pkg,
|
|
28
|
+
"AccessDeniedProblem",
|
|
25
29
|
);
|
|
26
30
|
new Metadata.Property(AccessDeniedProblemMeta, "message", {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
31
|
+
NonNullable: true,
|
|
32
|
+
SubType: "builtin",
|
|
33
|
+
Builtin: "string"
|
|
30
34
|
});
|
|
31
|
-
|
|
35
|
+
/** struct AccessDeniedProblem
|
|
36
|
+
*/
|
|
32
37
|
export interface AccessDeniedProblemProperties {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
// fqtn: "deployport/corelib.AccessDeniedProblem";
|
|
37
|
-
message: string
|
|
38
|
+
/** message property
|
|
39
|
+
*/
|
|
40
|
+
message : string
|
|
38
41
|
}
|
|
39
|
-
|
|
40
|
-
|
|
42
|
+
/** struct AccessDeniedProblem
|
|
43
|
+
*/
|
|
44
|
+
export class AccessDeniedProblem extends Runtime.RpcError implements AccessDeniedProblemProperties, Runtime.StructInterface {
|
|
41
45
|
get __structPath(): Metadata.StructPath {
|
|
42
46
|
return AccessDeniedProblemMeta.path
|
|
43
47
|
}
|
|
44
48
|
}
|
|
45
49
|
AccessDeniedProblemMeta.problemInstantiate = (msg: string) => new AccessDeniedProblem(msg);
|
|
50
|
+
/** Struct metadata
|
|
51
|
+
*/
|
|
46
52
|
export const ForbiddenProblemMeta = new Metadata.Struct(
|
|
47
|
-
_pkg,
|
|
48
|
-
"ForbiddenProblem",
|
|
53
|
+
_pkg,
|
|
54
|
+
"ForbiddenProblem",
|
|
49
55
|
);
|
|
50
56
|
new Metadata.Property(ForbiddenProblemMeta, "message", {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
57
|
+
NonNullable: true,
|
|
58
|
+
SubType: "builtin",
|
|
59
|
+
Builtin: "string"
|
|
54
60
|
});
|
|
55
|
-
|
|
61
|
+
/** struct ForbiddenProblem
|
|
62
|
+
*/
|
|
56
63
|
export interface ForbiddenProblemProperties {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
// fqtn: "deployport/corelib.ForbiddenProblem";
|
|
61
|
-
message: string
|
|
64
|
+
/** message property
|
|
65
|
+
*/
|
|
66
|
+
message : string
|
|
62
67
|
}
|
|
63
|
-
|
|
64
|
-
|
|
68
|
+
/** struct ForbiddenProblem
|
|
69
|
+
*/
|
|
70
|
+
export class ForbiddenProblem extends Runtime.RpcError implements ForbiddenProblemProperties, Runtime.StructInterface {
|
|
65
71
|
get __structPath(): Metadata.StructPath {
|
|
66
72
|
return ForbiddenProblemMeta.path
|
|
67
73
|
}
|
|
68
74
|
}
|
|
69
75
|
ForbiddenProblemMeta.problemInstantiate = (msg: string) => new ForbiddenProblem(msg);
|
|
76
|
+
/** Struct metadata
|
|
77
|
+
*/
|
|
78
|
+
export const ProblemActionMeta = new Metadata.Struct(
|
|
79
|
+
_pkg,
|
|
80
|
+
"ProblemAction",
|
|
81
|
+
);
|
|
82
|
+
new Metadata.Property(ProblemActionMeta, "id", {
|
|
83
|
+
NonNullable: true,
|
|
84
|
+
SubType: "builtin",
|
|
85
|
+
Builtin: "string"
|
|
86
|
+
});
|
|
87
|
+
new Metadata.Property(ProblemActionMeta, "locale", {
|
|
88
|
+
NonNullable: false,
|
|
89
|
+
SubType: "builtin",
|
|
90
|
+
Builtin: "string"
|
|
91
|
+
});
|
|
92
|
+
new Metadata.Property(ProblemActionMeta, "title", {
|
|
93
|
+
NonNullable: true,
|
|
94
|
+
SubType: "builtin",
|
|
95
|
+
Builtin: "string"
|
|
96
|
+
});
|
|
97
|
+
new Metadata.Property(ProblemActionMeta, "url", {
|
|
98
|
+
NonNullable: false,
|
|
99
|
+
SubType: "builtin",
|
|
100
|
+
Builtin: "string"
|
|
101
|
+
});
|
|
102
|
+
/** A localized call-to-action surfaced alongside a problem. Title and URL
|
|
103
|
+
* are already resolved to a specific locale; clients render them as-is.
|
|
104
|
+
*/
|
|
105
|
+
export interface ProblemActionProperties {
|
|
106
|
+
/** Optional stable identifier. Clients can key on it to apply custom
|
|
107
|
+
* presentation (icon, ordering) per well-known action.
|
|
108
|
+
*/
|
|
109
|
+
id : string
|
|
110
|
+
/** BCP 47 tag of the locale the title and url were resolved to. May
|
|
111
|
+
* differ from the caller's requested locale when a fallback was used.
|
|
112
|
+
*/
|
|
113
|
+
locale : string| null
|
|
114
|
+
/** title property
|
|
115
|
+
*/
|
|
116
|
+
title : string
|
|
117
|
+
/** url property
|
|
118
|
+
*/
|
|
119
|
+
url : string| null
|
|
120
|
+
}
|
|
121
|
+
/** A localized call-to-action surfaced alongside a problem. Title and URL
|
|
122
|
+
* are already resolved to a specific locale; clients render them as-is.
|
|
123
|
+
*/
|
|
124
|
+
export interface ProblemAction extends ProblemActionProperties, Runtime.StructInterface {}
|
|
125
|
+
/** Struct metadata
|
|
126
|
+
*/
|
|
127
|
+
export const ThrottledProblemMeta = new Metadata.Struct(
|
|
128
|
+
_pkg,
|
|
129
|
+
"ThrottledProblem",
|
|
130
|
+
);
|
|
131
|
+
new Metadata.Property(ThrottledProblemMeta, "actions", {
|
|
132
|
+
NonNullable: true,
|
|
133
|
+
SubType: "array",
|
|
134
|
+
Item: {
|
|
135
|
+
NonNullable: true,
|
|
136
|
+
SubType: "userDefined",
|
|
137
|
+
Type: SpecularPackage().requireTypeByName("ProblemAction")
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
new Metadata.Property(ThrottledProblemMeta, "message", {
|
|
141
|
+
NonNullable: true,
|
|
142
|
+
SubType: "builtin",
|
|
143
|
+
Builtin: "string"
|
|
144
|
+
});
|
|
145
|
+
new Metadata.Property(ThrottledProblemMeta, "retryAfterMs", {
|
|
146
|
+
NonNullable: false,
|
|
147
|
+
SubType: "builtin",
|
|
148
|
+
Builtin: "int64"
|
|
149
|
+
});
|
|
150
|
+
/** Raised when the caller is being throttled and should retry later.
|
|
151
|
+
*/
|
|
152
|
+
export interface ThrottledProblemProperties {
|
|
153
|
+
/** Optional calls-to-action to help the caller (e.g. support, upgrade,
|
|
154
|
+
* docs links), ordered most-specific first. Empty when none apply.
|
|
155
|
+
*/
|
|
156
|
+
actions : (ProblemActionProperties)[]
|
|
157
|
+
/** message property
|
|
158
|
+
*/
|
|
159
|
+
message : string
|
|
160
|
+
/** Milliseconds the caller should wait before retrying.
|
|
161
|
+
*/
|
|
162
|
+
retryAfterMs : number| null
|
|
163
|
+
}
|
|
164
|
+
/** Raised when the caller is being throttled and should retry later.
|
|
165
|
+
*/
|
|
166
|
+
export class ThrottledProblem extends Runtime.RpcError implements ThrottledProblemProperties, Runtime.StructInterface {
|
|
167
|
+
actions : (ProblemActionProperties)[] = []
|
|
168
|
+
retryAfterMs : number| null = null
|
|
169
|
+
get __structPath(): Metadata.StructPath {
|
|
170
|
+
return ThrottledProblemMeta.path
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
ThrottledProblemMeta.problemInstantiate = (msg: string) => new ThrottledProblem(msg);
|
|
174
|
+
/** Struct metadata
|
|
175
|
+
*/
|
|
176
|
+
export const QuotaExceededProblemMeta = new Metadata.Struct(
|
|
177
|
+
_pkg,
|
|
178
|
+
"QuotaExceededProblem",
|
|
179
|
+
);
|
|
180
|
+
new Metadata.Property(QuotaExceededProblemMeta, "actions", {
|
|
181
|
+
NonNullable: true,
|
|
182
|
+
SubType: "array",
|
|
183
|
+
Item: {
|
|
184
|
+
NonNullable: true,
|
|
185
|
+
SubType: "userDefined",
|
|
186
|
+
Type: SpecularPackage().requireTypeByName("ProblemAction")
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
new Metadata.Property(QuotaExceededProblemMeta, "message", {
|
|
190
|
+
NonNullable: true,
|
|
191
|
+
SubType: "builtin",
|
|
192
|
+
Builtin: "string"
|
|
193
|
+
});
|
|
194
|
+
/** Raised when a resource quota has been exceeded.
|
|
195
|
+
*/
|
|
196
|
+
export interface QuotaExceededProblemProperties {
|
|
197
|
+
/** Optional calls-to-action to help the caller (e.g. request an increase,
|
|
198
|
+
* upgrade, docs links), ordered most-specific first. Empty when none apply.
|
|
199
|
+
*/
|
|
200
|
+
actions : (ProblemActionProperties)[]
|
|
201
|
+
/** message property
|
|
202
|
+
*/
|
|
203
|
+
message : string
|
|
204
|
+
}
|
|
205
|
+
/** Raised when a resource quota has been exceeded.
|
|
206
|
+
*/
|
|
207
|
+
export class QuotaExceededProblem extends Runtime.RpcError implements QuotaExceededProblemProperties, Runtime.StructInterface {
|
|
208
|
+
actions : (ProblemActionProperties)[] = []
|
|
209
|
+
get __structPath(): Metadata.StructPath {
|
|
210
|
+
return QuotaExceededProblemMeta.path
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
QuotaExceededProblemMeta.problemInstantiate = (msg: string) => new QuotaExceededProblem(msg);
|
|
70
214
|
|
|
71
215
|
export function SpecularPackage() {
|
|
72
216
|
return _pkg;
|
package/specular.yaml
CHANGED
package/tsconfig.json
ADDED