// Copyright Abridged, Inc. 2022,2024. All Rights Reserved. // Node module: @collabland/sdk // This file is licensed under the MIT License. // License text available at https://opensource.org/license/mit/ import {model, property} from '@loopback/repository'; /** * The model class is generated from OpenAPI schema - TokenGatingRequest * TokenGatingRequest */ @model({name: 'TokenGatingRequest'}) export class TokenGatingRequest { constructor(data?: Partial) { if (data != null && typeof data === 'object') { Object.assign(this, data); } } /** * Wallet address or account id */ @property({ jsonSchema: { type: 'string', description: 'Wallet address or account id', }, }) account?: string; /** * A list of token granted roles to be enforced */ @property({ jsonSchema: { type: 'array', description: 'A list of token granted roles to be enforced', items: { title: 'TokenGrantedRole', type: 'object', description: "(tsType: Omit, schemaOptions: { title: 'TokenGrantedRole', exclude: [ 'pk', 'platform', 'sk', 'classifier', 'createdTime' ] })", properties: { id: { type: 'string', }, classifierGroup: { type: 'string', }, name: { type: 'string', }, description: { type: 'string', }, roleId: { type: 'string', }, groupId: { type: 'string', }, minToken: { type: 'string', format: 'BigDecimal', }, maxToken: { type: 'string', format: 'BigDecimal', }, chainId: { type: 'number', }, tokenSymbol: { type: 'string', }, tokenId: { type: 'string', }, collectionName: { type: 'string', }, eventId: { type: 'string', }, contractAddress: { type: 'string', }, type: { type: 'string', }, scheme: { type: 'string', }, query: { type: 'string', }, variables: { type: 'object', additionalProperties: true, }, asset: { type: 'string', format: 'CAIPAsset', }, requiresMetadata: { type: 'boolean', }, version: { type: 'string', }, }, additionalProperties: false, }, }, }) rules?: { id?: string; classifierGroup?: string; name?: string; description?: string; roleId?: string; groupId?: string; minToken?: string; maxToken?: string; chainId?: number; tokenSymbol?: string; tokenId?: string; collectionName?: string; eventId?: string; contractAddress?: string; type?: string; scheme?: string; query?: string; variables?: { // eslint-disable-next-line @typescript-eslint/no-explicit-any [additionalProperty: string]: any; }; asset?: string; requiresMetadata?: boolean; version?: string; }[]; /** * Webhook url to be invoked once the access is checked */ @property({ jsonSchema: { type: 'string', description: 'Webhook url to be invoked once the access is checked', }, }) callbackUrl?: string; /** * A flag to control if the response will be sent back asynchronously either via callback or polling */ @property({ jsonSchema: { type: 'boolean', description: 'A flag to control if the response will be sent back asynchronously either via callback or polling', }, }) async?: boolean; } export interface TokenGatingRequestRelations { // describe navigational properties here } export type TokenGatingRequestWithRelations = TokenGatingRequest & TokenGatingRequestRelations;