Files
hoppscotch/helpers/types/HoppRequestSaveContext.ts
2021-08-19 12:06:56 +05:30

32 lines
685 B
TypeScript

/**
* We use the save context to figure out
* how a loaded request is to be saved.
* These will be set when the request is loaded
* into the request session (RESTSession)
*/
export type HoppRequestSaveContext =
| {
/**
* The origin source of the request
*/
originLocation: "user-collection"
/**
* Path to the request folder
*/
folderPath: string
/**
* Index to the request
*/
requestIndex: number
}
| {
/**
* The origin source of the request
*/
originLocation: "team-collection"
/**
* ID of the request in the team
*/
requestID: string
}