@xyo-network/diviner-schema-stats-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,8 +1,9 @@
1
1
  import type { DivinerConfig } from '@xyo-network/diviner-model';
2
- import type { Payload } from '@xyo-network/payload-model';
3
- import { SchemaStatsDivinerSchema } from './Schema.ts';
4
- export type SchemaStatsDivinerConfigSchema = `${SchemaStatsDivinerSchema}.config`;
5
- export declare const SchemaStatsDivinerConfigSchema: SchemaStatsDivinerConfigSchema;
2
+ import { type Payload } from '@xyo-network/payload-model';
3
+ export declare const SchemaStatsDivinerConfigSchema: string & {
4
+ readonly __schema: true;
5
+ };
6
+ export type SchemaStatsDivinerConfigSchema = typeof SchemaStatsDivinerConfigSchema;
6
7
  export type SchemaStatsDivinerConfig<T extends Payload = Payload> = DivinerConfig<T & {
7
8
  schema: SchemaStatsDivinerConfigSchema;
8
9
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AAEtD,MAAM,MAAM,8BAA8B,GAAG,GAAG,wBAAwB,SAAS,CAAA;AACjF,eAAO,MAAM,8BAA8B,EAAE,8BAAqE,CAAA;AAElH,MAAM,MAAM,wBAAwB,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO,IAAI,aAAa,CAC/E,CAAC,GAAG;IACF,MAAM,EAAE,8BAA8B,CAAA;CACvC,CACF,CAAA"}
1
+ {"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,EAAY,KAAK,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAInE,eAAO,MAAM,8BAA8B;;CAAuD,CAAA;AAClG,MAAM,MAAM,8BAA8B,GAAG,OAAO,8BAA8B,CAAA;AAElF,MAAM,MAAM,wBAAwB,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO,IAAI,aAAa,CAC/E,CAAC,GAAG;IACF,MAAM,EAAE,8BAA8B,CAAA;CACvC,CACF,CAAA"}
@@ -1,3 +1,5 @@
1
- export declare const SchemaStatsDivinerSchema: "network.xyo.diviner.schema.stats";
1
+ export declare const SchemaStatsDivinerSchema: "network.xyo.diviner.schema.stats" & {
2
+ readonly __schema: true;
3
+ };
2
4
  export type SchemaStatsDivinerSchema = typeof SchemaStatsDivinerSchema;
3
5
  //# sourceMappingURL=Schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,EAAG,kCAA2C,CAAA;AACnF,MAAM,MAAM,wBAAwB,GAAG,OAAO,wBAAwB,CAAA"}
1
+ {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,wBAAwB;;CAAqD,CAAA;AAC1F,MAAM,MAAM,wBAAwB,GAAG,OAAO,wBAAwB,CAAA"}
@@ -1,8 +1,12 @@
1
+ // src/Config.ts
2
+ import { asSchema as asSchema2 } from "@xyo-network/payload-model";
3
+
1
4
  // src/Schema.ts
2
- var SchemaStatsDivinerSchema = "network.xyo.diviner.schema.stats";
5
+ import { asSchema } from "@xyo-network/payload-model";
6
+ var SchemaStatsDivinerSchema = asSchema("network.xyo.diviner.schema.stats", true);
3
7
 
4
8
  // src/Config.ts
5
- var SchemaStatsDivinerConfigSchema = `${SchemaStatsDivinerSchema}.config`;
9
+ var SchemaStatsDivinerConfigSchema = asSchema2(`${SchemaStatsDivinerSchema}.config`, true);
6
10
 
7
11
  // src/Payload.ts
8
12
  var isSchemaStatsPayload = (x) => x?.schema === SchemaStatsDivinerSchema;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Schema.ts","../../src/Config.ts","../../src/Payload.ts","../../src/Query.ts"],"sourcesContent":["export const SchemaStatsDivinerSchema = 'network.xyo.diviner.schema.stats' as const\nexport type SchemaStatsDivinerSchema = typeof SchemaStatsDivinerSchema\n","import type { DivinerConfig } from '@xyo-network/diviner-model'\nimport type { Payload } from '@xyo-network/payload-model'\n\nimport { SchemaStatsDivinerSchema } from './Schema.ts'\n\nexport type SchemaStatsDivinerConfigSchema = `${SchemaStatsDivinerSchema}.config`\nexport const SchemaStatsDivinerConfigSchema: SchemaStatsDivinerConfigSchema = `${SchemaStatsDivinerSchema}.config`\n\nexport type SchemaStatsDivinerConfig<T extends Payload = Payload> = DivinerConfig<\n T & {\n schema: SchemaStatsDivinerConfigSchema\n }\n>\n","import type { Payload } from '@xyo-network/payload-model'\n\nimport { SchemaStatsDivinerSchema } from './Schema.ts'\n\nexport type SchemaStatsPayload = Payload<{\n count: Record<string, number>\n // the name of the schema that the count is for. If name is undefined, then it is the count for all schemas\n name?: string\n schema: SchemaStatsDivinerSchema\n}>\n\nexport const isSchemaStatsPayload = (x?: Payload | null): x is SchemaStatsPayload => x?.schema === SchemaStatsDivinerSchema\n","import type { Payload, Query } from '@xyo-network/payload-model'\n\nimport { SchemaStatsDivinerSchema } from './Schema.ts'\n\nexport type SchemaStatsQuerySchema = `${SchemaStatsDivinerSchema}.query`\nexport const SchemaStatsQuerySchema: SchemaStatsQuerySchema = `${SchemaStatsDivinerSchema}.query`\n\nexport type SchemaStatsQueryPayload = Query<{ schema: SchemaStatsQuerySchema }>\nexport const isSchemaStatsQueryPayload = (x?: Payload | null): x is SchemaStatsQueryPayload => x?.schema === SchemaStatsQuerySchema\n"],"mappings":";AAAO,IAAM,2BAA2B;;;ACMjC,IAAM,iCAAiE,GAAG,wBAAwB;;;ACKlG,IAAM,uBAAuB,CAAC,MAAgD,GAAG,WAAW;;;ACN5F,IAAM,yBAAiD,GAAG,wBAAwB;AAGlF,IAAM,4BAA4B,CAAC,MAAqD,GAAG,WAAW;","names":[]}
1
+ {"version":3,"sources":["../../src/Config.ts","../../src/Schema.ts","../../src/Payload.ts","../../src/Query.ts"],"sourcesContent":["import type { DivinerConfig } from '@xyo-network/diviner-model'\nimport { asSchema, type Payload } from '@xyo-network/payload-model'\n\nimport { SchemaStatsDivinerSchema } from './Schema.ts'\n\nexport const SchemaStatsDivinerConfigSchema = asSchema(`${SchemaStatsDivinerSchema}.config`, true)\nexport type SchemaStatsDivinerConfigSchema = typeof SchemaStatsDivinerConfigSchema\n\nexport type SchemaStatsDivinerConfig<T extends Payload = Payload> = DivinerConfig<\n T & {\n schema: SchemaStatsDivinerConfigSchema\n }\n>\n","import { asSchema } from '@xyo-network/payload-model'\n\nexport const SchemaStatsDivinerSchema = asSchema('network.xyo.diviner.schema.stats', true)\nexport type SchemaStatsDivinerSchema = typeof SchemaStatsDivinerSchema\n","import type { Payload } from '@xyo-network/payload-model'\n\nimport { SchemaStatsDivinerSchema } from './Schema.ts'\n\nexport type SchemaStatsPayload = Payload<{\n count: Record<string, number>\n // the name of the schema that the count is for. If name is undefined, then it is the count for all schemas\n name?: string\n schema: SchemaStatsDivinerSchema\n}>\n\nexport const isSchemaStatsPayload = (x?: Payload | null): x is SchemaStatsPayload => x?.schema === SchemaStatsDivinerSchema\n","import type { Payload, Query } from '@xyo-network/payload-model'\n\nimport { SchemaStatsDivinerSchema } from './Schema.ts'\n\nexport type SchemaStatsQuerySchema = `${SchemaStatsDivinerSchema}.query`\nexport const SchemaStatsQuerySchema: SchemaStatsQuerySchema = `${SchemaStatsDivinerSchema}.query`\n\nexport type SchemaStatsQueryPayload = Query<{ schema: SchemaStatsQuerySchema }>\nexport const isSchemaStatsQueryPayload = (x?: Payload | null): x is SchemaStatsQueryPayload => x?.schema === SchemaStatsQuerySchema\n"],"mappings":";AACA,SAAS,YAAAA,iBAA8B;;;ACDvC,SAAS,gBAAgB;AAElB,IAAM,2BAA2B,SAAS,oCAAoC,IAAI;;;ADGlF,IAAM,iCAAiCC,UAAS,GAAG,wBAAwB,WAAW,IAAI;;;AEM1F,IAAM,uBAAuB,CAAC,MAAgD,GAAG,WAAW;;;ACN5F,IAAM,yBAAiD,GAAG,wBAAwB;AAGlF,IAAM,4BAA4B,CAAC,MAAqD,GAAG,WAAW;","names":["asSchema","asSchema"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/diviner-schema-stats-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,13 +36,13 @@
36
36
  "!**/*.test.*"
37
37
  ],
38
38
  "dependencies": {
39
- "@xyo-network/diviner-model": "~5.2.25",
40
- "@xyo-network/module-model": "~5.2.25",
41
- "@xyo-network/payload-model": "~5.2.25"
39
+ "@xyo-network/diviner-model": "~5.3.0",
40
+ "@xyo-network/module-model": "~5.3.0",
41
+ "@xyo-network/payload-model": "~5.3.0"
42
42
  },
43
43
  "devDependencies": {
44
- "@xylabs/ts-scripts-yarn3": "~7.2.32",
45
- "@xylabs/tsconfig": "~7.2.32",
44
+ "@xylabs/ts-scripts-yarn3": "~7.3.2",
45
+ "@xylabs/tsconfig": "~7.3.2",
46
46
  "typescript": "~5.9.3"
47
47
  },
48
48
  "publishConfig": {
package/src/Config.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import type { DivinerConfig } from '@xyo-network/diviner-model'
2
- import type { Payload } from '@xyo-network/payload-model'
2
+ import { asSchema, type Payload } from '@xyo-network/payload-model'
3
3
 
4
4
  import { SchemaStatsDivinerSchema } from './Schema.ts'
5
5
 
6
- export type SchemaStatsDivinerConfigSchema = `${SchemaStatsDivinerSchema}.config`
7
- export const SchemaStatsDivinerConfigSchema: SchemaStatsDivinerConfigSchema = `${SchemaStatsDivinerSchema}.config`
6
+ export const SchemaStatsDivinerConfigSchema = asSchema(`${SchemaStatsDivinerSchema}.config`, true)
7
+ export type SchemaStatsDivinerConfigSchema = typeof SchemaStatsDivinerConfigSchema
8
8
 
9
9
  export type SchemaStatsDivinerConfig<T extends Payload = Payload> = DivinerConfig<
10
10
  T & {
package/src/Schema.ts CHANGED
@@ -1,2 +1,4 @@
1
- export const SchemaStatsDivinerSchema = 'network.xyo.diviner.schema.stats' as const
1
+ import { asSchema } from '@xyo-network/payload-model'
2
+
3
+ export const SchemaStatsDivinerSchema = asSchema('network.xyo.diviner.schema.stats', true)
2
4
  export type SchemaStatsDivinerSchema = typeof SchemaStatsDivinerSchema