@ipfs-shipyard/pinning-service-client
Advanced tools
Comparing version 0.0.4 to 1.0.0
@@ -1,1 +0,1 @@ | ||
export * from './PinsApi'; | ||
export * from './PinsApi.js'; |
@@ -1,20 +0,4 @@ | ||
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = 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) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
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); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
__exportStar(require("./PinsApi"), exports); | ||
export * from './PinsApi.js'; | ||
//# sourceMappingURL=index.js.map |
@@ -12,4 +12,4 @@ /** | ||
*/ | ||
import * as runtime from '../runtime'; | ||
import { Pin, PinResults, PinStatus, Status, TextMatchingStrategy } from '../models'; | ||
import * as runtime from '../runtime.js'; | ||
import { Pin, PinResults, PinStatus, Status, TextMatchingStrategy } from '../models/index.js'; | ||
export interface PinsGetRequest { | ||
@@ -16,0 +16,0 @@ cid?: Set<string>; |
@@ -1,2 +0,1 @@ | ||
"use strict"; | ||
/* tslint:disable */ | ||
@@ -15,33 +14,8 @@ /* eslint-disable */ | ||
*/ | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = 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) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
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 __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.PinsApi = void 0; | ||
const runtime = __importStar(require("../runtime")); | ||
const models_1 = require("../models"); | ||
import * as runtime from '../runtime.js'; | ||
import { PinToJSON, PinResultsFromJSON, PinStatusFromJSON, } from '../models/index.js'; | ||
/** | ||
* | ||
*/ | ||
class PinsApi extends runtime.BaseAPI { | ||
export class PinsApi extends runtime.BaseAPI { | ||
/** | ||
@@ -91,3 +65,3 @@ * List all the pin objects, matching optional filters; when no filter is provided, only successful pins are returned | ||
}, initOverrides); | ||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, models_1.PinResultsFromJSON)(jsonValue)); | ||
return new runtime.JSONApiResponse(response, (jsonValue) => PinResultsFromJSON(jsonValue)); | ||
} | ||
@@ -125,5 +99,5 @@ /** | ||
query: queryParameters, | ||
body: (0, models_1.PinToJSON)(requestParameters.pin), | ||
body: PinToJSON(requestParameters.pin), | ||
}, initOverrides); | ||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, models_1.PinStatusFromJSON)(jsonValue)); | ||
return new runtime.JSONApiResponse(response, (jsonValue) => PinStatusFromJSON(jsonValue)); | ||
} | ||
@@ -193,3 +167,3 @@ /** | ||
}, initOverrides); | ||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, models_1.PinStatusFromJSON)(jsonValue)); | ||
return new runtime.JSONApiResponse(response, (jsonValue) => PinStatusFromJSON(jsonValue)); | ||
} | ||
@@ -230,5 +204,5 @@ /** | ||
query: queryParameters, | ||
body: (0, models_1.PinToJSON)(requestParameters.pin), | ||
body: PinToJSON(requestParameters.pin), | ||
}, initOverrides); | ||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, models_1.PinStatusFromJSON)(jsonValue)); | ||
return new runtime.JSONApiResponse(response, (jsonValue) => PinStatusFromJSON(jsonValue)); | ||
} | ||
@@ -244,3 +218,2 @@ /** | ||
} | ||
exports.PinsApi = PinsApi; | ||
//# sourceMappingURL=PinsApi.js.map |
@@ -1,3 +0,3 @@ | ||
export * from './runtime'; | ||
export * from './apis'; | ||
export * from './models'; | ||
export * from './runtime.js'; | ||
export * from './apis/index.js'; | ||
export * from './models/index.js'; |
@@ -1,22 +0,6 @@ | ||
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = 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) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
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); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
__exportStar(require("./runtime"), exports); | ||
__exportStar(require("./apis"), exports); | ||
__exportStar(require("./models"), exports); | ||
export * from './runtime.js'; | ||
export * from './apis/index.js'; | ||
export * from './models/index.js'; | ||
//# sourceMappingURL=index.js.map |
@@ -12,3 +12,3 @@ /** | ||
*/ | ||
import { FailureError } from './FailureError'; | ||
import { FailureError } from './FailureError.js'; | ||
/** | ||
@@ -15,0 +15,0 @@ * Response for a failed request |
@@ -1,2 +0,1 @@ | ||
"use strict"; | ||
/* tslint:disable */ | ||
@@ -15,10 +14,7 @@ /* eslint-disable */ | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.FailureToJSON = exports.FailureFromJSONTyped = exports.FailureFromJSON = void 0; | ||
const FailureError_1 = require("./FailureError"); | ||
function FailureFromJSON(json) { | ||
import { FailureErrorFromJSON, FailureErrorToJSON, } from './FailureError.js'; | ||
export function FailureFromJSON(json) { | ||
return FailureFromJSONTyped(json, false); | ||
} | ||
exports.FailureFromJSON = FailureFromJSON; | ||
function FailureFromJSONTyped(json, ignoreDiscriminator) { | ||
export function FailureFromJSONTyped(json, ignoreDiscriminator) { | ||
if ((json === undefined) || (json === null)) { | ||
@@ -28,7 +24,6 @@ return json; | ||
return { | ||
'error': (0, FailureError_1.FailureErrorFromJSON)(json['error']), | ||
'error': FailureErrorFromJSON(json['error']), | ||
}; | ||
} | ||
exports.FailureFromJSONTyped = FailureFromJSONTyped; | ||
function FailureToJSON(value) { | ||
export function FailureToJSON(value) { | ||
if (value === undefined) { | ||
@@ -41,6 +36,5 @@ return undefined; | ||
return { | ||
'error': (0, FailureError_1.FailureErrorToJSON)(value.error), | ||
'error': FailureErrorToJSON(value.error), | ||
}; | ||
} | ||
exports.FailureToJSON = FailureToJSON; | ||
//# sourceMappingURL=Failure.js.map |
@@ -1,2 +0,1 @@ | ||
"use strict"; | ||
/* tslint:disable */ | ||
@@ -15,10 +14,7 @@ /* eslint-disable */ | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.FailureErrorToJSON = exports.FailureErrorFromJSONTyped = exports.FailureErrorFromJSON = void 0; | ||
const runtime_1 = require("../runtime"); | ||
function FailureErrorFromJSON(json) { | ||
import { exists } from '../runtime.js'; | ||
export function FailureErrorFromJSON(json) { | ||
return FailureErrorFromJSONTyped(json, false); | ||
} | ||
exports.FailureErrorFromJSON = FailureErrorFromJSON; | ||
function FailureErrorFromJSONTyped(json, ignoreDiscriminator) { | ||
export function FailureErrorFromJSONTyped(json, ignoreDiscriminator) { | ||
if ((json === undefined) || (json === null)) { | ||
@@ -29,7 +25,6 @@ return json; | ||
'reason': json['reason'], | ||
'details': !(0, runtime_1.exists)(json, 'details') ? undefined : json['details'], | ||
'details': !exists(json, 'details') ? undefined : json['details'], | ||
}; | ||
} | ||
exports.FailureErrorFromJSONTyped = FailureErrorFromJSONTyped; | ||
function FailureErrorToJSON(value) { | ||
export function FailureErrorToJSON(value) { | ||
if (value === undefined) { | ||
@@ -46,3 +41,2 @@ return undefined; | ||
} | ||
exports.FailureErrorToJSON = FailureErrorToJSON; | ||
//# sourceMappingURL=FailureError.js.map |
@@ -1,7 +0,7 @@ | ||
export * from './Failure'; | ||
export * from './FailureError'; | ||
export * from './Pin'; | ||
export * from './PinResults'; | ||
export * from './PinStatus'; | ||
export * from './Status'; | ||
export * from './TextMatchingStrategy'; | ||
export * from './Failure.js'; | ||
export * from './FailureError.js'; | ||
export * from './Pin.js'; | ||
export * from './PinResults.js'; | ||
export * from './PinStatus.js'; | ||
export * from './Status.js'; | ||
export * from './TextMatchingStrategy.js'; |
@@ -1,26 +0,10 @@ | ||
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = 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) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
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); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
__exportStar(require("./Failure"), exports); | ||
__exportStar(require("./FailureError"), exports); | ||
__exportStar(require("./Pin"), exports); | ||
__exportStar(require("./PinResults"), exports); | ||
__exportStar(require("./PinStatus"), exports); | ||
__exportStar(require("./Status"), exports); | ||
__exportStar(require("./TextMatchingStrategy"), exports); | ||
export * from './Failure.js'; | ||
export * from './FailureError.js'; | ||
export * from './Pin.js'; | ||
export * from './PinResults.js'; | ||
export * from './PinStatus.js'; | ||
export * from './Status.js'; | ||
export * from './TextMatchingStrategy.js'; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,1 @@ | ||
"use strict"; | ||
/* tslint:disable */ | ||
@@ -15,10 +14,7 @@ /* eslint-disable */ | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.PinToJSON = exports.PinFromJSONTyped = exports.PinFromJSON = void 0; | ||
const runtime_1 = require("../runtime"); | ||
function PinFromJSON(json) { | ||
import { exists } from '../runtime.js'; | ||
export function PinFromJSON(json) { | ||
return PinFromJSONTyped(json, false); | ||
} | ||
exports.PinFromJSON = PinFromJSON; | ||
function PinFromJSONTyped(json, ignoreDiscriminator) { | ||
export function PinFromJSONTyped(json, ignoreDiscriminator) { | ||
if ((json === undefined) || (json === null)) { | ||
@@ -29,9 +25,8 @@ return json; | ||
'cid': json['cid'], | ||
'name': !(0, runtime_1.exists)(json, 'name') ? undefined : json['name'], | ||
'origins': !(0, runtime_1.exists)(json, 'origins') ? undefined : json['origins'], | ||
'meta': !(0, runtime_1.exists)(json, 'meta') ? undefined : json['meta'], | ||
'name': !exists(json, 'name') ? undefined : json['name'], | ||
'origins': !exists(json, 'origins') ? undefined : json['origins'], | ||
'meta': !exists(json, 'meta') ? undefined : json['meta'], | ||
}; | ||
} | ||
exports.PinFromJSONTyped = PinFromJSONTyped; | ||
function PinToJSON(value) { | ||
export function PinToJSON(value) { | ||
if (value === undefined) { | ||
@@ -50,3 +45,2 @@ return undefined; | ||
} | ||
exports.PinToJSON = PinToJSON; | ||
//# sourceMappingURL=Pin.js.map |
@@ -12,3 +12,3 @@ /** | ||
*/ | ||
import { PinStatus } from './PinStatus'; | ||
import { PinStatus } from './PinStatus.js'; | ||
/** | ||
@@ -15,0 +15,0 @@ * Response used for listing pin objects matching request |
@@ -1,2 +0,1 @@ | ||
"use strict"; | ||
/* tslint:disable */ | ||
@@ -15,10 +14,7 @@ /* eslint-disable */ | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.PinResultsToJSON = exports.PinResultsFromJSONTyped = exports.PinResultsFromJSON = void 0; | ||
const PinStatus_1 = require("./PinStatus"); | ||
function PinResultsFromJSON(json) { | ||
import { PinStatusFromJSON, PinStatusToJSON, } from './PinStatus.js'; | ||
export function PinResultsFromJSON(json) { | ||
return PinResultsFromJSONTyped(json, false); | ||
} | ||
exports.PinResultsFromJSON = PinResultsFromJSON; | ||
function PinResultsFromJSONTyped(json, ignoreDiscriminator) { | ||
export function PinResultsFromJSONTyped(json, ignoreDiscriminator) { | ||
if ((json === undefined) || (json === null)) { | ||
@@ -29,7 +25,6 @@ return json; | ||
'count': json['count'], | ||
'results': (new Set(json['results'].map(PinStatus_1.PinStatusFromJSON))), | ||
'results': (new Set(json['results'].map(PinStatusFromJSON))), | ||
}; | ||
} | ||
exports.PinResultsFromJSONTyped = PinResultsFromJSONTyped; | ||
function PinResultsToJSON(value) { | ||
export function PinResultsToJSON(value) { | ||
if (value === undefined) { | ||
@@ -43,6 +38,5 @@ return undefined; | ||
'count': value.count, | ||
'results': (Array.from(value.results).map(PinStatus_1.PinStatusToJSON)), | ||
'results': (Array.from(value.results).map(PinStatusToJSON)), | ||
}; | ||
} | ||
exports.PinResultsToJSON = PinResultsToJSON; | ||
//# sourceMappingURL=PinResults.js.map |
@@ -12,4 +12,4 @@ /** | ||
*/ | ||
import { Pin } from './Pin'; | ||
import { Status } from './Status'; | ||
import { Pin } from './Pin.js'; | ||
import { Status } from './Status.js'; | ||
/** | ||
@@ -16,0 +16,0 @@ * Pin object with status |
@@ -1,2 +0,1 @@ | ||
"use strict"; | ||
/* tslint:disable */ | ||
@@ -15,12 +14,9 @@ /* eslint-disable */ | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.PinStatusToJSON = exports.PinStatusFromJSONTyped = exports.PinStatusFromJSON = void 0; | ||
const runtime_1 = require("../runtime"); | ||
const Pin_1 = require("./Pin"); | ||
const Status_1 = require("./Status"); | ||
function PinStatusFromJSON(json) { | ||
import { exists } from '../runtime.js'; | ||
import { PinFromJSON, PinToJSON, } from './Pin.js'; | ||
import { StatusFromJSON, StatusToJSON, } from './Status.js'; | ||
export function PinStatusFromJSON(json) { | ||
return PinStatusFromJSONTyped(json, false); | ||
} | ||
exports.PinStatusFromJSON = PinStatusFromJSON; | ||
function PinStatusFromJSONTyped(json, ignoreDiscriminator) { | ||
export function PinStatusFromJSONTyped(json, ignoreDiscriminator) { | ||
if ((json === undefined) || (json === null)) { | ||
@@ -31,11 +27,10 @@ return json; | ||
'requestid': json['requestid'], | ||
'status': (0, Status_1.StatusFromJSON)(json['status']), | ||
'status': StatusFromJSON(json['status']), | ||
'created': (new Date(json['created'])), | ||
'pin': (0, Pin_1.PinFromJSON)(json['pin']), | ||
'pin': PinFromJSON(json['pin']), | ||
'delegates': json['delegates'], | ||
'info': !(0, runtime_1.exists)(json, 'info') ? undefined : json['info'], | ||
'info': !exists(json, 'info') ? undefined : json['info'], | ||
}; | ||
} | ||
exports.PinStatusFromJSONTyped = PinStatusFromJSONTyped; | ||
function PinStatusToJSON(value) { | ||
export function PinStatusToJSON(value) { | ||
if (value === undefined) { | ||
@@ -49,5 +44,5 @@ return undefined; | ||
'requestid': value.requestid, | ||
'status': (0, Status_1.StatusToJSON)(value.status), | ||
'status': StatusToJSON(value.status), | ||
'created': (value.created.toISOString()), | ||
'pin': (0, Pin_1.PinToJSON)(value.pin), | ||
'pin': PinToJSON(value.pin), | ||
'delegates': value.delegates, | ||
@@ -57,3 +52,2 @@ 'info': value.info, | ||
} | ||
exports.PinStatusToJSON = PinStatusToJSON; | ||
//# sourceMappingURL=PinStatus.js.map |
@@ -1,2 +0,1 @@ | ||
"use strict"; | ||
/* tslint:disable */ | ||
@@ -15,4 +14,2 @@ /* eslint-disable */ | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.StatusToJSON = exports.StatusFromJSONTyped = exports.StatusFromJSON = exports.Status = void 0; | ||
/** | ||
@@ -23,3 +20,3 @@ * Status a pin object can have at a pinning service | ||
*/ | ||
var Status; | ||
export var Status; | ||
(function (Status) { | ||
@@ -30,15 +27,12 @@ Status["Queued"] = "queued"; | ||
Status["Failed"] = "failed"; | ||
})(Status = exports.Status || (exports.Status = {})); | ||
function StatusFromJSON(json) { | ||
})(Status || (Status = {})); | ||
export function StatusFromJSON(json) { | ||
return StatusFromJSONTyped(json, false); | ||
} | ||
exports.StatusFromJSON = StatusFromJSON; | ||
function StatusFromJSONTyped(json, ignoreDiscriminator) { | ||
export function StatusFromJSONTyped(json, ignoreDiscriminator) { | ||
return json; | ||
} | ||
exports.StatusFromJSONTyped = StatusFromJSONTyped; | ||
function StatusToJSON(value) { | ||
export function StatusToJSON(value) { | ||
return value; | ||
} | ||
exports.StatusToJSON = StatusToJSON; | ||
//# sourceMappingURL=Status.js.map |
@@ -1,2 +0,1 @@ | ||
"use strict"; | ||
/* tslint:disable */ | ||
@@ -15,4 +14,2 @@ /* eslint-disable */ | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TextMatchingStrategyToJSON = exports.TextMatchingStrategyFromJSONTyped = exports.TextMatchingStrategyFromJSON = exports.TextMatchingStrategy = void 0; | ||
/** | ||
@@ -23,3 +20,3 @@ * Alternative text matching strategy | ||
*/ | ||
var TextMatchingStrategy; | ||
export var TextMatchingStrategy; | ||
(function (TextMatchingStrategy) { | ||
@@ -30,15 +27,12 @@ TextMatchingStrategy["Exact"] = "exact"; | ||
TextMatchingStrategy["Ipartial"] = "ipartial"; | ||
})(TextMatchingStrategy = exports.TextMatchingStrategy || (exports.TextMatchingStrategy = {})); | ||
function TextMatchingStrategyFromJSON(json) { | ||
})(TextMatchingStrategy || (TextMatchingStrategy = {})); | ||
export function TextMatchingStrategyFromJSON(json) { | ||
return TextMatchingStrategyFromJSONTyped(json, false); | ||
} | ||
exports.TextMatchingStrategyFromJSON = TextMatchingStrategyFromJSON; | ||
function TextMatchingStrategyFromJSONTyped(json, ignoreDiscriminator) { | ||
export function TextMatchingStrategyFromJSONTyped(json, ignoreDiscriminator) { | ||
return json; | ||
} | ||
exports.TextMatchingStrategyFromJSONTyped = TextMatchingStrategyFromJSONTyped; | ||
function TextMatchingStrategyToJSON(value) { | ||
export function TextMatchingStrategyToJSON(value) { | ||
return value; | ||
} | ||
exports.TextMatchingStrategyToJSON = TextMatchingStrategyToJSON; | ||
//# sourceMappingURL=TextMatchingStrategy.js.map |
@@ -1,2 +0,1 @@ | ||
"use strict"; | ||
/* tslint:disable */ | ||
@@ -15,5 +14,3 @@ /* eslint-disable */ | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TextApiResponse = exports.BlobApiResponse = exports.VoidApiResponse = exports.JSONApiResponse = exports.canConsumeForm = exports.mapValues = exports.querystring = exports.exists = exports.Configuration = exports.COLLECTION_FORMATS = exports.RequiredError = exports.BaseAPI = exports.BASE_PATH = void 0; | ||
exports.BASE_PATH = "https://pinning-service.example.com".replace(/\/+$/, ""); | ||
export const BASE_PATH = "https://pinning-service.example.com".replace(/\/+$/, ""); | ||
const isBlob = (value) => typeof Blob !== 'undefined' && value instanceof Blob; | ||
@@ -23,3 +20,3 @@ /** | ||
*/ | ||
class BaseAPI { | ||
export class BaseAPI { | ||
constructor(configuration = new Configuration()) { | ||
@@ -105,5 +102,4 @@ this.configuration = configuration; | ||
} | ||
exports.BaseAPI = BaseAPI; | ||
; | ||
class RequiredError extends Error { | ||
export class RequiredError extends Error { | ||
constructor(field, msg) { | ||
@@ -115,4 +111,3 @@ super(msg); | ||
} | ||
exports.RequiredError = RequiredError; | ||
exports.COLLECTION_FORMATS = { | ||
export const COLLECTION_FORMATS = { | ||
csv: ",", | ||
@@ -123,3 +118,3 @@ ssv: " ", | ||
}; | ||
class Configuration { | ||
export class Configuration { | ||
constructor(configuration = {}) { | ||
@@ -129,3 +124,3 @@ this.configuration = configuration; | ||
get basePath() { | ||
return this.configuration.basePath != null ? this.configuration.basePath : exports.BASE_PATH; | ||
return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; | ||
} | ||
@@ -168,9 +163,7 @@ get fetchApi() { | ||
} | ||
exports.Configuration = Configuration; | ||
function exists(json, key) { | ||
export function exists(json, key) { | ||
const value = json[key]; | ||
return value !== null && value !== undefined; | ||
} | ||
exports.exists = exists; | ||
function querystring(params, prefix = '') { | ||
export function querystring(params, prefix = '') { | ||
return Object.keys(params) | ||
@@ -196,8 +189,6 @@ .map((key) => { | ||
} | ||
exports.querystring = querystring; | ||
function mapValues(data, fn) { | ||
export function mapValues(data, fn) { | ||
return Object.keys(data).reduce((acc, key) => ({ ...acc, [key]: fn(data[key]) }), {}); | ||
} | ||
exports.mapValues = mapValues; | ||
function canConsumeForm(consumes) { | ||
export function canConsumeForm(consumes) { | ||
for (const consume of consumes) { | ||
@@ -210,4 +201,3 @@ if ('multipart/form-data' === consume.contentType) { | ||
} | ||
exports.canConsumeForm = canConsumeForm; | ||
class JSONApiResponse { | ||
export class JSONApiResponse { | ||
constructor(raw, transformer = (jsonValue) => jsonValue) { | ||
@@ -221,4 +211,3 @@ this.raw = raw; | ||
} | ||
exports.JSONApiResponse = JSONApiResponse; | ||
class VoidApiResponse { | ||
export class VoidApiResponse { | ||
constructor(raw) { | ||
@@ -231,4 +220,3 @@ this.raw = raw; | ||
} | ||
exports.VoidApiResponse = VoidApiResponse; | ||
class BlobApiResponse { | ||
export class BlobApiResponse { | ||
constructor(raw) { | ||
@@ -242,4 +230,3 @@ this.raw = raw; | ||
} | ||
exports.BlobApiResponse = BlobApiResponse; | ||
class TextApiResponse { | ||
export class TextApiResponse { | ||
constructor(raw) { | ||
@@ -253,3 +240,2 @@ this.raw = raw; | ||
} | ||
exports.TextApiResponse = TextApiResponse; | ||
//# sourceMappingURL=runtime.js.map |
@@ -1,4 +0,4 @@ | ||
import { Configuration as GeneratedConfiguration } from '../dist.generated'; | ||
import type { ConfigurationParameters as GeneratedConfigurationParameters } from '../dist.generated'; | ||
import { PinsApi as RemotePinningServiceClient } from '../dist.generated/apis'; | ||
import { Configuration as GeneratedConfiguration } from '../dist.generated/index.js'; | ||
import type { ConfigurationParameters as GeneratedConfigurationParameters } from '../dist.generated/index.js'; | ||
import { PinsApi as RemotePinningServiceClient } from '../dist.generated/apis/index.js'; | ||
interface ConfigurationParameters extends Omit<GeneratedConfigurationParameters, 'basePath'> { | ||
@@ -13,3 +13,3 @@ endpointUrl?: string; | ||
*/ | ||
export type { PinsApiInterface as RemotePinningServiceClientInterface } from '../dist.generated/apis'; | ||
export type { PinsApiInterface as RemotePinningServiceClientInterface } from '../dist.generated/apis/index.js'; | ||
export { Configuration, RemotePinningServiceClient }; | ||
@@ -20,6 +20,6 @@ export type { ConfigurationParameters }; | ||
*/ | ||
export type { PinsGetRequest, PinsPostRequest, PinsRequestidDeleteRequest, PinsRequestidGetRequest, PinsRequestidPostRequest } from '../dist.generated/apis'; | ||
export * from '../dist.generated/models'; | ||
export { BASE_PATH, BaseAPI, BlobApiResponse, COLLECTION_FORMATS, JSONApiResponse, RequiredError, TextApiResponse, VoidApiResponse, canConsumeForm, exists, mapValues, querystring } from '../dist.generated/runtime'; | ||
export type { FetchParams, RequestOpts, Consume, RequestContext, ResponseContext, Middleware, ApiResponse, ResponseTransformer } from '../dist.generated/runtime'; | ||
export type { PinsGetRequest, PinsPostRequest, PinsRequestidDeleteRequest, PinsRequestidGetRequest, PinsRequestidPostRequest } from '../dist.generated/apis/index.js'; | ||
export * from '../dist.generated/models/index.js'; | ||
export { BASE_PATH, BaseAPI, BlobApiResponse, COLLECTION_FORMATS, JSONApiResponse, RequiredError, TextApiResponse, VoidApiResponse, canConsumeForm, exists, mapValues, querystring } from '../dist.generated/runtime.js'; | ||
export type { FetchParams, RequestOpts, Consume, RequestContext, ResponseContext, Middleware, ApiResponse, ResponseTransformer } from '../dist.generated/runtime.js'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,22 +0,5 @@ | ||
"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]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
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 __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.querystring = exports.mapValues = exports.exists = exports.canConsumeForm = exports.VoidApiResponse = exports.TextApiResponse = exports.RequiredError = exports.JSONApiResponse = exports.COLLECTION_FORMATS = exports.BlobApiResponse = exports.BaseAPI = exports.BASE_PATH = exports.RemotePinningServiceClient = exports.Configuration = void 0; | ||
const fetch_ponyfill_1 = __importDefault(require("fetch-ponyfill")); | ||
const dist_generated_1 = require("../dist.generated"); | ||
const apis_1 = require("../dist.generated/apis"); | ||
Object.defineProperty(exports, "RemotePinningServiceClient", { enumerable: true, get: function () { return apis_1.PinsApi; } }); | ||
class Configuration extends dist_generated_1.Configuration { | ||
import fetchPonyfill from 'fetch-ponyfill'; | ||
import { Configuration as GeneratedConfiguration } from '../dist.generated/index.js'; | ||
import { PinsApi as RemotePinningServiceClient } from '../dist.generated/apis/index.js'; | ||
class Configuration extends GeneratedConfiguration { | ||
constructor(options) { | ||
@@ -28,3 +11,3 @@ const finalOptions = { ...options }; | ||
if (options.fetchApi == null) { | ||
finalOptions.fetchApi = (0, fetch_ponyfill_1.default)().fetch; | ||
finalOptions.fetchApi = fetchPonyfill().fetch; | ||
} | ||
@@ -38,18 +21,7 @@ // @see https://github.com/ipfs-shipyard/js-pinning-service-http-client/issues/3 | ||
} | ||
exports.Configuration = Configuration; | ||
__exportStar(require("../dist.generated/models"), exports); | ||
var runtime_1 = require("../dist.generated/runtime"); | ||
Object.defineProperty(exports, "BASE_PATH", { enumerable: true, get: function () { return runtime_1.BASE_PATH; } }); | ||
Object.defineProperty(exports, "BaseAPI", { enumerable: true, get: function () { return runtime_1.BaseAPI; } }); | ||
Object.defineProperty(exports, "BlobApiResponse", { enumerable: true, get: function () { return runtime_1.BlobApiResponse; } }); | ||
Object.defineProperty(exports, "COLLECTION_FORMATS", { enumerable: true, get: function () { return runtime_1.COLLECTION_FORMATS; } }); | ||
export { Configuration, RemotePinningServiceClient }; | ||
export * from '../dist.generated/models/index.js'; | ||
export { BASE_PATH, BaseAPI, BlobApiResponse, COLLECTION_FORMATS, | ||
// Configuration, // overwritten above | ||
Object.defineProperty(exports, "JSONApiResponse", { enumerable: true, get: function () { return runtime_1.JSONApiResponse; } }); | ||
Object.defineProperty(exports, "RequiredError", { enumerable: true, get: function () { return runtime_1.RequiredError; } }); | ||
Object.defineProperty(exports, "TextApiResponse", { enumerable: true, get: function () { return runtime_1.TextApiResponse; } }); | ||
Object.defineProperty(exports, "VoidApiResponse", { enumerable: true, get: function () { return runtime_1.VoidApiResponse; } }); | ||
Object.defineProperty(exports, "canConsumeForm", { enumerable: true, get: function () { return runtime_1.canConsumeForm; } }); | ||
Object.defineProperty(exports, "exists", { enumerable: true, get: function () { return runtime_1.exists; } }); | ||
Object.defineProperty(exports, "mapValues", { enumerable: true, get: function () { return runtime_1.mapValues; } }); | ||
Object.defineProperty(exports, "querystring", { enumerable: true, get: function () { return runtime_1.querystring; } }); | ||
JSONApiResponse, RequiredError, TextApiResponse, VoidApiResponse, canConsumeForm, exists, mapValues, querystring } from '../dist.generated/runtime.js'; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@ipfs-shipyard/pinning-service-client", | ||
"version": "0.0.4", | ||
"version": "1.0.0", | ||
"description": "A lightweight client generated from the ipfs-pinning-service-spec defined at https://raw.githubusercontent.com/ipfs/pinning-services-api-spec/main/ipfs-pinning-service.yaml", | ||
@@ -26,4 +26,4 @@ "author": "Russell Dempsey <1173416+SgtPooki@users.noreply.github.com>", | ||
}, | ||
"main": "dist/src/index.js", | ||
"types": "dist/src/index.d.ts", | ||
"type": "module", | ||
"types": "./dist/src/index.d.ts", | ||
"typesVersions": { | ||
@@ -35,3 +35,3 @@ "*": { | ||
"dist/src/*", | ||
"dist/types/*" | ||
"dist/src/*/index" | ||
], | ||
@@ -42,3 +42,3 @@ "src/*": [ | ||
"dist/src/*", | ||
"dist/types/*" | ||
"dist/src/*/index" | ||
] | ||
@@ -49,4 +49,17 @@ } | ||
"src", | ||
"dist" | ||
"dist/src", | ||
"dist/dist.generated", | ||
"!dist/test", | ||
"!**/*.tsbuildinfo" | ||
], | ||
"exports": { | ||
".": { | ||
"import": "./dist/src/index.js", | ||
"require": "./dist/src/index.js" | ||
}, | ||
"./api/apis": { | ||
"import": "./dist/dist.generated/apis", | ||
"require": "./dist/dist.generated/apis" | ||
} | ||
}, | ||
"eslintConfig": { | ||
@@ -140,28 +153,31 @@ "extends": "ipfs", | ||
"scripts": { | ||
"clean": "npx rimraf dist generated node_modules .swc", | ||
"ci:test": "run-s test:*", | ||
"dep-check": "aegir dep-check src/**/*.ts test/**/*.ts generated/**/*.ts", | ||
"dep-check": "aegir dep-check dist/**/*.js -- --ignore @openapitools/openapi-generator-cli @typescript-eslint/eslint-plugin @typescript-eslint/parser", | ||
"fix": "run-s fix:*", | ||
"fix:lint": "aegir lint --fix", | ||
"lint": "run-s lint:*", | ||
"lint:main": "aegir lint", | ||
"lint:ts": "aegir ts -p check", | ||
"lint-TODO:project": "check-aegir-project # currently broken due to corrupting the repoUrl", | ||
"release": "aegir release --publish false && npm run build && npm publish --tag latest --access public", | ||
"build": "run-s build:* && cp-cli dist.generated dist/dist.generated", | ||
"release": "aegir release", | ||
"postinstall": "run-p prepareAegir", | ||
"prepareAegir": "run-p pretest build:generated", | ||
"prebuild": "run-p prepareAegir", | ||
"build": "aegir build", | ||
"build-todo:docs": "aegir docs -p false", | ||
"build:deps": "run-s gen", | ||
"build:main": "aegir build", | ||
"build:types": "aegir ts -p types", | ||
"build:generated": "tsc-silent -p tsconfig.generated.json --suppress 6133@generated 6192@generated --stats", | ||
"postbuild:generated": "cp-cli dist/dist.generated dist.generated", | ||
"pretest": "tsc -p tsconfig.MockServerController.json", | ||
"test": "run-s test:*", | ||
"test:browser": "aegir test --target browser", | ||
"test:webworker": "aegir test --target webworker", | ||
"test:electron": "aegir test --target electron-main", | ||
"test:node": "aegir test --target node --cov && npx nyc report", | ||
"test:node": "aegir test -t node --cov", | ||
"test:chrome": "aegir test -t browser --cov", | ||
"test:chrome-webworker": "aegir test -t webworker", | ||
"test:firefox": "aegir test -t browser -- --browser firefox", | ||
"test:firefox-webworker": "aegir test -t webworker -- --browser firefox", | ||
"test:electron-main": "aegir test -t electron-main", | ||
"posttest": "npx nyc report", | ||
"pregen": "openapi-generator-cli validate -i https://raw.githubusercontent.com/ipfs/pinning-services-api-spec/v1.0.0/ipfs-pinning-service.yaml", | ||
"gen": "run-p gen:fetch", | ||
"postgen": "tsc-silent -p tsconfig.generated.json --suppress 6133@generated 6192@generated --stats", | ||
"gen:fetch": "openapi-generator-cli generate --generator-key fetch -i https://raw.githubusercontent.com/ipfs/pinning-services-api-spec/v1.0.0/ipfs-pinning-service.yaml", | ||
"gen:node": "openapi-generator-cli generate --generator-key node -i https://raw.githubusercontent.com/ipfs/pinning-services-api-spec/v1.0.0/ipfs-pinning-service.yaml", | ||
"gen:ts": "openapi-generator-cli generate --generator-key ts -i https://raw.githubusercontent.com/ipfs/pinning-services-api-spec/v1.0.0/ipfs-pinning-service.yaml" | ||
"postgen": "run-s build:generated", | ||
"gen:fetch": "openapi-generator-cli generate --generator-key fetch", | ||
"gen:node": "openapi-generator-cli generate --generator-key node", | ||
"gen:ts": "openapi-generator-cli generate --generator-key ts", | ||
"clean": "aegir clean", | ||
"lint": "aegir lint" | ||
}, | ||
@@ -177,2 +193,3 @@ "dependencies": { | ||
"@types/cors": "^2.8.12", | ||
"@types/eslint": "^8.4.2", | ||
"@types/express": "^4.17.13", | ||
@@ -182,3 +199,5 @@ "@types/mocha": "^9.1.0", | ||
"@types/portscanner": "^2.1.1", | ||
"aegir": "^36.2.2", | ||
"@typescript-eslint/eslint-plugin": "^5.22.0", | ||
"@typescript-eslint/parser": "^5.22.0", | ||
"aegir": "^37.0.15", | ||
"check-aegir-project": "^1.0.3", | ||
@@ -188,2 +207,4 @@ "cors": "^2.8.5", | ||
"dotenvrc": "^1.0.1", | ||
"eslint": "^8.14.0", | ||
"eslint-plugin-import": "^2.26.0", | ||
"express": "^4.17.3", | ||
@@ -196,20 +217,6 @@ "express-promise-router": "^4.1.1", | ||
"ts-node": "^10.7.0", | ||
"tsc-silent": "^1.2.2", | ||
"typescript": "^4.6.3", | ||
"tsc-silent": "^1.2.1", | ||
"typescript": "^4.6.4", | ||
"winston": "^3.6.0" | ||
}, | ||
"exports": { | ||
".": { | ||
"import": "./dist/src/index.js", | ||
"require": "./dist/src/index.js" | ||
}, | ||
"./api/apis": { | ||
"import": "./dist/dist.generated/apis", | ||
"require": "./dist/dist.generated/apis" | ||
} | ||
}, | ||
"contributors": [ | ||
"Russell Dempsey <1173416+SgtPooki@users.noreply.github.com>", | ||
"Marcin Rataj <lidel@lidel.org>" | ||
] | ||
} | ||
} |
import fetchPonyfill from 'fetch-ponyfill' | ||
import { Configuration as GeneratedConfiguration } from '../dist.generated' | ||
import type { ConfigurationParameters as GeneratedConfigurationParameters } from '../dist.generated' | ||
import { PinsApi as RemotePinningServiceClient } from '../dist.generated/apis' | ||
import { Configuration as GeneratedConfiguration } from '../dist.generated/index.js' | ||
import type { ConfigurationParameters as GeneratedConfigurationParameters } from '../dist.generated/index.js' | ||
import { PinsApi as RemotePinningServiceClient } from '../dist.generated/apis/index.js' | ||
@@ -13,3 +13,2 @@ interface ConfigurationParameters extends Omit<GeneratedConfigurationParameters, 'basePath'>{ | ||
const finalOptions: GeneratedConfigurationParameters = { ...options } | ||
/** | ||
@@ -36,3 +35,3 @@ * Prevent the need for everyone to have to override the fetch API... | ||
PinsApiInterface as RemotePinningServiceClientInterface | ||
} from '../dist.generated/apis' | ||
} from '../dist.generated/apis/index.js' | ||
@@ -54,5 +53,5 @@ export { | ||
PinsRequestidPostRequest | ||
} from '../dist.generated/apis' | ||
} from '../dist.generated/apis/index.js' | ||
export * from '../dist.generated/models' | ||
export * from '../dist.generated/models/index.js' | ||
@@ -73,3 +72,3 @@ export { | ||
querystring | ||
} from '../dist.generated/runtime' | ||
} from '../dist.generated/runtime.js' | ||
@@ -85,2 +84,2 @@ export type { | ||
ResponseTransformer | ||
} from '../dist.generated/runtime' | ||
} from '../dist.generated/runtime.js' |
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
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
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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
0
Yes
220686
29
44
1875
1