@caido/sdk-workflow 0.36.1 → 0.38.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/typing.d.ts +18 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caido/sdk-workflow",
3
- "version": "0.36.1",
3
+ "version": "0.38.0",
4
4
  "description": "Typing for the Caido Workflow SDK",
5
5
  "author": "Caido Labs Inc. <dev@caido.io>",
6
6
  "license": "MIT",
package/src/typing.d.ts CHANGED
@@ -53,6 +53,7 @@ export declare type Request = {
53
53
  getHeader(name: string): Array<string> | undefined;
54
54
  getBody(): Body | undefined;
55
55
  toSpec(): RequestSpec;
56
+ toSpecRaw(): RequestSpecRaw;
56
57
  };
57
58
 
58
59
  type SetBodyOptions = {
@@ -87,6 +88,22 @@ export declare class RequestSpec {
87
88
  removeHeader(name: string): void;
88
89
  getBody(): Body | undefined;
89
90
  setBody(body: Body | Bytes, options?: SetBodyOptions): void;
91
+ setRaw(raw: Bytes): RequestSpecRaw;
92
+ }
93
+
94
+ /**
95
+ * A mutable raw Request not yet sent.
96
+ */
97
+ export declare class RequestSpecRaw {
98
+ constructor(url: string);
99
+ getHost(): string;
100
+ setHost(host: string): void;
101
+ getPort(): number;
102
+ setPort(port: number): void;
103
+ getTls(): boolean;
104
+ setTls(tls: boolean): void;
105
+ getRaw(): Uint8Array;
106
+ setRaw(raw: Bytes): void;
90
107
  }
91
108
 
92
109
  /**
@@ -130,7 +147,7 @@ export declare type RequestsSDK = {
130
147
  * console.error(err);
131
148
  * });
132
149
  */
133
- send(request: RequestSpec): Promise<RequestResponse>;
150
+ send(request: RequestSpec | RequestSpecRaw): Promise<RequestResponse>;
134
151
 
135
152
  /**
136
153
  * Checks if a request is in scope.