@fragus/sam-types 1.0.0

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.
Files changed (149) hide show
  1. package/README.md +75 -0
  2. package/package.json +24 -0
  3. package/types/SettlementPaymentType.d.ts +0 -0
  4. package/types/SettlementPaymentType.js +1 -0
  5. package/types/SettlementPaymentType.js.map +1 -0
  6. package/types/SettlementPaymentType.ts +0 -0
  7. package/types/accessKey/index.d.ts +12 -0
  8. package/types/address.d.ts +18 -0
  9. package/types/admin/auth/index.d.ts +2 -0
  10. package/types/admin/auth/login.d.ts +28 -0
  11. package/types/admin/auth/roles.d.ts +10 -0
  12. package/types/admin/chart/contractCharts.d.ts +70 -0
  13. package/types/admin/chart/dashboardCharts.d.ts +57 -0
  14. package/types/admin/chart/index.d.ts +12 -0
  15. package/types/admin/contactInformation/index.d.ts +9 -0
  16. package/types/admin/contract/balanceStatistics.d.ts +37 -0
  17. package/types/admin/contract/basicInfo.d.ts +21 -0
  18. package/types/admin/contract/contractDetails.d.ts +82 -0
  19. package/types/admin/contract/health.d.ts +1 -0
  20. package/types/admin/contract/index.d.ts +6 -0
  21. package/types/admin/contract/internalContractNotes.d.ts +23 -0
  22. package/types/admin/contract/settleContract.d.ts +3 -0
  23. package/types/admin/contract/templateLookup.d.ts +20 -0
  24. package/types/admin/contractCreation/carData.d.ts +20 -0
  25. package/types/admin/contractCreation/contractCreation.d.ts +314 -0
  26. package/types/admin/contractCreation/index.d.ts +3 -0
  27. package/types/admin/contractCreation/priceCalculation.d.ts +83 -0
  28. package/types/admin/contractProvider/index.d.ts +47 -0
  29. package/types/admin/customer/customer.d.ts +29 -0
  30. package/types/admin/customer/customerList.d.ts +9 -0
  31. package/types/admin/customer/index.d.ts +2 -0
  32. package/types/admin/index.d.ts +13 -0
  33. package/types/admin/payment/index.d.ts +1 -0
  34. package/types/admin/payment/payment.d.ts +13 -0
  35. package/types/admin/product/index.d.ts +1 -0
  36. package/types/admin/product/product.d.ts +40 -0
  37. package/types/admin/stripe/index.d.ts +1 -0
  38. package/types/admin/stripe/stripeTOS.d.ts +7 -0
  39. package/types/admin/user/index.d.ts +2 -0
  40. package/types/admin/user/responseErrors/index.d.ts +3 -0
  41. package/types/admin/user/responseErrors/passwordResponseErrors.d.ts +1 -0
  42. package/types/admin/user/user.d.ts +23 -0
  43. package/types/admin/user/userList.d.ts +19 -0
  44. package/types/admin/vehicle/index.d.ts +1 -0
  45. package/types/admin/vehicle/vehicle.d.ts +58 -0
  46. package/types/admin/vehicleBlacklist/index.d.ts +16 -0
  47. package/types/admin/workshop/index.d.ts +1 -0
  48. package/types/admin/workshop/workshop.d.ts +5 -0
  49. package/types/app.d.ts +5 -0
  50. package/types/brand.d.ts +4 -0
  51. package/types/chart.d.ts +38 -0
  52. package/types/contactPerson.d.ts +16 -0
  53. package/types/contract/contract.d.ts +75 -0
  54. package/types/contract/contractActivation.d.ts +5 -0
  55. package/types/contract/contractFilter.d.ts +58 -0
  56. package/types/contract/contractList.d.ts +53 -0
  57. package/types/contract/contractOffer.d.ts +34 -0
  58. package/types/contract/contractQuery.d.ts +68 -0
  59. package/types/contractAction.d.ts +40 -0
  60. package/types/contractOption.d.ts +50 -0
  61. package/types/contractProvider.d.ts +116 -0
  62. package/types/contractTemplate.d.ts +94 -0
  63. package/types/country.d.ts +32 -0
  64. package/types/currency.d.ts +1 -0
  65. package/types/customer.d.ts +10 -0
  66. package/types/durationOptions.d.ts +31 -0
  67. package/types/errorResponse.d.ts +19 -0
  68. package/types/fuelType.d.ts +9 -0
  69. package/types/includedContractOption.d.ts +18 -0
  70. package/types/index.d.ts +210 -0
  71. package/types/index.js +166 -0
  72. package/types/index.js.map +1 -0
  73. package/types/index.ts +229 -0
  74. package/types/invoice.d.ts +13 -0
  75. package/types/locale.d.ts +24 -0
  76. package/types/localizationData.d.ts +7 -0
  77. package/types/model.d.ts +4 -0
  78. package/types/outage.d.ts +9 -0
  79. package/types/payment.d.ts +53 -0
  80. package/types/paymentFailureReason.d.ts +6 -0
  81. package/types/priceCalculation.d.ts +27 -0
  82. package/types/priceSpecification.d.ts +20 -0
  83. package/types/product.d.ts +23 -0
  84. package/types/productPartial.d.ts +18 -0
  85. package/types/providerBranding.d.ts +48 -0
  86. package/types/queryParams.d.ts +51 -0
  87. package/types/releaseNotes/index.d.ts +33 -0
  88. package/types/reports/reports.d.ts +50 -0
  89. package/types/resetPassword.d.ts +3 -0
  90. package/types/responseErrors/HttpStatusCodes.d.ts +391 -0
  91. package/types/responseErrors/adjustmentRequestResponseErrors.d.ts +1 -0
  92. package/types/responseErrors/adminPaymentErrors.d.ts +6 -0
  93. package/types/responseErrors/calculatorResponseErrors.d.ts +35 -0
  94. package/types/responseErrors/contractResponseErrors.d.ts +23 -0
  95. package/types/responseErrors/fileImportErrors.d.ts +5 -0
  96. package/types/responseErrors/genericResponseTypes.d.ts +33 -0
  97. package/types/responseErrors/importErrors.d.ts +7 -0
  98. package/types/responseErrors/index.d.ts +30 -0
  99. package/types/responseErrors/invalidProductTypeErrors.d.ts +1 -0
  100. package/types/responseErrors/invalidProductTypeErrors.js +3 -0
  101. package/types/responseErrors/invalidProductTypeErrors.js.map +1 -0
  102. package/types/responseErrors/invalidProductTypeErrors.ts +1 -0
  103. package/types/responseErrors/invoiceErrors.d.ts +1 -0
  104. package/types/responseErrors/invoiceErrors.js +3 -0
  105. package/types/responseErrors/invoiceErrors.js.map +1 -0
  106. package/types/responseErrors/invoiceErrors.ts +1 -0
  107. package/types/responseErrors/passwordResponseErrors.d.ts +6 -0
  108. package/types/responseErrors/paymentResponseErrors.d.ts +5 -0
  109. package/types/responseErrors/rateLimitErrors.d.ts +1 -0
  110. package/types/responseErrors/userAndCustomerErrors.d.ts +1 -0
  111. package/types/responseErrors/userAndCustomerErrors.js +3 -0
  112. package/types/responseErrors/userAndCustomerErrors.js.map +1 -0
  113. package/types/responseErrors/userAndCustomerErrors.ts +11 -0
  114. package/types/responseErrors/vatLookupResponseErrors.d.ts +3 -0
  115. package/types/responseErrors/vehcileBlacklistErrors.d.ts +3 -0
  116. package/types/responseErrors/vehicleBlacklistErrors.d.ts +2 -0
  117. package/types/searchQuery.d.ts +21 -0
  118. package/types/stripe/stripe.d.ts +49 -0
  119. package/types/stripe/stripeAddress.d.ts +10 -0
  120. package/types/stripe/stripeDateOfBirth.d.ts +5 -0
  121. package/types/stripe/stripeDeclineChargeOn.d.ts +4 -0
  122. package/types/stripe/stripeExternalAccount.d.ts +19 -0
  123. package/types/stripe/stripeLegalEntity.d.ts +16 -0
  124. package/types/stripe/stripeOwner.d.ts +9 -0
  125. package/types/stripe/stripeVerification.d.ts +33 -0
  126. package/types/termsOfService.d.ts +11 -0
  127. package/types/translation.d.ts +3 -0
  128. package/types/translations/index.d.ts +38 -0
  129. package/types/user.d.ts +10 -0
  130. package/types/userConfiguration/tableUserConfiguration.d.ts +15 -0
  131. package/types/userConfiguration/userConfiguration.d.ts +5 -0
  132. package/types/v4PricingTool/dealerAndProvider/index.d.ts +44 -0
  133. package/types/v4PricingTool/dealerAndProvider/index.js +3 -0
  134. package/types/v4PricingTool/dealerAndProvider/index.js.map +1 -0
  135. package/types/v4PricingTool/dealerAndProvider/index.ts +66 -0
  136. package/types/v4PricingTool/index.d.ts +2 -0
  137. package/types/v4PricingTool/productsAndContracts/index.d.ts +2 -0
  138. package/types/v4PricingTool/productsAndContracts/index.js +7 -0
  139. package/types/v4PricingTool/productsAndContracts/index.js.map +1 -0
  140. package/types/v4PricingTool/productsAndContracts/index.ts +10 -0
  141. package/types/vatLookup.d.ts +14 -0
  142. package/types/vehicle.d.ts +160 -0
  143. package/types/vehicleContracts.d.ts +15 -0
  144. package/types/vehiclePartial.d.ts +24 -0
  145. package/types/warranty.d.ts +19 -0
  146. package/types/webcalc/auth.d.ts +48 -0
  147. package/types/webcalc/index.d.ts +2 -0
  148. package/types/webcalc/offerRequest.d.ts +18 -0
  149. package/types/workshopOperation.d.ts +18 -0
package/types/index.ts ADDED
@@ -0,0 +1,229 @@
1
+ export enum ContractState {
2
+ Draft = 1,
3
+ Offer = 100,
4
+ OfferExpired = 110,
5
+ OfferRevoked = 120,
6
+ OfferRejected = 130, // not used
7
+ Active = 200,
8
+ ActivePrePaid = 210,
9
+ ActivePendingTermination = 250,
10
+ Suspended = 400,
11
+ CancelledSubscription = 450,
12
+ Terminated = 500,
13
+ Extended = 510,
14
+ Expired = 600,
15
+ Settled = 900,
16
+ SettledPrePaid = 950,
17
+ }
18
+
19
+ export enum WarrantyState {
20
+ Active = 200,
21
+ Rejected = 300,
22
+ Terminated = 500,
23
+ }
24
+
25
+ export enum DbType {
26
+ int = 1,
27
+ text,
28
+ date,
29
+ monetary,
30
+ mileage,
31
+ }
32
+
33
+ export enum AggregateType {
34
+ sum = 1,
35
+ concat,
36
+ count,
37
+ }
38
+
39
+ export enum FormattingLocale {
40
+ 'sv-SE',
41
+ 'uk-UA',
42
+ 'da-DK',
43
+ 'en-GB',
44
+ 'fi-FI',
45
+ 'en-US',
46
+ }
47
+
48
+ export enum ContractActionType {
49
+ createInV4AndActivate = 90, // Contract was created in V4 (and activated there), this (mirror) contract in JustGO is based on that contract in V4. See also sendMirrorAndActivateInV4.
50
+ create = 100, // Who created the contract? a customer or a seller? if the contract was created as an extentioon information about the parent must be in the details.
51
+ sendDraft = 120, // A draft was sent to the customer.
52
+ buyNow = 130, // Customer visited payment page.
53
+ failedBuyNow = 135, // Customer or Seller/Admin payment failed.
54
+ createOffer = 140, // An offer was created.
55
+ sendOfferReminderMail = 150, // A reminder about offer was sent to the customer.
56
+ softBounce = 1510, // Email soft bounced, temporary issues preventing email delivery (mailbox is full, delays on client side, spam/reputation related exc).
57
+ hardBounce = 1512, // Email hard bounced, permanent issues preventing email delivery (address doesn't exist, email not complying with sending domain auth policy, spam/reputation related exc).
58
+ dnsError = 1513, // A type of soft bounce, can occur during domain migration and change of email provider.
59
+ sendContractTerminationMail = 151, // A termination mail was sent to the customer.
60
+ sendOfferReminderMail2 = 152, // A reminder about offer was sent to the customer.
61
+ sendContractActivationMail = 153, // A contract activation mail was sent to the customer.
62
+ sendOfferReminderMail3 = 154, // A reminder about offer was sent to the customer.
63
+ sendContractSuspendedMail = 155, // A suspended mail was sent to the customer.
64
+ sendContractOfferCreatedMail = 156, // Email sent to the customer informing offer has been created.
65
+ resendContractOfferMail = 1565, // Resent offer to the customer via "Resend Offer" action.
66
+ sendOfferToOneselfMail = 1566, // End-user sent the offer to oneself (via Webcalc).
67
+ sendContractReactivationMail = 157, // A contract reactivation mail was sent to the customer.
68
+ sendContractAdjustmentMail = 158, // A contract adjustment mail was sent to the customer.
69
+ sendContractSettlementMail = 159, // A contract settlement mail was sent to the customer.
70
+ rejectOffer = 160, // The customer rejected the offer.
71
+ acceptOffer = 180, // The customer accepted the offer.
72
+ approveOffer = 200, // Who approved it? that would be the customer.
73
+ activate = 300, // The contract was activated by either the customer or the seller.
74
+ sendMirrorAndActivateInV4 = 1300, // A (copy/mirror) of this (already created in JustGO) contract was sent to V4 (and activated there in V4). See also createInV4AndActivate.
75
+ expire = 400, // The contract offer expired and archived.
76
+ expireContract = 410, // The contract expired.
77
+ sendContractExpiredMail = 411, // A expired mail was sent to the customer.
78
+ changeVehicleData = 420, // Meta data for the vehicle was changed.
79
+ changeCustomerData = 440, // Meta data for the customer was changed.
80
+ changePaymentData = 460, // Information about payment was changed.
81
+ modify = 500, // (extended) The contract was changed in a way that changes the financial agreement, if a new contract was created as a sideeffect, information about the new contract is in the details.
82
+ createPendingTermination = 550, // Registers the creation of a pending termination and indicates that the contract's status has changed from Active to ActivePendingTermination.
83
+ cancelPendingTermination = 560, // Registers the cancellation of a pending termination and indicates that the contract's status has changed from ActivePendingTermination to Active.
84
+ suspend = 600, // Who suspended the contract, if the system did this automatically that will be described in the details.
85
+ cancelSubscription = 650, // When Stripe subscription is cancelled without the request (automatically because of failed payments).
86
+ successfulInvoicePayment = 690, // Successful invoice payment. Contract soon to be re-activated.
87
+ reactivate = 700, // Who unsuspended the contract.
88
+ sendAndReactivateInV4 = 1700, // Sent reactivate request to V4.
89
+ extending = 710, // Who extended the contract (the contract which extended).
90
+ pauseSubscription = 720, // The subscription is paused because of contract paid off.
91
+ terminate = 800, // Who terminated the contract.
92
+ sendAndInactivateInV4 = 1800, // Sent inactivate request to V4.
93
+ registerCashPayment = 810, // Registered cash payment. Helps to solve balance issues on a contract.
94
+ registerCashPayout = 820, // Registered cash payout. Helps to solve balance issues on a contract.
95
+ registerProviderPayment = 830, // Registered provider payment. It means that provider forgive some amount. Helps to solve balance issues on a contract.
96
+ createStripeInvoice = 860, // Created stripe invoice for settlement.
97
+ registerPaidInvoice = 870, // Registered paid invoice. Create new 'settle charge' invoice (invoice.payment_succeeded webhook).
98
+ settle = 900, // Who Settled the contract, any settlement comments will be in the details.
99
+ archive = 1000, // Archive contract.
100
+ other = 9999, // Other action not applicable (yet) by any other action, information about the new and old contract is in the details.
101
+ }
102
+
103
+ export enum PaymentFailureReason {
104
+ expiredCard = 10, // The card has expired.
105
+ authenticationRequired = 20, // The card was declined as the transaction requires authentication.
106
+ insufficientFunds = 30, // The card has insufficient funds to complete the purchase.
107
+ withdrawalCountLimitExceeded = 40, // The customer has exceeded the balance or credit limit available on their card.
108
+ invalidAmount = 50, // The payment amount is invalid, or exceeds the amount that's allowed.
109
+ // If the amount appears to be correct, the customer needs to check with their card issuer.
110
+ fraudLostStolen = 60, // Payment matches a value on the Stripe user's block list. Stripe suspects that it's fraudulent.
111
+ // The card is reported lost or stolen. The specific reason for the decline shouldn't be reported to the customer.
112
+ // Instead, it needs to be presented as a generic_decline.
113
+ attemptPaymentAgain = 70, // Attempt the payment again. If you still can't process it, the customer needs to contact their card issuer.
114
+ // Recommended you not retry charges more than four times.
115
+ incorrectData = 80, // The customer needs try again using the correct card/payment data.
116
+ contactCardIssuer = 90, // The customer needs to contact their card issuer for more information.
117
+ unknownReason = 100, // Unknown Stripe reasons or reasons which shouldn't happen.
118
+ }
119
+
120
+ export enum ResponseWarnings {
121
+ GenericWarning = 499,
122
+ }
123
+
124
+ export type FileUploadToStorageType = 'General-Storage' | 'Logo-Banner-Storage' | 'Logo-Square-Storage'
125
+
126
+ export enum OutageSeverityLevel {
127
+ Low = 1,
128
+ Medium = 2,
129
+ High = 3,
130
+ }
131
+
132
+ export enum SettlementPaymentType {
133
+ cashPayout = 1,
134
+ cashPayment,
135
+ stripePayment,
136
+ providerPayment,
137
+ }
138
+
139
+ export enum ReleaseSystem {
140
+ Admin = 1,
141
+ Superadmin,
142
+ Api,
143
+ WebShop,
144
+ }
145
+
146
+ export enum ReleaseTag {
147
+ ADDED = 1,
148
+ FIXED,
149
+ NEW,
150
+ REMOVED,
151
+ UPDATED,
152
+ IMPROVED,
153
+ }
154
+
155
+ export enum AccessKeyPermission {
156
+ Read = 1,
157
+ Write,
158
+ ReadWrite,
159
+ }
160
+
161
+ export enum AccessKeyService {
162
+ WorkshopOperation = 1,
163
+ Report,
164
+ }
165
+
166
+ export * from './address'
167
+ export * from './admin'
168
+ export * from './app'
169
+ export * from './brand'
170
+ export * from './chart'
171
+ export * from './contactPerson'
172
+ export * from './contract/contract'
173
+ export * from './contract/contractActivation'
174
+ export * from './contract/contractFilter'
175
+ export * from './contract/contractList'
176
+ export * from './contract/contractOffer'
177
+ export * from './contract/contractQuery'
178
+ export * from './contractAction'
179
+ export * from './contractOption'
180
+ export * from './contractProvider'
181
+ export * from './contractTemplate'
182
+ export * from './country'
183
+ export * from './currency'
184
+ export * from './customer'
185
+ export * from './durationOptions'
186
+ export * from './errorResponse'
187
+ export * from './fuelType'
188
+ export * from './includedContractOption'
189
+ export * from './invoice'
190
+ export * from './locale'
191
+ export * from './localizationData'
192
+ export * from './model'
193
+ export * from './outage'
194
+ export * from './payment'
195
+ export * from './priceCalculation'
196
+ export * from './priceSpecification'
197
+ export * from './product'
198
+ export * from './providerBranding'
199
+ export * from './queryParams'
200
+ export * from './reports/reports'
201
+ export * from './resetPassword'
202
+ export * from './responseErrors/calculatorResponseErrors'
203
+ export * from './responseErrors/contractResponseErrors'
204
+ export * from './responseErrors/genericResponseTypes'
205
+ export * from './responseErrors/index'
206
+ export * from './stripe/stripe'
207
+ export * from './stripe/stripeAddress'
208
+ export * from './stripe/stripeDateOfBirth'
209
+ export * from './stripe/stripeDeclineChargeOn'
210
+ export * from './stripe/stripeExternalAccount'
211
+ export * from './stripe/stripeLegalEntity'
212
+ export * from './stripe/stripeOwner'
213
+ export * from './stripe/stripeVerification'
214
+ export * from './termsOfService'
215
+ export * from './translation'
216
+ export * from './user'
217
+ export * from './userConfiguration/tableUserConfiguration'
218
+ export * from './userConfiguration/userConfiguration'
219
+ export * from './vatLookup'
220
+ export * from './vehicle'
221
+ export * from './vehiclePartial'
222
+ export * from './vehicleContracts'
223
+ export * from './webcalc'
224
+ export * from './workshopOperation'
225
+ export * from './releaseNotes'
226
+ export * from './paymentFailureReason'
227
+ export * from './translations'
228
+ export * from './v4PricingTool'
229
+ export * from './accessKey'
@@ -0,0 +1,13 @@
1
+ import { IContractResponse } from './contract/contract'
2
+ import { PriceSpecification } from './priceSpecification'
3
+
4
+ export type InvoiceOrderBy = 'invoiceId' | 'dateIssuedAt' | 'state' | 'amount' | 'url'
5
+ export type InvoiceState = 'Pending' | 'Paid' | 'Canceled'
6
+
7
+ export interface IInvoice {
8
+ invoiceId: number
9
+ dateIssuedAt: Date
10
+ state: InvoiceState
11
+ amount: PriceSpecification
12
+ url: string
13
+ }
@@ -0,0 +1,24 @@
1
+ export interface Locale {
2
+ localeId: number
3
+ name: string
4
+ isoName: string
5
+ currencySymbol: string
6
+ currencyDefaultFormat: string
7
+ dateDefaultFormat: string
8
+ vatPct: number
9
+ }
10
+
11
+ /**
12
+ * "
13
+ * For example, to specify common English, use the 'en' language designator as
14
+ * locale. To specify the English language as it is used in the United
15
+ * Kingdom, use 'en-GB' as the locale.
16
+ * "
17
+ *
18
+ * Reference:
19
+ * https://lingohub.com/developers/supported-locales/language-designators-with-regions
20
+ *
21
+ * @note 'en-GB' is deprecated, please use 'en' for common English instead if possible.
22
+ * @deprecated 'en-GB'
23
+ */
24
+ export type IsoLocale = 'da-DK' | 'sv-SE' | 'fi-FI' | 'nb-NO' | 'en' | 'en-GB' // NOTE: 'en-GB' is deprecated.
@@ -0,0 +1,7 @@
1
+ import { Locale } from './locale'
2
+ import { Translation } from './translation'
3
+
4
+ export interface LocalizationData {
5
+ locale: Locale | undefined
6
+ translations: Translation[] | undefined
7
+ }
@@ -0,0 +1,4 @@
1
+ export interface Model {
2
+ name: string
3
+ id?: number
4
+ }
@@ -0,0 +1,9 @@
1
+ import { OutageSeverityLevel } from './index'
2
+
3
+ export interface IOutageResponse {
4
+ headerText: string | null
5
+ message: string | null
6
+ date: Date
7
+ disabledPaths: string[] | null
8
+ severityLevel: OutageSeverityLevel | null
9
+ }
@@ -0,0 +1,53 @@
1
+ import { SettlementPaymentType } from './index'
2
+ import { PriceSpecification } from './priceSpecification'
3
+
4
+ /** Supported payment gateways. */
5
+ export type PaymentGateway = 'Stripe' | 'B2B' | 'V4' | 'NONE' | 'Mock'
6
+
7
+ /** Supported payment types. */
8
+ export type PaymentType = 'automatic' | 'manual'
9
+
10
+ /** Credit card. */
11
+ export interface PaymentCard {
12
+ cardType: string
13
+ last4: string
14
+ expMonth: number
15
+ expYear: number
16
+ }
17
+
18
+ /** Payment plan. */
19
+ export interface PaymentPlan {
20
+ amountPrPayment: PriceSpecification
21
+ downpayment: PriceSpecification
22
+ totalCost: PriceSpecification
23
+ }
24
+
25
+ /**
26
+ * Payload to Initialize a Stripe Checkout Session.
27
+ */
28
+ export interface IPreparePaymentRequest {
29
+ prettyIdentifier: string
30
+ cancel_url: string
31
+ success_url: string
32
+ }
33
+
34
+ /**
35
+ * Response payload from from a Stripe Checkout Session initialization request.
36
+ */
37
+ export interface IPreparePaymentResponse {
38
+ prettyIdentifier: string
39
+ paymentGateway: PaymentGateway
40
+ checkoutSessionId?: string
41
+ stripePublicKey?: string
42
+ stripeAccount?: string
43
+ }
44
+
45
+ /**
46
+ * Payload to create settlement payments.
47
+ */
48
+ export interface ISettlementPaymentRequest {
49
+ paymentAmount: number
50
+ type: SettlementPaymentType
51
+ comment?: string
52
+ shareComment?: boolean
53
+ }
@@ -0,0 +1,6 @@
1
+ import { PaymentFailureReason } from './index'
2
+
3
+ export interface IPaymentFailureReason {
4
+ paymentFailureReason: PaymentFailureReason
5
+ stripeDeclineReason: string
6
+ }
@@ -0,0 +1,27 @@
1
+ import { PriceSpecification } from './priceSpecification'
2
+
3
+ export interface ICalculationRequest {
4
+ contractTemplateId: number
5
+ brandId: number
6
+ vehicleModelId: number
7
+ fuelTypeId: number
8
+ duration: number
9
+ mileage: number
10
+ registrationDate?: string
11
+ optionIds: number[]
12
+ startMileage?: number
13
+ modelYear: number
14
+ registrationNumber: string
15
+ }
16
+
17
+ /**
18
+ * The type returned by a price calculation
19
+ */
20
+ export interface ICalculationResponse {
21
+ amountPrPayment: PriceSpecification
22
+ downpayment: PriceSpecification
23
+ firstPaymentDate: string
24
+ contractStartDate: string
25
+ contractEndDate: string
26
+ serviceInfo?: string[] // use for AX templates
27
+ }
@@ -0,0 +1,20 @@
1
+ // import { TCurrency } from "../types"
2
+
3
+ /**
4
+ * Note: If priceWith3Decimals has a value then use this value as price (possible value in price
5
+ * may be ignored), while if priceWith3Decimals is undefined then use the value in price.
6
+ *
7
+ * @param price This value is the price only with max 2 decimals (the precision).
8
+ * @param priceWith3Decimals This price facilates up to 3 decimals (needed for
9
+ * calculations at least for euros to get rid of some rounding issues in
10
+ * combination with VAT in some cases).
11
+ */
12
+ // TODO: Switch type of currency to TCurrency
13
+ export interface PriceSpecification {
14
+ price: number // Price with max 2 decimals (should have been mapped from cents).
15
+ priceWith3Decimals?: number // Price with upto 3 decimals (should have been mapped from tenth of cents).
16
+ priceInclVat: number
17
+ vatShare: number
18
+ currency: string
19
+ // currency: TCurrency
20
+ }
@@ -0,0 +1,23 @@
1
+ import { Brand } from './brand'
2
+ import { FuelType } from './fuelType'
3
+ import { Model } from './model'
4
+ import { VehicleContracts as ProductContracts } from './vehicleContracts'
5
+
6
+ export interface Other {
7
+ id?: number
8
+ serialNumber?: string
9
+ serialNumber2?: string
10
+ itemNumber?: string
11
+ itemNumber2?: string
12
+ regDate?: string
13
+ brand: Brand
14
+ model: Model
15
+ fuelType: FuelType | undefined
16
+ modelYear: number
17
+ typeName: string
18
+ }
19
+
20
+ export interface ProductAlongItsContracts extends Other {
21
+ contracts: ProductContracts | undefined
22
+ hasActiveWarranty: boolean | undefined
23
+ }
@@ -0,0 +1,18 @@
1
+ import { Brand } from './brand'
2
+ import { FuelType } from './fuelType'
3
+ import { Model } from './model'
4
+
5
+ // Note: Only serial and item numbers is required, rest are optional.
6
+ export interface ProductPartial {
7
+ id?: number
8
+ serialNumber: string
9
+ serialNumber2?: string
10
+ itemNumber: string
11
+ itemNumber2?: string
12
+ regDate?: string
13
+ brand?: Brand
14
+ model?: Model
15
+ fuelType?: FuelType
16
+ modelYear?: number
17
+ typeName?: string
18
+ }
@@ -0,0 +1,48 @@
1
+ import { TIsoCountry } from './country'
2
+ import { TCurrency } from './currency'
3
+ import { IsoLocale } from './locale'
4
+
5
+ export interface IBrandingPayloadResponse {
6
+ countryCode: TIsoCountry
7
+ locale: IsoLocale
8
+ paymentInformation: IStripeInformationResponse
9
+ providerInformation: IProviderInformationResponse
10
+ providerBranding: IProviderBrandingResponse[]
11
+ providerStyling: IProviderStylingResponse
12
+ providerCustomization?: IProviderCustomizationResponse
13
+ parentProviderId?: number | null
14
+ }
15
+
16
+ export interface IStripeInformationResponse {
17
+ public_key: string
18
+ }
19
+
20
+ export interface IProviderInformationResponse {
21
+ contractProviderId: number
22
+ administrativeName: string
23
+ countryCode: TIsoCountry
24
+ currency: TCurrency
25
+ cvrCode: string
26
+ logo: string
27
+ contactFormUrl: string
28
+ showRegistrationSelectionPage: boolean
29
+ email: string
30
+ termsOfTradeRef: string
31
+ webCalcEnabled: boolean
32
+ hasAxTemplates: boolean // Autoexperten.
33
+ }
34
+
35
+ export interface IProviderBrandingResponse {
36
+ text: string
37
+ }
38
+
39
+ export interface IProviderStylingResponse {
40
+ brandingLogo: string
41
+ hasProviderStyling: boolean
42
+ }
43
+
44
+ export interface IProviderCustomizationResponse {
45
+ webCalcTrackingPixelOrderConfirmationUrl: string | undefined // Set undefined if this setting is not loaded.
46
+ webCalcTrackingPixelOrderConfirmationLastUpdated: string | undefined // Set undefined if this setting is not loaded.
47
+ inheritParentStylingWebcalc: boolean | undefined // Set undefined if this setting is not loaded.
48
+ }
@@ -0,0 +1,51 @@
1
+ // @NOTE - Deprecate this as search is a optional query param and
2
+ // paginated query params has their own extension of query params
3
+ export interface ISearchQuery<OrderBy> {
4
+ limit?: number
5
+ offset?: number
6
+ query?: string
7
+ orderBy?: OrderBy
8
+ orderDirection?: OrderDirection
9
+ }
10
+
11
+ // @NOTE - Deprecate this
12
+ export type OrderDirection = 'ASC' | 'DESC'
13
+
14
+ // @NOTE - Use this
15
+ export type OrderDirectionType = 'ASC' | 'DESC'
16
+
17
+ export interface IPaginationParams<OrderBy> {
18
+ limit?: number
19
+ offset?: number
20
+ orderBy?: OrderBy
21
+ orderDirection?: OrderDirectionType
22
+ }
23
+
24
+ export interface IQueryParams<Filtering = undefined> {
25
+ filtering?: Filtering
26
+ search?: string
27
+ }
28
+
29
+ export interface IPaginatedQueryParams<OrderBy, Filtering = undefined> extends IQueryParams<Filtering> {
30
+ pagination?: IPaginationParams<OrderBy>
31
+ }
32
+
33
+ export interface IPaginatedQuery<OrderByType, Filtering = undefined> {
34
+ params?: IPaginatedQueryParams<OrderByType, Filtering>
35
+ }
36
+
37
+ export interface IPagination<OrderByType> {
38
+ totalCount: number
39
+ resultCount: number
40
+ currentPage: number
41
+ pages: number
42
+ offset: number
43
+ limit: number
44
+ orderBy: OrderByType
45
+ orderDirection: OrderDirectionType
46
+ }
47
+
48
+ export interface IPaginatedResponse<Result, OrderByType> {
49
+ pagination: IPagination<OrderByType>
50
+ result: Result
51
+ }
@@ -0,0 +1,33 @@
1
+ import { ReleaseSystem, ReleaseTag } from '../index'
2
+ import { IsoLocale } from '../locale'
3
+
4
+ export interface IReleaseDescription {
5
+ releaseDescriptionId?: number
6
+ description: string
7
+ locale: IsoLocale
8
+ }
9
+
10
+ export interface IReleaseVersionRequest {
11
+ version: string
12
+ releaseSystem: ReleaseSystem
13
+ releaseDate: string
14
+ }
15
+
16
+ export interface IReleaseNoteRequest {
17
+ releaseVersionId: number
18
+ descriptions: IReleaseDescription[]
19
+ releaseTag: ReleaseTag
20
+ }
21
+
22
+ export interface IReleaseVersionResponse extends IReleaseVersionRequest {
23
+ releaseVersionId: number
24
+ published: boolean
25
+ }
26
+
27
+ export interface IReleaseNoteResponse extends IReleaseNoteRequest {
28
+ releaseNoteId: number
29
+ }
30
+
31
+ export interface IReleaseNotesResponse extends IReleaseVersionResponse {
32
+ releaseNotes: IReleaseNoteResponse[]
33
+ }
@@ -0,0 +1,50 @@
1
+ import { AggregateType, DbType, TContractObject, TTranslationApplication } from '../index'
2
+ import { IsoLocale } from '../locale'
3
+
4
+ export interface IDbColumn {
5
+ name: string
6
+ description: string
7
+ descriptionMap?: TTranslationMap
8
+ dbType: DbType
9
+ groupOnly?: true
10
+ }
11
+
12
+ export interface IReportDefinition {
13
+ name: string
14
+ defaultDescription: string
15
+ columns: IDbColumn[]
16
+ groupByColumns: string[]
17
+ descriptionMap?: TTranslationMap
18
+ hasProductFields?: boolean
19
+ }
20
+ export type IReportDefinitionsResponse = { [key in string]?: IReportDefinition[] }
21
+
22
+ export interface IReportSearchRequest {
23
+ name: string
24
+ search: { col: string; search: string }[]
25
+ groupBy: string[]
26
+ contractObjectType?: TContractObject
27
+ }
28
+
29
+ export type TTranslationMap = { [key in IsoLocale]?: string }
30
+
31
+ export interface IColDefResponse {
32
+ header: string
33
+ type: DbType
34
+ }
35
+
36
+ export type ColData = { [colName in string]: IColDefResponse }
37
+ export type CellData = string | number | Date | null | RowData[]
38
+ export type RowData = { [colName in string]: CellData }
39
+ export interface IReportSearchResponse {
40
+ name: string
41
+ cols: ColData
42
+ data: RowData[]
43
+ links?: { [colName in string]: string }[]
44
+ }
45
+
46
+ export interface IReportSearchResponseArrays {
47
+ headers: string[]
48
+ types: DbType[]
49
+ rows: CellData[][]
50
+ }
@@ -0,0 +1,3 @@
1
+ export interface IResetPasswordRequest {
2
+ password: string
3
+ }