Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@anaqor/planqk-service-sdk

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@anaqor/planqk-service-sdk - npm Package Compare versions

Comparing version 1.3.6 to 1.3.7

tests/fixtures/complex-input.ts

2

dist/sdk/api/errors/BadRequestError.d.ts

@@ -6,3 +6,3 @@ /**

export declare class BadRequestError extends errors.PlanqkServiceApiError {
constructor(body?: unknown);
constructor(body?: any);
}

@@ -6,3 +6,3 @@ /**

export declare class ForbiddenError extends errors.PlanqkServiceApiError {
constructor(body?: unknown);
constructor(body?: any);
}

@@ -6,3 +6,3 @@ /**

export declare class InternalServerError extends errors.PlanqkServiceApiError {
constructor(body?: unknown);
constructor(body?: any);
}

@@ -6,3 +6,3 @@ /**

export declare class NotFoundError extends errors.PlanqkServiceApiError {
constructor(body?: unknown);
constructor(body?: any);
}

@@ -6,3 +6,3 @@ /**

export declare class UnauthorizedError extends errors.PlanqkServiceApiError {
constructor(body?: unknown);
constructor(body?: any);
}

@@ -45,3 +45,2 @@ "use strict";

const PlanqkServiceApi = __importStar(require("../../.."));
const serializers = __importStar(require("../../../../serialization"));
const errors = __importStar(require("../../../../errors"));

@@ -75,3 +74,3 @@ const url_join_1 = __importDefault(require("url-join"));

contentType: "application/json",
body: yield serializers.StartExecutionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
body: request,
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,

@@ -82,8 +81,3 @@ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,

if (_response.ok) {
return yield serializers.Job.parseOrThrow(_response.body, {
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
allowUnrecognizedEnumValues: true,
breadcrumbsPrefix: ["response"],
});
return _response.body;
}

@@ -150,8 +144,3 @@ if (_response.error.reason === "status-code") {

if (_response.ok) {
return yield serializers.Job.parseOrThrow(_response.body, {
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
allowUnrecognizedEnumValues: true,
breadcrumbsPrefix: ["response"],
});
return _response.body;
}

@@ -213,8 +202,3 @@ if (_response.error.reason === "status-code") {

if (_response.ok) {
return yield serializers.GetResultResponse.parseOrThrow(_response.body, {
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
allowUnrecognizedEnumValues: true,
breadcrumbsPrefix: ["response"],
});
return _response.body;
}

@@ -282,8 +266,3 @@ if (_response.error.reason === "status-code") {

if (_response.ok) {
return yield serializers.GetInterimResultsResponse.parseOrThrow(_response.body, {
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
allowUnrecognizedEnumValues: true,
breadcrumbsPrefix: ["response"],
});
return _response.body;
}

@@ -348,8 +327,3 @@ if (_response.error.reason === "status-code") {

if (_response.ok) {
return yield serializers.Job.parseOrThrow(_response.body, {
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
allowUnrecognizedEnumValues: true,
breadcrumbsPrefix: ["response"],
});
return _response.body;
}

@@ -356,0 +330,0 @@ if (_response.error.reason === "status-code") {

@@ -41,3 +41,2 @@ "use strict";

const core = __importStar(require("../../../../core"));
const serializers = __importStar(require("../../../../serialization"));
const errors = __importStar(require("../../../../errors"));

@@ -70,8 +69,3 @@ class StatusApi {

if (_response.ok) {
return yield serializers.HealthCheckResponse.parseOrThrow(_response.body, {
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
allowUnrecognizedEnumValues: true,
breadcrumbsPrefix: ["response"],
});
return _response.body;
}

@@ -78,0 +72,0 @@ if (_response.error.reason === "status-code") {

/**
* This file was auto-generated by Fern from our API Definition.
*/
export interface ErrorResponse {
/** Service-specific error code representing the type of problem encountered. */
code?: string;
/** Service-specific error message describing the detail of the problem encountered. */
detail?: string;
}
export type ErrorResponse = Record<string, any>;
/**
* This file was auto-generated by Fern from our API Definition.
*/
export type InterimResultResponse = Record<string, unknown>;
export type InterimResultResponse = Record<string, any>;
/**
* This file was auto-generated by Fern from our API Definition.
*/
export interface ResultResponse {
/** Service-specific result object. */
result?: Record<string, string>;
/** Service-specific metadata object which contains additional information besides the actual results. */
metadata?: Record<string, string>;
}
export type ResultResponse = Record<string, any>;
export * from "./fetcher";
export * from "./auth";
export * as serialization from "./schemas";

@@ -13,21 +13,7 @@ "use strict";

}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.serialization = void 0;
__exportStar(require("./fetcher"), exports);
__exportStar(require("./auth"), exports);
exports.serialization = __importStar(require("./schemas"));

@@ -0,7 +1,9 @@

require('dotenv').config();
module.exports = {
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
preset: 'ts-jest',
roots: ['<rootDir>/src'],
roots: ['<rootDir>'],
testEnvironment: 'node',
testRegex: '/src/.*\\.(test|spec)?\\.ts$',
testRegex: './.*\\.(test|spec)?\\.ts$',
transform: {

@@ -8,0 +10,0 @@ '^.+\\.ts?$': 'ts-jest',

{
"name": "@anaqor/planqk-service-sdk",
"version": "1.3.6",
"version": "1.3.7",
"description": "Typescript SDK to execute PlanQK Managed Services.",

@@ -30,2 +30,3 @@ "author": "Anaqor AG",

"@types/url-join": "^4.0.3",
"dotenv": "^16.3.1",
"eslint": "^8.55.0",

@@ -32,0 +33,0 @@ "eslint-config-oclif": "^5.0.0",

@@ -8,3 +8,3 @@ /**

export class BadRequestError extends errors.PlanqkServiceApiError {
constructor(body?: unknown) {
constructor(body?: any) {
super({

@@ -11,0 +11,0 @@ message: "BadRequestError",

@@ -8,3 +8,3 @@ /**

export class ForbiddenError extends errors.PlanqkServiceApiError {
constructor(body?: unknown) {
constructor(body?: any) {
super({

@@ -11,0 +11,0 @@ message: "ForbiddenError",

@@ -8,3 +8,3 @@ /**

export class InternalServerError extends errors.PlanqkServiceApiError {
constructor(body?: unknown) {
constructor(body?: any) {
super({

@@ -11,0 +11,0 @@ message: "InternalServerError",

@@ -8,3 +8,3 @@ /**

export class NotFoundError extends errors.PlanqkServiceApiError {
constructor(body?: unknown) {
constructor(body?: any) {
super({

@@ -11,0 +11,0 @@ message: "NotFoundError",

@@ -8,3 +8,3 @@ /**

export class UnauthorizedError extends errors.PlanqkServiceApiError {
constructor(body?: unknown) {
constructor(body?: any) {
super({

@@ -11,0 +11,0 @@ message: "UnauthorizedError",

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

import * as PlanqkServiceApi from "../../..";
import * as serializers from "../../../../serialization";
import * as errors from "../../../../errors";

@@ -53,3 +52,3 @@ import urlJoin from "url-join";

contentType: "application/json",
body: await serializers.StartExecutionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
body: request,
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,

@@ -60,8 +59,3 @@ maxRetries: requestOptions?.maxRetries,

if (_response.ok) {
return await serializers.Job.parseOrThrow(_response.body, {
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
allowUnrecognizedEnumValues: true,
breadcrumbsPrefix: ["response"],
});
return _response.body as PlanqkServiceApi.Job;
}

@@ -72,11 +66,11 @@

case 400:
throw new PlanqkServiceApi.BadRequestError(_response.error.body);
throw new PlanqkServiceApi.BadRequestError(_response.error.body as any);
case 401:
throw new PlanqkServiceApi.UnauthorizedError(_response.error.body);
throw new PlanqkServiceApi.UnauthorizedError(_response.error.body as any);
case 403:
throw new PlanqkServiceApi.ForbiddenError(_response.error.body);
throw new PlanqkServiceApi.ForbiddenError(_response.error.body as any);
case 404:
throw new PlanqkServiceApi.NotFoundError(_response.error.body);
throw new PlanqkServiceApi.NotFoundError(_response.error.body as any);
case 500:
throw new PlanqkServiceApi.InternalServerError(_response.error.body);
throw new PlanqkServiceApi.InternalServerError(_response.error.body as any);
default:

@@ -133,8 +127,3 @@ throw new errors.PlanqkServiceApiError({

if (_response.ok) {
return await serializers.Job.parseOrThrow(_response.body, {
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
allowUnrecognizedEnumValues: true,
breadcrumbsPrefix: ["response"],
});
return _response.body as PlanqkServiceApi.Job;
}

@@ -145,9 +134,9 @@

case 401:
throw new PlanqkServiceApi.UnauthorizedError(_response.error.body);
throw new PlanqkServiceApi.UnauthorizedError(_response.error.body as any);
case 403:
throw new PlanqkServiceApi.ForbiddenError(_response.error.body);
throw new PlanqkServiceApi.ForbiddenError(_response.error.body as any);
case 404:
throw new PlanqkServiceApi.NotFoundError(_response.error.body);
throw new PlanqkServiceApi.NotFoundError(_response.error.body as any);
case 500:
throw new PlanqkServiceApi.InternalServerError(_response.error.body);
throw new PlanqkServiceApi.InternalServerError(_response.error.body as any);
default:

@@ -204,8 +193,3 @@ throw new errors.PlanqkServiceApiError({

if (_response.ok) {
return await serializers.GetResultResponse.parseOrThrow(_response.body, {
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
allowUnrecognizedEnumValues: true,
breadcrumbsPrefix: ["response"],
});
return _response.body as PlanqkServiceApi.GetResultResponse;
}

@@ -216,9 +200,9 @@

case 401:
throw new PlanqkServiceApi.UnauthorizedError(_response.error.body);
throw new PlanqkServiceApi.UnauthorizedError(_response.error.body as any);
case 403:
throw new PlanqkServiceApi.ForbiddenError(_response.error.body);
throw new PlanqkServiceApi.ForbiddenError(_response.error.body as any);
case 404:
throw new PlanqkServiceApi.NotFoundError(_response.error.body);
throw new PlanqkServiceApi.NotFoundError(_response.error.body as any);
case 500:
throw new PlanqkServiceApi.InternalServerError(_response.error.body);
throw new PlanqkServiceApi.InternalServerError(_response.error.body as any);
default:

@@ -283,8 +267,3 @@ throw new errors.PlanqkServiceApiError({

if (_response.ok) {
return await serializers.GetInterimResultsResponse.parseOrThrow(_response.body, {
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
allowUnrecognizedEnumValues: true,
breadcrumbsPrefix: ["response"],
});
return _response.body as PlanqkServiceApi.GetInterimResultsResponse;
}

@@ -295,9 +274,9 @@

case 401:
throw new PlanqkServiceApi.UnauthorizedError(_response.error.body);
throw new PlanqkServiceApi.UnauthorizedError(_response.error.body as any);
case 403:
throw new PlanqkServiceApi.ForbiddenError(_response.error.body);
throw new PlanqkServiceApi.ForbiddenError(_response.error.body as any);
case 404:
throw new PlanqkServiceApi.NotFoundError(_response.error.body);
throw new PlanqkServiceApi.NotFoundError(_response.error.body as any);
case 500:
throw new PlanqkServiceApi.InternalServerError(_response.error.body);
throw new PlanqkServiceApi.InternalServerError(_response.error.body as any);
default:

@@ -357,8 +336,3 @@ throw new errors.PlanqkServiceApiError({

if (_response.ok) {
return await serializers.Job.parseOrThrow(_response.body, {
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
allowUnrecognizedEnumValues: true,
breadcrumbsPrefix: ["response"],
});
return _response.body as PlanqkServiceApi.Job;
}

@@ -369,9 +343,9 @@

case 401:
throw new PlanqkServiceApi.UnauthorizedError(_response.error.body);
throw new PlanqkServiceApi.UnauthorizedError(_response.error.body as any);
case 403:
throw new PlanqkServiceApi.ForbiddenError(_response.error.body);
throw new PlanqkServiceApi.ForbiddenError(_response.error.body as any);
case 404:
throw new PlanqkServiceApi.NotFoundError(_response.error.body);
throw new PlanqkServiceApi.NotFoundError(_response.error.body as any);
case 500:
throw new PlanqkServiceApi.InternalServerError(_response.error.body);
throw new PlanqkServiceApi.InternalServerError(_response.error.body as any);
default:

@@ -378,0 +352,0 @@ throw new errors.PlanqkServiceApiError({

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

import * as PlanqkServiceApi from "../../..";
import * as serializers from "../../../../serialization";
import * as errors from "../../../../errors";

@@ -49,8 +48,3 @@

if (_response.ok) {
return await serializers.HealthCheckResponse.parseOrThrow(_response.body, {
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
allowUnrecognizedEnumValues: true,
breadcrumbsPrefix: ["response"],
});
return _response.body as PlanqkServiceApi.HealthCheckResponse;
}

@@ -57,0 +51,0 @@

@@ -5,7 +5,2 @@ /**

export interface ErrorResponse {
/** Service-specific error code representing the type of problem encountered. */
code?: string;
/** Service-specific error message describing the detail of the problem encountered. */
detail?: string;
}
export type ErrorResponse = Record<string, any>;

@@ -5,2 +5,2 @@ /**

export type InterimResultResponse = Record<string, unknown>;
export type InterimResultResponse = Record<string, any>;

@@ -5,7 +5,2 @@ /**

export interface ResultResponse {
/** Service-specific result object. */
result?: Record<string, string>;
/** Service-specific metadata object which contains additional information besides the actual results. */
metadata?: Record<string, string>;
}
export type ResultResponse = Record<string, any>;

@@ -7,4 +7,4 @@ /**

import * as core from "./core";
import {StatusApi} from "./api/resources/statusApi/client/Client";
import {ServiceApi} from "./api/resources/serviceApi/client/Client";
import { StatusApi } from "./api/resources/statusApi/client/Client";
import { ServiceApi } from "./api/resources/serviceApi/client/Client";

@@ -11,0 +11,0 @@ export declare namespace PlanqkServiceApiClient {

@@ -1,2 +0,2 @@

import {Base64} from "js-base64";
import { Base64 } from "js-base64";

@@ -3,0 +3,0 @@ export interface BasicAuth {

@@ -1,4 +0,4 @@

import axios, {AxiosAdapter, AxiosError, AxiosResponse} from "axios";
import axios, { AxiosAdapter, AxiosError, AxiosResponse } from "axios";
import qs from "qs";
import {APIResponse} from "./APIResponse";
import { APIResponse } from "./APIResponse";

@@ -5,0 +5,0 @@ export type FetchFunction = <R = unknown>(args: Fetcher.Args) => Promise<APIResponse<R, Fetcher.Error>>;

export * from "./fetcher";
export * from "./auth";
export * as serialization from "./schemas";
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