@bisondesk/core-sdk 1.0.317 → 1.0.319
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{types/apis → apis}/crm.d.ts +3 -3
- package/lib/apis/crm.d.ts.map +1 -0
- package/lib/{esm/apis → apis}/crm.js +3 -2
- package/lib/apis/crm.js.map +1 -0
- package/lib/{types/apis → apis}/internet-vehicles.d.ts +1 -1
- package/lib/{types/apis → apis}/internet-vehicles.d.ts.map +1 -1
- package/lib/apis/internet-vehicles.js.map +1 -0
- package/lib/{types/apis → apis}/leasing-administration.d.ts +1 -1
- package/lib/{types/apis → apis}/leasing-administration.d.ts.map +1 -1
- package/lib/apis/leasing-administration.js.map +1 -0
- package/lib/{types/apis → apis}/leasing.d.ts +2 -2
- package/lib/{types/apis → apis}/leasing.d.ts.map +1 -1
- package/lib/apis/leasing.js.map +1 -0
- package/lib/{types/apis → apis}/opportunities.d.ts +3 -3
- package/lib/{types/apis → apis}/opportunities.d.ts.map +1 -1
- package/lib/{esm/apis → apis}/opportunities.js +1 -2
- package/lib/{esm/apis → apis}/opportunities.js.map +1 -1
- package/lib/{types/apis → apis}/picklists.d.ts +1 -1
- package/lib/{types/apis → apis}/picklists.d.ts.map +1 -1
- package/lib/apis/picklists.js.map +1 -0
- package/lib/{types/apis → apis}/tenants.d.ts +1 -1
- package/lib/{types/apis → apis}/tenants.d.ts.map +1 -1
- package/lib/apis/tenants.js.map +1 -0
- package/lib/{types/apis → apis}/users.d.ts +1 -1
- package/lib/{types/apis → apis}/users.d.ts.map +1 -1
- package/lib/apis/users.js.map +1 -0
- package/lib/{types/apis → apis}/vehicles.d.ts +2 -2
- package/lib/{types/apis → apis}/vehicles.d.ts.map +1 -1
- package/lib/apis/vehicles.js.map +1 -0
- package/lib/{types/constants.d.ts → constants.d.ts} +1 -1
- package/lib/{types/constants.d.ts.map → constants.d.ts.map} +1 -1
- package/lib/{esm/constants.js → constants.js} +4 -4
- package/lib/{esm/constants.js.map → constants.js.map} +1 -1
- package/lib/types/{types/crm.d.ts → crm.d.ts} +3 -3
- package/lib/types/crm.d.ts.map +1 -0
- package/lib/types/crm.js.map +1 -0
- package/lib/types/{types/definitions.d.ts → definitions.d.ts} +2 -2
- package/lib/types/{types/definitions.d.ts.map → definitions.d.ts.map} +1 -1
- package/lib/types/definitions.js.map +1 -0
- package/lib/types/{types/delivery-settings.d.ts → delivery-settings.d.ts} +2 -2
- package/lib/types/delivery-settings.d.ts.map +1 -0
- package/lib/types/delivery-settings.js.map +1 -0
- package/lib/types/{types/insights.d.ts → insights.d.ts} +2 -2
- package/lib/types/insights.d.ts.map +1 -0
- package/lib/types/insights.js.map +1 -0
- package/lib/types/{types/interests.d.ts → interests.d.ts} +2 -2
- package/lib/types/interests.d.ts.map +1 -0
- package/lib/types/interests.js.map +1 -0
- package/lib/types/internet-opportunities.d.ts +31 -0
- package/lib/types/internet-opportunities.d.ts.map +1 -0
- package/lib/types/internet-opportunities.js +2 -0
- package/lib/types/internet-opportunities.js.map +1 -0
- package/lib/types/{types/internet-vehicles.d.ts → internet-vehicles.d.ts} +3 -3
- package/lib/types/internet-vehicles.d.ts.map +1 -0
- package/lib/types/internet-vehicles.js.map +1 -0
- package/lib/types/{types/leasing-administration.d.ts → leasing-administration.d.ts} +1 -1
- package/lib/types/leasing-administration.d.ts.map +1 -0
- package/lib/types/leasing-administration.js.map +1 -0
- package/lib/types/{types/leasing-debtors.d.ts → leasing-debtors.d.ts} +1 -1
- package/lib/types/{types/leasing-debtors.d.ts.map → leasing-debtors.d.ts.map} +1 -1
- package/lib/types/leasing-debtors.js.map +1 -0
- package/lib/types/{types/leasing-search.d.ts → leasing-search.d.ts} +4 -4
- package/lib/types/leasing-search.d.ts.map +1 -0
- package/lib/types/leasing-search.js.map +1 -0
- package/lib/types/{types/leasing-settings.d.ts → leasing-settings.d.ts} +2 -2
- package/lib/types/leasing-settings.d.ts.map +1 -0
- package/lib/{cjs/types → types}/leasing-settings.js.map +1 -1
- package/lib/types/{types/leasing.d.ts → leasing.d.ts} +17 -2
- package/lib/types/{types/leasing.d.ts.map → leasing.d.ts.map} +1 -1
- package/lib/types/leasing.js.map +1 -0
- package/lib/types/{types/opportunities.d.ts → opportunities.d.ts} +13 -10
- package/lib/types/opportunities.d.ts.map +1 -0
- package/lib/types/opportunities.js.map +1 -0
- package/lib/types/{types/quote-settings.d.ts → quote-settings.d.ts} +1 -1
- package/lib/types/{types/quote-settings.d.ts.map → quote-settings.d.ts.map} +1 -1
- package/lib/types/quote-settings.js.map +1 -0
- package/lib/types/{types/quotes.d.ts → quotes.d.ts} +4 -4
- package/lib/types/quotes.d.ts.map +1 -0
- package/lib/types/quotes.js.map +1 -0
- package/lib/types/{types/recently-viewed.d.ts → recently-viewed.d.ts} +1 -1
- package/lib/types/recently-viewed.d.ts.map +1 -0
- package/lib/types/recently-viewed.js.map +1 -0
- package/lib/types/{types/roi-ratings.d.ts → roi-ratings.d.ts} +3 -3
- package/lib/types/roi-ratings.d.ts.map +1 -0
- package/lib/types/roi-ratings.js.map +1 -0
- package/lib/types/{types/saved-filters.d.ts → saved-filters.d.ts} +2 -2
- package/lib/types/saved-filters.d.ts.map +1 -0
- package/lib/{cjs/types → types}/saved-filters.js.map +1 -1
- package/lib/types/{types/search.d.ts → search.d.ts} +8 -2
- package/lib/types/search.d.ts.map +1 -0
- package/lib/types/search.js.map +1 -0
- package/lib/types/{types/tenants.d.ts → tenants.d.ts} +2 -1
- package/lib/types/tenants.d.ts.map +1 -0
- package/lib/types/tenants.js.map +1 -0
- package/lib/types/{types/utils.d.ts → utils.d.ts} +1 -1
- package/lib/types/utils.d.ts.map +1 -0
- package/lib/types/utils.js.map +1 -0
- package/lib/types/{types/vehicles.d.ts → vehicles.d.ts} +1 -1
- package/lib/types/{types/vehicles.d.ts.map → vehicles.d.ts.map} +1 -1
- package/lib/types/vehicles.js.map +1 -0
- package/lib/{types/utils → utils}/forms.d.ts +1 -1
- package/lib/{types/utils → utils}/forms.d.ts.map +1 -1
- package/lib/{esm/utils → utils}/forms.js +2 -2
- package/lib/utils/forms.js.map +1 -0
- package/lib/{types/utils → utils}/leasing.d.ts +1 -1
- package/lib/utils/leasing.d.ts.map +1 -0
- package/lib/utils/leasing.js +5 -0
- package/lib/utils/leasing.js.map +1 -0
- package/lib/{types/utils → utils}/opportunities.d.ts +1 -1
- package/lib/{types/utils → utils}/opportunities.d.ts.map +1 -1
- package/lib/{esm/utils → utils}/opportunities.js +1 -1
- package/lib/utils/opportunities.js.map +1 -0
- package/lib/utils/slug.d.ts +3 -0
- package/lib/{types/utils → utils}/slug.d.ts.map +1 -1
- package/lib/{esm/utils → utils}/slug.js +1 -1
- package/lib/utils/slug.js.map +1 -0
- package/lib/{types/utils → utils}/tenants.d.ts +1 -1
- package/lib/{types/utils → utils}/tenants.d.ts.map +1 -1
- package/lib/{esm/utils → utils}/tenants.js +1 -1
- package/lib/utils/tenants.js.map +1 -0
- package/lib/{types/utils → utils}/vehicles.d.ts +1 -1
- package/lib/{types/utils → utils}/vehicles.d.ts.map +1 -1
- package/lib/{esm/utils → utils}/vehicles.js +1 -1
- package/lib/utils/vehicles.js.map +1 -0
- package/package.json +15 -24
- package/src/apis/crm.ts +16 -11
- package/src/apis/internet-vehicles.ts +1 -1
- package/src/apis/leasing-administration.ts +3 -3
- package/src/apis/leasing.ts +12 -12
- package/src/apis/opportunities.ts +4 -6
- package/src/apis/picklists.ts +3 -3
- package/src/apis/tenants.ts +6 -6
- package/src/apis/users.ts +2 -2
- package/src/apis/vehicles.ts +11 -11
- package/src/constants.ts +1 -1
- package/src/types/crm.ts +3 -3
- package/src/types/definitions.ts +2 -2
- package/src/types/delivery-settings.ts +2 -2
- package/src/types/insights.ts +2 -2
- package/src/types/interests.ts +2 -2
- package/src/types/internet-opportunities.ts +37 -0
- package/src/types/internet-vehicles.ts +3 -3
- package/src/types/leasing-administration.ts +1 -1
- package/src/types/leasing-debtors.ts +1 -1
- package/src/types/leasing-search.ts +4 -4
- package/src/types/leasing-settings.ts +2 -2
- package/src/types/leasing.ts +18 -2
- package/src/types/opportunities.ts +14 -10
- package/src/types/quote-settings.ts +1 -1
- package/src/types/quotes.ts +4 -4
- package/src/types/recently-viewed.ts +1 -1
- package/src/types/roi-ratings.ts +3 -3
- package/src/types/saved-filters.ts +2 -2
- package/src/types/search.ts +10 -2
- package/src/types/tenants.ts +2 -1
- package/src/types/utils.ts +1 -1
- package/src/types/vehicles.ts +1 -1
- package/src/utils/forms.ts +2 -2
- package/src/utils/leasing.ts +5 -4
- package/src/utils/opportunities.ts +1 -1
- package/src/utils/slug.ts +2 -2
- package/src/utils/tenants.ts +2 -2
- package/src/utils/vehicles.ts +2 -2
- package/tsconfig.deploy.json +5 -0
- package/tsconfig.deploy.tsbuildinfo +1 -0
- package/tsconfig.json +1 -2
- package/tsconfig.tsbuildinfo +1 -0
- package/lib/cjs/apis/crm.js +0 -199
- package/lib/cjs/apis/crm.js.map +0 -1
- package/lib/cjs/apis/documents.js +0 -55
- package/lib/cjs/apis/documents.js.map +0 -1
- package/lib/cjs/apis/internet-vehicles.js +0 -25
- package/lib/cjs/apis/internet-vehicles.js.map +0 -1
- package/lib/cjs/apis/leasing-administration.js +0 -47
- package/lib/cjs/apis/leasing-administration.js.map +0 -1
- package/lib/cjs/apis/leasing.js +0 -167
- package/lib/cjs/apis/leasing.js.map +0 -1
- package/lib/cjs/apis/opportunities.js +0 -66
- package/lib/cjs/apis/opportunities.js.map +0 -1
- package/lib/cjs/apis/picklists.js +0 -42
- package/lib/cjs/apis/picklists.js.map +0 -1
- package/lib/cjs/apis/tenants.js +0 -78
- package/lib/cjs/apis/tenants.js.map +0 -1
- package/lib/cjs/apis/users.js +0 -24
- package/lib/cjs/apis/users.js.map +0 -1
- package/lib/cjs/apis/vehicles.js +0 -183
- package/lib/cjs/apis/vehicles.js.map +0 -1
- package/lib/cjs/constants.js +0 -940
- package/lib/cjs/constants.js.map +0 -1
- package/lib/cjs/ddb-entities.js +0 -5
- package/lib/cjs/ddb-entities.js.map +0 -1
- package/lib/cjs/types/activities.js +0 -16
- package/lib/cjs/types/activities.js.map +0 -1
- package/lib/cjs/types/comparables.js +0 -3
- package/lib/cjs/types/crm.js +0 -19
- package/lib/cjs/types/crm.js.map +0 -1
- package/lib/cjs/types/definitions.js +0 -3
- package/lib/cjs/types/definitions.js.map +0 -1
- package/lib/cjs/types/delivery-settings.js +0 -9
- package/lib/cjs/types/delivery-settings.js.map +0 -1
- package/lib/cjs/types/documents.js +0 -9
- package/lib/cjs/types/documents.js.map +0 -1
- package/lib/cjs/types/events.js +0 -10
- package/lib/cjs/types/events.js.map +0 -1
- package/lib/cjs/types/fields.js +0 -29
- package/lib/cjs/types/fields.js.map +0 -1
- package/lib/cjs/types/insights.js +0 -3
- package/lib/cjs/types/insights.js.map +0 -1
- package/lib/cjs/types/interests.js +0 -10
- package/lib/cjs/types/interests.js.map +0 -1
- package/lib/cjs/types/internet-vehicles.js +0 -3
- package/lib/cjs/types/internet-vehicles.js.map +0 -1
- package/lib/cjs/types/leasing-administration.js +0 -3
- package/lib/cjs/types/leasing-administration.js.map +0 -1
- package/lib/cjs/types/leasing-debtors.js +0 -3
- package/lib/cjs/types/leasing-debtors.js.map +0 -1
- package/lib/cjs/types/leasing-search.js +0 -3
- package/lib/cjs/types/leasing-search.js.map +0 -1
- package/lib/cjs/types/leasing-settings.js +0 -10
- package/lib/cjs/types/leasing.js +0 -33
- package/lib/cjs/types/leasing.js.map +0 -1
- package/lib/cjs/types/machines.js +0 -3
- package/lib/cjs/types/opportunities.js +0 -95
- package/lib/cjs/types/opportunities.js.map +0 -1
- package/lib/cjs/types/payments.js +0 -10
- package/lib/cjs/types/payments.js.map +0 -1
- package/lib/cjs/types/picklists.js +0 -3
- package/lib/cjs/types/quote-settings.js +0 -3
- package/lib/cjs/types/quote-settings.js.map +0 -1
- package/lib/cjs/types/quotes.js +0 -45
- package/lib/cjs/types/quotes.js.map +0 -1
- package/lib/cjs/types/recently-viewed.js +0 -3
- package/lib/cjs/types/recently-viewed.js.map +0 -1
- package/lib/cjs/types/reservations.js +0 -8
- package/lib/cjs/types/reservations.js.map +0 -1
- package/lib/cjs/types/roi-ratings.js +0 -8
- package/lib/cjs/types/roi-ratings.js.map +0 -1
- package/lib/cjs/types/saved-filters.js +0 -12
- package/lib/cjs/types/search.js +0 -36
- package/lib/cjs/types/search.js.map +0 -1
- package/lib/cjs/types/settings.js +0 -3
- package/lib/cjs/types/storage.js +0 -5
- package/lib/cjs/types/storage.js.map +0 -1
- package/lib/cjs/types/templates.js +0 -3
- package/lib/cjs/types/tenants.js +0 -19
- package/lib/cjs/types/tenants.js.map +0 -1
- package/lib/cjs/types/users.js +0 -3
- package/lib/cjs/types/utils.js +0 -9
- package/lib/cjs/types/utils.js.map +0 -1
- package/lib/cjs/types/vehicles.js +0 -63
- package/lib/cjs/types/vehicles.js.map +0 -1
- package/lib/cjs/types/website.js +0 -3
- package/lib/cjs/utils/forms.js +0 -31
- package/lib/cjs/utils/forms.js.map +0 -1
- package/lib/cjs/utils/leasing.js +0 -8
- package/lib/cjs/utils/leasing.js.map +0 -1
- package/lib/cjs/utils/opportunities.js +0 -60
- package/lib/cjs/utils/opportunities.js.map +0 -1
- package/lib/cjs/utils/slug.js +0 -21
- package/lib/cjs/utils/slug.js.map +0 -1
- package/lib/cjs/utils/tenants.js +0 -21
- package/lib/cjs/utils/tenants.js.map +0 -1
- package/lib/cjs/utils/vehicles.js +0 -60
- package/lib/cjs/utils/vehicles.js.map +0 -1
- package/lib/esm/apis/crm.js.map +0 -1
- package/lib/esm/apis/documents.js +0 -49
- package/lib/esm/apis/documents.js.map +0 -1
- package/lib/esm/apis/internet-vehicles.js.map +0 -1
- package/lib/esm/apis/leasing-administration.js.map +0 -1
- package/lib/esm/apis/leasing.js.map +0 -1
- package/lib/esm/apis/picklists.js.map +0 -1
- package/lib/esm/apis/tenants.js.map +0 -1
- package/lib/esm/apis/users.js.map +0 -1
- package/lib/esm/apis/vehicles.js.map +0 -1
- package/lib/esm/types/comparables.js.map +0 -1
- package/lib/esm/types/crm.js.map +0 -1
- package/lib/esm/types/definitions.js.map +0 -1
- package/lib/esm/types/delivery-settings.js.map +0 -1
- package/lib/esm/types/documents.js +0 -6
- package/lib/esm/types/documents.js.map +0 -1
- package/lib/esm/types/insights.js.map +0 -1
- package/lib/esm/types/interests.js.map +0 -1
- package/lib/esm/types/internet-vehicles.js.map +0 -1
- package/lib/esm/types/leasing-administration.js.map +0 -1
- package/lib/esm/types/leasing-debtors.js.map +0 -1
- package/lib/esm/types/leasing-search.js.map +0 -1
- package/lib/esm/types/leasing-settings.js.map +0 -1
- package/lib/esm/types/leasing.js.map +0 -1
- package/lib/esm/types/machines.js.map +0 -1
- package/lib/esm/types/opportunities.js.map +0 -1
- package/lib/esm/types/picklists.js.map +0 -1
- package/lib/esm/types/quote-settings.js.map +0 -1
- package/lib/esm/types/quotes.js.map +0 -1
- package/lib/esm/types/recently-viewed.js.map +0 -1
- package/lib/esm/types/roi-ratings.js.map +0 -1
- package/lib/esm/types/saved-filters.js.map +0 -1
- package/lib/esm/types/search.js.map +0 -1
- package/lib/esm/types/settings.js.map +0 -1
- package/lib/esm/types/storage.js +0 -2
- package/lib/esm/types/storage.js.map +0 -1
- package/lib/esm/types/templates.js.map +0 -1
- package/lib/esm/types/tenants.js.map +0 -1
- package/lib/esm/types/users.js.map +0 -1
- package/lib/esm/types/utils.js.map +0 -1
- package/lib/esm/types/vehicles.js.map +0 -1
- package/lib/esm/types/website.js.map +0 -1
- package/lib/esm/utils/forms.js.map +0 -1
- package/lib/esm/utils/leasing.js +0 -4
- package/lib/esm/utils/leasing.js.map +0 -1
- package/lib/esm/utils/opportunities.js.map +0 -1
- package/lib/esm/utils/slug.js.map +0 -1
- package/lib/esm/utils/tenants.js.map +0 -1
- package/lib/esm/utils/vehicles.js.map +0 -1
- package/lib/tsconfig.cjs.tsbuildinfo +0 -1
- package/lib/tsconfig.esm.tsbuildinfo +0 -1
- package/lib/types/apis/crm.d.ts.map +0 -1
- package/lib/types/apis/documents.d.ts +0 -4
- package/lib/types/apis/documents.d.ts.map +0 -1
- package/lib/types/types/crm.d.ts.map +0 -1
- package/lib/types/types/delivery-settings.d.ts.map +0 -1
- package/lib/types/types/documents.d.ts +0 -140
- package/lib/types/types/documents.d.ts.map +0 -1
- package/lib/types/types/insights.d.ts.map +0 -1
- package/lib/types/types/interests.d.ts.map +0 -1
- package/lib/types/types/internet-vehicles.d.ts.map +0 -1
- package/lib/types/types/leasing-administration.d.ts.map +0 -1
- package/lib/types/types/leasing-search.d.ts.map +0 -1
- package/lib/types/types/leasing-settings.d.ts.map +0 -1
- package/lib/types/types/opportunities.d.ts.map +0 -1
- package/lib/types/types/quotes.d.ts.map +0 -1
- package/lib/types/types/recently-viewed.d.ts.map +0 -1
- package/lib/types/types/roi-ratings.d.ts.map +0 -1
- package/lib/types/types/saved-filters.d.ts.map +0 -1
- package/lib/types/types/search.d.ts.map +0 -1
- package/lib/types/types/storage.d.ts +0 -2
- package/lib/types/types/storage.d.ts.map +0 -1
- package/lib/types/types/tenants.d.ts.map +0 -1
- package/lib/types/types/utils.d.ts.map +0 -1
- package/lib/types/utils/leasing.d.ts.map +0 -1
- package/lib/types/utils/slug.d.ts +0 -3
- package/src/apis/documents.ts +0 -64
- package/src/types/documents.ts +0 -141
- package/src/types/storage.ts +0 -1
- package/tsconfig.cjs.json +0 -9
- package/tsconfig.esm.json +0 -9
- /package/lib/{esm/apis → apis}/internet-vehicles.js +0 -0
- /package/lib/{esm/apis → apis}/leasing-administration.js +0 -0
- /package/lib/{esm/apis → apis}/leasing.js +0 -0
- /package/lib/{esm/apis → apis}/picklists.js +0 -0
- /package/lib/{esm/apis → apis}/tenants.js +0 -0
- /package/lib/{esm/apis → apis}/users.js +0 -0
- /package/lib/{esm/apis → apis}/vehicles.js +0 -0
- /package/lib/{types/ddb-entities.d.ts → ddb-entities.d.ts} +0 -0
- /package/lib/{types/ddb-entities.d.ts.map → ddb-entities.d.ts.map} +0 -0
- /package/lib/{esm/ddb-entities.js → ddb-entities.js} +0 -0
- /package/lib/{esm/ddb-entities.js.map → ddb-entities.js.map} +0 -0
- /package/lib/types/{types/activities.d.ts → activities.d.ts} +0 -0
- /package/lib/types/{types/activities.d.ts.map → activities.d.ts.map} +0 -0
- /package/lib/{esm/types → types}/activities.js +0 -0
- /package/lib/{esm/types → types}/activities.js.map +0 -0
- /package/lib/types/{types/comparables.d.ts → comparables.d.ts} +0 -0
- /package/lib/types/{types/comparables.d.ts.map → comparables.d.ts.map} +0 -0
- /package/lib/{esm/types → types}/comparables.js +0 -0
- /package/lib/{cjs/types → types}/comparables.js.map +0 -0
- /package/lib/{esm/types → types}/crm.js +0 -0
- /package/lib/{esm/types → types}/definitions.js +0 -0
- /package/lib/{esm/types → types}/delivery-settings.js +0 -0
- /package/lib/types/{types/events.d.ts → events.d.ts} +0 -0
- /package/lib/types/{types/events.d.ts.map → events.d.ts.map} +0 -0
- /package/lib/{esm/types → types}/events.js +0 -0
- /package/lib/{esm/types → types}/events.js.map +0 -0
- /package/lib/types/{types/fields.d.ts → fields.d.ts} +0 -0
- /package/lib/types/{types/fields.d.ts.map → fields.d.ts.map} +0 -0
- /package/lib/{esm/types → types}/fields.js +0 -0
- /package/lib/{esm/types → types}/fields.js.map +0 -0
- /package/lib/{esm/types → types}/insights.js +0 -0
- /package/lib/{esm/types → types}/interests.js +0 -0
- /package/lib/{esm/types → types}/internet-vehicles.js +0 -0
- /package/lib/{esm/types → types}/leasing-administration.js +0 -0
- /package/lib/{esm/types → types}/leasing-debtors.js +0 -0
- /package/lib/{esm/types → types}/leasing-search.js +0 -0
- /package/lib/{esm/types → types}/leasing-settings.js +0 -0
- /package/lib/{esm/types → types}/leasing.js +0 -0
- /package/lib/types/{types/machines.d.ts → machines.d.ts} +0 -0
- /package/lib/types/{types/machines.d.ts.map → machines.d.ts.map} +0 -0
- /package/lib/{esm/types → types}/machines.js +0 -0
- /package/lib/{cjs/types → types}/machines.js.map +0 -0
- /package/lib/{esm/types → types}/opportunities.js +0 -0
- /package/lib/types/{types/payments.d.ts → payments.d.ts} +0 -0
- /package/lib/types/{types/payments.d.ts.map → payments.d.ts.map} +0 -0
- /package/lib/{esm/types → types}/payments.js +0 -0
- /package/lib/{esm/types → types}/payments.js.map +0 -0
- /package/lib/types/{types/picklists.d.ts → picklists.d.ts} +0 -0
- /package/lib/types/{types/picklists.d.ts.map → picklists.d.ts.map} +0 -0
- /package/lib/{esm/types → types}/picklists.js +0 -0
- /package/lib/{cjs/types → types}/picklists.js.map +0 -0
- /package/lib/{esm/types → types}/quote-settings.js +0 -0
- /package/lib/{esm/types → types}/quotes.js +0 -0
- /package/lib/{esm/types → types}/recently-viewed.js +0 -0
- /package/lib/types/{types/reservations.d.ts → reservations.d.ts} +0 -0
- /package/lib/types/{types/reservations.d.ts.map → reservations.d.ts.map} +0 -0
- /package/lib/{esm/types → types}/reservations.js +0 -0
- /package/lib/{esm/types → types}/reservations.js.map +0 -0
- /package/lib/{esm/types → types}/roi-ratings.js +0 -0
- /package/lib/{esm/types → types}/saved-filters.js +0 -0
- /package/lib/{esm/types → types}/search.js +0 -0
- /package/lib/types/{types/settings.d.ts → settings.d.ts} +0 -0
- /package/lib/types/{types/settings.d.ts.map → settings.d.ts.map} +0 -0
- /package/lib/{esm/types → types}/settings.js +0 -0
- /package/lib/{cjs/types → types}/settings.js.map +0 -0
- /package/lib/types/{types/templates.d.ts → templates.d.ts} +0 -0
- /package/lib/types/{types/templates.d.ts.map → templates.d.ts.map} +0 -0
- /package/lib/{esm/types → types}/templates.js +0 -0
- /package/lib/{cjs/types → types}/templates.js.map +0 -0
- /package/lib/{esm/types → types}/tenants.js +0 -0
- /package/lib/types/{types/users.d.ts → users.d.ts} +0 -0
- /package/lib/types/{types/users.d.ts.map → users.d.ts.map} +0 -0
- /package/lib/{esm/types → types}/users.js +0 -0
- /package/lib/{cjs/types → types}/users.js.map +0 -0
- /package/lib/{esm/types → types}/utils.js +0 -0
- /package/lib/{esm/types → types}/vehicles.js +0 -0
- /package/lib/types/{types/website.d.ts → website.d.ts} +0 -0
- /package/lib/types/{types/website.d.ts.map → website.d.ts.map} +0 -0
- /package/lib/{esm/types → types}/website.js +0 -0
- /package/lib/{cjs/types → types}/website.js.map +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Decimal from 'decimal.js';
|
|
2
|
-
import { PricePercentageMode } from '../types/utils';
|
|
1
|
+
import { Decimal } from 'decimal.js';
|
|
2
|
+
import { PricePercentageMode } from '../types/utils.js';
|
|
3
3
|
export const computePricePercentage = (totalAmount, percentage, partialAmount = '0', mode = PricePercentageMode.PERCENTAGE) => {
|
|
4
4
|
const output = {
|
|
5
5
|
percentageAmount: percentage,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forms.js","sourceRoot":"/","sources":["utils/forms.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,MAAM,CAAC,MAAM,sBAAsB,GAAG,CACpC,WAAmB,EACnB,UAAkB,EAClB,gBAAwB,GAAG,EAC3B,OAA4B,mBAAmB,CAAC,UAAU,EACJ,EAAE;IACxD,MAAM,MAAM,GAAyD;QACnE,gBAAgB,EAAE,UAAU;QAC5B,cAAc,EAAE,aAAa;KAC9B,CAAC;IAEF,IAAI,IAAI,KAAK,mBAAmB,CAAC,UAAU,EAAE,CAAC;QAC5C,MAAM,CAAC,cAAc,GAAG,IAAI,OAAO,CAAC,WAAW,CAAC;aAC7C,GAAG,CAAC,UAAU,CAAC;aACf,GAAG,CAAC,GAAG,CAAC;aACR,eAAe,CAAC,CAAC,CAAC;aAClB,KAAK,CAAC,CAAC,EAAE,WAAW,CAAC;aACrB,QAAQ,EAAE,CAAC;IAChB,CAAC;SAAM,CAAC;QACN,MAAM,CAAC,gBAAgB,GAAG,IAAI,OAAO,CAAC,aAAa,CAAC;aACjD,GAAG,CAAC,GAAG,CAAC;aACR,GAAG,CAAC,WAAW,CAAC;aAChB,eAAe,CAAC,CAAC,CAAC;aAClB,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC;aACb,QAAQ,EAAE,CAAC;IAChB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC","sourcesContent":["import { Decimal } from 'decimal.js';\nimport { PricePercentageMode } from '../types/utils.js';\n\nexport const computePricePercentage = (\n totalAmount: string,\n percentage: string,\n partialAmount: string = '0',\n mode: PricePercentageMode = PricePercentageMode.PERCENTAGE\n): { percentageAmount: string; currencyAmount: string } => {\n const output: { percentageAmount: string; currencyAmount: string } = {\n percentageAmount: percentage,\n currencyAmount: partialAmount,\n };\n\n if (mode === PricePercentageMode.PERCENTAGE) {\n output.currencyAmount = new Decimal(totalAmount)\n .mul(percentage)\n .div(100)\n .toDecimalPlaces(2)\n .clamp(0, totalAmount)\n .toString();\n } else {\n output.percentageAmount = new Decimal(partialAmount)\n .mul(100)\n .div(totalAmount)\n .toDecimalPlaces(4)\n .clamp(0, 100)\n .toString();\n }\n\n return output;\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"leasing.d.ts","sourceRoot":"/","sources":["utils/leasing.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAG5D,eAAO,MAAM,mBAAmB,YAAa,qBAAqB,EAAE,KAAG,qBAAqB,EAQzF,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { UTCDate } from '@date-fns/utc';
|
|
2
|
+
import { format } from 'date-fns';
|
|
3
|
+
import { map, sortBy, uniqBy } from 'lodash-es';
|
|
4
|
+
export const sortContractClients = (clients) => sortBy(map(uniqBy(clients, (c) => c.takeoverId), (c) => ({ ...c, since: format(new UTCDate(c.since), 'yyyy-MM-dd') })), (cli) => cli.since, (cli) => (cli.takeoverId ? parseInt(cli.takeoverId.replace(/[^0-9]/g, '')) : 0));
|
|
5
|
+
//# sourceMappingURL=leasing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"leasing.js","sourceRoot":"/","sources":["utils/leasing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAIhD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,OAAgC,EAA2B,EAAE,CAC/F,MAAM,CACJ,GAAG,CACD,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,EACpC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC,EAAE,CAAC,CACrE,EACD,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,EAClB,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAChF,CAAC","sourcesContent":["import { UTCDate } from '@date-fns/utc';\nimport { format } from 'date-fns';\nimport { map, sortBy, uniqBy } from 'lodash-es';\nimport { LeasingContractClient } from '../types/leasing.js';\n\n/* sort from oldest to most recent client */\nexport const sortContractClients = (clients: LeasingContractClient[]): LeasingContractClient[] =>\n sortBy(\n map(\n uniqBy(clients, (c) => c.takeoverId),\n (c) => ({ ...c, since: format(new UTCDate(c.since), 'yyyy-MM-dd') }) // doing a map to also fix legacy data\n ),\n (cli) => cli.since,\n (cli) => (cli.takeoverId ? parseInt(cli.takeoverId.replace(/[^0-9]/g, '')) : 0)\n );\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"opportunities.d.ts","sourceRoot":"/","sources":["utils/opportunities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAA0B,MAAM,
|
|
1
|
+
{"version":3,"file":"opportunities.d.ts","sourceRoot":"/","sources":["utils/opportunities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAA0B,MAAM,2BAA2B,CAAC;AAEnG,KAAK,YAAY,GAAG;IAClB,aAAa,EAAE,iBAAiB,CAAC;IACjC,eAAe,EAAE,iBAAiB,CAAC;CACpC,CAAC;AAcF,eAAO,MAAM,iBAAiB,kBACb,iBAAiB,KAC/B,iBAAiB,GAAG,SAMtB,CAAC;AAEF,eAAO,MAAM,aAAa,WAAY,iBAAiB,KAAG,iBAAiB,GAAG,SAM7E,CAAC;AAEF,eAAO,MAAM,uCAAuC,UAAW,YAAY,KAAG,OAI7E,CAAC;AAEF,eAAO,MAAM,iCAAiC,UAAW,YAAY,KAAG,OAIvE,CAAC;AAEF,eAAO,MAAM,wCAAwC,UAAW,YAAY,KAAG,OAI9E,CAAC;AAEF,eAAO,MAAM,kCAAkC,UAAW,YAAY,KAAG,OAIxE,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAAW,WAAW,KAAG,OAA+B,CAAC;AAEvF,eAAO,MAAM,4BAA4B,QAAO,iBAAiB,EAIhE,CAAC;AAEF,eAAO,MAAM,qBAAqB,UAAW,WAAW,KAAG,OACJ,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OpportunityStatus, OpportunityStatusOrder } from '../types/opportunities';
|
|
1
|
+
import { OpportunityStatus, OpportunityStatusOrder } from '../types/opportunities.js';
|
|
2
2
|
const compareOpportunityStatus = (input) => {
|
|
3
3
|
const { currentStatus, referenceStatus } = input;
|
|
4
4
|
const currentStatusIdx = OpportunityStatusOrder.indexOf(currentStatus);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunities.js","sourceRoot":"/","sources":["utils/opportunities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAOnG,MAAM,wBAAwB,GAAG,CAAC,KAAmB,EAAE,EAAE;IACvD,MAAM,EAAE,aAAa,EAAE,eAAe,EAAE,GAAG,KAAK,CAAC;IAEjD,MAAM,gBAAgB,GAAG,sBAAsB,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IACvE,MAAM,kBAAkB,GAAG,sBAAsB,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;IAE3E,OAAO;QACL,gBAAgB;QAChB,kBAAkB;KACnB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,aAAgC,EACD,EAAE;IACjC,MAAM,YAAY,GAAG,sBAAsB,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IACnE,IAAI,YAAY,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO;IACT,CAAC;IACD,OAAO,sBAAsB,CAAC,YAAY,GAAG,CAAC,CAAC,CAAC;AAClD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,MAAyB,EAAiC,EAAE;IACxF,MAAM,WAAW,GAAG,sBAAsB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC3D,IAAI,WAAW,IAAI,sBAAsB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACrD,OAAO;IACT,CAAC;IACD,OAAO,sBAAsB,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC;AACjD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,uCAAuC,GAAG,CAAC,KAAmB,EAAW,EAAE;IACtF,MAAM,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAC;IAEjF,OAAO,gBAAgB,IAAI,kBAAkB,CAAC;AAChD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,KAAmB,EAAW,EAAE;IAChF,MAAM,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAC;IAEjF,OAAO,gBAAgB,GAAG,kBAAkB,CAAC;AAC/C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,wCAAwC,GAAG,CAAC,KAAmB,EAAW,EAAE;IACvF,MAAM,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAC;IAEjF,OAAO,gBAAgB,IAAI,kBAAkB,CAAC;AAChD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,KAAmB,EAAW,EAAE;IACjF,MAAM,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAC;IAEjF,OAAO,gBAAgB,GAAG,kBAAkB,CAAC;AAC/C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAAkB,EAAW,EAAE,CAAC,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC;AAEvF,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAwB,EAAE,CAAC;IACrE,iBAAiB,CAAC,MAAM;IACxB,iBAAiB,CAAC,WAAW;IAC7B,iBAAiB,CAAC,QAAQ;CAC3B,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAAkB,EAAW,EAAE,CACnE,4BAA4B,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC","sourcesContent":["import { Opportunity, OpportunityStatus, OpportunityStatusOrder } from '../types/opportunities.js';\n\ntype CompareInput = {\n currentStatus: OpportunityStatus;\n referenceStatus: OpportunityStatus;\n};\n\nconst compareOpportunityStatus = (input: CompareInput) => {\n const { currentStatus, referenceStatus } = input;\n\n const currentStatusIdx = OpportunityStatusOrder.indexOf(currentStatus);\n const referenceStatusIdx = OpportunityStatusOrder.indexOf(referenceStatus);\n\n return {\n currentStatusIdx,\n referenceStatusIdx,\n };\n};\n\nexport const getPreviousStatus = (\n currentStatus: OpportunityStatus\n): OpportunityStatus | undefined => {\n const currentIndex = OpportunityStatusOrder.indexOf(currentStatus);\n if (currentIndex === 0) {\n return;\n }\n return OpportunityStatusOrder[currentIndex - 1];\n};\n\nexport const getNextStatus = (status: OpportunityStatus): OpportunityStatus | undefined => {\n const statusIndex = OpportunityStatusOrder.indexOf(status);\n if (statusIndex >= OpportunityStatusOrder.length - 1) {\n return;\n }\n return OpportunityStatusOrder[statusIndex + 1];\n};\n\nexport const isSameOrAfterReferenceOpportunityStatus = (input: CompareInput): boolean => {\n const { currentStatusIdx, referenceStatusIdx } = compareOpportunityStatus(input);\n\n return currentStatusIdx >= referenceStatusIdx;\n};\n\nexport const isAfterReferenceOpportunityStatus = (input: CompareInput): boolean => {\n const { currentStatusIdx, referenceStatusIdx } = compareOpportunityStatus(input);\n\n return currentStatusIdx > referenceStatusIdx;\n};\n\nexport const isSameOrBeforeReferenceOpportunityStatus = (input: CompareInput): boolean => {\n const { currentStatusIdx, referenceStatusIdx } = compareOpportunityStatus(input);\n\n return currentStatusIdx <= referenceStatusIdx;\n};\n\nexport const isBeforeReferenceOpportunityStatus = (input: CompareInput): boolean => {\n const { currentStatusIdx, referenceStatusIdx } = compareOpportunityStatus(input);\n\n return currentStatusIdx < referenceStatusIdx;\n};\n\nexport const isOpportunityLost = (input: Opportunity): boolean => input.lostAt != null;\n\nexport const getOpportunityReservedStatus = (): OpportunityStatus[] => [\n OpportunityStatus.REVIEW,\n OpportunityStatus.PREPARATION,\n OpportunityStatus.DELIVERY,\n];\n\nexport const isOpportunityReserved = (input: Opportunity): boolean =>\n getOpportunityReservedStatus().includes(input.status);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slug.d.ts","sourceRoot":"/","sources":["utils/slug.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"slug.d.ts","sourceRoot":"/","sources":["utils/slug.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,eAAO,MAAM,cAAc,YAAa,OAAO,KAAG,MAejD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import slugify from 'slugify';
|
|
2
2
|
export const getVehicleSlug = (vehicle) => {
|
|
3
|
-
return slugify([
|
|
3
|
+
return slugify.default([
|
|
4
4
|
vehicle.external.identification.stockNumber ?? vehicle.internal.identification.stockNumber,
|
|
5
5
|
vehicle.external.general.make,
|
|
6
6
|
vehicle.external.general.modelName,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slug.js","sourceRoot":"/","sources":["utils/slug.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAG9B,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,OAAgB,EAAU,EAAE;IACzD,OAAO,OAAO,CAAC,OAAO,CACpB;QACE,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,WAAW,IAAI,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,WAAW;QAC1F,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI;QAC7B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS;QAClC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ;QACjC,GAAG,OAAO,CAAC,QAAQ,CAAC,OAAO,EAAE,eAAe,EAAE;QAC9C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ;QACjC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS;QAClC,OAAO,CAAC,QAAQ,CAAC,UAAU,EAAE,KAAK,EAAE,aAAa;KAClD;SACE,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;SAClB,IAAI,CAAC,GAAG,CAAC,CACb,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import slugify from 'slugify';\nimport { Vehicle } from '../types/vehicles.js';\n\nexport const getVehicleSlug = (vehicle: Vehicle): string => {\n return slugify.default(\n [\n vehicle.external.identification.stockNumber ?? vehicle.internal.identification.stockNumber,\n vehicle.external.general.make,\n vehicle.external.general.modelName,\n vehicle.external.general.typeName,\n `${vehicle.external.history?.advertisingYear}`,\n vehicle.external.general.category,\n vehicle.external.general.bodystyle,\n vehicle.external.powertrain?.axles?.configuration,\n ]\n .filter((f) => !!f)\n .join(' ')\n );\n};\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Branch, Tenant } from '../types/tenants';
|
|
1
|
+
import { Branch, Tenant } from '../types/tenants.js';
|
|
2
2
|
export declare const getBranch: (tenant: Tenant, branchId: string) => Branch;
|
|
3
3
|
export declare const getDefaultBranch: (tenant: Tenant) => Branch;
|
|
4
4
|
export declare const getBranchStandardVatRate: (tenant: Tenant, branchId: string) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tenants.d.ts","sourceRoot":"/","sources":["utils/tenants.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"tenants.d.ts","sourceRoot":"/","sources":["utils/tenants.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAErD,eAAO,MAAM,SAAS,WAAY,MAAM,YAAY,MAAM,KAAG,MAO5D,CAAC;AAEF,eAAO,MAAM,gBAAgB,WAAY,MAAM,KAAG,MAAiC,CAAC;AAEpF,eAAO,MAAM,wBAAwB,WAAY,MAAM,YAAY,MAAM,KAAG,MAG3E,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { XError } from '@bisondesk/commons-sdk/errors';
|
|
2
|
-
import { first } from 'lodash';
|
|
2
|
+
import { first } from 'lodash-es';
|
|
3
3
|
export const getBranch = (tenant, branchId) => {
|
|
4
4
|
const branch = tenant.branches.find((branch) => branch.id === branchId);
|
|
5
5
|
if (branch == null) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tenants.js","sourceRoot":"/","sources":["utils/tenants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAGlC,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,MAAc,EAAE,QAAgB,EAAU,EAAE;IACpE,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,MAAc,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,KAAK,QAAQ,CAAC,CAAC;IAChF,IAAI,MAAM,IAAI,IAAI,EAAE,CAAC;QACnB,MAAM,IAAI,MAAM,CAAC,0BAA0B,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClF,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,MAAc,EAAU,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAE,CAAC;AAEpF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,MAAc,EAAE,QAAgB,EAAU,EAAE;IACnF,MAAM,MAAM,GAAW,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IACnD,OAAO,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC;AAClC,CAAC,CAAC","sourcesContent":["import { XError } from '@bisondesk/commons-sdk/errors';\nimport { first } from 'lodash-es';\nimport { Branch, Tenant } from '../types/tenants.js';\n\nexport const getBranch = (tenant: Tenant, branchId: string): Branch => {\n const branch = tenant.branches.find((branch: Branch) => branch.id === branchId);\n if (branch == null) {\n throw new XError('tenants.branch-not-found', { tenantId: tenant.id, branchId });\n }\n\n return branch;\n};\n\nexport const getDefaultBranch = (tenant: Tenant): Branch => first(tenant.branches)!;\n\nexport const getBranchStandardVatRate = (tenant: Tenant, branchId: string): string => {\n const branch: Branch = getBranch(tenant, branchId);\n return branch.vatRates.standard;\n};\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VehicleExternalInfo } from '../types/vehicles';
|
|
1
|
+
import { VehicleExternalInfo } from '../types/vehicles.js';
|
|
2
2
|
export declare const extractCustomFeatures: (vehicle: VehicleExternalInfo) => string[];
|
|
3
3
|
export declare const getInternalTitle: ({ make, category, modelName, bodywork, modelTypeName, }: {
|
|
4
4
|
make: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vehicles.d.ts","sourceRoot":"/","sources":["utils/vehicles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"vehicles.d.ts","sourceRoot":"/","sources":["utils/vehicles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,eAAO,MAAM,qBAAqB,YAAa,mBAAmB,KAAG,MAAM,EA+B1E,CAAC;AAEF,eAAO,MAAM,gBAAgB;UAOrB,MAAM;cACF,MAAM;;;;MAId,MAcH,CAAC;AAGF,eAAO,MAAM,sBAAsB,QAAS,MAAM,KAAG,MAYpD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vehicles.js","sourceRoot":"/","sources":["utils/vehicles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAG7C,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,OAA4B,EAAY,EAAE;IAC9E,MAAM,QAAQ,GAGR;QACJ;YACE,QAAQ,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,cAAc,EAAE,KAAK,EAAE,OAAO;YAC7D,eAAe,EAAE,OAAO;SACzB;QACD;YACE,QAAQ,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,cAAc,EAAE,QAAQ,EAAE,OAAO;YAChE,eAAe,EAAE,UAAU;SAC5B;QACD,EAAE,QAAQ,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,EAAE,eAAe,EAAE,KAAK,EAAE;QAC1E;YACE,QAAQ,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,gBAAgB;YAC3D,eAAe,EAAE,kBAAkB;SACpC;QACD;YACE,QAAQ,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,kBAAkB;YAC7D,eAAe,EAAE,oBAAoB;SACtC;QACD;YACE,QAAQ,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,OAAO;YAClD,eAAe,EAAE,SAAS;SAC3B;KACF,CAAC;IAEF,OAAO,QAAQ;SACZ,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;SAChD,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;AAC/C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAC/B,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,aAAa,GAOd,EAAU,EAAE;IACX,IAAI,QAAQ,KAAK,UAAU,CAAC,OAAO,IAAI,QAAQ,KAAK,UAAU,CAAC,WAAW,EAAE,CAAC;QAC3E,OAAO,CAAC,IAAI,EAAE,SAAS,EAAE,QAAQ,CAAC;aAC/B,MAAM,CAAC,CAAC,CAAC,EAAe,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;aAC/B,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;aACpB,IAAI,CAAC,GAAG,CAAC;aACT,IAAI,EAAE,CAAC;IACZ,CAAC;IAED,OAAO,CAAC,IAAI,EAAE,SAAS,EAAE,aAAa,CAAC;SACpC,MAAM,CAAC,CAAC,CAAC,EAAe,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;SAC/B,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;SACpB,IAAI,CAAC,GAAG,CAAC;SACT,IAAI,EAAE,CAAC;AACZ,CAAC,CAAC;AAGF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,GAAW,EAAU,EAAE;IAC5D,MAAM,OAAO,GAAG,4BAA4B,CAAC;IAC7C,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC;IAErC,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC;QACZ,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,SAAS,GAAG,GAAG,GAAG,aAAa,CAAC;IACtC,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,aAAa,CAAC,CAAC;IAEjD,OAAO,sBAAsB,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC;AAC1E,CAAC,CAAC","sourcesContent":["import { Categories } from '../constants.js';\nimport { VehicleExternalInfo } from '../types/vehicles.js';\n\nexport const extractCustomFeatures = (vehicle: VehicleExternalInfo): string[] => {\n const features: {\n getValue: (vehicle: VehicleExternalInfo) => any;\n picklistValueId: string;\n }[] = [\n {\n getValue: (vehicle) => vehicle.superstructure?.crane?.present,\n picklistValueId: 'crane',\n },\n {\n getValue: (vehicle) => vehicle.superstructure?.tailgate?.present,\n picklistValueId: 'tailgate',\n },\n { getValue: (vehicle) => vehicle.accessories.adr, picklistValueId: 'adr' },\n {\n getValue: (vehicle) => vehicle.accessories.retarderIntarder,\n picklistValueId: 'retarderIntarder',\n },\n {\n getValue: (vehicle) => vehicle.accessories.hydraulicTipperKit,\n picklistValueId: 'hydraulicTipperKit',\n },\n {\n getValue: (vehicle) => vehicle.accessories.lowDeck,\n picklistValueId: 'lowDeck',\n },\n ];\n\n return features\n .filter((feature) => !!feature.getValue(vehicle))\n .map((feature) => feature.picklistValueId);\n};\n\nexport const getInternalTitle = ({\n make,\n category,\n modelName,\n bodywork,\n modelTypeName,\n}: {\n make: string;\n category: string;\n modelName?: string;\n modelTypeName?: string;\n bodywork?: string;\n}): string => {\n if (category === Categories.Trailer || category === Categories.SemiTrailer) {\n return [make, modelName, bodywork]\n .filter((v): v is string => !!v)\n .map((v) => v.trim())\n .join(' ')\n .trim();\n }\n\n return [make, modelName, modelTypeName]\n .filter((v): v is string => !!v)\n .map((v) => v.trim())\n .join(' ')\n .trim();\n};\n\n// example: 1 -> A, 2 -> B, 26 -> Z, 27 -> AA, 28 -> AB, 52 -> AZ, 53 -> BA, 54 -> BB, 702 -> ZZ, 703 -> AAA\nexport const convertNumberToLetters = (num: number): string => {\n const letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n const lettersLength = letters.length;\n\n if (num < 1) {\n return '';\n }\n\n const remainder = num % lettersLength;\n const quotient = Math.floor(num / lettersLength);\n\n return convertNumberToLetters(quotient) + letters.charAt(remainder - 1);\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,48 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bisondesk/core-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.319",
|
|
4
4
|
"description": "",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"scripts": {
|
|
6
7
|
"clean": "rm -rf build dist lib *.tsbuildinfo",
|
|
7
8
|
"unittest": "echo \"No test specified\"",
|
|
8
9
|
"integrationtest": "echo \"No test specified\"",
|
|
9
|
-
"build": "npx tsc --build tsconfig.
|
|
10
|
+
"build": "npx tsc --build tsconfig.deploy.json",
|
|
10
11
|
"watch": "npx tsc --build --watch"
|
|
11
12
|
},
|
|
12
13
|
"author": "TheTruckCompany",
|
|
13
14
|
"dependencies": {
|
|
14
|
-
"decimal.js": "10.3
|
|
15
|
-
"immer": "
|
|
15
|
+
"decimal.js": "10.4.3",
|
|
16
|
+
"immer": "10.0.3",
|
|
16
17
|
"joi": "17.4.0",
|
|
17
|
-
"lodash": "4.17.21",
|
|
18
|
-
"slugify": "1.6.
|
|
18
|
+
"lodash-es": "4.17.21",
|
|
19
|
+
"slugify": "1.6.6"
|
|
19
20
|
},
|
|
20
21
|
"devDependencies": {
|
|
21
|
-
"@types/
|
|
22
|
-
"
|
|
22
|
+
"@types/lodash-es": "4.17.12",
|
|
23
|
+
"@types/node": "18.11.9",
|
|
24
|
+
"typescript": "5.3.3"
|
|
23
25
|
},
|
|
24
26
|
"peerDependencies": {
|
|
25
|
-
"@bisondesk/commons-sdk": "
|
|
26
|
-
},
|
|
27
|
-
"main": "./lib/cjs/*",
|
|
28
|
-
"module": "./lib/esm/*",
|
|
29
|
-
"exports": {
|
|
30
|
-
"./*": {
|
|
31
|
-
"import": [
|
|
32
|
-
"./lib/esm/*.js",
|
|
33
|
-
"./lib/esm/*/*.js"
|
|
34
|
-
],
|
|
35
|
-
"require": [
|
|
36
|
-
"./lib/cjs/*.js",
|
|
37
|
-
"./lib/cjs/*/*.js"
|
|
38
|
-
]
|
|
39
|
-
}
|
|
27
|
+
"@bisondesk/commons-sdk": "*"
|
|
40
28
|
},
|
|
41
29
|
"typesVersions": {
|
|
42
30
|
"*": {
|
|
43
31
|
"*": [
|
|
44
|
-
"lib
|
|
32
|
+
"lib/*.d.ts"
|
|
45
33
|
]
|
|
46
34
|
}
|
|
35
|
+
},
|
|
36
|
+
"exports": {
|
|
37
|
+
"./*": "./lib/*.js"
|
|
47
38
|
}
|
|
48
39
|
}
|
package/src/apis/crm.ts
CHANGED
|
@@ -11,9 +11,9 @@ import {
|
|
|
11
11
|
Organization,
|
|
12
12
|
SearchContact,
|
|
13
13
|
SearchOrganization,
|
|
14
|
-
} from '../types/crm';
|
|
15
|
-
import { SearchRequest } from '../types/search';
|
|
16
|
-
import { ReferenceData } from '../types/utils';
|
|
14
|
+
} from '../types/crm.js';
|
|
15
|
+
import { SearchRequest } from '../types/search.js';
|
|
16
|
+
import { ReferenceData } from '../types/utils.js';
|
|
17
17
|
|
|
18
18
|
export const getCrmOrganization = async (
|
|
19
19
|
tenantId: string,
|
|
@@ -33,7 +33,9 @@ export const getCrmOrganization = async (
|
|
|
33
33
|
);
|
|
34
34
|
|
|
35
35
|
if (response.ok) {
|
|
36
|
-
return response.status === 200 ? response.json() : undefined
|
|
36
|
+
return (response.status === 200 ? response.json() : undefined) as Promise<
|
|
37
|
+
Organization | undefined
|
|
38
|
+
>;
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
const body = await response.text();
|
|
@@ -58,7 +60,9 @@ export const getCrmOrganizationByExternalId = async (
|
|
|
58
60
|
);
|
|
59
61
|
|
|
60
62
|
if (response.ok) {
|
|
61
|
-
return response.status === 200 ? response.json() : undefined
|
|
63
|
+
return (response.status === 200 ? response.json() : undefined) as Promise<
|
|
64
|
+
Organization | undefined
|
|
65
|
+
>;
|
|
62
66
|
}
|
|
63
67
|
|
|
64
68
|
const body = await response.text();
|
|
@@ -83,7 +87,7 @@ export const saveCrmOrganization = async (
|
|
|
83
87
|
});
|
|
84
88
|
|
|
85
89
|
if (response.ok) {
|
|
86
|
-
return response.json()
|
|
90
|
+
return response.json() as Promise<Organization>;
|
|
87
91
|
}
|
|
88
92
|
|
|
89
93
|
const body = await response.text();
|
|
@@ -133,13 +137,14 @@ export const searchCrmOrganizations = async (
|
|
|
133
137
|
Authorization: auth,
|
|
134
138
|
[TENANT_ID_ADMIN_HEADER]: tenantId,
|
|
135
139
|
[SERVICE_ID_ADMIN_HEADER]: opts?.serviceId,
|
|
140
|
+
'Content-Type': 'application/json',
|
|
136
141
|
}),
|
|
137
142
|
body: JSON.stringify(req),
|
|
138
143
|
}
|
|
139
144
|
);
|
|
140
145
|
|
|
141
146
|
if (response.ok) {
|
|
142
|
-
return response.status === 200 ? response.json() : undefined;
|
|
147
|
+
return response.status === 200 ? (response.json() as any) : undefined;
|
|
143
148
|
}
|
|
144
149
|
|
|
145
150
|
const body = await response.text();
|
|
@@ -167,7 +172,7 @@ export const searchCrmContacts = async (
|
|
|
167
172
|
);
|
|
168
173
|
|
|
169
174
|
if (response.ok) {
|
|
170
|
-
return response.status === 200 ? response.json() : undefined;
|
|
175
|
+
return response.status === 200 ? (response.json() as any) : undefined;
|
|
171
176
|
}
|
|
172
177
|
|
|
173
178
|
const body = await response.text();
|
|
@@ -216,7 +221,7 @@ export const listCrmContacts = async (
|
|
|
216
221
|
);
|
|
217
222
|
|
|
218
223
|
if (response.ok) {
|
|
219
|
-
return response.status === 200 ? response.json() : undefined;
|
|
224
|
+
return response.status === 200 ? (response.json() as any) : undefined;
|
|
220
225
|
}
|
|
221
226
|
|
|
222
227
|
const body = await response.text();
|
|
@@ -241,7 +246,7 @@ export const getCrmContact = async (
|
|
|
241
246
|
);
|
|
242
247
|
|
|
243
248
|
if (response.ok) {
|
|
244
|
-
return response.status === 200 ? response.json() : undefined;
|
|
249
|
+
return response.status === 200 ? (response.json() as any) : undefined;
|
|
245
250
|
}
|
|
246
251
|
|
|
247
252
|
const body = await response.text();
|
|
@@ -266,7 +271,7 @@ export const saveCrmContact = async (
|
|
|
266
271
|
});
|
|
267
272
|
|
|
268
273
|
if (response.ok) {
|
|
269
|
-
return response.json();
|
|
274
|
+
return response.json() as any;
|
|
270
275
|
}
|
|
271
276
|
|
|
272
277
|
const body = await response.text();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { XError } from '@bisondesk/commons-sdk/errors';
|
|
2
2
|
import { getAdminAuth } from '@bisondesk/commons-sdk/fetch';
|
|
3
3
|
import fetch, { Response } from 'node-fetch';
|
|
4
|
-
import { SearchInternetVehicle } from '../types/internet-vehicles';
|
|
4
|
+
import { SearchInternetVehicle } from '../types/internet-vehicles.js';
|
|
5
5
|
|
|
6
6
|
export const upsertInternetVehicles = async (vehicles: SearchInternetVehicle[]): Promise<void> => {
|
|
7
7
|
const auth = await getAdminAuth();
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
LeasingAdminUpload,
|
|
7
7
|
LeasingAdminUploadStatus,
|
|
8
8
|
NewLeasingAdminUploadRequest,
|
|
9
|
-
} from '../types/leasing-administration';
|
|
9
|
+
} from '../types/leasing-administration.js';
|
|
10
10
|
|
|
11
11
|
export const createLeasingAdminUpload = async (
|
|
12
12
|
tenantId: string,
|
|
@@ -29,7 +29,7 @@ export const createLeasingAdminUpload = async (
|
|
|
29
29
|
);
|
|
30
30
|
|
|
31
31
|
if (response.ok) {
|
|
32
|
-
return response.json()
|
|
32
|
+
return response.json() as Promise<LeasingAdminUpload>;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
const body = await response.text();
|
|
@@ -59,7 +59,7 @@ export const updateLeasingAdminUploadStatus = async (
|
|
|
59
59
|
);
|
|
60
60
|
|
|
61
61
|
if (response.ok) {
|
|
62
|
-
return response.json()
|
|
62
|
+
return response.json() as Promise<LeasingAdminUpload>;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
const body = await response.text();
|
package/src/apis/leasing.ts
CHANGED
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
LeasingContract,
|
|
10
10
|
NewLeasingConditions,
|
|
11
11
|
NewLeasingContract,
|
|
12
|
-
} from '../types/leasing';
|
|
13
|
-
import { DataRecord } from '../types/utils';
|
|
12
|
+
} from '../types/leasing.js';
|
|
13
|
+
import { DataRecord } from '../types/utils.js';
|
|
14
14
|
|
|
15
15
|
export const listLeasingClients = async (
|
|
16
16
|
tenantId: string,
|
|
@@ -31,7 +31,7 @@ export const listLeasingClients = async (
|
|
|
31
31
|
);
|
|
32
32
|
|
|
33
33
|
if (response.ok) {
|
|
34
|
-
return response.status === 200 ? response.json() : undefined;
|
|
34
|
+
return response.status === 200 ? (response.json() as any) : undefined;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
const body = await response.text();
|
|
@@ -57,7 +57,7 @@ export const listLeasingContracts = async (
|
|
|
57
57
|
);
|
|
58
58
|
|
|
59
59
|
if (response.ok) {
|
|
60
|
-
return response.status === 200 ? response.json() : undefined;
|
|
60
|
+
return response.status === 200 ? (response.json() as any) : undefined;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
const body = await response.text();
|
|
@@ -80,7 +80,7 @@ export const getLeasingConditions = async (
|
|
|
80
80
|
);
|
|
81
81
|
|
|
82
82
|
if (response.ok) {
|
|
83
|
-
return response.status === 200 ? response.json() : undefined;
|
|
83
|
+
return response.status === 200 ? (response.json() as any) : undefined;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
const body = await response.text();
|
|
@@ -103,7 +103,7 @@ export const createLeasingConditions = async (
|
|
|
103
103
|
});
|
|
104
104
|
|
|
105
105
|
if (response.status === 200) {
|
|
106
|
-
return response.json();
|
|
106
|
+
return response.json() as any;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
const body = await response.text();
|
|
@@ -126,7 +126,7 @@ export const getLeasingContractByNumber = async (
|
|
|
126
126
|
);
|
|
127
127
|
|
|
128
128
|
if (response.ok) {
|
|
129
|
-
return response.status === 200 ? response.json() : undefined;
|
|
129
|
+
return response.status === 200 ? (response.json() as any) : undefined;
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
const body = await response.text();
|
|
@@ -149,7 +149,7 @@ export const getLeasingContract = async (
|
|
|
149
149
|
);
|
|
150
150
|
|
|
151
151
|
if (response.ok) {
|
|
152
|
-
return response.status === 200 ? response.json() : undefined;
|
|
152
|
+
return response.status === 200 ? (response.json() as any) : undefined;
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
const body = await response.text();
|
|
@@ -173,7 +173,7 @@ export const findLeasingContracts = async (
|
|
|
173
173
|
);
|
|
174
174
|
|
|
175
175
|
if (response.status === 200) {
|
|
176
|
-
return response.json();
|
|
176
|
+
return response.json() as any;
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
const body = await response.text();
|
|
@@ -196,7 +196,7 @@ export const upsertLeasingContract = async (
|
|
|
196
196
|
});
|
|
197
197
|
|
|
198
198
|
if (response.status === 200) {
|
|
199
|
-
return response.json();
|
|
199
|
+
return response.json() as any;
|
|
200
200
|
}
|
|
201
201
|
|
|
202
202
|
const body = await response.text();
|
|
@@ -219,7 +219,7 @@ export const getLeasingAmortizations = async (
|
|
|
219
219
|
);
|
|
220
220
|
|
|
221
221
|
if (response.status === 200) {
|
|
222
|
-
return response.json();
|
|
222
|
+
return response.json() as any;
|
|
223
223
|
}
|
|
224
224
|
|
|
225
225
|
const body = await response.text();
|
|
@@ -242,7 +242,7 @@ export const listAmortizationDocsByContract = async (
|
|
|
242
242
|
);
|
|
243
243
|
|
|
244
244
|
if (response.status === 200) {
|
|
245
|
-
return response.json();
|
|
245
|
+
return response.json() as any as any;
|
|
246
246
|
}
|
|
247
247
|
|
|
248
248
|
const body = await response.text();
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { TENANT_ID_ADMIN_HEADER } from '@bisondesk/commons-sdk/constants';
|
|
2
|
-
import { fetchJson } from '@bisondesk/commons-sdk/fetch';
|
|
3
|
-
|
|
4
|
-
import { cleanHeaders, getAdminAuth } from '@bisondesk/commons-sdk/fetch';
|
|
2
|
+
import { cleanHeaders, fetchJson, getAdminAuth } from '@bisondesk/commons-sdk/fetch';
|
|
5
3
|
import {
|
|
6
4
|
NewOpportunity,
|
|
7
5
|
Opportunity,
|
|
8
6
|
OpportunityBFF,
|
|
9
7
|
OpportunityUpdate,
|
|
10
|
-
} from '../types/opportunities';
|
|
11
|
-
import { LeasingQuoteParams } from '../types/quote-settings';
|
|
12
|
-
import { Quote } from '../types/quotes';
|
|
8
|
+
} from '../types/opportunities.js';
|
|
9
|
+
import { LeasingQuoteParams } from '../types/quote-settings.js';
|
|
10
|
+
import { Quote } from '../types/quotes.js';
|
|
13
11
|
|
|
14
12
|
export const getOpportunityBff = async (
|
|
15
13
|
tenantId: string,
|
package/src/apis/picklists.ts
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
AdHocPicklistRequest,
|
|
7
7
|
AdHocPicklistValueDisplay,
|
|
8
8
|
PicklistOptionsRequest,
|
|
9
|
-
} from '../types/picklists';
|
|
9
|
+
} from '../types/picklists.js';
|
|
10
10
|
|
|
11
11
|
export const getMultiplePicklistValues = async (
|
|
12
12
|
request: AdHocPicklistRequest
|
|
@@ -22,7 +22,7 @@ export const getMultiplePicklistValues = async (
|
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
if (response.ok) {
|
|
25
|
-
return response.json();
|
|
25
|
+
return response.json() as any;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
const body = await response.text();
|
|
@@ -42,7 +42,7 @@ export const getPicklistOptions = async (req: PicklistOptionsRequest): Promise<O
|
|
|
42
42
|
});
|
|
43
43
|
|
|
44
44
|
if (response.ok) {
|
|
45
|
-
return response.json();
|
|
45
|
+
return response.json() as any;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
const body = await response.text();
|
package/src/apis/tenants.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { XError } from '@bisondesk/commons-sdk/errors';
|
|
2
2
|
import { getAdminAuth } from '@bisondesk/commons-sdk/fetch';
|
|
3
3
|
import fetch, { Response } from 'node-fetch';
|
|
4
|
-
import { Tenant, TenantSyncSettings } from '../types/tenants';
|
|
4
|
+
import { Tenant, TenantSyncSettings } from '../types/tenants.js';
|
|
5
5
|
|
|
6
6
|
export const listTenants = async (): Promise<Tenant[]> => {
|
|
7
7
|
const auth = await getAdminAuth();
|
|
@@ -12,7 +12,7 @@ export const listTenants = async (): Promise<Tenant[]> => {
|
|
|
12
12
|
});
|
|
13
13
|
|
|
14
14
|
if (response.ok) {
|
|
15
|
-
return response.json();
|
|
15
|
+
return response.json() as any;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
const body = await response.text();
|
|
@@ -31,7 +31,7 @@ export const listTenantsSyncSettings = async (): Promise<TenantSyncSettings[]> =
|
|
|
31
31
|
);
|
|
32
32
|
|
|
33
33
|
if (response.ok) {
|
|
34
|
-
return response.json();
|
|
34
|
+
return response.json() as any;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
const body = await response.text();
|
|
@@ -50,7 +50,7 @@ export const getTenant = async (tenantId: string): Promise<Tenant | undefined> =
|
|
|
50
50
|
);
|
|
51
51
|
|
|
52
52
|
if (response.ok) {
|
|
53
|
-
return response.status === 200 ? response.json() : undefined;
|
|
53
|
+
return response.status === 200 ? (response.json() as any) : undefined;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
const body = await response.text();
|
|
@@ -71,7 +71,7 @@ export const getTenantByHyperdmsId = async (
|
|
|
71
71
|
);
|
|
72
72
|
|
|
73
73
|
if (response.ok) {
|
|
74
|
-
return response.status === 200 ? response.json() : undefined;
|
|
74
|
+
return response.status === 200 ? (response.json() as any) : undefined;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
const body = await response.text();
|
|
@@ -92,7 +92,7 @@ export const getTenantByHyperportalId = async (
|
|
|
92
92
|
);
|
|
93
93
|
|
|
94
94
|
if (response.ok) {
|
|
95
|
-
return response.status === 200 ? response.json() : undefined;
|
|
95
|
+
return response.status === 200 ? (response.json() as any) : undefined;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
const body = await response.text();
|
package/src/apis/users.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { TENANT_ID_ADMIN_HEADER } from '@bisondesk/commons-sdk/constants';
|
|
|
2
2
|
import { XError } from '@bisondesk/commons-sdk/errors';
|
|
3
3
|
import { cleanHeaders, getAdminAuth } from '@bisondesk/commons-sdk/fetch';
|
|
4
4
|
import fetch, { Response } from 'node-fetch';
|
|
5
|
-
import { User } from '../types/users';
|
|
5
|
+
import { User } from '../types/users.js';
|
|
6
6
|
|
|
7
7
|
export const getUser = async (tenantId: string, userId: string): Promise<User | undefined> => {
|
|
8
8
|
const auth = await getAdminAuth();
|
|
@@ -14,7 +14,7 @@ export const getUser = async (tenantId: string, userId: string): Promise<User |
|
|
|
14
14
|
});
|
|
15
15
|
|
|
16
16
|
if (response.ok) {
|
|
17
|
-
return response.status === 200 ? response.json() : undefined;
|
|
17
|
+
return response.status === 200 ? (response.json() as any) : undefined;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
const body = await response.text();
|