@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,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PAYMENT_NOTIFICATION_ORIGIN = exports.PaymentActions = void 0;
|
|
4
|
-
var PaymentActions;
|
|
5
|
-
(function (PaymentActions) {
|
|
6
|
-
PaymentActions["DELETE"] = "delete";
|
|
7
|
-
PaymentActions["EDIT"] = "edit";
|
|
8
|
-
})(PaymentActions = exports.PaymentActions || (exports.PaymentActions = {}));
|
|
9
|
-
exports.PAYMENT_NOTIFICATION_ORIGIN = 'payment-notification';
|
|
10
|
-
//# sourceMappingURL=payments.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"payments.js","sourceRoot":"/","sources":["types/payments.ts"],"names":[],"mappings":";;;AAAA,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,mCAAiB,CAAA;IACjB,+BAAa,CAAA;AACf,CAAC,EAHW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAGzB;AAEY,QAAA,2BAA2B,GAAG,sBAAsB,CAAC","sourcesContent":["export enum PaymentActions {\n DELETE = 'delete',\n EDIT = 'edit',\n}\n\nexport const PAYMENT_NOTIFICATION_ORIGIN = 'payment-notification';\n\ntype BasePayment = {\n opportunityId: string;\n amount: string;\n description?: string;\n vehicleId: string;\n organizationId: string;\n};\n\nexport type NewPayment = BasePayment & {\n id?: undefined;\n createdAt?: undefined;\n createdBy?: undefined;\n modifiedAt?: undefined;\n modifiedBy?: undefined;\n deletedAt?: undefined;\n deletedBy?: undefined;\n paidAt: string;\n};\n\nexport type Payment = BasePayment & {\n id: string;\n createdAt: string;\n createdBy: string;\n modifiedAt: string;\n modifiedBy: string;\n deletedAt?: string;\n deletedBy?: string;\n paidAt?: string;\n};\n\nexport type PaymentUpdate = {\n description?: string;\n amount?: string;\n paidAt?: string;\n};\n\nexport type PaymentCreateEvent = {\n payment: Payment;\n previousPayment?: undefined;\n action: 'create';\n actionAt: string;\n userId: string;\n tenantId: string;\n branchId: string;\n};\n\nexport type PaymentUpdateEvent = {\n payment: Payment;\n previousPayment: Payment;\n action: 'update';\n actionAt: string;\n userId: string;\n tenantId: string;\n branchId: string;\n};\n\nexport type PaymentDeleteEvent = {\n payment?: undefined;\n previousPayment: Payment;\n action: 'delete';\n actionAt: string;\n userId: string;\n tenantId: string;\n branchId: string;\n};\n\nexport type PaymentEvent = PaymentCreateEvent | PaymentUpdateEvent | PaymentDeleteEvent;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"quote-settings.js","sourceRoot":"/","sources":["types/quote-settings.ts"],"names":[],"mappings":"","sourcesContent":["import { DeliveryParams } from './delivery-settings';\n\nexport type UsedVehiclesSalesParams = BaseQuoteSettings & {\n modifiedBy: string;\n countryCode: 'be';\n profitabilityDealGap: string;\n exaDocumentCosts: string;\n delivery?: DeliveryParams;\n};\n\nexport type BeSpecificQuoteParams = {\n countryCode: 'be';\n other: BaseQuoteSettings['other'] & {\n leasingStartupFeePercentage: string;\n };\n insurance: {\n allRisksCost: string;\n allRisksTax: string;\n allRisksFees: string;\n allRisksMinimumCost: string;\n specialTechnicalInsuranceCost: string;\n specialTechnicalInsuranceTax: string;\n specialTechnicalInsuranceFees: string;\n civilLiabilitiesCost: string;\n civilLiabilitiesTax: string;\n civilLiabilitiesFees: string;\n roadAssistanceMonthlySalesPrice: string; // monthly Price\n roadAssistanceMonthlyCostPrice: string; // monthly Price\n margin: string;\n allRisksCheckedForLocalClients: boolean;\n specialTechnicalInsuranceCheckedForLocalClients: boolean;\n civilLiabilitiesCheckedForLocalClients: boolean;\n roadAssistanceCheckedForLocalClients: boolean;\n initialFractionPercentage: '0';\n };\n track: {\n trackAndTrace24Cost: string;\n trackAndTrace36Cost: string;\n trackAndTrace48Cost: string;\n trackAndTraceMaxCost: string;\n };\n taxes: {\n oneTimeRoadTax: string;\n yearlyRoadTax: string;\n oneTimeRoadCheckedForLocalClients: boolean;\n yearlyRoadCheckedForLocalClients: boolean;\n margin: string;\n };\n};\n\nexport type BoSpecificQuoteParams = {\n countryCode: 'bo';\n insurance: {\n allRisksCost: string;\n margin: string;\n initialFractionPercentage: string;\n };\n other: BaseQuoteSettings['other'] & {\n administrativeFee: string;\n };\n track: {\n installationCost: string;\n monthlyCost: string;\n monthlyFee: string;\n deviceCost: string;\n };\n};\n\nexport type CountrySpecificQuoteParams = BeSpecificQuoteParams | BoSpecificQuoteParams;\n\ntype BaseQuoteSettings = {\n id: string;\n modifiedAt: string;\n name: string;\n other: { minimumDepositAdjudicationPercentage: string };\n};\n\nexport type LeasingQuoteParams<P extends CountrySpecificQuoteParams = CountrySpecificQuoteParams> =\n BaseQuoteSettings & {\n leasing: {\n leasingInterestRate: string;\n leasingDuration: number;\n leasingDepositPercentage: string;\n leasingResidualValuePercentage: string;\n };\n costs: {\n bankDepositPercentage: string;\n bankInterestRate: string;\n bankResidualValuePercentage: string;\n };\n } & P;\n\nexport type QuoteSettings = LeasingQuoteParams | UsedVehiclesSalesParams;\n"]}
|
package/lib/cjs/types/quotes.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TransportationMode = exports.SpoilerInfo = exports.DeliveryTypes = exports.QuoteMetricsScore = exports.QuoteStatus = exports.QuoteActions = void 0;
|
|
4
|
-
var QuoteActions;
|
|
5
|
-
(function (QuoteActions) {
|
|
6
|
-
QuoteActions["ACCEPT"] = "accept";
|
|
7
|
-
QuoteActions["VALIDATE"] = "validate";
|
|
8
|
-
QuoteActions["DONWLOAD_PDFS"] = "download-pdfs";
|
|
9
|
-
QuoteActions["CANCEL"] = "cancel";
|
|
10
|
-
})(QuoteActions = exports.QuoteActions || (exports.QuoteActions = {}));
|
|
11
|
-
var QuoteStatus;
|
|
12
|
-
(function (QuoteStatus) {
|
|
13
|
-
QuoteStatus["CREATED"] = "created";
|
|
14
|
-
QuoteStatus["VALIDATED"] = "validated";
|
|
15
|
-
QuoteStatus["INVALIDATED"] = "invalidated";
|
|
16
|
-
QuoteStatus["ACCEPTED"] = "accepted";
|
|
17
|
-
QuoteStatus["REJECTED"] = "rejected";
|
|
18
|
-
QuoteStatus["CANCELLED"] = "cancelled";
|
|
19
|
-
QuoteStatus["MANAGER_REJECTED"] = "managerRejected";
|
|
20
|
-
QuoteStatus["MANAGER_ACCEPTED"] = "managerAccepted";
|
|
21
|
-
})(QuoteStatus = exports.QuoteStatus || (exports.QuoteStatus = {}));
|
|
22
|
-
var QuoteMetricsScore;
|
|
23
|
-
(function (QuoteMetricsScore) {
|
|
24
|
-
QuoteMetricsScore["DANGER"] = "danger";
|
|
25
|
-
QuoteMetricsScore["NEUTRAL"] = "neutral";
|
|
26
|
-
QuoteMetricsScore["GOOD"] = "good";
|
|
27
|
-
})(QuoteMetricsScore = exports.QuoteMetricsScore || (exports.QuoteMetricsScore = {}));
|
|
28
|
-
var DeliveryTypes;
|
|
29
|
-
(function (DeliveryTypes) {
|
|
30
|
-
DeliveryTypes["PICK_UP"] = "pickUp";
|
|
31
|
-
DeliveryTypes["ADDRESS"] = "address";
|
|
32
|
-
DeliveryTypes["PORT"] = "port";
|
|
33
|
-
})(DeliveryTypes = exports.DeliveryTypes || (exports.DeliveryTypes = {}));
|
|
34
|
-
var SpoilerInfo;
|
|
35
|
-
(function (SpoilerInfo) {
|
|
36
|
-
SpoilerInfo["MOUNT"] = "mount";
|
|
37
|
-
SpoilerInfo["UNMOUNT"] = "unmount";
|
|
38
|
-
SpoilerInfo["NO_ACTION"] = "noAction";
|
|
39
|
-
})(SpoilerInfo = exports.SpoilerInfo || (exports.SpoilerInfo = {}));
|
|
40
|
-
var TransportationMode;
|
|
41
|
-
(function (TransportationMode) {
|
|
42
|
-
TransportationMode["BY_ROAD"] = "byRoad";
|
|
43
|
-
TransportationMode["ON_LOW_BED"] = "onLowBed";
|
|
44
|
-
})(TransportationMode = exports.TransportationMode || (exports.TransportationMode = {}));
|
|
45
|
-
//# sourceMappingURL=quotes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"quotes.js","sourceRoot":"/","sources":["types/quotes.ts"],"names":[],"mappings":";;;AAYA,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;IACrB,+CAA+B,CAAA;IAC/B,iCAAiB,CAAA;AACnB,CAAC,EALW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAKvB;AAED,IAAY,WASX;AATD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,sCAAuB,CAAA;IACvB,0CAA2B,CAAA;IAC3B,oCAAqB,CAAA;IACrB,oCAAqB,CAAA;IACrB,sCAAuB,CAAA;IACvB,mDAAoC,CAAA;IACpC,mDAAoC,CAAA;AACtC,CAAC,EATW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAStB;AAED,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,sCAAiB,CAAA;IACjB,wCAAmB,CAAA;IACnB,kCAAa,CAAA;AACf,CAAC,EAJW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAI5B;AACD,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,mCAAkB,CAAA;IAClB,oCAAmB,CAAA;IACnB,8BAAa,CAAA;AACf,CAAC,EAJW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAIxB;AAED,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,8BAAe,CAAA;IACf,kCAAmB,CAAA;IACnB,qCAAsB,CAAA;AACxB,CAAC,EAJW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAItB;AAED,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,wCAAkB,CAAA;IAClB,6CAAuB,CAAA;AACzB,CAAC,EAHW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAG7B","sourcesContent":["import { AttachmentValue, LocationValue } from '@bisondesk/commons-sdk/types';\nimport { OpportunityType } from '../constants';\nimport {\n CustomLeasingQuoteExtraInput,\n CustomSalesQuoteExtraInput,\n LeasingDeliveryPackageInput,\n LeasingQuoteExtraInput,\n SalesQuoteExtraInput,\n} from './leasing-settings';\nimport { MatchingRuleValue } from './roi-ratings';\nimport { PricePercentageMode } from './utils';\n\nexport enum QuoteActions {\n ACCEPT = 'accept',\n VALIDATE = 'validate',\n DONWLOAD_PDFS = 'download-pdfs',\n CANCEL = 'cancel',\n}\n\nexport enum QuoteStatus {\n CREATED = 'created',\n VALIDATED = 'validated',\n INVALIDATED = 'invalidated',\n ACCEPTED = 'accepted',\n REJECTED = 'rejected',\n CANCELLED = 'cancelled',\n MANAGER_REJECTED = 'managerRejected',\n MANAGER_ACCEPTED = 'managerAccepted',\n}\n\nexport enum QuoteMetricsScore {\n DANGER = 'danger',\n NEUTRAL = 'neutral',\n GOOD = 'good',\n}\nexport enum DeliveryTypes {\n PICK_UP = 'pickUp',\n ADDRESS = 'address',\n PORT = 'port',\n}\n\nexport enum SpoilerInfo {\n MOUNT = 'mount',\n UNMOUNT = 'unmount',\n NO_ACTION = 'noAction',\n}\n\nexport enum TransportationMode {\n BY_ROAD = 'byRoad',\n ON_LOW_BED = 'onLowBed',\n}\n\ntype BaseQuoteCalculatorInput = {\n branchId: string;\n branchCountry: string;\n customerCountry: string;\n customerVatNumber?: string;\n currency: string;\n vehicle: {\n id: string;\n category: string;\n bodywork?: string;\n agreedPriceExclVat: string;\n };\n};\n\n// Sent by the Frontend to bootstrap the calculator\nexport type LeasingCalculatorDefaultInput = BaseQuoteCalculatorInput & {\n deliveryPackage?: LeasingQuoteExtraInput;\n};\n\nexport type LeasingCalculatorInput = BaseQuoteCalculatorInput & {\n localLicensePlate: boolean;\n vanCourier: boolean;\n vehicle: BaseQuoteCalculatorInput['vehicle'] & {\n purchasePriceExclVat: string;\n agreedPrice: string;\n purchasePrice: string;\n };\n leasing: {\n deposit: string;\n depositMode: PricePercentageMode;\n depositPercentage: string;\n residual: string;\n residualMode: PricePercentageMode;\n residualPercentage: string;\n startupFee: string;\n startupFeeMode: PricePercentageMode;\n startupFeePercentage: string;\n interestRate: string;\n duration: number;\n contractStartDate: string;\n };\n bank: {\n interestRate: string;\n deposit: string;\n depositMode: PricePercentageMode;\n depositPercentage: string;\n residual: string;\n residualMode: PricePercentageMode;\n residualPercentage: string;\n duration: number;\n salesPrice: string;\n };\n taxes: {\n yearlyRoadTax: boolean;\n oneTimeRoadTax: boolean;\n margin: string; //Non Editable, copies the value insurance > margin\n };\n insurance: {\n margin: string;\n civilLiabilities: boolean;\n allRisks: boolean;\n specialTechnicalInsurance: boolean;\n roadAssistance: boolean;\n initialFractionPercentage: string;\n };\n deliveryPackage?: LeasingDeliveryPackageInput;\n extras: LeasingQuoteExtraInput[];\n customRequests: CustomLeasingQuoteExtraInput[];\n};\n\ntype BaseDeliveryType = {\n agreedPrice: string;\n spoiler?: SpoilerInfo;\n stackingVehicleNeeded?: boolean;\n detailsStacking?: string;\n};\n\nexport type PickUpDeliveryType = BaseDeliveryType & {\n type: DeliveryTypes.PICK_UP;\n urgent: boolean;\n transportationMode?: TransportationMode;\n detailsBorderCrossing?: string;\n technicalControlNeeded: boolean;\n insuranceNeeded: boolean;\n transitPlateBelgiumNeeded: boolean;\n transitPlateAustriaNeeded: boolean;\n licensePlateNeeded: boolean;\n dateOfPickUpByCustomer?: string;\n};\n\nexport type AddressDeliveryType = BaseDeliveryType & {\n type: DeliveryTypes.ADDRESS;\n address: LocationValue;\n distanceKm: string;\n technicalControlNeeded: boolean;\n};\n\nexport type PortDeliverytype = BaseDeliveryType & {\n type: DeliveryTypes.PORT;\n portOriginId: string;\n portDestination?: string;\n shippingCompany?: string;\n portToPortCostPrice: string;\n portToPortMargin: string;\n};\n\n// Sent by the Frontend to bootstrap the calculator\nexport type SalesCalculatorDefaultInput = BaseQuoteCalculatorInput & {\n extras: SalesQuoteExtraInput[];\n customRequests: CustomSalesQuoteExtraInput[];\n};\n\nexport type SalesCalculatorInput = BaseQuoteCalculatorInput & {\n vehicle: BaseQuoteCalculatorInput['vehicle'] & {\n purchasePrice: string;\n purchasePriceExclVat: string;\n agreedPrice: string;\n premiumPrice?: string;\n vatRate: string;\n minimumPrice: string;\n internetPrice?: string;\n comissionCost: string;\n };\n delivery?: PickUpDeliveryType | AddressDeliveryType | PortDeliverytype;\n extras: SalesQuoteExtraInput[];\n customRequests: CustomSalesQuoteExtraInput[];\n};\n\nexport type SalesQuoteRuleInput = {\n minimumPrice: number;\n internetPrice: number;\n agreedPrice: number;\n premiumPrice: number;\n stockAge: number;\n};\n\nexport type LeasingCalculatorOutput = {\n vatApplicable: boolean;\n installment: string;\n installmentPrintable: string;\n totalMonthlyAmount: string;\n monthlyTaxesInsurance: string;\n beforeDeliveryExclVat: string;\n beforeDelivery: string;\n financingAmount: string;\n settingId: string;\n totalRetailAmount: string;\n finalSalesPrice: string;\n roi: {\n value: string;\n target: string;\n perYear: string;\n difference: string;\n score?: QuoteMetricsScore;\n };\n cashflow: {\n deficit: string;\n balanced: boolean;\n score: QuoteMetricsScore;\n };\n profitability: {\n leasing: string;\n vehicle: string;\n total: string;\n score: QuoteMetricsScore;\n };\n taxes: {\n yearlyRetailPrice: string;\n monthlyRetailPrice: string;\n yearlyRoadTax: string;\n oneTimeRoadTax: string;\n profit: string;\n };\n insurance: {\n beforeDelivery: string;\n yearlyRetailPrice: string;\n monthlyRetailPrice: string;\n civilLiabilities: string;\n allRisks: string;\n specialTechnicalInsurance: string;\n roadAssistance: string;\n profit: string;\n };\n trackAndTrace: {\n beforeDelivery: string;\n monthlyCost: string;\n installationCost: string; // currently this cost is being included as part of monthlyCost. In future, this will be a separate cost\n deviceCost: string; // same as above\n profit: string;\n };\n costs: {\n financingAmount: string;\n finalCostPrice: string;\n monhtly: string;\n };\n};\n\nexport type SalesCalculatorOutput = {\n totalRetailAmount: string;\n totalRetailAmountExclVat: string;\n retailAmounts: {\n vehicle: string;\n delivery: string;\n extras: string;\n };\n roi: { value: string; score?: QuoteMetricsScore };\n profit: {\n value: string;\n score: QuoteMetricsScore;\n };\n profitOverMin: {\n value: string;\n percentage: string;\n score: QuoteMetricsScore;\n };\n delivery: {\n retailPrice?: string;\n costPrice?: string;\n cleaningNeeded: boolean;\n cleaningNeededRetailPrice: string;\n transportationToPortRetailPrice?: string;\n };\n costs: {\n finalCostPrice: string;\n extras: string;\n delivery: string;\n };\n};\n\ntype BaseQuote = {\n opportunityId: string;\n preferredLanguage: string;\n clientNotes?: string;\n publicNotes?: string;\n} & (\n | {\n type: OpportunityType.LEASING;\n calculatorInput: LeasingCalculatorInput;\n calculatorOutput: LeasingCalculatorOutput;\n rating?: MatchingRuleValue;\n }\n | {\n type: OpportunityType.SALES;\n calculatorInput: SalesCalculatorInput;\n calculatorOutput: SalesCalculatorOutput;\n rating?: MatchingRuleValue;\n }\n);\n\nexport type NewQuote = BaseQuote & {\n id?: undefined;\n createdAt?: undefined;\n createdBy?: undefined;\n modifiedAt?: undefined;\n modifiedBy?: undefined;\n active: true;\n};\n\nexport type Quote = BaseQuote & {\n id: string;\n createdAt: string;\n createdBy: string;\n modifiedAt: string;\n modifiedBy: string;\n validationBy?: string;\n validationAt?: string;\n cancelledBy?: string;\n cancelledAt?: string;\n customerFeedbackAt?: string;\n customerFeedbackBy?: string;\n managerFeedbackAt?: string;\n managerFeedbackBy?: string;\n version: number;\n status: QuoteStatus;\n proformaPdf?: AttachmentValue;\n quotePdf?: AttachmentValue;\n salesAgreementPdf?: AttachmentValue;\n active: boolean;\n contactId: string;\n vehicleId: string;\n organizationId: string;\n};\n\nexport type QuoteUpdate = {\n status?: QuoteStatus;\n active?: boolean;\n};\n\nexport type CalculatorLeasingIO = {\n output: LeasingCalculatorOutput;\n input: LeasingCalculatorInput;\n rating?: MatchingRuleValue;\n};\nexport type CalculatorSalesIO = {\n output: SalesCalculatorOutput;\n input: SalesCalculatorInput;\n rating?: MatchingRuleValue;\n};\nexport type CalculatorQuoteIO = CalculatorLeasingIO | CalculatorSalesIO;\n\nexport type DeliveryLocationValue = Omit<LocationValue, 'addressLine1' | 'city'> & {\n addressLine1: string;\n city: string;\n};\n\nexport type DeliveryRoutesRequest = {\n origin: DeliveryLocationValue;\n destination: DeliveryLocationValue;\n};\n\ntype BaseCommission = {\n opportunityId: string;\n\n estimatedAmount: string;\n estimatedPaidAt: string;\n paidAmount?: string;\n paidAt?: string;\n\n notes?: string;\n};\n\nexport type NewCommission = BaseCommission & {};\n\nexport type Commission = BaseCommission & {\n stockNumber: string;\n vehicleId: string;\n\n branchId: string;\n currency: string;\n\n modifiedAt: string;\n modifiedBy: string;\n};\n\nexport type NewQuoteValidator = {\n userId: string;\n countryCode: string;\n type: OpportunityType;\n canValidateOwn?: boolean;\n};\n\nexport type QuoteValidator = NewQuoteValidator & {\n createdAt: string;\n};\n\nexport type QuoteValidatorUpdate = {\n canValidateOwn: boolean;\n};\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"recently-viewed.js","sourceRoot":"/","sources":["types/recently-viewed.ts"],"names":[],"mappings":"","sourcesContent":["import { AttachmentValue, Requester } from '@bisondesk/commons-sdk/types';\nimport { BusinessEntityIds } from '../constants';\n\nexport type ViewedItemsRequest = {\n businessEntity?: string;\n id?: string;\n};\n\nexport type NewViewedItem = {\n businessEntity: BusinessEntityIds;\n id: string;\n viewedAt: string;\n};\n\nexport type ViewedItemMeta = {\n title: string;\n subtitle: string;\n thumbnail?: AttachmentValue | null; // null signals that it can have a thumbnail, it is just not available\n};\n\nexport type ViewedItem = ViewedItemMeta & {\n viewedAt: string;\n id: string;\n actions: string[];\n};\n\nexport type RawViewedItem = {\n id: string;\n viewedAt: string;\n};\n\nexport type ViewedItemHandler = (\n requester: Requester,\n req: ViewedItemsRequest,\n itemsBusinessEntity: BusinessEntityIds,\n items: RawViewedItem[]\n) => Promise<ViewedItem[]>;\n\nexport type ViewedItemsContextHandlers = {\n [entity in BusinessEntityIds]?: ViewedItemHandler;\n};\n\nexport type ViewedItemsHandlersCollection = {\n [entity in BusinessEntityIds]?: ViewedItemsContextHandlers;\n};\n"]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ReservationActions = void 0;
|
|
4
|
-
var ReservationActions;
|
|
5
|
-
(function (ReservationActions) {
|
|
6
|
-
ReservationActions["SET_RESERVATION_EXPIRE"] = "update_expires_at";
|
|
7
|
-
})(ReservationActions = exports.ReservationActions || (exports.ReservationActions = {}));
|
|
8
|
-
//# sourceMappingURL=reservations.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reservations.js","sourceRoot":"/","sources":["types/reservations.ts"],"names":[],"mappings":";;;AAAA,IAAY,kBAEX;AAFD,WAAY,kBAAkB;IAC5B,kEAA4C,CAAA;AAC9C,CAAC,EAFW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAE7B","sourcesContent":["export enum ReservationActions {\n SET_RESERVATION_EXPIRE = 'update_expires_at',\n}\n\nexport type OpportunityReservation = {\n id: string;\n\n vehicleId: string;\n opportunityId: string;\n expireStartedAt: string;\n expiresAt?: string;\n expiresBy: string;\n\n createdAt: string;\n createdBy: string;\n modifiedAt: string;\n modifiedBy: string;\n\n deletedAt?: string;\n};\n"]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DisplayType = void 0;
|
|
4
|
-
var DisplayType;
|
|
5
|
-
(function (DisplayType) {
|
|
6
|
-
DisplayType["StarsRating"] = "stars-rating";
|
|
7
|
-
})(DisplayType = exports.DisplayType || (exports.DisplayType = {}));
|
|
8
|
-
//# sourceMappingURL=roi-ratings.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"roi-ratings.js","sourceRoot":"/","sources":["types/roi-ratings.ts"],"names":[],"mappings":";;;AAIA,IAAY,WAEX;AAFD,WAAY,WAAW;IACrB,2CAA4B,CAAA;AAC9B,CAAC,EAFW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAEtB","sourcesContent":["import { AdditionalOperation, RulesLogic } from 'json-logic-js';\nimport { OpportunityType } from '../constants';\nimport { FieldTypeInfo } from './fields';\n\nexport enum DisplayType {\n StarsRating = 'stars-rating',\n}\n\nexport type ROIRule = {\n conditions: RulesLogic<AdditionalOperation>;\n value: number;\n};\n\nexport type MatchingRuleValue = {\n value: number;\n createdAt: string;\n type: DisplayType;\n ruleIdx: number;\n opportunityType: OpportunityType;\n};\n\ntype BaseROIRatings = {\n type: DisplayType;\n opportunityType: OpportunityType;\n rules: ROIRule[];\n};\n\nexport type ROIRatings = BaseROIRatings & {\n readonly createdAt: string;\n readonly createdBy: string;\n readonly fields: DataFields;\n};\n\nexport type NewROIRatings = BaseROIRatings & {\n readonly createdAt?: undefined;\n readonly createdBy?: undefined;\n readonly fields?: DataFields;\n};\n\nexport type Field = {\n titles: { [lang: string]: string };\n} & FieldTypeInfo;\n\nexport type DataFields = {\n [key: string]: Field;\n};\n"]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SavedFiltersActions = void 0;
|
|
4
|
-
var SavedFiltersActions;
|
|
5
|
-
(function (SavedFiltersActions) {
|
|
6
|
-
SavedFiltersActions["Share"] = "share";
|
|
7
|
-
SavedFiltersActions["Update"] = "update";
|
|
8
|
-
SavedFiltersActions["Delete"] = "delete";
|
|
9
|
-
SavedFiltersActions["SetPersonalDefault"] = "set_own_default";
|
|
10
|
-
SavedFiltersActions["SetGlobalDefault"] = "set_global_default";
|
|
11
|
-
})(SavedFiltersActions = exports.SavedFiltersActions || (exports.SavedFiltersActions = {}));
|
|
12
|
-
//# sourceMappingURL=saved-filters.js.map
|
package/lib/cjs/types/search.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AggregationType = exports.SortOrder = exports.FILTER_RANGE_SEPARATOR = exports.ElasticsearchOperator = exports.ConditionType = void 0;
|
|
4
|
-
var ConditionType;
|
|
5
|
-
(function (ConditionType) {
|
|
6
|
-
ConditionType["and"] = "AND";
|
|
7
|
-
ConditionType["or"] = "OR";
|
|
8
|
-
})(ConditionType = exports.ConditionType || (exports.ConditionType = {}));
|
|
9
|
-
var ElasticsearchOperator;
|
|
10
|
-
(function (ElasticsearchOperator) {
|
|
11
|
-
ElasticsearchOperator["empty"] = "EMPTY";
|
|
12
|
-
ElasticsearchOperator["notEmpty"] = "NOT_EMPTY";
|
|
13
|
-
ElasticsearchOperator["is"] = "IS";
|
|
14
|
-
ElasticsearchOperator["isNot"] = "IS_NOT";
|
|
15
|
-
ElasticsearchOperator["greaterThanOrEqual"] = "GTE";
|
|
16
|
-
ElasticsearchOperator["greaterThan"] = "GT";
|
|
17
|
-
ElasticsearchOperator["lessThanEqual"] = "LTE";
|
|
18
|
-
ElasticsearchOperator["lessThan"] = "LT";
|
|
19
|
-
ElasticsearchOperator["between"] = "BETWEEN";
|
|
20
|
-
ElasticsearchOperator["contains"] = "CONTAINS";
|
|
21
|
-
ElasticsearchOperator["notContains"] = "NOT_CONTAINS";
|
|
22
|
-
ElasticsearchOperator["startsWith"] = "STARTS_WITH";
|
|
23
|
-
ElasticsearchOperator["endsWith"] = "ENDS_WITH";
|
|
24
|
-
})(ElasticsearchOperator = exports.ElasticsearchOperator || (exports.ElasticsearchOperator = {}));
|
|
25
|
-
exports.FILTER_RANGE_SEPARATOR = '__';
|
|
26
|
-
var SortOrder;
|
|
27
|
-
(function (SortOrder) {
|
|
28
|
-
SortOrder["asc"] = "asc";
|
|
29
|
-
SortOrder["desc"] = "desc";
|
|
30
|
-
})(SortOrder = exports.SortOrder || (exports.SortOrder = {}));
|
|
31
|
-
var AggregationType;
|
|
32
|
-
(function (AggregationType) {
|
|
33
|
-
AggregationType["term"] = "TERM";
|
|
34
|
-
AggregationType["range"] = "RANGE";
|
|
35
|
-
})(AggregationType = exports.AggregationType || (exports.AggregationType = {}));
|
|
36
|
-
//# sourceMappingURL=search.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"search.js","sourceRoot":"/","sources":["types/search.ts"],"names":[],"mappings":";;;AAQA,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,4BAAW,CAAA;IACX,0BAAS,CAAA;AACX,CAAC,EAHW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAGxB;AAED,IAAY,qBAiBX;AAjBD,WAAY,qBAAqB;IAE/B,wCAAe,CAAA;IACf,+CAAsB,CAAA;IACtB,kCAAS,CAAA;IACT,yCAAgB,CAAA;IAEhB,mDAA0B,CAAA;IAC1B,2CAAkB,CAAA;IAClB,8CAAqB,CAAA;IACrB,wCAAe,CAAA;IACf,4CAAmB,CAAA;IAEnB,8CAAqB,CAAA;IACrB,qDAA4B,CAAA;IAC5B,mDAA0B,CAAA;IAC1B,+CAAsB,CAAA;AACxB,CAAC,EAjBW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAiBhC;AA8CY,QAAA,sBAAsB,GAAG,IAAI,CAAC;AAE3C,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAGpB;AAiDD,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,gCAAa,CAAA;IACb,kCAAe,CAAA;AACjB,CAAC,EAHW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAG1B","sourcesContent":["///////////////////////////////////////////////////////\n// Generic stuff\n///////////////////////////////////////////////////////\n\nimport { SUPPORTED_LANGUAGES } from '@bisondesk/commons-sdk/constants';\nimport { MultiLangValue } from '@bisondesk/commons-sdk/types';\nimport { FieldTypes, NumberMeta } from './fields';\n\nexport enum ConditionType {\n and = 'AND',\n or = 'OR',\n}\n\nexport enum ElasticsearchOperator {\n // all properties\n empty = 'EMPTY',\n notEmpty = 'NOT_EMPTY',\n is = 'IS',\n isNot = 'IS_NOT',\n // number, date properties\n greaterThanOrEqual = 'GTE',\n greaterThan = 'GT',\n lessThanEqual = 'LTE',\n lessThan = 'LT',\n between = 'BETWEEN',\n // string properties\n contains = 'CONTAINS',\n notContains = 'NOT_CONTAINS',\n startsWith = 'STARTS_WITH',\n endsWith = 'ENDS_WITH',\n}\n\nexport type Filter<OP = ElasticsearchOperator> = {\n data: string;\n fieldId: string;\n operator: OP;\n};\n\nexport type ComplexFilter<OP = ElasticsearchOperator> = {\n condition: ConditionType;\n filters: Array<Filter<OP> | ComplexFilter<OP>>;\n};\n\nexport type SearchResponse<T = any> = {\n took: number;\n timed_out: boolean;\n _scroll_id?: string;\n _shards: unknown;\n hits: {\n total: {\n value: number;\n relation: 'eq' | 'gte';\n };\n max_score: number;\n hits: Array<{\n _index: string;\n _type: string;\n _id: string;\n _score: number;\n _source?: T;\n _version?: number;\n _explanation?: unknown;\n fields?: any;\n highlight?: any;\n inner_hits?: any;\n matched_queries?: string[];\n sort?: Array<string | number>;\n }>;\n };\n aggregations?: { [aggName: string]: object };\n};\n\n///////////////////////////////////////////////////////\n// Search\n///////////////////////////////////////////////////////\n\nexport const FILTER_RANGE_SEPARATOR = '__';\n\nexport enum SortOrder {\n asc = 'asc',\n desc = 'desc',\n}\n\nexport type SortFilter = {\n fieldId: string;\n order: SortOrder;\n};\n\nexport type BaseSearchRequest = {\n fullText?: string;\n limit: number;\n query?: ComplexFilter<ElasticsearchOperator>;\n sortBy?: SortFilter[];\n};\n\ntype InfiniteSearchRequest = {\n infinite: true;\n nextToken?: string;\n};\n\ntype PaginatedSearchRequest = {\n infinite?: false;\n offset?: number;\n};\n\nexport type SearchRequest = {\n fullText?: string;\n limit: number;\n query?: ComplexFilter<ElasticsearchOperator>;\n sortBy?: SortFilter[];\n} & (InfiniteSearchRequest | PaginatedSearchRequest);\n\nexport type PublicSearchRequest = {\n limit: number;\n offset?: number;\n query?: ComplexFilter;\n sortBy?: SortFilter[];\n};\n\n///////////////////////////////////////////////////////\n// Aggregations\n///////////////////////////////////////////////////////\n\nexport type AggFilterOperator =\n | ElasticsearchOperator.is\n | ElasticsearchOperator.greaterThan\n | ElasticsearchOperator.lessThan\n | ElasticsearchOperator.greaterThanOrEqual\n | ElasticsearchOperator.lessThanEqual;\n\nexport enum AggregationType {\n term = 'TERM',\n range = 'RANGE',\n}\n\nexport type TermAggregation = {\n titles: MultiLangValue & { [local in (typeof SUPPORTED_LANGUAGES)[number]]: string };\n fieldId: string;\n type: AggregationType.term;\n\n orderBy?: 'count' | 'field';\n} & (\n | {\n fieldType: FieldTypes.picklist;\n picklistId: string;\n }\n | {\n fieldType: FieldTypes.number;\n meta?: NumberMeta;\n }\n | {\n fieldType: Exclude<FieldTypes, FieldTypes.picklist | FieldTypes.number>;\n }\n);\n\nexport type Range =\n | {\n start: number;\n end?: number;\n }\n | {\n start?: number;\n end: number;\n }\n | {\n start: number;\n end: number;\n };\n\nexport type RangeAggregation = {\n titles: MultiLangValue & { [local in (typeof SUPPORTED_LANGUAGES)[number]]: string };\n fieldId: string;\n type: AggregationType.range;\n step: number;\n ranges: Range[];\n format?: NumberMeta;\n};\n\nexport type Aggregation = TermAggregation | RangeAggregation;\n\nexport type AggregationRequest = {\n fullText?: string;\n filters: ComplexFilter<AggFilterOperator>[];\n};\n\nexport type AggregationResult = {\n value: string;\n count: number;\n from?: number;\n to?: number;\n};\n\nexport type AggregationResultSet = {\n [field: string]: AggregationResult[];\n};\n\nexport type AggregationResponse<M = {}> = {\n results: AggregationResultSet;\n meta: M;\n};\n"]}
|
package/lib/cjs/types/storage.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"storage.js","sourceRoot":"/","sources":["types/storage.ts"],"names":[],"mappings":";;;AAAA,yEAA+C","sourcesContent":["export * from '@bisondesk/commons-sdk/storage';\n"]}
|
package/lib/cjs/types/tenants.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TenantModule = void 0;
|
|
4
|
-
var TenantModule;
|
|
5
|
-
(function (TenantModule) {
|
|
6
|
-
TenantModule["App"] = "app";
|
|
7
|
-
TenantModule["CRM"] = "crm";
|
|
8
|
-
TenantModule["Docs"] = "docs";
|
|
9
|
-
TenantModule["Leads"] = "leads";
|
|
10
|
-
TenantModule["Leasing"] = "leasing";
|
|
11
|
-
TenantModule["Insights"] = "insights";
|
|
12
|
-
TenantModule["Opportunities"] = "opportunities";
|
|
13
|
-
TenantModule["VehiclesMasterData"] = "vehicles_master_data";
|
|
14
|
-
TenantModule["Vehicles"] = "vehicles";
|
|
15
|
-
TenantModule["Tasks"] = "tasks";
|
|
16
|
-
TenantModule["TrackAndTrace"] = "track_and_trace";
|
|
17
|
-
TenantModule["Bootstrap"] = "bootstrap";
|
|
18
|
-
})(TenantModule = exports.TenantModule || (exports.TenantModule = {}));
|
|
19
|
-
//# sourceMappingURL=tenants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tenants.js","sourceRoot":"/","sources":["types/tenants.ts"],"names":[],"mappings":";;;AAgBA,IAAY,YAaX;AAbD,WAAY,YAAY;IACtB,2BAAW,CAAA;IACX,2BAAW,CAAA;IACX,6BAAa,CAAA;IACb,+BAAe,CAAA;IACf,mCAAmB,CAAA;IACnB,qCAAqB,CAAA;IACrB,+CAA+B,CAAA;IAC/B,2DAA2C,CAAA;IAC3C,qCAAqB,CAAA;IACrB,+BAAe,CAAA;IACf,iDAAiC,CAAA;IACjC,uCAAuB,CAAA;AACzB,CAAC,EAbW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAavB","sourcesContent":["import { LocationValue, Region } from '@bisondesk/commons-sdk/types';\nimport { OpportunityType } from '../constants';\n\nexport type PublicTenant = {\n defaultCountry: string;\n defaultCurrency: string;\n defaultLanguage: string;\n id: string; // the id is provided on creation bc we assume tenants will be created by someone on the team\n name: string;\n region: Region;\n subdomains: [string, ...string[]];\n\n // Pay attention to what information is added here since\n // the tenant can be obtained without authentication\n};\n\nexport enum TenantModule {\n App = 'app',\n CRM = 'crm',\n Docs = 'docs',\n Leads = 'leads',\n Leasing = 'leasing',\n Insights = 'insights',\n Opportunities = 'opportunities',\n VehiclesMasterData = 'vehicles_master_data',\n Vehicles = 'vehicles',\n Tasks = 'tasks',\n TrackAndTrace = 'track_and_trace',\n Bootstrap = 'bootstrap',\n}\n\nexport type Tenant = PublicTenant & {\n languages: [string, ...string[]];\n conglomerate?: string;\n emailDomain: string;\n hyperdmsIds?: string[];\n hyperportalId?: string;\n exactAccounting?: boolean;\n branches: [Branch, ...Branch[]];\n modules: TenantModule[];\n test?: boolean;\n opportunities: {\n types: OpportunityType[];\n };\n};\n\nexport type Branch = {\n id: string;\n name: string;\n country: string;\n exactAccounting?: boolean;\n currency: string;\n adminNumberPrefix: string;\n stockNumberPrefix: string;\n vatRates: {\n standard: string; //percentage value (e.g. 21)\n };\n location: LocationValue;\n};\n\nexport type HdmsVehiclesSync = {\n active: boolean;\n};\n\nexport type HdmsCrmSync = {\n active: boolean;\n};\n\nexport type TenantSyncSettings = {\n tenantId: string;\n hdmsVehicles: HdmsVehiclesSync | undefined;\n hdmsCrm: HdmsCrmSync | undefined;\n};\n"]}
|
package/lib/cjs/types/users.js
DELETED
package/lib/cjs/types/utils.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PricePercentageMode = void 0;
|
|
4
|
-
var PricePercentageMode;
|
|
5
|
-
(function (PricePercentageMode) {
|
|
6
|
-
PricePercentageMode["CURRENCY"] = "currency";
|
|
7
|
-
PricePercentageMode["PERCENTAGE"] = "percentage";
|
|
8
|
-
})(PricePercentageMode = exports.PricePercentageMode || (exports.PricePercentageMode = {}));
|
|
9
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"/","sources":["types/utils.ts"],"names":[],"mappings":";;;AAgDA,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC7B,4CAAqB,CAAA;IACrB,gDAAyB,CAAA;AAC3B,CAAC,EAHW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAG9B","sourcesContent":["import { MultiLangValue } from '@bisondesk/commons-sdk/types';\nimport { AdHocPicklistValueDisplay } from './picklists';\n\nexport type CountryInfo = {\n code: string; // code is ISO 3166-1 alpha-2\n name: string;\n labels: {\n city: string;\n state: string;\n postalCode?: string;\n };\n required: {\n city: boolean;\n state: boolean;\n postalCode: boolean;\n };\n dialCode: number;\n currencyCode: string;\n states?: {\n [code: string]: string; // code is ISO 3166-2\n };\n postalCodeFormat?: string;\n postalCodeEx?: string;\n};\n\nexport type Country = {\n code: string;\n name: string;\n dialCode: number;\n};\n\nexport type ReferenceData = {\n recordTitles: AdHocRecordTitles;\n picklistTitles: AdHocPicklistValueDisplay;\n};\n\nexport type AdHocRecordTitles = {\n [businessEntityId: string]: {\n [recordId: string]: string | MultiLangValue;\n };\n};\n\nexport type DataRecord<T, M = undefined> = {\n record: T;\n meta?: M; // typically ReferenceData\n actions: string[];\n};\n\nexport enum PricePercentageMode {\n CURRENCY = 'currency',\n PERCENTAGE = 'percentage',\n}\n"]}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PurchaseActions = exports.VehicleActions = exports.VehiclePurchaseDeliveryType = exports.VehiclePurchaseLogisticsStatus = exports.VehicleSaleLogisticsStatus = exports.VehiclePurchaseDealStatus = exports.VehicleSaleDealStatus = void 0;
|
|
4
|
-
var VehicleSaleDealStatus;
|
|
5
|
-
(function (VehicleSaleDealStatus) {
|
|
6
|
-
VehicleSaleDealStatus["SaleAgreed"] = "SALE_AGREED";
|
|
7
|
-
VehicleSaleDealStatus["FirstPaymentReceived"] = "FIRST_PAYMENT_RECEIVED";
|
|
8
|
-
VehicleSaleDealStatus["FullPaymentReceived"] = "FULL_PAYMENT_RECEIVED";
|
|
9
|
-
VehicleSaleDealStatus["NotSold"] = "NOT_SOLD";
|
|
10
|
-
})(VehicleSaleDealStatus = exports.VehicleSaleDealStatus || (exports.VehicleSaleDealStatus = {}));
|
|
11
|
-
var VehiclePurchaseDealStatus;
|
|
12
|
-
(function (VehiclePurchaseDealStatus) {
|
|
13
|
-
VehiclePurchaseDealStatus["PurchaseEvaluation"] = "PURCHASE_EVALUATION";
|
|
14
|
-
VehiclePurchaseDealStatus["PurchaseAgreed"] = "PURCHASE_AGREED";
|
|
15
|
-
VehiclePurchaseDealStatus["FirstPaymentAllowed"] = "FIRST_PAYMENT_ALLOWED";
|
|
16
|
-
VehiclePurchaseDealStatus["FirstPaymentSent"] = "FIRST_PAYMENT_SENT";
|
|
17
|
-
VehiclePurchaseDealStatus["FullPaymentAllowed"] = "FULL_PAYMENT_ALLOWED";
|
|
18
|
-
VehiclePurchaseDealStatus["FullPaymentSent"] = "FULL_PAYMENT_SENT";
|
|
19
|
-
})(VehiclePurchaseDealStatus = exports.VehiclePurchaseDealStatus || (exports.VehiclePurchaseDealStatus = {}));
|
|
20
|
-
var VehicleSaleLogisticsStatus;
|
|
21
|
-
(function (VehicleSaleLogisticsStatus) {
|
|
22
|
-
VehicleSaleLogisticsStatus["AtOrigin"] = "AT_ORIGIN";
|
|
23
|
-
VehicleSaleLogisticsStatus["Delivered"] = "DELIVERED";
|
|
24
|
-
})(VehicleSaleLogisticsStatus = exports.VehicleSaleLogisticsStatus || (exports.VehicleSaleLogisticsStatus = {}));
|
|
25
|
-
var VehiclePurchaseLogisticsStatus;
|
|
26
|
-
(function (VehiclePurchaseLogisticsStatus) {
|
|
27
|
-
VehiclePurchaseLogisticsStatus["AtOrigin"] = "AT_ORIGIN";
|
|
28
|
-
VehiclePurchaseLogisticsStatus["Arrived"] = "ARRIVED";
|
|
29
|
-
VehiclePurchaseLogisticsStatus["CheckedIn"] = "CHECKED_IN";
|
|
30
|
-
})(VehiclePurchaseLogisticsStatus = exports.VehiclePurchaseLogisticsStatus || (exports.VehiclePurchaseLogisticsStatus = {}));
|
|
31
|
-
var VehiclePurchaseDeliveryType;
|
|
32
|
-
(function (VehiclePurchaseDeliveryType) {
|
|
33
|
-
VehiclePurchaseDeliveryType["PickUp"] = "PICK_UP";
|
|
34
|
-
VehiclePurchaseDeliveryType["DropOff"] = "DROP_OFF";
|
|
35
|
-
})(VehiclePurchaseDeliveryType = exports.VehiclePurchaseDeliveryType || (exports.VehiclePurchaseDeliveryType = {}));
|
|
36
|
-
var VehicleActions;
|
|
37
|
-
(function (VehicleActions) {
|
|
38
|
-
VehicleActions["EditAdminDocs"] = "edit_admin_docs";
|
|
39
|
-
VehicleActions["EditEngineeringDocs"] = "edit_engineering_docs";
|
|
40
|
-
VehicleActions["EditMarketing"] = "edit_marketing";
|
|
41
|
-
VehicleActions["EditMedia"] = "edit_media";
|
|
42
|
-
VehicleActions["EditPictures"] = "edit_pictures";
|
|
43
|
-
VehicleActions["EditPrices"] = "edit_prices";
|
|
44
|
-
VehicleActions["EditPurchaseDeal"] = "edit_purchase_deal";
|
|
45
|
-
VehicleActions["EditPurchaseLogistics"] = "edit_purchase_logistics";
|
|
46
|
-
VehicleActions["EditSpecs"] = "edit_specs";
|
|
47
|
-
VehicleActions["EditVideos"] = "edit_videos";
|
|
48
|
-
VehicleActions["ViewLeads"] = "view_leads";
|
|
49
|
-
VehicleActions["ViewSimilarOnline"] = "view_similar_online";
|
|
50
|
-
VehicleActions["ViewPurchase"] = "view_purchase";
|
|
51
|
-
VehicleActions["ViewPriceHistory"] = "view_price_history";
|
|
52
|
-
})(VehicleActions = exports.VehicleActions || (exports.VehicleActions = {}));
|
|
53
|
-
var PurchaseActions;
|
|
54
|
-
(function (PurchaseActions) {
|
|
55
|
-
PurchaseActions["ViewDeal"] = "view_deal";
|
|
56
|
-
PurchaseActions["ViewSupplierOrganization"] = "view_supplier_organization";
|
|
57
|
-
PurchaseActions["ViewContact"] = "view_contact";
|
|
58
|
-
PurchaseActions["ViewLegalAddress"] = "view_legal_address";
|
|
59
|
-
PurchaseActions["ViewPickupAddress"] = "view_pickup_address";
|
|
60
|
-
PurchaseActions["ViewEstimatedCosts"] = "view_estimated_costs";
|
|
61
|
-
PurchaseActions["ViewFinanceDocuments"] = "view_finance_documents";
|
|
62
|
-
})(PurchaseActions = exports.PurchaseActions || (exports.PurchaseActions = {}));
|
|
63
|
-
//# sourceMappingURL=vehicles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vehicles.js","sourceRoot":"/","sources":["types/vehicles.ts"],"names":[],"mappings":";;;AAseA,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAC/B,mDAA0B,CAAA;IAC1B,wEAA+C,CAAA;IAC/C,sEAA6C,CAAA;IAC7C,6CAAoB,CAAA;AACtB,CAAC,EALW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAKhC;AAED,IAAY,yBAOX;AAPD,WAAY,yBAAyB;IACnC,uEAA0C,CAAA;IAC1C,+DAAkC,CAAA;IAClC,0EAA6C,CAAA;IAC7C,oEAAuC,CAAA;IACvC,wEAA2C,CAAA;IAC3C,kEAAqC,CAAA;AACvC,CAAC,EAPW,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QAOpC;AAED,IAAY,0BAGX;AAHD,WAAY,0BAA0B;IACpC,oDAAsB,CAAA;IACtB,qDAAuB,CAAA;AACzB,CAAC,EAHW,0BAA0B,GAA1B,kCAA0B,KAA1B,kCAA0B,QAGrC;AAED,IAAY,8BAIX;AAJD,WAAY,8BAA8B;IACxC,wDAAsB,CAAA;IACtB,qDAAmB,CAAA;IACnB,0DAAwB,CAAA;AAC1B,CAAC,EAJW,8BAA8B,GAA9B,sCAA8B,KAA9B,sCAA8B,QAIzC;AAED,IAAY,2BAGX;AAHD,WAAY,2BAA2B;IACrC,iDAAkB,CAAA;IAClB,mDAAoB,CAAA;AACtB,CAAC,EAHW,2BAA2B,GAA3B,mCAA2B,KAA3B,mCAA2B,QAGtC;AAyGD,IAAY,cAeX;AAfD,WAAY,cAAc;IACxB,mDAAiC,CAAA;IACjC,+DAA6C,CAAA;IAC7C,kDAAgC,CAAA;IAChC,0CAAwB,CAAA;IACxB,gDAA8B,CAAA;IAC9B,4CAA0B,CAAA;IAC1B,yDAAuC,CAAA;IACvC,mEAAiD,CAAA;IACjD,0CAAwB,CAAA;IACxB,4CAA0B,CAAA;IAC1B,0CAAwB,CAAA;IACxB,2DAAyC,CAAA;IACzC,gDAA8B,CAAA;IAC9B,yDAAuC,CAAA;AACzC,CAAC,EAfW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAezB;AAED,IAAY,eAQX;AARD,WAAY,eAAe;IACzB,yCAAsB,CAAA;IACtB,0EAAuD,CAAA;IACvD,+CAA4B,CAAA;IAC5B,0DAAuC,CAAA;IACvC,4DAAyC,CAAA;IACzC,8DAA2C,CAAA;IAC3C,kEAA+C,CAAA;AACjD,CAAC,EARW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAQ1B","sourcesContent":["import { EmailDestination } from '@bisondesk/commons-sdk/messages';\nimport {\n AttachmentValue,\n Document,\n LocationValue,\n MultiLangValue,\n SearchPermissions,\n} from '@bisondesk/commons-sdk/types';\nimport { OpportunityReservation } from './reservations';\n\ntype BaseVehicleEvent = {\n id: string;\n actionAt: string;\n userId: string;\n tenantId: string;\n};\n\ntype VehicleSuperstructure = {\n carCapacity?: number;\n compartmentCount?: number;\n counter?: boolean;\n crane?: {\n make?: string;\n model?: string;\n position?: 'Behind the cabin' | 'Rear';\n present?: boolean;\n year?: number;\n };\n dimensions?: {\n height?: number;\n length?: number;\n width?: number;\n extended?: string; // L1, L2, ...\n heightened?: string; // H1, H2, ...\n };\n baseVehicle?: SuperstructureBaseVehicle;\n extendable?: boolean;\n highPressurePump?: boolean;\n loadingPlatformHeight?: number;\n pump?: boolean;\n slidingRoof?: boolean;\n tailgate?: {\n capacity?: number;\n make?: string;\n model?: string;\n present?: boolean;\n type?: 'slider_lift' | 'cantilever' | 'column_lift';\n };\n tank?: {\n capacity: number;\n };\n temperatureControl?: {\n engineType?: 'diesel' | 'electric' | 'diesel+electric' | 'engine';\n make?: string;\n runningHours?: {\n diesel?: number;\n electric?: number;\n };\n };\n tipper?: {\n tipsBack?: boolean;\n tipsLeft?: boolean;\n tipsRight?: boolean;\n };\n};\nexport type NewVehicleRequest = {\n branch: string;\n count: number;\n specs: VehicleExternalInfo;\n description: {\n remarks?: string;\n technicalRemarks?: string;\n };\n logistics: {\n parking: string;\n deliveryType: VehiclePurchaseDeliveryType;\n pickupAddress?: LocationValue;\n checkedInAt?: string;\n checkedInBy?: string;\n arrivedAt?: string;\n arrivedBy?: string;\n };\n prices: {\n minimum?: string;\n premium?: string;\n internet?: string;\n };\n media: {\n internalPictures: AttachmentValue[];\n pictures: AttachmentValue[];\n videos: AttachmentValue[];\n docs: Document[];\n engineeringDocs: Document[];\n };\n vinList?: string;\n deal: {\n stockNumber?: string;\n contactId: string;\n orgId: string;\n purchasedBy: string;\n dealStatus:\n | VehiclePurchaseDealStatus.PurchaseEvaluation\n | VehiclePurchaseDealStatus.PurchaseAgreed;\n costs: {\n purchase: string;\n purchaseVatPercentage: string;\n commission?: string;\n externalTransport?: string;\n internalTransport?: string;\n externalGarage?: string;\n internalGarage?: string;\n other?: string;\n };\n logistics: {\n availableDate: string;\n vehicleRole: VehicleInternalInfo['role'];\n };\n };\n};\n\nexport type VehicleCreateEvent = BaseVehicleEvent & {\n action: 'create';\n vehicle: Vehicle;\n previousVehicle?: undefined;\n};\n\nexport type VehicleUpdateEvent = BaseVehicleEvent & {\n action: 'update';\n vehicle: Vehicle;\n previousVehicle: Vehicle;\n};\n\nexport type VehicleDeleteEvent = BaseVehicleEvent & {\n action: 'delete';\n vehicle?: undefined;\n previousVehicle: Vehicle;\n};\n\nexport type VehicleEvent = VehicleCreateEvent | VehicleUpdateEvent | VehicleDeleteEvent;\n\nexport type VehicleMarketingEvent = {\n actionAt: string;\n data: VehicleMarketing;\n tenantId: string;\n userId: string;\n vehicleId: string;\n};\n\ntype BaseVehiclePurchaseEvent = {\n actionAt: string;\n userId: string;\n tenantId: string;\n branchId: string;\n vehicleId: string;\n};\n\nexport type VehiclePurchaseCreateEvent = BaseVehiclePurchaseEvent & {\n action: 'create';\n data: VehiclePurchase;\n previousData?: undefined;\n};\n\nexport type VehiclePurchaseUpdateEvent = BaseVehiclePurchaseEvent & {\n action: 'update';\n data: VehiclePurchase;\n previousData: VehiclePurchase;\n};\n\nexport type VehiclePurchaseEvent = VehiclePurchaseCreateEvent | VehiclePurchaseUpdateEvent;\n\nexport type UpdateVehiclesPricesEvent = {\n id: string;\n actionAt: string;\n userId: string;\n tenantId: string;\n priceList: AttachmentValue;\n};\n\nexport type PublicVehicle = Pick<Vehicle, 'external' | 'id'>;\n\nexport type PublicSearchVehicle = {\n vehicle: PublicVehicle;\n};\n\nexport type SearchVehicle = {\n custom: {\n features: string[];\n isReserved: boolean;\n };\n purchase?: {\n supplierStockNumber?: string;\n };\n reservation?: Pick<OpportunityReservation, 'expiresAt' | 'opportunityId' | 'createdBy'>;\n vehicle: Vehicle;\n};\n\nexport type InputSearchVehicle = SearchVehicle & {\n permissions: SearchPermissions;\n};\n\nexport type VehiclePricingHistory = {\n pricing: VehiclePricingHistoryInput;\n createdAt: string;\n createdBy: string;\n};\n\nexport type VehiclePricingHistoryInput = VehiclePricing & { internet?: string };\n\nexport type VehiclePricing = {\n premium?: string;\n minimum?: string;\n currency?: string;\n};\n\nexport type RelatedVehicle = {\n vehicleId: string;\n description: string;\n stockNumber: string;\n};\n\nexport type VehicleInternalInfo = {\n createdAt: string;\n description: {\n title: string;\n remarks?: string;\n technicalRemarks?: string;\n };\n parkingName?: string;\n identification: {\n administrativeNumber?: string;\n stockNumber: string;\n branch: string;\n\n /**\n * This ID is used to link different vehicle objects that represent the same real world asset.\n * Ideally the chassis number could be used, but in some cases it is not available yet.\n */\n metaId: string;\n };\n documents: Document[];\n pictures: AttachmentValue[];\n engineeringDocs: Document[];\n pricing: VehiclePricing;\n role: 'SALE' | 'OWN_USE' | 'RENTAL' | 'BUILD' | 'UNKNOWN';\n status: VehicleStatus;\n updatedAt: string;\n /* use this property to store additional terms that you want the vehicle to be found with when doing a full text search */\n keywords?: string[];\n relatedVehicles: RelatedVehicle[];\n};\n\nexport type VehicleOriginalInfo = {\n tenantId: string;\n identification: {\n id: string;\n stockNumber: string;\n hyperdmsTenantId?: string;\n metaId?: string;\n };\n salesConditions: {\n leasing?: boolean;\n expected?: boolean;\n reserved?: boolean;\n price?: string;\n currency?: string;\n };\n};\n\nexport type VehicleAxlesInfo = {\n details: VehicleAxle[];\n configuration?: string;\n count?: number;\n poweredAxlesCount?: number;\n wheelbase?: number;\n suspension?: 'Air' | 'Air/Steel' | 'Steel';\n};\n\nexport type SuperstructureBaseVehicle = {\n category: string;\n make: string;\n model?: string;\n type?: string;\n axlesConfiguration?: string;\n emissionsClass?: string;\n transmissionType?: 'Automatic' | 'Manual' | 'Semi-Automatic';\n vin?: string;\n currentRegistration?: {\n country?: string;\n };\n suspension?: 'Air' | 'Air/Steel' | 'Steel';\n constructionYear?: number;\n firstRegistration?: string;\n odometerKm?: number;\n powerHp?: number;\n bodystyle?: string;\n accessories: VehicleExternalInfo['accessories'];\n superstructure?: Pick<VehicleSuperstructure, 'crane' | 'tailgate'>;\n};\n\n// mostly inspired by the Hexon data model\nexport type VehicleExternalInfo = {\n body?: {\n cabin?: {\n type: 'Day' | 'Sleep / Small' | 'Sleep / Medium' | 'Sleep / Large';\n model?: string;\n };\n colour?: string;\n dimensions?: {\n height?: number;\n length?: number;\n width?: number;\n };\n doorCount?: number;\n interior?: {\n bedCount?: number;\n seatCount?: number;\n };\n };\n mainPicture?: AttachmentValue;\n pictures?: AttachmentValue[];\n videos?: AttachmentValue[];\n condition?: {\n damaged?: boolean;\n odometer?: {\n km?: number;\n };\n used?: boolean;\n };\n general: {\n bodystyle?: string;\n category: string;\n make?: string;\n model?: string;\n modelName?: string;\n type?: string;\n typeName?: string;\n };\n history?: {\n advertisingYear?: number;\n constructionYear?: number;\n currentRegistration?: {\n country?: string;\n technicalInspectionEndDate?: string;\n };\n firstRegistration?: string;\n cocPvg?: string;\n };\n identification: {\n licensePlate?: string;\n stockNumber?: string;\n vin?: string;\n buildStockNumber?: string;\n engineNumber?: string;\n };\n powertrain?: {\n axles?: VehicleAxlesInfo;\n emissions?: {\n class?: string;\n };\n engine?: {\n cylinderCount?: number;\n energy?: string;\n power?: {\n hp?: number;\n };\n displacement?: number;\n };\n transmission?: {\n gearCount?: number;\n make?: string;\n model?: string;\n type?: 'Automatic' | 'Manual' | 'Semi-Automatic';\n };\n };\n salesConditions: {\n leasing?: boolean;\n expected?: boolean;\n price?: string | undefined;\n currency?: string | undefined;\n };\n superstructure?: VehicleSuperstructure;\n weights?: {\n gvw?: number;\n massEmpty?: number;\n };\n accessories: {\n abs?: boolean;\n adr?: boolean;\n airco?: boolean;\n alloyWheels?: boolean;\n aluminiumFuelTank?: boolean;\n cdPlayer?: boolean;\n centralLocking?: boolean;\n centralLubrication?: boolean;\n cruiseControl?: boolean;\n electricDoorMirrors?: boolean;\n electricWindows?: boolean;\n engineBrake?: boolean;\n forklift?: boolean;\n navigationSystem?: boolean;\n hydraulicTipperKit?: boolean;\n lowDeck?: boolean;\n lowNoise?: boolean;\n parkingHeater?: boolean;\n particleFilter?: boolean;\n powerTakeOff?: boolean;\n refrigerator?: boolean;\n retarderIntarder?: boolean;\n reversingCamera?: boolean;\n roofSpoiler?: boolean;\n sideSkirts?: boolean;\n spareKey?: boolean;\n spareWheel?: boolean;\n speedLimiter?: boolean;\n spoilers?: boolean;\n spotlights?: boolean;\n stabilityControl?: boolean;\n standardAirco?: boolean;\n television?: boolean;\n toolbox?: boolean;\n trailerCoupling?: boolean;\n twinFuelTank?: boolean;\n visor?: boolean;\n xenonLights?: boolean;\n };\n publicLink?: string;\n};\n\ntype BaseVehicle<I = VehicleInternalInfo, E = VehicleExternalInfo> = {\n internal: I;\n external: E;\n original?: VehicleOriginalInfo;\n};\n\nexport type NewVehicle<I = VehicleInternalInfo, E = VehicleExternalInfo> = BaseVehicle<I, E> & {\n id?: undefined;\n};\n\nexport type Vehicle<I = VehicleInternalInfo, E = VehicleExternalInfo> = BaseVehicle<I, E> & {\n id: string;\n};\n\nexport type VehiclesByChassisNumberRequest = {\n tenantIds: string[];\n chassisNumber: string;\n};\n\nexport type VehiclesByMetaIdRequest = {\n tenantIds: string[];\n metaId: string;\n};\n\nexport type VehicleAxle = {\n make?: string;\n alloyWheels?: boolean;\n brakes?: 'Disc' | 'Drum';\n differentialLock?: boolean;\n liftAxle?: boolean;\n maxLoad?: number;\n nr: number;\n position?: string;\n powered?: boolean;\n reduction?: string;\n steering?: boolean;\n suspension?: 'Steel' | 'Air' | 'Hydraulic';\n twinWheels?: boolean;\n tyreConditionPercLeftInside?: number;\n tyreConditionPercLeftOutside?: number;\n tyreConditionPercRightInside?: number;\n tyreConditionPercRightOutside?: number;\n tyreSize?: string;\n};\n\nexport type VehicleMarketing = {\n titles: MultiLangValue;\n remarks?: MultiLangValue;\n marketingPlatforms: string[];\n videos: AttachmentValue[];\n overrides?: {\n marketingPlatforms?: boolean;\n remarks?: boolean;\n titles?: boolean;\n videos?: boolean;\n };\n};\n\nexport enum VehicleSaleDealStatus {\n SaleAgreed = 'SALE_AGREED',\n FirstPaymentReceived = 'FIRST_PAYMENT_RECEIVED',\n FullPaymentReceived = 'FULL_PAYMENT_RECEIVED',\n NotSold = 'NOT_SOLD',\n}\n\nexport enum VehiclePurchaseDealStatus {\n PurchaseEvaluation = 'PURCHASE_EVALUATION', // used for vehicle consignation\n PurchaseAgreed = 'PURCHASE_AGREED',\n FirstPaymentAllowed = 'FIRST_PAYMENT_ALLOWED',\n FirstPaymentSent = 'FIRST_PAYMENT_SENT',\n FullPaymentAllowed = 'FULL_PAYMENT_ALLOWED',\n FullPaymentSent = 'FULL_PAYMENT_SENT',\n}\n\nexport enum VehicleSaleLogisticsStatus {\n AtOrigin = 'AT_ORIGIN',\n Delivered = 'DELIVERED',\n}\n\nexport enum VehiclePurchaseLogisticsStatus {\n AtOrigin = 'AT_ORIGIN',\n Arrived = 'ARRIVED',\n CheckedIn = 'CHECKED_IN',\n}\n\nexport enum VehiclePurchaseDeliveryType {\n PickUp = 'PICK_UP',\n DropOff = 'DROP_OFF',\n}\n\nexport type VehicleStatus = {\n deleted?: boolean;\n sale: {\n id?: string;\n dealStatus: VehicleSaleDealStatus;\n logisticsStatus?: VehicleSaleLogisticsStatus;\n };\n purchase: {\n purchasedBy?: string;\n dealStatus: VehiclePurchaseDealStatus;\n logisticsStatus: VehiclePurchaseLogisticsStatus;\n };\n};\n\nexport type VehiclePriceList = {\n uploadedAt: string;\n uploadedBy: string;\n priceList: AttachmentValue;\n id: string;\n};\n\nexport type UpdateVehiclesPricesRequest = {\n priceList: AttachmentValue;\n};\n\nexport type VehiclePriceListLine = {\n reference: string;\n internet?: string;\n premium?: string;\n minimum?: string;\n};\n\nexport type VehiclePriceUpdateError = {\n data: VehiclePriceListLine;\n line: number;\n error: {\n fieldId: keyof VehiclePriceListLine;\n msg: string;\n };\n};\n\nexport type VehiclePriceUpdateResponse =\n | {\n success: true;\n }\n | {\n success: false;\n errors: VehiclePriceUpdateError[];\n };\n\nexport type VehiclePurchase = {\n organizationId: string;\n contactId: string;\n supplierStockNumber?: string;\n purchasedBy: string;\n\n log: {\n evaluationStartedAt?: string;\n evaluationStartedBy?: string;\n\n purchaseAgreedAt?: string;\n purchaseAgreedBy?: string;\n\n firstPaymentAllowedAt?: string;\n firstPaymentAllowedBy?: string;\n firstPaymentSentAt?: string;\n firstPaymentSentBy?: string;\n\n fullPaymentAllowedAt?: string;\n fullPaymentAllowedBy?: string;\n fullPaymentSentAt?: string;\n fullPaymentSentBy?: string;\n\n arrivedAt?: string;\n arrivedBy?: string;\n checkedInAt?: string;\n checkedInBy?: string;\n };\n\n deal: {\n status: VehiclePurchaseDealStatus;\n\n askingPrice?: string;\n purchaseVatRate?: string;\n purchase?: string; // exclusive VAT\n\n commission?: string;\n externalTransport?: string;\n internalTransport?: string;\n externalGarage?: string;\n internalGarage?: string;\n other?: string;\n };\n\n logistics: {\n parkingName?: string;\n status: VehiclePurchaseLogisticsStatus;\n deliveryType?: VehiclePurchaseDeliveryType;\n pickupAddress?: LocationValue;\n availableWeek?: string; // ISOWEEK, e.g. 2016-W02\n };\n};\n\nexport enum VehicleActions {\n EditAdminDocs = 'edit_admin_docs',\n EditEngineeringDocs = 'edit_engineering_docs',\n EditMarketing = 'edit_marketing',\n EditMedia = 'edit_media',\n EditPictures = 'edit_pictures',\n EditPrices = 'edit_prices',\n EditPurchaseDeal = 'edit_purchase_deal',\n EditPurchaseLogistics = 'edit_purchase_logistics',\n EditSpecs = 'edit_specs',\n EditVideos = 'edit_videos',\n ViewLeads = 'view_leads',\n ViewSimilarOnline = 'view_similar_online',\n ViewPurchase = 'view_purchase',\n ViewPriceHistory = 'view_price_history',\n}\n\nexport enum PurchaseActions {\n ViewDeal = 'view_deal',\n ViewSupplierOrganization = 'view_supplier_organization',\n ViewContact = 'view_contact',\n ViewLegalAddress = 'view_legal_address',\n ViewPickupAddress = 'view_pickup_address',\n ViewEstimatedCosts = 'view_estimated_costs',\n ViewFinanceDocuments = 'view_finance_documents',\n}\n\nexport type VehicleShareEmailRequest = {\n country: string; // Lowercase ISO 3166-1 alpha-2 code, e.g. 'be'\n to: EmailDestination[];\n message: string;\n subject: string;\n pictures: AttachmentValue[];\n attachments?: AttachmentValue[];\n};\n"]}
|
package/lib/cjs/types/website.js
DELETED
package/lib/cjs/utils/forms.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.computePricePercentage = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const decimal_js_1 = tslib_1.__importDefault(require("decimal.js"));
|
|
6
|
-
const utils_1 = require("../types/utils");
|
|
7
|
-
const computePricePercentage = (totalAmount, percentage, partialAmount = '0', mode = utils_1.PricePercentageMode.PERCENTAGE) => {
|
|
8
|
-
const output = {
|
|
9
|
-
percentageAmount: percentage,
|
|
10
|
-
currencyAmount: partialAmount,
|
|
11
|
-
};
|
|
12
|
-
if (mode === utils_1.PricePercentageMode.PERCENTAGE) {
|
|
13
|
-
output.currencyAmount = new decimal_js_1.default(totalAmount)
|
|
14
|
-
.mul(percentage)
|
|
15
|
-
.div(100)
|
|
16
|
-
.toDecimalPlaces(2)
|
|
17
|
-
.clamp(0, totalAmount)
|
|
18
|
-
.toString();
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
output.percentageAmount = new decimal_js_1.default(partialAmount)
|
|
22
|
-
.mul(100)
|
|
23
|
-
.div(totalAmount)
|
|
24
|
-
.toDecimalPlaces(4)
|
|
25
|
-
.clamp(0, 100)
|
|
26
|
-
.toString();
|
|
27
|
-
}
|
|
28
|
-
return output;
|
|
29
|
-
};
|
|
30
|
-
exports.computePricePercentage = computePricePercentage;
|
|
31
|
-
//# sourceMappingURL=forms.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"forms.js","sourceRoot":"/","sources":["utils/forms.ts"],"names":[],"mappings":";;;;AAAA,oEAAiC;AACjC,0CAAqD;AAE9C,MAAM,sBAAsB,GAAG,CACpC,WAAmB,EACnB,UAAkB,EAClB,gBAAwB,GAAG,EAC3B,OAA4B,2BAAmB,CAAC,UAAU,EACJ,EAAE;IACxD,MAAM,MAAM,GAAyD;QACnE,gBAAgB,EAAE,UAAU;QAC5B,cAAc,EAAE,aAAa;KAC9B,CAAC;IAEF,IAAI,IAAI,KAAK,2BAAmB,CAAC,UAAU,EAAE;QAC3C,MAAM,CAAC,cAAc,GAAG,IAAI,oBAAO,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;KACf;SAAM;QACL,MAAM,CAAC,gBAAgB,GAAG,IAAI,oBAAO,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;KACf;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AA5BW,QAAA,sBAAsB,0BA4BjC","sourcesContent":["import Decimal from 'decimal.js';\nimport { PricePercentageMode } from '../types/utils';\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"]}
|
package/lib/cjs/utils/leasing.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sortContractClients = void 0;
|
|
4
|
-
const dayjs_utils_1 = require("@bisondesk/commons-sdk/dayjs-utils");
|
|
5
|
-
const lodash_1 = require("lodash");
|
|
6
|
-
const sortContractClients = (clients) => (0, lodash_1.sortBy)((0, lodash_1.map)((0, lodash_1.uniqBy)(clients, (c) => c.takeoverId), (c) => ({ ...c, since: (0, dayjs_utils_1.utc)(c.since).format('YYYY-MM-DD') })), (cli) => cli.since, (cli) => (cli.takeoverId ? parseInt(cli.takeoverId.replace(/[^0-9]/g, '')) : 0));
|
|
7
|
-
exports.sortContractClients = sortContractClients;
|
|
8
|
-
//# sourceMappingURL=leasing.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"leasing.js","sourceRoot":"/","sources":["utils/leasing.ts"],"names":[],"mappings":";;;AAAA,oEAAyD;AACzD,mCAA6C;AAItC,MAAM,mBAAmB,GAAG,CAAC,OAAgC,EAA2B,EAAE,CAC/F,IAAA,eAAM,EACJ,IAAA,YAAG,EACD,IAAA,eAAM,EAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,EACpC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,IAAA,iBAAG,EAAC,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAC5D,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;AARS,QAAA,mBAAmB,uBAQ5B","sourcesContent":["import { utc } from '@bisondesk/commons-sdk/dayjs-utils';\nimport { map, sortBy, uniqBy } from 'lodash';\nimport { LeasingContractClient } from '../types/leasing';\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: utc(c.since).format('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,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isOpportunityReserved = exports.getOpportunityReservedStatus = exports.isOpportunityLost = exports.isBeforeReferenceOpportunityStatus = exports.isSameOrBeforeReferenceOpportunityStatus = exports.isAfterReferenceOpportunityStatus = exports.isSameOrAfterReferenceOpportunityStatus = exports.getNextStatus = exports.getPreviousStatus = void 0;
|
|
4
|
-
const opportunities_1 = require("../types/opportunities");
|
|
5
|
-
const compareOpportunityStatus = (input) => {
|
|
6
|
-
const { currentStatus, referenceStatus } = input;
|
|
7
|
-
const currentStatusIdx = opportunities_1.OpportunityStatusOrder.indexOf(currentStatus);
|
|
8
|
-
const referenceStatusIdx = opportunities_1.OpportunityStatusOrder.indexOf(referenceStatus);
|
|
9
|
-
return {
|
|
10
|
-
currentStatusIdx,
|
|
11
|
-
referenceStatusIdx,
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
const getPreviousStatus = (currentStatus) => {
|
|
15
|
-
const currentIndex = opportunities_1.OpportunityStatusOrder.indexOf(currentStatus);
|
|
16
|
-
if (currentIndex === 0) {
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
return opportunities_1.OpportunityStatusOrder[currentIndex - 1];
|
|
20
|
-
};
|
|
21
|
-
exports.getPreviousStatus = getPreviousStatus;
|
|
22
|
-
const getNextStatus = (status) => {
|
|
23
|
-
const statusIndex = opportunities_1.OpportunityStatusOrder.indexOf(status);
|
|
24
|
-
if (statusIndex >= opportunities_1.OpportunityStatusOrder.length - 1) {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
return opportunities_1.OpportunityStatusOrder[statusIndex + 1];
|
|
28
|
-
};
|
|
29
|
-
exports.getNextStatus = getNextStatus;
|
|
30
|
-
const isSameOrAfterReferenceOpportunityStatus = (input) => {
|
|
31
|
-
const { currentStatusIdx, referenceStatusIdx } = compareOpportunityStatus(input);
|
|
32
|
-
return currentStatusIdx >= referenceStatusIdx;
|
|
33
|
-
};
|
|
34
|
-
exports.isSameOrAfterReferenceOpportunityStatus = isSameOrAfterReferenceOpportunityStatus;
|
|
35
|
-
const isAfterReferenceOpportunityStatus = (input) => {
|
|
36
|
-
const { currentStatusIdx, referenceStatusIdx } = compareOpportunityStatus(input);
|
|
37
|
-
return currentStatusIdx > referenceStatusIdx;
|
|
38
|
-
};
|
|
39
|
-
exports.isAfterReferenceOpportunityStatus = isAfterReferenceOpportunityStatus;
|
|
40
|
-
const isSameOrBeforeReferenceOpportunityStatus = (input) => {
|
|
41
|
-
const { currentStatusIdx, referenceStatusIdx } = compareOpportunityStatus(input);
|
|
42
|
-
return currentStatusIdx <= referenceStatusIdx;
|
|
43
|
-
};
|
|
44
|
-
exports.isSameOrBeforeReferenceOpportunityStatus = isSameOrBeforeReferenceOpportunityStatus;
|
|
45
|
-
const isBeforeReferenceOpportunityStatus = (input) => {
|
|
46
|
-
const { currentStatusIdx, referenceStatusIdx } = compareOpportunityStatus(input);
|
|
47
|
-
return currentStatusIdx < referenceStatusIdx;
|
|
48
|
-
};
|
|
49
|
-
exports.isBeforeReferenceOpportunityStatus = isBeforeReferenceOpportunityStatus;
|
|
50
|
-
const isOpportunityLost = (input) => input.lostAt != null;
|
|
51
|
-
exports.isOpportunityLost = isOpportunityLost;
|
|
52
|
-
const getOpportunityReservedStatus = () => [
|
|
53
|
-
opportunities_1.OpportunityStatus.REVIEW,
|
|
54
|
-
opportunities_1.OpportunityStatus.PREPARATION,
|
|
55
|
-
opportunities_1.OpportunityStatus.DELIVERY,
|
|
56
|
-
];
|
|
57
|
-
exports.getOpportunityReservedStatus = getOpportunityReservedStatus;
|
|
58
|
-
const isOpportunityReserved = (input) => (0, exports.getOpportunityReservedStatus)().includes(input.status);
|
|
59
|
-
exports.isOpportunityReserved = isOpportunityReserved;
|
|
60
|
-
//# sourceMappingURL=opportunities.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"opportunities.js","sourceRoot":"/","sources":["utils/opportunities.ts"],"names":[],"mappings":";;;AAAA,0DAAgG;AAOhG,MAAM,wBAAwB,GAAG,CAAC,KAAmB,EAAE,EAAE;IACvD,MAAM,EAAE,aAAa,EAAE,eAAe,EAAE,GAAG,KAAK,CAAC;IAEjD,MAAM,gBAAgB,GAAG,sCAAsB,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IACvE,MAAM,kBAAkB,GAAG,sCAAsB,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;IAE3E,OAAO;QACL,gBAAgB;QAChB,kBAAkB;KACnB,CAAC;AACJ,CAAC,CAAC;AAEK,MAAM,iBAAiB,GAAG,CAC/B,aAAgC,EACD,EAAE;IACjC,MAAM,YAAY,GAAG,sCAAsB,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IACnE,IAAI,YAAY,KAAK,CAAC,EAAE;QACtB,OAAO;KACR;IACD,OAAO,sCAAsB,CAAC,YAAY,GAAG,CAAC,CAAC,CAAC;AAClD,CAAC,CAAC;AARW,QAAA,iBAAiB,qBAQ5B;AAEK,MAAM,aAAa,GAAG,CAAC,MAAyB,EAAiC,EAAE;IACxF,MAAM,WAAW,GAAG,sCAAsB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC3D,IAAI,WAAW,IAAI,sCAAsB,CAAC,MAAM,GAAG,CAAC,EAAE;QACpD,OAAO;KACR;IACD,OAAO,sCAAsB,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC;AACjD,CAAC,CAAC;AANW,QAAA,aAAa,iBAMxB;AAEK,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;AAJW,QAAA,uCAAuC,2CAIlD;AAEK,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;AAJW,QAAA,iCAAiC,qCAI5C;AAEK,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;AAJW,QAAA,wCAAwC,4CAInD;AAEK,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;AAJW,QAAA,kCAAkC,sCAI7C;AAEK,MAAM,iBAAiB,GAAG,CAAC,KAAkB,EAAW,EAAE,CAAC,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC;AAA1E,QAAA,iBAAiB,qBAAyD;AAEhF,MAAM,4BAA4B,GAAG,GAAwB,EAAE,CAAC;IACrE,iCAAiB,CAAC,MAAM;IACxB,iCAAiB,CAAC,WAAW;IAC7B,iCAAiB,CAAC,QAAQ;CAC3B,CAAC;AAJW,QAAA,4BAA4B,gCAIvC;AAEK,MAAM,qBAAqB,GAAG,CAAC,KAAkB,EAAW,EAAE,CACnE,IAAA,oCAA4B,GAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AAD3C,QAAA,qBAAqB,yBACsB","sourcesContent":["import { Opportunity, OpportunityStatus, OpportunityStatusOrder } from '../types/opportunities';\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"]}
|
package/lib/cjs/utils/slug.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getVehicleSlug = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const slugify_1 = tslib_1.__importDefault(require("slugify"));
|
|
6
|
-
const getVehicleSlug = (vehicle) => {
|
|
7
|
-
return (0, slugify_1.default)([
|
|
8
|
-
vehicle.external.identification.stockNumber ?? vehicle.internal.identification.stockNumber,
|
|
9
|
-
vehicle.external.general.make,
|
|
10
|
-
vehicle.external.general.modelName,
|
|
11
|
-
vehicle.external.general.typeName,
|
|
12
|
-
`${vehicle.external.history?.advertisingYear}`,
|
|
13
|
-
vehicle.external.general.category,
|
|
14
|
-
vehicle.external.general.bodystyle,
|
|
15
|
-
vehicle.external.powertrain?.axles?.configuration,
|
|
16
|
-
]
|
|
17
|
-
.filter((f) => !!f)
|
|
18
|
-
.join(' '));
|
|
19
|
-
};
|
|
20
|
-
exports.getVehicleSlug = getVehicleSlug;
|
|
21
|
-
//# sourceMappingURL=slug.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"slug.js","sourceRoot":"/","sources":["utils/slug.ts"],"names":[],"mappings":";;;;AAAA,8DAA8B;AAGvB,MAAM,cAAc,GAAG,CAAC,OAAgB,EAAU,EAAE;IACzD,OAAO,IAAA,iBAAO,EACZ;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;AAfW,QAAA,cAAc,kBAezB","sourcesContent":["import slugify from 'slugify';\nimport { Vehicle } from '../types/vehicles';\n\nexport const getVehicleSlug = (vehicle: Vehicle): string => {\n return slugify(\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"]}
|
package/lib/cjs/utils/tenants.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getBranchStandardVatRate = exports.getDefaultBranch = exports.getBranch = void 0;
|
|
4
|
-
const errors_1 = require("@bisondesk/commons-sdk/errors");
|
|
5
|
-
const lodash_1 = require("lodash");
|
|
6
|
-
const getBranch = (tenant, branchId) => {
|
|
7
|
-
const branch = tenant.branches.find((branch) => branch.id === branchId);
|
|
8
|
-
if (branch == null) {
|
|
9
|
-
throw new errors_1.XError('tenants.branch-not-found', { tenantId: tenant.id, branchId });
|
|
10
|
-
}
|
|
11
|
-
return branch;
|
|
12
|
-
};
|
|
13
|
-
exports.getBranch = getBranch;
|
|
14
|
-
const getDefaultBranch = (tenant) => (0, lodash_1.first)(tenant.branches);
|
|
15
|
-
exports.getDefaultBranch = getDefaultBranch;
|
|
16
|
-
const getBranchStandardVatRate = (tenant, branchId) => {
|
|
17
|
-
const branch = (0, exports.getBranch)(tenant, branchId);
|
|
18
|
-
return branch.vatRates.standard;
|
|
19
|
-
};
|
|
20
|
-
exports.getBranchStandardVatRate = getBranchStandardVatRate;
|
|
21
|
-
//# sourceMappingURL=tenants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tenants.js","sourceRoot":"/","sources":["utils/tenants.ts"],"names":[],"mappings":";;;AAAA,0DAAuD;AACvD,mCAA+B;AAGxB,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;QAClB,MAAM,IAAI,eAAM,CAAC,0BAA0B,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;KACjF;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAPW,QAAA,SAAS,aAOpB;AAEK,MAAM,gBAAgB,GAAG,CAAC,MAAc,EAAU,EAAE,CAAC,IAAA,cAAK,EAAC,MAAM,CAAC,QAAQ,CAAE,CAAC;AAAvE,QAAA,gBAAgB,oBAAuD;AAE7E,MAAM,wBAAwB,GAAG,CAAC,MAAc,EAAE,QAAgB,EAAU,EAAE;IACnF,MAAM,MAAM,GAAW,IAAA,iBAAS,EAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IACnD,OAAO,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC;AAClC,CAAC,CAAC;AAHW,QAAA,wBAAwB,4BAGnC","sourcesContent":["import { XError } from '@bisondesk/commons-sdk/errors';\nimport { first } from 'lodash';\nimport { Branch, Tenant } from '../types/tenants';\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"]}
|