@pellux/goodvibes-contracts 0.34.2 → 0.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -1
- package/artifacts/operator-contract.json +4 -1
- package/dist/generated/foundation-metadata.d.ts +1 -1
- package/dist/generated/foundation-metadata.js +1 -1
- package/dist/generated/operator-contract.d.ts.map +1 -1
- package/dist/generated/operator-contract.js +4 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -36,8 +36,53 @@ const loginMethod = getOperatorMethod('control.auth.login');
|
|
|
36
36
|
type LoginOutput = OperatorMethodOutput<'control.auth.login'>;
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
+
Peer example:
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
import {
|
|
43
|
+
getPeerContract,
|
|
44
|
+
getPeerEndpoint,
|
|
45
|
+
listPeerEndpoints,
|
|
46
|
+
} from '@pellux/goodvibes-sdk/contracts';
|
|
47
|
+
|
|
48
|
+
const peerContract = getPeerContract();
|
|
49
|
+
const pairEndpoint = getPeerEndpoint('pair.request');
|
|
50
|
+
const allEndpoints = listPeerEndpoints();
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Lookup and guard helpers:
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
import {
|
|
57
|
+
listOperatorMethods,
|
|
58
|
+
isOperatorMethodId,
|
|
59
|
+
isPeerEndpointId,
|
|
60
|
+
RUNTIME_EVENT_DOMAINS,
|
|
61
|
+
isRuntimeEventDomain,
|
|
62
|
+
} from '@pellux/goodvibes-sdk/contracts';
|
|
63
|
+
|
|
64
|
+
listOperatorMethods(); // readonly OperatorMethodContract[]
|
|
65
|
+
isOperatorMethodId('control.auth.login'); // true
|
|
66
|
+
isPeerEndpointId('pair.request'); // true
|
|
67
|
+
RUNTIME_EVENT_DOMAINS.forEach((domain) => isRuntimeEventDomain(domain));
|
|
68
|
+
```
|
|
69
|
+
|
|
39
70
|
Node-only artifact path helpers:
|
|
40
71
|
|
|
41
72
|
```ts
|
|
42
|
-
import {
|
|
73
|
+
import {
|
|
74
|
+
getOperatorContractPath,
|
|
75
|
+
getPeerContractPath,
|
|
76
|
+
} from '@pellux/goodvibes-sdk/contracts/node';
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
When installing this package directly instead of the SDK facade, import from
|
|
80
|
+
`@pellux/goodvibes-contracts` and `@pellux/goodvibes-contracts/node`:
|
|
81
|
+
|
|
82
|
+
```ts
|
|
83
|
+
import { getOperatorContract, getPeerContract } from '@pellux/goodvibes-contracts';
|
|
84
|
+
import { getOperatorContractPath, getPeerContractPath } from '@pellux/goodvibes-contracts/node';
|
|
43
85
|
```
|
|
86
|
+
|
|
87
|
+
See the [zod-schemas README](./src/zod-schemas/README.md) for the runtime Zod
|
|
88
|
+
schema exports re-exported from this package root.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"product": {
|
|
4
4
|
"id": "goodvibes",
|
|
5
5
|
"surface": "operator",
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.36.0"
|
|
7
7
|
},
|
|
8
8
|
"auth": {
|
|
9
9
|
"modes": [
|
|
@@ -19080,6 +19080,7 @@
|
|
|
19080
19080
|
],
|
|
19081
19081
|
"additionalProperties": false
|
|
19082
19082
|
},
|
|
19083
|
+
"dangerous": true,
|
|
19083
19084
|
"invokable": true
|
|
19084
19085
|
},
|
|
19085
19086
|
{
|
|
@@ -20213,6 +20214,7 @@
|
|
|
20213
20214
|
],
|
|
20214
20215
|
"additionalProperties": false
|
|
20215
20216
|
},
|
|
20217
|
+
"dangerous": true,
|
|
20216
20218
|
"invokable": true
|
|
20217
20219
|
},
|
|
20218
20220
|
{
|
|
@@ -25383,6 +25385,7 @@
|
|
|
25383
25385
|
],
|
|
25384
25386
|
"additionalProperties": false
|
|
25385
25387
|
},
|
|
25388
|
+
"dangerous": true,
|
|
25386
25389
|
"invokable": true
|
|
25387
25390
|
},
|
|
25388
25391
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operator-contract.d.ts","sourceRoot":"","sources":["../../src/generated/operator-contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAE5D,eAAO,MAAM,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"operator-contract.d.ts","sourceRoot":"","sources":["../../src/generated/operator-contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAE5D,eAAO,MAAM,iBAAiB,EAAE,wBA6t1EtB,CAAC"}
|
|
@@ -3,7 +3,7 @@ export const OPERATOR_CONTRACT = {
|
|
|
3
3
|
"product": {
|
|
4
4
|
"id": "goodvibes",
|
|
5
5
|
"surface": "operator",
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.36.0"
|
|
7
7
|
},
|
|
8
8
|
"auth": {
|
|
9
9
|
"modes": [
|
|
@@ -19080,6 +19080,7 @@ export const OPERATOR_CONTRACT = {
|
|
|
19080
19080
|
],
|
|
19081
19081
|
"additionalProperties": false
|
|
19082
19082
|
},
|
|
19083
|
+
"dangerous": true,
|
|
19083
19084
|
"invokable": true
|
|
19084
19085
|
},
|
|
19085
19086
|
{
|
|
@@ -20213,6 +20214,7 @@ export const OPERATOR_CONTRACT = {
|
|
|
20213
20214
|
],
|
|
20214
20215
|
"additionalProperties": false
|
|
20215
20216
|
},
|
|
20217
|
+
"dangerous": true,
|
|
20216
20218
|
"invokable": true
|
|
20217
20219
|
},
|
|
20218
20220
|
{
|
|
@@ -25383,6 +25385,7 @@ export const OPERATOR_CONTRACT = {
|
|
|
25383
25385
|
],
|
|
25384
25386
|
"additionalProperties": false
|
|
25385
25387
|
},
|
|
25388
|
+
"dangerous": true,
|
|
25386
25389
|
"invokable": true
|
|
25387
25390
|
},
|
|
25388
25391
|
{
|