Comparing version 0.5.0 to 0.5.1
@@ -16,2 +16,3 @@ import 'isomorphic-fetch'; | ||
const res = await fetch(uri, { | ||
body, | ||
headers: new Headers({ | ||
@@ -18,0 +19,0 @@ 'Accept': requestAcceptHeaders, |
@@ -12,9 +12,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
import { MediaTypes } from '../Constants'; | ||
import Resource from './Resource'; | ||
const supportedOperations = new WeakMap(); | ||
const resources = new WeakMap(); | ||
const clients = new WeakMap(); | ||
export class Operation extends Resource { | ||
export class Operation { | ||
constructor(supportedOperation, alcaeus, resource) { | ||
super(resource); | ||
if (!supportedOperation) { | ||
@@ -21,0 +19,0 @@ throw new Error('Missing supportedOperation parameter'); |
@@ -19,2 +19,3 @@ "use strict"; | ||
const res = await fetch(uri, { | ||
body, | ||
headers: new Headers({ | ||
@@ -21,0 +22,0 @@ 'Accept': requestAcceptHeaders, |
@@ -14,9 +14,7 @@ "use strict"; | ||
const Constants_1 = require("../Constants"); | ||
const Resource_1 = require("./Resource"); | ||
const supportedOperations = new WeakMap(); | ||
const resources = new WeakMap(); | ||
const clients = new WeakMap(); | ||
class Operation extends Resource_1.default { | ||
class Operation { | ||
constructor(supportedOperation, alcaeus, resource) { | ||
super(resource); | ||
if (!supportedOperation) { | ||
@@ -23,0 +21,0 @@ throw new Error('Missing supportedOperation parameter'); |
{ | ||
"name": "alcaeus", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"description": "Hydra Core hypermedia-aware client library", | ||
@@ -69,6 +69,2 @@ "main": "lib/node/index.js", | ||
"gitbook-cli": "^2.3.2", | ||
"gitbook-plugin-etoc": "^1.2.2", | ||
"gitbook-plugin-forkmegithub": "^2.2.0", | ||
"gitbook-plugin-hints": "^1.0.2", | ||
"gitbook-plugin-runkit": "0.0.1", | ||
"istanbul-instrumenter-loader": "^3.0.1", | ||
@@ -75,0 +71,0 @@ "json-server": "^0.12.1", |
@@ -23,3 +23,3 @@ import { IHydraResponse } from './HydraResponse'; | ||
loadDocumentation(uri: string): Promise<ApiDocumentation>; | ||
invokeOperation(operation: IOperation, uri: string, body: any, mediaType?: string): Promise<any>; | ||
invokeOperation(operation: IOperation, uri: string, body: BodyInit, mediaType?: string): Promise<any>; | ||
} |
import 'isomorphic-fetch'; | ||
import { ResponseWrapper } from './ResponseWrapper'; | ||
export declare function fetchResource(uri: string): Promise<ResponseWrapper>; | ||
export declare function invokeOperation(method: string, uri: string, body?: any, mediaType?: string): Promise<ResponseWrapper>; | ||
export declare function invokeOperation(method: string, uri: string, body?: BodyInit, mediaType?: string): Promise<ResponseWrapper>; |
import { IHydraClient } from '../alcaeus'; | ||
import { HydraResource, IOperation, SupportedOperation } from './index'; | ||
import Resource, { IResource } from './Resource'; | ||
export declare class Operation extends Resource implements IOperation { | ||
import { IResource } from './Resource'; | ||
export declare class Operation implements IOperation { | ||
constructor(supportedOperation: SupportedOperation, alcaeus: IHydraClient, resource: HydraResource); | ||
@@ -14,3 +14,3 @@ readonly method: string; | ||
readonly _resource: IResource; | ||
invoke(body: any, mediaType?: string): any; | ||
invoke(body: BodyInit, mediaType?: string): any; | ||
} |
@@ -23,3 +23,3 @@ import { IHydraResponse } from './HydraResponse'; | ||
loadDocumentation(uri: string): Promise<ApiDocumentation>; | ||
invokeOperation(operation: IOperation, uri: string, body: any, mediaType?: string): Promise<any>; | ||
invokeOperation(operation: IOperation, uri: string, body: BodyInit, mediaType?: string): Promise<any>; | ||
} |
import 'isomorphic-fetch'; | ||
import { ResponseWrapper } from './ResponseWrapper'; | ||
export declare function fetchResource(uri: string): Promise<ResponseWrapper>; | ||
export declare function invokeOperation(method: string, uri: string, body?: any, mediaType?: string): Promise<ResponseWrapper>; | ||
export declare function invokeOperation(method: string, uri: string, body?: BodyInit, mediaType?: string): Promise<ResponseWrapper>; |
import { IHydraClient } from '../alcaeus'; | ||
import { HydraResource, IOperation, SupportedOperation } from './index'; | ||
import Resource, { IResource } from './Resource'; | ||
export declare class Operation extends Resource implements IOperation { | ||
import { IResource } from './Resource'; | ||
export declare class Operation implements IOperation { | ||
constructor(supportedOperation: SupportedOperation, alcaeus: IHydraClient, resource: HydraResource); | ||
@@ -14,3 +14,3 @@ readonly method: string; | ||
readonly _resource: IResource; | ||
invoke(body: any, mediaType?: string): any; | ||
invoke(body: BodyInit, mediaType?: string): any; | ||
} |
@@ -1,3 +0,3 @@ | ||
type SchemaTerm = 'description' | 'title'; | ||
type RdfsTerm = 'comment' | 'label' | 'range' | 'domain'; | ||
declare type SchemaTerm = 'description' | 'title'; | ||
declare type RdfsTerm = 'comment' | 'label' | 'range' | 'domain'; | ||
export declare function Schema(term?: SchemaTerm): string; | ||
@@ -4,0 +4,0 @@ export declare function rdfs(term?: RdfsTerm): string; |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29
276
278097
4872