@web3api/core-js
Advanced tools
Comparing version 0.0.1-prealpha.42 to 0.0.1-prealpha.43
import { QueryApiInvocations, Uri } from "../types"; | ||
import { SelectionSetNode } from "graphql"; | ||
export declare const parseQuery: (uri: Uri, doc: import("graphql").DocumentNode, variables?: Record<string, unknown> | undefined) => QueryApiInvocations; | ||
export declare const parseQuery: (uri: Uri, doc: import("graphql").DocumentNode, variables?: Record<string, unknown> | undefined) => QueryApiInvocations<Uri>; | ||
export declare const extractSelections: (node: SelectionSetNode) => Record<string, unknown>; |
@@ -6,2 +6,3 @@ "use strict"; | ||
function migrate(old) { | ||
delete old.repository; | ||
var module = old.mutation || old.query; | ||
@@ -8,0 +9,0 @@ if (!module) { |
@@ -17,2 +17,3 @@ "use strict"; | ||
function migrate(old) { | ||
delete old.repository; | ||
return __assign(__assign({}, old), { __type: "Web3ApiManifest", format: "0.0.1-prealpha.5" }); | ||
@@ -19,0 +20,0 @@ } |
@@ -6,2 +6,3 @@ "use strict"; | ||
function migrate(old) { | ||
delete old.repository; | ||
var language = old.language; | ||
@@ -8,0 +9,0 @@ if (!language) { |
@@ -1,2 +0,2 @@ | ||
import { Client, GetFileOptions, GetManifestOptions, InvokeApiOptions, InvokeApiResult } from "."; | ||
import { Uri, Client, GetFileOptions, GetManifestOptions, InvokeApiOptions, InvokeApiResult } from "."; | ||
import { AnyManifest, ManifestType } from "../manifest"; | ||
@@ -17,3 +17,3 @@ /** | ||
*/ | ||
abstract invoke(options: InvokeApiOptions, client: Client): Promise<InvokeApiResult<unknown>>; | ||
abstract invoke(options: InvokeApiOptions<Uri>, client: Client): Promise<InvokeApiResult<unknown>>; | ||
/** | ||
@@ -20,0 +20,0 @@ * Get the API's schema |
@@ -1,2 +0,2 @@ | ||
import { QueryHandler, InvokeHandler, Uri } from "./"; | ||
import { QueryHandler, InvokeHandler, SubscriptionHandler, Uri } from "./"; | ||
import { ManifestType, AnyManifest } from "../manifest"; | ||
@@ -13,3 +13,3 @@ export interface GetManifestOptions<TManifestType extends ManifestType> { | ||
} | ||
export interface Client extends QueryHandler, InvokeHandler { | ||
export interface Client extends QueryHandler, SubscriptionHandler, InvokeHandler { | ||
getSchema<TUri extends Uri | string>(uri: TUri): Promise<string>; | ||
@@ -16,0 +16,0 @@ getManifest<TUri extends Uri | string, TManifestType extends ManifestType>(uri: TUri, options: GetManifestOptions<TManifestType>): Promise<AnyManifest<TManifestType>>; |
export * from "./Api"; | ||
export * from "./Client"; | ||
export * from "./Invoke"; | ||
export * from "./MaybeAsync"; | ||
export * from "./Plugin"; | ||
export * from "./Query"; | ||
export * from "./Invoke"; | ||
export * from "./Subscription"; | ||
export * from "./Uri"; | ||
@@ -8,0 +9,0 @@ export * from "./UriRedirect"; |
@@ -15,6 +15,7 @@ "use strict"; | ||
__exportStar(require("./Client"), exports); | ||
__exportStar(require("./Invoke"), exports); | ||
__exportStar(require("./MaybeAsync"), exports); | ||
__exportStar(require("./Plugin"), exports); | ||
__exportStar(require("./Query"), exports); | ||
__exportStar(require("./Invoke"), exports); | ||
__exportStar(require("./Subscription"), exports); | ||
__exportStar(require("./Uri"), exports); | ||
@@ -21,0 +22,0 @@ __exportStar(require("./UriRedirect"), exports); |
import { Uri } from "."; | ||
export declare type InvokableModules = "query" | "mutation"; | ||
/** Options required for an API invocation. */ | ||
export interface InvokeApiOptions<TUri = Uri> { | ||
export interface InvokeApiOptions<TUri extends Uri | string = string> { | ||
/** The API's URI */ | ||
@@ -6,0 +6,0 @@ uri: TUri; |
@@ -42,4 +42,4 @@ import { Uri, InvokeApiOptions } from "./"; | ||
} | ||
export interface QueryApiInvocations { | ||
[methodOrAlias: string]: InvokeApiOptions; | ||
export interface QueryApiInvocations<TUri extends Uri | string = string> { | ||
[methodOrAlias: string]: InvokeApiOptions<TUri>; | ||
} | ||
@@ -46,0 +46,0 @@ /** A type that can parse & execute a given query */ |
{ | ||
"name": "@web3api/core-js", | ||
"description": "Web3API Javascript Core", | ||
"version": "0.0.1-prealpha.42", | ||
"version": "0.0.1-prealpha.43", | ||
"license": "MIT", | ||
@@ -23,4 +23,4 @@ "repository": { | ||
"dependencies": { | ||
"@web3api/manifest-schemas": "0.0.1-prealpha.42", | ||
"@web3api/tracing-js": "0.0.1-prealpha.42", | ||
"@web3api/manifest-schemas": "0.0.1-prealpha.43", | ||
"@web3api/tracing-js": "0.0.1-prealpha.43", | ||
"graphql": "15.5.0", | ||
@@ -35,3 +35,3 @@ "graphql-tag": "2.10.4", | ||
"@types/semver": "7.3.8", | ||
"@web3api/os-js": "0.0.1-prealpha.42", | ||
"@web3api/os-js": "0.0.1-prealpha.43", | ||
"jest": "26.6.3", | ||
@@ -45,3 +45,3 @@ "json-schema-to-typescript": "10.1.3", | ||
}, | ||
"gitHead": "8d0721b439a1b80bbcc123cf682f9af1d0d2f456", | ||
"gitHead": "6e4d0c334b22f9986c8f90789400e0ba97b3a77f", | ||
"publishConfig": { | ||
@@ -48,0 +48,0 @@ "access": "public" |
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
160354
180
2568
+ Added@web3api/tracing-js@0.0.1-prealpha.43(transitive)
+ Addedbrowser-util-inspect@0.2.0(transitive)
- Removed@web3api/tracing-js@0.0.1-prealpha.42(transitive)
- Removedarray-map@0.0.0(transitive)
- Removedarray-reduce@0.0.0(transitive)
- Removedforeach@2.0.4(transitive)
- Removedindexof@0.0.1(transitive)
- Removedisarray@0.0.1(transitive)
- Removedjson3@3.3.0(transitive)
- Removedobject-keys@0.5.0(transitive)
- Removedutil-inspect@0.1.8(transitive)