|
|
@ -7,11 +7,11 @@
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* A collection's friendly name is defined by this field. You would want to set this field to a value that would allow you to easily identify this collection among a bunch of other collections, as such outlining its usage or content.
|
|
|
|
* A collection's friendly name is defined by this field. You would want to set this field to a value that would allow you to easily identify this collection among a bunch of other collections, as such outlining its usage or content.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
export type NameOfTheCollection = string;
|
|
|
|
export type NameOfTheCollection = string
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* A Description can be a raw text, or be an object, which holds the description along with its format.
|
|
|
|
* A Description can be a raw text, or be an object, which holds the description along with its format.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
export type DefinitionsDescription = Description | string | null;
|
|
|
|
export type DefinitionsDescription = Description | string | null
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Postman allows you to version your collections as they grow, and this field holds the version number. While optional, it is recommended that you use this field to its fullest extent!
|
|
|
|
* Postman allows you to version your collections as they grow, and this field holds the version number. While optional, it is recommended that you use this field to its fullest extent!
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -20,42 +20,42 @@ export type CollectionVersion =
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Increment this number if you make changes to the collection that changes its behaviour. E.g: Removing or adding new test scripts. (partly or completely).
|
|
|
|
* Increment this number if you make changes to the collection that changes its behaviour. E.g: Removing or adding new test scripts. (partly or completely).
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
major: number;
|
|
|
|
major: number
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* You should increment this number if you make changes that will not break anything that uses the collection. E.g: removing a folder.
|
|
|
|
* You should increment this number if you make changes that will not break anything that uses the collection. E.g: removing a folder.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
minor: number;
|
|
|
|
minor: number
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Ideally, minor changes to a collection should result in the increment of this number.
|
|
|
|
* Ideally, minor changes to a collection should result in the increment of this number.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
patch: number;
|
|
|
|
patch: number
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* A human friendly identifier to make sense of the version numbers. E.g: 'beta-3'
|
|
|
|
* A human friendly identifier to make sense of the version numbers. E.g: 'beta-3'
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
identifier?: string;
|
|
|
|
identifier?: string
|
|
|
|
meta?: any;
|
|
|
|
meta?: any
|
|
|
|
[k: string]: any;
|
|
|
|
[k: string]: any
|
|
|
|
}
|
|
|
|
}
|
|
|
|
| string;
|
|
|
|
| string
|
|
|
|
export type Items1 = Item | Folder;
|
|
|
|
export type Items1 = Item | Folder
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Using variables in your Postman requests eliminates the need to duplicate requests, which can save a lot of time. Variables can be defined, and referenced to from any part of a request.
|
|
|
|
* Using variables in your Postman requests eliminates the need to duplicate requests, which can save a lot of time. Variables can be defined, and referenced to from any part of a request.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
export type Variable =
|
|
|
|
export type Variable =
|
|
|
|
| {
|
|
|
|
| {
|
|
|
|
[k: string]: any;
|
|
|
|
[k: string]: any
|
|
|
|
}
|
|
|
|
}
|
|
|
|
| {
|
|
|
|
| {
|
|
|
|
[k: string]: any;
|
|
|
|
[k: string]: any
|
|
|
|
}
|
|
|
|
}
|
|
|
|
| {
|
|
|
|
| {
|
|
|
|
[k: string]: any;
|
|
|
|
[k: string]: any
|
|
|
|
};
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Collection variables allow you to define a set of variables, that are a *part of the collection*, as opposed to environments, which are separate entities.
|
|
|
|
* Collection variables allow you to define a set of variables, that are a *part of the collection*, as opposed to environments, which are separate entities.
|
|
|
|
* *Note: Collection variables must not contain any sensitive information.*
|
|
|
|
* *Note: Collection variables must not contain any sensitive information.*
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
export type VariableList = Variable[];
|
|
|
|
export type VariableList = Variable[]
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* If object, contains the complete broken-down URL for this request. If string, contains the literal request URL.
|
|
|
|
* If object, contains the complete broken-down URL for this request. If string, contains the literal request URL.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -64,170 +64,170 @@ export type Url =
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* The string representation of the request URL, including the protocol, host, path, hash, query parameter(s) and path variable(s).
|
|
|
|
* The string representation of the request URL, including the protocol, host, path, hash, query parameter(s) and path variable(s).
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
raw?: string;
|
|
|
|
raw?: string
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* The protocol associated with the request, E.g: 'http'
|
|
|
|
* The protocol associated with the request, E.g: 'http'
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
protocol?: string;
|
|
|
|
protocol?: string
|
|
|
|
host?: Host;
|
|
|
|
host?: Host
|
|
|
|
path?:
|
|
|
|
path?:
|
|
|
|
| string
|
|
|
|
| string
|
|
|
|
| (
|
|
|
|
| (
|
|
|
|
| string
|
|
|
|
| string
|
|
|
|
| {
|
|
|
|
| {
|
|
|
|
type?: string;
|
|
|
|
type?: string
|
|
|
|
value?: string;
|
|
|
|
value?: string
|
|
|
|
[k: string]: any;
|
|
|
|
[k: string]: any
|
|
|
|
})[];
|
|
|
|
})[]
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* The port number present in this URL. An empty value implies 80/443 depending on whether the protocol field contains http/https.
|
|
|
|
* The port number present in this URL. An empty value implies 80/443 depending on whether the protocol field contains http/https.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
port?: string;
|
|
|
|
port?: string
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* An array of QueryParams, which is basically the query string part of the URL, parsed into separate variables
|
|
|
|
* An array of QueryParams, which is basically the query string part of the URL, parsed into separate variables
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
query?: QueryParam[];
|
|
|
|
query?: QueryParam[]
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Contains the URL fragment (if any). Usually this is not transmitted over the network, but it could be useful to store this in some cases.
|
|
|
|
* Contains the URL fragment (if any). Usually this is not transmitted over the network, but it could be useful to store this in some cases.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
hash?: string;
|
|
|
|
hash?: string
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Postman supports path variables with the syntax `/path/:variableName/to/somewhere`. These variables are stored in this field.
|
|
|
|
* Postman supports path variables with the syntax `/path/:variableName/to/somewhere`. These variables are stored in this field.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
variable?: Variable[];
|
|
|
|
variable?: Variable[]
|
|
|
|
[k: string]: any;
|
|
|
|
[k: string]: any
|
|
|
|
}
|
|
|
|
}
|
|
|
|
| string;
|
|
|
|
| string
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* The host for the URL, E.g: api.yourdomain.com. Can be stored as a string or as an array of strings.
|
|
|
|
* The host for the URL, E.g: api.yourdomain.com. Can be stored as a string or as an array of strings.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
export type Host = string | string[];
|
|
|
|
export type Host = string | string[]
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Postman allows you to configure scripts to run when specific events occur. These scripts are stored here, and can be referenced in the collection by their ID.
|
|
|
|
* Postman allows you to configure scripts to run when specific events occur. These scripts are stored here, and can be referenced in the collection by their ID.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
export type EventList = Event[];
|
|
|
|
export type EventList = Event[]
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* A request represents an HTTP request. If a string, the string is assumed to be the request URL and the method is assumed to be 'GET'.
|
|
|
|
* A request represents an HTTP request. If a string, the string is assumed to be the request URL and the method is assumed to be 'GET'.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
export type Request1 = Request | string;
|
|
|
|
export type Request1 = Request | string
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* The attributes for [AWS Auth](http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html).
|
|
|
|
* The attributes for [AWS Auth](http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html).
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
export type AwsSignatureV4 = Auth1[];
|
|
|
|
export type AwsSignatureV4 = Auth1[]
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* The attributes for [Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication).
|
|
|
|
* The attributes for [Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication).
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
export type BasicAuthentication = Auth1[];
|
|
|
|
export type BasicAuthentication = Auth1[]
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* The helper attributes for [Bearer Token Authentication](https://tools.ietf.org/html/rfc6750)
|
|
|
|
* The helper attributes for [Bearer Token Authentication](https://tools.ietf.org/html/rfc6750)
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
export type BearerTokenAuthentication = Auth1[];
|
|
|
|
export type BearerTokenAuthentication = Auth1[]
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* The attributes for [Digest Authentication](https://en.wikipedia.org/wiki/Digest_access_authentication).
|
|
|
|
* The attributes for [Digest Authentication](https://en.wikipedia.org/wiki/Digest_access_authentication).
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
export type DigestAuthentication = Auth1[];
|
|
|
|
export type DigestAuthentication = Auth1[]
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* The attributes for [Hawk Authentication](https://github.com/hueniverse/hawk)
|
|
|
|
* The attributes for [Hawk Authentication](https://github.com/hueniverse/hawk)
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
export type HawkAuthentication = Auth1[];
|
|
|
|
export type HawkAuthentication = Auth1[]
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* The attributes for [NTLM Authentication](https://msdn.microsoft.com/en-us/library/cc237488.aspx)
|
|
|
|
* The attributes for [NTLM Authentication](https://msdn.microsoft.com/en-us/library/cc237488.aspx)
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
export type NtlmAuthentication = Auth1[];
|
|
|
|
export type NtlmAuthentication = Auth1[]
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* The attributes for [OAuth2](https://oauth.net/1/)
|
|
|
|
* The attributes for [OAuth2](https://oauth.net/1/)
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
export type OAuth1 = Auth1[];
|
|
|
|
export type OAuth1 = Auth1[]
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Helper attributes for [OAuth2](https://oauth.net/2/)
|
|
|
|
* Helper attributes for [OAuth2](https://oauth.net/2/)
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
export type OAuth2 = Auth1[];
|
|
|
|
export type OAuth2 = Auth1[]
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* A representation for a list of headers
|
|
|
|
* A representation for a list of headers
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
export type HeaderList = Header[];
|
|
|
|
export type HeaderList = Header[]
|
|
|
|
export type FormParameter =
|
|
|
|
export type FormParameter =
|
|
|
|
| {
|
|
|
|
| {
|
|
|
|
key: string;
|
|
|
|
key: string
|
|
|
|
value?: string;
|
|
|
|
value?: string
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* When set to true, prevents this form data entity from being sent.
|
|
|
|
* When set to true, prevents this form data entity from being sent.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
disabled?: boolean;
|
|
|
|
disabled?: boolean
|
|
|
|
type?: "text";
|
|
|
|
type?: "text"
|
|
|
|
description?: DefinitionsDescription;
|
|
|
|
description?: DefinitionsDescription
|
|
|
|
[k: string]: any;
|
|
|
|
[k: string]: any
|
|
|
|
}
|
|
|
|
}
|
|
|
|
| {
|
|
|
|
| {
|
|
|
|
key: string;
|
|
|
|
key: string
|
|
|
|
src?: string;
|
|
|
|
src?: string
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* When set to true, prevents this form data entity from being sent.
|
|
|
|
* When set to true, prevents this form data entity from being sent.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
disabled?: boolean;
|
|
|
|
disabled?: boolean
|
|
|
|
type?: "file";
|
|
|
|
type?: "file"
|
|
|
|
description?: DefinitionsDescription;
|
|
|
|
description?: DefinitionsDescription
|
|
|
|
[k: string]: any;
|
|
|
|
[k: string]: any
|
|
|
|
};
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* The time taken by the request to complete. If a number, the unit is milliseconds. If the response is manually created, this can be set to `null`.
|
|
|
|
* The time taken by the request to complete. If a number, the unit is milliseconds. If the response is manually created, this can be set to `null`.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
export type ResponseTime = null | string | number;
|
|
|
|
export type ResponseTime = null | string | number
|
|
|
|
export type Headers = Header2 | string;
|
|
|
|
export type Headers = Header2 | string
|
|
|
|
export type Header1 = string;
|
|
|
|
export type Header1 = string
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* No HTTP request is complete without its headers, and the same is true for a Postman request. This field is an array containing all the headers.
|
|
|
|
* No HTTP request is complete without its headers, and the same is true for a Postman request. This field is an array containing all the headers.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
export type Header2 = (Header | Header1)[];
|
|
|
|
export type Header2 = (Header | Header1)[]
|
|
|
|
export type Responses = Response[];
|
|
|
|
export type Responses = Response[]
|
|
|
|
export type Items = Item | Folder;
|
|
|
|
export type Items = Item | Folder
|
|
|
|
|
|
|
|
|
|
|
|
export interface PostmanCollection {
|
|
|
|
export interface PostmanCollection {
|
|
|
|
info: Information;
|
|
|
|
info: Information
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Items are the basic unit for a Postman collection. You can think of them as corresponding to a single API endpoint. Each Item has one request and may have multiple API responses associated with it.
|
|
|
|
* Items are the basic unit for a Postman collection. You can think of them as corresponding to a single API endpoint. Each Item has one request and may have multiple API responses associated with it.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
item: Items1[];
|
|
|
|
item: Items1[]
|
|
|
|
event?: EventList;
|
|
|
|
event?: EventList
|
|
|
|
variable?: VariableList;
|
|
|
|
variable?: VariableList
|
|
|
|
auth?: null | Auth;
|
|
|
|
auth?: null | Auth
|
|
|
|
[k: string]: any;
|
|
|
|
[k: string]: any
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Detailed description of the info block
|
|
|
|
* Detailed description of the info block
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
export interface Information {
|
|
|
|
export interface Information {
|
|
|
|
name: NameOfTheCollection;
|
|
|
|
name: NameOfTheCollection
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Every collection is identified by the unique value of this field. The value of this field is usually easiest to generate using a UID generator function. If you already have a collection, it is recommended that you maintain the same id since changing the id usually implies that is a different collection than it was originally.
|
|
|
|
* Every collection is identified by the unique value of this field. The value of this field is usually easiest to generate using a UID generator function. If you already have a collection, it is recommended that you maintain the same id since changing the id usually implies that is a different collection than it was originally.
|
|
|
|
* *Note: This field exists for compatibility reasons with Collection Format V1.*
|
|
|
|
* *Note: This field exists for compatibility reasons with Collection Format V1.*
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
_postman_id?: string;
|
|
|
|
_postman_id?: string
|
|
|
|
description?: DefinitionsDescription;
|
|
|
|
description?: DefinitionsDescription
|
|
|
|
version?: CollectionVersion;
|
|
|
|
version?: CollectionVersion
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* This should ideally hold a link to the Postman schema that is used to validate this collection. E.g: https://schema.getpostman.com/collection/v1
|
|
|
|
* This should ideally hold a link to the Postman schema that is used to validate this collection. E.g: https://schema.getpostman.com/collection/v1
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
schema: string;
|
|
|
|
schema: string
|
|
|
|
[k: string]: any;
|
|
|
|
[k: string]: any
|
|
|
|
}
|
|
|
|
}
|
|
|
|
export interface Description {
|
|
|
|
export interface Description {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* The content of the description goes here, as a raw string.
|
|
|
|
* The content of the description goes here, as a raw string.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
content?: string;
|
|
|
|
content?: string
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Holds the mime type of the raw description content. E.g: 'text/markdown' or 'text/html'.
|
|
|
|
* Holds the mime type of the raw description content. E.g: 'text/markdown' or 'text/html'.
|
|
|
|
* The type is used to correctly render the description when generating documentation, or in the Postman app.
|
|
|
|
* The type is used to correctly render the description when generating documentation, or in the Postman app.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
type?: string;
|
|
|
|
type?: string
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Description can have versions associated with it, which should be put in this property.
|
|
|
|
* Description can have versions associated with it, which should be put in this property.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
version?: {
|
|
|
|
version?: {
|
|
|
|
[k: string]: any;
|
|
|
|
[k: string]: any
|
|
|
|
};
|
|
|
|
}
|
|
|
|
[k: string]: any;
|
|
|
|
[k: string]: any
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Items are entities which contain an actual HTTP request, and sample responses attached to it.
|
|
|
|
* Items are entities which contain an actual HTTP request, and sample responses attached to it.
|
|
|
@ -236,17 +236,17 @@ export interface Item {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* A unique ID that is used to identify collections internally
|
|
|
|
* A unique ID that is used to identify collections internally
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
id?: string;
|
|
|
|
id?: string
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* A human readable identifier for the current item.
|
|
|
|
* A human readable identifier for the current item.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
name?: string;
|
|
|
|
name?: string
|
|
|
|
description?: DefinitionsDescription;
|
|
|
|
description?: DefinitionsDescription
|
|
|
|
variable?: VariableList;
|
|
|
|
variable?: VariableList
|
|
|
|
event?: EventList;
|
|
|
|
event?: EventList
|
|
|
|
request: Request1;
|
|
|
|
request: Request1
|
|
|
|
response?: Responses;
|
|
|
|
response?: Responses
|
|
|
|
[k: string]: any;
|
|
|
|
[k: string]: any
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Defines a script associated with an associated event name
|
|
|
|
* Defines a script associated with an associated event name
|
|
|
@ -255,17 +255,17 @@ export interface Event {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* A unique identifier for the enclosing event.
|
|
|
|
* A unique identifier for the enclosing event.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
id?: string;
|
|
|
|
id?: string
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Can be set to `test` or `prerequest` for test scripts or pre-request scripts respectively.
|
|
|
|
* Can be set to `test` or `prerequest` for test scripts or pre-request scripts respectively.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
listen: string;
|
|
|
|
listen: string
|
|
|
|
script?: Script;
|
|
|
|
script?: Script
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Indicates whether the event is disabled. If absent, the event is assumed to be enabled.
|
|
|
|
* Indicates whether the event is disabled. If absent, the event is assumed to be enabled.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
disabled?: boolean;
|
|
|
|
disabled?: boolean
|
|
|
|
[k: string]: any;
|
|
|
|
[k: string]: any
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* A script is a snippet of Javascript code that can be used to to perform setup or teardown operations on a particular response.
|
|
|
|
* A script is a snippet of Javascript code that can be used to to perform setup or teardown operations on a particular response.
|
|
|
@ -274,34 +274,34 @@ export interface Script {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* A unique, user defined identifier that can be used to refer to this script from requests.
|
|
|
|
* A unique, user defined identifier that can be used to refer to this script from requests.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
id?: string;
|
|
|
|
id?: string
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Type of the script. E.g: 'text/javascript'
|
|
|
|
* Type of the script. E.g: 'text/javascript'
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
type?: string;
|
|
|
|
type?: string
|
|
|
|
exec?: string[] | string;
|
|
|
|
exec?: string[] | string
|
|
|
|
src?: Url;
|
|
|
|
src?: Url
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Script name
|
|
|
|
* Script name
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
name?: string;
|
|
|
|
name?: string
|
|
|
|
[k: string]: any;
|
|
|
|
[k: string]: any
|
|
|
|
}
|
|
|
|
}
|
|
|
|
export interface QueryParam {
|
|
|
|
export interface QueryParam {
|
|
|
|
key?: string | null;
|
|
|
|
key?: string | null
|
|
|
|
value?: string | null;
|
|
|
|
value?: string | null
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* If set to true, the current query parameter will not be sent with the request.
|
|
|
|
* If set to true, the current query parameter will not be sent with the request.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
disabled?: boolean;
|
|
|
|
disabled?: boolean
|
|
|
|
description?: DefinitionsDescription;
|
|
|
|
description?: DefinitionsDescription
|
|
|
|
[k: string]: any;
|
|
|
|
[k: string]: any
|
|
|
|
}
|
|
|
|
}
|
|
|
|
export interface Request {
|
|
|
|
export interface Request {
|
|
|
|
url?: Url;
|
|
|
|
url?: Url
|
|
|
|
auth?: null | Auth;
|
|
|
|
auth?: null | Auth
|
|
|
|
proxy?: ProxyConfig;
|
|
|
|
proxy?: ProxyConfig
|
|
|
|
certificate?: Certificate;
|
|
|
|
certificate?: Certificate
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* The HTTP method associated with this request.
|
|
|
|
* The HTTP method associated with this request.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -320,9 +320,9 @@ export interface Request {
|
|
|
|
| "LOCK"
|
|
|
|
| "LOCK"
|
|
|
|
| "UNLOCK"
|
|
|
|
| "UNLOCK"
|
|
|
|
| "PROPFIND"
|
|
|
|
| "PROPFIND"
|
|
|
|
| "VIEW";
|
|
|
|
| "VIEW"
|
|
|
|
description?: DefinitionsDescription;
|
|
|
|
description?: DefinitionsDescription
|
|
|
|
header?: HeaderList | string;
|
|
|
|
header?: HeaderList | string
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* This field contains the data usually contained in the request body.
|
|
|
|
* This field contains the data usually contained in the request body.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -330,46 +330,46 @@ export interface Request {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Postman stores the type of data associated with this request in this field.
|
|
|
|
* Postman stores the type of data associated with this request in this field.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
mode?: "raw" | "urlencoded" | "formdata" | "file";
|
|
|
|
mode?: "raw" | "urlencoded" | "formdata" | "file"
|
|
|
|
raw?: string;
|
|
|
|
raw?: string
|
|
|
|
urlencoded?: UrlEncodedParameter[];
|
|
|
|
urlencoded?: UrlEncodedParameter[]
|
|
|
|
formdata?: FormParameter[];
|
|
|
|
formdata?: FormParameter[]
|
|
|
|
file?: {
|
|
|
|
file?: {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Contains the name of the file to upload. _Not the path_.
|
|
|
|
* Contains the name of the file to upload. _Not the path_.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
src?: string;
|
|
|
|
src?: string
|
|
|
|
content?: string;
|
|
|
|
content?: string
|
|
|
|
[k: string]: any;
|
|
|
|
[k: string]: any
|
|
|
|
};
|
|
|
|
}
|
|
|
|
[k: string]: any;
|
|
|
|
[k: string]: any
|
|
|
|
};
|
|
|
|
}
|
|
|
|
[k: string]: any;
|
|
|
|
[k: string]: any
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Represents authentication helpers provided by Postman
|
|
|
|
* Represents authentication helpers provided by Postman
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
export interface Auth {
|
|
|
|
export interface Auth {
|
|
|
|
type: "awsv4" | "basic" | "bearer" | "digest" | "hawk" | "noauth" | "oauth1" | "oauth2" | "ntlm";
|
|
|
|
type: "awsv4" | "basic" | "bearer" | "digest" | "hawk" | "noauth" | "oauth1" | "oauth2" | "ntlm"
|
|
|
|
noauth?: any;
|
|
|
|
noauth?: any
|
|
|
|
awsv4?: AwsSignatureV4;
|
|
|
|
awsv4?: AwsSignatureV4
|
|
|
|
basic?: BasicAuthentication;
|
|
|
|
basic?: BasicAuthentication
|
|
|
|
bearer?: BearerTokenAuthentication;
|
|
|
|
bearer?: BearerTokenAuthentication
|
|
|
|
digest?: DigestAuthentication;
|
|
|
|
digest?: DigestAuthentication
|
|
|
|
hawk?: HawkAuthentication;
|
|
|
|
hawk?: HawkAuthentication
|
|
|
|
ntlm?: NtlmAuthentication;
|
|
|
|
ntlm?: NtlmAuthentication
|
|
|
|
oauth1?: OAuth1;
|
|
|
|
oauth1?: OAuth1
|
|
|
|
oauth2?: OAuth2;
|
|
|
|
oauth2?: OAuth2
|
|
|
|
[k: string]: any;
|
|
|
|
[k: string]: any
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Represents an attribute for any authorization method provided by Postman. For example `username` and `password` are set as auth attributes for Basic Authentication method.
|
|
|
|
* Represents an attribute for any authorization method provided by Postman. For example `username` and `password` are set as auth attributes for Basic Authentication method.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
export interface Auth1 {
|
|
|
|
export interface Auth1 {
|
|
|
|
key: string;
|
|
|
|
key: string
|
|
|
|
value?: any;
|
|
|
|
value?: any
|
|
|
|
type?: string;
|
|
|
|
type?: string
|
|
|
|
[k: string]: any;
|
|
|
|
[k: string]: any
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Using the Proxy, you can configure your custom proxy into the postman for particular url match
|
|
|
|
* Using the Proxy, you can configure your custom proxy into the postman for particular url match
|
|
|
@ -378,24 +378,24 @@ export interface ProxyConfig {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* The Url match for which the proxy config is defined
|
|
|
|
* The Url match for which the proxy config is defined
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
match?: string;
|
|
|
|
match?: string
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* The proxy server host
|
|
|
|
* The proxy server host
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
host?: string;
|
|
|
|
host?: string
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* The proxy server port
|
|
|
|
* The proxy server port
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
port?: number;
|
|
|
|
port?: number
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* The tunneling details for the proxy config
|
|
|
|
* The tunneling details for the proxy config
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
tunnel?: boolean;
|
|
|
|
tunnel?: boolean
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* When set to true, ignores this proxy configuration entity
|
|
|
|
* When set to true, ignores this proxy configuration entity
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
disabled?: boolean;
|
|
|
|
disabled?: boolean
|
|
|
|
[k: string]: any;
|
|
|
|
[k: string]: any
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* A representation of an ssl certificate
|
|
|
|
* A representation of an ssl certificate
|
|
|
@ -404,11 +404,11 @@ export interface Certificate {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* A name for the certificate for user reference
|
|
|
|
* A name for the certificate for user reference
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
name?: string;
|
|
|
|
name?: string
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* A list of Url match pattern strings, to identify Urls this certificate can be used for.
|
|
|
|
* A list of Url match pattern strings, to identify Urls this certificate can be used for.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
matches?: any[];
|
|
|
|
matches?: any[]
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* An object containing path to file containing private key, on the file system
|
|
|
|
* An object containing path to file containing private key, on the file system
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -417,10 +417,10 @@ export interface Certificate {
|
|
|
|
* The path to file containing key for certificate, on the file system
|
|
|
|
* The path to file containing key for certificate, on the file system
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
src?: {
|
|
|
|
src?: {
|
|
|
|
[k: string]: any;
|
|
|
|
[k: string]: any
|
|
|
|
};
|
|
|
|
}
|
|
|
|
[k: string]: any;
|
|
|
|
[k: string]: any
|
|
|
|
};
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* An object containing path to file certificate, on the file system
|
|
|
|
* An object containing path to file certificate, on the file system
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -429,15 +429,15 @@ export interface Certificate {
|
|
|
|
* The path to file containing key for certificate, on the file system
|
|
|
|
* The path to file containing key for certificate, on the file system
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
src?: {
|
|
|
|
src?: {
|
|
|
|
[k: string]: any;
|
|
|
|
[k: string]: any
|
|
|
|
};
|
|
|
|
}
|
|
|
|
[k: string]: any;
|
|
|
|
[k: string]: any
|
|
|
|
};
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* The passphrase for the certificate
|
|
|
|
* The passphrase for the certificate
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
passphrase?: string;
|
|
|
|
passphrase?: string
|
|
|
|
[k: string]: any;
|
|
|
|
[k: string]: any
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Represents a single HTTP Header
|
|
|
|
* Represents a single HTTP Header
|
|
|
@ -446,24 +446,24 @@ export interface Header {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* This holds the LHS of the HTTP Header, e.g ``Content-Type`` or ``X-Custom-Header``
|
|
|
|
* This holds the LHS of the HTTP Header, e.g ``Content-Type`` or ``X-Custom-Header``
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
key: string;
|
|
|
|
key: string
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* The value (or the RHS) of the Header is stored in this field.
|
|
|
|
* The value (or the RHS) of the Header is stored in this field.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
value: string;
|
|
|
|
value: string
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* If set to true, the current header will not be sent with requests.
|
|
|
|
* If set to true, the current header will not be sent with requests.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
disabled?: boolean;
|
|
|
|
disabled?: boolean
|
|
|
|
description?: DefinitionsDescription;
|
|
|
|
description?: DefinitionsDescription
|
|
|
|
[k: string]: any;
|
|
|
|
[k: string]: any
|
|
|
|
}
|
|
|
|
}
|
|
|
|
export interface UrlEncodedParameter {
|
|
|
|
export interface UrlEncodedParameter {
|
|
|
|
key: string;
|
|
|
|
key: string
|
|
|
|
value?: string;
|
|
|
|
value?: string
|
|
|
|
disabled?: boolean;
|
|
|
|
disabled?: boolean
|
|
|
|
description?: DefinitionsDescription;
|
|
|
|
description?: DefinitionsDescription
|
|
|
|
[k: string]: any;
|
|
|
|
[k: string]: any
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* A response represents an HTTP response.
|
|
|
|
* A response represents an HTTP response.
|
|
|
@ -472,24 +472,24 @@ export interface Response {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* A unique, user defined identifier that can be used to refer to this response from requests.
|
|
|
|
* A unique, user defined identifier that can be used to refer to this response from requests.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
id?: string;
|
|
|
|
id?: string
|
|
|
|
originalRequest?: Request1;
|
|
|
|
originalRequest?: Request1
|
|
|
|
responseTime?: ResponseTime;
|
|
|
|
responseTime?: ResponseTime
|
|
|
|
header?: Headers;
|
|
|
|
header?: Headers
|
|
|
|
cookie?: Cookie[];
|
|
|
|
cookie?: Cookie[]
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* The raw text of the response.
|
|
|
|
* The raw text of the response.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
body?: string;
|
|
|
|
body?: string
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* The response status, e.g: '200 OK'
|
|
|
|
* The response status, e.g: '200 OK'
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
status?: string;
|
|
|
|
status?: string
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* The numerical response code, example: 200, 201, 404, etc.
|
|
|
|
* The numerical response code, example: 200, 201, 404, etc.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
code?: number;
|
|
|
|
code?: number
|
|
|
|
[k: string]: any;
|
|
|
|
[k: string]: any
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* A Cookie, that follows the [Google Chrome format](https://developer.chrome.com/extensions/cookies)
|
|
|
|
* A Cookie, that follows the [Google Chrome format](https://developer.chrome.com/extensions/cookies)
|
|
|
@ -498,45 +498,45 @@ export interface Cookie {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* The domain for which this cookie is valid.
|
|
|
|
* The domain for which this cookie is valid.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
domain: string;
|
|
|
|
domain: string
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* When the cookie expires.
|
|
|
|
* When the cookie expires.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
expires?: string | number;
|
|
|
|
expires?: string | number
|
|
|
|
maxAge?: string;
|
|
|
|
maxAge?: string
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* True if the cookie is a host-only cookie. (i.e. a request's URL domain must exactly match the domain of the cookie).
|
|
|
|
* True if the cookie is a host-only cookie. (i.e. a request's URL domain must exactly match the domain of the cookie).
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
hostOnly?: boolean;
|
|
|
|
hostOnly?: boolean
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Indicates if this cookie is HTTP Only. (if True, the cookie is inaccessible to client-side scripts)
|
|
|
|
* Indicates if this cookie is HTTP Only. (if True, the cookie is inaccessible to client-side scripts)
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
httpOnly?: boolean;
|
|
|
|
httpOnly?: boolean
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* This is the name of the Cookie.
|
|
|
|
* This is the name of the Cookie.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
name?: string;
|
|
|
|
name?: string
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* The path associated with the Cookie.
|
|
|
|
* The path associated with the Cookie.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
path: string;
|
|
|
|
path: string
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Indicates if the 'secure' flag is set on the Cookie, meaning that it is transmitted over secure connections only. (typically HTTPS)
|
|
|
|
* Indicates if the 'secure' flag is set on the Cookie, meaning that it is transmitted over secure connections only. (typically HTTPS)
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
secure?: boolean;
|
|
|
|
secure?: boolean
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* True if the cookie is a session cookie.
|
|
|
|
* True if the cookie is a session cookie.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
session?: boolean;
|
|
|
|
session?: boolean
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* The value of the Cookie.
|
|
|
|
* The value of the Cookie.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
value?: string;
|
|
|
|
value?: string
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Custom attributes for a cookie go here, such as the [Priority Field](https://code.google.com/p/chromium/issues/detail?id=232693)
|
|
|
|
* Custom attributes for a cookie go here, such as the [Priority Field](https://code.google.com/p/chromium/issues/detail?id=232693)
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
extensions?: any[];
|
|
|
|
extensions?: any[]
|
|
|
|
[k: string]: any;
|
|
|
|
[k: string]: any
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* One of the primary goals of Postman is to organize the development of APIs. To this end, it is necessary to be able to group requests together. This can be achived using 'Folders'. A folder just is an ordered set of requests.
|
|
|
|
* One of the primary goals of Postman is to organize the development of APIs. To this end, it is necessary to be able to group requests together. This can be achived using 'Folders'. A folder just is an ordered set of requests.
|
|
|
@ -545,14 +545,14 @@ export interface Folder {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* A folder's friendly name is defined by this field. You would want to set this field to a value that would allow you to easily identify this folder.
|
|
|
|
* A folder's friendly name is defined by this field. You would want to set this field to a value that would allow you to easily identify this folder.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
name?: string;
|
|
|
|
name?: string
|
|
|
|
description?: DefinitionsDescription;
|
|
|
|
description?: DefinitionsDescription
|
|
|
|
variable?: VariableList;
|
|
|
|
variable?: VariableList
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Items are entities which contain an actual HTTP request, and sample responses attached to it. Folders may contain many items.
|
|
|
|
* Items are entities which contain an actual HTTP request, and sample responses attached to it. Folders may contain many items.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
item: Items[];
|
|
|
|
item: Items[]
|
|
|
|
event?: EventList;
|
|
|
|
event?: EventList
|
|
|
|
auth?: null | Auth;
|
|
|
|
auth?: null | Auth
|
|
|
|
[k: string]: any;
|
|
|
|
[k: string]: any
|
|
|
|
}
|
|
|
|
}
|
|
|
|