@xyo-network/id-payload-plugin 5.3.25 → 5.3.26
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 +227 -10
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -1,23 +1,240 @@
|
|
|
1
|
+
[![logo][]](https://xyo.network)
|
|
2
|
+
|
|
1
3
|
# @xyo-network/id-payload-plugin
|
|
2
4
|
|
|
3
|
-
[![
|
|
5
|
+
[![npm][npm-badge]][npm-link]
|
|
6
|
+
[![license][license-badge]][license-link]
|
|
7
|
+
|
|
8
|
+
> Typescript/Javascript Plugins for XYO Platform
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
Using npm:
|
|
4
13
|
|
|
5
|
-
|
|
14
|
+
```sh
|
|
15
|
+
npm install {{name}}
|
|
16
|
+
```
|
|
6
17
|
|
|
7
|
-
|
|
18
|
+
Using yarn:
|
|
8
19
|
|
|
9
|
-
|
|
20
|
+
```sh
|
|
21
|
+
yarn add {{name}}
|
|
22
|
+
```
|
|
10
23
|
|
|
11
|
-
|
|
24
|
+
Using pnpm:
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
pnpm add {{name}}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Using bun:
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
bun add {{name}}
|
|
34
|
+
```
|
|
12
35
|
|
|
13
|
-
Part of [sdk-xyo-client-js](https://www.npmjs.com/package/@xyo-network/sdk-xyo-client-js)
|
|
14
36
|
|
|
15
37
|
## License
|
|
16
38
|
|
|
17
|
-
|
|
39
|
+
See the [LICENSE](LICENSE) file for license rights and limitations (LGPL-3.0-only).
|
|
40
|
+
|
|
41
|
+
## Reference
|
|
42
|
+
|
|
43
|
+
### packages
|
|
44
|
+
|
|
45
|
+
### core-payload-plugins
|
|
46
|
+
|
|
47
|
+
### packages
|
|
48
|
+
|
|
49
|
+
### id
|
|
50
|
+
|
|
51
|
+
### .temp-typedoc
|
|
52
|
+
|
|
53
|
+
### functions
|
|
54
|
+
|
|
55
|
+
### <a id="IdPayloadPlugin"></a>IdPayloadPlugin
|
|
56
|
+
|
|
57
|
+
[**@xyo-network/id-payload-plugin**](#../README)
|
|
58
|
+
|
|
59
|
+
***
|
|
60
|
+
|
|
61
|
+
```ts
|
|
62
|
+
function IdPayloadPlugin(): PayloadPlugin<Id>;
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Returns
|
|
66
|
+
|
|
67
|
+
`PayloadPlugin`\<[`Id`](#../type-aliases/Id)\>
|
|
68
|
+
|
|
69
|
+
### <a id="idPayloadTemplate"></a>idPayloadTemplate
|
|
70
|
+
|
|
71
|
+
[**@xyo-network/id-payload-plugin**](#../README)
|
|
72
|
+
|
|
73
|
+
***
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
function idPayloadTemplate(): Id;
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Returns
|
|
80
|
+
|
|
81
|
+
[`Id`](#../type-aliases/Id)
|
|
82
|
+
|
|
83
|
+
### type-aliases
|
|
84
|
+
|
|
85
|
+
### <a id="Id"></a>Id
|
|
86
|
+
|
|
87
|
+
[**@xyo-network/id-payload-plugin**](#../README)
|
|
88
|
+
|
|
89
|
+
***
|
|
90
|
+
|
|
91
|
+
```ts
|
|
92
|
+
type Id = Payload<IdFields, IdSchema>;
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
The ID Payload
|
|
96
|
+
|
|
97
|
+
### <a id="IdFields"></a>IdFields
|
|
98
|
+
|
|
99
|
+
[**@xyo-network/id-payload-plugin**](#../README)
|
|
100
|
+
|
|
101
|
+
***
|
|
102
|
+
|
|
103
|
+
```ts
|
|
104
|
+
type IdFields = object;
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
The fields of an ID Payload
|
|
108
|
+
|
|
109
|
+
## Properties
|
|
110
|
+
|
|
111
|
+
### salt
|
|
112
|
+
|
|
113
|
+
```ts
|
|
114
|
+
salt: string;
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### <a id="IdPayload"></a>IdPayload
|
|
118
|
+
|
|
119
|
+
[**@xyo-network/id-payload-plugin**](#../README)
|
|
120
|
+
|
|
121
|
+
***
|
|
122
|
+
|
|
123
|
+
```ts
|
|
124
|
+
type IdPayload = Id;
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## Deprecated
|
|
128
|
+
|
|
129
|
+
Use `Id` instead
|
|
130
|
+
|
|
131
|
+
### <a id="IdSchema"></a>IdSchema
|
|
132
|
+
|
|
133
|
+
[**@xyo-network/id-payload-plugin**](#../README)
|
|
134
|
+
|
|
135
|
+
***
|
|
136
|
+
|
|
137
|
+
```ts
|
|
138
|
+
type IdSchema = typeof IdSchema;
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### variables
|
|
142
|
+
|
|
143
|
+
### <a id="IdSchema"></a>IdSchema
|
|
144
|
+
|
|
145
|
+
[**@xyo-network/id-payload-plugin**](#../README)
|
|
146
|
+
|
|
147
|
+
***
|
|
148
|
+
|
|
149
|
+
```ts
|
|
150
|
+
const IdSchema: "network.xyo.id" & object;
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Type Declaration
|
|
154
|
+
|
|
155
|
+
### \_\_schema
|
|
156
|
+
|
|
157
|
+
```ts
|
|
158
|
+
readonly __schema: true;
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### <a id="asId"></a>asId
|
|
162
|
+
|
|
163
|
+
[**@xyo-network/id-payload-plugin**](#../README)
|
|
164
|
+
|
|
165
|
+
***
|
|
166
|
+
|
|
167
|
+
```ts
|
|
168
|
+
const asId: AsTypeFunction<Id>;
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### <a id="asOptionalId"></a>asOptionalId
|
|
172
|
+
|
|
173
|
+
[**@xyo-network/id-payload-plugin**](#../README)
|
|
174
|
+
|
|
175
|
+
***
|
|
176
|
+
|
|
177
|
+
```ts
|
|
178
|
+
const asOptionalId: (value) => Id | undefined;
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## Parameters
|
|
182
|
+
|
|
183
|
+
### value
|
|
184
|
+
|
|
185
|
+
`AnyNonPromise`
|
|
186
|
+
|
|
187
|
+
## Returns
|
|
188
|
+
|
|
189
|
+
[`Id`](#../type-aliases/Id) \| `undefined`
|
|
190
|
+
|
|
191
|
+
### <a id="isId"></a>isId
|
|
192
|
+
|
|
193
|
+
[**@xyo-network/id-payload-plugin**](#../README)
|
|
194
|
+
|
|
195
|
+
***
|
|
196
|
+
|
|
197
|
+
```ts
|
|
198
|
+
const isId: (x?) => x is Id;
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
Identity helper for ID Payload
|
|
202
|
+
|
|
203
|
+
## Parameters
|
|
204
|
+
|
|
205
|
+
### x?
|
|
206
|
+
|
|
207
|
+
`unknown`
|
|
208
|
+
|
|
209
|
+
## Returns
|
|
210
|
+
|
|
211
|
+
`x is Id`
|
|
212
|
+
|
|
213
|
+
### <a id="isIdWithSources"></a>isIdWithSources
|
|
214
|
+
|
|
215
|
+
[**@xyo-network/id-payload-plugin**](#../README)
|
|
216
|
+
|
|
217
|
+
***
|
|
218
|
+
|
|
219
|
+
```ts
|
|
220
|
+
const isIdWithSources: (x?) => x is WithSources<WithSources<Id>>;
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
Identity helper for ID Payload with sources
|
|
224
|
+
|
|
225
|
+
## Parameters
|
|
226
|
+
|
|
227
|
+
### x?
|
|
228
|
+
|
|
229
|
+
`unknown`
|
|
230
|
+
|
|
231
|
+
## Returns
|
|
18
232
|
|
|
19
|
-
|
|
233
|
+
`x is WithSources<WithSources<Id>>`
|
|
20
234
|
|
|
21
|
-
[Made with 🔥 and ❄️ by XYO](https://xyo.network)
|
|
22
235
|
|
|
23
|
-
[logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
|
|
236
|
+
[logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
|
|
237
|
+
[npm-badge]: https://img.shields.io/npm/v/@xyo-network/id-payload-plugin.svg
|
|
238
|
+
[npm-link]: https://www.npmjs.com/package/@xyo-network/id-payload-plugin
|
|
239
|
+
[license-badge]: https://img.shields.io/npm/l/@xyo-network/id-payload-plugin.svg
|
|
240
|
+
[license-link]: https://github.com/xylabs/sdk-js/blob/main/LICENSE
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/id-payload-plugin",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.26",
|
|
4
4
|
"description": "Typescript/Javascript Plugins for XYO Platform",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"exports": {
|
|
23
23
|
".": {
|
|
24
24
|
"types": "./dist/neutral/index.d.ts",
|
|
25
|
+
"import": "./dist/neutral/index.mjs",
|
|
25
26
|
"default": "./dist/neutral/index.mjs"
|
|
26
27
|
},
|
|
27
28
|
"./package.json": "./package.json"
|
|
28
29
|
},
|
|
29
|
-
"module": "dist/neutral/index.mjs",
|
|
30
30
|
"types": "dist/neutral/index.d.ts",
|
|
31
31
|
"files": [
|
|
32
32
|
"dist",
|
|
@@ -36,17 +36,17 @@
|
|
|
36
36
|
"README.md"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@xyo-network/payload-model": "~5.3.
|
|
40
|
-
"@xyo-network/payload-plugin": "~5.3.
|
|
39
|
+
"@xyo-network/payload-model": "~5.3.26",
|
|
40
|
+
"@xyo-network/payload-plugin": "~5.3.26"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@opentelemetry/api": "^1.9.1",
|
|
44
|
-
"@types/node": "^25.5.
|
|
45
|
-
"@xylabs/sdk-js": "^5.0.
|
|
46
|
-
"@xylabs/ts-scripts-common": "~7.
|
|
47
|
-
"@xylabs/ts-scripts-pnpm": "~7.
|
|
48
|
-
"@xylabs/tsconfig": "~7.
|
|
49
|
-
"@xylabs/vitest-extended": "~5.0.
|
|
44
|
+
"@types/node": "^25.5.2",
|
|
45
|
+
"@xylabs/sdk-js": "^5.0.94",
|
|
46
|
+
"@xylabs/ts-scripts-common": "~7.7.5",
|
|
47
|
+
"@xylabs/ts-scripts-pnpm": "~7.7.5",
|
|
48
|
+
"@xylabs/tsconfig": "~7.7.5",
|
|
49
|
+
"@xylabs/vitest-extended": "~5.0.94",
|
|
50
50
|
"acorn": "^8.16.0",
|
|
51
51
|
"axios": "^1.14.0",
|
|
52
52
|
"esbuild": "^0.28.0",
|