@xyo-network/id-payload-plugin 2.94.8 → 2.94.10
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/dist/browser/Payload.d.cts +22 -1
- package/dist/browser/Payload.d.cts.map +1 -1
- package/dist/browser/Payload.d.mts +22 -1
- package/dist/browser/Payload.d.mts.map +1 -1
- package/dist/browser/Payload.d.ts +22 -1
- package/dist/browser/Payload.d.ts.map +1 -1
- package/dist/browser/index.cjs +14 -3
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.js +14 -3
- package/dist/browser/index.js.map +1 -1
- package/dist/node/Payload.d.cts +22 -1
- package/dist/node/Payload.d.cts.map +1 -1
- package/dist/node/Payload.d.mts +22 -1
- package/dist/node/Payload.d.mts.map +1 -1
- package/dist/node/Payload.d.ts +22 -1
- package/dist/node/Payload.d.ts.map +1 -1
- package/dist/node/index.cjs +18 -4
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.js +14 -3
- package/dist/node/index.js.map +1 -1
- package/package.json +3 -3
- package/src/Payload.ts +21 -1
|
@@ -1,7 +1,28 @@
|
|
|
1
|
-
import { Payload } from '@xyo-network/payload-model';
|
|
1
|
+
import { Payload, WithMeta, WithSources } from '@xyo-network/payload-model';
|
|
2
2
|
import { IdSchema } from './Schema';
|
|
3
3
|
export type IdPayload = Payload<{
|
|
4
4
|
salt: string;
|
|
5
5
|
schema: IdSchema;
|
|
6
6
|
}>;
|
|
7
|
+
/**
|
|
8
|
+
* Identity helper for ID Payload
|
|
9
|
+
*/
|
|
10
|
+
export declare const isId: (x?: unknown) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
11
|
+
salt: string;
|
|
12
|
+
schema: IdSchema;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Identity helper for ID Payload with meta
|
|
16
|
+
*/
|
|
17
|
+
export declare const isIdWithMeta: (x?: unknown) => x is WithMeta<WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
18
|
+
salt: string;
|
|
19
|
+
schema: IdSchema;
|
|
20
|
+
}>>;
|
|
21
|
+
/**
|
|
22
|
+
* Identity helper for ID Payload with sources
|
|
23
|
+
*/
|
|
24
|
+
export declare const isIdWithSources: (x?: unknown) => x is WithSources<WithSources<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
25
|
+
salt: string;
|
|
26
|
+
schema: IdSchema;
|
|
27
|
+
}>>;
|
|
7
28
|
//# sourceMappingURL=Payload.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../src/Payload.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../src/Payload.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,OAAO,EACP,QAAQ,EACR,WAAW,EACZ,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEnC,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,QAAQ,CAAA;CACjB,CAAC,CAAA;AAEF;;GAEG;AACH,eAAO,MAAM,IAAI;UAPT,MAAM;YACJ,QAAQ;CAM4C,CAAA;AAC9D;;GAEG;AACH,eAAO,MAAM,YAAY;UAXjB,MAAM;YACJ,QAAQ;GAUsE,CAAA;AACxF;;GAEG;AACH,eAAO,MAAM,eAAe;UAfpB,MAAM;YACJ,QAAQ;GAc+E,CAAA"}
|
|
@@ -1,7 +1,28 @@
|
|
|
1
|
-
import { Payload } from '@xyo-network/payload-model';
|
|
1
|
+
import { Payload, WithMeta, WithSources } from '@xyo-network/payload-model';
|
|
2
2
|
import { IdSchema } from './Schema';
|
|
3
3
|
export type IdPayload = Payload<{
|
|
4
4
|
salt: string;
|
|
5
5
|
schema: IdSchema;
|
|
6
6
|
}>;
|
|
7
|
+
/**
|
|
8
|
+
* Identity helper for ID Payload
|
|
9
|
+
*/
|
|
10
|
+
export declare const isId: (x?: unknown) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
11
|
+
salt: string;
|
|
12
|
+
schema: IdSchema;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Identity helper for ID Payload with meta
|
|
16
|
+
*/
|
|
17
|
+
export declare const isIdWithMeta: (x?: unknown) => x is WithMeta<WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
18
|
+
salt: string;
|
|
19
|
+
schema: IdSchema;
|
|
20
|
+
}>>;
|
|
21
|
+
/**
|
|
22
|
+
* Identity helper for ID Payload with sources
|
|
23
|
+
*/
|
|
24
|
+
export declare const isIdWithSources: (x?: unknown) => x is WithSources<WithSources<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
25
|
+
salt: string;
|
|
26
|
+
schema: IdSchema;
|
|
27
|
+
}>>;
|
|
7
28
|
//# sourceMappingURL=Payload.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../src/Payload.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../src/Payload.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,OAAO,EACP,QAAQ,EACR,WAAW,EACZ,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEnC,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,QAAQ,CAAA;CACjB,CAAC,CAAA;AAEF;;GAEG;AACH,eAAO,MAAM,IAAI;UAPT,MAAM;YACJ,QAAQ;CAM4C,CAAA;AAC9D;;GAEG;AACH,eAAO,MAAM,YAAY;UAXjB,MAAM;YACJ,QAAQ;GAUsE,CAAA;AACxF;;GAEG;AACH,eAAO,MAAM,eAAe;UAfpB,MAAM;YACJ,QAAQ;GAc+E,CAAA"}
|
|
@@ -1,7 +1,28 @@
|
|
|
1
|
-
import { Payload } from '@xyo-network/payload-model';
|
|
1
|
+
import { Payload, WithMeta, WithSources } from '@xyo-network/payload-model';
|
|
2
2
|
import { IdSchema } from './Schema';
|
|
3
3
|
export type IdPayload = Payload<{
|
|
4
4
|
salt: string;
|
|
5
5
|
schema: IdSchema;
|
|
6
6
|
}>;
|
|
7
|
+
/**
|
|
8
|
+
* Identity helper for ID Payload
|
|
9
|
+
*/
|
|
10
|
+
export declare const isId: (x?: unknown) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
11
|
+
salt: string;
|
|
12
|
+
schema: IdSchema;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Identity helper for ID Payload with meta
|
|
16
|
+
*/
|
|
17
|
+
export declare const isIdWithMeta: (x?: unknown) => x is WithMeta<WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
18
|
+
salt: string;
|
|
19
|
+
schema: IdSchema;
|
|
20
|
+
}>>;
|
|
21
|
+
/**
|
|
22
|
+
* Identity helper for ID Payload with sources
|
|
23
|
+
*/
|
|
24
|
+
export declare const isIdWithSources: (x?: unknown) => x is WithSources<WithSources<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
25
|
+
salt: string;
|
|
26
|
+
schema: IdSchema;
|
|
27
|
+
}>>;
|
|
7
28
|
//# sourceMappingURL=Payload.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../src/Payload.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../src/Payload.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,OAAO,EACP,QAAQ,EACR,WAAW,EACZ,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEnC,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,QAAQ,CAAA;CACjB,CAAC,CAAA;AAEF;;GAEG;AACH,eAAO,MAAM,IAAI;UAPT,MAAM;YACJ,QAAQ;CAM4C,CAAA;AAC9D;;GAEG;AACH,eAAO,MAAM,YAAY;UAXjB,MAAM;YACJ,QAAQ;GAUsE,CAAA;AACxF;;GAEG;AACH,eAAO,MAAM,eAAe;UAfpB,MAAM;YACJ,QAAQ;GAc+E,CAAA"}
|
package/dist/browser/index.cjs
CHANGED
|
@@ -24,16 +24,27 @@ __export(src_exports, {
|
|
|
24
24
|
IdPayloadPlugin: () => IdPayloadPlugin,
|
|
25
25
|
IdSchema: () => IdSchema,
|
|
26
26
|
default: () => IdPayloadPlugin,
|
|
27
|
-
idPayloadTemplate: () => idPayloadTemplate
|
|
27
|
+
idPayloadTemplate: () => idPayloadTemplate,
|
|
28
|
+
isId: () => isId,
|
|
29
|
+
isIdWithMeta: () => isIdWithMeta,
|
|
30
|
+
isIdWithSources: () => isIdWithSources
|
|
28
31
|
});
|
|
29
32
|
module.exports = __toCommonJS(src_exports);
|
|
30
33
|
|
|
31
|
-
// src/
|
|
32
|
-
var
|
|
34
|
+
// src/Payload.ts
|
|
35
|
+
var import_payload_model = require("@xyo-network/payload-model");
|
|
33
36
|
|
|
34
37
|
// src/Schema.ts
|
|
35
38
|
var IdSchema = "network.xyo.id";
|
|
36
39
|
|
|
40
|
+
// src/Payload.ts
|
|
41
|
+
var isId = (0, import_payload_model.isPayloadOfSchemaType)(IdSchema);
|
|
42
|
+
var isIdWithMeta = (0, import_payload_model.isPayloadOfSchemaTypeWithMeta)(IdSchema);
|
|
43
|
+
var isIdWithSources = (0, import_payload_model.isPayloadOfSchemaTypeWithSources)(IdSchema);
|
|
44
|
+
|
|
45
|
+
// src/Plugin.ts
|
|
46
|
+
var import_payload_plugin = require("@xyo-network/payload-plugin");
|
|
47
|
+
|
|
37
48
|
// src/Template.ts
|
|
38
49
|
var idPayloadTemplate = /* @__PURE__ */ __name(() => ({
|
|
39
50
|
salt: "",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/Payload.ts","../../src/Schema.ts","../../src/Plugin.ts","../../src/Template.ts"],"sourcesContent":["export * from './Payload'\nexport { IdPayloadPlugin as default, IdPayloadPlugin } from './Plugin'\nexport * from './Schema'\nexport * from './Template'\n","import {\n isPayloadOfSchemaType,\n isPayloadOfSchemaTypeWithMeta,\n isPayloadOfSchemaTypeWithSources,\n Payload,\n WithMeta,\n WithSources,\n} from '@xyo-network/payload-model'\n\nimport { IdSchema } from './Schema'\n\nexport type IdPayload = Payload<{\n salt: string\n schema: IdSchema\n}>\n\n/**\n * Identity helper for ID Payload\n */\nexport const isId = isPayloadOfSchemaType<IdPayload>(IdSchema)\n/**\n * Identity helper for ID Payload with meta\n */\nexport const isIdWithMeta = isPayloadOfSchemaTypeWithMeta<WithMeta<IdPayload>>(IdSchema)\n/**\n * Identity helper for ID Payload with sources\n */\nexport const isIdWithSources = isPayloadOfSchemaTypeWithSources<WithSources<IdPayload>>(IdSchema)\n","export type IdSchema = 'network.xyo.id'\nexport const IdSchema: IdSchema = 'network.xyo.id'\n","import { createPayloadPlugin } from '@xyo-network/payload-plugin'\n\nimport { IdPayload } from './Payload'\nimport { IdSchema } from './Schema'\nimport { idPayloadTemplate } from './Template'\n\nexport const IdPayloadPlugin = () =>\n createPayloadPlugin<IdPayload>({\n schema: IdSchema,\n template: idPayloadTemplate,\n })\n","import { IdPayload } from './Payload'\nimport { IdSchema } from './Schema'\n\nexport const idPayloadTemplate = (): IdPayload => ({\n salt: '',\n schema: IdSchema,\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;ACAA,2BAOO;;;ACNA,IAAMA,WAAqB;;;ADkB3B,IAAMC,WAAOC,4CAAiCC,QAAAA;AAI9C,IAAMC,mBAAeC,oDAAmDF,QAAAA;AAIxE,IAAMG,sBAAkBC,uDAAyDJ,QAAAA;;;AE3BxF,4BAAoC;;;ACG7B,IAAMK,oBAAoB,8BAAkB;EACjDC,MAAM;EACNC,QAAQC;AACV,IAHiC;;;ADG1B,IAAMC,kBAAkB,iCAC7BC,2CAA+B;EAC7BC,QAAQC;EACRC,UAAUC;AACZ,CAAA,GAJ6B;","names":["IdSchema","isId","isPayloadOfSchemaType","IdSchema","isIdWithMeta","isPayloadOfSchemaTypeWithMeta","isIdWithSources","isPayloadOfSchemaTypeWithSources","idPayloadTemplate","salt","schema","IdSchema","IdPayloadPlugin","createPayloadPlugin","schema","IdSchema","template","idPayloadTemplate"]}
|
package/dist/browser/index.js
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
3
|
|
|
4
|
-
// src/
|
|
5
|
-
import {
|
|
4
|
+
// src/Payload.ts
|
|
5
|
+
import { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, isPayloadOfSchemaTypeWithSources } from "@xyo-network/payload-model";
|
|
6
6
|
|
|
7
7
|
// src/Schema.ts
|
|
8
8
|
var IdSchema = "network.xyo.id";
|
|
9
9
|
|
|
10
|
+
// src/Payload.ts
|
|
11
|
+
var isId = isPayloadOfSchemaType(IdSchema);
|
|
12
|
+
var isIdWithMeta = isPayloadOfSchemaTypeWithMeta(IdSchema);
|
|
13
|
+
var isIdWithSources = isPayloadOfSchemaTypeWithSources(IdSchema);
|
|
14
|
+
|
|
15
|
+
// src/Plugin.ts
|
|
16
|
+
import { createPayloadPlugin } from "@xyo-network/payload-plugin";
|
|
17
|
+
|
|
10
18
|
// src/Template.ts
|
|
11
19
|
var idPayloadTemplate = /* @__PURE__ */ __name(() => ({
|
|
12
20
|
salt: "",
|
|
@@ -22,6 +30,9 @@ export {
|
|
|
22
30
|
IdPayloadPlugin,
|
|
23
31
|
IdSchema,
|
|
24
32
|
IdPayloadPlugin as default,
|
|
25
|
-
idPayloadTemplate
|
|
33
|
+
idPayloadTemplate,
|
|
34
|
+
isId,
|
|
35
|
+
isIdWithMeta,
|
|
36
|
+
isIdWithSources
|
|
26
37
|
};
|
|
27
38
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/
|
|
1
|
+
{"version":3,"sources":["../../src/Payload.ts","../../src/Schema.ts","../../src/Plugin.ts","../../src/Template.ts"],"sourcesContent":["import {\n isPayloadOfSchemaType,\n isPayloadOfSchemaTypeWithMeta,\n isPayloadOfSchemaTypeWithSources,\n Payload,\n WithMeta,\n WithSources,\n} from '@xyo-network/payload-model'\n\nimport { IdSchema } from './Schema'\n\nexport type IdPayload = Payload<{\n salt: string\n schema: IdSchema\n}>\n\n/**\n * Identity helper for ID Payload\n */\nexport const isId = isPayloadOfSchemaType<IdPayload>(IdSchema)\n/**\n * Identity helper for ID Payload with meta\n */\nexport const isIdWithMeta = isPayloadOfSchemaTypeWithMeta<WithMeta<IdPayload>>(IdSchema)\n/**\n * Identity helper for ID Payload with sources\n */\nexport const isIdWithSources = isPayloadOfSchemaTypeWithSources<WithSources<IdPayload>>(IdSchema)\n","export type IdSchema = 'network.xyo.id'\nexport const IdSchema: IdSchema = 'network.xyo.id'\n","import { createPayloadPlugin } from '@xyo-network/payload-plugin'\n\nimport { IdPayload } from './Payload'\nimport { IdSchema } from './Schema'\nimport { idPayloadTemplate } from './Template'\n\nexport const IdPayloadPlugin = () =>\n createPayloadPlugin<IdPayload>({\n schema: IdSchema,\n template: idPayloadTemplate,\n })\n","import { IdPayload } from './Payload'\nimport { IdSchema } from './Schema'\n\nexport const idPayloadTemplate = (): IdPayload => ({\n salt: '',\n schema: IdSchema,\n})\n"],"mappings":";;;;AAAA,SACEA,uBACAC,+BACAC,wCAIK;;;ACNA,IAAMC,WAAqB;;;ADkB3B,IAAMC,OAAOC,sBAAiCC,QAAAA;AAI9C,IAAMC,eAAeC,8BAAmDF,QAAAA;AAIxE,IAAMG,kBAAkBC,iCAAyDJ,QAAAA;;;AE3BxF,SAASK,2BAA2B;;;ACG7B,IAAMC,oBAAoB,8BAAkB;EACjDC,MAAM;EACNC,QAAQC;AACV,IAHiC;;;ADG1B,IAAMC,kBAAkB,6BAC7BC,oBAA+B;EAC7BC,QAAQC;EACRC,UAAUC;AACZ,CAAA,GAJ6B;","names":["isPayloadOfSchemaType","isPayloadOfSchemaTypeWithMeta","isPayloadOfSchemaTypeWithSources","IdSchema","isId","isPayloadOfSchemaType","IdSchema","isIdWithMeta","isPayloadOfSchemaTypeWithMeta","isIdWithSources","isPayloadOfSchemaTypeWithSources","createPayloadPlugin","idPayloadTemplate","salt","schema","IdSchema","IdPayloadPlugin","createPayloadPlugin","schema","IdSchema","template","idPayloadTemplate"]}
|
package/dist/node/Payload.d.cts
CHANGED
|
@@ -1,7 +1,28 @@
|
|
|
1
|
-
import { Payload } from '@xyo-network/payload-model';
|
|
1
|
+
import { Payload, WithMeta, WithSources } from '@xyo-network/payload-model';
|
|
2
2
|
import { IdSchema } from './Schema';
|
|
3
3
|
export type IdPayload = Payload<{
|
|
4
4
|
salt: string;
|
|
5
5
|
schema: IdSchema;
|
|
6
6
|
}>;
|
|
7
|
+
/**
|
|
8
|
+
* Identity helper for ID Payload
|
|
9
|
+
*/
|
|
10
|
+
export declare const isId: (x?: unknown) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
11
|
+
salt: string;
|
|
12
|
+
schema: IdSchema;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Identity helper for ID Payload with meta
|
|
16
|
+
*/
|
|
17
|
+
export declare const isIdWithMeta: (x?: unknown) => x is WithMeta<WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
18
|
+
salt: string;
|
|
19
|
+
schema: IdSchema;
|
|
20
|
+
}>>;
|
|
21
|
+
/**
|
|
22
|
+
* Identity helper for ID Payload with sources
|
|
23
|
+
*/
|
|
24
|
+
export declare const isIdWithSources: (x?: unknown) => x is WithSources<WithSources<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
25
|
+
salt: string;
|
|
26
|
+
schema: IdSchema;
|
|
27
|
+
}>>;
|
|
7
28
|
//# sourceMappingURL=Payload.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../src/Payload.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../src/Payload.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,OAAO,EACP,QAAQ,EACR,WAAW,EACZ,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEnC,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,QAAQ,CAAA;CACjB,CAAC,CAAA;AAEF;;GAEG;AACH,eAAO,MAAM,IAAI;UAPT,MAAM;YACJ,QAAQ;CAM4C,CAAA;AAC9D;;GAEG;AACH,eAAO,MAAM,YAAY;UAXjB,MAAM;YACJ,QAAQ;GAUsE,CAAA;AACxF;;GAEG;AACH,eAAO,MAAM,eAAe;UAfpB,MAAM;YACJ,QAAQ;GAc+E,CAAA"}
|
package/dist/node/Payload.d.mts
CHANGED
|
@@ -1,7 +1,28 @@
|
|
|
1
|
-
import { Payload } from '@xyo-network/payload-model';
|
|
1
|
+
import { Payload, WithMeta, WithSources } from '@xyo-network/payload-model';
|
|
2
2
|
import { IdSchema } from './Schema';
|
|
3
3
|
export type IdPayload = Payload<{
|
|
4
4
|
salt: string;
|
|
5
5
|
schema: IdSchema;
|
|
6
6
|
}>;
|
|
7
|
+
/**
|
|
8
|
+
* Identity helper for ID Payload
|
|
9
|
+
*/
|
|
10
|
+
export declare const isId: (x?: unknown) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
11
|
+
salt: string;
|
|
12
|
+
schema: IdSchema;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Identity helper for ID Payload with meta
|
|
16
|
+
*/
|
|
17
|
+
export declare const isIdWithMeta: (x?: unknown) => x is WithMeta<WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
18
|
+
salt: string;
|
|
19
|
+
schema: IdSchema;
|
|
20
|
+
}>>;
|
|
21
|
+
/**
|
|
22
|
+
* Identity helper for ID Payload with sources
|
|
23
|
+
*/
|
|
24
|
+
export declare const isIdWithSources: (x?: unknown) => x is WithSources<WithSources<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
25
|
+
salt: string;
|
|
26
|
+
schema: IdSchema;
|
|
27
|
+
}>>;
|
|
7
28
|
//# sourceMappingURL=Payload.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../src/Payload.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../src/Payload.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,OAAO,EACP,QAAQ,EACR,WAAW,EACZ,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEnC,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,QAAQ,CAAA;CACjB,CAAC,CAAA;AAEF;;GAEG;AACH,eAAO,MAAM,IAAI;UAPT,MAAM;YACJ,QAAQ;CAM4C,CAAA;AAC9D;;GAEG;AACH,eAAO,MAAM,YAAY;UAXjB,MAAM;YACJ,QAAQ;GAUsE,CAAA;AACxF;;GAEG;AACH,eAAO,MAAM,eAAe;UAfpB,MAAM;YACJ,QAAQ;GAc+E,CAAA"}
|
package/dist/node/Payload.d.ts
CHANGED
|
@@ -1,7 +1,28 @@
|
|
|
1
|
-
import { Payload } from '@xyo-network/payload-model';
|
|
1
|
+
import { Payload, WithMeta, WithSources } from '@xyo-network/payload-model';
|
|
2
2
|
import { IdSchema } from './Schema';
|
|
3
3
|
export type IdPayload = Payload<{
|
|
4
4
|
salt: string;
|
|
5
5
|
schema: IdSchema;
|
|
6
6
|
}>;
|
|
7
|
+
/**
|
|
8
|
+
* Identity helper for ID Payload
|
|
9
|
+
*/
|
|
10
|
+
export declare const isId: (x?: unknown) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
11
|
+
salt: string;
|
|
12
|
+
schema: IdSchema;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Identity helper for ID Payload with meta
|
|
16
|
+
*/
|
|
17
|
+
export declare const isIdWithMeta: (x?: unknown) => x is WithMeta<WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
18
|
+
salt: string;
|
|
19
|
+
schema: IdSchema;
|
|
20
|
+
}>>;
|
|
21
|
+
/**
|
|
22
|
+
* Identity helper for ID Payload with sources
|
|
23
|
+
*/
|
|
24
|
+
export declare const isIdWithSources: (x?: unknown) => x is WithSources<WithSources<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
25
|
+
salt: string;
|
|
26
|
+
schema: IdSchema;
|
|
27
|
+
}>>;
|
|
7
28
|
//# sourceMappingURL=Payload.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../src/Payload.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../src/Payload.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,OAAO,EACP,QAAQ,EACR,WAAW,EACZ,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEnC,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,QAAQ,CAAA;CACjB,CAAC,CAAA;AAEF;;GAEG;AACH,eAAO,MAAM,IAAI;UAPT,MAAM;YACJ,QAAQ;CAM4C,CAAA;AAC9D;;GAEG;AACH,eAAO,MAAM,YAAY;UAXjB,MAAM;YACJ,QAAQ;GAUsE,CAAA;AACxF;;GAEG;AACH,eAAO,MAAM,eAAe;UAfpB,MAAM;YACJ,QAAQ;GAc+E,CAAA"}
|
package/dist/node/index.cjs
CHANGED
|
@@ -24,16 +24,27 @@ __export(src_exports, {
|
|
|
24
24
|
IdPayloadPlugin: () => IdPayloadPlugin,
|
|
25
25
|
IdSchema: () => IdSchema,
|
|
26
26
|
default: () => IdPayloadPlugin,
|
|
27
|
-
idPayloadTemplate: () => idPayloadTemplate
|
|
27
|
+
idPayloadTemplate: () => idPayloadTemplate,
|
|
28
|
+
isId: () => isId,
|
|
29
|
+
isIdWithMeta: () => isIdWithMeta,
|
|
30
|
+
isIdWithSources: () => isIdWithSources
|
|
28
31
|
});
|
|
29
32
|
module.exports = __toCommonJS(src_exports);
|
|
30
33
|
|
|
31
|
-
// src/
|
|
32
|
-
var
|
|
34
|
+
// src/Payload.ts
|
|
35
|
+
var import_payload_model = require("@xyo-network/payload-model");
|
|
33
36
|
|
|
34
37
|
// src/Schema.ts
|
|
35
38
|
var IdSchema = "network.xyo.id";
|
|
36
39
|
|
|
40
|
+
// src/Payload.ts
|
|
41
|
+
var isId = (0, import_payload_model.isPayloadOfSchemaType)(IdSchema);
|
|
42
|
+
var isIdWithMeta = (0, import_payload_model.isPayloadOfSchemaTypeWithMeta)(IdSchema);
|
|
43
|
+
var isIdWithSources = (0, import_payload_model.isPayloadOfSchemaTypeWithSources)(IdSchema);
|
|
44
|
+
|
|
45
|
+
// src/Plugin.ts
|
|
46
|
+
var import_payload_plugin = require("@xyo-network/payload-plugin");
|
|
47
|
+
|
|
37
48
|
// src/Template.ts
|
|
38
49
|
var idPayloadTemplate = /* @__PURE__ */ __name(() => ({
|
|
39
50
|
salt: "",
|
|
@@ -49,6 +60,9 @@ var IdPayloadPlugin = /* @__PURE__ */ __name(() => (0, import_payload_plugin.cre
|
|
|
49
60
|
0 && (module.exports = {
|
|
50
61
|
IdPayloadPlugin,
|
|
51
62
|
IdSchema,
|
|
52
|
-
idPayloadTemplate
|
|
63
|
+
idPayloadTemplate,
|
|
64
|
+
isId,
|
|
65
|
+
isIdWithMeta,
|
|
66
|
+
isIdWithSources
|
|
53
67
|
});
|
|
54
68
|
//# sourceMappingURL=index.cjs.map
|
package/dist/node/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/Payload.ts","../../src/Schema.ts","../../src/Plugin.ts","../../src/Template.ts"],"sourcesContent":["export * from './Payload'\nexport { IdPayloadPlugin as default, IdPayloadPlugin } from './Plugin'\nexport * from './Schema'\nexport * from './Template'\n","import {\n isPayloadOfSchemaType,\n isPayloadOfSchemaTypeWithMeta,\n isPayloadOfSchemaTypeWithSources,\n Payload,\n WithMeta,\n WithSources,\n} from '@xyo-network/payload-model'\n\nimport { IdSchema } from './Schema'\n\nexport type IdPayload = Payload<{\n salt: string\n schema: IdSchema\n}>\n\n/**\n * Identity helper for ID Payload\n */\nexport const isId = isPayloadOfSchemaType<IdPayload>(IdSchema)\n/**\n * Identity helper for ID Payload with meta\n */\nexport const isIdWithMeta = isPayloadOfSchemaTypeWithMeta<WithMeta<IdPayload>>(IdSchema)\n/**\n * Identity helper for ID Payload with sources\n */\nexport const isIdWithSources = isPayloadOfSchemaTypeWithSources<WithSources<IdPayload>>(IdSchema)\n","export type IdSchema = 'network.xyo.id'\nexport const IdSchema: IdSchema = 'network.xyo.id'\n","import { createPayloadPlugin } from '@xyo-network/payload-plugin'\n\nimport { IdPayload } from './Payload'\nimport { IdSchema } from './Schema'\nimport { idPayloadTemplate } from './Template'\n\nexport const IdPayloadPlugin = () =>\n createPayloadPlugin<IdPayload>({\n schema: IdSchema,\n template: idPayloadTemplate,\n })\n","import { IdPayload } from './Payload'\nimport { IdSchema } from './Schema'\n\nexport const idPayloadTemplate = (): IdPayload => ({\n salt: '',\n schema: IdSchema,\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;ACAA,2BAOO;;;ACNA,IAAMA,WAAqB;;;ADkB3B,IAAMC,WAAOC,4CAAiCC,QAAAA;AAI9C,IAAMC,mBAAeC,oDAAmDF,QAAAA;AAIxE,IAAMG,sBAAkBC,uDAAyDJ,QAAAA;;;AE3BxF,4BAAoC;;;ACG7B,IAAMK,oBAAoB,8BAAkB;EACjDC,MAAM;EACNC,QAAQC;AACV,IAHiC;;;ADG1B,IAAMC,kBAAkB,iCAC7BC,2CAA+B;EAC7BC,QAAQC;EACRC,UAAUC;AACZ,CAAA,GAJ6B;","names":["IdSchema","isId","isPayloadOfSchemaType","IdSchema","isIdWithMeta","isPayloadOfSchemaTypeWithMeta","isIdWithSources","isPayloadOfSchemaTypeWithSources","idPayloadTemplate","salt","schema","IdSchema","IdPayloadPlugin","createPayloadPlugin","schema","IdSchema","template","idPayloadTemplate"]}
|
package/dist/node/index.js
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
3
|
|
|
4
|
-
// src/
|
|
5
|
-
import {
|
|
4
|
+
// src/Payload.ts
|
|
5
|
+
import { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, isPayloadOfSchemaTypeWithSources } from "@xyo-network/payload-model";
|
|
6
6
|
|
|
7
7
|
// src/Schema.ts
|
|
8
8
|
var IdSchema = "network.xyo.id";
|
|
9
9
|
|
|
10
|
+
// src/Payload.ts
|
|
11
|
+
var isId = isPayloadOfSchemaType(IdSchema);
|
|
12
|
+
var isIdWithMeta = isPayloadOfSchemaTypeWithMeta(IdSchema);
|
|
13
|
+
var isIdWithSources = isPayloadOfSchemaTypeWithSources(IdSchema);
|
|
14
|
+
|
|
15
|
+
// src/Plugin.ts
|
|
16
|
+
import { createPayloadPlugin } from "@xyo-network/payload-plugin";
|
|
17
|
+
|
|
10
18
|
// src/Template.ts
|
|
11
19
|
var idPayloadTemplate = /* @__PURE__ */ __name(() => ({
|
|
12
20
|
salt: "",
|
|
@@ -22,6 +30,9 @@ export {
|
|
|
22
30
|
IdPayloadPlugin,
|
|
23
31
|
IdSchema,
|
|
24
32
|
IdPayloadPlugin as default,
|
|
25
|
-
idPayloadTemplate
|
|
33
|
+
idPayloadTemplate,
|
|
34
|
+
isId,
|
|
35
|
+
isIdWithMeta,
|
|
36
|
+
isIdWithSources
|
|
26
37
|
};
|
|
27
38
|
//# sourceMappingURL=index.js.map
|
package/dist/node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/
|
|
1
|
+
{"version":3,"sources":["../../src/Payload.ts","../../src/Schema.ts","../../src/Plugin.ts","../../src/Template.ts"],"sourcesContent":["import {\n isPayloadOfSchemaType,\n isPayloadOfSchemaTypeWithMeta,\n isPayloadOfSchemaTypeWithSources,\n Payload,\n WithMeta,\n WithSources,\n} from '@xyo-network/payload-model'\n\nimport { IdSchema } from './Schema'\n\nexport type IdPayload = Payload<{\n salt: string\n schema: IdSchema\n}>\n\n/**\n * Identity helper for ID Payload\n */\nexport const isId = isPayloadOfSchemaType<IdPayload>(IdSchema)\n/**\n * Identity helper for ID Payload with meta\n */\nexport const isIdWithMeta = isPayloadOfSchemaTypeWithMeta<WithMeta<IdPayload>>(IdSchema)\n/**\n * Identity helper for ID Payload with sources\n */\nexport const isIdWithSources = isPayloadOfSchemaTypeWithSources<WithSources<IdPayload>>(IdSchema)\n","export type IdSchema = 'network.xyo.id'\nexport const IdSchema: IdSchema = 'network.xyo.id'\n","import { createPayloadPlugin } from '@xyo-network/payload-plugin'\n\nimport { IdPayload } from './Payload'\nimport { IdSchema } from './Schema'\nimport { idPayloadTemplate } from './Template'\n\nexport const IdPayloadPlugin = () =>\n createPayloadPlugin<IdPayload>({\n schema: IdSchema,\n template: idPayloadTemplate,\n })\n","import { IdPayload } from './Payload'\nimport { IdSchema } from './Schema'\n\nexport const idPayloadTemplate = (): IdPayload => ({\n salt: '',\n schema: IdSchema,\n})\n"],"mappings":";;;;AAAA,SACEA,uBACAC,+BACAC,wCAIK;;;ACNA,IAAMC,WAAqB;;;ADkB3B,IAAMC,OAAOC,sBAAiCC,QAAAA;AAI9C,IAAMC,eAAeC,8BAAmDF,QAAAA;AAIxE,IAAMG,kBAAkBC,iCAAyDJ,QAAAA;;;AE3BxF,SAASK,2BAA2B;;;ACG7B,IAAMC,oBAAoB,8BAAkB;EACjDC,MAAM;EACNC,QAAQC;AACV,IAHiC;;;ADG1B,IAAMC,kBAAkB,6BAC7BC,oBAA+B;EAC7BC,QAAQC;EACRC,UAAUC;AACZ,CAAA,GAJ6B;","names":["isPayloadOfSchemaType","isPayloadOfSchemaTypeWithMeta","isPayloadOfSchemaTypeWithSources","IdSchema","isId","isPayloadOfSchemaType","IdSchema","isIdWithMeta","isPayloadOfSchemaTypeWithMeta","isIdWithSources","isPayloadOfSchemaTypeWithSources","createPayloadPlugin","idPayloadTemplate","salt","schema","IdSchema","IdPayloadPlugin","createPayloadPlugin","schema","IdSchema","template","idPayloadTemplate"]}
|
package/package.json
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"url": "https://github.com/XYOracleNetwork/plugins/issues"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xyo-network/payload-model": "~2.94.
|
|
14
|
-
"@xyo-network/payload-plugin": "~2.94.
|
|
13
|
+
"@xyo-network/payload-model": "~2.94.10",
|
|
14
|
+
"@xyo-network/payload-plugin": "~2.94.10"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@xylabs/ts-scripts-yarn3": "^3.9.0",
|
|
@@ -57,6 +57,6 @@
|
|
|
57
57
|
"url": "https://github.com/XYOracleNetwork/plugins.git"
|
|
58
58
|
},
|
|
59
59
|
"sideEffects": false,
|
|
60
|
-
"version": "2.94.
|
|
60
|
+
"version": "2.94.10",
|
|
61
61
|
"type": "module"
|
|
62
62
|
}
|
package/src/Payload.ts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
isPayloadOfSchemaType,
|
|
3
|
+
isPayloadOfSchemaTypeWithMeta,
|
|
4
|
+
isPayloadOfSchemaTypeWithSources,
|
|
5
|
+
Payload,
|
|
6
|
+
WithMeta,
|
|
7
|
+
WithSources,
|
|
8
|
+
} from '@xyo-network/payload-model'
|
|
2
9
|
|
|
3
10
|
import { IdSchema } from './Schema'
|
|
4
11
|
|
|
@@ -6,3 +13,16 @@ export type IdPayload = Payload<{
|
|
|
6
13
|
salt: string
|
|
7
14
|
schema: IdSchema
|
|
8
15
|
}>
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Identity helper for ID Payload
|
|
19
|
+
*/
|
|
20
|
+
export const isId = isPayloadOfSchemaType<IdPayload>(IdSchema)
|
|
21
|
+
/**
|
|
22
|
+
* Identity helper for ID Payload with meta
|
|
23
|
+
*/
|
|
24
|
+
export const isIdWithMeta = isPayloadOfSchemaTypeWithMeta<WithMeta<IdPayload>>(IdSchema)
|
|
25
|
+
/**
|
|
26
|
+
* Identity helper for ID Payload with sources
|
|
27
|
+
*/
|
|
28
|
+
export const isIdWithSources = isPayloadOfSchemaTypeWithSources<WithSources<IdPayload>>(IdSchema)
|