@xyo-network/payload-model 2.75.15 → 2.75.16
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/docs.json +89 -89
- package/package.json +4 -4
- package/dist/browser/EmptyPayload.cjs +0 -19
- package/dist/browser/EmptyPayload.cjs.map +0 -1
- package/dist/browser/EmptyPayload.js +0 -1
- package/dist/browser/EmptyPayload.js.map +0 -1
- package/dist/browser/Error.cjs +0 -27
- package/dist/browser/Error.cjs.map +0 -1
- package/dist/browser/Error.js +0 -6
- package/dist/browser/Error.js.map +0 -1
- package/dist/browser/Payload.cjs +0 -27
- package/dist/browser/Payload.cjs.map +0 -1
- package/dist/browser/Payload.js +0 -6
- package/dist/browser/Payload.js.map +0 -1
- package/dist/browser/PayloadFindFilter.cjs +0 -19
- package/dist/browser/PayloadFindFilter.cjs.map +0 -1
- package/dist/browser/PayloadFindFilter.js +0 -1
- package/dist/browser/PayloadFindFilter.js.map +0 -1
- package/dist/browser/PayloadSet/PayloadSetPayload.cjs +0 -19
- package/dist/browser/PayloadSet/PayloadSetPayload.cjs.map +0 -1
- package/dist/browser/PayloadSet/PayloadSetPayload.js +0 -1
- package/dist/browser/PayloadSet/PayloadSetPayload.js.map +0 -1
- package/dist/browser/PayloadSet/PayloadSetSchema.cjs +0 -27
- package/dist/browser/PayloadSet/PayloadSetSchema.cjs.map +0 -1
- package/dist/browser/PayloadSet/PayloadSetSchema.js +0 -6
- package/dist/browser/PayloadSet/PayloadSetSchema.js.map +0 -1
- package/dist/browser/PayloadSet/index.cjs +0 -29
- package/dist/browser/PayloadSet/index.cjs.map +0 -1
- package/dist/browser/PayloadSet/index.js +0 -6
- package/dist/browser/PayloadSet/index.js.map +0 -1
- package/dist/browser/Query.cjs +0 -19
- package/dist/browser/Query.cjs.map +0 -1
- package/dist/browser/Query.js +0 -1
- package/dist/browser/Query.js.map +0 -1
- package/dist/browser/isPayload.cjs +0 -42
- package/dist/browser/isPayload.cjs.map +0 -1
- package/dist/browser/isPayload.js +0 -21
- package/dist/browser/isPayload.js.map +0 -1
- package/dist/browser/isPayloadOfSchemaType.cjs +0 -29
- package/dist/browser/isPayloadOfSchemaType.cjs.map +0 -1
- package/dist/browser/isPayloadOfSchemaType.js +0 -8
- package/dist/browser/isPayloadOfSchemaType.js.map +0 -1
- package/dist/node/EmptyPayload.js +0 -19
- package/dist/node/EmptyPayload.js.map +0 -1
- package/dist/node/EmptyPayload.mjs +0 -1
- package/dist/node/EmptyPayload.mjs.map +0 -1
- package/dist/node/Error.js +0 -31
- package/dist/node/Error.js.map +0 -1
- package/dist/node/Error.mjs +0 -6
- package/dist/node/Error.mjs.map +0 -1
- package/dist/node/Payload.js +0 -31
- package/dist/node/Payload.js.map +0 -1
- package/dist/node/Payload.mjs +0 -6
- package/dist/node/Payload.mjs.map +0 -1
- package/dist/node/PayloadFindFilter.js +0 -19
- package/dist/node/PayloadFindFilter.js.map +0 -1
- package/dist/node/PayloadFindFilter.mjs +0 -1
- package/dist/node/PayloadFindFilter.mjs.map +0 -1
- package/dist/node/PayloadSet/PayloadSetPayload.js +0 -19
- package/dist/node/PayloadSet/PayloadSetPayload.js.map +0 -1
- package/dist/node/PayloadSet/PayloadSetPayload.mjs +0 -1
- package/dist/node/PayloadSet/PayloadSetPayload.mjs.map +0 -1
- package/dist/node/PayloadSet/PayloadSetSchema.js +0 -31
- package/dist/node/PayloadSet/PayloadSetSchema.js.map +0 -1
- package/dist/node/PayloadSet/PayloadSetSchema.mjs +0 -6
- package/dist/node/PayloadSet/PayloadSetSchema.mjs.map +0 -1
- package/dist/node/PayloadSet/index.js +0 -33
- package/dist/node/PayloadSet/index.js.map +0 -1
- package/dist/node/PayloadSet/index.mjs +0 -6
- package/dist/node/PayloadSet/index.mjs.map +0 -1
- package/dist/node/Query.js +0 -19
- package/dist/node/Query.js.map +0 -1
- package/dist/node/Query.mjs +0 -1
- package/dist/node/Query.mjs.map +0 -1
- package/dist/node/isPayload.js +0 -48
- package/dist/node/isPayload.js.map +0 -1
- package/dist/node/isPayload.mjs +0 -21
- package/dist/node/isPayload.mjs.map +0 -1
- package/dist/node/isPayloadOfSchemaType.js +0 -33
- package/dist/node/isPayloadOfSchemaType.js.map +0 -1
- package/dist/node/isPayloadOfSchemaType.mjs +0 -8
- package/dist/node/isPayloadOfSchemaType.mjs.map +0 -1
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
|
|
16
|
-
// src/PayloadSet/PayloadSetPayload.ts
|
|
17
|
-
var PayloadSetPayload_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(PayloadSetPayload_exports);
|
|
19
|
-
//# sourceMappingURL=PayloadSetPayload.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/PayloadSet/PayloadSetPayload.ts"],"sourcesContent":["import { Payload } from '../Payload'\nimport { PayloadSetSchema } from './PayloadSetSchema'\n\nexport interface PayloadSet {\n optional?: Record<string, number>\n required?: Record<string, number>\n}\n\nexport type PayloadSetPayload = Payload<PayloadSet, PayloadSetSchema>\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=PayloadSetPayload.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/PayloadSet/PayloadSetSchema.ts
|
|
21
|
-
var PayloadSetSchema_exports = {};
|
|
22
|
-
__export(PayloadSetSchema_exports, {
|
|
23
|
-
PayloadSetSchema: () => PayloadSetSchema
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(PayloadSetSchema_exports);
|
|
26
|
-
var PayloadSetSchema = "network.xyo.payload.set";
|
|
27
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
28
|
-
0 && (module.exports = {
|
|
29
|
-
PayloadSetSchema
|
|
30
|
-
});
|
|
31
|
-
//# sourceMappingURL=PayloadSetSchema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/PayloadSet/PayloadSetSchema.ts"],"sourcesContent":["export type PayloadSetSchema = 'network.xyo.payload.set'\nexport const PayloadSetSchema: PayloadSetSchema = 'network.xyo.payload.set'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACO,IAAM,mBAAqC;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/PayloadSet/PayloadSetSchema.ts"],"sourcesContent":["export type PayloadSetSchema = 'network.xyo.payload.set'\nexport const PayloadSetSchema: PayloadSetSchema = 'network.xyo.payload.set'\n"],"mappings":";AACO,IAAM,mBAAqC;","names":[]}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/PayloadSet/index.ts
|
|
21
|
-
var PayloadSet_exports = {};
|
|
22
|
-
__export(PayloadSet_exports, {
|
|
23
|
-
PayloadSetSchema: () => PayloadSetSchema
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(PayloadSet_exports);
|
|
26
|
-
|
|
27
|
-
// src/PayloadSet/PayloadSetSchema.ts
|
|
28
|
-
var PayloadSetSchema = "network.xyo.payload.set";
|
|
29
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
30
|
-
0 && (module.exports = {
|
|
31
|
-
PayloadSetSchema
|
|
32
|
-
});
|
|
33
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/PayloadSet/index.ts","../../../src/PayloadSet/PayloadSetSchema.ts"],"sourcesContent":["export * from './PayloadSetPayload'\nexport * from './PayloadSetSchema'\n","export type PayloadSetSchema = 'network.xyo.payload.set'\nexport const PayloadSetSchema: PayloadSetSchema = 'network.xyo.payload.set'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCO,IAAM,mBAAqC;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/PayloadSet/PayloadSetSchema.ts"],"sourcesContent":["export type PayloadSetSchema = 'network.xyo.payload.set'\nexport const PayloadSetSchema: PayloadSetSchema = 'network.xyo.payload.set'\n"],"mappings":";AACO,IAAM,mBAAqC;","names":[]}
|
package/dist/node/Query.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
|
|
16
|
-
// src/Query.ts
|
|
17
|
-
var Query_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(Query_exports);
|
|
19
|
-
//# sourceMappingURL=Query.js.map
|
package/dist/node/Query.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Query.ts"],"sourcesContent":["import { Payload } from './Payload'\n\nexport interface QueryFields {\n /** @field The addresses of the intended handlers */\n address?: string | [string]\n\n /** @field The maximum XYO that can be spent executing the query */\n budget?: number\n\n /** @field The frequency on which this query can be rerun */\n maxFrequency?: 'once' | 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'year'\n\n /** @field The starting point for the bidding on the query */\n minBid?: number\n}\n\nexport type Query<T extends Payload | void = void> = T extends Payload ? Payload<T & QueryFields> : Payload<QueryFields>\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/dist/node/Query.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=Query.mjs.map
|
package/dist/node/Query.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/node/isPayload.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/isPayload.ts
|
|
21
|
-
var isPayload_exports = {};
|
|
22
|
-
__export(isPayload_exports, {
|
|
23
|
-
asPayload: () => asPayload,
|
|
24
|
-
isAnyPayload: () => isAnyPayload,
|
|
25
|
-
isPayload: () => isPayload
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(isPayload_exports);
|
|
28
|
-
var import_object = require("@xyo-network/object");
|
|
29
|
-
var isAnyPayload = (obj) => {
|
|
30
|
-
if ((0, import_object.isObject)(obj)) {
|
|
31
|
-
return typeof obj.schema === "string";
|
|
32
|
-
}
|
|
33
|
-
return false;
|
|
34
|
-
};
|
|
35
|
-
var isPayload = (schema) => (obj) => {
|
|
36
|
-
if (isAnyPayload(obj)) {
|
|
37
|
-
return schema.includes(obj.schema);
|
|
38
|
-
}
|
|
39
|
-
return false;
|
|
40
|
-
};
|
|
41
|
-
var asPayload = (schema) => import_object.AsObjectFactory.create((obj) => isPayload(schema)(obj));
|
|
42
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
43
|
-
0 && (module.exports = {
|
|
44
|
-
asPayload,
|
|
45
|
-
isAnyPayload,
|
|
46
|
-
isPayload
|
|
47
|
-
});
|
|
48
|
-
//# sourceMappingURL=isPayload.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/isPayload.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { AsObjectFactory, isObject } from '@xyo-network/object'\n\nimport { Payload } from './Payload'\n\nexport const isAnyPayload = (obj: any): obj is Payload => {\n if (isObject(obj)) {\n return typeof obj.schema === 'string'\n }\n return false\n}\n\nexport const isPayload =\n <T extends Payload>(schema: string[]) =>\n (obj: any): obj is T => {\n if (isAnyPayload(obj)) {\n return schema.includes(obj.schema)\n }\n return false\n }\n\nexport const asPayload = <T extends Payload>(schema: string[]) => AsObjectFactory.create((obj: any): obj is T => isPayload(schema)(obj))\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAA0C;AAInC,IAAM,eAAe,CAAC,QAA6B;AACxD,UAAI,wBAAS,GAAG,GAAG;AACjB,WAAO,OAAO,IAAI,WAAW;AAAA,EAC/B;AACA,SAAO;AACT;AAEO,IAAM,YACX,CAAoB,WACpB,CAAC,QAAuB;AACtB,MAAI,aAAa,GAAG,GAAG;AACrB,WAAO,OAAO,SAAS,IAAI,MAAM;AAAA,EACnC;AACA,SAAO;AACT;AAEK,IAAM,YAAY,CAAoB,WAAqB,8BAAgB,OAAO,CAAC,QAAuB,UAAU,MAAM,EAAE,GAAG,CAAC;","names":[]}
|
package/dist/node/isPayload.mjs
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// src/isPayload.ts
|
|
2
|
-
import { AsObjectFactory, isObject } from "@xyo-network/object";
|
|
3
|
-
var isAnyPayload = (obj) => {
|
|
4
|
-
if (isObject(obj)) {
|
|
5
|
-
return typeof obj.schema === "string";
|
|
6
|
-
}
|
|
7
|
-
return false;
|
|
8
|
-
};
|
|
9
|
-
var isPayload = (schema) => (obj) => {
|
|
10
|
-
if (isAnyPayload(obj)) {
|
|
11
|
-
return schema.includes(obj.schema);
|
|
12
|
-
}
|
|
13
|
-
return false;
|
|
14
|
-
};
|
|
15
|
-
var asPayload = (schema) => AsObjectFactory.create((obj) => isPayload(schema)(obj));
|
|
16
|
-
export {
|
|
17
|
-
asPayload,
|
|
18
|
-
isAnyPayload,
|
|
19
|
-
isPayload
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=isPayload.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/isPayload.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { AsObjectFactory, isObject } from '@xyo-network/object'\n\nimport { Payload } from './Payload'\n\nexport const isAnyPayload = (obj: any): obj is Payload => {\n if (isObject(obj)) {\n return typeof obj.schema === 'string'\n }\n return false\n}\n\nexport const isPayload =\n <T extends Payload>(schema: string[]) =>\n (obj: any): obj is T => {\n if (isAnyPayload(obj)) {\n return schema.includes(obj.schema)\n }\n return false\n }\n\nexport const asPayload = <T extends Payload>(schema: string[]) => AsObjectFactory.create((obj: any): obj is T => isPayload(schema)(obj))\n"],"mappings":";AACA,SAAS,iBAAiB,gBAAgB;AAInC,IAAM,eAAe,CAAC,QAA6B;AACxD,MAAI,SAAS,GAAG,GAAG;AACjB,WAAO,OAAO,IAAI,WAAW;AAAA,EAC/B;AACA,SAAO;AACT;AAEO,IAAM,YACX,CAAoB,WACpB,CAAC,QAAuB;AACtB,MAAI,aAAa,GAAG,GAAG;AACrB,WAAO,OAAO,SAAS,IAAI,MAAM;AAAA,EACnC;AACA,SAAO;AACT;AAEK,IAAM,YAAY,CAAoB,WAAqB,gBAAgB,OAAO,CAAC,QAAuB,UAAU,MAAM,EAAE,GAAG,CAAC;","names":[]}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/isPayloadOfSchemaType.ts
|
|
21
|
-
var isPayloadOfSchemaType_exports = {};
|
|
22
|
-
__export(isPayloadOfSchemaType_exports, {
|
|
23
|
-
isPayloadOfSchemaType: () => isPayloadOfSchemaType
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(isPayloadOfSchemaType_exports);
|
|
26
|
-
var isPayloadOfSchemaType = (schema) => {
|
|
27
|
-
return (x) => (x == null ? void 0 : x.schema) === schema;
|
|
28
|
-
};
|
|
29
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
30
|
-
0 && (module.exports = {
|
|
31
|
-
isPayloadOfSchemaType
|
|
32
|
-
});
|
|
33
|
-
//# sourceMappingURL=isPayloadOfSchemaType.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/isPayloadOfSchemaType.ts"],"sourcesContent":["import { Payload } from './Payload'\n\nexport const isPayloadOfSchemaType = <T extends Payload>(schema: string) => {\n return (x?: Payload | null): x is T => x?.schema === schema\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,IAAM,wBAAwB,CAAoB,WAAmB;AAC1E,SAAO,CAAC,OAA+B,uBAAG,YAAW;AACvD;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/isPayloadOfSchemaType.ts"],"sourcesContent":["import { Payload } from './Payload'\n\nexport const isPayloadOfSchemaType = <T extends Payload>(schema: string) => {\n return (x?: Payload | null): x is T => x?.schema === schema\n}\n"],"mappings":";AAEO,IAAM,wBAAwB,CAAoB,WAAmB;AAC1E,SAAO,CAAC,OAA+B,uBAAG,YAAW;AACvD;","names":[]}
|