@fragus/sam-types 1.2.21 → 1.2.23
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/package.json +1 -1
- package/types/admin/customer/customer.d.ts +2 -0
- package/types/contract/contractList.d.ts +2 -0
- package/types/myPage/deleteMyData.d.ts +20 -0
- package/types/myPage/index.d.ts +1 -0
- package/types/responseErrors/userAndCustomerErrors.d.ts +1 -1
- package/types/responseErrors/userAndCustomerErrors.ts +1 -0
package/package.json
CHANGED
|
@@ -18,6 +18,8 @@ export interface IAdminCustomer {
|
|
|
18
18
|
ean?: string
|
|
19
19
|
companyName?: string
|
|
20
20
|
vatLookup?: VatLookup
|
|
21
|
+
/** Set when the customer's data has been anonymised (by the archive cron or from MyPage); it is then read-only. */
|
|
22
|
+
dataDeleted?: boolean
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
export interface CustomerUpdateResponse extends IAdminCustomer {
|
|
@@ -14,6 +14,8 @@ export interface IContractListRecord {
|
|
|
14
14
|
contractTemplateDescription: string
|
|
15
15
|
customerName: string
|
|
16
16
|
customerCompanyName: string
|
|
17
|
+
/** Set when the customer's data has been anonymised; the name columns then hold placeholders. */
|
|
18
|
+
customerDataDeleted?: boolean
|
|
17
19
|
registrationNumber?: string
|
|
18
20
|
serialNumber?: string
|
|
19
21
|
itemNumber?: string
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ContractState } from '../index'
|
|
2
|
+
|
|
3
|
+
export interface IDeleteMyDataOpenContract {
|
|
4
|
+
prettyIdentifier: string
|
|
5
|
+
contractState: ContractState
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Whether the customer may anonymise their own data from MyPage. Refused while any contract is in a state that can
|
|
10
|
+
* still charge, refund or mail the customer; those contracts are listed in `openContracts`.
|
|
11
|
+
*/
|
|
12
|
+
export interface IDeleteMyDataStatusResponse {
|
|
13
|
+
allowed: boolean
|
|
14
|
+
openContracts: IDeleteMyDataOpenContract[]
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** Body of the MyPage delete-my-data endpoint; the customer confirms with their current password. */
|
|
18
|
+
export interface IDeleteMyDataRequest {
|
|
19
|
+
password: string
|
|
20
|
+
}
|
package/types/myPage/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare type UserAndCustomerErrors = 'GENERIC_CONTACT_PERSON_NOT_FOUND' | 'GENERIC_CUSTOMER_ALREADY_EXISTS' | 'GENERIC_CUSTOMER_EMAIL_ALREADY_EXISTS_AS_USER' | 'GENERIC_CUSTOMER_NOT_FOUND' | 'GENERIC_FORBIDDEN_ROLE' | 'REPORTS_USER_NO_ADMIN_LOGIN' | 'GENERIC_NODE_ROLE_NOT_FOUND' | 'GENERIC_USER_ALREADY_EXISTS' | 'GENERIC_USER_CONFIGURATION_NOT_FOUND' | 'GENERIC_USER_NOT_FOUND' | 'GENERIC_USERNAME_OR_PASSWORD_NOT_FOUND';
|
|
1
|
+
export declare type UserAndCustomerErrors = 'GENERIC_CONTACT_PERSON_NOT_FOUND' | 'GENERIC_CUSTOMER_ALREADY_EXISTS' | 'GENERIC_CUSTOMER_EMAIL_ALREADY_EXISTS_AS_USER' | 'GENERIC_CUSTOMER_NOT_FOUND' | 'CUSTOMER_HAS_OPEN_CONTRACTS' | 'GENERIC_FORBIDDEN_ROLE' | 'REPORTS_USER_NO_ADMIN_LOGIN' | 'GENERIC_NODE_ROLE_NOT_FOUND' | 'GENERIC_USER_ALREADY_EXISTS' | 'GENERIC_USER_CONFIGURATION_NOT_FOUND' | 'GENERIC_USER_NOT_FOUND' | 'GENERIC_USERNAME_OR_PASSWORD_NOT_FOUND';
|
|
@@ -3,6 +3,7 @@ export type UserAndCustomerErrors =
|
|
|
3
3
|
| 'GENERIC_CUSTOMER_ALREADY_EXISTS'
|
|
4
4
|
| 'GENERIC_CUSTOMER_EMAIL_ALREADY_EXISTS_AS_USER' // The customer's email already exists as a (Seller/Admin/SuperAdmin/...) -User.
|
|
5
5
|
| 'GENERIC_CUSTOMER_NOT_FOUND'
|
|
6
|
+
| 'CUSTOMER_HAS_OPEN_CONTRACTS' // MyPage delete-my-data refused: a contract can still charge, refund or mail the customer.
|
|
6
7
|
| 'GENERIC_FORBIDDEN_ROLE'
|
|
7
8
|
| 'REPORTS_USER_NO_ADMIN_LOGIN' // Admin login refused: the user only has the reports role, used through the report API.
|
|
8
9
|
| 'GENERIC_NODE_ROLE_NOT_FOUND'
|