@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/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
- // SignedOperationV1 entity
8
- // Marks an operation with digital signature authentication for id4ntity verification
6
+ /** Marks an operation with digital signature authentication for id4ntity verification
7
+ */
9
8
  export class SignedOperationV1 {
10
9
  }
11
10
 
12
- // ServiceSignatureV1 entity
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
- NonNullable: true,
28
- SubType: "builtin",
29
- Builtin: "string"
31
+ NonNullable: true,
32
+ SubType: "builtin",
33
+ Builtin: "string"
30
34
  });
31
- // AccessDeniedProblem entity
35
+ /** struct AccessDeniedProblem
36
+ */
32
37
  export interface AccessDeniedProblemProperties {
33
- // /**
34
- // * Returns "deployport/corelib.AccessDeniedProblem"
35
- // */
36
- // fqtn: "deployport/corelib.AccessDeniedProblem";
37
- message: string
38
+ /** message property
39
+ */
40
+ message : string
38
41
  }
39
- export class AccessDeniedProblem extends Error implements AccessDeniedProblemProperties, Runtime.StructInterface {
40
- message: string = ''
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
- NonNullable: true,
52
- SubType: "builtin",
53
- Builtin: "string"
57
+ NonNullable: true,
58
+ SubType: "builtin",
59
+ Builtin: "string"
54
60
  });
55
- // ForbiddenProblem entity
61
+ /** struct ForbiddenProblem
62
+ */
56
63
  export interface ForbiddenProblemProperties {
57
- // /**
58
- // * Returns "deployport/corelib.ForbiddenProblem"
59
- // */
60
- // fqtn: "deployport/corelib.ForbiddenProblem";
61
- message: string
64
+ /** message property
65
+ */
66
+ message : string
62
67
  }
63
- export class ForbiddenProblem extends Error implements ForbiddenProblemProperties, Runtime.StructInterface {
64
- message: string = ''
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
@@ -1,9 +1,9 @@
1
1
  packages:
2
2
  - origin: "file://./../api-services-corelib-go//package.specular"
3
- version: 0.0.1
3
+ version: 0.0.2
4
4
  path:
5
- workspace: deployport
6
- project: corelib
5
+ namespace: deployport
6
+ module: corelib
7
7
  generate:
8
8
  - language: js
9
9
  client:
package/tsconfig.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "extends": "@tsconfig/node24/tsconfig.json",
3
+ "compilerOptions": {
4
+ "declaration": true,
5
+ "types": ["node"]
6
+ },
7
+ "files": [
8
+ "configurator/index.ts",
9
+ "configurator/loader.node.ts",
10
+ "configurator/loader.browser.ts"
11
+ ]
12
+ }