clients/http/inputs
@prismatic-io/spectral › "clients/http/inputs"
#
Index#
Variables- data
- debugRequest
- fileData
- fileDataFileNames
- formData
- headers
- maxRetries
- method
- queryParams
- responseType
- retryAllErrors
- retryDelayMS
- supportedMethods
- supportedResponseTypes
- timeout
- url
- useExponentialBackoff
#
Object literals#
VariablesConst
data#
• data: object = input({ label: "Data", placeholder: "Data to send", type: "string", required: false, comments: "The HTTP body payload to send to the URL.", example: '{"exampleKey": "Example Data"}', })
Defined in packages/spectral/src/clients/http/inputs.ts:34
#
Type declaration:comments: string = "The HTTP body payload to send to the URL."
example: string = "{"exampleKey": "Example Data"}"
label: string = "Data"
placeholder: string = "Data to send"
required: false = false
type: "string" = "string"
Const
debugRequest#
• debugRequest: object = input({ label: "Debug Request", type: "boolean", required: false, comments: "Enabling this flag will log out the current request.", clean: (value) => util.types.toBool(value), })
Defined in packages/spectral/src/clients/http/inputs.ts:168
#
Type declaration:comments: string = "Enabling this flag will log out the current request."
label: string = "Debug Request"
required: false = false
type: "boolean" = "boolean"
clean(
value
: unknown): boolean
Const
fileData#
• fileData: object = input({
label: "File Data",
placeholder: "Data to send",
type: "string",
collection: "keyvaluelist",
required: false,
comments: "File Data to be sent as a multipart form upload.",
example: [{key: "example.txt", value: "My File Contents"}]
,
})
Defined in packages/spectral/src/clients/http/inputs.ts:146
#
Type declaration:collection: "keyvaluelist" = "keyvaluelist"
comments: string = "File Data to be sent as a multipart form upload."
example: string =
[{key: "example.txt", value: "My File Contents"}]
label: string = "File Data"
placeholder: string = "Data to send"
required: false = false
type: "string" = "string"
Const
fileDataFileNames#
• fileDataFileNames: object = input({ label: "File Data File Names", placeholder: "The file name to apply to a file", type: "string", collection: "keyvaluelist", required: false, comments: "File names to apply to the file data inputs. Keys must match the file data keys above.", clean: (values: any) => values ? util.types.keyValPairListToObject<string>(values) : undefined, })
Defined in packages/spectral/src/clients/http/inputs.ts:156
#
Type declaration:collection: "keyvaluelist" = "keyvaluelist"
comments: string = "File names to apply to the file data inputs. Keys must match the file data keys above."
label: string = "File Data File Names"
placeholder: string = "The file name to apply to a file"
required: false = false
type: "string" = "string"
clean(
values
: any): undefined | object
Const
formData#
• formData: object = input({ label: "Form Data", placeholder: "Data to send", type: "string", collection: "keyvaluelist", required: false, comments: "The Form Data to be sent as a multipart form upload.", example: '[{"key": "Example Key", "value": new Buffer("Hello World")}]', })
Defined in packages/spectral/src/clients/http/inputs.ts:136
#
Type declaration:collection: "keyvaluelist" = "keyvaluelist"
comments: string = "The Form Data to be sent as a multipart form upload."
example: string = "[{"key": "Example Key", "value": new Buffer("Hello World")}]"
label: string = "Form Data"
placeholder: string = "Data to send"
required: false = false
type: "string" = "string"
Const
headers#
• headers: object = input({ label: "Header", placeholder: "Header", type: "string", collection: "keyvaluelist", required: false, comments: "A list of headers to send with the request.", example: "User-Agent: curl/7.64.1", })
Defined in packages/spectral/src/clients/http/inputs.ts:77
#
Type declaration:collection: "keyvaluelist" = "keyvaluelist"
comments: string = "A list of headers to send with the request."
example: string = "User-Agent: curl/7.64.1"
label: string = "Header"
placeholder: string = "Header"
required: false = false
type: "string" = "string"
Const
maxRetries#
• maxRetries: object = input({ label: "Max Retry Count", placeholder: "Max Retries", type: "string", required: false, comments: "The maximum number of retries to attempt.", default: "0", clean: (value) => util.types.toNumber(value), })
Defined in packages/spectral/src/clients/http/inputs.ts:97
#
Type declaration:comments: string = "The maximum number of retries to attempt."
default: string = "0"
label: string = "Max Retry Count"
placeholder: string = "Max Retries"
required: false = false
type: "string" = "string"
clean(
value
: unknown): number
Const
method#
• method: object = input({ label: "Method", type: "string", required: true, model: supportedMethods.map((method) => ({ label: method, value: method })), comments: "The HTTP method to use.", clean: (value) => util.types.toString(value), })
Defined in packages/spectral/src/clients/http/inputs.ts:53
#
Type declaration:comments: string = "The HTTP method to use."
label: string = "Method"
model: object[] = supportedMethods.map((method) => ({ label: method, value: method }))
required: true = true
type: "string" = "string"
clean(
value
: unknown): string
Const
queryParams#
• queryParams: object = input({ label: "Query Parameter", placeholder: "Query Parameter", type: "string", collection: "keyvaluelist", required: false, comments: "A list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2.", })
Defined in packages/spectral/src/clients/http/inputs.ts:87
#
Type declaration:collection: "keyvaluelist" = "keyvaluelist"
comments: string = "A list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2."
label: string = "Query Parameter"
placeholder: string = "Query Parameter"
required: false = false
type: "string" = "string"
Const
responseType#
• responseType: object = input({ label: "Response Type", placeholder: "Response Type", type: "string", default: "json", required: true, comments: "The type of data you expect in the response. You can request json, text, or binary data.", model: supportedResponseTypes.map((responseType) => ({ label: responseType, value: responseType, })), clean: (value) => util.types.toString(value) as ResponseType, })
Defined in packages/spectral/src/clients/http/inputs.ts:62
#
Type declaration:comments: string = "The type of data you expect in the response. You can request json, text, or binary data."
default: string = "json"
label: string = "Response Type"
model: object[] = supportedResponseTypes.map((responseType) => ({ label: responseType, value: responseType, }))
placeholder: string = "Response Type"
required: true = true
type: "string" = "string"
clean(
value
: unknown): "text" | "arraybuffer" | "blob" | "document" | "json" | "stream"
Const
retryAllErrors#
• retryAllErrors: object = input({ label: "Retry On All Errors", type: "boolean", default: "false", required: false, comments: "If true, retries on all erroneous responses regardless of type.", clean: (value) => util.types.toBool(value), })
Defined in packages/spectral/src/clients/http/inputs.ts:127
#
Type declaration:comments: string = "If true, retries on all erroneous responses regardless of type."
default: string = "false"
label: string = "Retry On All Errors"
required: false = false
type: "boolean" = "boolean"
clean(
value
: unknown): boolean
Const
retryDelayMS#
• retryDelayMS: object = input({ label: "Retry Delay (ms)", placeholder: "Retry Delay", type: "string", required: false, comments: "The delay in milliseconds between retries.", default: "0", clean: (value) => util.types.toNumber(value, 0), })
Defined in packages/spectral/src/clients/http/inputs.ts:107
#
Type declaration:comments: string = "The delay in milliseconds between retries."
default: string = "0"
label: string = "Retry Delay (ms)"
placeholder: string = "Retry Delay"
required: false = false
type: "string" = "string"
clean(
value
: unknown): number
Const
supportedMethods#
• supportedMethods: Method[] = [ "DELETE", "GET", "HEAD", "LINK", "OPTIONS", "PATCH", "POST", "PURGE", "PUT", "UNLINK", ]
Defined in packages/spectral/src/clients/http/inputs.ts:4
Const
supportedResponseTypes#
• supportedResponseTypes: ResponseType[] = [ "arraybuffer", "document", "json", "text", ]
Defined in packages/spectral/src/clients/http/inputs.ts:17
Const
timeout#
• timeout: object = input({ label: "Timeout", type: "string", required: false, comments: "The maximum time that a client will await a response to its request", example: "2000", clean: (value) => util.types.toNumber(value), })
Defined in packages/spectral/src/clients/http/inputs.ts:43
#
Type declaration:comments: string = "The maximum time that a client will await a response to its request"
example: string = "2000"
label: string = "Timeout"
required: false = false
type: "string" = "string"
clean(
value
: unknown): number
Const
url#
• url: object = input({ label: "URL", placeholder: "URL to call", type: "string", required: true, comments: "This is the URL to call.", example: "/sobjects/Account", clean: (value) => util.types.toString(value), })
Defined in packages/spectral/src/clients/http/inputs.ts:24
#
Type declaration:comments: string = "This is the URL to call."
example: string = "/sobjects/Account"
label: string = "URL"
placeholder: string = "URL to call"
required: true = true
type: "string" = "string"
clean(
value
: unknown): string
Const
useExponentialBackoff#
• useExponentialBackoff: object = input({ label: "Use Exponential Backoff", type: "boolean", default: "false", required: false, comments: "Specifies whether to use a pre-defined exponential backoff strategy for retries.", clean: (value) => util.types.toBool(value), })
Defined in packages/spectral/src/clients/http/inputs.ts:117
#
Type declaration:comments: string = "Specifies whether to use a pre-defined exponential backoff strategy for retries."
default: string = "false"
label: string = "Use Exponential Backoff"
required: false = false
type: "boolean" = "boolean"
clean(
value
: unknown): boolean
#
Object literalsConst
inputs#
#
▪ inputs: objectDefined in packages/spectral/src/clients/http/inputs.ts:176
#
data• data: object
Defined in packages/spectral/src/clients/http/inputs.ts:179
#
Type declaration:comments: string = "The HTTP body payload to send to the URL."
example: string = "{"exampleKey": "Example Data"}"
label: string = "Data"
placeholder: string = "Data to send"
required: false = false
type: "string" = "string"
#
debugRequest• debugRequest: object
Defined in packages/spectral/src/clients/http/inputs.ts:187
#
Type declaration:comments: string = "Enabling this flag will log out the current request."
label: string = "Debug Request"
required: false = false
type: "boolean" = "boolean"
clean(
value
: unknown): boolean
#
fileData• fileData: object
Defined in packages/spectral/src/clients/http/inputs.ts:181
#
Type declaration:collection: "keyvaluelist" = "keyvaluelist"
comments: string = "File Data to be sent as a multipart form upload."
example: string =
[{key: "example.txt", value: "My File Contents"}]
label: string = "File Data"
placeholder: string = "Data to send"
required: false = false
type: "string" = "string"
#
fileDataFileNames• fileDataFileNames: object
Defined in packages/spectral/src/clients/http/inputs.ts:182
#
Type declaration:collection: "keyvaluelist" = "keyvaluelist"
comments: string = "File names to apply to the file data inputs. Keys must match the file data keys above."
label: string = "File Data File Names"
placeholder: string = "The file name to apply to a file"
required: false = false
type: "string" = "string"
clean(
values
: any): undefined | object
#
formData• formData: object
Defined in packages/spectral/src/clients/http/inputs.ts:180
#
Type declaration:collection: "keyvaluelist" = "keyvaluelist"
comments: string = "The Form Data to be sent as a multipart form upload."
example: string = "[{"key": "Example Key", "value": new Buffer("Hello World")}]"
label: string = "Form Data"
placeholder: string = "Data to send"
required: false = false
type: "string" = "string"
#
headers• headers: object
Defined in packages/spectral/src/clients/http/inputs.ts:184
#
Type declaration:collection: "keyvaluelist" = "keyvaluelist"
comments: string = "A list of headers to send with the request."
example: string = "User-Agent: curl/7.64.1"
label: string = "Header"
placeholder: string = "Header"
required: false = false
type: "string" = "string"
#
maxRetries• maxRetries: object
Defined in packages/spectral/src/clients/http/inputs.ts:190
#
Type declaration:comments: string = "The maximum number of retries to attempt."
default: string = "0"
label: string = "Max Retry Count"
placeholder: string = "Max Retries"
required: false = false
type: "string" = "string"
clean(
value
: unknown): number
#
method• method: object
Defined in packages/spectral/src/clients/http/inputs.ts:178
#
Type declaration:comments: string = "The HTTP method to use."
label: string = "Method"
model: object[] = supportedMethods.map((method) => ({ label: method, value: method }))
required: true = true
type: "string" = "string"
clean(
value
: unknown): string
#
queryParams• queryParams: object
Defined in packages/spectral/src/clients/http/inputs.ts:183
#
Type declaration:collection: "keyvaluelist" = "keyvaluelist"
comments: string = "A list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2."
label: string = "Query Parameter"
placeholder: string = "Query Parameter"
required: false = false
type: "string" = "string"
#
responseType• responseType: object
Defined in packages/spectral/src/clients/http/inputs.ts:185
#
Type declaration:comments: string = "The type of data you expect in the response. You can request json, text, or binary data."
default: string = "json"
label: string = "Response Type"
model: object[] = supportedResponseTypes.map((responseType) => ({ label: responseType, value: responseType, }))
placeholder: string = "Response Type"
required: true = true
type: "string" = "string"
clean(
value
: unknown): "text" | "arraybuffer" | "blob" | "document" | "json" | "stream"
#
retryAllErrors• retryAllErrors: object
Defined in packages/spectral/src/clients/http/inputs.ts:189
#
Type declaration:comments: string = "If true, retries on all erroneous responses regardless of type."
default: string = "false"
label: string = "Retry On All Errors"
required: false = false
type: "boolean" = "boolean"
clean(
value
: unknown): boolean
#
retryDelayMS• retryDelayMS: object
Defined in packages/spectral/src/clients/http/inputs.ts:188
#
Type declaration:comments: string = "The delay in milliseconds between retries."
default: string = "0"
label: string = "Retry Delay (ms)"
placeholder: string = "Retry Delay"
required: false = false
type: "string" = "string"
clean(
value
: unknown): number
#
timeout• timeout: object
Defined in packages/spectral/src/clients/http/inputs.ts:186
#
Type declaration:comments: string = "The maximum time that a client will await a response to its request"
example: string = "2000"
label: string = "Timeout"
required: false = false
type: "string" = "string"
clean(
value
: unknown): number
#
url• url: object
Defined in packages/spectral/src/clients/http/inputs.ts:177
#
Type declaration:comments: string = "This is the URL to call."
example: string = "/sobjects/Account"
label: string = "URL"
placeholder: string = "URL to call"
required: true = true
type: "string" = "string"
clean(
value
: unknown): string
#
useExponentialBackoff• useExponentialBackoff: object
Defined in packages/spectral/src/clients/http/inputs.ts:191
#
Type declaration:comments: string = "Specifies whether to use a pre-defined exponential backoff strategy for retries."
default: string = "false"
label: string = "Use Exponential Backoff"
required: false = false
type: "boolean" = "boolean"
clean(
value
: unknown): boolean