"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const types_1 = require("../types");
const queries_1 = require("../queries");
describe('proposalVotes', () => {
    test('should pass the variables to the grapqhl query', () => {
        const variables = {
            pipId: 10,
            vote: false,
            count: 50,
            skip: 0,
            orderBy: {
                field: types_1.ProposalVotesOrderFields.Vote,
                order: types_1.Order.Desc,
            },
        };
        const result = queries_1.proposalVotes(variables);
        expect(result.query).toBeDefined();
        expect(result.variables).toEqual(variables);
    });
});
describe('didsWithClaims', () => {
    test('should pass the variables to the grapqhl query', () => {
        const variables = {
            dids: ['someDid', 'otherDid'],
            scope: { type: types_1.ClaimScopeTypeEnum.Ticker, value: 'someScope' },
            trustedClaimIssuers: ['someTrustedClaim'],
            claimTypes: [types_1.ClaimTypeEnum.Accredited],
            count: 100,
            skip: 0,
        };
        const result = queries_1.didsWithClaims(variables);
        expect(result.query).toBeDefined();
        expect(result.variables).toEqual(variables);
    });
});
describe('eventByIndexedArgs', () => {
    test('should pass the variables to the grapqhl query', () => {
        const variables = {
            moduleId: types_1.ModuleIdEnum.Asset,
            eventId: types_1.EventIdEnum.AssetFrozen,
            eventArg0: 'someData',
        };
        const result = queries_1.eventByIndexedArgs(variables);
        expect(result.query).toBeDefined();
        expect(result.variables).toEqual(variables);
    });
});
describe('eventsByIndexedArgs', () => {
    test('should pass the variables to the grapqhl query', () => {
        const variables = {
            moduleId: types_1.ModuleIdEnum.Asset,
            eventId: types_1.EventIdEnum.AssetFrozen,
            eventArg0: 'someData',
        };
        const result = queries_1.eventsByIndexedArgs(variables);
        expect(result.query).toBeDefined();
        expect(result.variables).toEqual(variables);
    });
});
describe('transactionByHash', () => {
    test('should pass the variables to the grapqhl query', () => {
        const variables = {
            transactionHash: 'someTransactionHash',
        };
        const result = queries_1.transactionByHash(variables);
        expect(result.query).toBeDefined();
        expect(result.variables).toEqual(variables);
    });
});
describe('proposals', () => {
    test('should pass the variables to the grapqhl query', () => {
        const variables = {
            proposers: ['someProposer'],
            states: [types_1.ProposalStateEnum.Scheduled],
            orderBy: {
                field: types_1.ProposalOrderFields.VotesCount,
                order: types_1.Order.Desc,
            },
        };
        const result = queries_1.proposals(variables);
        expect(result.query).toBeDefined();
        expect(result.variables).toEqual(variables);
    });
});
describe('assetsByTrustedClaimIssuer', () => {
    test('should pass the variables to the grapqhl query', () => {
        const variables = {
            claimIssuerDid: 'someDid',
        };
        const result = queries_1.tokensByTrustedClaimIssuer(variables);
        expect(result.query).toBeDefined();
        expect(result.variables).toEqual(variables);
    });
});
describe('assetsHeldByDid', () => {
    test('should pass the variables to the grapqhl query', () => {
        const variables = {
            did: 'someDid',
        };
        const result = queries_1.tokensHeldByDid(variables);
        expect(result.query).toBeDefined();
        expect(result.variables).toEqual(variables);
    });
});
describe('transactions', () => {
    test('should pass the variables to the grapqhl query', () => {
        let result = queries_1.transactions();
        expect(result.query).toBeDefined();
        expect(result.variables).toBeUndefined();
        const variables = {
            address: 'someAddress',
        };
        result = queries_1.transactions(variables);
        expect(result.query).toBeDefined();
        expect(result.variables).toEqual(variables);
    });
});
describe('scopesByIdentity', () => {
    test('should pass the variables to the grapqhl query', () => {
        const variables = {
            did: 'someDid',
        };
        const result = queries_1.scopesByIdentity(variables);
        expect(result.query).toBeDefined();
        expect(result.variables).toEqual(variables);
    });
});
describe('issuerDidsWithClaimsByTarget', () => {
    test('should pass the variables to the grapqhl query', () => {
        const variables = {
            target: 'someDid',
            scope: { type: types_1.ClaimScopeTypeEnum.Identity, value: 'someScope' },
            trustedClaimIssuers: ['aTrustedClaimIssuer'],
        };
        const result = queries_1.issuerDidsWithClaimsByTarget(variables);
        expect(result.query).toBeDefined();
        expect(result.variables).toEqual(variables);
    });
});
describe('proposal', () => {
    test('should pass the variables to the grapqhl query', () => {
        const variables = {
            pipId: 1,
        };
        const result = queries_1.proposal(variables);
        expect(result.query).toBeDefined();
        expect(result.variables).toEqual(variables);
    });
});
describe('eventByAddedTrustedClaimIssuer', () => {
    test('should pass the variables to the grapqhl query', () => {
        const variables = {
            ticker: 'SOME_TICKER',
            identityId: 'someDid',
        };
        const result = queries_1.eventByAddedTrustedClaimIssuer(variables);
        expect(result.query).toBeDefined();
        expect(result.variables).toEqual(variables);
    });
});
describe('settlements', () => {
    test('should pass the variables to the grapqhl query', () => {
        const variables = {
            identityId: 'someIdentityId',
        };
        const result = queries_1.settlements(variables);
        expect(result.query).toBeDefined();
        expect(result.variables).toEqual(variables);
    });
});
describe('investments', () => {
    test('should pass the variables to the grapqhl query', () => {
        const variables = {
            stoId: 1,
            ticker: 'SOME_TICKER',
        };
        const result = queries_1.investments(variables);
        expect(result.query).toBeDefined();
        expect(result.variables).toEqual(variables);
    });
});
describe('getWithholdingTaxesOfCa', () => {
    test('should pass the variables to the grapqhl query', () => {
        const variables = {
            CAId: { ticker: 'SOME_TICKER', localId: 1 },
        };
        const result = queries_1.getWithholdingTaxesOfCa(variables);
        expect(result.query).toBeDefined();
        expect(result.variables).toEqual(variables);
    });
});
describe('getHistoryOfPaymentEventsForCa', () => {
    test('should pass the variables to the grapqhl query', () => {
        const variables = {
            CAId: { ticker: 'SOME_TICKER', localId: 1 },
        };
        const result = queries_1.getHistoryOfPaymentEventsForCa(variables);
        expect(result.query).toBeDefined();
        expect(result.variables).toEqual(variables);
    });
});
describe('tickerExternalAgentHistory', () => {
    test('should pass the variables to the grapqhl query', () => {
        const variables = {
            ticker: 'SOME_TICKER',
        };
        const result = queries_1.tickerExternalAgentHistory(variables);
        expect(result.query).toBeDefined();
        expect(result.variables).toEqual(variables);
    });
});
describe('tickerExternalAgentActions', () => {
    test('should pass the variables to the grapqhl query', () => {
        const variables = {
            ticker: 'SOME_TICKER',
            // eslint-disable-next-line @typescript-eslint/naming-convention
            caller_did: 'someDid',
        };
        const result = queries_1.tickerExternalAgentActions(variables);
        expect(result.query).toBeDefined();
        expect(result.variables).toEqual(variables);
    });
});
//# sourceMappingURL=queries.js.map