5pm 0.1.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.
- checksums.yaml +7 -0
- data/CHANGELOG.md +66 -0
- data/LICENSE +21 -0
- data/README.md +209 -0
- data/SECURITY.md +15 -0
- data/docs/api-support.md +71 -0
- data/docs/cached-validation.md +58 -0
- data/docs/implementation-guides.md +12 -0
- data/docs/implementation-status.md +45 -0
- data/docs/live-validation-report.json +177 -0
- data/docs/live-validation.md +109 -0
- data/docs/mcp-plan.md +19 -0
- data/docs/release-preparation/0.1.0-manual-artifacts.json +112 -0
- data/docs/release-preparation/limited-first-release-decision.md +28 -0
- data/docs/release-preparation/manual-first-publication.md +192 -0
- data/docs/releasing.md +154 -0
- data/examples/read_only.rb +12 -0
- data/lib/five_pm/client.rb +145 -0
- data/lib/five_pm/download.rb +16 -0
- data/lib/five_pm/errors.rb +73 -0
- data/lib/five_pm/operations.json +354 -0
- data/lib/five_pm/pagination.rb +51 -0
- data/lib/five_pm/request.rb +80 -0
- data/lib/five_pm/resource.rb +41 -0
- data/lib/five_pm/response.rb +212 -0
- data/lib/five_pm/retry_policy.rb +48 -0
- data/lib/five_pm/services.rb +40 -0
- data/lib/five_pm/transport.rb +147 -0
- data/lib/five_pm/types.json +498 -0
- data/lib/five_pm/version.rb +3 -0
- data/lib/five_pm.rb +9 -0
- data/sig/five_pm.rbs +152 -0
- data/sig/models.rbs +223 -0
- metadata +113 -0
|
@@ -0,0 +1,498 @@
|
|
|
1
|
+
{
|
|
2
|
+
"AuthToken": {
|
|
3
|
+
"sessionId": {
|
|
4
|
+
"type": "string",
|
|
5
|
+
"repeated": false
|
|
6
|
+
}
|
|
7
|
+
},
|
|
8
|
+
"User": {
|
|
9
|
+
"id": {
|
|
10
|
+
"type": "integer",
|
|
11
|
+
"repeated": false
|
|
12
|
+
},
|
|
13
|
+
"password": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"repeated": false
|
|
16
|
+
},
|
|
17
|
+
"email": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"repeated": false
|
|
20
|
+
},
|
|
21
|
+
"firstName": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"repeated": false
|
|
24
|
+
},
|
|
25
|
+
"lastName": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"repeated": false
|
|
28
|
+
},
|
|
29
|
+
"title": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"repeated": false
|
|
32
|
+
},
|
|
33
|
+
"address": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"repeated": false
|
|
36
|
+
},
|
|
37
|
+
"workPhone": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"repeated": false
|
|
40
|
+
},
|
|
41
|
+
"homePhone": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"repeated": false
|
|
44
|
+
},
|
|
45
|
+
"cellPhone": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"repeated": false
|
|
48
|
+
},
|
|
49
|
+
"timezone": {
|
|
50
|
+
"type": "integer",
|
|
51
|
+
"repeated": false
|
|
52
|
+
},
|
|
53
|
+
"company": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"repeated": false
|
|
56
|
+
},
|
|
57
|
+
"comment": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"repeated": false
|
|
60
|
+
},
|
|
61
|
+
"securityLevel": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"repeated": false
|
|
64
|
+
},
|
|
65
|
+
"canViewProfiles": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"repeated": false
|
|
68
|
+
},
|
|
69
|
+
"avatar": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"repeated": false
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"UserList": {
|
|
75
|
+
"items": {
|
|
76
|
+
"type": "User",
|
|
77
|
+
"repeated": true
|
|
78
|
+
},
|
|
79
|
+
"count": {
|
|
80
|
+
"type": "integer",
|
|
81
|
+
"repeated": false
|
|
82
|
+
},
|
|
83
|
+
"total": {
|
|
84
|
+
"type": "integer",
|
|
85
|
+
"repeated": false
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"ProjectsGroup": {
|
|
89
|
+
"id": {
|
|
90
|
+
"type": "integer",
|
|
91
|
+
"repeated": false
|
|
92
|
+
},
|
|
93
|
+
"name": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"repeated": false
|
|
96
|
+
},
|
|
97
|
+
"info": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"repeated": false
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"ProjectsGroupList": {
|
|
103
|
+
"items": {
|
|
104
|
+
"type": "ProjectsGroup",
|
|
105
|
+
"repeated": true
|
|
106
|
+
},
|
|
107
|
+
"count": {
|
|
108
|
+
"type": "integer",
|
|
109
|
+
"repeated": false
|
|
110
|
+
},
|
|
111
|
+
"total": {
|
|
112
|
+
"type": "integer",
|
|
113
|
+
"repeated": false
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"Project": {
|
|
117
|
+
"id": {
|
|
118
|
+
"type": "integer",
|
|
119
|
+
"repeated": false
|
|
120
|
+
},
|
|
121
|
+
"name": {
|
|
122
|
+
"type": "string",
|
|
123
|
+
"repeated": false
|
|
124
|
+
},
|
|
125
|
+
"description": {
|
|
126
|
+
"type": "string",
|
|
127
|
+
"repeated": false
|
|
128
|
+
},
|
|
129
|
+
"tags": {
|
|
130
|
+
"type": "string",
|
|
131
|
+
"repeated": false
|
|
132
|
+
},
|
|
133
|
+
"clientId": {
|
|
134
|
+
"type": "integer",
|
|
135
|
+
"repeated": false
|
|
136
|
+
},
|
|
137
|
+
"ownerId": {
|
|
138
|
+
"type": "integer",
|
|
139
|
+
"repeated": false
|
|
140
|
+
},
|
|
141
|
+
"groupId": {
|
|
142
|
+
"type": "integer",
|
|
143
|
+
"repeated": false
|
|
144
|
+
},
|
|
145
|
+
"startDate": {
|
|
146
|
+
"type": "dateTime",
|
|
147
|
+
"repeated": false
|
|
148
|
+
},
|
|
149
|
+
"endDate": {
|
|
150
|
+
"type": "dateTime",
|
|
151
|
+
"repeated": false
|
|
152
|
+
},
|
|
153
|
+
"priority": {
|
|
154
|
+
"type": "integer",
|
|
155
|
+
"repeated": false
|
|
156
|
+
},
|
|
157
|
+
"status": {
|
|
158
|
+
"type": "integer",
|
|
159
|
+
"repeated": false
|
|
160
|
+
},
|
|
161
|
+
"createdAt": {
|
|
162
|
+
"type": "dateTime",
|
|
163
|
+
"repeated": false
|
|
164
|
+
},
|
|
165
|
+
"updatedAt": {
|
|
166
|
+
"type": "dateTime",
|
|
167
|
+
"repeated": false
|
|
168
|
+
},
|
|
169
|
+
"notifyProjectTeam": {
|
|
170
|
+
"type": "boolean",
|
|
171
|
+
"repeated": false
|
|
172
|
+
},
|
|
173
|
+
"notifyClient": {
|
|
174
|
+
"type": "boolean",
|
|
175
|
+
"repeated": false
|
|
176
|
+
},
|
|
177
|
+
"notifyUsers": {
|
|
178
|
+
"type": "UserList",
|
|
179
|
+
"repeated": false
|
|
180
|
+
},
|
|
181
|
+
"hidden": {
|
|
182
|
+
"type": "boolean",
|
|
183
|
+
"repeated": false
|
|
184
|
+
},
|
|
185
|
+
"flag": {
|
|
186
|
+
"type": "integer",
|
|
187
|
+
"repeated": false
|
|
188
|
+
},
|
|
189
|
+
"team": {
|
|
190
|
+
"type": "UserList",
|
|
191
|
+
"repeated": false
|
|
192
|
+
},
|
|
193
|
+
"can_edit": {
|
|
194
|
+
"type": "boolean",
|
|
195
|
+
"repeated": false
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
"ProjectList": {
|
|
199
|
+
"items": {
|
|
200
|
+
"type": "Project",
|
|
201
|
+
"repeated": true
|
|
202
|
+
},
|
|
203
|
+
"count": {
|
|
204
|
+
"type": "integer",
|
|
205
|
+
"repeated": false
|
|
206
|
+
},
|
|
207
|
+
"total": {
|
|
208
|
+
"type": "integer",
|
|
209
|
+
"repeated": false
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
"Task": {
|
|
213
|
+
"id": {
|
|
214
|
+
"type": "integer",
|
|
215
|
+
"repeated": false
|
|
216
|
+
},
|
|
217
|
+
"parentId": {
|
|
218
|
+
"type": "integer",
|
|
219
|
+
"repeated": false
|
|
220
|
+
},
|
|
221
|
+
"parentName": {
|
|
222
|
+
"type": "string",
|
|
223
|
+
"repeated": false
|
|
224
|
+
},
|
|
225
|
+
"name": {
|
|
226
|
+
"type": "string",
|
|
227
|
+
"repeated": false
|
|
228
|
+
},
|
|
229
|
+
"description": {
|
|
230
|
+
"type": "string",
|
|
231
|
+
"repeated": false
|
|
232
|
+
},
|
|
233
|
+
"tags": {
|
|
234
|
+
"type": "string",
|
|
235
|
+
"repeated": false
|
|
236
|
+
},
|
|
237
|
+
"projectId": {
|
|
238
|
+
"type": "integer",
|
|
239
|
+
"repeated": false
|
|
240
|
+
},
|
|
241
|
+
"ownerId": {
|
|
242
|
+
"type": "integer",
|
|
243
|
+
"repeated": false
|
|
244
|
+
},
|
|
245
|
+
"groupId": {
|
|
246
|
+
"type": "integer",
|
|
247
|
+
"repeated": false
|
|
248
|
+
},
|
|
249
|
+
"startDate": {
|
|
250
|
+
"type": "dateTime",
|
|
251
|
+
"repeated": false
|
|
252
|
+
},
|
|
253
|
+
"endDate": {
|
|
254
|
+
"type": "dateTime",
|
|
255
|
+
"repeated": false
|
|
256
|
+
},
|
|
257
|
+
"priority": {
|
|
258
|
+
"type": "integer",
|
|
259
|
+
"repeated": false
|
|
260
|
+
},
|
|
261
|
+
"progress": {
|
|
262
|
+
"type": "float",
|
|
263
|
+
"repeated": false
|
|
264
|
+
},
|
|
265
|
+
"status": {
|
|
266
|
+
"type": "integer",
|
|
267
|
+
"repeated": false
|
|
268
|
+
},
|
|
269
|
+
"createdAt": {
|
|
270
|
+
"type": "dateTime",
|
|
271
|
+
"repeated": false
|
|
272
|
+
},
|
|
273
|
+
"updatedAt": {
|
|
274
|
+
"type": "dateTime",
|
|
275
|
+
"repeated": false
|
|
276
|
+
},
|
|
277
|
+
"notifyProjectTeam": {
|
|
278
|
+
"type": "boolean",
|
|
279
|
+
"repeated": false
|
|
280
|
+
},
|
|
281
|
+
"notifyTaskTeam": {
|
|
282
|
+
"type": "boolean",
|
|
283
|
+
"repeated": false
|
|
284
|
+
},
|
|
285
|
+
"notifyClient": {
|
|
286
|
+
"type": "boolean",
|
|
287
|
+
"repeated": false
|
|
288
|
+
},
|
|
289
|
+
"notifyUsers": {
|
|
290
|
+
"type": "UserList",
|
|
291
|
+
"repeated": false
|
|
292
|
+
},
|
|
293
|
+
"hidden": {
|
|
294
|
+
"type": "boolean",
|
|
295
|
+
"repeated": false
|
|
296
|
+
},
|
|
297
|
+
"flag": {
|
|
298
|
+
"type": "integer",
|
|
299
|
+
"repeated": false
|
|
300
|
+
},
|
|
301
|
+
"hoursDone": {
|
|
302
|
+
"type": "float",
|
|
303
|
+
"repeated": false
|
|
304
|
+
},
|
|
305
|
+
"estimatedTime": {
|
|
306
|
+
"type": "float",
|
|
307
|
+
"repeated": false
|
|
308
|
+
},
|
|
309
|
+
"team": {
|
|
310
|
+
"type": "UserList",
|
|
311
|
+
"repeated": false
|
|
312
|
+
},
|
|
313
|
+
"can_edit": {
|
|
314
|
+
"type": "boolean",
|
|
315
|
+
"repeated": false
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
"TaskList": {
|
|
319
|
+
"items": {
|
|
320
|
+
"type": "Task",
|
|
321
|
+
"repeated": true
|
|
322
|
+
},
|
|
323
|
+
"count": {
|
|
324
|
+
"type": "integer",
|
|
325
|
+
"repeated": false
|
|
326
|
+
},
|
|
327
|
+
"total": {
|
|
328
|
+
"type": "integer",
|
|
329
|
+
"repeated": false
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
"Activity": {
|
|
333
|
+
"id": {
|
|
334
|
+
"type": "integer",
|
|
335
|
+
"repeated": false
|
|
336
|
+
},
|
|
337
|
+
"taskId": {
|
|
338
|
+
"type": "integer",
|
|
339
|
+
"repeated": false
|
|
340
|
+
},
|
|
341
|
+
"taskName": {
|
|
342
|
+
"type": "string",
|
|
343
|
+
"repeated": false
|
|
344
|
+
},
|
|
345
|
+
"projectId": {
|
|
346
|
+
"type": "integer",
|
|
347
|
+
"repeated": false
|
|
348
|
+
},
|
|
349
|
+
"projectName": {
|
|
350
|
+
"type": "string",
|
|
351
|
+
"repeated": false
|
|
352
|
+
},
|
|
353
|
+
"type": {
|
|
354
|
+
"type": "string",
|
|
355
|
+
"repeated": false
|
|
356
|
+
},
|
|
357
|
+
"text": {
|
|
358
|
+
"type": "string",
|
|
359
|
+
"repeated": false
|
|
360
|
+
},
|
|
361
|
+
"ownerId": {
|
|
362
|
+
"type": "integer",
|
|
363
|
+
"repeated": false
|
|
364
|
+
},
|
|
365
|
+
"progress": {
|
|
366
|
+
"type": "integer",
|
|
367
|
+
"repeated": false
|
|
368
|
+
},
|
|
369
|
+
"hoursDone": {
|
|
370
|
+
"type": "float",
|
|
371
|
+
"repeated": false
|
|
372
|
+
},
|
|
373
|
+
"createdAt": {
|
|
374
|
+
"type": "dateTime",
|
|
375
|
+
"repeated": false
|
|
376
|
+
},
|
|
377
|
+
"notifyProjectTeam": {
|
|
378
|
+
"type": "boolean",
|
|
379
|
+
"repeated": false
|
|
380
|
+
},
|
|
381
|
+
"notifyTaskTeam": {
|
|
382
|
+
"type": "boolean",
|
|
383
|
+
"repeated": false
|
|
384
|
+
},
|
|
385
|
+
"notifyClient": {
|
|
386
|
+
"type": "boolean",
|
|
387
|
+
"repeated": false
|
|
388
|
+
},
|
|
389
|
+
"notifyUsers": {
|
|
390
|
+
"type": "UserList",
|
|
391
|
+
"repeated": false
|
|
392
|
+
},
|
|
393
|
+
"hideFromClients": {
|
|
394
|
+
"type": "boolean",
|
|
395
|
+
"repeated": false
|
|
396
|
+
},
|
|
397
|
+
"date": {
|
|
398
|
+
"type": "dateTime",
|
|
399
|
+
"repeated": false
|
|
400
|
+
},
|
|
401
|
+
"files": {
|
|
402
|
+
"type": "FileList",
|
|
403
|
+
"repeated": false
|
|
404
|
+
}
|
|
405
|
+
},
|
|
406
|
+
"ActivityList": {
|
|
407
|
+
"items": {
|
|
408
|
+
"type": "Activity",
|
|
409
|
+
"repeated": true
|
|
410
|
+
},
|
|
411
|
+
"count": {
|
|
412
|
+
"type": "integer",
|
|
413
|
+
"repeated": false
|
|
414
|
+
},
|
|
415
|
+
"total": {
|
|
416
|
+
"type": "integer",
|
|
417
|
+
"repeated": false
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
"ImageInfo": {
|
|
421
|
+
"width": {
|
|
422
|
+
"type": "integer",
|
|
423
|
+
"repeated": false
|
|
424
|
+
},
|
|
425
|
+
"height": {
|
|
426
|
+
"type": "integer",
|
|
427
|
+
"repeated": false
|
|
428
|
+
}
|
|
429
|
+
},
|
|
430
|
+
"File": {
|
|
431
|
+
"id": {
|
|
432
|
+
"type": "integer",
|
|
433
|
+
"repeated": false
|
|
434
|
+
},
|
|
435
|
+
"activityId": {
|
|
436
|
+
"type": "integer",
|
|
437
|
+
"repeated": false
|
|
438
|
+
},
|
|
439
|
+
"activityType": {
|
|
440
|
+
"type": "string",
|
|
441
|
+
"repeated": false
|
|
442
|
+
},
|
|
443
|
+
"name": {
|
|
444
|
+
"type": "string",
|
|
445
|
+
"repeated": false
|
|
446
|
+
},
|
|
447
|
+
"url": {
|
|
448
|
+
"type": "string",
|
|
449
|
+
"repeated": false
|
|
450
|
+
},
|
|
451
|
+
"type": {
|
|
452
|
+
"type": "string",
|
|
453
|
+
"repeated": false
|
|
454
|
+
},
|
|
455
|
+
"size": {
|
|
456
|
+
"type": "integer",
|
|
457
|
+
"repeated": false
|
|
458
|
+
},
|
|
459
|
+
"content": {
|
|
460
|
+
"type": "string",
|
|
461
|
+
"repeated": false
|
|
462
|
+
},
|
|
463
|
+
"createdAt": {
|
|
464
|
+
"type": "dateTime",
|
|
465
|
+
"repeated": false
|
|
466
|
+
},
|
|
467
|
+
"can_edit": {
|
|
468
|
+
"type": "boolean",
|
|
469
|
+
"repeated": false
|
|
470
|
+
},
|
|
471
|
+
"can_thumb": {
|
|
472
|
+
"type": "boolean",
|
|
473
|
+
"repeated": false
|
|
474
|
+
},
|
|
475
|
+
"url_thumb": {
|
|
476
|
+
"type": "string",
|
|
477
|
+
"repeated": false
|
|
478
|
+
},
|
|
479
|
+
"image_info": {
|
|
480
|
+
"type": "ImageInfo",
|
|
481
|
+
"repeated": false
|
|
482
|
+
}
|
|
483
|
+
},
|
|
484
|
+
"FileList": {
|
|
485
|
+
"items": {
|
|
486
|
+
"type": "File",
|
|
487
|
+
"repeated": true
|
|
488
|
+
},
|
|
489
|
+
"count": {
|
|
490
|
+
"type": "integer",
|
|
491
|
+
"repeated": false
|
|
492
|
+
},
|
|
493
|
+
"total": {
|
|
494
|
+
"type": "integer",
|
|
495
|
+
"repeated": false
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
}
|
data/lib/five_pm.rb
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
require_relative "five_pm/version"
|
|
2
|
+
require_relative "five_pm/errors"
|
|
3
|
+
require_relative "five_pm/download"
|
|
4
|
+
require_relative "five_pm/transport"
|
|
5
|
+
require_relative "five_pm/response"
|
|
6
|
+
require_relative "five_pm/request"
|
|
7
|
+
require_relative "five_pm/retry_policy"
|
|
8
|
+
require_relative "five_pm/pagination"
|
|
9
|
+
require_relative "five_pm/client"
|
data/sig/five_pm.rbs
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
module FivePM
|
|
2
|
+
VERSION: String
|
|
3
|
+
OPERATIONS: Hash[String, Hash[String, Hash[String, Hash[String, String]]]]
|
|
4
|
+
SERVICE_NAMES: Hash[Symbol, String]
|
|
5
|
+
|
|
6
|
+
type json = nil | bool | Integer | Float | String | Array[json] | Hash[String, json]
|
|
7
|
+
type json_object = Hash[String, json]
|
|
8
|
+
type input = nil | bool | Integer | Float | String | Array[input] | Hash[String | Symbol, input]
|
|
9
|
+
type parameters = Hash[String | Symbol, input]
|
|
10
|
+
type attributes = parameters | Models::Record
|
|
11
|
+
type identifier = Integer | String
|
|
12
|
+
type contract = Hash[String, Hash[String, String]]
|
|
13
|
+
type fields = Hash[String, Hash[String, String | bool]]
|
|
14
|
+
type result = json | Response
|
|
15
|
+
type reader_value = json | Models::Record | Array[Models::Record]
|
|
16
|
+
|
|
17
|
+
interface _Transport
|
|
18
|
+
def post: (String service, String operation, parameters) -> json
|
|
19
|
+
def download_file: (parameters) -> Download
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
class Client
|
|
23
|
+
SESSION_TTL: Integer
|
|
24
|
+
def initialize: (host: String, login: String, password: String, ?open_timeout: Numeric,
|
|
25
|
+
?read_timeout: Numeric, ?write_timeout: Numeric, ?response_mode: :raw | :typed,
|
|
26
|
+
?read_retries: Integer, ?max_retry_delay: Numeric, ?max_response_bytes: Integer,
|
|
27
|
+
?transport: _Transport?, ?clock: ^() -> Numeric) -> void
|
|
28
|
+
def authentication: () -> Authentication
|
|
29
|
+
def projects: () -> Resource
|
|
30
|
+
def project_groups: () -> Resource
|
|
31
|
+
def tasks: () -> Resource
|
|
32
|
+
def activity: () -> Activity
|
|
33
|
+
def users: () -> Users
|
|
34
|
+
def call: (String | Symbol service, String | Symbol operation, **input) -> (result | Download)
|
|
35
|
+
def sign_in: () -> self
|
|
36
|
+
def sign_out: () -> (result | false)
|
|
37
|
+
def download_file: (identifier) -> Download
|
|
38
|
+
def marshal_dump: () -> bot
|
|
39
|
+
def inspect: () -> String
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
class Service
|
|
43
|
+
def initialize: (Client, String) -> void
|
|
44
|
+
def call: (String | Symbol operation, **input) -> (result | Download)
|
|
45
|
+
def inspect: () -> String
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
module Pagination
|
|
49
|
+
def each_page: (?filter: parameters?, ?offset: Integer, ?count: Integer, ?max_pages: Integer, **input) -> Enumerator[result, self]
|
|
50
|
+
| (?filter: parameters?, ?offset: Integer, ?count: Integer, ?max_pages: Integer, **input) { (result) -> void } -> self
|
|
51
|
+
def each_item: (**input) -> Enumerator[json | Models::Record, self]
|
|
52
|
+
| (**input) { (json | Models::Record) -> void } -> self
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
class Resource < Service
|
|
56
|
+
include Pagination
|
|
57
|
+
OBJECT_PARAMETERS: Hash[String, String]
|
|
58
|
+
def create: (attributes) -> result
|
|
59
|
+
def update: (attributes) -> result
|
|
60
|
+
def get: (identifier) -> result
|
|
61
|
+
def delete: (identifier) -> result
|
|
62
|
+
def list: (?filter: parameters?, ?offset: Integer?, ?count: Integer?, **input) -> result
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
class Authentication < Service
|
|
66
|
+
def authorized_user: () -> result
|
|
67
|
+
def ssl?: () -> result
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
class Users < Resource
|
|
71
|
+
def find_by_email: (String) -> result
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
class Activity < Resource
|
|
75
|
+
def files: (?filter: parameters?, ?offset: Integer?, ?count: Integer?) -> result
|
|
76
|
+
def attach_files: (activity_id: identifier, files: parameters | Models::FileList) -> result
|
|
77
|
+
def delete_file: (identifier) -> result
|
|
78
|
+
def download_file: (identifier) -> Download
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
class Download
|
|
82
|
+
attr_reader bytes: String
|
|
83
|
+
attr_reader content_type: String?
|
|
84
|
+
def initialize: (bytes: String, content_type: String?) -> void
|
|
85
|
+
def inspect: () -> String
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
class Transport
|
|
89
|
+
def initialize: (host: String, ?open_timeout: Numeric, ?read_timeout: Numeric,
|
|
90
|
+
?write_timeout: Numeric, ?max_response_bytes: Integer) -> void
|
|
91
|
+
def post: (String service, String operation, parameters) -> json
|
|
92
|
+
def download_file: (parameters) -> Download
|
|
93
|
+
def inspect: () -> String
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
class RetryPolicy
|
|
97
|
+
READS: Hash[String, Array[String]]
|
|
98
|
+
RETRY_STATUSES: Array[Integer]
|
|
99
|
+
def initialize: (?max_retries: Integer, ?max_delay: Numeric,
|
|
100
|
+
?sleeper: ^(Numeric) -> untyped, ?random: ^() -> Numeric) -> void
|
|
101
|
+
def call: [A] (String service, String operation) { () -> A } -> A
|
|
102
|
+
def inspect: () -> String
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
module Request
|
|
106
|
+
def self.validate!: (input, ?Integer depth) -> void
|
|
107
|
+
def self.operation!: (String service, String operation, parameters) -> void
|
|
108
|
+
def self.identifier!: (identifier) -> nil
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
module Envelope
|
|
112
|
+
def self.parts: (json, contract) -> json_object
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
module APIResult
|
|
116
|
+
def self.check!: [A] (A) -> A
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
class Error < StandardError
|
|
120
|
+
end
|
|
121
|
+
class ConfigurationError < Error
|
|
122
|
+
end
|
|
123
|
+
class TransportError < Error
|
|
124
|
+
end
|
|
125
|
+
class ProtocolError < Error
|
|
126
|
+
end
|
|
127
|
+
class AuthenticationError < Error
|
|
128
|
+
end
|
|
129
|
+
class SchemaError < ProtocolError
|
|
130
|
+
attr_reader field: String
|
|
131
|
+
attr_reader expected_type: String
|
|
132
|
+
attr_reader actual_type: String
|
|
133
|
+
def initialize: (field: String, expected_type: String, value: reader_value) -> void
|
|
134
|
+
end
|
|
135
|
+
class APIError < Error
|
|
136
|
+
attr_reader code: Integer
|
|
137
|
+
def initialize: (Integer code) -> void
|
|
138
|
+
end
|
|
139
|
+
class HTTPError < Error
|
|
140
|
+
attr_reader status: Integer
|
|
141
|
+
def initialize: (Integer status) -> void
|
|
142
|
+
end
|
|
143
|
+
class RateLimitError < HTTPError
|
|
144
|
+
attr_reader retry_after: Integer?
|
|
145
|
+
def initialize: (?retry_after: Integer?, ?retryable: bool) -> void
|
|
146
|
+
def retryable?: () -> bool
|
|
147
|
+
end
|
|
148
|
+
class NotFoundError < HTTPError
|
|
149
|
+
end
|
|
150
|
+
class ServerError < HTTPError
|
|
151
|
+
end
|
|
152
|
+
end
|