@xyo-network/payload-model 2.64.10 → 2.65.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.
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ModuleErrorSchema = void 0;
4
+ exports.ModuleErrorSchema = 'network.xyo.error.module';
5
+ //# sourceMappingURL=Error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Error.js","sourceRoot":"","sources":["../../src/Error.ts"],"names":[],"mappings":";;;AAGa,QAAA,iBAAiB,GAAsB,0BAA0B,CAAA"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Query.js","sourceRoot":"","sources":["../../src/Query.ts"],"names":[],"mappings":""}
package/dist/cjs/index.js CHANGED
@@ -2,8 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./EmptyPayload"), exports);
5
+ tslib_1.__exportStar(require("./Error"), exports);
5
6
  tslib_1.__exportStar(require("./isPayloadOfSchemaType"), exports);
6
7
  tslib_1.__exportStar(require("./Payload"), exports);
7
8
  tslib_1.__exportStar(require("./PayloadFindFilter"), exports);
8
9
  tslib_1.__exportStar(require("./PayloadSet"), exports);
10
+ tslib_1.__exportStar(require("./Query"), exports);
9
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,yDAA8B;AAC9B,kEAAuC;AACvC,oDAAyB;AACzB,8DAAmC;AACnC,uDAA4B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,yDAA8B;AAC9B,kDAAuB;AACvB,kEAAuC;AACvC,oDAAyB;AACzB,8DAAmC;AACnC,uDAA4B;AAC5B,kDAAuB"}
@@ -0,0 +1,2 @@
1
+ export const ModuleErrorSchema = 'network.xyo.error.module';
2
+ //# sourceMappingURL=Error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Error.js","sourceRoot":"","sources":["../../src/Error.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,iBAAiB,GAAsB,0BAA0B,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Query.js","sourceRoot":"","sources":["../../src/Query.ts"],"names":[],"mappings":""}
package/dist/esm/index.js CHANGED
@@ -1,6 +1,8 @@
1
1
  export * from './EmptyPayload';
2
+ export * from './Error';
2
3
  export * from './isPayloadOfSchemaType';
3
4
  export * from './Payload';
4
5
  export * from './PayloadFindFilter';
5
6
  export * from './PayloadSet';
7
+ export * from './Query';
6
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,yBAAyB,CAAA;AACvC,cAAc,WAAW,CAAA;AACzB,cAAc,qBAAqB,CAAA;AACnC,cAAc,cAAc,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,SAAS,CAAA;AACvB,cAAc,yBAAyB,CAAA;AACvC,cAAc,WAAW,CAAA;AACzB,cAAc,qBAAqB,CAAA;AACnC,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA"}
@@ -0,0 +1,11 @@
1
+ import { Payload } from './Payload';
2
+ export type ModuleErrorSchema = 'network.xyo.error.module';
3
+ export declare const ModuleErrorSchema: ModuleErrorSchema;
4
+ export type ModuleError = Payload<{
5
+ message?: string;
6
+ name?: string;
7
+ query?: string;
8
+ schema: ModuleErrorSchema;
9
+ sources?: string[];
10
+ }>;
11
+ //# sourceMappingURL=Error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Error.d.ts","sourceRoot":"","sources":["../../src/Error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC,MAAM,MAAM,iBAAiB,GAAG,0BAA0B,CAAA;AAC1D,eAAO,MAAM,iBAAiB,EAAE,iBAA8C,CAAA;AAE9E,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,iBAAiB,CAAA;IACzB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;CACnB,CAAC,CAAA"}
@@ -0,0 +1,13 @@
1
+ import { Payload } from './Payload';
2
+ export interface QueryFields {
3
+ /** @field The addresses of the intended handlers */
4
+ address?: string | [string];
5
+ /** @field The maximum XYO that can be spent executing the query */
6
+ budget?: number;
7
+ /** @field The frequency on which this query can be rerun */
8
+ maxFrequency?: 'once' | 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'year';
9
+ /** @field The starting point for the bidding on the query */
10
+ minBid?: number;
11
+ }
12
+ export type Query<T extends Payload | void = void> = T extends Payload ? Payload<T & QueryFields> : Payload<QueryFields>;
13
+ //# sourceMappingURL=Query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Query.d.ts","sourceRoot":"","sources":["../../src/Query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC,MAAM,WAAW,WAAW;IAC1B,oDAAoD;IACpD,OAAO,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,CAAC,CAAA;IAE3B,mEAAmE;IACnE,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf,4DAA4D;IAC5D,YAAY,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAA;IAExF,6DAA6D;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,MAAM,KAAK,CAAC,CAAC,SAAS,OAAO,GAAG,IAAI,GAAG,IAAI,IAAI,CAAC,SAAS,OAAO,GAAG,OAAO,CAAC,CAAC,GAAG,WAAW,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAAA"}
@@ -1,6 +1,8 @@
1
1
  export * from './EmptyPayload';
2
+ export * from './Error';
2
3
  export * from './isPayloadOfSchemaType';
3
4
  export * from './Payload';
4
5
  export * from './PayloadFindFilter';
5
6
  export * from './PayloadSet';
7
+ export * from './Query';
6
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,yBAAyB,CAAA;AACvC,cAAc,WAAW,CAAA;AACzB,cAAc,qBAAqB,CAAA;AACnC,cAAc,cAAc,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,SAAS,CAAA;AACvB,cAAc,yBAAyB,CAAA;AACvC,cAAc,WAAW,CAAA;AACzB,cAAc,qBAAqB,CAAA;AACnC,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA"}
package/package.json CHANGED
@@ -10,8 +10,8 @@
10
10
  "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues"
11
11
  },
12
12
  "devDependencies": {
13
- "@xylabs/ts-scripts-yarn3": "^2.18.7",
14
- "@xylabs/tsconfig": "^2.18.7",
13
+ "@xylabs/ts-scripts-yarn3": "^2.18.10",
14
+ "@xylabs/tsconfig": "^2.18.10",
15
15
  "typescript": "^5.1.6"
16
16
  },
17
17
  "description": "Primary SDK for using XYO Protocol 2.0",
@@ -47,5 +47,5 @@
47
47
  },
48
48
  "sideEffects": false,
49
49
  "types": "dist/types/index.d.ts",
50
- "version": "2.64.10"
50
+ "version": "2.65.0"
51
51
  }
package/src/Error.ts ADDED
@@ -0,0 +1,12 @@
1
+ import { Payload } from './Payload'
2
+
3
+ export type ModuleErrorSchema = 'network.xyo.error.module'
4
+ export const ModuleErrorSchema: ModuleErrorSchema = 'network.xyo.error.module'
5
+
6
+ export type ModuleError = Payload<{
7
+ message?: string
8
+ name?: string
9
+ query?: string
10
+ schema: ModuleErrorSchema
11
+ sources?: string[]
12
+ }>
package/src/Query.ts ADDED
@@ -0,0 +1,17 @@
1
+ import { Payload } from './Payload'
2
+
3
+ export interface QueryFields {
4
+ /** @field The addresses of the intended handlers */
5
+ address?: string | [string]
6
+
7
+ /** @field The maximum XYO that can be spent executing the query */
8
+ budget?: number
9
+
10
+ /** @field The frequency on which this query can be rerun */
11
+ maxFrequency?: 'once' | 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'year'
12
+
13
+ /** @field The starting point for the bidding on the query */
14
+ minBid?: number
15
+ }
16
+
17
+ export type Query<T extends Payload | void = void> = T extends Payload ? Payload<T & QueryFields> : Payload<QueryFields>
package/src/index.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  export * from './EmptyPayload'
2
+ export * from './Error'
2
3
  export * from './isPayloadOfSchemaType'
3
4
  export * from './Payload'
4
5
  export * from './PayloadFindFilter'
5
6
  export * from './PayloadSet'
7
+ export * from './Query'