@xyo-network/diviner-payload-model 5.2.25 → 5.3.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.
@@ -1,9 +1,10 @@
1
1
  import type { EmptyObject, WithAdditional } from '@xylabs/sdk-js';
2
2
  import type { DivinerConfig } from '@xyo-network/diviner-model';
3
- import type { Schema } from '@xyo-network/payload-model';
4
- import { PayloadDivinerSchema } from './Schema.ts';
5
- export type PayloadDivinerConfigSchema = `${PayloadDivinerSchema}.config`;
6
- export declare const PayloadDivinerConfigSchema: PayloadDivinerConfigSchema;
3
+ import { type Schema } from '@xyo-network/payload-model';
4
+ export declare const PayloadDivinerConfigSchema: string & {
5
+ readonly __schema: true;
6
+ };
7
+ export type PayloadDivinerConfigSchema = typeof PayloadDivinerConfigSchema;
7
8
  export type PayloadDivinerConfig<TAdditional extends EmptyObject | void = void, TSchema extends Schema | void = void> = DivinerConfig<WithAdditional<{
8
9
  indexBatchSize?: number;
9
10
  maxIndexSize?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAExD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAElD,MAAM,MAAM,0BAA0B,GAAG,GAAG,oBAAoB,SAAS,CAAA;AACzE,eAAO,MAAM,0BAA0B,EAAE,0BAA6D,CAAA;AAEtG,MAAM,MAAM,oBAAoB,CAAC,WAAW,SAAS,WAAW,GAAG,IAAI,GAAG,IAAI,EAAE,OAAO,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI,IAAI,aAAa,CACnI,cAAc,CACZ;IACE,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,EACD,WAAW,CACZ,EACD,OAAO,SAAS,IAAI,GAAG,MAAM,GAAG,OAAO,CACxC,CAAA"}
1
+ {"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,EAAY,KAAK,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAIlE,eAAO,MAAM,0BAA0B;;CAAmD,CAAA;AAC1F,MAAM,MAAM,0BAA0B,GAAG,OAAO,0BAA0B,CAAA;AAE1E,MAAM,MAAM,oBAAoB,CAAC,WAAW,SAAS,WAAW,GAAG,IAAI,GAAG,IAAI,EAAE,OAAO,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI,IAAI,aAAa,CACnI,cAAc,CACZ;IACE,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,EACD,WAAW,CACZ,EACD,OAAO,SAAS,IAAI,GAAG,MAAM,GAAG,OAAO,CACxC,CAAA"}
@@ -1,9 +1,10 @@
1
1
  import type { EmptyObject } from '@xylabs/sdk-js';
2
2
  import type { Query } from '@xyo-network/payload-model';
3
3
  import type { PayloadDivinerPredicate } from './Predicate.ts';
4
- import { PayloadDivinerSchema } from './Schema.ts';
5
- export type PayloadDivinerQuerySchema = `${PayloadDivinerSchema}.query`;
6
- export declare const PayloadDivinerQuerySchema: PayloadDivinerQuerySchema;
4
+ export declare const PayloadDivinerQuerySchema: string & {
5
+ readonly __schema: true;
6
+ };
7
+ export type PayloadDivinerQuerySchema = typeof PayloadDivinerQuerySchema;
7
8
  export type PayloadDivinerQueryPayload<T extends EmptyObject = EmptyObject> = Query<{
8
9
  schema: PayloadDivinerQuerySchema;
9
10
  } & PayloadDivinerPredicate<T>>;
@@ -1 +1 @@
1
- {"version":3,"file":"Query.d.ts","sourceRoot":"","sources":["../../src/Query.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAEjD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAGvD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAA;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAElD,MAAM,MAAM,yBAAyB,GAAG,GAAG,oBAAoB,QAAQ,CAAA;AACvE,eAAO,MAAM,yBAAyB,EAAE,yBAA2D,CAAA;AAEnG,MAAM,MAAM,0BAA0B,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,IAAI,KAAK,CACjF;IAAE,MAAM,EAAE,yBAAyB,CAAA;CAAE,GAAG,uBAAuB,CAAC,CAAC,CAAC,CACnE,CAAA;AAED,eAAO,MAAM,4BAA4B,iEAA+E,CAAA;AAExH,eAAO,MAAM,4BAA4B,6EAAuD,CAAA"}
1
+ {"version":3,"file":"Query.d.ts","sourceRoot":"","sources":["../../src/Query.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAEjD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAGvD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAA;AAG7D,eAAO,MAAM,yBAAyB;;CAAkD,CAAA;AACxF,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAA;AAExE,MAAM,MAAM,0BAA0B,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,IAAI,KAAK,CACjF;IAAE,MAAM,EAAE,yBAAyB,CAAA;CAAE,GAAG,uBAAuB,CAAC,CAAC,CAAC,CACnE,CAAA;AAED,eAAO,MAAM,4BAA4B,iEAA+E,CAAA;AAExH,eAAO,MAAM,4BAA4B,6EAAuD,CAAA"}
@@ -1,13 +1,16 @@
1
+ // src/Config.ts
2
+ import { asSchema } from "@xyo-network/payload-model";
3
+
1
4
  // src/Schema.ts
2
5
  var PayloadDivinerSchema = "network.xyo.diviner.payload";
3
6
 
4
7
  // src/Config.ts
5
- var PayloadDivinerConfigSchema = `${PayloadDivinerSchema}.config`;
8
+ var PayloadDivinerConfigSchema = asSchema(`${PayloadDivinerSchema}.config`, true);
6
9
 
7
10
  // src/Query.ts
8
11
  import { AsObjectFactory } from "@xylabs/sdk-js";
9
- import { isPayloadOfSchemaType } from "@xyo-network/payload-model";
10
- var PayloadDivinerQuerySchema = `${PayloadDivinerSchema}.query`;
12
+ import { asSchema as asSchema2, isPayloadOfSchemaType } from "@xyo-network/payload-model";
13
+ var PayloadDivinerQuerySchema = asSchema2(`${PayloadDivinerSchema}.query`, true);
11
14
  var isPayloadDivinerQueryPayload = isPayloadOfSchemaType(PayloadDivinerQuerySchema);
12
15
  var asPayloadDivinerQueryPayload = AsObjectFactory.create(isPayloadDivinerQueryPayload);
13
16
  export {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Schema.ts","../../src/Config.ts","../../src/Query.ts"],"sourcesContent":["export type PayloadDivinerSchema = 'network.xyo.diviner.payload'\nexport const PayloadDivinerSchema: PayloadDivinerSchema = 'network.xyo.diviner.payload'\n","import type { EmptyObject, WithAdditional } from '@xylabs/sdk-js'\nimport type { DivinerConfig } from '@xyo-network/diviner-model'\nimport type { Schema } from '@xyo-network/payload-model'\n\nimport { PayloadDivinerSchema } from './Schema.ts'\n\nexport type PayloadDivinerConfigSchema = `${PayloadDivinerSchema}.config`\nexport const PayloadDivinerConfigSchema: PayloadDivinerConfigSchema = `${PayloadDivinerSchema}.config`\n\nexport type PayloadDivinerConfig<TAdditional extends EmptyObject | void = void, TSchema extends Schema | void = void> = DivinerConfig<\n WithAdditional<\n {\n indexBatchSize?: number\n maxIndexSize?: number\n },\n TAdditional\n >,\n TSchema extends void ? Schema : TSchema\n>\n","import type { EmptyObject } from '@xylabs/sdk-js'\nimport { AsObjectFactory } from '@xylabs/sdk-js'\nimport type { Query } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport type { PayloadDivinerPredicate } from './Predicate.ts'\nimport { PayloadDivinerSchema } from './Schema.ts'\n\nexport type PayloadDivinerQuerySchema = `${PayloadDivinerSchema}.query`\nexport const PayloadDivinerQuerySchema: PayloadDivinerQuerySchema = `${PayloadDivinerSchema}.query`\n\nexport type PayloadDivinerQueryPayload<T extends EmptyObject = EmptyObject> = Query<\n { schema: PayloadDivinerQuerySchema } & PayloadDivinerPredicate<T>\n>\n\nexport const isPayloadDivinerQueryPayload = isPayloadOfSchemaType<PayloadDivinerQueryPayload>(PayloadDivinerQuerySchema)\n\nexport const asPayloadDivinerQueryPayload = AsObjectFactory.create(isPayloadDivinerQueryPayload)\n"],"mappings":";AACO,IAAM,uBAA6C;;;ACMnD,IAAM,6BAAyD,GAAG,oBAAoB;;;ACN7F,SAAS,uBAAuB;AAEhC,SAAS,6BAA6B;AAM/B,IAAM,4BAAuD,GAAG,oBAAoB;AAMpF,IAAM,+BAA+B,sBAAkD,yBAAyB;AAEhH,IAAM,+BAA+B,gBAAgB,OAAO,4BAA4B;","names":[]}
1
+ {"version":3,"sources":["../../src/Config.ts","../../src/Schema.ts","../../src/Query.ts"],"sourcesContent":["import type { EmptyObject, WithAdditional } from '@xylabs/sdk-js'\nimport type { DivinerConfig } from '@xyo-network/diviner-model'\nimport { asSchema, type Schema } from '@xyo-network/payload-model'\n\nimport { PayloadDivinerSchema } from './Schema.ts'\n\nexport const PayloadDivinerConfigSchema = asSchema(`${PayloadDivinerSchema}.config`, true)\nexport type PayloadDivinerConfigSchema = typeof PayloadDivinerConfigSchema\n\nexport type PayloadDivinerConfig<TAdditional extends EmptyObject | void = void, TSchema extends Schema | void = void> = DivinerConfig<\n WithAdditional<\n {\n indexBatchSize?: number\n maxIndexSize?: number\n },\n TAdditional\n >,\n TSchema extends void ? Schema : TSchema\n>\n","export type PayloadDivinerSchema = 'network.xyo.diviner.payload'\nexport const PayloadDivinerSchema: PayloadDivinerSchema = 'network.xyo.diviner.payload'\n","import type { EmptyObject } from '@xylabs/sdk-js'\nimport { AsObjectFactory } from '@xylabs/sdk-js'\nimport type { Query } from '@xyo-network/payload-model'\nimport { asSchema, isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport type { PayloadDivinerPredicate } from './Predicate.ts'\nimport { PayloadDivinerSchema } from './Schema.ts'\n\nexport const PayloadDivinerQuerySchema = asSchema(`${PayloadDivinerSchema}.query`, true)\nexport type PayloadDivinerQuerySchema = typeof PayloadDivinerQuerySchema\n\nexport type PayloadDivinerQueryPayload<T extends EmptyObject = EmptyObject> = Query<\n { schema: PayloadDivinerQuerySchema } & PayloadDivinerPredicate<T>\n>\n\nexport const isPayloadDivinerQueryPayload = isPayloadOfSchemaType<PayloadDivinerQueryPayload>(PayloadDivinerQuerySchema)\n\nexport const asPayloadDivinerQueryPayload = AsObjectFactory.create(isPayloadDivinerQueryPayload)\n"],"mappings":";AAEA,SAAS,gBAA6B;;;ACD/B,IAAM,uBAA6C;;;ADKnD,IAAM,6BAA6B,SAAS,GAAG,oBAAoB,WAAW,IAAI;;;AELzF,SAAS,uBAAuB;AAEhC,SAAS,YAAAA,WAAU,6BAA6B;AAKzC,IAAM,4BAA4BC,UAAS,GAAG,oBAAoB,UAAU,IAAI;AAOhF,IAAM,+BAA+B,sBAAkD,yBAAyB;AAEhH,IAAM,+BAA+B,gBAAgB,OAAO,4BAA4B;","names":["asSchema","asSchema"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/diviner-payload-model",
3
- "version": "5.2.25",
3
+ "version": "5.3.0",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -36,14 +36,14 @@
36
36
  "!**/*.test.*"
37
37
  ],
38
38
  "dependencies": {
39
- "@xylabs/sdk-js": "~5.0.63",
40
- "@xyo-network/diviner-model": "~5.2.25",
41
- "@xyo-network/module-model": "~5.2.25",
42
- "@xyo-network/payload-model": "~5.2.25"
39
+ "@xylabs/sdk-js": "~5.0.64",
40
+ "@xyo-network/diviner-model": "~5.3.0",
41
+ "@xyo-network/module-model": "~5.3.0",
42
+ "@xyo-network/payload-model": "~5.3.0"
43
43
  },
44
44
  "devDependencies": {
45
- "@xylabs/ts-scripts-yarn3": "~7.2.32",
46
- "@xylabs/tsconfig": "~7.2.32",
45
+ "@xylabs/ts-scripts-yarn3": "~7.3.2",
46
+ "@xylabs/tsconfig": "~7.3.2",
47
47
  "typescript": "~5.9.3"
48
48
  },
49
49
  "publishConfig": {
package/src/Config.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  import type { EmptyObject, WithAdditional } from '@xylabs/sdk-js'
2
2
  import type { DivinerConfig } from '@xyo-network/diviner-model'
3
- import type { Schema } from '@xyo-network/payload-model'
3
+ import { asSchema, type Schema } from '@xyo-network/payload-model'
4
4
 
5
5
  import { PayloadDivinerSchema } from './Schema.ts'
6
6
 
7
- export type PayloadDivinerConfigSchema = `${PayloadDivinerSchema}.config`
8
- export const PayloadDivinerConfigSchema: PayloadDivinerConfigSchema = `${PayloadDivinerSchema}.config`
7
+ export const PayloadDivinerConfigSchema = asSchema(`${PayloadDivinerSchema}.config`, true)
8
+ export type PayloadDivinerConfigSchema = typeof PayloadDivinerConfigSchema
9
9
 
10
10
  export type PayloadDivinerConfig<TAdditional extends EmptyObject | void = void, TSchema extends Schema | void = void> = DivinerConfig<
11
11
  WithAdditional<
package/src/Query.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  import type { EmptyObject } from '@xylabs/sdk-js'
2
2
  import { AsObjectFactory } from '@xylabs/sdk-js'
3
3
  import type { Query } from '@xyo-network/payload-model'
4
- import { isPayloadOfSchemaType } from '@xyo-network/payload-model'
4
+ import { asSchema, isPayloadOfSchemaType } from '@xyo-network/payload-model'
5
5
 
6
6
  import type { PayloadDivinerPredicate } from './Predicate.ts'
7
7
  import { PayloadDivinerSchema } from './Schema.ts'
8
8
 
9
- export type PayloadDivinerQuerySchema = `${PayloadDivinerSchema}.query`
10
- export const PayloadDivinerQuerySchema: PayloadDivinerQuerySchema = `${PayloadDivinerSchema}.query`
9
+ export const PayloadDivinerQuerySchema = asSchema(`${PayloadDivinerSchema}.query`, true)
10
+ export type PayloadDivinerQuerySchema = typeof PayloadDivinerQuerySchema
11
11
 
12
12
  export type PayloadDivinerQueryPayload<T extends EmptyObject = EmptyObject> = Query<
13
13
  { schema: PayloadDivinerQuerySchema } & PayloadDivinerPredicate<T>