Skip to content

Commit

Permalink
feat: add CatalystDeployment type
Browse files Browse the repository at this point in the history
  • Loading branch information
aleortega committed Jul 16, 2024
1 parent 9ad84bb commit acae993
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions src/misc/catalyst-deployment.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { JSONSchema, generateLazyValidator, ValidateFunction } from '../validation'
import { AuthChain } from './auth-chain'

export type CatalystDeployment = {
entity: {
entityId: string
entityType: string
authChain: AuthChain
metadata?: any
}
}

export namespace CatalystDeployment {
export const schema: JSONSchema<CatalystDeployment> = {
type: 'object',
required: ['entity'],
properties: {
entity: {
type: 'object',
required: ['entityId', 'entityType', 'authChain'],
properties: {
entityId: { type: 'string' },
entityType: { type: 'string' },
authChain: AuthChain.schema,
metadata: { type: 'object', additionalProperties: true, nullable: true }
},
additionalProperties: true
}
// Removed 'lods', 'contentServerUrls', and 'force' as they are not defined in the CatalystDeployment type
},
additionalProperties: true
}

export const validate: ValidateFunction<CatalystDeployment> = generateLazyValidator(schema)
}

0 comments on commit acae993

Please sign in to comment.