flatfile_api 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.editorconfig +12 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile +9 -0
- data/README.md +264 -0
- data/Rakefile +3 -0
- data/lib/flatfile_api/paginated_response.rb +46 -0
- data/lib/flatfile_api/response.rb +12 -0
- data/lib/flatfile_api/string_tools.rb +16 -0
- data/lib/flatfile_api/version.rb +5 -0
- data/lib/flatfile_api.rb +447 -0
- data/scripts/code_gen.rb +54 -0
- data/scripts/doc_gen.rb +38 -0
- data/scripts/parse_docs.rb +83 -0
- data/scripts/spec_2022-12-02.yaml +372 -0
- data/sig/flatfile_api.rbs +115 -0
- metadata +62 -0
@@ -0,0 +1,372 @@
|
|
1
|
+
---
|
2
|
+
- :method: POST
|
3
|
+
:description: Exchange access key for JWT
|
4
|
+
:path: "/auth/access-key-exchange"
|
5
|
+
:body_params:
|
6
|
+
- Name: accessKeyId
|
7
|
+
Required: 'true'
|
8
|
+
Type: string
|
9
|
+
Value: ''
|
10
|
+
Description: Access Key generated in app
|
11
|
+
- Name: expiresIn
|
12
|
+
Required: ''
|
13
|
+
Type: number
|
14
|
+
Value: 43200 (default)
|
15
|
+
Description: Sets an expiration (in seconds)
|
16
|
+
- Name: secretAccessKey
|
17
|
+
Required: 'true'
|
18
|
+
Type: string
|
19
|
+
Value: ''
|
20
|
+
Description: Secret Access Key generated in app
|
21
|
+
- :method: GET
|
22
|
+
:description: Download an upload
|
23
|
+
:path: "/batch/:batchId/export.csv"
|
24
|
+
:path_params:
|
25
|
+
- Name: batchId
|
26
|
+
Required: 'true'
|
27
|
+
Type: string
|
28
|
+
Value: ''
|
29
|
+
Description: A valid UUID
|
30
|
+
:query_params:
|
31
|
+
- Name: type
|
32
|
+
Required: 'true'
|
33
|
+
Type: string
|
34
|
+
Value: 'Enum: original, processed'
|
35
|
+
Description: File to download
|
36
|
+
- :method: DELETE
|
37
|
+
:description: Delete an upload
|
38
|
+
:path: "/batch/:batchId"
|
39
|
+
:path_params:
|
40
|
+
- Name: batchId
|
41
|
+
Required: 'true'
|
42
|
+
Type: string
|
43
|
+
Value: ''
|
44
|
+
Description: A valid UUID
|
45
|
+
- :method: GET
|
46
|
+
:description: Bulk delete uploads
|
47
|
+
:path: "/delete/batches"
|
48
|
+
:query_params:
|
49
|
+
- Name: olderThanQuantity
|
50
|
+
Required: 'true'
|
51
|
+
Type: string
|
52
|
+
Value: ''
|
53
|
+
Description: ''
|
54
|
+
- Name: olderThanUnit
|
55
|
+
Required: 'true'
|
56
|
+
Type: string
|
57
|
+
Value: 'Enum: minute, hour, day, week, month'
|
58
|
+
Description: ''
|
59
|
+
- Name: sendEmail
|
60
|
+
Required: 'true'
|
61
|
+
Type: string
|
62
|
+
Value: 'Enum: true, false'
|
63
|
+
Description: ''
|
64
|
+
- Name: teamId
|
65
|
+
Required: 'true'
|
66
|
+
Type: string
|
67
|
+
Value: ''
|
68
|
+
Description: ''
|
69
|
+
- :method: GET
|
70
|
+
:description: List Workspace uploads
|
71
|
+
:path: "/rest/batches"
|
72
|
+
:query_params:
|
73
|
+
- Name: endUserId
|
74
|
+
Required: ''
|
75
|
+
Type: string
|
76
|
+
Value: ''
|
77
|
+
Description: Valid endUserId for the Workspace
|
78
|
+
- Name: environmentId
|
79
|
+
Required: ''
|
80
|
+
Type: string
|
81
|
+
Value: ''
|
82
|
+
Description: Valid environmentId for the Workspace
|
83
|
+
- Name: licenseKey
|
84
|
+
Required: 'true'
|
85
|
+
Type: string
|
86
|
+
Value: ''
|
87
|
+
Description: A valid licenseKey for the Workspace
|
88
|
+
- Name: search
|
89
|
+
Required: ''
|
90
|
+
Type: string
|
91
|
+
Value: ''
|
92
|
+
Description: Searches fileName, originalFile, memo
|
93
|
+
- Name: skip
|
94
|
+
Required: ''
|
95
|
+
Type: number
|
96
|
+
Value: 0 (default)
|
97
|
+
Description: The rows to skip before listing
|
98
|
+
- Name: take
|
99
|
+
Required: ''
|
100
|
+
Type: number
|
101
|
+
Value: 50 (default)
|
102
|
+
Description: The maximum number of rows to return
|
103
|
+
- Name: workspaceId
|
104
|
+
Required: ''
|
105
|
+
Type: string
|
106
|
+
Value: ''
|
107
|
+
Description: Valid workspaceId for the Workspace
|
108
|
+
- :method: GET
|
109
|
+
:description: File upload meta data
|
110
|
+
:path: "/rest/batch/:batchId"
|
111
|
+
:path_params:
|
112
|
+
- Name: batchId
|
113
|
+
Required: 'true'
|
114
|
+
Type: string
|
115
|
+
Value: ''
|
116
|
+
Description: A valid UUID
|
117
|
+
- :method: GET
|
118
|
+
:description: Sheet name for file upload
|
119
|
+
:path: "/upload/:uploadId/dataSources"
|
120
|
+
:path_params:
|
121
|
+
- Name: uploadId
|
122
|
+
Required: 'true'
|
123
|
+
Type: string
|
124
|
+
Value: ''
|
125
|
+
Description: A valid UUID
|
126
|
+
:query_params:
|
127
|
+
- Name: licenseKey
|
128
|
+
Required: ''
|
129
|
+
Type: string
|
130
|
+
Value: ''
|
131
|
+
Description: A valid licenseKey for the Workspace
|
132
|
+
- :method: GET
|
133
|
+
:description: Records for file upload
|
134
|
+
:path: "/rest/batch/:batchId/rows"
|
135
|
+
:path_params:
|
136
|
+
- Name: batchId
|
137
|
+
Required: 'true'
|
138
|
+
Type: string
|
139
|
+
Value: ''
|
140
|
+
Description: A valid UUID
|
141
|
+
:query_params:
|
142
|
+
- Name: createdAtEndDate
|
143
|
+
Required: ''
|
144
|
+
Type: string
|
145
|
+
Value: ISO 8601
|
146
|
+
Description: The maximum createdAt date to return
|
147
|
+
- Name: createdAtStartDate
|
148
|
+
Required: ''
|
149
|
+
Type: string
|
150
|
+
Value: ISO 8601
|
151
|
+
Description: The minimum createdAt date to return
|
152
|
+
- Name: deleted
|
153
|
+
Required: ''
|
154
|
+
Type: string
|
155
|
+
Value: 'Enum: true, t, y, false, f, n'
|
156
|
+
Description: Return only deleted rows
|
157
|
+
- Name: skip
|
158
|
+
Required: ''
|
159
|
+
Type: number
|
160
|
+
Value: 0 (default)
|
161
|
+
Description: The rows to skip before listing
|
162
|
+
- Name: take
|
163
|
+
Required: ''
|
164
|
+
Type: number
|
165
|
+
Value: 50 (default)
|
166
|
+
Description: The maximum number of rows to return
|
167
|
+
- Name: updatedAtEndDate
|
168
|
+
Required: ''
|
169
|
+
Type: string
|
170
|
+
Value: ISO 8601
|
171
|
+
Description: The maximum updatedAt date to return
|
172
|
+
- Name: updatedAtStartDate
|
173
|
+
Required: ''
|
174
|
+
Type: string
|
175
|
+
Value: ISO 8601
|
176
|
+
Description: The minimum updatedAt date to return
|
177
|
+
- Name: valid
|
178
|
+
Required: ''
|
179
|
+
Type: string
|
180
|
+
Value: 'Enum: true, t, y, false, f, n'
|
181
|
+
Description: Return only valid rows
|
182
|
+
- :method: POST
|
183
|
+
:description: Upload to Workspace sheet
|
184
|
+
:path: "/workspace/:workspaceId/sheet/:sheetId/data"
|
185
|
+
:path_params:
|
186
|
+
- Name: sheetId
|
187
|
+
Required: 'true'
|
188
|
+
Type: string
|
189
|
+
Value: ''
|
190
|
+
Description: A valid UUID
|
191
|
+
- Name: workspaceId
|
192
|
+
Required: 'true'
|
193
|
+
Type: string
|
194
|
+
Value: ''
|
195
|
+
Description: A valid UUID
|
196
|
+
- :method: GET
|
197
|
+
:description: Fetch Workspace sheet records
|
198
|
+
:path: "/workspace/:workspaceId/sheet/:sheetId/records"
|
199
|
+
:path_params:
|
200
|
+
- Name: sheetId
|
201
|
+
Required: 'true'
|
202
|
+
Type: string
|
203
|
+
Value: ''
|
204
|
+
Description: A valid UUID
|
205
|
+
- Name: workspaceId
|
206
|
+
Required: 'true'
|
207
|
+
Type: string
|
208
|
+
Value: ''
|
209
|
+
Description: A valid UUID
|
210
|
+
:query_params:
|
211
|
+
- Name: filter
|
212
|
+
Required: ''
|
213
|
+
Type: string
|
214
|
+
Value: 'Enum: review, dismissed, accepted'
|
215
|
+
Description: Return only the filtered rows
|
216
|
+
- Name: mergeId
|
217
|
+
Required: ''
|
218
|
+
Type: string
|
219
|
+
Value: ''
|
220
|
+
Description: ''
|
221
|
+
- Name: nested
|
222
|
+
Required: ''
|
223
|
+
Type: boolean
|
224
|
+
Value: ''
|
225
|
+
Description: ''
|
226
|
+
- Name: recordIds
|
227
|
+
Required: ''
|
228
|
+
Type: string[]
|
229
|
+
Value: ''
|
230
|
+
Description: ''
|
231
|
+
- Name: skip
|
232
|
+
Required: ''
|
233
|
+
Type: number
|
234
|
+
Value: 0 (default)
|
235
|
+
Description: The rows to skip before listing
|
236
|
+
- Name: take
|
237
|
+
Required: ''
|
238
|
+
Type: number
|
239
|
+
Value: 50 (default)
|
240
|
+
Description: The maximum number of rows to return
|
241
|
+
- Name: valid
|
242
|
+
Required: ''
|
243
|
+
Type: string
|
244
|
+
Value: 'Enum: true, t, y, false, f, n'
|
245
|
+
Description: Return only valid rows
|
246
|
+
- :method: GET
|
247
|
+
:description: List team Workspaces
|
248
|
+
:path: "/rest/teams/:teamId/workspaces"
|
249
|
+
:path_params:
|
250
|
+
- Name: teamId
|
251
|
+
Required: 'true'
|
252
|
+
Type: string
|
253
|
+
Value: ''
|
254
|
+
Description: ''
|
255
|
+
:query_params:
|
256
|
+
- Name: environmentId
|
257
|
+
Required: ''
|
258
|
+
Type: string
|
259
|
+
Value: ''
|
260
|
+
Description: Valid environmentId for the Workspace
|
261
|
+
- Name: skip
|
262
|
+
Required: ''
|
263
|
+
Type: number
|
264
|
+
Value: 0 (default)
|
265
|
+
Description: The rows to skip before listing
|
266
|
+
- Name: take
|
267
|
+
Required: ''
|
268
|
+
Type: number
|
269
|
+
Value: 50 (default)
|
270
|
+
Description: The maximum number of rows to return
|
271
|
+
- :method: GET
|
272
|
+
:description: Detail Workspace
|
273
|
+
:path: "/rest/workspace/:workspaceId"
|
274
|
+
:path_params:
|
275
|
+
- Name: workspaceId
|
276
|
+
Required: 'true'
|
277
|
+
Type: string
|
278
|
+
Value: ''
|
279
|
+
Description: A valid UUID
|
280
|
+
- :method: POST
|
281
|
+
:description: Invite Workspace collaborator
|
282
|
+
:path: "/rest/teams/:teamId/workspaces/:workspaceId/invitations"
|
283
|
+
:path_params:
|
284
|
+
- Name: teamId
|
285
|
+
Required: 'true'
|
286
|
+
Type: string
|
287
|
+
Value: ''
|
288
|
+
Description: ''
|
289
|
+
- Name: workspaceId
|
290
|
+
Required: 'true'
|
291
|
+
Type: string
|
292
|
+
Value: ''
|
293
|
+
Description: A valid UUID
|
294
|
+
:body_params:
|
295
|
+
- Name: email
|
296
|
+
Required: 'true'
|
297
|
+
Type: string
|
298
|
+
Value: ''
|
299
|
+
Description: Email address of invited collaborator
|
300
|
+
- :method: GET
|
301
|
+
:description: List Workspace invitations
|
302
|
+
:path: "/rest/teams/:teamId/workspaces/:workspaceId/invitations"
|
303
|
+
:path_params:
|
304
|
+
- Name: teamId
|
305
|
+
Required: 'true'
|
306
|
+
Type: string
|
307
|
+
Value: ''
|
308
|
+
Description: ''
|
309
|
+
- Name: workspaceId
|
310
|
+
Required: 'true'
|
311
|
+
Type: string
|
312
|
+
Value: ''
|
313
|
+
Description: A valid UUID
|
314
|
+
- :method: GET
|
315
|
+
:description: List Workspace collaborators
|
316
|
+
:path: "/rest/teams/:teamId/workspaces/:workspaceId/collaborators"
|
317
|
+
:path_params:
|
318
|
+
- Name: teamId
|
319
|
+
Required: 'true'
|
320
|
+
Type: string
|
321
|
+
Value: ''
|
322
|
+
Description: ''
|
323
|
+
- Name: workspaceId
|
324
|
+
Required: 'true'
|
325
|
+
Type: string
|
326
|
+
Value: ''
|
327
|
+
Description: A valid UUID
|
328
|
+
- :method: DELETE
|
329
|
+
:description: Revoke Workspace invitation
|
330
|
+
:path: "/rest/teams/:teamId/workspaces/:workspaceId/invitations"
|
331
|
+
:path_params:
|
332
|
+
- Name: teamId
|
333
|
+
Required: 'true'
|
334
|
+
Type: string
|
335
|
+
Value: ''
|
336
|
+
Description: ''
|
337
|
+
- Name: workspaceId
|
338
|
+
Required: 'true'
|
339
|
+
Type: string
|
340
|
+
Value: ''
|
341
|
+
Description: A valid UUID
|
342
|
+
:body_params:
|
343
|
+
- Name: email
|
344
|
+
Required: 'true'
|
345
|
+
Type: string
|
346
|
+
Value: ''
|
347
|
+
Description: Email address of invited collaborator
|
348
|
+
- :method: DELETE
|
349
|
+
:description: Remove Workspace collaborator
|
350
|
+
:path: "/rest/teams/:teamId/workspaces/:workspaceId/collaborators/:userId"
|
351
|
+
:path_params:
|
352
|
+
- Name: teamId
|
353
|
+
Required: 'true'
|
354
|
+
Type: string
|
355
|
+
Value: ''
|
356
|
+
Description: ''
|
357
|
+
- Name: userId
|
358
|
+
Required: 'true'
|
359
|
+
Type: string
|
360
|
+
Value: ''
|
361
|
+
Description: ''
|
362
|
+
- Name: workspaceId
|
363
|
+
Required: 'true'
|
364
|
+
Type: string
|
365
|
+
Value: ''
|
366
|
+
Description: A valid UUID
|
367
|
+
:body_params:
|
368
|
+
- Name: email
|
369
|
+
Required: 'true'
|
370
|
+
Type: string
|
371
|
+
Value: ''
|
372
|
+
Description: Email address of collaborator
|
@@ -0,0 +1,115 @@
|
|
1
|
+
class FlatfileApi
|
2
|
+
VERSION: String
|
3
|
+
|
4
|
+
def initialize: (?access_key_id: String, ?secret_access_key: String, ?debug: bool) -> void
|
5
|
+
|
6
|
+
def exchange_access_key_for_jwt(
|
7
|
+
access_key_id: String,
|
8
|
+
?expires_in: Integer,
|
9
|
+
secret_access_key: String
|
10
|
+
) -> Response
|
11
|
+
|
12
|
+
def download_an_upload(
|
13
|
+
batch_id:,
|
14
|
+
type:
|
15
|
+
) -> Response
|
16
|
+
|
17
|
+
def delete_an_upload(
|
18
|
+
batch_id: String
|
19
|
+
) -> Response
|
20
|
+
|
21
|
+
def bulk_delete_uploads(
|
22
|
+
older_than_quantity: String,
|
23
|
+
older_than_unit: String,
|
24
|
+
send_email: bool,
|
25
|
+
team_id: String
|
26
|
+
) -> Response
|
27
|
+
|
28
|
+
def list_workspace_uploads(
|
29
|
+
?end_user_id: String,
|
30
|
+
?environment_id: String,
|
31
|
+
license_key: String,
|
32
|
+
?search: String,
|
33
|
+
?skip: Integer,
|
34
|
+
?take: Integer,
|
35
|
+
?workspace_id: String
|
36
|
+
) -> PaginatedResponse
|
37
|
+
|
38
|
+
def file_upload_meta_data(
|
39
|
+
batch_id: String
|
40
|
+
) -> Response
|
41
|
+
|
42
|
+
def sheet_name_for_file_upload(
|
43
|
+
upload_id: String,
|
44
|
+
?license_key: String
|
45
|
+
) -> Response
|
46
|
+
|
47
|
+
def records_for_file_upload(
|
48
|
+
batch_id: String,
|
49
|
+
?created_at_end_date: (String | Time | DateTime),
|
50
|
+
?created_at_start_date: (String | Time | DateTime),
|
51
|
+
?deleted: bool,
|
52
|
+
?skip: Integer,
|
53
|
+
?take: Integer,
|
54
|
+
?updated_at_end_date: (String | Time | DateTime),
|
55
|
+
?updated_at_start_date: (String | Time | DateTime),
|
56
|
+
?valid: bool
|
57
|
+
) -> PaginatedResponse
|
58
|
+
|
59
|
+
def upload_to_workspace_sheet(
|
60
|
+
sheet_id: String,
|
61
|
+
workspace_id: String,
|
62
|
+
) -> Response
|
63
|
+
|
64
|
+
def fetch_workspace_sheet_records(
|
65
|
+
sheet_id: String,
|
66
|
+
workspace_id: String,
|
67
|
+
?filter: String,
|
68
|
+
?merge_id: String,
|
69
|
+
?nested: bool,
|
70
|
+
?record_ids: Array[String],
|
71
|
+
?skip: Integer,
|
72
|
+
?take: Integer,
|
73
|
+
?valid: bool
|
74
|
+
) -> PaginatedResponse
|
75
|
+
|
76
|
+
def list_team_workspaces(
|
77
|
+
team_id: String,
|
78
|
+
?environment_id: String,
|
79
|
+
?skip: Integer,
|
80
|
+
?take: Integer
|
81
|
+
) -> PaginatedResponse
|
82
|
+
|
83
|
+
def detail_workspace(
|
84
|
+
workspace_id: String
|
85
|
+
) -> Response
|
86
|
+
|
87
|
+
def invite_workspace_collaborator(
|
88
|
+
team_id: String,
|
89
|
+
workspace_id: String,
|
90
|
+
email: String
|
91
|
+
) -> Response
|
92
|
+
|
93
|
+
def list_workspace_invitations(
|
94
|
+
team_id: String,
|
95
|
+
workspace_id: String
|
96
|
+
) -> Response
|
97
|
+
|
98
|
+
def list_workspace_collaborators(
|
99
|
+
team_id: String,
|
100
|
+
workspace_id: String
|
101
|
+
) -> Response
|
102
|
+
|
103
|
+
def revoke_workspace_invitation(
|
104
|
+
team_id: String,
|
105
|
+
workspace_id: String,
|
106
|
+
email: String
|
107
|
+
) -> Response
|
108
|
+
|
109
|
+
def remove_workspace_collaborator(
|
110
|
+
team_id: String,
|
111
|
+
user_id: String,
|
112
|
+
workspace_id: String,
|
113
|
+
email: String
|
114
|
+
) -> Response
|
115
|
+
end
|
metadata
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: flatfile_api
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- cyclotron3k
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-12-07 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: A thin wrapper around the Flatfile RESTful API
|
14
|
+
email:
|
15
|
+
- aidan.samuel@gmail.com
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- ".editorconfig"
|
21
|
+
- CHANGELOG.md
|
22
|
+
- Gemfile
|
23
|
+
- README.md
|
24
|
+
- Rakefile
|
25
|
+
- lib/flatfile_api.rb
|
26
|
+
- lib/flatfile_api/paginated_response.rb
|
27
|
+
- lib/flatfile_api/response.rb
|
28
|
+
- lib/flatfile_api/string_tools.rb
|
29
|
+
- lib/flatfile_api/version.rb
|
30
|
+
- scripts/code_gen.rb
|
31
|
+
- scripts/doc_gen.rb
|
32
|
+
- scripts/parse_docs.rb
|
33
|
+
- scripts/spec_2022-12-02.yaml
|
34
|
+
- sig/flatfile_api.rbs
|
35
|
+
homepage: https://github.com/cyclotron3k/flatfile_api
|
36
|
+
licenses: []
|
37
|
+
metadata:
|
38
|
+
bug_tracker_uri: https://github.com/cyclotron3k/flatfile_api/issues
|
39
|
+
changelog_uri: https://github.com/cyclotron3k/flatfile_api/blob/master/CHANGELOG.md
|
40
|
+
documentation_uri: https://github.com/cyclotron3k/flatfile_api/blob/v0.1.0/README.md
|
41
|
+
homepage_uri: https://github.com/cyclotron3k/flatfile_api
|
42
|
+
source_code_uri: https://github.com/cyclotron3k/flatfile_api
|
43
|
+
post_install_message:
|
44
|
+
rdoc_options: []
|
45
|
+
require_paths:
|
46
|
+
- lib
|
47
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
48
|
+
requirements:
|
49
|
+
- - ">="
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: 2.6.0
|
52
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '0'
|
57
|
+
requirements: []
|
58
|
+
rubygems_version: 3.3.7
|
59
|
+
signing_key:
|
60
|
+
specification_version: 4
|
61
|
+
summary: Flatfile API client
|
62
|
+
test_files: []
|