New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@equisoft/equisoft-plan-sdk-typescript

Package Overview
Dependencies
Maintainers
11
Versions
126
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@equisoft/equisoft-plan-sdk-typescript - npm Package Compare versions

Comparing version 7.5.2 to 9.4.0

dist/esm/apis/CommandApi.d.ts

6

dist/apis/CommandApi.d.ts

@@ -13,3 +13,3 @@ /**

import * as runtime from '../runtime';
import { CmdCopyFNA, CmdCopyFNAResponse } from '../models';
import type { CmdCopyFNA, CmdCopyFNAResponse } from '../models/index';
export interface CmdCopyFNARequest {

@@ -24,6 +24,6 @@ cmdCopyFNA: CmdCopyFNA;

*/
cmdCopyFNARaw(requestParameters: CmdCopyFNARequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<CmdCopyFNAResponse>>;
cmdCopyFNARaw(requestParameters: CmdCopyFNARequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CmdCopyFNAResponse>>;
/**
*/
cmdCopyFNA(requestParameters: CmdCopyFNARequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<CmdCopyFNAResponse>;
cmdCopyFNA(requestParameters: CmdCopyFNARequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CmdCopyFNAResponse>;
}

@@ -27,3 +27,3 @@ "use strict";

const runtime = require("../runtime");
const models_1 = require("../models");
const index_1 = require("../models/index");
/**

@@ -56,5 +56,5 @@ *

query: queryParameters,
body: models_1.CmdCopyFNAToJSON(requestParameters.cmdCopyFNA),
body: (0, index_1.CmdCopyFNAToJSON)(requestParameters.cmdCopyFNA),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => models_1.CmdCopyFNAResponseFromJSON(jsonValue));
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CmdCopyFNAResponseFromJSON)(jsonValue));
});

@@ -61,0 +61,0 @@ }

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -10,3 +14,3 @@ if (k2 === undefined) k2 = k;

var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};

@@ -13,0 +17,0 @@ Object.defineProperty(exports, "__esModule", { value: true });

@@ -13,3 +13,3 @@ /**

import * as runtime from '../runtime';
import { OrganizationsListOrganizationsResponse, OrganizationsOrganization, UsersListUsersResponse } from '../models';
import type { OrganizationsListOrganizationsResponse, OrganizationsOrganization, UsersListUsersResponse } from '../models/index';
export interface GetOrganizationRequest {

@@ -30,18 +30,18 @@ id: number;

*/
getOrganizationRaw(requestParameters: GetOrganizationRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<OrganizationsOrganization>>;
getOrganizationRaw(requestParameters: GetOrganizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrganizationsOrganization>>;
/**
*/
getOrganization(requestParameters: GetOrganizationRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<OrganizationsOrganization>;
getOrganization(requestParameters: GetOrganizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrganizationsOrganization>;
/**
*/
listOrganizationUsersRaw(requestParameters: ListOrganizationUsersRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<UsersListUsersResponse>>;
listOrganizationUsersRaw(requestParameters: ListOrganizationUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UsersListUsersResponse>>;
/**
*/
listOrganizationUsers(requestParameters: ListOrganizationUsersRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<UsersListUsersResponse>;
listOrganizationUsers(requestParameters: ListOrganizationUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UsersListUsersResponse>;
/**
*/
listOrganizationsRaw(requestParameters: ListOrganizationsRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<OrganizationsListOrganizationsResponse>>;
listOrganizationsRaw(requestParameters: ListOrganizationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrganizationsListOrganizationsResponse>>;
/**
*/
listOrganizations(requestParameters: ListOrganizationsRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<OrganizationsListOrganizationsResponse>;
listOrganizations(requestParameters: ListOrganizationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrganizationsListOrganizationsResponse>;
}

@@ -27,3 +27,3 @@ "use strict";

const runtime = require("../runtime");
const models_1 = require("../models");
const index_1 = require("../models/index");
/**

@@ -56,3 +56,3 @@ *

}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => models_1.OrganizationsOrganizationFromJSON(jsonValue));
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OrganizationsOrganizationFromJSON)(jsonValue));
});

@@ -91,3 +91,3 @@ }

}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => models_1.UsersListUsersResponseFromJSON(jsonValue));
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UsersListUsersResponseFromJSON)(jsonValue));
});

@@ -129,3 +129,3 @@ }

}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => models_1.OrganizationsListOrganizationsResponseFromJSON(jsonValue));
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OrganizationsListOrganizationsResponseFromJSON)(jsonValue));
});

@@ -132,0 +132,0 @@ }

@@ -13,3 +13,3 @@ /**

import * as runtime from '../runtime';
import { PlansListPlansResponse } from '../models';
import type { PlansListPlansResponse } from '../models/index';
export interface ListPlansRequest {

@@ -24,6 +24,6 @@ clientExternalUuid?: string;

*/
listPlansRaw(requestParameters: ListPlansRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<PlansListPlansResponse>>;
listPlansRaw(requestParameters: ListPlansRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PlansListPlansResponse>>;
/**
*/
listPlans(requestParameters?: ListPlansRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<PlansListPlansResponse>;
listPlans(requestParameters?: ListPlansRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlansListPlansResponse>;
}

@@ -27,3 +27,3 @@ "use strict";

const runtime = require("../runtime");
const models_1 = require("../models");
const index_1 = require("../models/index");
/**

@@ -56,3 +56,3 @@ *

}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => models_1.PlansListPlansResponseFromJSON(jsonValue));
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PlansListPlansResponseFromJSON)(jsonValue));
});

@@ -59,0 +59,0 @@ }

@@ -28,15 +28,15 @@ /**

*/
getPlanRaw(requestParameters: GetPlanRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<void>>;
getPlanRaw(requestParameters: GetPlanRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
/**
* Returns the plan
*/
getPlan(requestParameters: GetPlanRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<void>;
getPlan(requestParameters: GetPlanRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
/**
* Update client UUID id of an FNA
*/
updatePlanExternalIdRaw(requestParameters: UpdatePlanExternalIdRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<void>>;
updatePlanExternalIdRaw(requestParameters: UpdatePlanExternalIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
/**
* Update client UUID id of an FNA
*/
updatePlanExternalId(requestParameters: UpdatePlanExternalIdRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<void>;
updatePlanExternalId(requestParameters: UpdatePlanExternalIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
}

@@ -13,3 +13,3 @@ /**

import * as runtime from '../runtime';
import { UsersUser, UsersUserContext } from '../models';
import type { UsersUser, UsersUserContext } from '../models/index';
export interface GetUserRequest {

@@ -24,12 +24,12 @@ id: number;

*/
getUserRaw(requestParameters: GetUserRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<UsersUser>>;
getUserRaw(requestParameters: GetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UsersUser>>;
/**
*/
getUser(requestParameters: GetUserRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<UsersUser>;
getUser(requestParameters: GetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UsersUser>;
/**
*/
getUserContextRaw(initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<UsersUserContext>>;
getUserContextRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UsersUserContext>>;
/**
*/
getUserContext(initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<UsersUserContext>;
getUserContext(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UsersUserContext>;
}

@@ -27,3 +27,3 @@ "use strict";

const runtime = require("../runtime");
const models_1 = require("../models");
const index_1 = require("../models/index");
/**

@@ -56,3 +56,3 @@ *

}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => models_1.UsersUserFromJSON(jsonValue));
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UsersUserFromJSON)(jsonValue));
});

@@ -88,3 +88,3 @@ }

}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => models_1.UsersUserContextFromJSON(jsonValue));
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UsersUserContextFromJSON)(jsonValue));
});

@@ -91,0 +91,0 @@ }

export * from './runtime';
export * from './apis';
export * from './models';
export * from './apis/index';
export * from './models/index';
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -10,3 +14,3 @@ if (k2 === undefined) k2 = k;

var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};

@@ -17,3 +21,3 @@ Object.defineProperty(exports, "__esModule", { value: true });

__exportStar(require("./runtime"), exports);
__exportStar(require("./apis"), exports);
__exportStar(require("./models"), exports);
__exportStar(require("./apis/index"), exports);
__exportStar(require("./models/index"), exports);

@@ -39,4 +39,8 @@ /**

}
/**
* Check if a given object implements the CmdCopyFNA interface.
*/
export declare function instanceOfCmdCopyFNA(value: object): boolean;
export declare function CmdCopyFNAFromJSON(json: any): CmdCopyFNA;
export declare function CmdCopyFNAFromJSONTyped(json: any, ignoreDiscriminator: boolean): CmdCopyFNA;
export declare function CmdCopyFNAToJSON(value?: CmdCopyFNA | null): any;

@@ -16,4 +16,13 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.CmdCopyFNAToJSON = exports.CmdCopyFNAFromJSONTyped = exports.CmdCopyFNAFromJSON = void 0;
exports.CmdCopyFNAToJSON = exports.CmdCopyFNAFromJSONTyped = exports.CmdCopyFNAFromJSON = exports.instanceOfCmdCopyFNA = void 0;
const runtime_1 = require("../runtime");
/**
* Check if a given object implements the CmdCopyFNA interface.
*/
function instanceOfCmdCopyFNA(value) {
let isInstance = true;
isInstance = isInstance && "fnaUuid" in value;
return isInstance;
}
exports.instanceOfCmdCopyFNA = instanceOfCmdCopyFNA;
function CmdCopyFNAFromJSON(json) {

@@ -29,4 +38,4 @@ return CmdCopyFNAFromJSONTyped(json, false);

'fnaUuid': json['fnaUuid'],
'userEmail': !runtime_1.exists(json, 'userEmail') ? undefined : json['userEmail'],
'newParticipantUuids': !runtime_1.exists(json, 'newParticipantUuids') ? undefined : json['newParticipantUuids'],
'userEmail': !(0, runtime_1.exists)(json, 'userEmail') ? undefined : json['userEmail'],
'newParticipantUuids': !(0, runtime_1.exists)(json, 'newParticipantUuids') ? undefined : json['newParticipantUuids'],
};

@@ -33,0 +42,0 @@ }

@@ -23,6 +23,10 @@ /**

*/
newFnaUuid?: string;
newFnaUuid: string;
}
/**
* Check if a given object implements the CmdCopyFNAResponse interface.
*/
export declare function instanceOfCmdCopyFNAResponse(value: object): boolean;
export declare function CmdCopyFNAResponseFromJSON(json: any): CmdCopyFNAResponse;
export declare function CmdCopyFNAResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CmdCopyFNAResponse;
export declare function CmdCopyFNAResponseToJSON(value?: CmdCopyFNAResponse | null): any;

@@ -16,4 +16,12 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.CmdCopyFNAResponseToJSON = exports.CmdCopyFNAResponseFromJSONTyped = exports.CmdCopyFNAResponseFromJSON = void 0;
const runtime_1 = require("../runtime");
exports.CmdCopyFNAResponseToJSON = exports.CmdCopyFNAResponseFromJSONTyped = exports.CmdCopyFNAResponseFromJSON = exports.instanceOfCmdCopyFNAResponse = void 0;
/**
* Check if a given object implements the CmdCopyFNAResponse interface.
*/
function instanceOfCmdCopyFNAResponse(value) {
let isInstance = true;
isInstance = isInstance && "newFnaUuid" in value;
return isInstance;
}
exports.instanceOfCmdCopyFNAResponse = instanceOfCmdCopyFNAResponse;
function CmdCopyFNAResponseFromJSON(json) {

@@ -28,3 +36,3 @@ return CmdCopyFNAResponseFromJSONTyped(json, false);

return {
'newFnaUuid': !runtime_1.exists(json, 'newFnaUuid') ? undefined : json['newFnaUuid'],
'newFnaUuid': json['newFnaUuid'],
};

@@ -31,0 +39,0 @@ }

@@ -29,3 +29,3 @@ /**

*/
errorDescription?: string | null;
errorDescription?: string;
/**

@@ -36,6 +36,10 @@ *

*/
hint?: string | null;
hint?: string;
}
/**
* Check if a given object implements the ErrorResponse interface.
*/
export declare function instanceOfErrorResponse(value: object): boolean;
export declare function ErrorResponseFromJSON(json: any): ErrorResponse;
export declare function ErrorResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorResponse;
export declare function ErrorResponseToJSON(value?: ErrorResponse | null): any;

@@ -16,4 +16,12 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ErrorResponseToJSON = exports.ErrorResponseFromJSONTyped = exports.ErrorResponseFromJSON = void 0;
exports.ErrorResponseToJSON = exports.ErrorResponseFromJSONTyped = exports.ErrorResponseFromJSON = exports.instanceOfErrorResponse = void 0;
const runtime_1 = require("../runtime");
/**
* Check if a given object implements the ErrorResponse interface.
*/
function instanceOfErrorResponse(value) {
let isInstance = true;
return isInstance;
}
exports.instanceOfErrorResponse = instanceOfErrorResponse;
function ErrorResponseFromJSON(json) {

@@ -28,5 +36,5 @@ return ErrorResponseFromJSONTyped(json, false);

return {
'error': !runtime_1.exists(json, 'error') ? undefined : json['error'],
'errorDescription': !runtime_1.exists(json, 'error_description') ? undefined : json['error_description'],
'hint': !runtime_1.exists(json, 'hint') ? undefined : json['hint'],
'error': !(0, runtime_1.exists)(json, 'error') ? undefined : json['error'],
'errorDescription': !(0, runtime_1.exists)(json, 'error_description') ? undefined : json['error_description'],
'hint': !(0, runtime_1.exists)(json, 'hint') ? undefined : json['hint'],
};

@@ -33,0 +41,0 @@ }

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -10,3 +14,3 @@ if (k2 === undefined) k2 = k;

var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};

@@ -13,0 +17,0 @@ Object.defineProperty(exports, "__esModule", { value: true });

@@ -12,3 +12,3 @@ /**

*/
import { OrganizationsOrganization } from './OrganizationsOrganization';
import type { OrganizationsOrganization } from './OrganizationsOrganization';
/**

@@ -22,2 +22,8 @@ *

*
* @type {number}
* @memberof OrganizationsListOrganizationsResponse
*/
count: number;
/**
*
* @type {Array<OrganizationsOrganization>}

@@ -28,4 +34,8 @@ * @memberof OrganizationsListOrganizationsResponse

}
/**
* Check if a given object implements the OrganizationsListOrganizationsResponse interface.
*/
export declare function instanceOfOrganizationsListOrganizationsResponse(value: object): boolean;
export declare function OrganizationsListOrganizationsResponseFromJSON(json: any): OrganizationsListOrganizationsResponse;
export declare function OrganizationsListOrganizationsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrganizationsListOrganizationsResponse;
export declare function OrganizationsListOrganizationsResponseToJSON(value?: OrganizationsListOrganizationsResponse | null): any;

@@ -16,4 +16,14 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.OrganizationsListOrganizationsResponseToJSON = exports.OrganizationsListOrganizationsResponseFromJSONTyped = exports.OrganizationsListOrganizationsResponseFromJSON = void 0;
exports.OrganizationsListOrganizationsResponseToJSON = exports.OrganizationsListOrganizationsResponseFromJSONTyped = exports.OrganizationsListOrganizationsResponseFromJSON = exports.instanceOfOrganizationsListOrganizationsResponse = void 0;
const OrganizationsOrganization_1 = require("./OrganizationsOrganization");
/**
* Check if a given object implements the OrganizationsListOrganizationsResponse interface.
*/
function instanceOfOrganizationsListOrganizationsResponse(value) {
let isInstance = true;
isInstance = isInstance && "count" in value;
isInstance = isInstance && "results" in value;
return isInstance;
}
exports.instanceOfOrganizationsListOrganizationsResponse = instanceOfOrganizationsListOrganizationsResponse;
function OrganizationsListOrganizationsResponseFromJSON(json) {

@@ -28,2 +38,3 @@ return OrganizationsListOrganizationsResponseFromJSONTyped(json, false);

return {
'count': json['count'],
'results': (json['results'].map(OrganizationsOrganization_1.OrganizationsOrganizationFromJSON)),

@@ -41,2 +52,3 @@ };

return {
'count': value.count,
'results': (value.results.map(OrganizationsOrganization_1.OrganizationsOrganizationToJSON)),

@@ -43,0 +55,0 @@ };

@@ -43,4 +43,8 @@ /**

}
/**
* Check if a given object implements the OrganizationsOrganization interface.
*/
export declare function instanceOfOrganizationsOrganization(value: object): boolean;
export declare function OrganizationsOrganizationFromJSON(json: any): OrganizationsOrganization;
export declare function OrganizationsOrganizationFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrganizationsOrganization;
export declare function OrganizationsOrganizationToJSON(value?: OrganizationsOrganization | null): any;

@@ -16,4 +16,14 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.OrganizationsOrganizationToJSON = exports.OrganizationsOrganizationFromJSONTyped = exports.OrganizationsOrganizationFromJSON = void 0;
exports.OrganizationsOrganizationToJSON = exports.OrganizationsOrganizationFromJSONTyped = exports.OrganizationsOrganizationFromJSON = exports.instanceOfOrganizationsOrganization = void 0;
const runtime_1 = require("../runtime");
/**
* Check if a given object implements the OrganizationsOrganization interface.
*/
function instanceOfOrganizationsOrganization(value) {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "accountType" in value;
return isInstance;
}
exports.instanceOfOrganizationsOrganization = instanceOfOrganizationsOrganization;
function OrganizationsOrganizationFromJSON(json) {

@@ -30,4 +40,4 @@ return OrganizationsOrganizationFromJSONTyped(json, false);

'accountType': json['accountType'],
'externalDatabase': !runtime_1.exists(json, 'externalDatabase') ? undefined : json['externalDatabase'],
'organizationUuid': !runtime_1.exists(json, 'organizationUuid') ? undefined : json['organizationUuid'],
'externalDatabase': !(0, runtime_1.exists)(json, 'externalDatabase') ? undefined : json['externalDatabase'],
'organizationUuid': !(0, runtime_1.exists)(json, 'organizationUuid') ? undefined : json['organizationUuid'],
};

@@ -34,0 +44,0 @@ }

@@ -12,3 +12,3 @@ /**

*/
import { PlansPlan } from './PlansPlan';
import type { PlansPlan } from './PlansPlan';
/**

@@ -33,4 +33,8 @@ *

}
/**
* Check if a given object implements the PlansListPlansResponse interface.
*/
export declare function instanceOfPlansListPlansResponse(value: object): boolean;
export declare function PlansListPlansResponseFromJSON(json: any): PlansListPlansResponse;
export declare function PlansListPlansResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlansListPlansResponse;
export declare function PlansListPlansResponseToJSON(value?: PlansListPlansResponse | null): any;

@@ -16,4 +16,14 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.PlansListPlansResponseToJSON = exports.PlansListPlansResponseFromJSONTyped = exports.PlansListPlansResponseFromJSON = void 0;
exports.PlansListPlansResponseToJSON = exports.PlansListPlansResponseFromJSONTyped = exports.PlansListPlansResponseFromJSON = exports.instanceOfPlansListPlansResponse = void 0;
const PlansPlan_1 = require("./PlansPlan");
/**
* Check if a given object implements the PlansListPlansResponse interface.
*/
function instanceOfPlansListPlansResponse(value) {
let isInstance = true;
isInstance = isInstance && "plans" in value;
isInstance = isInstance && "createPlanUrl" in value;
return isInstance;
}
exports.instanceOfPlansListPlansResponse = instanceOfPlansListPlansResponse;
function PlansListPlansResponseFromJSON(json) {

@@ -20,0 +30,0 @@ return PlansListPlansResponseFromJSONTyped(json, false);

@@ -73,4 +73,5 @@ /**

readonly SPOUSAL: "SPOUSAL";
readonly unknown_default_open_api: "11184809";
};
export declare type PlansPlanTypeEnum = typeof PlansPlanTypeEnum[keyof typeof PlansPlanTypeEnum];
export type PlansPlanTypeEnum = typeof PlansPlanTypeEnum[keyof typeof PlansPlanTypeEnum];
/**

@@ -83,6 +84,11 @@ * @export

readonly EXPIRED: "EXPIRED";
readonly unknown_default_open_api: "11184809";
};
export declare type PlansPlanStatusEnum = typeof PlansPlanStatusEnum[keyof typeof PlansPlanStatusEnum];
export type PlansPlanStatusEnum = typeof PlansPlanStatusEnum[keyof typeof PlansPlanStatusEnum];
/**
* Check if a given object implements the PlansPlan interface.
*/
export declare function instanceOfPlansPlan(value: object): boolean;
export declare function PlansPlanFromJSON(json: any): PlansPlan;
export declare function PlansPlanFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlansPlan;
export declare function PlansPlanToJSON(value?: PlansPlan | null): any;

@@ -16,3 +16,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.PlansPlanToJSON = exports.PlansPlanFromJSONTyped = exports.PlansPlanFromJSON = exports.PlansPlanStatusEnum = exports.PlansPlanTypeEnum = void 0;
exports.PlansPlanToJSON = exports.PlansPlanFromJSONTyped = exports.PlansPlanFromJSON = exports.instanceOfPlansPlan = exports.PlansPlanStatusEnum = exports.PlansPlanTypeEnum = void 0;
const runtime_1 = require("../runtime");

@@ -24,3 +24,4 @@ /**

INDIVIDUAL: 'INDIVIDUAL',
SPOUSAL: 'SPOUSAL'
SPOUSAL: 'SPOUSAL',
unknown_default_open_api: '11184809'
};

@@ -33,4 +34,20 @@ /**

COMPLETED: 'COMPLETED',
EXPIRED: 'EXPIRED'
EXPIRED: 'EXPIRED',
unknown_default_open_api: '11184809'
};
/**
* Check if a given object implements the PlansPlan interface.
*/
function instanceOfPlansPlan(value) {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "type" in value;
isInstance = isInstance && "modifiedDate" in value;
isInstance = isInstance && "clientDisplayName" in value;
isInstance = isInstance && "status" in value;
isInstance = isInstance && "statusDate" in value;
isInstance = isInstance && "url" in value;
return isInstance;
}
exports.instanceOfPlansPlan = instanceOfPlansPlan;
function PlansPlanFromJSON(json) {

@@ -49,3 +66,3 @@ return PlansPlanFromJSONTyped(json, false);

'clientDisplayName': json['clientDisplayName'],
'spouseDisplayName': !runtime_1.exists(json, 'spouseDisplayName') ? undefined : json['spouseDisplayName'],
'spouseDisplayName': !(0, runtime_1.exists)(json, 'spouseDisplayName') ? undefined : json['spouseDisplayName'],
'status': json['status'],

@@ -52,0 +69,0 @@ 'statusDate': json['statusDate'],

@@ -12,3 +12,3 @@ /**

*/
import { UsersUser } from './UsersUser';
import type { UsersUser } from './UsersUser';
/**

@@ -21,2 +21,8 @@ *

/**
* Number of users returned
* @type {number}
* @memberof UsersListUsersResponse
*/
count: number;
/**
*

@@ -28,4 +34,8 @@ * @type {Array<UsersUser>}

}
/**
* Check if a given object implements the UsersListUsersResponse interface.
*/
export declare function instanceOfUsersListUsersResponse(value: object): boolean;
export declare function UsersListUsersResponseFromJSON(json: any): UsersListUsersResponse;
export declare function UsersListUsersResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): UsersListUsersResponse;
export declare function UsersListUsersResponseToJSON(value?: UsersListUsersResponse | null): any;

@@ -16,4 +16,14 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.UsersListUsersResponseToJSON = exports.UsersListUsersResponseFromJSONTyped = exports.UsersListUsersResponseFromJSON = void 0;
exports.UsersListUsersResponseToJSON = exports.UsersListUsersResponseFromJSONTyped = exports.UsersListUsersResponseFromJSON = exports.instanceOfUsersListUsersResponse = void 0;
const UsersUser_1 = require("./UsersUser");
/**
* Check if a given object implements the UsersListUsersResponse interface.
*/
function instanceOfUsersListUsersResponse(value) {
let isInstance = true;
isInstance = isInstance && "count" in value;
isInstance = isInstance && "results" in value;
return isInstance;
}
exports.instanceOfUsersListUsersResponse = instanceOfUsersListUsersResponse;
function UsersListUsersResponseFromJSON(json) {

@@ -28,2 +38,3 @@ return UsersListUsersResponseFromJSONTyped(json, false);

return {
'count': json['count'],
'results': (json['results'].map(UsersUser_1.UsersUserFromJSON)),

@@ -41,2 +52,3 @@ };

return {
'count': value.count,
'results': (value.results.map(UsersUser_1.UsersUserToJSON)),

@@ -43,0 +55,0 @@ };

@@ -53,6 +53,10 @@ /**

*/
isActive?: boolean;
isActive: boolean;
}
/**
* Check if a given object implements the UsersUser interface.
*/
export declare function instanceOfUsersUser(value: object): boolean;
export declare function UsersUserFromJSON(json: any): UsersUser;
export declare function UsersUserFromJSONTyped(json: any, ignoreDiscriminator: boolean): UsersUser;
export declare function UsersUserToJSON(value?: UsersUser | null): any;

@@ -16,4 +16,17 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.UsersUserToJSON = exports.UsersUserFromJSONTyped = exports.UsersUserFromJSON = void 0;
const runtime_1 = require("../runtime");
exports.UsersUserToJSON = exports.UsersUserFromJSONTyped = exports.UsersUserFromJSON = exports.instanceOfUsersUser = void 0;
/**
* Check if a given object implements the UsersUser interface.
*/
function instanceOfUsersUser(value) {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "userType" in value;
isInstance = isInstance && "name" in value;
isInstance = isInstance && "email" in value;
isInstance = isInstance && "isAdmin" in value;
isInstance = isInstance && "isActive" in value;
return isInstance;
}
exports.instanceOfUsersUser = instanceOfUsersUser;
function UsersUserFromJSON(json) {

@@ -33,3 +46,3 @@ return UsersUserFromJSONTyped(json, false);

'isAdmin': json['isAdmin'],
'isActive': !runtime_1.exists(json, 'isActive') ? undefined : json['isActive'],
'isActive': json['isActive'],
};

@@ -36,0 +49,0 @@ }

@@ -55,4 +55,8 @@ /**

}
/**
* Check if a given object implements the UsersUserContext interface.
*/
export declare function instanceOfUsersUserContext(value: object): boolean;
export declare function UsersUserContextFromJSON(json: any): UsersUserContext;
export declare function UsersUserContextFromJSONTyped(json: any, ignoreDiscriminator: boolean): UsersUserContext;
export declare function UsersUserContextToJSON(value?: UsersUserContext | null): any;

@@ -16,3 +16,17 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.UsersUserContextToJSON = exports.UsersUserContextFromJSONTyped = exports.UsersUserContextFromJSON = void 0;
exports.UsersUserContextToJSON = exports.UsersUserContextFromJSONTyped = exports.UsersUserContextFromJSON = exports.instanceOfUsersUserContext = void 0;
/**
* Check if a given object implements the UsersUserContext interface.
*/
function instanceOfUsersUserContext(value) {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "userType" in value;
isInstance = isInstance && "name" in value;
isInstance = isInstance && "email" in value;
isInstance = isInstance && "isAdmin" in value;
isInstance = isInstance && "isActive" in value;
return isInstance;
}
exports.instanceOfUsersUserContext = instanceOfUsersUserContext;
function UsersUserContextFromJSON(json) {

@@ -19,0 +33,0 @@ return UsersUserContextFromJSONTyped(json, false);

@@ -12,3 +12,3 @@ /**

*/
import { V1ErrorResponseData } from './V1ErrorResponseData';
import type { V1ErrorResponseData } from './V1ErrorResponseData';
/**

@@ -33,4 +33,8 @@ *

}
/**
* Check if a given object implements the V1ErrorResponse interface.
*/
export declare function instanceOfV1ErrorResponse(value: object): boolean;
export declare function V1ErrorResponseFromJSON(json: any): V1ErrorResponse;
export declare function V1ErrorResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): V1ErrorResponse;
export declare function V1ErrorResponseToJSON(value?: V1ErrorResponse | null): any;

@@ -16,5 +16,14 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.V1ErrorResponseToJSON = exports.V1ErrorResponseFromJSONTyped = exports.V1ErrorResponseFromJSON = void 0;
exports.V1ErrorResponseToJSON = exports.V1ErrorResponseFromJSONTyped = exports.V1ErrorResponseFromJSON = exports.instanceOfV1ErrorResponse = void 0;
const runtime_1 = require("../runtime");
const V1ErrorResponseData_1 = require("./V1ErrorResponseData");
/**
* Check if a given object implements the V1ErrorResponse interface.
*/
function instanceOfV1ErrorResponse(value) {
let isInstance = true;
isInstance = isInstance && "status" in value;
return isInstance;
}
exports.instanceOfV1ErrorResponse = instanceOfV1ErrorResponse;
function V1ErrorResponseFromJSON(json) {

@@ -30,3 +39,3 @@ return V1ErrorResponseFromJSONTyped(json, false);

'status': json['status'],
'data': !runtime_1.exists(json, 'data') ? undefined : V1ErrorResponseData_1.V1ErrorResponseDataFromJSON(json['data']),
'data': !(0, runtime_1.exists)(json, 'data') ? undefined : (0, V1ErrorResponseData_1.V1ErrorResponseDataFromJSON)(json['data']),
};

@@ -44,5 +53,5 @@ }

'status': value.status,
'data': V1ErrorResponseData_1.V1ErrorResponseDataToJSON(value.data),
'data': (0, V1ErrorResponseData_1.V1ErrorResponseDataToJSON)(value.data),
};
}
exports.V1ErrorResponseToJSON = V1ErrorResponseToJSON;

@@ -31,4 +31,8 @@ /**

}
/**
* Check if a given object implements the V1ErrorResponseData interface.
*/
export declare function instanceOfV1ErrorResponseData(value: object): boolean;
export declare function V1ErrorResponseDataFromJSON(json: any): V1ErrorResponseData;
export declare function V1ErrorResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): V1ErrorResponseData;
export declare function V1ErrorResponseDataToJSON(value?: V1ErrorResponseData | null): any;

@@ -16,4 +16,13 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.V1ErrorResponseDataToJSON = exports.V1ErrorResponseDataFromJSONTyped = exports.V1ErrorResponseDataFromJSON = void 0;
exports.V1ErrorResponseDataToJSON = exports.V1ErrorResponseDataFromJSONTyped = exports.V1ErrorResponseDataFromJSON = exports.instanceOfV1ErrorResponseData = void 0;
const runtime_1 = require("../runtime");
/**
* Check if a given object implements the V1ErrorResponseData interface.
*/
function instanceOfV1ErrorResponseData(value) {
let isInstance = true;
isInstance = isInstance && "message" in value;
return isInstance;
}
exports.instanceOfV1ErrorResponseData = instanceOfV1ErrorResponseData;
function V1ErrorResponseDataFromJSON(json) {

@@ -29,3 +38,3 @@ return V1ErrorResponseDataFromJSONTyped(json, false);

'message': json['message'],
'errorKey': !runtime_1.exists(json, 'error_key') ? undefined : json['error_key'],
'errorKey': !(0, runtime_1.exists)(json, 'error_key') ? undefined : json['error_key'],
};

@@ -32,0 +41,0 @@ }

@@ -46,2 +46,3 @@ /**

protected configuration: Configuration;
private static readonly jsonRegex;
private middleware;

@@ -52,3 +53,14 @@ constructor(configuration?: Configuration);

withPostMiddleware<T extends BaseAPI>(this: T, ...postMiddlewares: Array<Middleware['post']>): T;
protected request(context: RequestOpts, initOverrides?: RequestInit | InitOverideFunction): Promise<Response>;
/**
* Check if the given MIME is a JSON MIME.
* JSON MIME examples:
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
* application/vnd.company+json
* @param mime - MIME (Multipurpose Internet Mail Extensions)
* @return True if the given MIME is JSON, false otherwise.
*/
protected isJsonMime(mime: string | null | undefined): boolean;
protected request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise<Response>;
private createFetchParams;

@@ -67,2 +79,7 @@ private fetchApi;

}
export declare class FetchError extends Error {
cause: Error;
name: "FetchError";
constructor(cause: Error, msg?: string);
}
export declare class RequiredError extends Error {

@@ -79,13 +96,13 @@ field: string;

};
export declare type FetchAPI = WindowOrWorkerGlobalScope['fetch'];
export declare type Json = any;
export declare type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
export declare type HTTPHeaders = {
export type FetchAPI = WindowOrWorkerGlobalScope['fetch'];
export type Json = any;
export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
export type HTTPHeaders = {
[key: string]: string;
};
export declare type HTTPQuery = {
export type HTTPQuery = {
[key: string]: string | number | null | boolean | Array<string | number | null | boolean> | Set<string | number | null | boolean> | HTTPQuery;
};
export declare type HTTPBody = Json | FormData | URLSearchParams;
export declare type HTTPRequestInit = {
export type HTTPBody = Json | FormData | URLSearchParams;
export type HTTPRequestInit = {
headers?: HTTPHeaders;

@@ -96,4 +113,4 @@ method: HTTPMethod;

};
export declare type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original';
export declare type InitOverideFunction = (requestContext: {
export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original';
export type InitOverrideFunction = (requestContext: {
init: HTTPRequestInit;

@@ -131,5 +148,13 @@ context: RequestOpts;

}
export interface ErrorContext {
fetch: FetchAPI;
url: string;
init: RequestInit;
error: unknown;
response?: Response;
}
export interface Middleware {
pre?(context: RequestContext): Promise<FetchParams | void>;
post?(context: ResponseContext): Promise<Response | void>;
onError?(context: ErrorContext): Promise<Response | void>;
}

@@ -136,0 +161,0 @@ export interface ApiResponse<T> {

@@ -25,3 +25,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.TextApiResponse = exports.BlobApiResponse = exports.VoidApiResponse = exports.JSONApiResponse = exports.canConsumeForm = exports.mapValues = exports.querystring = exports.exists = exports.COLLECTION_FORMATS = exports.RequiredError = exports.ResponseError = exports.BaseAPI = exports.DefaultConfig = exports.Configuration = exports.BASE_PATH = void 0;
exports.TextApiResponse = exports.BlobApiResponse = exports.VoidApiResponse = exports.JSONApiResponse = exports.canConsumeForm = exports.mapValues = exports.querystring = exports.exists = exports.COLLECTION_FORMATS = exports.RequiredError = exports.FetchError = exports.ResponseError = exports.BaseAPI = exports.DefaultConfig = exports.Configuration = exports.BASE_PATH = void 0;
exports.BASE_PATH = "http://localhost".replace(/\/+$/, "");

@@ -89,3 +89,27 @@ class Configuration {

}
let response = yield (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init);
let response = undefined;
try {
response = yield (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init);
}
catch (e) {
for (const middleware of this.middleware) {
if (middleware.onError) {
response = (yield middleware.onError({
fetch: this.fetchApi,
url: fetchParams.url,
init: fetchParams.init,
error: e,
response: response ? response.clone() : undefined,
})) || response;
}
}
if (response === undefined) {
if (e instanceof Error) {
throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response');
}
else {
throw e;
}
}
}
for (const middleware of this.middleware) {

@@ -118,2 +142,18 @@ if (middleware.post) {

}
/**
* Check if the given MIME is a JSON MIME.
* JSON MIME examples:
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
* application/vnd.company+json
* @param mime - MIME (Multipurpose Internet Mail Extensions)
* @return True if the given MIME is JSON, false otherwise.
*/
isJsonMime(mime) {
if (!mime) {
return false;
}
return BaseAPI.jsonRegex.test(mime);
}
request(context, initOverrides) {

@@ -123,3 +163,3 @@ return __awaiter(this, void 0, void 0, function* () {

const response = yield this.fetchApi(url, init);
if (response.status >= 200 && response.status < 300) {
if (response && (response.status >= 200 && response.status < 300)) {
return response;

@@ -150,11 +190,19 @@ }

};
const overridedInit = Object.assign(Object.assign({}, initParams), (yield initOverrideFn({
const overriddenInit = Object.assign(Object.assign({}, initParams), (yield initOverrideFn({
init: initParams,
context,
})));
const init = Object.assign(Object.assign({}, overridedInit), { body: isFormData(overridedInit.body) ||
overridedInit.body instanceof URLSearchParams ||
isBlob(overridedInit.body)
? overridedInit.body
: JSON.stringify(overridedInit.body) });
let body;
if (isFormData(overriddenInit.body)
|| (overriddenInit.body instanceof URLSearchParams)
|| isBlob(overriddenInit.body)) {
body = overriddenInit.body;
}
else if (this.isJsonMime(headers['Content-Type'])) {
body = JSON.stringify(overriddenInit.body);
}
else {
body = overriddenInit.body;
}
const init = Object.assign(Object.assign({}, overriddenInit), { body });
return { url, init };

@@ -175,2 +223,3 @@ });

exports.BaseAPI = BaseAPI;
BaseAPI.jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i');
;

@@ -191,2 +240,10 @@ function isBlob(value) {

exports.ResponseError = ResponseError;
class FetchError extends Error {
constructor(cause, msg) {
super(msg);
this.cause = cause;
this.name = "FetchError";
}
}
exports.FetchError = FetchError;
class RequiredError extends Error {

@@ -193,0 +250,0 @@ constructor(field, msg) {

{
"name": "@equisoft/equisoft-plan-sdk-typescript",
"version": "7.5.2",
"version": "9.4.0",
"description": "OpenAPI client for @equisoft/equisoft-plan-sdk-typescript",
"author": "OpenAPI-Generator",
"repository": {
"type": "git",
"url": "https://github.com/kronostechnologies/equisoft-plan-sdk-typescript.git"
},
"main": "./dist/index.js",
"typings": "./dist/index.d.ts",
"module": "./dist/esm/index.js",
"sideEffects": false,
"scripts": {
"build": "tsc"
"build": "tsc && tsc -p tsconfig.esm.json",
"prepare": "npm run build"
},
"devDependencies": {
"typescript": "^3.6"
},
"packageManager": "yarn@3.0.1"
"typescript": "^4.0"
}
}

@@ -17,13 +17,15 @@ /* tslint:disable */

import * as runtime from '../runtime';
import type {
CmdCopyFNA,
CmdCopyFNAResponse,
ErrorResponse,
} from '../models/index';
import {
CmdCopyFNA,
CmdCopyFNAFromJSON,
CmdCopyFNAToJSON,
CmdCopyFNAResponse,
CmdCopyFNAResponseFromJSON,
CmdCopyFNAResponseToJSON,
ErrorResponse,
ErrorResponseFromJSON,
ErrorResponseToJSON,
} from '../models';
} from '../models/index';

@@ -41,3 +43,3 @@ export interface CmdCopyFNARequest {

*/
async cmdCopyFNARaw(requestParameters: CmdCopyFNARequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<CmdCopyFNAResponse>> {
async cmdCopyFNARaw(requestParameters: CmdCopyFNARequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CmdCopyFNAResponse>> {
if (requestParameters.cmdCopyFNA === null || requestParameters.cmdCopyFNA === undefined) {

@@ -57,3 +59,2 @@ throw new runtime.RequiredError('cmdCopyFNA','Required parameter requestParameters.cmdCopyFNA was null or undefined when calling cmdCopyFNA.');

const tokenString = await token("OAuth2", ["plan:plan"]);
if (tokenString) {

@@ -77,3 +78,3 @@ headerParameters["Authorization"] = `Bearer ${tokenString}`;

*/
async cmdCopyFNA(requestParameters: CmdCopyFNARequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<CmdCopyFNAResponse> {
async cmdCopyFNA(requestParameters: CmdCopyFNARequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CmdCopyFNAResponse> {
const response = await this.cmdCopyFNARaw(requestParameters, initOverrides);

@@ -80,0 +81,0 @@ return await response.value();

@@ -17,16 +17,18 @@ /* tslint:disable */

import * as runtime from '../runtime';
import type {
ErrorResponse,
OrganizationsListOrganizationsResponse,
OrganizationsOrganization,
UsersListUsersResponse,
} from '../models/index';
import {
ErrorResponse,
ErrorResponseFromJSON,
ErrorResponseToJSON,
OrganizationsListOrganizationsResponse,
OrganizationsListOrganizationsResponseFromJSON,
OrganizationsListOrganizationsResponseToJSON,
OrganizationsOrganization,
OrganizationsOrganizationFromJSON,
OrganizationsOrganizationToJSON,
UsersListUsersResponse,
UsersListUsersResponseFromJSON,
UsersListUsersResponseToJSON,
} from '../models';
} from '../models/index';

@@ -52,3 +54,3 @@ export interface GetOrganizationRequest {

*/
async getOrganizationRaw(requestParameters: GetOrganizationRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<OrganizationsOrganization>> {
async getOrganizationRaw(requestParameters: GetOrganizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrganizationsOrganization>> {
if (requestParameters.id === null || requestParameters.id === undefined) {

@@ -66,3 +68,2 @@ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling getOrganization.');

const tokenString = await token("OAuth2", ["plan:organization"]);
if (tokenString) {

@@ -85,3 +86,3 @@ headerParameters["Authorization"] = `Bearer ${tokenString}`;

*/
async getOrganization(requestParameters: GetOrganizationRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<OrganizationsOrganization> {
async getOrganization(requestParameters: GetOrganizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrganizationsOrganization> {
const response = await this.getOrganizationRaw(requestParameters, initOverrides);

@@ -93,3 +94,3 @@ return await response.value();

*/
async listOrganizationUsersRaw(requestParameters: ListOrganizationUsersRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<UsersListUsersResponse>> {
async listOrganizationUsersRaw(requestParameters: ListOrganizationUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UsersListUsersResponse>> {
if (requestParameters.id === null || requestParameters.id === undefined) {

@@ -107,3 +108,2 @@ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling listOrganizationUsers.');

const tokenString = await token("OAuth2", ["plan:organization", "plan:user"]);
if (tokenString) {

@@ -126,3 +126,3 @@ headerParameters["Authorization"] = `Bearer ${tokenString}`;

*/
async listOrganizationUsers(requestParameters: ListOrganizationUsersRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<UsersListUsersResponse> {
async listOrganizationUsers(requestParameters: ListOrganizationUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UsersListUsersResponse> {
const response = await this.listOrganizationUsersRaw(requestParameters, initOverrides);

@@ -134,3 +134,3 @@ return await response.value();

*/
async listOrganizationsRaw(requestParameters: ListOrganizationsRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<OrganizationsListOrganizationsResponse>> {
async listOrganizationsRaw(requestParameters: ListOrganizationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrganizationsListOrganizationsResponse>> {
if (requestParameters.organizationUuid === null || requestParameters.organizationUuid === undefined) {

@@ -152,3 +152,2 @@ throw new runtime.RequiredError('organizationUuid','Required parameter requestParameters.organizationUuid was null or undefined when calling listOrganizations.');

const tokenString = await token("OAuth2", ["plan:organization"]);
if (tokenString) {

@@ -171,3 +170,3 @@ headerParameters["Authorization"] = `Bearer ${tokenString}`;

*/
async listOrganizations(requestParameters: ListOrganizationsRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<OrganizationsListOrganizationsResponse> {
async listOrganizations(requestParameters: ListOrganizationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrganizationsListOrganizationsResponse> {
const response = await this.listOrganizationsRaw(requestParameters, initOverrides);

@@ -174,0 +173,0 @@ return await response.value();

@@ -17,10 +17,12 @@ /* tslint:disable */

import * as runtime from '../runtime';
import type {
ErrorResponse,
PlansListPlansResponse,
} from '../models/index';
import {
ErrorResponse,
ErrorResponseFromJSON,
ErrorResponseToJSON,
PlansListPlansResponse,
PlansListPlansResponseFromJSON,
PlansListPlansResponseToJSON,
} from '../models';
} from '../models/index';

@@ -38,3 +40,3 @@ export interface ListPlansRequest {

*/
async listPlansRaw(requestParameters: ListPlansRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<PlansListPlansResponse>> {
async listPlansRaw(requestParameters: ListPlansRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PlansListPlansResponse>> {
const queryParameters: any = {};

@@ -52,3 +54,2 @@

const tokenString = await token("OAuth2", ["plan:plan"]);
if (tokenString) {

@@ -71,3 +72,3 @@ headerParameters["Authorization"] = `Bearer ${tokenString}`;

*/
async listPlans(requestParameters: ListPlansRequest = {}, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<PlansListPlansResponse> {
async listPlans(requestParameters: ListPlansRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlansListPlansResponse> {
const response = await this.listPlansRaw(requestParameters, initOverrides);

@@ -74,0 +75,0 @@ return await response.value();

@@ -17,7 +17,9 @@ /* tslint:disable */

import * as runtime from '../runtime';
import type {
V1ErrorResponse,
} from '../models/index';
import {
V1ErrorResponse,
V1ErrorResponseFromJSON,
V1ErrorResponseToJSON,
} from '../models';
} from '../models/index';

@@ -42,3 +44,3 @@ export interface GetPlanRequest {

*/
async getPlanRaw(requestParameters: GetPlanRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<void>> {
async getPlanRaw(requestParameters: GetPlanRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
if (requestParameters.id === null || requestParameters.id === undefined) {

@@ -65,3 +67,3 @@ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling getPlan.');

*/
async getPlan(requestParameters: GetPlanRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<void> {
async getPlan(requestParameters: GetPlanRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
await this.getPlanRaw(requestParameters, initOverrides);

@@ -73,3 +75,3 @@ }

*/
async updatePlanExternalIdRaw(requestParameters: UpdatePlanExternalIdRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<void>> {
async updatePlanExternalIdRaw(requestParameters: UpdatePlanExternalIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
if (requestParameters.fnaUuid === null || requestParameters.fnaUuid === undefined) {

@@ -107,3 +109,3 @@ throw new runtime.RequiredError('fnaUuid','Required parameter requestParameters.fnaUuid was null or undefined when calling updatePlanExternalId.');

*/
async updatePlanExternalId(requestParameters: UpdatePlanExternalIdRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<void> {
async updatePlanExternalId(requestParameters: UpdatePlanExternalIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
await this.updatePlanExternalIdRaw(requestParameters, initOverrides);

@@ -110,0 +112,0 @@ }

@@ -17,13 +17,15 @@ /* tslint:disable */

import * as runtime from '../runtime';
import type {
ErrorResponse,
UsersUser,
UsersUserContext,
} from '../models/index';
import {
ErrorResponse,
ErrorResponseFromJSON,
ErrorResponseToJSON,
UsersUser,
UsersUserFromJSON,
UsersUserToJSON,
UsersUserContext,
UsersUserContextFromJSON,
UsersUserContextToJSON,
} from '../models';
} from '../models/index';

@@ -41,3 +43,3 @@ export interface GetUserRequest {

*/
async getUserRaw(requestParameters: GetUserRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<UsersUser>> {
async getUserRaw(requestParameters: GetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UsersUser>> {
if (requestParameters.id === null || requestParameters.id === undefined) {

@@ -55,3 +57,2 @@ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling getUser.');

const tokenString = await token("OAuth2", ["plan:user"]);
if (tokenString) {

@@ -74,3 +75,3 @@ headerParameters["Authorization"] = `Bearer ${tokenString}`;

*/
async getUser(requestParameters: GetUserRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<UsersUser> {
async getUser(requestParameters: GetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UsersUser> {
const response = await this.getUserRaw(requestParameters, initOverrides);

@@ -82,3 +83,3 @@ return await response.value();

*/
async getUserContextRaw(initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<UsersUserContext>> {
async getUserContextRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UsersUserContext>> {
const queryParameters: any = {};

@@ -92,3 +93,2 @@

const tokenString = await token("OAuth2", ["plan:user"]);
if (tokenString) {

@@ -111,3 +111,3 @@ headerParameters["Authorization"] = `Bearer ${tokenString}`;

*/
async getUserContext(initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<UsersUserContext> {
async getUserContext(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UsersUserContext> {
const response = await this.getUserContextRaw(initOverrides);

@@ -114,0 +114,0 @@ return await response.value();

/* tslint:disable */
/* eslint-disable */
export * from './runtime';
export * from './apis';
export * from './models';
export * from './apis/index';
export * from './models/index';

@@ -42,2 +42,12 @@ /* tslint:disable */

/**
* Check if a given object implements the CmdCopyFNA interface.
*/
export function instanceOfCmdCopyFNA(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "fnaUuid" in value;
return isInstance;
}
export function CmdCopyFNAFromJSON(json: any): CmdCopyFNA {

@@ -44,0 +54,0 @@ return CmdCopyFNAFromJSONTyped(json, false);

@@ -27,5 +27,15 @@ /* tslint:disable */

*/
newFnaUuid?: string;
newFnaUuid: string;
}
/**
* Check if a given object implements the CmdCopyFNAResponse interface.
*/
export function instanceOfCmdCopyFNAResponse(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "newFnaUuid" in value;
return isInstance;
}
export function CmdCopyFNAResponseFromJSON(json: any): CmdCopyFNAResponse {

@@ -41,3 +51,3 @@ return CmdCopyFNAResponseFromJSONTyped(json, false);

'newFnaUuid': !exists(json, 'newFnaUuid') ? undefined : json['newFnaUuid'],
'newFnaUuid': json['newFnaUuid'],
};

@@ -44,0 +54,0 @@ }

@@ -33,3 +33,3 @@ /* tslint:disable */

*/
errorDescription?: string | null;
errorDescription?: string;
/**

@@ -40,5 +40,14 @@ *

*/
hint?: string | null;
hint?: string;
}
/**
* Check if a given object implements the ErrorResponse interface.
*/
export function instanceOfErrorResponse(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function ErrorResponseFromJSON(json: any): ErrorResponse {

@@ -45,0 +54,0 @@ return ErrorResponseFromJSONTyped(json, false);

@@ -16,4 +16,4 @@ /* tslint:disable */

import { exists, mapValues } from '../runtime';
import type { OrganizationsOrganization } from './OrganizationsOrganization';
import {
OrganizationsOrganization,
OrganizationsOrganizationFromJSON,

@@ -32,2 +32,8 @@ OrganizationsOrganizationFromJSONTyped,

*
* @type {number}
* @memberof OrganizationsListOrganizationsResponse
*/
count: number;
/**
*
* @type {Array<OrganizationsOrganization>}

@@ -39,2 +45,13 @@ * @memberof OrganizationsListOrganizationsResponse

/**
* Check if a given object implements the OrganizationsListOrganizationsResponse interface.
*/
export function instanceOfOrganizationsListOrganizationsResponse(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "count" in value;
isInstance = isInstance && "results" in value;
return isInstance;
}
export function OrganizationsListOrganizationsResponseFromJSON(json: any): OrganizationsListOrganizationsResponse {

@@ -50,2 +67,3 @@ return OrganizationsListOrganizationsResponseFromJSONTyped(json, false);

'count': json['count'],
'results': ((json['results'] as Array<any>).map(OrganizationsOrganizationFromJSON)),

@@ -64,2 +82,3 @@ };

'count': value.count,
'results': ((value.results as Array<any>).map(OrganizationsOrganizationToJSON)),

@@ -66,0 +85,0 @@ };

@@ -48,2 +48,13 @@ /* tslint:disable */

/**
* Check if a given object implements the OrganizationsOrganization interface.
*/
export function instanceOfOrganizationsOrganization(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "accountType" in value;
return isInstance;
}
export function OrganizationsOrganizationFromJSON(json: any): OrganizationsOrganization {

@@ -50,0 +61,0 @@ return OrganizationsOrganizationFromJSONTyped(json, false);

@@ -16,4 +16,4 @@ /* tslint:disable */

import { exists, mapValues } from '../runtime';
import type { PlansPlan } from './PlansPlan';
import {
PlansPlan,
PlansPlanFromJSON,

@@ -44,2 +44,13 @@ PlansPlanFromJSONTyped,

/**
* Check if a given object implements the PlansListPlansResponse interface.
*/
export function instanceOfPlansListPlansResponse(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "plans" in value;
isInstance = isInstance && "createPlanUrl" in value;
return isInstance;
}
export function PlansListPlansResponseFromJSON(json: any): PlansListPlansResponse {

@@ -46,0 +57,0 @@ return PlansListPlansResponseFromJSONTyped(json, false);

@@ -78,3 +78,4 @@ /* tslint:disable */

INDIVIDUAL: 'INDIVIDUAL',
SPOUSAL: 'SPOUSAL'
SPOUSAL: 'SPOUSAL',
unknown_default_open_api: '11184809'
} as const;

@@ -89,3 +90,4 @@ export type PlansPlanTypeEnum = typeof PlansPlanTypeEnum[keyof typeof PlansPlanTypeEnum];

COMPLETED: 'COMPLETED',
EXPIRED: 'EXPIRED'
EXPIRED: 'EXPIRED',
unknown_default_open_api: '11184809'
} as const;

@@ -95,2 +97,18 @@ export type PlansPlanStatusEnum = typeof PlansPlanStatusEnum[keyof typeof PlansPlanStatusEnum];

/**
* Check if a given object implements the PlansPlan interface.
*/
export function instanceOfPlansPlan(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "type" in value;
isInstance = isInstance && "modifiedDate" in value;
isInstance = isInstance && "clientDisplayName" in value;
isInstance = isInstance && "status" in value;
isInstance = isInstance && "statusDate" in value;
isInstance = isInstance && "url" in value;
return isInstance;
}
export function PlansPlanFromJSON(json: any): PlansPlan {

@@ -97,0 +115,0 @@ return PlansPlanFromJSONTyped(json, false);

@@ -16,4 +16,4 @@ /* tslint:disable */

import { exists, mapValues } from '../runtime';
import type { UsersUser } from './UsersUser';
import {
UsersUser,
UsersUserFromJSON,

@@ -31,2 +31,8 @@ UsersUserFromJSONTyped,

/**
* Number of users returned
* @type {number}
* @memberof UsersListUsersResponse
*/
count: number;
/**
*

@@ -39,2 +45,13 @@ * @type {Array<UsersUser>}

/**
* Check if a given object implements the UsersListUsersResponse interface.
*/
export function instanceOfUsersListUsersResponse(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "count" in value;
isInstance = isInstance && "results" in value;
return isInstance;
}
export function UsersListUsersResponseFromJSON(json: any): UsersListUsersResponse {

@@ -50,2 +67,3 @@ return UsersListUsersResponseFromJSONTyped(json, false);

'count': json['count'],
'results': ((json['results'] as Array<any>).map(UsersUserFromJSON)),

@@ -64,2 +82,3 @@ };

'count': value.count,
'results': ((value.results as Array<any>).map(UsersUserToJSON)),

@@ -66,0 +85,0 @@ };

@@ -57,5 +57,20 @@ /* tslint:disable */

*/
isActive?: boolean;
isActive: boolean;
}
/**
* Check if a given object implements the UsersUser interface.
*/
export function instanceOfUsersUser(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "userType" in value;
isInstance = isInstance && "name" in value;
isInstance = isInstance && "email" in value;
isInstance = isInstance && "isAdmin" in value;
isInstance = isInstance && "isActive" in value;
return isInstance;
}
export function UsersUserFromJSON(json: any): UsersUser {

@@ -76,3 +91,3 @@ return UsersUserFromJSONTyped(json, false);

'isAdmin': json['isAdmin'],
'isActive': !exists(json, 'isActive') ? undefined : json['isActive'],
'isActive': json['isActive'],
};

@@ -79,0 +94,0 @@ }

@@ -16,9 +16,2 @@ /* tslint:disable */

import { exists, mapValues } from '../runtime';
import {
UsersUser,
UsersUserFromJSON,
UsersUserFromJSONTyped,
UsersUserToJSON,
} from './UsersUser';
/**

@@ -68,2 +61,17 @@ *

/**
* Check if a given object implements the UsersUserContext interface.
*/
export function instanceOfUsersUserContext(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "userType" in value;
isInstance = isInstance && "name" in value;
isInstance = isInstance && "email" in value;
isInstance = isInstance && "isAdmin" in value;
isInstance = isInstance && "isActive" in value;
return isInstance;
}
export function UsersUserContextFromJSON(json: any): UsersUserContext {

@@ -70,0 +78,0 @@ return UsersUserContextFromJSONTyped(json, false);

@@ -16,4 +16,4 @@ /* tslint:disable */

import { exists, mapValues } from '../runtime';
import type { V1ErrorResponseData } from './V1ErrorResponseData';
import {
V1ErrorResponseData,
V1ErrorResponseDataFromJSON,

@@ -44,2 +44,12 @@ V1ErrorResponseDataFromJSONTyped,

/**
* Check if a given object implements the V1ErrorResponse interface.
*/
export function instanceOfV1ErrorResponse(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "status" in value;
return isInstance;
}
export function V1ErrorResponseFromJSON(json: any): V1ErrorResponse {

@@ -46,0 +56,0 @@ return V1ErrorResponseFromJSONTyped(json, false);

@@ -36,2 +36,12 @@ /* tslint:disable */

/**
* Check if a given object implements the V1ErrorResponseData interface.
*/
export function instanceOfV1ErrorResponseData(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "message" in value;
return isInstance;
}
export function V1ErrorResponseDataFromJSON(json: any): V1ErrorResponseData {

@@ -38,0 +48,0 @@ return V1ErrorResponseDataFromJSONTyped(json, false);

@@ -94,2 +94,3 @@ /* tslint:disable */

private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i');
private middleware: Middleware[];

@@ -117,6 +118,23 @@

protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverideFunction): Promise<Response> {
/**
* Check if the given MIME is a JSON MIME.
* JSON MIME examples:
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
* application/vnd.company+json
* @param mime - MIME (Multipurpose Internet Mail Extensions)
* @return True if the given MIME is JSON, false otherwise.
*/
protected isJsonMime(mime: string | null | undefined): boolean {
if (!mime) {
return false;
}
return BaseAPI.jsonRegex.test(mime);
}
protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise<Response> {
const { url, init } = await this.createFetchParams(context, initOverrides);
const response = await this.fetchApi(url, init);
if (response.status >= 200 && response.status < 300) {
if (response && (response.status >= 200 && response.status < 300)) {
return response;

@@ -127,3 +145,3 @@ }

private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverideFunction) {
private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) {
let url = this.configuration.basePath + context.path;

@@ -152,3 +170,3 @@ if (context.query !== undefined && Object.keys(context.query).length !== 0) {

const overridedInit: RequestInit = {
const overriddenInit: RequestInit = {
...initParams,

@@ -159,12 +177,18 @@ ...(await initOverrideFn({

}))
};
let body: any;
if (isFormData(overriddenInit.body)
|| (overriddenInit.body instanceof URLSearchParams)
|| isBlob(overriddenInit.body)) {
body = overriddenInit.body;
} else if (this.isJsonMime(headers['Content-Type'])) {
body = JSON.stringify(overriddenInit.body);
} else {
body = overriddenInit.body;
}
const init: RequestInit = {
...overridedInit,
body:
isFormData(overridedInit.body) ||
overridedInit.body instanceof URLSearchParams ||
isBlob(overridedInit.body)
? overridedInit.body
: JSON.stringify(overridedInit.body),
...overriddenInit,
body
};

@@ -185,3 +209,25 @@

}
let response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init);
let response: Response | undefined = undefined;
try {
response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init);
} catch (e) {
for (const middleware of this.middleware) {
if (middleware.onError) {
response = await middleware.onError({
fetch: this.fetchApi,
url: fetchParams.url,
init: fetchParams.init,
error: e,
response: response ? response.clone() : undefined,
}) || response;
}
}
if (response === undefined) {
if (e instanceof Error) {
throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response');
} else {
throw e;
}
}
}
for (const middleware of this.middleware) {

@@ -213,11 +259,11 @@ if (middleware.post) {

function isBlob(value: any): value is Blob {
return typeof Blob !== 'undefined' && value instanceof Blob
return typeof Blob !== 'undefined' && value instanceof Blob;
}
function isFormData(value: any): value is FormData {
return typeof FormData !== "undefined" && value instanceof FormData
return typeof FormData !== "undefined" && value instanceof FormData;
}
export class ResponseError extends Error {
name: "ResponseError" = "ResponseError";
override name: "ResponseError" = "ResponseError";
constructor(public response: Response, msg?: string) {

@@ -228,4 +274,11 @@ super(msg);

export class FetchError extends Error {
override name: "FetchError" = "FetchError";
constructor(public cause: Error, msg?: string) {
super(msg);
}
}
export class RequiredError extends Error {
name: "RequiredError" = "RequiredError";
override name: "RequiredError" = "RequiredError";
constructor(public field: string, msg?: string) {

@@ -250,6 +303,6 @@ super(msg);

export type HTTPBody = Json | FormData | URLSearchParams;
export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }
export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody };
export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original';
export type InitOverideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise<RequestInit>
export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise<RequestInit>

@@ -281,3 +334,3 @@ export interface FetchParams {

function querystringSingleKey(key: string, value: string | number | null | boolean | Array<string | number | null | boolean> | Set<string | number | null | boolean> | HTTPQuery, keyPrefix: string = ''): string {
function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array<string | number | null | boolean> | Set<string | number | null | boolean> | HTTPQuery, keyPrefix: string = ''): string {
const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key);

@@ -319,3 +372,3 @@ if (value instanceof Array) {

export interface Consume {
contentType: string
contentType: string;
}

@@ -336,5 +389,14 @@

export interface ErrorContext {
fetch: FetchAPI;
url: string;
init: RequestInit;
error: unknown;
response?: Response;
}
export interface Middleware {
pre?(context: RequestContext): Promise<FetchParams | void>;
post?(context: ResponseContext): Promise<Response | void>;
onError?(context: ErrorContext): Promise<Response | void>;
}

@@ -341,0 +403,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc