@forge/runtime 6.0.0-next.0-experimental-97e4b11 → 6.0.0-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.
Files changed (54) hide show
  1. package/CHANGELOG.md +3 -3
  2. package/out/index.d.ts +1 -25
  3. package/out/index.d.ts.map +1 -1
  4. package/out/index.js +1 -37
  5. package/out/request.d.ts +91 -338
  6. package/out/request.d.ts.map +1 -1
  7. package/out/request.js +0 -130
  8. package/out/result.d.ts +1 -2
  9. package/out/result.d.ts.map +1 -1
  10. package/out/sandbox/index.d.ts +0 -2
  11. package/out/sandbox/index.d.ts.map +1 -1
  12. package/out/sandbox/index.js +0 -2
  13. package/out/sandbox/invocation-event.d.ts +7 -49
  14. package/out/sandbox/invocation-event.d.ts.map +1 -1
  15. package/out/sandbox/invocation-event.js +9 -50
  16. package/out/sandbox/sandbox.d.ts +2 -10
  17. package/out/sandbox/sandbox.d.ts.map +1 -1
  18. package/package.json +2 -34
  19. package/out/app-manifest.d.ts +0 -71
  20. package/out/app-manifest.d.ts.map +0 -1
  21. package/out/app-manifest.js +0 -83
  22. package/out/config.d.ts +0 -6
  23. package/out/config.d.ts.map +0 -1
  24. package/out/config.js +0 -2
  25. package/out/context.d.ts +0 -37
  26. package/out/context.d.ts.map +0 -1
  27. package/out/context.js +0 -48
  28. package/out/feature-flag.d.ts +0 -15
  29. package/out/feature-flag.d.ts.map +0 -1
  30. package/out/feature-flag.js +0 -23
  31. package/out/limits/index.d.ts +0 -2
  32. package/out/limits/index.d.ts.map +0 -1
  33. package/out/limits/index.js +0 -4
  34. package/out/limits/tracker.d.ts +0 -30
  35. package/out/limits/tracker.d.ts.map +0 -1
  36. package/out/limits/tracker.js +0 -34
  37. package/out/logger.d.ts +0 -65
  38. package/out/logger.d.ts.map +0 -1
  39. package/out/logger.js +0 -19
  40. package/out/metrics/index.d.ts +0 -2
  41. package/out/metrics/index.d.ts.map +0 -1
  42. package/out/metrics/index.js +0 -4
  43. package/out/metrics/metrics.d.ts +0 -29
  44. package/out/metrics/metrics.d.ts.map +0 -1
  45. package/out/metrics/metrics.js +0 -78
  46. package/out/sandbox/inspector.d.ts +0 -39
  47. package/out/sandbox/inspector.d.ts.map +0 -1
  48. package/out/sandbox/inspector.js +0 -258
  49. package/out/sandbox/invocation-request.d.ts +0 -114
  50. package/out/sandbox/invocation-request.d.ts.map +0 -1
  51. package/out/sandbox/invocation-request.js +0 -271
  52. package/out/snapshot.d.ts +0 -17
  53. package/out/snapshot.d.ts.map +0 -1
  54. package/out/snapshot.js +0 -6
package/CHANGELOG.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # @forge/runtime
2
2
 
3
- ## 6.0.0-next.0-experimental-97e4b11
3
+ ## 6.0.0-next.1
4
4
 
5
- ### Major Changes
5
+ ### Minor Changes
6
6
 
7
- - 8f2a3c9: Update the package to build on Node 20
7
+ - ba634d9: Remove further sandbox runtime related components
8
8
 
9
9
  ## 6.0.0-next.0
10
10
 
package/out/index.d.ts CHANGED
@@ -1,30 +1,6 @@
1
- import { ExternalRequestBody, ExternalRequestVariable } from './request';
2
- import { InvocationResult } from './result';
3
- import { Sandbox } from './sandbox';
4
- import { Inspector } from './sandbox/inspector';
5
- import { LimitsTracker } from './limits';
6
- import { XenInvocationRequest } from './sandbox/invocation-request';
7
- export * from './app-manifest';
8
- export * from './config';
9
- export * from './context';
10
- export * from './feature-flag';
11
- export * from './metrics';
1
+ import { ExternalRequestVariable } from './request';
12
2
  export * from './request';
13
3
  export * from './result';
14
- export * from './snapshot';
15
- export * from './limits';
16
- export * from './logger';
17
4
  export * from './sandbox';
18
- export declare function initializeInspector(): Inspector;
19
5
  export declare function getUserVars(): ExternalRequestVariable[];
20
- export interface InvocationConfig {
21
- sandbox: Sandbox;
22
- xenInvocationRequest: XenInvocationRequest;
23
- invocationLimits: LimitsTracker;
24
- inspector?: Inspector;
25
- }
26
- export declare class InvocationValidationError extends Error {
27
- }
28
- export declare function validateInvocation(invocation: unknown): ExternalRequestBody;
29
- export declare function invoke(invocation: InvocationConfig): Promise<InvocationResult>;
30
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAA2B,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAClG,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAmB,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAE1B,wBAAgB,mBAAmB,IAAI,SAAS,CAE/C;AAED,wBAAgB,WAAW,IAAI,uBAAuB,EAAE,CAevD;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,gBAAgB,EAAE,aAAa,CAAC;IAChC,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,qBAAa,yBAA0B,SAAQ,KAAK;CAAG;AAMvD,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,OAAO,GAAG,mBAAmB,CAO3E;AAED,wBAAgB,MAAM,CAAC,UAAU,EAAE,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAE9E"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAEpD,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAE1B,wBAAgB,WAAW,IAAI,uBAAuB,EAAE,CAevD"}
package/out/index.js CHANGED
@@ -1,26 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.invoke = exports.validateInvocation = exports.InvocationValidationError = exports.getUserVars = exports.initializeInspector = void 0;
3
+ exports.getUserVars = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const Either_1 = require("fp-ts/lib/Either");
6
- const io_ts_reporters_1 = tslib_1.__importDefault(require("io-ts-reporters"));
7
- const request_1 = require("./request");
8
- const inspector_1 = require("./sandbox/inspector");
9
- tslib_1.__exportStar(require("./app-manifest"), exports);
10
- tslib_1.__exportStar(require("./config"), exports);
11
- tslib_1.__exportStar(require("./context"), exports);
12
- tslib_1.__exportStar(require("./feature-flag"), exports);
13
- tslib_1.__exportStar(require("./metrics"), exports);
14
5
  tslib_1.__exportStar(require("./request"), exports);
15
6
  tslib_1.__exportStar(require("./result"), exports);
16
- tslib_1.__exportStar(require("./snapshot"), exports);
17
- tslib_1.__exportStar(require("./limits"), exports);
18
- tslib_1.__exportStar(require("./logger"), exports);
19
7
  tslib_1.__exportStar(require("./sandbox"), exports);
20
- function initializeInspector() {
21
- return new inspector_1.ChromeInspector();
22
- }
23
- exports.initializeInspector = initializeInspector;
24
8
  function getUserVars() {
25
9
  const prefix = 'FORGE_USER_VAR_';
26
10
  const envKeys = Object.keys(process.env);
@@ -36,23 +20,3 @@ function getUserVars() {
36
20
  }, []);
37
21
  }
38
22
  exports.getUserVars = getUserVars;
39
- class InvocationValidationError extends Error {
40
- }
41
- exports.InvocationValidationError = InvocationValidationError;
42
- function failedInvocationMessage(validationResult) {
43
- return ['Invocation validation failed:', ...io_ts_reporters_1.default.report(validationResult)].join('\n');
44
- }
45
- function validateInvocation(invocation) {
46
- const validationResult = request_1.ExternalRequestBodyType.decode(invocation);
47
- if ((0, Either_1.isLeft)(validationResult)) {
48
- throw new InvocationValidationError(failedInvocationMessage(validationResult));
49
- }
50
- else {
51
- return validationResult.right;
52
- }
53
- }
54
- exports.validateInvocation = validateInvocation;
55
- function invoke(invocation) {
56
- return invocation.sandbox.execute(invocation.xenInvocationRequest, invocation.invocationLimits, invocation.inspector);
57
- }
58
- exports.invoke = invoke;
package/out/request.d.ts CHANGED
@@ -1,340 +1,93 @@
1
- import * as t from 'io-ts';
2
- declare const XisRequestTokenType: t.IntersectionC<[t.TypeC<{
3
- id: t.StringC;
4
- service: t.StringC;
5
- token: t.StringC;
6
- }>, t.PartialC<{
7
- externalAccountId: t.StringC;
8
- displayName: t.StringC;
9
- avatarUrl: t.UnionC<[t.StringC, t.UndefinedC]>;
10
- scopes: t.ArrayC<t.StringC>;
11
- }>]>;
12
- export declare const LicenseType: t.IntersectionC<[t.TypeC<{
13
- isActive: t.BooleanC;
14
- }>, t.PartialC<{
15
- billingPeriod: t.UnionC<[t.StringC, t.NullC]>;
16
- capabilitySet: t.UnionC<[t.StringC, t.NullC]>;
17
- ccpEntitlementId: t.UnionC<[t.StringC, t.NullC]>;
18
- ccpEntitlementSlug: t.UnionC<[t.StringC, t.NullC]>;
19
- isEvaluation: t.UnionC<[t.BooleanC, t.NullC]>;
20
- subscriptionEndDate: t.UnionC<[t.StringC, t.NullC]>;
21
- supportEntitlementNumber: t.UnionC<[t.StringC, t.NullC]>;
22
- trialEndDate: t.UnionC<[t.StringC, t.NullC]>;
23
- type: t.UnionC<[t.StringC, t.NullC]>;
24
- }>]>;
25
- declare const MetadataType: t.IntersectionC<[t.TypeC<{
26
- apiAuth: t.TypeC<{
27
- env: t.StringC;
28
- objects: t.StringC;
29
- }>;
30
- clientId: t.StringC;
31
- contextAri: t.StringC;
32
- tokens: t.ArrayC<t.IntersectionC<[t.TypeC<{
33
- id: t.StringC;
34
- service: t.StringC;
35
- token: t.StringC;
36
- }>, t.PartialC<{
37
- externalAccountId: t.StringC;
38
- displayName: t.StringC;
39
- avatarUrl: t.UnionC<[t.StringC, t.UndefinedC]>;
40
- scopes: t.ArrayC<t.StringC>;
41
- }>]>>;
42
- appContext: t.IntersectionC<[t.TypeC<{
43
- appId: t.StringC;
44
- appVersion: t.StringC;
45
- environmentId: t.StringC;
46
- environmentType: t.StringC;
47
- invocationId: t.StringC;
48
- installationId: t.StringC;
49
- functionKey: t.StringC;
50
- moduleType: t.StringC;
51
- moduleKey: t.StringC;
52
- }>, t.PartialC<{
53
- license: t.IntersectionC<[t.TypeC<{
54
- isActive: t.BooleanC;
55
- }>, t.PartialC<{
56
- billingPeriod: t.UnionC<[t.StringC, t.NullC]>;
57
- capabilitySet: t.UnionC<[t.StringC, t.NullC]>;
58
- ccpEntitlementId: t.UnionC<[t.StringC, t.NullC]>;
59
- ccpEntitlementSlug: t.UnionC<[t.StringC, t.NullC]>;
60
- isEvaluation: t.UnionC<[t.BooleanC, t.NullC]>;
61
- subscriptionEndDate: t.UnionC<[t.StringC, t.NullC]>;
62
- supportEntitlementNumber: t.UnionC<[t.StringC, t.NullC]>;
63
- trialEndDate: t.UnionC<[t.StringC, t.NullC]>;
64
- type: t.UnionC<[t.StringC, t.NullC]>;
65
- }>]>;
66
- }>]>;
67
- tracing: t.TypeC<{
68
- traceId: t.StringC;
69
- spanId: t.StringC;
70
- }>;
71
- }>, t.PartialC<{
72
- aaid: t.StringC;
73
- featureFlags: t.ArrayC<t.StringC>;
74
- appToken: t.StringC;
75
- proxy: t.IntersectionC<[t.TypeC<{
76
- token: t.StringC;
77
- url: t.StringC;
78
- }>, t.PartialC<{
79
- host: t.StringC;
80
- }>]>;
81
- timeout: t.NumberC;
82
- rms: t.TypeC<{
83
- url: t.StringC;
84
- host: t.StringC;
85
- }>;
86
- limits: t.RecordC<t.StringC, t.NumberC>;
87
- license: t.IntersectionC<[t.TypeC<{
88
- isActive: t.BooleanC;
89
- }>, t.PartialC<{
90
- billingPeriod: t.UnionC<[t.StringC, t.NullC]>;
91
- capabilitySet: t.UnionC<[t.StringC, t.NullC]>;
92
- ccpEntitlementId: t.UnionC<[t.StringC, t.NullC]>;
93
- ccpEntitlementSlug: t.UnionC<[t.StringC, t.NullC]>;
94
- isEvaluation: t.UnionC<[t.BooleanC, t.NullC]>;
95
- subscriptionEndDate: t.UnionC<[t.StringC, t.NullC]>;
96
- supportEntitlementNumber: t.UnionC<[t.StringC, t.NullC]>;
97
- trialEndDate: t.UnionC<[t.StringC, t.NullC]>;
98
- type: t.UnionC<[t.StringC, t.NullC]>;
99
- }>]>;
100
- fetchAllowList: t.ArrayC<t.StringC>;
101
- externalAuth: t.ArrayC<t.TypeC<{
102
- service: t.StringC;
103
- remotes: t.ArrayC<t.TypeC<{
104
- baseUrl: t.StringC;
105
- key: t.StringC;
106
- }>>;
107
- accounts: t.ArrayC<t.IntersectionC<[t.TypeC<{
108
- id: t.StringC;
109
- externalAccountId: t.StringC;
110
- displayName: t.StringC;
111
- scopes: t.ArrayC<t.StringC>;
112
- }>, t.PartialC<{
113
- avatarUrl: t.StringC;
114
- }>]>>;
115
- }>>;
116
- }>]>;
117
- declare const VariableType: t.TypeC<{
118
- secure: t.BooleanC;
119
- key: t.StringC;
120
- value: t.UnionC<[t.StringC, t.UndefinedC]>;
121
- }>;
122
- export declare const ExternalRequestBodyType: t.IntersectionC<[t.TypeC<{
123
- _meta: t.IntersectionC<[t.TypeC<{
124
- apiAuth: t.TypeC<{
125
- env: t.StringC;
126
- objects: t.StringC;
127
- }>;
128
- clientId: t.StringC;
129
- contextAri: t.StringC;
130
- tokens: t.ArrayC<t.IntersectionC<[t.TypeC<{
131
- id: t.StringC;
132
- service: t.StringC;
133
- token: t.StringC;
134
- }>, t.PartialC<{
135
- externalAccountId: t.StringC;
136
- displayName: t.StringC;
137
- avatarUrl: t.UnionC<[t.StringC, t.UndefinedC]>;
138
- scopes: t.ArrayC<t.StringC>;
139
- }>]>>;
140
- appContext: t.IntersectionC<[t.TypeC<{
141
- appId: t.StringC;
142
- appVersion: t.StringC;
143
- environmentId: t.StringC;
144
- environmentType: t.StringC;
145
- invocationId: t.StringC;
146
- installationId: t.StringC;
147
- functionKey: t.StringC;
148
- moduleType: t.StringC;
149
- moduleKey: t.StringC;
150
- }>, t.PartialC<{
151
- license: t.IntersectionC<[t.TypeC<{
152
- isActive: t.BooleanC;
153
- }>, t.PartialC<{
154
- billingPeriod: t.UnionC<[t.StringC, t.NullC]>;
155
- capabilitySet: t.UnionC<[t.StringC, t.NullC]>;
156
- ccpEntitlementId: t.UnionC<[t.StringC, t.NullC]>;
157
- ccpEntitlementSlug: t.UnionC<[t.StringC, t.NullC]>;
158
- isEvaluation: t.UnionC<[t.BooleanC, t.NullC]>;
159
- subscriptionEndDate: t.UnionC<[t.StringC, t.NullC]>;
160
- supportEntitlementNumber: t.UnionC<[t.StringC, t.NullC]>;
161
- trialEndDate: t.UnionC<[t.StringC, t.NullC]>;
162
- type: t.UnionC<[t.StringC, t.NullC]>;
163
- }>]>;
164
- }>]>;
165
- tracing: t.TypeC<{
166
- traceId: t.StringC;
167
- spanId: t.StringC;
168
- }>;
169
- }>, t.PartialC<{
170
- aaid: t.StringC;
171
- featureFlags: t.ArrayC<t.StringC>;
172
- appToken: t.StringC;
173
- proxy: t.IntersectionC<[t.TypeC<{
174
- token: t.StringC;
175
- url: t.StringC;
176
- }>, t.PartialC<{
177
- host: t.StringC;
178
- }>]>;
179
- timeout: t.NumberC;
180
- rms: t.TypeC<{
181
- url: t.StringC;
182
- host: t.StringC;
183
- }>;
184
- limits: t.RecordC<t.StringC, t.NumberC>;
185
- license: t.IntersectionC<[t.TypeC<{
186
- isActive: t.BooleanC;
187
- }>, t.PartialC<{
188
- billingPeriod: t.UnionC<[t.StringC, t.NullC]>;
189
- capabilitySet: t.UnionC<[t.StringC, t.NullC]>;
190
- ccpEntitlementId: t.UnionC<[t.StringC, t.NullC]>;
191
- ccpEntitlementSlug: t.UnionC<[t.StringC, t.NullC]>;
192
- isEvaluation: t.UnionC<[t.BooleanC, t.NullC]>;
193
- subscriptionEndDate: t.UnionC<[t.StringC, t.NullC]>;
194
- supportEntitlementNumber: t.UnionC<[t.StringC, t.NullC]>;
195
- trialEndDate: t.UnionC<[t.StringC, t.NullC]>;
196
- type: t.UnionC<[t.StringC, t.NullC]>;
197
- }>]>;
198
- fetchAllowList: t.ArrayC<t.StringC>;
199
- externalAuth: t.ArrayC<t.TypeC<{
200
- service: t.StringC;
201
- remotes: t.ArrayC<t.TypeC<{
202
- baseUrl: t.StringC;
203
- key: t.StringC;
204
- }>>;
205
- accounts: t.ArrayC<t.IntersectionC<[t.TypeC<{
206
- id: t.StringC;
207
- externalAccountId: t.StringC;
208
- displayName: t.StringC;
209
- scopes: t.ArrayC<t.StringC>;
210
- }>, t.PartialC<{
211
- avatarUrl: t.StringC;
212
- }>]>>;
213
- }>>;
214
- }>]>;
215
- body: t.UnknownRecordC;
216
- handler: t.StringC;
217
- }>, t.PartialC<{
218
- variables: t.ArrayC<t.TypeC<{
219
- secure: t.BooleanC;
220
- key: t.StringC;
221
- value: t.UnionC<[t.StringC, t.UndefinedC]>;
222
- }>>;
223
- }>]>;
224
- export declare const InvocationType: t.TypeC<{
225
- request: t.IntersectionC<[t.TypeC<{
226
- _meta: t.IntersectionC<[t.TypeC<{
227
- apiAuth: t.TypeC<{
228
- env: t.StringC;
229
- objects: t.StringC;
230
- }>;
231
- clientId: t.StringC;
232
- contextAri: t.StringC;
233
- tokens: t.ArrayC<t.IntersectionC<[t.TypeC<{
234
- id: t.StringC;
235
- service: t.StringC;
236
- token: t.StringC;
237
- }>, t.PartialC<{
238
- externalAccountId: t.StringC;
239
- displayName: t.StringC;
240
- avatarUrl: t.UnionC<[t.StringC, t.UndefinedC]>;
241
- scopes: t.ArrayC<t.StringC>;
242
- }>]>>;
243
- appContext: t.IntersectionC<[t.TypeC<{
244
- appId: t.StringC;
245
- appVersion: t.StringC;
246
- environmentId: t.StringC;
247
- environmentType: t.StringC;
248
- invocationId: t.StringC;
249
- installationId: t.StringC;
250
- functionKey: t.StringC;
251
- moduleType: t.StringC;
252
- moduleKey: t.StringC;
253
- }>, t.PartialC<{
254
- license: t.IntersectionC<[t.TypeC<{
255
- isActive: t.BooleanC;
256
- }>, t.PartialC<{
257
- billingPeriod: t.UnionC<[t.StringC, t.NullC]>;
258
- capabilitySet: t.UnionC<[t.StringC, t.NullC]>;
259
- ccpEntitlementId: t.UnionC<[t.StringC, t.NullC]>;
260
- ccpEntitlementSlug: t.UnionC<[t.StringC, t.NullC]>;
261
- isEvaluation: t.UnionC<[t.BooleanC, t.NullC]>;
262
- subscriptionEndDate: t.UnionC<[t.StringC, t.NullC]>;
263
- supportEntitlementNumber: t.UnionC<[t.StringC, t.NullC]>;
264
- trialEndDate: t.UnionC<[t.StringC, t.NullC]>;
265
- type: t.UnionC<[t.StringC, t.NullC]>;
266
- }>]>;
267
- }>]>;
268
- tracing: t.TypeC<{
269
- traceId: t.StringC;
270
- spanId: t.StringC;
271
- }>;
272
- }>, t.PartialC<{
273
- aaid: t.StringC;
274
- featureFlags: t.ArrayC<t.StringC>;
275
- appToken: t.StringC;
276
- proxy: t.IntersectionC<[t.TypeC<{
277
- token: t.StringC;
278
- url: t.StringC;
279
- }>, t.PartialC<{
280
- host: t.StringC;
281
- }>]>;
282
- timeout: t.NumberC;
283
- rms: t.TypeC<{
284
- url: t.StringC;
285
- host: t.StringC;
286
- }>;
287
- limits: t.RecordC<t.StringC, t.NumberC>;
288
- license: t.IntersectionC<[t.TypeC<{
289
- isActive: t.BooleanC;
290
- }>, t.PartialC<{
291
- billingPeriod: t.UnionC<[t.StringC, t.NullC]>;
292
- capabilitySet: t.UnionC<[t.StringC, t.NullC]>;
293
- ccpEntitlementId: t.UnionC<[t.StringC, t.NullC]>;
294
- ccpEntitlementSlug: t.UnionC<[t.StringC, t.NullC]>;
295
- isEvaluation: t.UnionC<[t.BooleanC, t.NullC]>;
296
- subscriptionEndDate: t.UnionC<[t.StringC, t.NullC]>;
297
- supportEntitlementNumber: t.UnionC<[t.StringC, t.NullC]>;
298
- trialEndDate: t.UnionC<[t.StringC, t.NullC]>;
299
- type: t.UnionC<[t.StringC, t.NullC]>;
300
- }>]>;
301
- fetchAllowList: t.ArrayC<t.StringC>;
302
- externalAuth: t.ArrayC<t.TypeC<{
303
- service: t.StringC;
304
- remotes: t.ArrayC<t.TypeC<{
305
- baseUrl: t.StringC;
306
- key: t.StringC;
307
- }>>;
308
- accounts: t.ArrayC<t.IntersectionC<[t.TypeC<{
309
- id: t.StringC;
310
- externalAccountId: t.StringC;
311
- displayName: t.StringC;
312
- scopes: t.ArrayC<t.StringC>;
313
- }>, t.PartialC<{
314
- avatarUrl: t.StringC;
315
- }>]>>;
316
- }>>;
317
- }>]>;
318
- body: t.UnknownRecordC;
319
- handler: t.StringC;
320
- }>, t.PartialC<{
321
- variables: t.ArrayC<t.TypeC<{
322
- secure: t.BooleanC;
323
- key: t.StringC;
324
- value: t.UnionC<[t.StringC, t.UndefinedC]>;
325
- }>>;
326
- }>]>;
327
- ctx: t.TypeC<{
328
- requestId: t.StringC;
329
- timeout: t.NumberC;
330
- traceId: t.StringC;
331
- }>;
332
- }>;
333
- export declare type ExternalRequestVariable = t.TypeOf<typeof VariableType>;
334
- export declare type License = t.TypeOf<typeof LicenseType>;
335
- export declare type Invocation = t.TypeOf<typeof InvocationType>;
336
- export declare type Metadata = t.TypeOf<typeof MetadataType>;
337
- export declare type XisRequestToken = t.TypeOf<typeof XisRequestTokenType>;
338
- export declare type ExternalRequestBody = t.TypeOf<typeof ExternalRequestBodyType>;
1
+ interface Remote {
2
+ baseUrl: string;
3
+ key: string;
4
+ }
5
+ interface ExternalAuthMetaDataAccount {
6
+ id: string;
7
+ externalAccountId: string;
8
+ displayName: string;
9
+ scopes: string[];
10
+ avatarUrl?: string;
11
+ }
12
+ interface ExternalAuthMetaData {
13
+ service: string;
14
+ remotes: Remote[];
15
+ accounts: ExternalAuthMetaDataAccount[];
16
+ }
17
+ interface XisRequestTokenType {
18
+ id: string;
19
+ service: string;
20
+ token: string;
21
+ externalAccountId?: string;
22
+ displayName?: string;
23
+ avatarUrl?: string;
24
+ scopes?: string[];
25
+ }
26
+ export interface License {
27
+ isActive: boolean;
28
+ billingPeriod?: string | null;
29
+ capabilitySet?: string | null;
30
+ ccpEntitlementId?: string | null;
31
+ ccpEntitlementSlug?: string | null;
32
+ isEvaluation?: boolean | null;
33
+ subscriptionEndDate?: string | null;
34
+ supportEntitlementNumber?: string | null;
35
+ trialEndDate?: string | null;
36
+ type?: string | null;
37
+ }
38
+ interface AppContext {
39
+ appId: string;
40
+ appVersion: string;
41
+ environmentId: string;
42
+ environmentType: string;
43
+ invocationId: string;
44
+ installationId: string;
45
+ functionKey: string;
46
+ moduleType: string;
47
+ moduleKey: string;
48
+ license?: License;
49
+ }
50
+ export interface Metadata {
51
+ apiAuth: {
52
+ env: string;
53
+ objects: string;
54
+ };
55
+ clientId: string;
56
+ contextAri: string;
57
+ tokens: XisRequestTokenType[];
58
+ appContext: AppContext;
59
+ tracing: {
60
+ traceId: string;
61
+ spanId: string;
62
+ };
63
+ aaid?: string;
64
+ featureFlags?: string[];
65
+ appToken?: string;
66
+ proxy?: {
67
+ token: string;
68
+ url: string;
69
+ host?: string;
70
+ };
71
+ timeout?: number;
72
+ rms?: {
73
+ url: string;
74
+ host: string;
75
+ };
76
+ limits?: Record<string, number>;
77
+ license?: License;
78
+ fetchAllowList?: string[];
79
+ externalAuth?: ExternalAuthMetaData[];
80
+ }
81
+ export interface ExternalRequestVariable {
82
+ secure: boolean;
83
+ key: string;
84
+ value: string | undefined;
85
+ }
86
+ export interface ExternalRequestBody {
87
+ _meta: Metadata;
88
+ body: Record<string, unknown>;
89
+ handler: string;
90
+ variables?: ExternalRequestVariable[];
91
+ }
339
92
  export {};
340
93
  //# sourceMappingURL=request.d.ts.map
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