@firebolt-js/openrpc
Advanced tools
Comparing version 1.6.0-beta.0 to 1.6.0-beta.1
@@ -20,2 +20,147 @@ { | ||
{ | ||
"name": "simple.method", | ||
"summary": "A method.", | ||
"description": "A method for testing basic method generation.", | ||
"params": [ | ||
{ | ||
"name": "parameter", | ||
"required": true, | ||
"schema": { | ||
"type": "boolean" | ||
}, | ||
"summary": "A test parameter." | ||
} | ||
], | ||
"result": { | ||
"name": "result", | ||
"summary": "A result for testing basic method generation.", | ||
"schema": { | ||
"type": "object", | ||
"required": [ | ||
"foo" | ||
], | ||
"properties": { | ||
"foo": { | ||
"type": "string", | ||
"description": "A required field in the result." | ||
}, | ||
"bar": { | ||
"type": "number", | ||
"description": "An optional field in the result." | ||
} | ||
}, | ||
"additionalProperties": false | ||
} | ||
}, | ||
"examples": [ | ||
{ | ||
"name": "Default Example", | ||
"params": [ | ||
{ | ||
"name": "parameter", | ||
"value": true | ||
} | ||
], | ||
"result": { | ||
"name": "Default Result", | ||
"value": { | ||
"foo": "here's foo" | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "simple.methodWithMarkdownDescription", | ||
"summary": "A method that pulls it's description from an external markdown file.", | ||
"description": "Method descriptpion.\n\nThis came from an external markdown file.\n\n| Here | is | a | Table |\n|------|----|---|-------|\n| 1 | 2 | 3 | 4 |\n", | ||
"params": [ | ||
{ | ||
"name": "parameter", | ||
"required": true, | ||
"schema": { | ||
"type": "boolean" | ||
}, | ||
"summary": "A test parameter." | ||
} | ||
], | ||
"result": { | ||
"name": "result", | ||
"summary": "A result for testing basic method generation.", | ||
"schema": { | ||
"type": "object", | ||
"required": [ | ||
"foo" | ||
], | ||
"properties": { | ||
"foo": { | ||
"type": "string", | ||
"description": "A required field in the result." | ||
}, | ||
"bar": { | ||
"type": "number", | ||
"description": "An optional field in the result." | ||
} | ||
}, | ||
"additionalProperties": false | ||
} | ||
}, | ||
"examples": [ | ||
{ | ||
"name": "Default Example", | ||
"params": [ | ||
{ | ||
"name": "parameter", | ||
"value": true | ||
} | ||
], | ||
"result": { | ||
"name": "Default Result", | ||
"value": { | ||
"foo": "here's foo" | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "simple.methodWithSchema", | ||
"summary": "A method using a schema.", | ||
"description": "A method for testing schema-dependent method generation.", | ||
"params": [ | ||
{ | ||
"name": "title", | ||
"required": true, | ||
"schema": { | ||
"$ref": "#/components/schemas/LocalizedString" | ||
}, | ||
"summary": "A localized string test parameter." | ||
} | ||
], | ||
"result": { | ||
"name": "result", | ||
"summary": "A result for testing basic method generation.", | ||
"schema": { | ||
"$ref": "#/components/schemas/LocalizedString" | ||
} | ||
}, | ||
"examples": [ | ||
{ | ||
"name": "Default Example", | ||
"params": [ | ||
{ | ||
"name": "parameter", | ||
"value": true | ||
} | ||
], | ||
"result": { | ||
"name": "Default Result", | ||
"value": { | ||
"foo": "here's foo" | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "provider.onRequestSimpleMethod", | ||
@@ -32,3 +177,3 @@ "tags": [ | ||
{ | ||
"name": "events" | ||
"name": "event" | ||
} | ||
@@ -82,3 +227,3 @@ ], | ||
{ | ||
"name": "events" | ||
"name": "event" | ||
} | ||
@@ -132,3 +277,3 @@ ], | ||
{ | ||
"name": "events" | ||
"name": "event" | ||
} | ||
@@ -182,3 +327,3 @@ ], | ||
{ | ||
"name": "events" | ||
"name": "event" | ||
} | ||
@@ -229,3 +374,3 @@ ], | ||
{ | ||
"name": "events" | ||
"name": "event" | ||
} | ||
@@ -492,151 +637,28 @@ ], | ||
] | ||
}, | ||
{ | ||
"name": "simple.method", | ||
"summary": "A method.", | ||
"description": "A method for testing basic method generation.", | ||
"params": [ | ||
{ | ||
"name": "parameter", | ||
"required": true, | ||
"schema": { | ||
"type": "boolean" | ||
} | ||
], | ||
"components": { | ||
"schemas": { | ||
"LocalizedString": { | ||
"title": "LocalizedString", | ||
"description": "Localized string supports either a simple `string` or a Map<string, string> of language codes to strings. When using a simple `string`, the current preferred langauge from `Localization.langauge()` is assumed.", | ||
"oneOf": [ | ||
{ | ||
"type": "string" | ||
}, | ||
"summary": "A test parameter." | ||
} | ||
], | ||
"result": { | ||
"name": "result", | ||
"summary": "A result for testing basic method generation.", | ||
"schema": { | ||
"type": "object", | ||
"required": [ | ||
"foo" | ||
], | ||
"properties": { | ||
"foo": { | ||
"type": "string", | ||
"description": "A required field in the result." | ||
}, | ||
"bar": { | ||
"type": "number", | ||
"description": "An optional field in the result." | ||
{ | ||
"type": "object", | ||
"additionalProperties": { | ||
"type": "string" | ||
} | ||
}, | ||
"additionalProperties": false | ||
} | ||
}, | ||
"examples": [ | ||
{ | ||
"name": "Default Example", | ||
"params": [ | ||
{ | ||
"name": "parameter", | ||
"value": true | ||
} | ||
], | ||
"result": { | ||
"name": "Default Result", | ||
"value": { | ||
"foo": "here's foo" | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "simple.methodWithMarkdownDescription", | ||
"summary": "A method that pulls it's description from an external markdown file.", | ||
"description": "Method descriptpion.\n\nThis came from an external markdown file.\n\n| Here | is | a | Table |\n|------|----|---|-------|\n| 1 | 2 | 3 | 4 |\n", | ||
"params": [ | ||
{ | ||
"name": "parameter", | ||
"required": true, | ||
"schema": { | ||
"type": "boolean" | ||
}, | ||
"summary": "A test parameter." | ||
} | ||
], | ||
"result": { | ||
"name": "result", | ||
"summary": "A result for testing basic method generation.", | ||
"schema": { | ||
"type": "object", | ||
"required": [ | ||
"foo" | ||
], | ||
"properties": { | ||
"foo": { | ||
"type": "string", | ||
"description": "A required field in the result." | ||
}, | ||
"bar": { | ||
"type": "number", | ||
"description": "An optional field in the result." | ||
} | ||
}, | ||
"additionalProperties": false | ||
} | ||
}, | ||
"examples": [ | ||
{ | ||
"name": "Default Example", | ||
"params": [ | ||
{ | ||
"name": "parameter", | ||
"value": true | ||
} | ||
], | ||
"result": { | ||
"name": "Default Result", | ||
"value": { | ||
"foo": "here's foo" | ||
} | ||
], | ||
"examples": [ | ||
"A simple string, with no language code", | ||
{ | ||
"en": "This is english", | ||
"es": "esto es español" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "simple.methodWithSchema", | ||
"summary": "A method using a schema.", | ||
"description": "A method for testing schema-dependent method generation.", | ||
"params": [ | ||
{ | ||
"name": "title", | ||
"required": true, | ||
"schema": { | ||
"$ref": "#/components/schemas/LocalizedString" | ||
}, | ||
"summary": "A localized string test parameter." | ||
} | ||
], | ||
"result": { | ||
"name": "result", | ||
"summary": "A result for testing basic method generation.", | ||
"schema": { | ||
"$ref": "#/components/schemas/LocalizedString" | ||
} | ||
] | ||
}, | ||
"examples": [ | ||
{ | ||
"name": "Default Example", | ||
"params": [ | ||
{ | ||
"name": "parameter", | ||
"value": true | ||
} | ||
], | ||
"result": { | ||
"name": "Default Result", | ||
"value": { | ||
"foo": "here's foo" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
], | ||
"components": { | ||
"schemas": { | ||
"SimpleProviderRequest": { | ||
@@ -741,24 +763,2 @@ "title": "SimpleProviderRequest", | ||
} | ||
}, | ||
"LocalizedString": { | ||
"title": "LocalizedString", | ||
"description": "Localized string supports either a simple `string` or a Map<string, string> of language codes to strings. When using a simple `string`, the current preferred langauge from `Localization.langauge()` is assumed.", | ||
"oneOf": [ | ||
{ | ||
"type": "string" | ||
}, | ||
{ | ||
"type": "object", | ||
"additionalProperties": { | ||
"type": "string" | ||
} | ||
} | ||
], | ||
"examples": [ | ||
"A simple string, with no language code", | ||
{ | ||
"en": "This is english", | ||
"es": "esto es español" | ||
} | ||
] | ||
} | ||
@@ -765,0 +765,0 @@ } |
{ | ||
"name": "@firebolt-js/openrpc", | ||
"version": "1.6.0-beta.0", | ||
"version": "1.6.0-beta.1", | ||
"description": "The Firebolt SDK Code & Doc Generator", | ||
@@ -49,2 +49,3 @@ "main": "src/js/sdk/index.mjs", | ||
"mkdirp": "^0.5.6", | ||
"node-fetch": "^3.2.10", | ||
"nopt": "^5.0.0", | ||
@@ -51,0 +52,0 @@ "util": "^0.12.4" |
@@ -18,6 +18,2 @@ { | ||
"type": "object", | ||
"propertyNames": { | ||
"type": "string", | ||
"enum": ["title", "description", "version"] | ||
}, | ||
"additionalProperties": true | ||
@@ -107,3 +103,3 @@ }, | ||
"items": { | ||
"oneOf": [ | ||
"anyOf": [ | ||
{ | ||
@@ -148,3 +144,3 @@ "$ref": "#/definitions/CapabilitiesTag" | ||
{ | ||
"oneOf": [ | ||
"anyOf": [ | ||
{ | ||
@@ -216,4 +212,2 @@ "$ref": "#/definitions/PropertyMethod" | ||
"type": "array", | ||
"minItems": 1, | ||
"maxItems": 1, | ||
"items": { | ||
@@ -255,11 +249,2 @@ "type": "object" | ||
"type": "array", | ||
"minItems": 1, | ||
"maxItems": 1, | ||
"items": { | ||
"type": "object", | ||
"maxProperties": 1 | ||
} | ||
}, | ||
{ | ||
"type": "array", | ||
"contains": { | ||
@@ -283,7 +268,2 @@ "$ref": "#/definitions/EventTag" | ||
"type": "array", | ||
"minItems": 1, | ||
"maxItems": 1 | ||
}, | ||
{ | ||
"type": "array", | ||
"contains": { | ||
@@ -353,4 +333,2 @@ "$ref": "#/definitions/CapabilitiesTag" | ||
"type": "array", | ||
"minItems": 1, | ||
"maxItems": 2, | ||
"items": { | ||
@@ -377,4 +355,2 @@ "type": "object" | ||
"type": "array", | ||
"minItems": 1, | ||
"maxItems": 1, | ||
"items": { | ||
@@ -401,4 +377,2 @@ "type": "object" | ||
"type": "array", | ||
"minItems": 1, | ||
"maxItems": 1, | ||
"items": { | ||
@@ -425,4 +399,2 @@ "type": "object" | ||
"type": "array", | ||
"minItems": 1, | ||
"maxItems": 1, | ||
"items": { | ||
@@ -449,4 +421,2 @@ "type": "object" | ||
"type": "array", | ||
"minItems": 1, | ||
"maxItems": 1, | ||
"items": { | ||
@@ -476,17 +446,3 @@ "type": "object" | ||
"propertyNames": { | ||
"type": "string", | ||
"enum": [ | ||
"name", | ||
"x-provides", | ||
"x-allow-focus", | ||
"x-allow-focus-for", | ||
"x-response", | ||
"x-response-for", | ||
"x-alternative", | ||
"x-since", | ||
"x-pulls-for", | ||
"x-setter-for", | ||
"x-manages", | ||
"x-uses" | ||
] | ||
"type": "string" | ||
} | ||
@@ -518,3 +474,3 @@ }, | ||
] | ||
}, | ||
}, | ||
"DeprecatedTag": { | ||
@@ -521,0 +477,0 @@ "allOf": [ |
@@ -19,3 +19,2 @@ /* | ||
import Transport from '../Transport/index.mjs' | ||
/* ${IMPORTS} */ | ||
@@ -22,0 +21,0 @@ |
@@ -9,3 +9,3 @@ ### ${method.name} | ||
```typescript | ||
${info.title}.${method.name}(event: string, (data: any) => void): Promise<bigint> | ||
${info.title}.${method.name}(event: string, (data: any) => void): Promise<number> | ||
``` | ||
@@ -26,3 +26,3 @@ | ||
|------|-------------| | ||
| `bigint` | Listener ID to clear the callback method and stop receiving the event, e.g. `${info.title}.clear(id)` | | ||
| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `${info.title}.clear(id)` | | ||
@@ -40,3 +40,3 @@ Callback parameters: | ||
```typescript | ||
${info.title}.${method.name}((event: string, data: any) => void): Promise<bigint> | ||
${info.title}.${method.name}((event: string, data: any) => void): Promise<number> | ||
``` | ||
@@ -65,3 +65,3 @@ | ||
|------|-------------| | ||
| `bigint` | Listener ID to clear the callback method and stop receiving the event, e.g. `${info.title}.clear(id)` | | ||
| `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `${info.title}.clear(id)` | | ||
@@ -68,0 +68,0 @@ See [Listening for events](../../docs/listening-for-events/) for more information and examples. |
@@ -45,3 +45,3 @@ ### ${provider} | ||
"id": ${provider.interface.i}, | ||
"method": "onRequest${provider.interface.Name}", | ||
"method": "${jsonrpc.module}.onRequest${provider.interface.Name}", | ||
"params": { | ||
@@ -92,5 +92,5 @@ "listen": true | ||
"id": ${provider.interface.j}, | ||
"method": "${provider.interface.name}Response", | ||
"method": "${jsonrpc.module}.${provider.interface.name}Response", | ||
"params": { | ||
"response": { | ||
"result": { | ||
"correlationId": ${provider.interface.example.correlationId}, | ||
@@ -97,0 +97,0 @@ "result": ${provider.interface.example.result} |
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
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
Network access
Supply chain riskThis module accesses the network.
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
349616
83
8484
11
3
+ Addednode-fetch@^3.2.10
+ Addeddata-uri-to-buffer@4.0.1(transitive)
+ Addedfetch-blob@3.2.0(transitive)
+ Addedformdata-polyfill@4.0.10(transitive)
+ Addednode-domexception@1.0.0(transitive)
+ Addednode-fetch@3.3.2(transitive)
+ Addedweb-streams-polyfill@3.3.3(transitive)