UNPKG

insomnia-importers

Version:

Various data importers for Insomnia

157 lines 6.44 kB
import { Converter, ImportRequest, Parameter } from '../entities'; import { Auth as V200Auth, Folder as V200Folder, FormParameter as V200FormParameter, Header as V200Header, HttpsSchemaGetpostmanComJsonCollectionV200 as V200Schema, Item as V200Item, Request1 as V200Request1, Url, UrlEncodedParameter as V200UrlEncodedParameter, Variable2 as V200Variable2 } from './postman-2.0.types'; import { Auth as V210Auth, Folder as V210Folder, FormParameter as V210FormParameter, Header as V210Header, HttpsSchemaGetpostmanComJsonCollectionV210 as V210Schema, Item as V210Item, Request1 as V210Request1, UrlEncodedParameter as V210UrlEncodedParameter, Variable2 as V210Variable2 } from './postman-2.1.types'; export declare const id = "postman"; export declare const name = "Postman"; export declare const description = "Importer for Postman collections"; declare type PostmanCollection = V200Schema | V210Schema; declare type Variable = V200Variable2 | V210Variable2; declare type Authetication = V200Auth | V210Auth; declare type Body = V200Request1['body'] | V210Request1['body']; declare type UrlEncodedParameter = V200UrlEncodedParameter | V210UrlEncodedParameter; declare type FormParameter = V200FormParameter | V210FormParameter; declare type Item = V200Item | V210Item; declare type Folder = V200Folder | V210Folder; declare type Header = V200Header | V210Header; export declare class ImportPostman { collection: PostmanCollection; constructor(collection: PostmanCollection); importVariable: (variables: Variable[]) => { [key: string]: { [k: string]: unknown; } | { [k: string]: unknown; } | undefined; } | null; importItems: (items: PostmanCollection['item'], parentId?: string) => ImportRequest[]; importRequestItem: ({ request, name }: Item, parentId: string) => ImportRequest; importFolderItem: ({ name, description }: Folder, parentId: string) => { parentId: string; _id: string; _type: string; name: string | undefined; description: string | import("./postman-2.0.types").Description; }; importCollection: () => ImportRequest[]; importUrl: (url?: Url | undefined) => string; importBody: (body: Body, contentType?: string | undefined) => ImportRequest['body']; importBodyFormdata: (formdata?: FormParameter[] | undefined) => { params: Parameter[] | undefined; mimeType: string; }; importBodyFormUrlEncoded: (urlEncoded?: UrlEncodedParameter[] | undefined) => ImportRequest['body']; importBodyRaw: (raw?: string | undefined, mimeType?: string) => { mimeType?: undefined; text?: undefined; } | { mimeType: string; text: string | undefined; }; importBodyGraphQL: (graphql?: Record<string, unknown> | undefined) => { mimeType?: undefined; text?: undefined; } | { mimeType: string; text: string; }; importAuthentication: (authentication?: Authetication | null | undefined, originalHeaders?: Header[]) => { authentication: {}; headers: Header[]; }; importAwsV4Authentication: (auth: Authetication) => {}; /** * example of AWS header: * @example AWS4-HMAC-SHA256 Credential=<accessKeyId>/20220110/<region>/<service>/aws4_request, SignedHeaders=accept;content-type;host;x-amz-date;x-amz-security-token, Signature=ed270ed6ad1cad3513f6edad9692e4496e321e44954c70a86504eea5e0ef1ff5 */ importАwsv4AuthenticationFromHeader: (authHeader: string, headers: Header[]) => { authentication: {}; headers: Header[]; } | { authentication: { sessionToken?: string | undefined; type: string; disabled: boolean; accessKeyId: string | undefined; region: string | undefined; secretAccessKey: string; service: string | undefined; }; headers: Header[]; }; importBasicAuthentication: (auth: Authetication) => {}; importBasicAuthenticationFromHeader: (authHeader: string) => {}; importBearerTokenAuthentication: (auth: Authetication) => {}; importBearerAuthenticationFromHeader: (authHeader: string) => { type?: undefined; disabled?: undefined; token?: undefined; prefix?: undefined; } | { type: string; disabled: boolean; token: string; prefix: string; }; importDigestAuthentication: (auth: Authetication) => {}; importDigestAuthenticationFromHeader: (authHeader: string) => { type: string; disabled: boolean; username: string | undefined; password: string; }; importOauth1Authentication: (auth: Authetication) => {}; importOauth1AuthenticationFromHeader: (authHeader: string) => { type: string; disabled: boolean; callback: string | undefined; consumerKey: string | undefined; consumerSecret: string; nonce: string | undefined; privateKey: string; realm: string | undefined; signatureMethod: string | undefined; timestamp: string | undefined; tokenKey: string | undefined; tokenSecret: string; verifier: string | undefined; version: string | undefined; }; importOauth2Authentication: (auth: Authetication) => { type: string; disabled: boolean; accessTokenUrl: string; authorizationUrl: string; grantType: string; password: string; username: string; } | { type?: undefined; disabled?: undefined; accessTokenUrl?: undefined; authorizationUrl?: undefined; grantType?: undefined; password?: undefined; username?: undefined; clientId?: undefined; clientSecret?: undefined; redirectUrl?: undefined; } | { type: string; disabled: boolean; accessTokenUrl: string; authorizationUrl: string; grantType: string; password: string; username: string; clientId: string; clientSecret: string; redirectUrl: string; }; findValueByKey: <T extends { key: string; value?: unknown; }>(array?: T[] | undefined, key?: keyof T | undefined) => string; } export declare const convert: Converter; export {}; //# sourceMappingURL=postman.d.ts.map