Commit bf5f92f
Add v2 api support (#45)
* Update all endpoints to v2
* Create object types and module
* Update modules to support v2 endpoints
Main changes to support v2 compatibility:
- Resource modules now have a meta field that can store any type of attribute rather than specific fields (name, description, etc)
- List endpoints now consist of an array of results with an optional prevCursor or nextCursor used for pagination
* Update /v2/authorize endpoint to /v2/check
* Add tests for batch endpoints
* Clean up unused imports
* Export object and warrant modules
* Include request options in query calls
* Create ListResponse interface for list return type
* Pass request options in Tenant.create
* Add warrant query test
* Add query filter to list objects filters
* Return warrant token when creating/deleting warrants
* Refactor parseResponse to be clearer
* Return warrantToken for object deletes
* Remove return awaits outside try-catch block
* Update object methods to also accept WarrantObjects
* Update tests to support typescript
* Add params types for all methods where applicable
* Improve usage of get and update methods
* Add list warrants method
---------
Co-authored-by: Karan Kajla <kkajla12@gmail.com>1 parent fbd2bc6 commit bf5f92f
File tree
31 files changed
+2450
-1323
lines changed- src
- modules
- types
- test
31 files changed
+2450
-1323
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
38 | 40 | | |
| 41 | + | |
39 | 42 | | |
| 43 | + | |
40 | 44 | | |
41 | 45 | | |
42 | 46 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| 135 | + | |
135 | 136 | | |
136 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
137 | 143 | | |
138 | 144 | | |
139 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
140 | 150 | | |
141 | 151 | | |
142 | 152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| 9 | + | |
8 | 10 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
4 | 10 | | |
5 | | - | |
6 | 11 | | |
| 12 | + | |
7 | 13 | | |
8 | 14 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | | - | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | | - | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
40 | 33 | | |
41 | 34 | | |
42 | | - | |
| 35 | + | |
43 | 36 | | |
44 | 37 | | |
45 | | - | |
| 38 | + | |
46 | 39 | | |
47 | 40 | | |
48 | | - | |
| 41 | + | |
49 | 42 | | |
50 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
51 | 47 | | |
52 | | - | |
53 | | - | |
54 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
55 | 51 | | |
56 | 52 | | |
57 | 53 | | |
58 | | - | |
| 54 | + | |
59 | 55 | | |
60 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
61 | 60 | | |
62 | | - | |
63 | | - | |
64 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
65 | 64 | | |
66 | 65 | | |
67 | 66 | | |
68 | 67 | | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
80 | 74 | | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
| 75 | + | |
85 | 76 | | |
86 | 77 | | |
87 | | - | |
| 78 | + | |
88 | 79 | | |
89 | 80 | | |
90 | 81 | | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
| 82 | + | |
| 83 | + | |
96 | 84 | | |
97 | 85 | | |
98 | 86 | | |
99 | 87 | | |
100 | 88 | | |
101 | 89 | | |
102 | | - | |
| 90 | + | |
103 | 91 | | |
104 | 92 | | |
105 | 93 | | |
106 | 94 | | |
107 | 95 | | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | 96 | | |
0 commit comments