async function generateOneFileUsingCurrentTimeToDeriveDayIndex()

in src/main.ts [100:120]


async function generateOneFileUsingCurrentTimeToDeriveDayIndex(
    zuoraBearerToken: string,
    salesforceSSMConfig: SalesforceSSMConfig,
    identityAPIBearerToken: string,
) {
    // This function generates a file whose index is derived from the current hour of the day
    // It is the function that is naturally triggered when the lambda runs on schedule.

    const dayIndex = getDayOffsetToGenerate();

    if (dayIndex === null) {
        return;
    }

    await generateFileForDay(
        zuoraBearerToken,
        salesforceSSMConfig,
        identityAPIBearerToken,
        dayIndex,
    );
}