"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getBlockchainIntegrationEndpointDetails = exports.PRIVATE_ENDPOINTS = exports.PrivateApiEndpoint = exports.ORIGINATING_SERVICE_HEADER = void 0;
exports.ORIGINATING_SERVICE_HEADER = 'X-DFNS-ORIGINATING-SERVICE';
var PrivateApiEndpoint;
(function (PrivateApiEndpoint) {
    PrivateApiEndpoint["OrgsGetEmployeeById"] = "OrgsGetEmployeeById";
    PrivateApiEndpoint["SignersCoordinatorSignHash"] = "SignersCoordinatorSignHash";
    PrivateApiEndpoint["SignersCoordinatorKeygen"] = "SignersCoordinatorKeygen";
    PrivateApiEndpoint["SignersCoordinatorGetPeers"] = "SignersCoordinatorGetPeers";
    PrivateApiEndpoint["SignersCoordinatorGetPublicKey"] = "SignersCoordinatorGetPublicKey";
    PrivateApiEndpoint["SignersCoordinatorGetPublicKeyAddress"] = "SignersCoordinatorGetPublicKeyAddress";
    PrivateApiEndpoint["PublicKeysGeneratePk"] = "PublicKeysGeneratePk";
    PrivateApiEndpoint["PublicKeysGetPk"] = "PublicKeysGetPk";
    PrivateApiEndpoint["PublicKeysListPks"] = "PublicKeysListPks";
    PrivateApiEndpoint["PublicKeysGetPkAddress"] = "PublicKeysGetPkAddress";
    PrivateApiEndpoint["PermissionsVerifyAuthorization"] = "PermissionsVerifyAuthorization";
    PrivateApiEndpoint["PermissionsListAssignedPermissions"] = "PermissionsListAssignedPermissions";
    PrivateApiEndpoint["PermissionsCreateResourceOwnership"] = "PermissionsCreateResourceOwnership";
    PrivateApiEndpoint["PermissionsGetDynamoPermissionAwareQuery"] = "PermissionsGetDynamoPermissionAwareQuery";
    PrivateApiEndpoint["PermissionsGetPermittedResourceIds"] = "PermissionsGetPermittedResourceIds";
    PrivateApiEndpoint["BlockchainIntegrationsGetAddress"] = "BlockchainIntegrationsGetAddress";
    PrivateApiEndpoint["BlockchainIntegrationsGetBalance"] = "BlockchainIntegrationsGetBalance";
    PrivateApiEndpoint["BlockchainIntegrationsGetNativeBalance"] = "BlockchainIntegrationsGetNativeBalance";
    PrivateApiEndpoint["BlockchainIntegrationsGetAssetBalance"] = "BlockchainIntegrationsGetAssetBalance";
    PrivateApiEndpoint["BlockchainIntegrationsListTransactions"] = "BlockchainIntegrationsListTransactions";
    PrivateApiEndpoint["BlockchainIntegrationsCallContractView"] = "BlockchainIntegrationsCallContractView";
    PrivateApiEndpoint["BlockchainIntegrationsSubmitGenericTransaction"] = "BlockchainIntegrationsSubmitGenericTransaction";
    PrivateApiEndpoint["BlockchainIntegrationsSubmitPaymentTransaction"] = "BlockchainIntegrationsSubmitPaymentTransaction";
    PrivateApiEndpoint["BlockchainIntegrationsGetNft"] = "BlockchainIntegrationsGetNft";
    PrivateApiEndpoint["BlockchainIntegrationsGetNftBalance"] = "BlockchainIntegrationsGetNftBalance";
    PrivateApiEndpoint["BlockchainIntegrationsGetBlock"] = "BlockchainIntegrationsGetBlock";
    PrivateApiEndpoint["BlockchainIntegrationsGetBlockNumber"] = "BlockchainIntegrationsGetBlockNumber";
    PrivateApiEndpoint["BlockchainIntegrationsGetContract"] = "BlockchainIntegrationsGetContract";
    PrivateApiEndpoint["BlockchainIntegrationsGetTransaction"] = "BlockchainIntegrationsGetTransaction";
    PrivateApiEndpoint["BlockchainIntegrationsCheckIsNft"] = "BlockchainIntegrationsCheckIsNft";
    PrivateApiEndpoint["BlockchainIntegrationsStartWalletConnectSession"] = "BlockchainIntegrationsStartWalletConnectSession";
    PrivateApiEndpoint["PaymentsExecuteAssetAccountPayment"] = "PaymentsExecuteAssetAccountPayment";
    PrivateApiEndpoint["AuthV2CreateSignedAuthAttestation"] = "AuthV2CreateSignedAuthAttestation";
    PrivateApiEndpoint["AuthV2CreateOrganizationOwner"] = "AuthV2CreateOrganizationOwner";
})(PrivateApiEndpoint = exports.PrivateApiEndpoint || (exports.PrivateApiEndpoint = {}));
exports.PRIVATE_ENDPOINTS = {
    [PrivateApiEndpoint.OrgsGetEmployeeById]: {
        method: 'POST',
        path: '/orgs/get-employee-by-id',
    },
    [PrivateApiEndpoint.SignersCoordinatorKeygen]: {
        method: 'POST',
        path: '/signers-coordinator/keygen',
    },
    [PrivateApiEndpoint.SignersCoordinatorSignHash]: {
        method: 'POST',
        path: '/signers-coordinator/sign-hash',
    },
    [PrivateApiEndpoint.SignersCoordinatorGetPeers]: {
        method: 'POST',
        path: '/signers-coordinator/get-peers',
    },
    [PrivateApiEndpoint.SignersCoordinatorGetPublicKey]: {
        method: 'POST',
        path: '/signers-coordinator/get-public-key',
    },
    [PrivateApiEndpoint.SignersCoordinatorGetPublicKeyAddress]: {
        method: 'POST',
        path: '/signers-coordinator/get-public-key-address',
    },
    [PrivateApiEndpoint.PublicKeysGeneratePk]: {
        method: 'POST',
        path: '/public-keys-management/generate-pk',
    },
    [PrivateApiEndpoint.PublicKeysGetPk]: {
        method: 'POST',
        path: '/public-keys-management/get-pk',
    },
    [PrivateApiEndpoint.PublicKeysListPks]: {
        method: 'POST',
        path: '/public-keys-management/list-pks',
    },
    [PrivateApiEndpoint.PublicKeysGetPkAddress]: {
        method: 'POST',
        path: '/public-keys-management/get-pk-address',
    },
    [PrivateApiEndpoint.PermissionsVerifyAuthorization]: {
        method: 'POST',
        path: '/permissions/verify-authorization',
    },
    [PrivateApiEndpoint.PermissionsListAssignedPermissions]: {
        method: 'POST',
        path: '/permissions/list-assigned-permissions',
    },
    [PrivateApiEndpoint.PermissionsCreateResourceOwnership]: {
        method: 'POST',
        path: '/permissions/create-resource-ownership',
    },
    [PrivateApiEndpoint.PermissionsGetDynamoPermissionAwareQuery]: {
        method: 'POST',
        path: '/permissions/get-dynamo-permission-aware-query',
    },
    [PrivateApiEndpoint.PermissionsGetPermittedResourceIds]: {
        method: 'POST',
        path: '/permissions/get-permitted-resource-ids',
    },
    [PrivateApiEndpoint.BlockchainIntegrationsGetAddress]: {
        method: 'POST',
        path: `/blockchain/{{network}}/get-address`,
    },
    [PrivateApiEndpoint.BlockchainIntegrationsGetBalance]: {
        method: 'POST',
        path: `/blockchain/{{network}}/get-balance`,
    },
    [PrivateApiEndpoint.BlockchainIntegrationsGetNativeBalance]: {
        method: 'POST',
        path: `/blockchain/{{network}}/get-native-balance`,
    },
    [PrivateApiEndpoint.BlockchainIntegrationsGetAssetBalance]: {
        method: 'POST',
        path: `/blockchain/{{network}}/get-asset-balance`,
    },
    [PrivateApiEndpoint.BlockchainIntegrationsListTransactions]: {
        method: 'POST',
        path: `/blockchain/{{network}}/list-transactions`,
    },
    [PrivateApiEndpoint.BlockchainIntegrationsCallContractView]: {
        method: 'POST',
        path: `/blockchain/{{network}}/call-contract-view`,
    },
    [PrivateApiEndpoint.BlockchainIntegrationsSubmitGenericTransaction]: {
        method: 'POST',
        path: `/blockchain/{{network}}/submit-generic-transaction`,
    },
    [PrivateApiEndpoint.BlockchainIntegrationsSubmitPaymentTransaction]: {
        method: 'POST',
        path: `/blockchain/{{network}}/submit-payment-transaction`,
    },
    [PrivateApiEndpoint.BlockchainIntegrationsGetNft]: {
        method: 'POST',
        path: `/blockchain/{{network}}/get-nft`,
    },
    [PrivateApiEndpoint.BlockchainIntegrationsGetNftBalance]: {
        method: 'POST',
        path: `/blockchain/{{network}}/get-nft-balance`,
    },
    [PrivateApiEndpoint.BlockchainIntegrationsGetBlock]: {
        method: 'POST',
        path: `/blockchain/{{network}}/get-block`,
    },
    [PrivateApiEndpoint.BlockchainIntegrationsGetBlockNumber]: {
        method: 'POST',
        path: `/blockchain/{{network}}/get-block-number`,
    },
    [PrivateApiEndpoint.BlockchainIntegrationsGetContract]: {
        method: 'POST',
        path: `/blockchain/{{network}}/get-contract`,
    },
    [PrivateApiEndpoint.BlockchainIntegrationsGetTransaction]: {
        method: 'POST',
        path: `/blockchain/{{network}}/get-transaction`,
    },
    [PrivateApiEndpoint.BlockchainIntegrationsCheckIsNft]: {
        method: 'POST',
        path: `/blockchain/{{network}}/check-is-nft`,
    },
    [PrivateApiEndpoint.BlockchainIntegrationsStartWalletConnectSession]: {
        method: 'POST',
        path: `/blockchain/{{network}}/start-walletconnect-session`,
    },
    [PrivateApiEndpoint.PaymentsExecuteAssetAccountPayment]: {
        method: 'POST',
        path: `/payments/execute-asset-account-payment`,
    },
    [PrivateApiEndpoint.AuthV2CreateSignedAuthAttestation]: {
        method: 'POST',
        path: `/auth/private/create-signed-attestation`,
    },
    [PrivateApiEndpoint.AuthV2CreateOrganizationOwner]: {
        method: 'POST',
        path: `/auth/private/create-org-owner`,
    },
};
const getBlockchainIntegrationEndpointDetails = (endpoint, network) => {
    const { method, path } = exports.PRIVATE_ENDPOINTS[endpoint];
    if (!path.includes('{{network}}')) {
        throw Error(`Trying to get a blockhain integrations endpoint, but path has no {{network}}`);
    }
    return {
        method,
        path: path.replace(/{{network}}/g, network.toLowerCase()),
    };
};
exports.getBlockchainIntegrationEndpointDetails = getBlockchainIntegrationEndpointDetails;
