Skip to content

Commit

Permalink
Merge pull request #1471 from fedspendingtransparency/FDG-8732-ocr
Browse files Browse the repository at this point in the history
FDG-8732 promote FBP to prod -> OCR
  • Loading branch information
jdach authored Oct 30, 2024
2 parents 93c6e87 + 1eef983 commit 4702024
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 186 deletions.
97 changes: 2 additions & 95 deletions env/qat.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,100 +5,7 @@ module.exports = {
DATA_DOWNLOAD_BASE_URL: 'https://fiscaldata.treasury.gov',
WEB_SOCKET_BASE_URL: 'wss://downloads.fiscaldata.treasury.gov/main',
EXPERIMENTAL_WHITELIST: ['experimental-page', 'afg-overview', 'publishedReportsSection'],
ADDITIONAL_DATASETS: {
'015-BFS-2024Q1-003': {
slug: '/fbp-detailed-principal-accrued-interest/',
seoConfig: {
pageTitle: 'Federal Borrowings Program: Detailed Principal and Accrued Interest Report',
description:
"U.S. Treasury loans and interest receivable balances associated with each individual borrowing agency's expenditure Treasury Account Symbol.",
keywords: 'Debt, Financial Summaries',
},
topics: ['debt', 'financial-summaries'],
relatedDatasets: ['015-BFS-2014Q3-038', '015-BFS-2014Q3-037'],
currentDateButton: 'byMonth',
disableAllTables: true,
sharedApiFilterOptions: true,
},
},
ADDITIONAL_DATASETS: {},
USE_MOCK_RELEASE_CALENDAR_DATA_ON_API_FAIL: true,
ADDITIONAL_ENDPOINTS: {
//FBP
'313': {
endpoint: 'v1/accounting/od/fbp_balances',
dateField: 'record_date',
downloadName: 'FBP_Balances',
alwaysSortWith: ['sort_order_primary', 'sort_order_secondary', 'maturity_date'],
hideColumns: [],
selectColumns: [
'record_date',
'account_nbr',
'account_desc',
'security_nbr',
'segment_desc',
'loans_receivable_amt',
'interest_receivable_amt',
'maturity_date',
'interest_rate_pct',
'amortization_amt',
'capitalized_int_receivable_amt',
],
apiFilter: {
field: 'account_nbr',
labelField: 'account_desc',
filterEndpoint: 'v1/accounting/od/fbp_dpai_account_summary',
downloadLabel: 'Account',
label: 'Choose an Account',
disableDateRangeFilter: true,
dataDefaultHeader: 'This table requires additional filters.',
dataDefaultMessage: 'Select an account in the filter section above to display the data.',
dataUnmatchedHeader: 'There is no data to display based on the current filters selected.',
dataUnmatchedMessage: 'Select a different account and/or date range in order to preview the data.',
dataSearchLabel: 'Search account descriptions',
notice: 'Date fields on Fiscal Data may differ from the published dates for corresponding reports on TreasuryDirect.',
},
},
// FBP
'314': {
endpoint: 'v1/accounting/od/fbp_future_dated_transactions',
dateField: 'settle_date',
downloadName: 'FBP_FutureDatedTransactions',
alwaysSortWith: ['sort_order_primary', 'sort_order_secondary', 'security_nbr'],
hideColumns: [],
selectColumns: [
'record_date',
'account_nbr',
'account_desc',
'security_nbr',
'segment_desc',
'loans_receivable_amt',
'interest_receivable_amt',
'effective_date',
'settle_date',
'transaction_cd',
'memo_nbr',
'amortization_amt',
'capitalized_int_receivable_amt',
],
apiFilter: {
field: 'account_nbr',
labelField: 'account_desc',
filterEndpoint: 'v1/accounting/od/fbp_dpai_account_summary',
downloadLabel: 'Account',
label: 'Choose an Account',
disableDateRangeFilter: true,
dataDefaultHeader: 'This table requires additional filters.',
dataDefaultMessage: 'Select an account in the filter section above to display the data.',
dataUnmatchedHeader: 'There is no data to display based on the current filters selected.',
dataUnmatchedMessage: 'Select a different account and/or date range in order to preview the data.',
dataSearchLabel: 'Search account descriptions',
notice: 'Date fields on Fiscal Data may differ from the published dates for corresponding reports on TreasuryDirect.',
customDateFilter: {
startDateField: 'settle_date',
endDateField: 'effective_date',
dateRange: 'endOfMonth',
},
},
},
},
ADDITIONAL_ENDPOINTS: {},
};
91 changes: 0 additions & 91 deletions env/uat.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,6 @@ module.exports = {
relatedDatasets: ['015-BFS-2020Q4-xx', '015-BFS-2014Q1-03', '015-BFS-2014Q1-13', '015-BFS-2017Q2-003'],
currentDateButton: 'byMonth',
},
'015-BFS-2024Q1-003': {
slug: '/fbp-detailed-principal-accrued-interest/',
seoConfig: {
pageTitle: 'Federal Borrowings Program: Detailed Principal and Accrued Interest Report',
description:
"U.S. Treasury loans and interest receivable balances associated with each individual borrowing agency's expenditure Treasury Account Symbol.",
keywords: 'Debt, Financial Summaries',
},
topics: ['debt', 'financial-summaries'],
relatedDatasets: ['015-BFS-2014Q3-038', '015-BFS-2014Q3-037'],
currentDateButton: 'byMonth',
disableAllTables: true,
sharedApiFilterOptions: true,
},
},
ADDITIONAL_ENDPOINTS: {
'160': {
Expand Down Expand Up @@ -177,83 +163,6 @@ module.exports = {
alwaysSortWith: ['-record_date', 'src_line_nbr'],
selectColumns: [],
},
// FBP
'313': {
endpoint: 'v1/accounting/od/fbp_balances',
dateField: 'record_date',
downloadName: 'FBP_Balances',
alwaysSortWith: ['sort_order_primary', 'sort_order_secondary', 'maturity_date'],
hideColumns: [],
selectColumns: [
'record_date',
'account_nbr',
'account_desc',
'security_nbr',
'segment_desc',
'loans_receivable_amt',
'interest_receivable_amt',
'maturity_date',
'interest_rate_pct',
'amortization_amt',
'capitalized_int_receivable_amt',
],
apiFilter: {
field: 'account_nbr',
labelField: 'account_desc',
filterEndpoint: 'v1/accounting/od/fbp_dpai_account_summary',
downloadLabel: 'Account',
label: 'Choose an Account',
disableDateRangeFilter: true,
dataDefaultHeader: 'This table requires additional filters.',
dataDefaultMessage: 'Select an account in the filter section above to display the data.',
dataUnmatchedHeader: 'There is no data to display based on the current filters selected.',
dataUnmatchedMessage: 'Select a different account and/or date range in order to preview the data.',
dataSearchLabel: 'Search account descriptions',
notice: 'Date fields on Fiscal Data may differ from the published dates for corresponding reports on TreasuryDirect.',
},
},
// FBP
'314': {
endpoint: 'v1/accounting/od/fbp_future_dated_transactions',
dateField: 'settle_date',
downloadName: 'FBP_FutureDatedTransactions',
alwaysSortWith: ['sort_order_primary', 'sort_order_secondary', 'security_nbr'],
hideColumns: [],
selectColumns: [
'record_date',
'account_nbr',
'account_desc',
'security_nbr',
'segment_desc',
'loans_receivable_amt',
'interest_receivable_amt',
'effective_date',
'settle_date',
'transaction_cd',
'memo_nbr',
'amortization_amt',
'capitalized_int_receivable_amt',
],
apiFilter: {
field: 'account_nbr',
labelField: 'account_desc',
filterEndpoint: 'v1/accounting/od/fbp_dpai_account_summary',
downloadLabel: 'Account',
label: 'Choose an Account',
disableDateRangeFilter: true,
dataDefaultHeader: 'This table requires additional filters.',
dataDefaultMessage: 'Select an account in the filter section above to display the data.',
dataUnmatchedHeader: 'There is no data to display based on the current filters selected.',
dataUnmatchedMessage: 'Select a different account and/or date range in order to preview the data.',
dataSearchLabel: 'Search account descriptions',
notice: 'Date fields on Fiscal Data may differ from the published dates for corresponding reports on TreasuryDirect.',
customDateFilter: {
startDateField: 'settle_date',
endDateField: 'effective_date',
dateRange: 'endOfMonth',
},
},
},
// TRRE Clean
'318': {
endpoint: 'v1/accounting/od/rates_of_exchange_clean_values',
Expand Down
77 changes: 77 additions & 0 deletions src/transform/endpointConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -2597,6 +2597,83 @@ const endpointConfig = {
hideColumns: ['operation_date'],
selectColumns: ['cusip_nbr', 'coupon_rate_pct', 'maturity_date', 'par_amt_accepted', 'weighted_avg_accepted_price'],
},
//FBP
'313': {
endpoint: 'v1/accounting/od/fbp_balances',
dateField: 'record_date',
downloadName: 'FBP_Balances',
alwaysSortWith: ['sort_order_primary', 'sort_order_secondary', 'maturity_date'],
hideColumns: [],
selectColumns: [
'record_date',
'account_nbr',
'account_desc',
'security_nbr',
'segment_desc',
'loans_receivable_amt',
'interest_receivable_amt',
'maturity_date',
'interest_rate_pct',
'amortization_amt',
'capitalized_int_receivable_amt',
],
apiFilter: {
field: 'account_nbr',
labelField: 'account_desc',
filterEndpoint: 'v1/accounting/od/fbp_dpai_account_summary',
downloadLabel: 'Account',
label: 'Choose an Account',
disableDateRangeFilter: true,
dataDefaultHeader: 'This table requires additional filters.',
dataDefaultMessage: 'Select an account in the filter section above to display the data.',
dataUnmatchedHeader: 'There is no data to display based on the current filters selected.',
dataUnmatchedMessage: 'Select a different account and/or date range in order to preview the data.',
dataSearchLabel: 'Search account descriptions',
notice: 'Date fields on Fiscal Data may differ from the published dates for corresponding reports on TreasuryDirect.',
},
},
// FBP
'314': {
endpoint: 'v1/accounting/od/fbp_future_dated_transactions',
dateField: 'settle_date',
downloadName: 'FBP_FutureDatedTransactions',
alwaysSortWith: ['sort_order_primary', 'sort_order_secondary', 'security_nbr'],
hideColumns: [],
selectColumns: [
'record_date',
'account_nbr',
'account_desc',
'security_nbr',
'segment_desc',
'loans_receivable_amt',
'interest_receivable_amt',
'effective_date',
'settle_date',
'transaction_cd',
'memo_nbr',
'amortization_amt',
'capitalized_int_receivable_amt',
],
apiFilter: {
field: 'account_nbr',
labelField: 'account_desc',
filterEndpoint: 'v1/accounting/od/fbp_dpai_account_summary',
downloadLabel: 'Account',
label: 'Choose an Account',
disableDateRangeFilter: true,
dataDefaultHeader: 'This table requires additional filters.',
dataDefaultMessage: 'Select an account in the filter section above to display the data.',
dataUnmatchedHeader: 'There is no data to display based on the current filters selected.',
dataUnmatchedMessage: 'Select a different account and/or date range in order to preview the data.',
dataSearchLabel: 'Search account descriptions',
notice: 'Date fields on Fiscal Data may differ from the published dates for corresponding reports on TreasuryDirect.',
customDateFilter: {
startDateField: 'settle_date',
endDateField: 'effective_date',
dateRange: 'endOfMonth',
},
},
},
};

const setCompleteTableDisplayItem = response => {
Expand Down
14 changes: 14 additions & 0 deletions src/transform/static-metadata/datasets.json
Original file line number Diff line number Diff line change
Expand Up @@ -611,5 +611,19 @@
"topics": ["debt", "financial-summaries"],
"relatedDatasets": ["015-BFS-2014Q3-093"],
"currentDateButton": "byFullMonth"
},
"015-BFS-2024Q1-003": {
"slug": "/fbp-distribution-transaction-data/",
"seoConfig": {
"pageTitle": "Federal Borrowings Program Distribution and Transaction Data",
"description":
"U.S. Treasury loans and interest receivable balances associated with each individual borrowing agency's expenditure Treasury Account Symbol.",
"keywords": "Debt, Financial Summaries"
},
"topics": ["debt", "financial-summaries"],
"relatedDatasets": ["015-BFS-2014Q3-038", "015-BFS-2014Q3-037"],
"currentDateButton": "byMonth",
"disableAllTables": true,
"sharedApiFilterOptions": true
}
}

0 comments on commit 4702024

Please sign in to comment.