@xyo-network/payload
Advanced tools
Comparing version 2.22.25 to 2.22.26
import { deepOmitUnderscoreFields, removeEmptyFields, XyoHasher } from '@xyo-network/core'; | ||
export class XyoPayloadBuilder { | ||
_fields = {}; | ||
_previousHash; | ||
_schema; | ||
constructor({ schema }) { | ||
this._fields = {}; | ||
this._schema = schema; | ||
@@ -6,0 +8,0 @@ } |
@@ -5,4 +5,9 @@ import { assertEx } from '@xylabs/sdk-js'; | ||
export class Huri { | ||
originalHref; | ||
protocol; | ||
archivist; | ||
archive; | ||
hash; | ||
isHuri = true; | ||
constructor(huri, { archivistUri } = {}) { | ||
this.isHuri = true; | ||
const huriString = (Huri.isHuri(huri)?.href ?? typeof huri === 'string') ? huri : new XyoAddressValue(huri).hex; | ||
@@ -9,0 +14,0 @@ this.originalHref = huriString; |
@@ -6,5 +6,7 @@ import { domainExists } from '@xyo-network/core'; | ||
export class XyoSchemaNameValidator { | ||
schema; | ||
constructor(schema) { | ||
this.schema = schema; | ||
} | ||
_parts; | ||
/** | ||
@@ -48,2 +50,3 @@ * The schema converted into a string array split on '.' | ||
} | ||
_rootDomain; | ||
/** | ||
@@ -50,0 +53,0 @@ * The rootDomain is the first two levels of the schema, in reverse order |
import { XyoValidatorBase } from '@xyo-network/core'; | ||
import { XyoSchemaNameValidator } from '../SchemaNameValidator'; | ||
export class XyoPayloadBodyValidator extends XyoValidatorBase { | ||
_schemaValidator; | ||
get schemaValidator() { | ||
@@ -5,0 +6,0 @@ this._schemaValidator = this._schemaValidator ?? new XyoSchemaNameValidator(this.obj.schema ?? ''); |
import { XyoValidatorBase } from '@xyo-network/core'; | ||
import { XyoPayloadBodyValidator } from './BodyValidator'; | ||
export class XyoPayloadValidator extends XyoValidatorBase { | ||
body; | ||
constructor(payload) { | ||
@@ -5,0 +6,0 @@ super(payload); |
@@ -14,4 +14,4 @@ { | ||
"@xylabs/sdk-js": "^2.6.2", | ||
"@xyo-network/account": "^2.22.25", | ||
"@xyo-network/core": "^2.22.25", | ||
"@xyo-network/account": "^2.22.26", | ||
"@xyo-network/core": "^2.22.26", | ||
"axios": "^0.27.2" | ||
@@ -56,4 +56,4 @@ }, | ||
"types": "dist/esm/index.d.ts", | ||
"version": "2.22.25", | ||
"version": "2.22.26", | ||
"packageManager": "yarn@3.1.1" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
338566
10921
Updated@xyo-network/core@^2.22.26