-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdatatypes.py
55 lines (45 loc) · 1.26 KB
/
datatypes.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# ************************************************************
# Copyright © 2003-2024 Acronis International GmbH.
# This source code is distributed under MIT software license.
# ************************************************************
from typing import TypedDict, Any
from enum import IntEnum
class OrganizationKind(IntEnum):
PARTNER = 0
CUSTOMER = 1
OrganizationKindMapping: dict[str, OrganizationKind] = {
OrganizationKind.PARTNER.name: OrganizationKind.PARTNER,
OrganizationKind.CUSTOMER.name: OrganizationKind.CUSTOMER
}
class CallbackContext(TypedDict):
callback_id: str
endpoint_id: str
tenant_id: str
datacenter_url: str
class CallbackResponse(TypedDict):
type: str
request_id: str
response_id: str
payload: dict[str, Any]
class CallbackRequest(TypedDict):
type: str
request_id: str
created_at: str
context: CallbackContext
payload: dict[str, Any]
class TopologyInfo(TypedDict):
id: str
name: str
class OrganizationMappingPair(TypedDict):
acronis_tenant_id: str
vendor_tenant_id: str
acronis_dc_url: str
class UserData(TypedDict):
id: str
name: str
email: str
class OrganizationData(TypedDict):
id: str
parent_id: str
name: str
kind: OrganizationKind