@workast/sdk 2.3.0 → 3.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.
- package/README.md +88 -59
- package/dist/index.cjs +1875 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +13361 -0
- package/dist/index.d.ts +13361 -0
- package/dist/index.js +1843 -0
- package/dist/index.js.map +1 -0
- package/package.json +34 -52
- package/CHANGELOG.md +0 -59
- package/dist/workast.min.js +0 -1
- package/index.d.ts +0 -163
- package/lib/workast.js +0 -1850
package/index.d.ts
DELETED
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
declare enum HttpMethod {
|
|
2
|
-
GET = 'GET',
|
|
3
|
-
HEAD = 'HEAD',
|
|
4
|
-
POST = 'POST',
|
|
5
|
-
PUT = 'PUT',
|
|
6
|
-
DELETE = 'DELETE',
|
|
7
|
-
PATCH = 'PATCH'
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
declare enum HttpProgressEventDirection {
|
|
11
|
-
UPLOAD = 'upload',
|
|
12
|
-
DOWNLOAD = 'download'
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
declare interface HttpProgressEvent {
|
|
16
|
-
readonly direction: HttpProgressEventDirection;
|
|
17
|
-
readonly lengthComputable: boolean;
|
|
18
|
-
readonly loaded: number;
|
|
19
|
-
readonly total?: number;
|
|
20
|
-
readonly percent?: number;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
declare interface Impersonate {
|
|
24
|
-
team?: string;
|
|
25
|
-
user?: string;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
declare interface HTTPRequestOptions {
|
|
29
|
-
baseUrl?: string;
|
|
30
|
-
timeout?: number;
|
|
31
|
-
maxRetries?: number;
|
|
32
|
-
method?: HttpMethod;
|
|
33
|
-
path?: string;
|
|
34
|
-
query?: Object;
|
|
35
|
-
body?: Object;
|
|
36
|
-
impersonate?: Impersonate
|
|
37
|
-
onProgress?(event: HttpProgressEvent): void;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
declare interface SDKConfiguration {
|
|
41
|
-
timeout?: number;
|
|
42
|
-
maxRetries?: number;
|
|
43
|
-
apiBaseUrl?: string;
|
|
44
|
-
authBaseUrl?: string;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
declare interface ResourceRequestOptions {
|
|
48
|
-
baseUrl?: string;
|
|
49
|
-
timeout?: number;
|
|
50
|
-
maxRetries?: number;
|
|
51
|
-
impersonate?: Impersonate
|
|
52
|
-
onProgress?(event: HttpProgressEvent): void;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
declare interface ListsResource {
|
|
56
|
-
addComment(listId: string, body: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
57
|
-
addParticipants(listId: string, body: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
58
|
-
archive(listId: string, body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
59
|
-
create(body: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
60
|
-
createAttachment(listId: string, body: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
61
|
-
createNote(listId: string, body: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
62
|
-
createSublist(listId: string, body: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
63
|
-
deleteAttachment(listId: string, attachmentId: string, body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
64
|
-
deleteComment(listId: string, commentId: string, body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
65
|
-
deleteSublist(listId: string, sublistId: string, body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
66
|
-
importTemplate(listId: string, templateId: string, body: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
67
|
-
join(listId: string, body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
68
|
-
list(query?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
69
|
-
listActivity(listId: string, query?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
70
|
-
listAttachments(listId: string, query?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
71
|
-
listParticipants(listId: string, query?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
72
|
-
listNotes(listId: string, query?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
73
|
-
moveTasks(listId: string, body: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
74
|
-
personal(query?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
75
|
-
removeParticipants(listId: string, body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
76
|
-
retrieve(listId: string, query?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
77
|
-
retrieveNote(listId: string, noteId: string, query?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
78
|
-
unarchive(listId: string, body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
79
|
-
update(listId: string, body: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
80
|
-
updateAttachment(listId: string, attachmentId: string, body: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
81
|
-
updateComment(listId: string, commentId: string, body: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
82
|
-
updateNote(listId: string, noteId: string, body: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
83
|
-
updateSublist(listId: string, sublistId: string, body: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
declare interface NotificationsResource {
|
|
87
|
-
list(query?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
88
|
-
markAllAsRead(body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
89
|
-
markAsRead(notificationId: string, body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
90
|
-
markAsUnread(notificationId: string, body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
91
|
-
retrieveSettings(query?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
92
|
-
subscribe(body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
93
|
-
unsubscribe(body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
94
|
-
updateSettings(body: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
declare interface TagsResource {
|
|
98
|
-
create(body: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
99
|
-
del(tagId: string, body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
100
|
-
list(query?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
101
|
-
update(tagId: string, body: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
declare interface TasksResource {
|
|
105
|
-
create(spaceId: string, body: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
106
|
-
retrieve(taskId: string, query?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
107
|
-
update(taskId: string, body: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
108
|
-
del(taskId: string, body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
109
|
-
subscribe(taskId: string, body: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
110
|
-
unsubscribe(taskId: string, body: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
111
|
-
restore(taskId: string, body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
112
|
-
complete(taskId: string, body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
113
|
-
reopen(taskId: string, body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
114
|
-
assign(taskId: string, body: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
115
|
-
unassign(taskId: string, body: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
116
|
-
clone(taskId: string, body?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
117
|
-
search(body: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
118
|
-
addTags(taskId: string, body: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
119
|
-
removeTags(taskId: string, body: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
120
|
-
createAttachment(taskId: string, body: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
121
|
-
deleteAttachment(taskId: string, attachmentId: string, body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
122
|
-
updateAttachment(taskId: string, attachmentId: string, body: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
123
|
-
createSubtask(taskId: string, body: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
124
|
-
listActivity(taskId: string, query?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
125
|
-
addComment(taskId: string, body: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
126
|
-
deleteComment(taskId: string, commentId: string, body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
127
|
-
updateComment(taskId: string, commentId: string, body: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
128
|
-
markAllNotificationsAsRead(taskId: string, body?: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
declare interface UsersResource {
|
|
132
|
-
me(query?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
133
|
-
retrieve(userId: string, query?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
134
|
-
invite(body: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
135
|
-
activate(userId: string, body?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
136
|
-
deactivate(userId: string, body?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
137
|
-
list(query?: Object, options?: ResourceRequestOptions): Promise<Object>
|
|
138
|
-
update(userId: string, body: Object, options?: ResourceRequestOptions): Promise<undefined>
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
declare class Workast {
|
|
142
|
-
static DEFAULT_TIMEOUT: number;
|
|
143
|
-
static DEFAULT_MAX_RETRIES: number;
|
|
144
|
-
static DEFAULT_API_BASE_URL: string;
|
|
145
|
-
static DEFAULT_AUTH_BASE_URL: string;
|
|
146
|
-
static ALLOWED_HTTP_METHODS: HttpMethod[];
|
|
147
|
-
static IMPERSONATE_TEAM_HEADER: string;
|
|
148
|
-
static IMPERSONATE_USER_HEADER: string;
|
|
149
|
-
static AUTHENTICATION_SCHEME: string;
|
|
150
|
-
static DEFAULT_CONTENT_TYPE: string;
|
|
151
|
-
|
|
152
|
-
constructor(token: string, config?: SDKConfiguration);
|
|
153
|
-
|
|
154
|
-
lists: ListsResource;
|
|
155
|
-
notifications: NotificationsResource;
|
|
156
|
-
tags: TagsResource;
|
|
157
|
-
tasks: TasksResource;
|
|
158
|
-
users: UsersResource;
|
|
159
|
-
|
|
160
|
-
apiCall(options?: HTTPRequestOptions): Promise<Object> | Promise<undefined>
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
export = Workast;
|