-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.d.ts
92 lines (79 loc) · 2.01 KB
/
index.d.ts
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
interface FulfillerIdentityClientOptions {
AWSXRay?: Function;
retries?: number;
retryDelayInMs?: number;
retryOnTimeouts?: boolean;
timeout?: number;
url?: string;
}
interface BaseOptions {
noCache?: boolean;
}
interface GetFulfillersOptions extends BaseOptions {
showArchived?: boolean;
fulfillerName?: string;
}
interface Fulfiller {
fulfillerId: string;
internalFulfillerId: string;
name: string;
email: string;
phone: string;
language: string;
setupInProgress: FlagExtended;
active: FlagExtended;
idle: FlagExtended;
inactive: FlagExtended;
retired: FlagExtended;
archived: boolean;
links: FulfillerLinks;
}
interface FlagExtended {
description?: string;
value: boolean;
lastUpdated?: string;
explicit?: string;
}
interface FulfillerContactExtended {
id: string;
createdAt: string;
createdBy: string;
businessContact: boolean;
operationalSupportContact: boolean;
technicalContact: boolean;
email: string;
phone: string;
role: string;
name: string;
language: string;
defaultContact: boolean;
links: FulfillerContactLinks;
}
interface FulfillerLinks {
self: Link;
fulfillmentLocations?: Link;
fulfillerCoamAdminGroup?: Link;
account?: Link;
fulfillerLogo?: Link;
fulfillerContacts?: Link;
}
interface FulfillerContactLinks {
self: Link;
up: Link;
fulfiller: Link;
}
interface Link {
href: string;
rel?: string;
}
declare class FulfillerIdentityClient {
constructor(authorization?: (string|(() => string)), clientOptions?: FulfillerIdentityClientOptions);
getUrl(): string;
getFulfillers(options: GetFulfillersOptions): Promise<Fulfiller[]>;
getFulfiller(fulfillerId: string, options: BaseOptions): Promise<Fulfiller>;
getFulfillerContacts(fufillerId: string, options: BaseOptions): Promise<FulfillerContactExtended[]>
// Unsure how to type this, please refer to the documentation
// https://github.com/Cimpress/cimpress-fulfiller-identity
saveFulfiller(fulfiller: any): Promise<void>;
}
export default FulfillerIdentityClient;