"use strict";
// SPDX-License-Identifier: Apache-2.0
Object.defineProperty(exports, "__esModule", { value: true });
exports.RevokeKycCommandFixture = exports.SignedCredentialFixture = exports.GrantKycCommandFixture = exports.KycFixture = exports.IsInternalKycActivatedRequestFixture = exports.DeactivateInternalKycRequestFixture = exports.KycAccountDataFixture = exports.GetKycStatusForQueryFixture = exports.ActivateInternalKycRequestFixture = exports.GetKycStatusForRequestFixture = exports.GetKycAccountsDataRequestFixture = exports.GetKycAccountsCountRequestFixture = exports.GetKycForRequestFixture = exports.RevokeKycRequestFixture = exports.GrantKycRequestFixture = exports.GetKycForQueryFixture = exports.IsInternalKycActivatedQueryFixture = exports.GetKycAccountsDataQueryFixture = exports.DeactivateInternalKycCommandFixture = exports.GetKycAccountsCountQueryFixture = exports.ActivateInternalKycCommandFixture = void 0;
const config_1 = require("../config");
const DataFixture_1 = require("../shared/DataFixture");
exports.ActivateInternalKycCommandFixture = (0, config_1.createFixture)((command) => {
    command.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
});
exports.GetKycAccountsCountQueryFixture = (0, config_1.createFixture)((query) => {
    query.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    query.kycStatus.faker((faker) => faker.number.int({ min: 0, max: 1 }));
});
exports.DeactivateInternalKycCommandFixture = (0, config_1.createFixture)((command) => {
    command.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
});
exports.GetKycAccountsDataQueryFixture = (0, config_1.createFixture)((query) => {
    query.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    query.kycStatus.faker((faker) => faker.number.int({ min: 0, max: 1 }));
    query.start.faker((faker) => faker.number.int({ min: 1, max: 999 }));
    query.end.faker((faker) => faker.number.int({ min: 1, max: 999 }));
});
exports.IsInternalKycActivatedQueryFixture = (0, config_1.createFixture)((command) => {
    command.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
});
exports.GetKycForQueryFixture = (0, config_1.createFixture)((query) => {
    query.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    query.targetId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
});
exports.GrantKycRequestFixture = (0, config_1.createFixture)((request) => {
    request.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    request.targetId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    request.vcBase64.faker((faker) => Buffer.from(faker.lorem.paragraph()).toString("base64"));
});
exports.RevokeKycRequestFixture = (0, config_1.createFixture)((request) => {
    request.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    request.targetId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
});
exports.GetKycForRequestFixture = (0, config_1.createFixture)((request) => {
    request.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    request.targetId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
});
exports.GetKycAccountsCountRequestFixture = (0, config_1.createFixture)((request) => {
    request.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    request.kycStatus.faker((faker) => faker.number.int({ min: 0, max: 1 }));
});
exports.GetKycAccountsDataRequestFixture = (0, config_1.createFixture)((request) => {
    request.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    request.kycStatus.faker((faker) => faker.number.int({ min: 0, max: 1 }));
    request.start.faker((faker) => faker.number.int({ min: 0, max: 1 }));
    request.end.faker((faker) => faker.number.int({ min: 0, max: 1 }));
});
exports.GetKycStatusForRequestFixture = (0, config_1.createFixture)((request) => {
    request.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    request.targetId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
});
exports.ActivateInternalKycRequestFixture = (0, config_1.createFixture)((request) => {
    request.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
});
exports.GetKycStatusForQueryFixture = (0, config_1.createFixture)((query) => {
    query.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    query.targetId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
});
exports.KycAccountDataFixture = (0, config_1.createFixture)((props) => {
    props.account.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    props.validFrom.faker((faker) => faker.date.past());
    props.validTo.faker((faker) => faker.date.future());
    props.vcId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    props.issuer.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    props.status.faker((faker) => faker.number.int({ min: 0, max: 1 }));
});
exports.DeactivateInternalKycRequestFixture = (0, config_1.createFixture)((request) => {
    request.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
});
exports.IsInternalKycActivatedRequestFixture = (0, config_1.createFixture)((request) => {
    request.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
});
exports.KycFixture = (0, config_1.createFixture)((props) => {
    props.validFrom.faker((faker) => faker.date.past().getTime().toString());
    props.validTo.faker((faker) => faker.date.future().getTime().toString());
    props.vcId.faker((faker) => faker.number.int({ min: 1, max: 999 }));
    props.issuer.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    props.status.faker((faker) => faker.number.int({ min: 0, max: 1 }));
});
exports.GrantKycCommandFixture = (0, config_1.createFixture)((command) => {
    command.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    command.targetId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    command.vcBase64.faker((faker) => faker.string.alphanumeric);
});
exports.SignedCredentialFixture = (0, config_1.createFixture)((credential) => {
    credential.id.faker((faker) => faker.string.uuid());
    let validFrom;
    credential.validFrom?.faker((faker) => {
        validFrom = faker.date.future();
        return validFrom.getTime().toString();
    });
    credential.validUntil?.faker((faker) => faker.date.future({ refDate: validFrom }).getTime().toString());
});
exports.RevokeKycCommandFixture = (0, config_1.createFixture)((command) => {
    command.securityId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
    command.targetId.as(() => DataFixture_1.HederaIdPropsFixture.create().value);
});
