@redocly/replay 0.4.0 → 0.5.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/dist/.tsbuildinfo +1 -0
- package/dist/oauth2-redirect.d.ts +11 -0
- package/dist/replay.cjs +959 -528
- package/dist/replay.d.ts +78 -29
- package/dist/replay.js +21902 -18587
- package/package.json +6 -1
package/dist/replay.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ImmutableObject } from '@hookstate/core';
|
|
1
2
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
2
3
|
import { State } from '@hookstate/core';
|
|
3
4
|
|
|
@@ -24,6 +25,37 @@ declare type AppCredential = {
|
|
|
24
25
|
valueToUseInHeader: 'clientId' | 'clientSecret';
|
|
25
26
|
};
|
|
26
27
|
|
|
28
|
+
declare type CollectionsFolder = {
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
items: CollectionsItem[];
|
|
32
|
+
state: CollectionsItemState;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
declare type CollectionsItem = {
|
|
36
|
+
type: CollectionsItemType;
|
|
37
|
+
value: CollectionsFolder | CollectionsRequest;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
declare enum CollectionsItemState {
|
|
41
|
+
Normal = "Normal",
|
|
42
|
+
Edit = "Edit",
|
|
43
|
+
Draft = "Draft"
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
declare enum CollectionsItemType {
|
|
47
|
+
Folder = "folder",
|
|
48
|
+
Request = "request"
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
declare type CollectionsRequest = {
|
|
52
|
+
id: string;
|
|
53
|
+
state: CollectionsItemState;
|
|
54
|
+
name: string;
|
|
55
|
+
request: Request_2;
|
|
56
|
+
response: Response_2 | null;
|
|
57
|
+
};
|
|
58
|
+
|
|
27
59
|
export declare function EmbeddedReplay(props: ReplayAppProps): JSX_2.Element;
|
|
28
60
|
|
|
29
61
|
declare type Environment = {
|
|
@@ -198,10 +230,18 @@ headers: Parameter[];
|
|
|
198
230
|
cookies: Parameter[];
|
|
199
231
|
};
|
|
200
232
|
isProcessingRequest: boolean;
|
|
201
|
-
response:
|
|
233
|
+
response: ImmutableObject< {
|
|
234
|
+
headers: [string, string][];
|
|
235
|
+
cookies: [string, string][];
|
|
236
|
+
body: string;
|
|
237
|
+
duration: number;
|
|
238
|
+
size: number;
|
|
239
|
+
status: number;
|
|
240
|
+
bodyUsed: boolean;
|
|
241
|
+
}> | null;
|
|
202
242
|
requestError: string | null;
|
|
203
243
|
history: HistoryItem[];
|
|
204
|
-
|
|
244
|
+
collections: CollectionsItem[];
|
|
205
245
|
operation: Operation | null;
|
|
206
246
|
operationUrl: string | undefined;
|
|
207
247
|
isLinked: boolean;
|
|
@@ -215,12 +255,18 @@ apiId: string | undefined;
|
|
|
215
255
|
requestActiveTabIdx: number;
|
|
216
256
|
oAuth2RedirectURI: string | null | undefined;
|
|
217
257
|
isRequestEditable: boolean;
|
|
258
|
+
definitionUrl: string | undefined;
|
|
259
|
+
transactionSource: TransactionSource | null;
|
|
260
|
+
showUnsavedChangesModal: boolean;
|
|
261
|
+
pendingTransaction: Transaction | null;
|
|
262
|
+
pendingTransactionSource: TransactionSource | null;
|
|
263
|
+
disableCollectionsTab: boolean | undefined;
|
|
218
264
|
}, {}>;
|
|
219
265
|
|
|
220
266
|
declare type HistoryItem = {
|
|
221
267
|
date: number;
|
|
222
268
|
request: Request_2;
|
|
223
|
-
response:
|
|
269
|
+
response: Response_2 | null;
|
|
224
270
|
};
|
|
225
271
|
|
|
226
272
|
declare type InputType = 'text' | 'file';
|
|
@@ -337,8 +383,10 @@ declare type Parameter = {
|
|
|
337
383
|
value: string;
|
|
338
384
|
};
|
|
339
385
|
|
|
386
|
+
export declare function Replay(props: ReplayAppProps): JSX_2.Element;
|
|
387
|
+
|
|
340
388
|
declare type ReplayAppProps = {
|
|
341
|
-
value
|
|
389
|
+
value?: Operation;
|
|
342
390
|
inline?: boolean;
|
|
343
391
|
operationUrl?: string;
|
|
344
392
|
corsProxyUrl?: string;
|
|
@@ -348,6 +396,8 @@ declare type ReplayAppProps = {
|
|
|
348
396
|
predefinedEnvValues?: Record<string, Record<string, string>>;
|
|
349
397
|
apiId?: string;
|
|
350
398
|
oAuth2RedirectURI?: string | null;
|
|
399
|
+
definitionUrl?: string;
|
|
400
|
+
disableCollectionsTab?: boolean;
|
|
351
401
|
};
|
|
352
402
|
|
|
353
403
|
declare type ReplayOnChangeParams = {
|
|
@@ -385,7 +435,7 @@ export declare type ReplayState = typeof globalState.value;
|
|
|
385
435
|
|
|
386
436
|
declare type Request_2 = typeof globalState.value.request;
|
|
387
437
|
|
|
388
|
-
declare type Response_2 = {
|
|
438
|
+
declare type Response_2 = ImmutableObject<{
|
|
389
439
|
headers: [string, string][];
|
|
390
440
|
cookies: [string, string][];
|
|
391
441
|
body: string;
|
|
@@ -393,30 +443,7 @@ declare type Response_2 = {
|
|
|
393
443
|
size: number;
|
|
394
444
|
status: number;
|
|
395
445
|
bodyUsed: boolean;
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
declare type SavedFolder = {
|
|
399
|
-
id: string;
|
|
400
|
-
name: string;
|
|
401
|
-
items: SavedRequest[];
|
|
402
|
-
};
|
|
403
|
-
|
|
404
|
-
declare type SavedItem = {
|
|
405
|
-
type: SavedItemType;
|
|
406
|
-
item: SavedFolder | SavedRequest;
|
|
407
|
-
};
|
|
408
|
-
|
|
409
|
-
declare enum SavedItemType {
|
|
410
|
-
Folder = "folder",
|
|
411
|
-
Request = "request"
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
declare type SavedRequest = {
|
|
415
|
-
id: string;
|
|
416
|
-
name: string;
|
|
417
|
-
request: Request;
|
|
418
|
-
response: Response | null;
|
|
419
|
-
};
|
|
446
|
+
}>;
|
|
420
447
|
|
|
421
448
|
declare type SecurityDataParameter = Parameter & {
|
|
422
449
|
sendIn: OAuth2ExtraParamsLocation;
|
|
@@ -458,4 +485,26 @@ declare type ServerVariable = {
|
|
|
458
485
|
description?: string;
|
|
459
486
|
};
|
|
460
487
|
|
|
488
|
+
declare type Transaction = {
|
|
489
|
+
request: Request_2;
|
|
490
|
+
response: Response_2 | null;
|
|
491
|
+
};
|
|
492
|
+
|
|
493
|
+
declare type TransactionSource = {
|
|
494
|
+
id: string;
|
|
495
|
+
type: 'collection';
|
|
496
|
+
name: string;
|
|
497
|
+
};
|
|
498
|
+
|
|
461
499
|
export { }
|
|
500
|
+
|
|
501
|
+
declare global {
|
|
502
|
+
interface Window {
|
|
503
|
+
__TAURI__: {
|
|
504
|
+
http: {
|
|
505
|
+
fetch: typeof globalThis.fetch;
|
|
506
|
+
};
|
|
507
|
+
};
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
|