backlog-js 0.12.1 → 0.12.5
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/CHANGELOG.md +26 -0
- package/README.md +1 -1
- package/dist/backlog.js +474 -10
- package/dist/backlog.min.js +1 -1
- package/dist/{src → types}/backlog.d.ts +98 -84
- package/dist/{src → types}/entity.d.ts +0 -0
- package/dist/{src → types}/error.d.ts +6 -7
- package/dist/{src → types}/index.d.ts +0 -0
- package/dist/{src → types}/oauth2.d.ts +0 -0
- package/dist/{src → types}/option.d.ts +2 -2
- package/dist/{src → types}/request.d.ts +2 -2
- package/package.json +17 -15
- package/.github/workflows/nodejs.yml +0 -26
- package/DEVELOPMENT.md +0 -47
- package/dist/backlog.d.ts +0 -745
- package/dist/src/backlog.js +0 -513
- package/dist/src/entity.js +0 -2
- package/dist/src/error.js +0 -91
- package/dist/src/index.js +0 -13
- package/dist/src/oauth2.js +0 -45
- package/dist/src/option.js +0 -65
- package/dist/src/request.js +0 -93
- package/dist/test/fixtures/index.d.ts +0 -3
- package/dist/test/fixtures/index.js +0 -15
- package/dist/test/fixtures/oauth2.d.ts +0 -6
- package/dist/test/fixtures/oauth2.js +0 -9
- package/dist/test/fixtures/project.d.ts +0 -10
- package/dist/test/fixtures/project.js +0 -15
- package/dist/test/fixtures/space.d.ts +0 -11
- package/dist/test/fixtures/space.js +0 -14
- package/dist/test/test.d.ts +0 -2
- package/dist/test/test.js +0 -183
|
@@ -90,32 +90,38 @@ export default class Backlog extends Request {
|
|
|
90
90
|
getRecentlyViewedWikis(params: Option.User.GetRecentlyViewedParams): Promise<any>;
|
|
91
91
|
/**
|
|
92
92
|
* https://developer.nulab.com/docs/backlog/api/2/get-list-of-groups/
|
|
93
|
+
* @deprecated
|
|
93
94
|
*/
|
|
94
95
|
getGroups(params: Option.Group.GetGroupsParams): Promise<any>;
|
|
95
96
|
/**
|
|
96
97
|
* https://developer.nulab.com/docs/backlog/api/2/add-group/
|
|
98
|
+
* @deprecated
|
|
97
99
|
*/
|
|
98
100
|
postGroups(params: Option.Group.PostGroupsParams): Promise<any>;
|
|
99
101
|
/**
|
|
100
102
|
* https://developer.nulab.com/docs/backlog/api/2/get-group/
|
|
103
|
+
* @deprecated
|
|
101
104
|
*/
|
|
102
105
|
getGroup(groupId: number): Promise<any>;
|
|
103
106
|
/**
|
|
104
107
|
* https://developer.nulab.com/docs/backlog/api/2/update-group/
|
|
108
|
+
* @deprecated
|
|
105
109
|
*/
|
|
106
110
|
patchGroup(groupId: number, params: Option.Group.PatchGroupParams): Promise<any>;
|
|
107
111
|
/**
|
|
108
112
|
* https://developer.nulab.com/docs/backlog/api/2/delete-group/
|
|
113
|
+
* @deprecated
|
|
109
114
|
*/
|
|
110
115
|
deleteGroup(groupId: number): Promise<any>;
|
|
111
116
|
/**
|
|
112
117
|
* https://developer.nulab.com/docs/backlog/api/2/get-status-list/
|
|
118
|
+
* @deprecated
|
|
113
119
|
*/
|
|
114
120
|
getStatuses(): Promise<any>;
|
|
115
121
|
/**
|
|
116
122
|
* https://developer.nulab.com/docs/backlog/api/2/get-status-list-of-project/
|
|
117
123
|
*/
|
|
118
|
-
getProjectStatuses(projectIdOrKey: string): Promise<any>;
|
|
124
|
+
getProjectStatuses(projectIdOrKey: string | number): Promise<any>;
|
|
119
125
|
/**
|
|
120
126
|
* https://developer.nulab.com/docs/backlog/api/2/get-resolution-list/
|
|
121
127
|
*/
|
|
@@ -135,23 +141,23 @@ export default class Backlog extends Request {
|
|
|
135
141
|
/**
|
|
136
142
|
* https://developer.nulab.com/docs/backlog/api/2/get-project/
|
|
137
143
|
*/
|
|
138
|
-
getProject(projectIdOrKey: string): Promise<any>;
|
|
144
|
+
getProject(projectIdOrKey: string | number): Promise<any>;
|
|
139
145
|
/**
|
|
140
146
|
* https://developer.nulab.com/docs/backlog/api/2/update-project/
|
|
141
147
|
*/
|
|
142
|
-
patchProject(projectIdOrKey: string, params: Option.Project.PatchProjectParams): Promise<any>;
|
|
148
|
+
patchProject(projectIdOrKey: string | number, params: Option.Project.PatchProjectParams): Promise<any>;
|
|
143
149
|
/**
|
|
144
150
|
* https://developer.nulab.com/docs/backlog/api/2/delete-project/
|
|
145
151
|
*/
|
|
146
|
-
deleteProject(projectIdOrKey: string): Promise<any>;
|
|
152
|
+
deleteProject(projectIdOrKey: string | number): Promise<any>;
|
|
147
153
|
/**
|
|
148
154
|
* https://developer.nulab.com/docs/backlog/api/2/get-project-icon/
|
|
149
155
|
*/
|
|
150
|
-
getProjectIcon(projectIdOrKey: string): Promise<Entity.File.FileData>;
|
|
156
|
+
getProjectIcon(projectIdOrKey: string | number): Promise<Entity.File.FileData>;
|
|
151
157
|
/**
|
|
152
158
|
* https://developer.nulab.com/docs/backlog/api/2/get-project-recent-updates/
|
|
153
159
|
*/
|
|
154
|
-
getProjectActivities(projectIdOrKey: string, params: Option.Space.GetActivitiesParams): Promise<any>;
|
|
160
|
+
getProjectActivities(projectIdOrKey: string | number, params: Option.Space.GetActivitiesParams): Promise<any>;
|
|
155
161
|
/**
|
|
156
162
|
* https://developer.nulab.com/docs/backlog/api/2/add-project-user/
|
|
157
163
|
*/
|
|
@@ -159,147 +165,147 @@ export default class Backlog extends Request {
|
|
|
159
165
|
/**
|
|
160
166
|
* https://developer.nulab.com/docs/backlog/api/2/get-project-user-list/
|
|
161
167
|
*/
|
|
162
|
-
getProjectUsers(projectIdOrKey: string): Promise<any>;
|
|
168
|
+
getProjectUsers(projectIdOrKey: string | number): Promise<any>;
|
|
163
169
|
/**
|
|
164
170
|
* https://developer.nulab.com/docs/backlog/api/2/delete-project-user/
|
|
165
171
|
*/
|
|
166
|
-
deleteProjectUsers(projectIdOrKey: string, params: Option.Project.DeleteProjectUsersParams): Promise<any>;
|
|
172
|
+
deleteProjectUsers(projectIdOrKey: string | number, params: Option.Project.DeleteProjectUsersParams): Promise<any>;
|
|
167
173
|
/**
|
|
168
174
|
* https://developer.nulab.com/docs/backlog/api/2/add-project-administrator/
|
|
169
175
|
*/
|
|
170
|
-
postProjectAdministrators(projectIdOrKey: string, params: Option.Project.PostProjectAdministrators): Promise<any>;
|
|
176
|
+
postProjectAdministrators(projectIdOrKey: string | number, params: Option.Project.PostProjectAdministrators): Promise<any>;
|
|
171
177
|
/**
|
|
172
178
|
* https://developer.nulab.com/docs/backlog/api/2/get-list-of-project-administrators/
|
|
173
179
|
*/
|
|
174
|
-
getProjectAdministrators(projectIdOrKey: string): Promise<any>;
|
|
180
|
+
getProjectAdministrators(projectIdOrKey: string | number): Promise<any>;
|
|
175
181
|
/**
|
|
176
182
|
* https://developer.nulab.com/docs/backlog/api/2/delete-project-administrator/
|
|
177
183
|
*/
|
|
178
|
-
deleteProjectAdministrators(projectIdOrKey: string, params: Option.Project.DeleteProjectAdministrators): Promise<any>;
|
|
184
|
+
deleteProjectAdministrators(projectIdOrKey: string | number, params: Option.Project.DeleteProjectAdministrators): Promise<any>;
|
|
179
185
|
/**
|
|
180
186
|
* https://developer.nulab.com/docs/backlog/api/2/add-status/
|
|
181
187
|
*/
|
|
182
|
-
postProjectStatus(projectIdOrKey: string, params: Option.Project.PostStatusParams): Promise<any>;
|
|
188
|
+
postProjectStatus(projectIdOrKey: string | number, params: Option.Project.PostStatusParams): Promise<any>;
|
|
183
189
|
/**
|
|
184
190
|
* https://developer.nulab.com/docs/backlog/api/2/update-status/
|
|
185
191
|
*/
|
|
186
|
-
patchProjectStatus(projectIdOrKey: string, id: number, params: Option.Project.PatchStatusParams): Promise<any>;
|
|
192
|
+
patchProjectStatus(projectIdOrKey: string | number, id: number, params: Option.Project.PatchStatusParams): Promise<any>;
|
|
187
193
|
/**
|
|
188
194
|
* https://developer.nulab.com/docs/backlog/api/2/delete-status/
|
|
189
195
|
*/
|
|
190
|
-
deleteProjectStatus(projectIdOrKey: string, id: number, substituteStatusId: number): Promise<any>;
|
|
196
|
+
deleteProjectStatus(projectIdOrKey: string | number, id: number, substituteStatusId: number): Promise<any>;
|
|
191
197
|
/**
|
|
192
198
|
* https://developer.nulab.com/docs/backlog/api/2/update-order-of-status/
|
|
193
199
|
*/
|
|
194
|
-
patchProjectStatusOrder(projectIdOrKey: string, statusId: number[]): Promise<any>;
|
|
200
|
+
patchProjectStatusOrder(projectIdOrKey: string | number, statusId: number[]): Promise<any>;
|
|
195
201
|
/**
|
|
196
202
|
* https://developer.nulab.com/docs/backlog/api/2/get-issue-type-list/
|
|
197
203
|
*/
|
|
198
|
-
getIssueTypes(projectIdOrKey: string): Promise<any>;
|
|
204
|
+
getIssueTypes(projectIdOrKey: string | number): Promise<any>;
|
|
199
205
|
/**
|
|
200
206
|
* https://developer.nulab.com/docs/backlog/api/2/add-issue-type/
|
|
201
207
|
*/
|
|
202
|
-
postIssueType(projectIdOrKey: string, params: Option.Project.PostIssueTypeParams): Promise<any>;
|
|
208
|
+
postIssueType(projectIdOrKey: string | number, params: Option.Project.PostIssueTypeParams): Promise<any>;
|
|
203
209
|
/**
|
|
204
210
|
* https://developer.nulab.com/docs/backlog/api/2/update-issue-type/
|
|
205
211
|
*/
|
|
206
|
-
patchIssueType(projectIdOrKey: string, id: number, params: Option.Project.PatchIssueTypeParams): Promise<any>;
|
|
212
|
+
patchIssueType(projectIdOrKey: string | number, id: number, params: Option.Project.PatchIssueTypeParams): Promise<any>;
|
|
207
213
|
/**
|
|
208
214
|
* https://developer.nulab.com/docs/backlog/api/2/delete-issue-type/
|
|
209
215
|
*/
|
|
210
|
-
deleteIssueType(projectIdOrKey: string, id: number, params: Option.Project.DeleteIssueTypeParams): Promise<any>;
|
|
216
|
+
deleteIssueType(projectIdOrKey: string | number, id: number, params: Option.Project.DeleteIssueTypeParams): Promise<any>;
|
|
211
217
|
/**
|
|
212
218
|
* https://developer.nulab.com/docs/backlog/api/2/get-category-list/
|
|
213
219
|
*/
|
|
214
|
-
getCategories(projectIdOrKey: string): Promise<any>;
|
|
220
|
+
getCategories(projectIdOrKey: string | number): Promise<any>;
|
|
215
221
|
/**
|
|
216
222
|
* https://developer.nulab.com/docs/backlog/api/2/add-category/
|
|
217
223
|
*/
|
|
218
|
-
postCategories(projectIdOrKey: string, params: Option.Project.PostCategoriesParams): Promise<any>;
|
|
224
|
+
postCategories(projectIdOrKey: string | number, params: Option.Project.PostCategoriesParams): Promise<any>;
|
|
219
225
|
/**
|
|
220
226
|
* https://developer.nulab.com/docs/backlog/api/2/update-category/
|
|
221
227
|
*/
|
|
222
|
-
patchCategories(projectIdOrKey: string, id: number, params: Option.Project.PatchCategoriesParams): Promise<any>;
|
|
228
|
+
patchCategories(projectIdOrKey: string | number, id: number, params: Option.Project.PatchCategoriesParams): Promise<any>;
|
|
223
229
|
/**
|
|
224
230
|
* https://developer.nulab.com/docs/backlog/api/2/delete-category/
|
|
225
231
|
*/
|
|
226
|
-
deleteCategories(projectIdOrKey: string, id: number): Promise<any>;
|
|
232
|
+
deleteCategories(projectIdOrKey: string | number, id: number): Promise<any>;
|
|
227
233
|
/**
|
|
228
234
|
* https://developer.nulab.com/docs/backlog/api/2/get-version-milestone-list/
|
|
229
235
|
*/
|
|
230
|
-
getVersions(projectIdOrKey: string): Promise<any>;
|
|
236
|
+
getVersions(projectIdOrKey: string | number): Promise<any>;
|
|
231
237
|
/**
|
|
232
238
|
* https://developer.nulab.com/docs/backlog/api/2/add-version-milestone/
|
|
233
239
|
*/
|
|
234
|
-
postVersions(projectIdOrKey: string, params: Option.Project.PostVersionsParams): Promise<any>;
|
|
240
|
+
postVersions(projectIdOrKey: string | number, params: Option.Project.PostVersionsParams): Promise<any>;
|
|
235
241
|
/**
|
|
236
242
|
* https://developer.nulab.com/docs/backlog/api/2/update-version-milestone/
|
|
237
243
|
*/
|
|
238
|
-
patchVersions(projectIdOrKey: string, id: number, params: Option.Project.PatchVersionsParams): Promise<any>;
|
|
244
|
+
patchVersions(projectIdOrKey: string | number, id: number, params: Option.Project.PatchVersionsParams): Promise<any>;
|
|
239
245
|
/**
|
|
240
246
|
* https://developer.nulab.com/docs/backlog/api/2/delete-version/
|
|
241
247
|
*/
|
|
242
|
-
deleteVersions(projectIdOrKey: string, id: number): Promise<any>;
|
|
248
|
+
deleteVersions(projectIdOrKey: string | number, id: number): Promise<any>;
|
|
243
249
|
/**
|
|
244
250
|
* https://developer.nulab.com/docs/backlog/api/2/get-custom-field-list/
|
|
245
251
|
*/
|
|
246
|
-
getCustomFields(projectIdOrKey: string): Promise<any>;
|
|
252
|
+
getCustomFields(projectIdOrKey: string | number): Promise<any>;
|
|
247
253
|
/**
|
|
248
254
|
* https://developer.nulab.com/docs/backlog/api/2/add-custom-field/
|
|
249
255
|
*/
|
|
250
|
-
postCustomField(projectIdOrKey: string, params: Option.Project.PostCustomFieldParams | Option.Project.PostCustomFieldWithNumericParams | Option.Project.PostCustomFieldWithDateParams | Option.Project.PostCustomFieldWithListParams): Promise<any>;
|
|
256
|
+
postCustomField(projectIdOrKey: string | number, params: Option.Project.PostCustomFieldParams | Option.Project.PostCustomFieldWithNumericParams | Option.Project.PostCustomFieldWithDateParams | Option.Project.PostCustomFieldWithListParams): Promise<any>;
|
|
251
257
|
/**
|
|
252
258
|
* https://developer.nulab.com/docs/backlog/api/2/update-custom-field/
|
|
253
259
|
*/
|
|
254
|
-
patchCustomField(projectIdOrKey: string, id: number, params: Option.Project.PatchCustomFieldParams | Option.Project.PatchCustomFieldWithNumericParams | Option.Project.PatchCustomFieldWithDateParams | Option.Project.PatchCustomFieldWithListParams): Promise<any>;
|
|
260
|
+
patchCustomField(projectIdOrKey: string | number, id: number, params: Option.Project.PatchCustomFieldParams | Option.Project.PatchCustomFieldWithNumericParams | Option.Project.PatchCustomFieldWithDateParams | Option.Project.PatchCustomFieldWithListParams): Promise<any>;
|
|
255
261
|
/**
|
|
256
262
|
* https://developer.nulab.com/docs/backlog/api/2/delete-custom-field/
|
|
257
263
|
*/
|
|
258
|
-
deleteCustomField(projectIdOrKey: string, id: number): Promise<any>;
|
|
264
|
+
deleteCustomField(projectIdOrKey: string | number, id: number): Promise<any>;
|
|
259
265
|
/**
|
|
260
266
|
* https://developer.nulab.com/docs/backlog/api/2/add-list-item-for-list-type-custom-field/
|
|
261
267
|
*/
|
|
262
|
-
postCustomFieldItem(projectIdOrKey: string, id: number, params: Option.Project.PostCustomFieldItemParams): Promise<any>;
|
|
268
|
+
postCustomFieldItem(projectIdOrKey: string | number, id: number, params: Option.Project.PostCustomFieldItemParams): Promise<any>;
|
|
263
269
|
/**
|
|
264
270
|
* https://developer.nulab.com/docs/backlog/api/2/update-list-item-for-list-type-custom-field/
|
|
265
271
|
*/
|
|
266
|
-
patchCustomFieldItem(projectIdOrKey: string, id: number, itemId: number, params: Option.Project.PatchCustomFieldItemParams): Promise<any>;
|
|
272
|
+
patchCustomFieldItem(projectIdOrKey: string | number, id: number, itemId: number, params: Option.Project.PatchCustomFieldItemParams): Promise<any>;
|
|
267
273
|
/**
|
|
268
274
|
* https://developer.nulab.com/docs/backlog/api/2/delete-list-item-for-list-type-custom-field/
|
|
269
275
|
*/
|
|
270
|
-
deleteCustomFieldItem(projectIdOrKey: string, id: number, itemId: number): Promise<any>;
|
|
276
|
+
deleteCustomFieldItem(projectIdOrKey: string | number, id: number, itemId: number): Promise<any>;
|
|
271
277
|
/**
|
|
272
278
|
* https://developer.nulab.com/docs/backlog/api/2/get-list-of-shared-files/
|
|
273
279
|
*/
|
|
274
|
-
getSharedFiles(projectIdOrKey: string, path: string, params: Option.Project.GetSharedFilesParams): Promise<any>;
|
|
280
|
+
getSharedFiles(projectIdOrKey: string | number, path: string, params: Option.Project.GetSharedFilesParams): Promise<any>;
|
|
275
281
|
/**
|
|
276
282
|
* https://developer.nulab.com/docs/backlog/api/2/get-file/
|
|
277
283
|
*/
|
|
278
|
-
getSharedFile(projectIdOrKey: string, sharedFileId: number): Promise<Entity.File.FileData>;
|
|
284
|
+
getSharedFile(projectIdOrKey: string | number, sharedFileId: number): Promise<Entity.File.FileData>;
|
|
279
285
|
/**
|
|
280
286
|
* https://developer.nulab.com/docs/backlog/api/2/get-project-disk-usage/
|
|
281
287
|
*/
|
|
282
|
-
getProjectsDiskUsage(projectIdOrKey: string): Promise<any>;
|
|
288
|
+
getProjectsDiskUsage(projectIdOrKey: string | number): Promise<any>;
|
|
283
289
|
/**
|
|
284
290
|
* https://developer.nulab.com/docs/backlog/api/2/get-list-of-webhooks/
|
|
285
291
|
*/
|
|
286
|
-
getWebhooks(projectIdOrKey: string): Promise<any>;
|
|
292
|
+
getWebhooks(projectIdOrKey: string | number): Promise<any>;
|
|
287
293
|
/**
|
|
288
294
|
* https://developer.nulab.com/docs/backlog/api/2/add-webhook/
|
|
289
295
|
*/
|
|
290
|
-
postWebhook(projectIdOrKey: string, params: Option.Project.PostWebhookParams): Promise<any>;
|
|
296
|
+
postWebhook(projectIdOrKey: string | number, params: Option.Project.PostWebhookParams): Promise<any>;
|
|
291
297
|
/**
|
|
292
298
|
* https://developer.nulab.com/docs/backlog/api/2/get-webhook/
|
|
293
299
|
*/
|
|
294
|
-
getWebhook(projectIdOrKey: string, webhookId: string): Promise<any>;
|
|
300
|
+
getWebhook(projectIdOrKey: string | number, webhookId: string): Promise<any>;
|
|
295
301
|
/**
|
|
296
302
|
* https://developer.nulab.com/docs/backlog/api/2/update-webhook/
|
|
297
303
|
*/
|
|
298
|
-
patchWebhook(projectIdOrKey: string, webhookId: string, params: Option.Project.PatchWebhookParams): Promise<any>;
|
|
304
|
+
patchWebhook(projectIdOrKey: string | number, webhookId: string, params: Option.Project.PatchWebhookParams): Promise<any>;
|
|
299
305
|
/**
|
|
300
306
|
* https://developer.nulab.com/docs/backlog/api/2/delete-webhook/
|
|
301
307
|
*/
|
|
302
|
-
deleteWebhook(projectIdOrKey: string, webhookId: string): Promise<any>;
|
|
308
|
+
deleteWebhook(projectIdOrKey: string | number, webhookId: string): Promise<any>;
|
|
303
309
|
/**
|
|
304
310
|
* https://developer.nulab.com/docs/backlog/api/2/get-issue-list/
|
|
305
311
|
*/
|
|
@@ -315,75 +321,75 @@ export default class Backlog extends Request {
|
|
|
315
321
|
/**
|
|
316
322
|
* https://developer.nulab.com/docs/backlog/api/2/update-issue/
|
|
317
323
|
*/
|
|
318
|
-
patchIssue(issueIdOrKey: string, params: Option.Issue.PatchIssueParams): Promise<any>;
|
|
324
|
+
patchIssue(issueIdOrKey: string | number, params: Option.Issue.PatchIssueParams): Promise<any>;
|
|
319
325
|
/**
|
|
320
326
|
* https://developer.nulab.com/docs/backlog/api/2/get-issue/
|
|
321
327
|
*/
|
|
322
|
-
getIssue(issueIdOrKey: string): Promise<any>;
|
|
328
|
+
getIssue(issueIdOrKey: string | number): Promise<any>;
|
|
323
329
|
/**
|
|
324
330
|
* https://developer.nulab.com/docs/backlog/api/2/delete-issue/
|
|
325
331
|
*/
|
|
326
|
-
deleteIssuesCount(issueIdOrKey: string): Promise<any>;
|
|
332
|
+
deleteIssuesCount(issueIdOrKey: string | number): Promise<any>;
|
|
327
333
|
/**
|
|
328
334
|
* https://developer.nulab.com/docs/backlog/api/2/get-comment-list/
|
|
329
335
|
*/
|
|
330
|
-
getIssueComments(issueIdOrKey: string, params: Option.Issue.GetIssueCommentsParams): Promise<any>;
|
|
336
|
+
getIssueComments(issueIdOrKey: string | number, params: Option.Issue.GetIssueCommentsParams): Promise<any>;
|
|
331
337
|
/**
|
|
332
338
|
* https://developer.nulab.com/docs/backlog/api/2/add-comment/
|
|
333
339
|
*/
|
|
334
|
-
postIssueComments(issueIdOrKey: string, params: Option.Issue.PostIssueCommentsParams): Promise<any>;
|
|
340
|
+
postIssueComments(issueIdOrKey: string | number, params: Option.Issue.PostIssueCommentsParams): Promise<any>;
|
|
335
341
|
/**
|
|
336
342
|
* https://developer.nulab.com/docs/backlog/api/2/count-comment/
|
|
337
343
|
*/
|
|
338
|
-
getIssueCommentsCount(issueIdOrKey: string): Promise<any>;
|
|
344
|
+
getIssueCommentsCount(issueIdOrKey: string | number): Promise<any>;
|
|
339
345
|
/**
|
|
340
346
|
* https://developer.nulab.com/docs/backlog/api/2/get-comment/
|
|
341
347
|
*/
|
|
342
|
-
getIssueComment(issueIdOrKey: string, commentId: number): Promise<any>;
|
|
348
|
+
getIssueComment(issueIdOrKey: string | number, commentId: number): Promise<any>;
|
|
343
349
|
/**
|
|
344
350
|
* https://developer.nulab.com/docs/backlog/api/2/delete-comment/
|
|
345
351
|
*/
|
|
346
|
-
deleteIssueComment(issueIdOrKey: string, commentId: number): Promise<any>;
|
|
352
|
+
deleteIssueComment(issueIdOrKey: string | number, commentId: number): Promise<any>;
|
|
347
353
|
/**
|
|
348
354
|
* https://developer.nulab.com/docs/backlog/api/2/update-comment/
|
|
349
355
|
*/
|
|
350
|
-
patchIssueComment(issueIdOrKey: string, commentId: number, params: Option.Issue.PatchIssueCommentParams): Promise<any>;
|
|
356
|
+
patchIssueComment(issueIdOrKey: string | number, commentId: number, params: Option.Issue.PatchIssueCommentParams): Promise<any>;
|
|
351
357
|
/**
|
|
352
358
|
* https://developer.nulab.com/docs/backlog/api/2/get-list-of-comment-notifications/
|
|
353
359
|
*/
|
|
354
|
-
getIssueCommentNotifications(issueIdOrKey: string, commentId: number): Promise<any>;
|
|
360
|
+
getIssueCommentNotifications(issueIdOrKey: string | number, commentId: number): Promise<any>;
|
|
355
361
|
/**
|
|
356
362
|
* https://developer.nulab.com/docs/backlog/api/2/add-comment-notification/
|
|
357
363
|
*/
|
|
358
|
-
postIssueCommentNotifications(issueIdOrKey: string, commentId: number, prams: Option.Issue.IssueCommentNotifications): Promise<any>;
|
|
364
|
+
postIssueCommentNotifications(issueIdOrKey: string | number, commentId: number, prams: Option.Issue.IssueCommentNotifications): Promise<any>;
|
|
359
365
|
/**
|
|
360
366
|
* https://developer.nulab.com/docs/backlog/api/2/get-list-of-issue-attachments/
|
|
361
367
|
*/
|
|
362
|
-
getIssueAttachments(issueIdOrKey: string): Promise<any>;
|
|
368
|
+
getIssueAttachments(issueIdOrKey: string | number): Promise<any>;
|
|
363
369
|
/**
|
|
364
370
|
* https://developer.nulab.com/docs/backlog/api/2/get-issue-attachment/
|
|
365
371
|
*/
|
|
366
|
-
getIssueAttachment(issueIdOrKey: string, attachmentId: number): Promise<Entity.File.FileData>;
|
|
372
|
+
getIssueAttachment(issueIdOrKey: string | number, attachmentId: number): Promise<Entity.File.FileData>;
|
|
367
373
|
/**
|
|
368
374
|
* https://developer.nulab.com/docs/backlog/api/2/delete-issue-attachment/
|
|
369
375
|
*/
|
|
370
|
-
deleteIssueAttachment(issueIdOrKey: string, attachmentId: string): Promise<any>;
|
|
376
|
+
deleteIssueAttachment(issueIdOrKey: string | number, attachmentId: string): Promise<any>;
|
|
371
377
|
/**
|
|
372
378
|
* https://developer.nulab.com/docs/backlog/api/2/get-issue-participant-list/
|
|
373
379
|
*/
|
|
374
|
-
getIssueParticipants(issueIdOrKey: string): Promise<any>;
|
|
380
|
+
getIssueParticipants(issueIdOrKey: string | number): Promise<any>;
|
|
375
381
|
/**
|
|
376
382
|
* https://developer.nulab.com/docs/backlog/api/2/get-list-of-linked-shared-files/
|
|
377
383
|
*/
|
|
378
|
-
getIssueSharedFiles(issueIdOrKey: string): Promise<any>;
|
|
384
|
+
getIssueSharedFiles(issueIdOrKey: string | number): Promise<any>;
|
|
379
385
|
/**
|
|
380
386
|
* https://developer.nulab.com/docs/backlog/api/2/link-shared-files-to-issue/
|
|
381
387
|
*/
|
|
382
|
-
linkIssueSharedFiles(issueIdOrKey: string, params: Option.Issue.LinkIssueSharedFilesParams): Promise<any>;
|
|
388
|
+
linkIssueSharedFiles(issueIdOrKey: string | number, params: Option.Issue.LinkIssueSharedFilesParams): Promise<any>;
|
|
383
389
|
/**
|
|
384
390
|
* https://developer.nulab.com/docs/backlog/api/2/remove-link-to-shared-file-from-issue/
|
|
385
391
|
*/
|
|
386
|
-
unlinkIssueSharedFile(issueIdOrKey: string, id: number): Promise<any>;
|
|
392
|
+
unlinkIssueSharedFile(issueIdOrKey: string | number, id: number): Promise<any>;
|
|
387
393
|
/**
|
|
388
394
|
* https://developer.nulab.com/docs/backlog/api/2/get-wiki-page-list/
|
|
389
395
|
*/
|
|
@@ -391,11 +397,11 @@ export default class Backlog extends Request {
|
|
|
391
397
|
/**
|
|
392
398
|
* https://developer.nulab.com/docs/backlog/api/2/count-wiki-page/
|
|
393
399
|
*/
|
|
394
|
-
getWikisCount(projectIdOrKey: number): Promise<any>;
|
|
400
|
+
getWikisCount(projectIdOrKey: string | number): Promise<any>;
|
|
395
401
|
/**
|
|
396
402
|
* https://developer.nulab.com/docs/backlog/api/2/get-wiki-page-tag-list/
|
|
397
403
|
*/
|
|
398
|
-
getWikisTags(projectIdOrKey: number): Promise<any>;
|
|
404
|
+
getWikisTags(projectIdOrKey: string | number): Promise<any>;
|
|
399
405
|
/**
|
|
400
406
|
* https://developer.nulab.com/docs/backlog/api/2/add-wiki-page/
|
|
401
407
|
*/
|
|
@@ -471,59 +477,59 @@ export default class Backlog extends Request {
|
|
|
471
477
|
/**
|
|
472
478
|
* https://developer.nulab.com/docs/backlog/api/2/get-list-of-git-repositories/
|
|
473
479
|
*/
|
|
474
|
-
getGitRepositories(projectIdOrKey: string): Promise<any>;
|
|
480
|
+
getGitRepositories(projectIdOrKey: string | number): Promise<any>;
|
|
475
481
|
/**
|
|
476
482
|
* https://developer.nulab.com/docs/backlog/api/2/get-git-repository/
|
|
477
483
|
*/
|
|
478
|
-
getGitRepository(projectIdOrKey: string, repoIdOrName: string): Promise<any>;
|
|
484
|
+
getGitRepository(projectIdOrKey: string | number, repoIdOrName: string): Promise<any>;
|
|
479
485
|
/**
|
|
480
486
|
* https://developer.nulab.com/docs/backlog/api/2/get-pull-request-list/
|
|
481
487
|
*/
|
|
482
|
-
getPullRequests(projectIdOrKey: string, repoIdOrName: string, params: Option.PullRequest.GetPullRequestsParams): Promise<any>;
|
|
488
|
+
getPullRequests(projectIdOrKey: string | number, repoIdOrName: string, params: Option.PullRequest.GetPullRequestsParams): Promise<any>;
|
|
483
489
|
/**
|
|
484
490
|
* https://developer.nulab.com/docs/backlog/api/2/get-number-of-pull-requests/
|
|
485
491
|
*/
|
|
486
|
-
getPullRequestsCount(projectIdOrKey: string, repoIdOrName: string, params: Option.PullRequest.GetPullRequestsParams): Promise<any>;
|
|
492
|
+
getPullRequestsCount(projectIdOrKey: string | number, repoIdOrName: string, params: Option.PullRequest.GetPullRequestsParams): Promise<any>;
|
|
487
493
|
/**
|
|
488
494
|
* https://developer.nulab.com/docs/backlog/api/2/add-pull-request/
|
|
489
495
|
*/
|
|
490
|
-
postPullRequest(projectIdOrKey: string, repoIdOrName: string, params: Option.PullRequest.PostPullRequestParams): Promise<any>;
|
|
496
|
+
postPullRequest(projectIdOrKey: string | number, repoIdOrName: string, params: Option.PullRequest.PostPullRequestParams): Promise<any>;
|
|
491
497
|
/**
|
|
492
498
|
* https://developer.nulab.com/docs/backlog/api/2/get-pull-request/
|
|
493
499
|
*/
|
|
494
|
-
getPullRequest(projectIdOrKey: string, repoIdOrName: string, number: number): Promise<any>;
|
|
500
|
+
getPullRequest(projectIdOrKey: string | number, repoIdOrName: string, number: number): Promise<any>;
|
|
495
501
|
/**
|
|
496
502
|
* https://developer.nulab.com/docs/backlog/api/2/update-pull-request/
|
|
497
503
|
*/
|
|
498
|
-
patchPullRequest(projectIdOrKey: string, repoIdOrName: string, number: number, params: Option.PullRequest.PatchPullRequestParams): Promise<any>;
|
|
504
|
+
patchPullRequest(projectIdOrKey: string | number, repoIdOrName: string, number: number, params: Option.PullRequest.PatchPullRequestParams): Promise<any>;
|
|
499
505
|
/**
|
|
500
506
|
* https://developer.nulab.com/docs/backlog/api/2/get-pull-request-comment/
|
|
501
507
|
*/
|
|
502
|
-
getPullRequestComments(projectIdOrKey: string, repoIdOrName: string, number: number, params: Option.PullRequest.GetPullRequestCommentsParams): Promise<any>;
|
|
508
|
+
getPullRequestComments(projectIdOrKey: string | number, repoIdOrName: string, number: number, params: Option.PullRequest.GetPullRequestCommentsParams): Promise<any>;
|
|
503
509
|
/**
|
|
504
510
|
* https://developer.nulab.com/docs/backlog/api/2/add-pull-request-comment/
|
|
505
511
|
*/
|
|
506
|
-
postPullRequestComments(projectIdOrKey: string, repoIdOrName: string, number: number, params: Option.PullRequest.PostPullRequestCommentsParams): Promise<any>;
|
|
512
|
+
postPullRequestComments(projectIdOrKey: string | number, repoIdOrName: string, number: number, params: Option.PullRequest.PostPullRequestCommentsParams): Promise<any>;
|
|
507
513
|
/**
|
|
508
514
|
* https://developer.nulab.com/docs/backlog/api/2/get-number-of-pull-request-comments/
|
|
509
515
|
*/
|
|
510
|
-
getPullRequestCommentsCount(projectIdOrKey: string, repoIdOrName: string, number: number): Promise<any>;
|
|
516
|
+
getPullRequestCommentsCount(projectIdOrKey: string | number, repoIdOrName: string, number: number): Promise<any>;
|
|
511
517
|
/**
|
|
512
518
|
* https://developer.nulab.com/docs/backlog/api/2/update-pull-request-comment-information/
|
|
513
519
|
*/
|
|
514
|
-
patchPullRequestComments(projectIdOrKey: string, repoIdOrName: string, number: number, commentId: number, params: Option.PullRequest.PatchPullRequestCommentsParams): Promise<any>;
|
|
520
|
+
patchPullRequestComments(projectIdOrKey: string | number, repoIdOrName: string, number: number, commentId: number, params: Option.PullRequest.PatchPullRequestCommentsParams): Promise<any>;
|
|
515
521
|
/**
|
|
516
522
|
* https://developer.nulab.com/docs/backlog/api/2/get-list-of-pull-request-attachment/
|
|
517
523
|
*/
|
|
518
|
-
getPullRequestAttachments(projectIdOrKey: string, repoIdOrName: string, number: number): Promise<any>;
|
|
524
|
+
getPullRequestAttachments(projectIdOrKey: string | number, repoIdOrName: string, number: number): Promise<any>;
|
|
519
525
|
/**
|
|
520
526
|
* https://developer.nulab.com/docs/backlog/api/2/download-pull-request-attachment/
|
|
521
527
|
*/
|
|
522
|
-
getPullRequestAttachment(projectIdOrKey: string, repoIdOrName: string, number: number, attachmentId: number): Promise<Entity.File.FileData>;
|
|
528
|
+
getPullRequestAttachment(projectIdOrKey: string | number, repoIdOrName: string, number: number, attachmentId: number): Promise<Entity.File.FileData>;
|
|
523
529
|
/**
|
|
524
530
|
* https://developer.nulab.com/docs/backlog/api/2/delete-pull-request-attachments/
|
|
525
531
|
*/
|
|
526
|
-
deletePullRequestAttachment(projectIdOrKey: string, repoIdOrName: string, number: number, attachmentId: number): Promise<any>;
|
|
532
|
+
deletePullRequestAttachment(projectIdOrKey: string | number, repoIdOrName: string, number: number, attachmentId: number): Promise<any>;
|
|
527
533
|
/**
|
|
528
534
|
* https://developer.nulab.com/docs/backlog/api/2/get-watching-list
|
|
529
535
|
*/
|
|
@@ -539,7 +545,7 @@ export default class Backlog extends Request {
|
|
|
539
545
|
/**
|
|
540
546
|
* https://developer.nulab.com/docs/backlog/api/2/add-watching
|
|
541
547
|
*/
|
|
542
|
-
postWatchingListItem(params: any): Promise<
|
|
548
|
+
postWatchingListItem(params: any): Promise<any>;
|
|
543
549
|
/**
|
|
544
550
|
* https://developer.nulab.com/docs/backlog/api/2/update-watching
|
|
545
551
|
*/
|
|
@@ -547,25 +553,29 @@ export default class Backlog extends Request {
|
|
|
547
553
|
/**
|
|
548
554
|
* https://developer.nulab.com/docs/backlog/api/2/delete-watching
|
|
549
555
|
*/
|
|
550
|
-
deletehWatchingListItem(watchId: number): Promise<
|
|
556
|
+
deletehWatchingListItem(watchId: number): Promise<any>;
|
|
551
557
|
/**
|
|
552
558
|
* https://developer.nulab.com/docs/backlog/api/2/mark-watching-as-read
|
|
553
559
|
*/
|
|
554
560
|
resetWatchingListItemAsRead(watchId: number): Promise<undefined>;
|
|
555
561
|
/**
|
|
556
562
|
* https://developer.nulab.com/docs/backlog/api/2/get-project-group-list
|
|
563
|
+
* @deprecated
|
|
557
564
|
*/
|
|
558
|
-
getProjectGroupList(projectIdOrKey: string | number): Promise<
|
|
565
|
+
getProjectGroupList(projectIdOrKey: string | number): Promise<any>;
|
|
559
566
|
/**
|
|
560
567
|
* https://developer.nulab.com/docs/backlog/api/2/add-project-group
|
|
568
|
+
* @deprecated
|
|
561
569
|
*/
|
|
562
|
-
postProjectGroup(projectIdOrKey: string | number, params: any): Promise<
|
|
570
|
+
postProjectGroup(projectIdOrKey: string | number, params: any): Promise<any>;
|
|
563
571
|
/**
|
|
564
572
|
* https://developer.nulab.com/docs/backlog/api/2/delete-project-group
|
|
573
|
+
* @deprecated
|
|
565
574
|
*/
|
|
566
|
-
deleteProjectGroup(projectIdOrKey: string | number): Promise<
|
|
575
|
+
deleteProjectGroup(projectIdOrKey: string | number): Promise<any>;
|
|
567
576
|
/**
|
|
568
577
|
* https://developer.nulab.com/docs/backlog/api/2/get-group-icon
|
|
578
|
+
* @deprecated
|
|
569
579
|
*/
|
|
570
580
|
getGroupIcon(groupId: string): Promise<any>;
|
|
571
581
|
/**
|
|
@@ -599,15 +609,19 @@ export default class Backlog extends Request {
|
|
|
599
609
|
/**
|
|
600
610
|
* https://developer.nulab.com/docs/backlog/api/2/get-project-team-list/
|
|
601
611
|
*/
|
|
602
|
-
getProjectTeams(projectIdOrKey: string): Promise<any>;
|
|
612
|
+
getProjectTeams(projectIdOrKey: string | number): Promise<any>;
|
|
603
613
|
/**
|
|
604
614
|
* https://developer.nulab.com/docs/backlog/api/2/add-project-team/
|
|
605
615
|
*/
|
|
606
|
-
postProjectTeam(projectIdOrKey: string, teamId: number): Promise<any>;
|
|
616
|
+
postProjectTeam(projectIdOrKey: string | number, teamId: number): Promise<any>;
|
|
607
617
|
/**
|
|
608
618
|
* https://developer.nulab.com/docs/backlog/api/2/delete-project-team/
|
|
609
619
|
*/
|
|
610
|
-
deleteProjectTeam(projectIdOrKey: string, teamId: number): Promise<any>;
|
|
620
|
+
deleteProjectTeam(projectIdOrKey: string | number, teamId: number): Promise<any>;
|
|
621
|
+
/**
|
|
622
|
+
* https://developer.nulab.com/docs/backlog/api/2/get-rate-limit/
|
|
623
|
+
*/
|
|
624
|
+
getRateLimit(): Promise<any>;
|
|
611
625
|
private download;
|
|
612
626
|
private upload;
|
|
613
627
|
private parseFileData;
|
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare class BacklogError extends
|
|
1
|
+
export declare class BacklogError extends Error {
|
|
2
2
|
private _name;
|
|
3
3
|
private _url;
|
|
4
4
|
private _status;
|
|
@@ -7,13 +7,13 @@ export declare class BacklogError extends global.Error {
|
|
|
7
7
|
constructor(name: BacklogErrorNameType, response: Response, body?: {
|
|
8
8
|
errors: BacklogErrorMessage[];
|
|
9
9
|
});
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
get name(): BacklogErrorNameType;
|
|
11
|
+
get url(): string;
|
|
12
|
+
get status(): number;
|
|
13
|
+
get body(): {
|
|
14
14
|
errors: BacklogErrorMessage[];
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
get response(): Response;
|
|
17
17
|
}
|
|
18
18
|
export declare class BacklogApiError extends BacklogError {
|
|
19
19
|
constructor(response: Response, body?: {
|
|
@@ -35,4 +35,3 @@ export interface BacklogErrorMessage {
|
|
|
35
35
|
moreInfo: string;
|
|
36
36
|
}
|
|
37
37
|
export declare type BacklogErrorNameType = 'BacklogApiError' | 'BacklogAuthError' | 'UnexpectedError';
|
|
38
|
-
export declare namespace global { }
|
|
File without changes
|
|
File without changes
|
|
@@ -351,7 +351,7 @@ export declare namespace Issue {
|
|
|
351
351
|
dueDateUntil?: string;
|
|
352
352
|
id?: number[];
|
|
353
353
|
parentIssueId?: number[];
|
|
354
|
-
keyword
|
|
354
|
+
keyword?: string;
|
|
355
355
|
[customField_: string]: any;
|
|
356
356
|
}
|
|
357
357
|
enum ParentChildType {
|
|
@@ -426,7 +426,7 @@ export declare namespace PullRequest {
|
|
|
426
426
|
}
|
|
427
427
|
export declare namespace Wiki {
|
|
428
428
|
interface GetWikiParams {
|
|
429
|
-
projectIdOrKey: number;
|
|
429
|
+
projectIdOrKey: string | number;
|
|
430
430
|
keyword?: string;
|
|
431
431
|
}
|
|
432
432
|
interface PostWikiParams {
|
|
@@ -19,8 +19,8 @@ export default class Request {
|
|
|
19
19
|
checkStatus(response: Response): Promise<Response>;
|
|
20
20
|
parseJSON<T>(response: Response): Promise<T>;
|
|
21
21
|
private toQueryString;
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
get webAppBaseURL(): string;
|
|
23
|
+
get restBaseURL(): string;
|
|
24
24
|
}
|
|
25
25
|
export declare type Params = {
|
|
26
26
|
[index: string]: number | string | number[] | string[];
|
package/package.json
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "backlog-js",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.5",
|
|
4
4
|
"description": "Backlog API v2 client for browser and node",
|
|
5
|
-
"main": "dist/backlog.js",
|
|
5
|
+
"main": "dist/backlog.min.js",
|
|
6
|
+
"types": "dist/types/index.d.ts",
|
|
6
7
|
"repository": {
|
|
7
8
|
"type": "git",
|
|
8
9
|
"url": "git://github.com/nulab/backlog-js.git"
|
|
9
10
|
},
|
|
10
11
|
"scripts": {
|
|
11
|
-
"test": "
|
|
12
|
-
"test-cov": "
|
|
12
|
+
"test": "mocha --timeout 10000 --require espower-typescript/guess test/test*.ts",
|
|
13
|
+
"test-cov": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec dist/test/**/test*.js",
|
|
13
14
|
"coveralls": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
|
|
14
|
-
"
|
|
15
|
-
"build
|
|
16
|
-
"build-
|
|
17
|
-
"build-
|
|
18
|
-
"build-
|
|
15
|
+
"clean": "/bin/rm -rf dist",
|
|
16
|
+
"build": "npm run clean && npm run build-tsc && npm run copy-dts && npm run build-dist && npm run build-minify",
|
|
17
|
+
"build-dist": "browserify --standalone Backlog dist/src/index.js -o dist/backlog.js",
|
|
18
|
+
"build-minify": "uglifyjs dist/backlog.js -o dist/backlog.min.js",
|
|
19
|
+
"build-tsc": "tsc --declaration",
|
|
20
|
+
"copy-dts": "mkdir -p dist/types && cp -r dist/src/*.d.ts dist/types",
|
|
19
21
|
"changelog": "ghch -w -F markdown -N ${VERSION}"
|
|
20
22
|
},
|
|
21
23
|
"author": "vvatanabe",
|
|
@@ -25,27 +27,27 @@
|
|
|
25
27
|
},
|
|
26
28
|
"devDependencies": {
|
|
27
29
|
"@types/dotenv": "^6.1.1",
|
|
28
|
-
"@types/empower": "^1.2.
|
|
30
|
+
"@types/empower": "^1.2.31",
|
|
29
31
|
"@types/isomorphic-fetch": "0.0.35",
|
|
30
32
|
"@types/mocha": "^8.2.2",
|
|
31
33
|
"@types/nock": "^10.0.3",
|
|
32
|
-
"@types/node": "^
|
|
34
|
+
"@types/node": "^15.6.1",
|
|
33
35
|
"@types/power-assert": "^1.5.3",
|
|
34
36
|
"@types/power-assert-formatter": "^1.4.29",
|
|
35
37
|
"@types/qs": "^6.9.6",
|
|
36
38
|
"browserify": "^17.0.0",
|
|
37
39
|
"coveralls": "^3.1.0",
|
|
38
|
-
"dotenv": "^
|
|
40
|
+
"dotenv": "^10.0.0",
|
|
39
41
|
"es6-promise": "^4.2.8",
|
|
40
42
|
"espower-typescript": "^10.0.0",
|
|
41
43
|
"isomorphic-fetch": "^3.0.0",
|
|
42
44
|
"isomorphic-form-data": "^2.0.0",
|
|
43
45
|
"istanbul": "^0.4.5",
|
|
44
|
-
"mocha": "^8.
|
|
46
|
+
"mocha": "^8.4.0",
|
|
45
47
|
"nock": "^13.0.11",
|
|
46
48
|
"power-assert": "^1.6.1",
|
|
47
|
-
"typescript": "^4.2
|
|
48
|
-
"uglify-js": "^3.13.
|
|
49
|
+
"typescript": "^4.3.2",
|
|
50
|
+
"uglify-js": "^3.13.8"
|
|
49
51
|
},
|
|
50
52
|
"keywords": [
|
|
51
53
|
"nulab",
|