fizzy-sdk 0.1.2 → 0.2.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 +4 -4
- data/lib/fizzy/generated/metadata.json +97 -1
- data/lib/fizzy/generated/services/boards_service.rb +11 -0
- data/lib/fizzy/generated/services/cards_service.rb +38 -8
- data/lib/fizzy/generated/services/users_service.rb +45 -0
- data/lib/fizzy/generated/services/webhooks_service.rb +11 -0
- data/lib/fizzy/generated/types.rb +242 -25
- data/lib/fizzy/version.rb +1 -1
- data/scripts/generate-services.rb +10 -2
- data/scripts/generate-types.rb +23 -6
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b75e68542e34f7d54ef8d41b0d20e14e64d831ffce9972e96cabd281225b1102
|
|
4
|
+
data.tar.gz: e1760ea776afef0e4d08e6f308d3ad253e07b95c8ccbb5391417ff6c31f295f4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f6aefe669ad38b69ac5b7d1525c82591820383332bcf44f0e368428ab776d3b0f1f2270dbd964b56e8fd3fcec40744bcebeffd1a40e0367317986bac5f918225
|
|
7
|
+
data.tar.gz: 5986c170f8f71cfb294824590d6f9be3554d3deeef225b2f7bfdde8d8c3b1b7b69c6f174695d92fa3d71ddad19f0a4d054b44a4f6c54e995c1ceff565cabb156
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://fizzy.do/schemas/sdk-metadata.json",
|
|
3
3
|
"version": "1.0.0",
|
|
4
|
-
"generated": "2026-
|
|
4
|
+
"generated": "2026-04-30T17:59:20Z",
|
|
5
5
|
"operations": {
|
|
6
6
|
"ListAccessTokens": {
|
|
7
7
|
"retry": {
|
|
@@ -206,6 +206,22 @@
|
|
|
206
206
|
"natural": true
|
|
207
207
|
}
|
|
208
208
|
},
|
|
209
|
+
"ListActivities": {
|
|
210
|
+
"retry": {
|
|
211
|
+
"maxAttempts": 3,
|
|
212
|
+
"baseDelayMs": 1000,
|
|
213
|
+
"backoff": "exponential",
|
|
214
|
+
"retryOn": [
|
|
215
|
+
429,
|
|
216
|
+
500,
|
|
217
|
+
503
|
|
218
|
+
]
|
|
219
|
+
},
|
|
220
|
+
"pagination": {
|
|
221
|
+
"style": "link",
|
|
222
|
+
"pageParam": "page"
|
|
223
|
+
}
|
|
224
|
+
},
|
|
209
225
|
"ListBoards": {
|
|
210
226
|
"retry": {
|
|
211
227
|
"maxAttempts": 3,
|
|
@@ -272,6 +288,18 @@
|
|
|
272
288
|
"natural": true
|
|
273
289
|
}
|
|
274
290
|
},
|
|
291
|
+
"ListBoardAccesses": {
|
|
292
|
+
"retry": {
|
|
293
|
+
"maxAttempts": 3,
|
|
294
|
+
"baseDelayMs": 1000,
|
|
295
|
+
"backoff": "exponential",
|
|
296
|
+
"retryOn": [
|
|
297
|
+
429,
|
|
298
|
+
500,
|
|
299
|
+
503
|
|
300
|
+
]
|
|
301
|
+
}
|
|
302
|
+
},
|
|
275
303
|
"ListColumns": {
|
|
276
304
|
"retry": {
|
|
277
305
|
"maxAttempts": 3,
|
|
@@ -382,6 +410,22 @@
|
|
|
382
410
|
"natural": true
|
|
383
411
|
}
|
|
384
412
|
},
|
|
413
|
+
"ListColumnCards": {
|
|
414
|
+
"retry": {
|
|
415
|
+
"maxAttempts": 3,
|
|
416
|
+
"baseDelayMs": 1000,
|
|
417
|
+
"backoff": "exponential",
|
|
418
|
+
"retryOn": [
|
|
419
|
+
429,
|
|
420
|
+
500,
|
|
421
|
+
503
|
|
422
|
+
]
|
|
423
|
+
},
|
|
424
|
+
"pagination": {
|
|
425
|
+
"style": "link",
|
|
426
|
+
"pageParam": "page"
|
|
427
|
+
}
|
|
428
|
+
},
|
|
385
429
|
"UpdateBoardEntropy": {
|
|
386
430
|
"retry": {
|
|
387
431
|
"maxAttempts": 3,
|
|
@@ -519,6 +563,22 @@
|
|
|
519
563
|
"natural": true
|
|
520
564
|
}
|
|
521
565
|
},
|
|
566
|
+
"ListWebhookDeliveries": {
|
|
567
|
+
"retry": {
|
|
568
|
+
"maxAttempts": 3,
|
|
569
|
+
"baseDelayMs": 1000,
|
|
570
|
+
"backoff": "exponential",
|
|
571
|
+
"retryOn": [
|
|
572
|
+
429,
|
|
573
|
+
500,
|
|
574
|
+
503
|
|
575
|
+
]
|
|
576
|
+
},
|
|
577
|
+
"pagination": {
|
|
578
|
+
"style": "link",
|
|
579
|
+
"pageParam": "page"
|
|
580
|
+
}
|
|
581
|
+
},
|
|
522
582
|
"ListCards": {
|
|
523
583
|
"retry": {
|
|
524
584
|
"maxAttempts": 3,
|
|
@@ -1299,6 +1359,42 @@
|
|
|
1299
1359
|
"natural": true
|
|
1300
1360
|
}
|
|
1301
1361
|
},
|
|
1362
|
+
"CreateUserDataExport": {
|
|
1363
|
+
"retry": {
|
|
1364
|
+
"maxAttempts": 1,
|
|
1365
|
+
"baseDelayMs": null,
|
|
1366
|
+
"backoff": null,
|
|
1367
|
+
"retryOn": null
|
|
1368
|
+
}
|
|
1369
|
+
},
|
|
1370
|
+
"GetUserDataExport": {
|
|
1371
|
+
"retry": {
|
|
1372
|
+
"maxAttempts": 3,
|
|
1373
|
+
"baseDelayMs": 1000,
|
|
1374
|
+
"backoff": "exponential",
|
|
1375
|
+
"retryOn": [
|
|
1376
|
+
429,
|
|
1377
|
+
500,
|
|
1378
|
+
503
|
|
1379
|
+
]
|
|
1380
|
+
}
|
|
1381
|
+
},
|
|
1382
|
+
"RequestEmailAddressChange": {
|
|
1383
|
+
"retry": {
|
|
1384
|
+
"maxAttempts": 1,
|
|
1385
|
+
"baseDelayMs": null,
|
|
1386
|
+
"backoff": null,
|
|
1387
|
+
"retryOn": null
|
|
1388
|
+
}
|
|
1389
|
+
},
|
|
1390
|
+
"ConfirmEmailAddressChange": {
|
|
1391
|
+
"retry": {
|
|
1392
|
+
"maxAttempts": 1,
|
|
1393
|
+
"baseDelayMs": null,
|
|
1394
|
+
"backoff": null,
|
|
1395
|
+
"retryOn": null
|
|
1396
|
+
}
|
|
1397
|
+
},
|
|
1302
1398
|
"CreatePushSubscription": {
|
|
1303
1399
|
"retry": {
|
|
1304
1400
|
"maxAttempts": 1,
|
|
@@ -65,6 +65,17 @@ module Fizzy
|
|
|
65
65
|
end
|
|
66
66
|
end
|
|
67
67
|
|
|
68
|
+
# list_board_accesses operation
|
|
69
|
+
# @param account_id [String] account id ID
|
|
70
|
+
# @param board_id [String] board id ID
|
|
71
|
+
# @param page [Integer, nil] page
|
|
72
|
+
# @return [Hash] response data
|
|
73
|
+
def list_board_accesses(account_id:, board_id:, page: nil)
|
|
74
|
+
with_operation(service: "boards", operation: "ListBoardAccesses", is_mutation: false, resource_id: board_id) do
|
|
75
|
+
http_get("/#{account_id}/boards/#{board_id}/accesses.json", params: compact_params(page: page)).json
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
68
79
|
# publish_board operation
|
|
69
80
|
# @param account_id [String] account id ID
|
|
70
81
|
# @param board_id [String] board id ID
|
|
@@ -7,6 +7,18 @@ module Fizzy
|
|
|
7
7
|
# @generated from OpenAPI spec
|
|
8
8
|
class CardsService < BaseService
|
|
9
9
|
|
|
10
|
+
# list_activities operation
|
|
11
|
+
# @param account_id [String] account id ID
|
|
12
|
+
# @param creator_ids [Array, nil] creator ids
|
|
13
|
+
# @param board_ids [Array, nil] board ids
|
|
14
|
+
# @return [Enumerator<Hash>] paginated results
|
|
15
|
+
def list_activities(account_id:, creator_ids: nil, board_ids: nil)
|
|
16
|
+
wrap_paginated(service: "cards", operation: "ListActivities", is_mutation: false, resource_id: account_id) do
|
|
17
|
+
params = compact_params(creator_ids: creator_ids, board_ids: board_ids)
|
|
18
|
+
paginate("/#{account_id}/activities.json", params: params)
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
|
|
10
22
|
# list_closed_cards operation
|
|
11
23
|
# @param account_id [String] account id ID
|
|
12
24
|
# @param board_id [String] board id ID
|
|
@@ -37,18 +49,36 @@ module Fizzy
|
|
|
37
49
|
end
|
|
38
50
|
end
|
|
39
51
|
|
|
52
|
+
# list_column_cards operation
|
|
53
|
+
# @param account_id [String] account id ID
|
|
54
|
+
# @param board_id [String] board id ID
|
|
55
|
+
# @param column_id [String] column id ID
|
|
56
|
+
# @return [Enumerator<Hash>] paginated results
|
|
57
|
+
def list_column_cards(account_id:, board_id:, column_id:)
|
|
58
|
+
wrap_paginated(service: "cards", operation: "ListColumnCards", is_mutation: false, resource_id: column_id) do
|
|
59
|
+
paginate("/#{account_id}/boards/#{board_id}/columns/#{column_id}/cards.json")
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
|
|
40
63
|
# list operation
|
|
41
64
|
# @param account_id [String] account id ID
|
|
42
|
-
# @param
|
|
43
|
-
# @param
|
|
44
|
-
# @param
|
|
45
|
-
# @param
|
|
46
|
-
# @param
|
|
47
|
-
# @param
|
|
65
|
+
# @param board_ids [Array, nil] board ids
|
|
66
|
+
# @param tag_ids [Array, nil] tag ids
|
|
67
|
+
# @param assignee_ids [Array, nil] assignee ids
|
|
68
|
+
# @param creator_ids [Array, nil] creator ids
|
|
69
|
+
# @param closer_ids [Array, nil] closer ids
|
|
70
|
+
# @param card_ids [Array, nil] card ids
|
|
71
|
+
# @param column_ids [Array, nil] column ids
|
|
72
|
+
# @param indexed_by [String, nil] indexed by
|
|
73
|
+
# @param sorted_by [String, nil] sorted by
|
|
74
|
+
# @param assignment_status [String, nil] assignment status
|
|
75
|
+
# @param creation [String, nil] creation
|
|
76
|
+
# @param closure [String, nil] closure
|
|
77
|
+
# @param terms [Array, nil] terms
|
|
48
78
|
# @return [Enumerator<Hash>] paginated results
|
|
49
|
-
def list(account_id:,
|
|
79
|
+
def list(account_id:, board_ids: nil, tag_ids: nil, assignee_ids: nil, creator_ids: nil, closer_ids: nil, card_ids: nil, column_ids: nil, indexed_by: nil, sorted_by: nil, assignment_status: nil, creation: nil, closure: nil, terms: nil)
|
|
50
80
|
wrap_paginated(service: "cards", operation: "ListCards", is_mutation: false, resource_id: account_id) do
|
|
51
|
-
params = compact_params(
|
|
81
|
+
params = compact_params(board_ids: board_ids, tag_ids: tag_ids, assignee_ids: assignee_ids, creator_ids: creator_ids, closer_ids: closer_ids, card_ids: card_ids, column_ids: column_ids, indexed_by: indexed_by, sorted_by: sorted_by, assignment_status: assignment_status, creation: creation, closure: closure, terms: terms)
|
|
52
82
|
paginate("/#{account_id}/cards.json", params: params)
|
|
53
83
|
end
|
|
54
84
|
end
|
|
@@ -47,6 +47,51 @@ module Fizzy
|
|
|
47
47
|
nil
|
|
48
48
|
end
|
|
49
49
|
end
|
|
50
|
+
|
|
51
|
+
# create_user_data_export operation
|
|
52
|
+
# @param account_id [String] account id ID
|
|
53
|
+
# @param user_id [String] user id ID
|
|
54
|
+
# @return [Hash] response data
|
|
55
|
+
def create_user_data_export(account_id:, user_id:)
|
|
56
|
+
with_operation(service: "users", operation: "CreateUserDataExport", is_mutation: true, resource_id: user_id) do
|
|
57
|
+
http_post("/#{account_id}/users/#{user_id}/data_exports.json").json
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# get_user_data_export operation
|
|
62
|
+
# @param account_id [String] account id ID
|
|
63
|
+
# @param user_id [String] user id ID
|
|
64
|
+
# @param export_id [String] export id ID
|
|
65
|
+
# @return [Hash] response data
|
|
66
|
+
def get_user_data_export(account_id:, user_id:, export_id:)
|
|
67
|
+
with_operation(service: "users", operation: "GetUserDataExport", is_mutation: false, resource_id: export_id) do
|
|
68
|
+
http_get("/#{account_id}/users/#{user_id}/data_exports/#{export_id}").json
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# request_email_address_change operation
|
|
73
|
+
# @param account_id [String] account id ID
|
|
74
|
+
# @param user_id [String] user id ID
|
|
75
|
+
# @param email_address [String] email address
|
|
76
|
+
# @return [void]
|
|
77
|
+
def request_email_address_change(account_id:, user_id:, email_address:)
|
|
78
|
+
with_operation(service: "users", operation: "RequestEmailAddressChange", is_mutation: true, resource_id: user_id) do
|
|
79
|
+
http_post("/#{account_id}/users/#{user_id}/email_addresses.json", body: compact_params(email_address: email_address))
|
|
80
|
+
nil
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# confirm_email_address_change operation
|
|
85
|
+
# @param account_id [String] account id ID
|
|
86
|
+
# @param user_id [String] user id ID
|
|
87
|
+
# @param email_address_token [String] email address token ID
|
|
88
|
+
# @return [void]
|
|
89
|
+
def confirm_email_address_change(account_id:, user_id:, email_address_token:)
|
|
90
|
+
with_operation(service: "users", operation: "ConfirmEmailAddressChange", is_mutation: true, resource_id: email_address_token) do
|
|
91
|
+
http_post("/#{account_id}/users/#{user_id}/email_addresses/#{email_address_token}/confirmation.json")
|
|
92
|
+
nil
|
|
93
|
+
end
|
|
94
|
+
end
|
|
50
95
|
end
|
|
51
96
|
end
|
|
52
97
|
end
|
|
@@ -78,6 +78,17 @@ module Fizzy
|
|
|
78
78
|
nil
|
|
79
79
|
end
|
|
80
80
|
end
|
|
81
|
+
|
|
82
|
+
# list_webhook_deliveries operation
|
|
83
|
+
# @param account_id [String] account id ID
|
|
84
|
+
# @param board_id [String] board id ID
|
|
85
|
+
# @param webhook_id [String] webhook id ID
|
|
86
|
+
# @return [Enumerator<Hash>] paginated results
|
|
87
|
+
def list_webhook_deliveries(account_id:, board_id:, webhook_id:)
|
|
88
|
+
wrap_paginated(service: "webhooks", operation: "ListWebhookDeliveries", is_mutation: false, resource_id: webhook_id) do
|
|
89
|
+
paginate("/#{account_id}/boards/#{board_id}/webhooks/#{webhook_id}/deliveries.json")
|
|
90
|
+
end
|
|
91
|
+
end
|
|
81
92
|
end
|
|
82
93
|
end
|
|
83
94
|
end
|
|
@@ -31,7 +31,7 @@ module Fizzy
|
|
|
31
31
|
slug: data["slug"],
|
|
32
32
|
created_at: data["created_at"],
|
|
33
33
|
url: data["url"],
|
|
34
|
-
user: data["user"]
|
|
34
|
+
user: data["user"] && User.from_json(data["user"])
|
|
35
35
|
)
|
|
36
36
|
end
|
|
37
37
|
end
|
|
@@ -63,6 +63,75 @@ module Fizzy
|
|
|
63
63
|
end
|
|
64
64
|
end
|
|
65
65
|
|
|
66
|
+
# @generated
|
|
67
|
+
Activity = Data.define(:id, :action, :created_at, :description, :particulars, :url, :eventable_type, :eventable, :board, :creator) do
|
|
68
|
+
# @param data [Hash] raw JSON response
|
|
69
|
+
def self.from_json(data)
|
|
70
|
+
new(
|
|
71
|
+
id: data["id"],
|
|
72
|
+
action: data["action"],
|
|
73
|
+
created_at: data["created_at"],
|
|
74
|
+
description: data["description"],
|
|
75
|
+
particulars: data["particulars"] && ActivityParticulars.from_json(data["particulars"]),
|
|
76
|
+
url: data["url"],
|
|
77
|
+
eventable_type: data["eventable_type"],
|
|
78
|
+
eventable: data["eventable"] && ActivityEventable.from_json(data["eventable"]),
|
|
79
|
+
board: data["board"] && Board.from_json(data["board"]),
|
|
80
|
+
creator: data["creator"] && User.from_json(data["creator"])
|
|
81
|
+
)
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# @generated
|
|
86
|
+
ActivityEventable = Data.define(:id, :number, :title, :status, :description, :description_html, :image_url, :has_attachments, :tags, :closed, :postponed, :golden, :last_active_at, :created_at, :updated_at, :body, :creator, :card, :board, :column, :assignees, :has_more_assignees, :comments_url, :reactions_url, :steps, :url) do
|
|
87
|
+
# @param data [Hash] raw JSON response
|
|
88
|
+
def self.from_json(data)
|
|
89
|
+
new(
|
|
90
|
+
id: data["id"],
|
|
91
|
+
number: data["number"],
|
|
92
|
+
title: data["title"],
|
|
93
|
+
status: data["status"],
|
|
94
|
+
description: data["description"],
|
|
95
|
+
description_html: data["description_html"],
|
|
96
|
+
image_url: data["image_url"],
|
|
97
|
+
has_attachments: data["has_attachments"],
|
|
98
|
+
tags: data["tags"],
|
|
99
|
+
closed: data["closed"],
|
|
100
|
+
postponed: data["postponed"],
|
|
101
|
+
golden: data["golden"],
|
|
102
|
+
last_active_at: data["last_active_at"],
|
|
103
|
+
created_at: data["created_at"],
|
|
104
|
+
updated_at: data["updated_at"],
|
|
105
|
+
body: data["body"] && RichTextBody.from_json(data["body"]),
|
|
106
|
+
creator: data["creator"] && User.from_json(data["creator"]),
|
|
107
|
+
card: data["card"] && CardRef.from_json(data["card"]),
|
|
108
|
+
board: data["board"] && Board.from_json(data["board"]),
|
|
109
|
+
column: data["column"] && Column.from_json(data["column"]),
|
|
110
|
+
assignees: data["assignees"]&.map { |item| User.from_json(item) },
|
|
111
|
+
has_more_assignees: data["has_more_assignees"],
|
|
112
|
+
comments_url: data["comments_url"],
|
|
113
|
+
reactions_url: data["reactions_url"],
|
|
114
|
+
steps: data["steps"]&.map { |item| Step.from_json(item) },
|
|
115
|
+
url: data["url"]
|
|
116
|
+
)
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# @generated
|
|
121
|
+
ActivityParticulars = Data.define(:assignee_ids, :old_board, :new_board, :old_title, :new_title, :column) do
|
|
122
|
+
# @param data [Hash] raw JSON response
|
|
123
|
+
def self.from_json(data)
|
|
124
|
+
new(
|
|
125
|
+
assignee_ids: data["assignee_ids"],
|
|
126
|
+
old_board: data["old_board"],
|
|
127
|
+
new_board: data["new_board"],
|
|
128
|
+
old_title: data["old_title"],
|
|
129
|
+
new_title: data["new_title"],
|
|
130
|
+
column: data["column"]
|
|
131
|
+
)
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
|
|
66
135
|
# @generated
|
|
67
136
|
AssignCardRequestContent = Data.define(:assignee_id) do
|
|
68
137
|
# @param data [Hash] raw JSON response
|
|
@@ -84,7 +153,7 @@ module Fizzy
|
|
|
84
153
|
end
|
|
85
154
|
|
|
86
155
|
# @generated
|
|
87
|
-
Board = Data.define(:id, :name, :all_access, :created_at, :auto_postpone_period_in_days, :url, :creator) do
|
|
156
|
+
Board = Data.define(:id, :name, :all_access, :created_at, :auto_postpone_period_in_days, :public_description, :public_description_html, :public_url, :user_ids, :url, :creator) do
|
|
88
157
|
# @param data [Hash] raw JSON response
|
|
89
158
|
def self.from_json(data)
|
|
90
159
|
new(
|
|
@@ -93,8 +162,43 @@ module Fizzy
|
|
|
93
162
|
all_access: data["all_access"],
|
|
94
163
|
created_at: data["created_at"],
|
|
95
164
|
auto_postpone_period_in_days: data["auto_postpone_period_in_days"],
|
|
165
|
+
public_description: data["public_description"],
|
|
166
|
+
public_description_html: data["public_description_html"],
|
|
167
|
+
public_url: data["public_url"],
|
|
168
|
+
user_ids: data["user_ids"],
|
|
169
|
+
url: data["url"],
|
|
170
|
+
creator: data["creator"] && User.from_json(data["creator"])
|
|
171
|
+
)
|
|
172
|
+
end
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# @generated
|
|
176
|
+
BoardAccessUser = Data.define(:id, :name, :role, :active, :email_address, :created_at, :url, :avatar_url, :has_access, :involvement) do
|
|
177
|
+
# @param data [Hash] raw JSON response
|
|
178
|
+
def self.from_json(data)
|
|
179
|
+
new(
|
|
180
|
+
id: data["id"],
|
|
181
|
+
name: data["name"],
|
|
182
|
+
role: data["role"],
|
|
183
|
+
active: data["active"],
|
|
184
|
+
email_address: data["email_address"],
|
|
185
|
+
created_at: data["created_at"],
|
|
96
186
|
url: data["url"],
|
|
97
|
-
|
|
187
|
+
avatar_url: data["avatar_url"],
|
|
188
|
+
has_access: data["has_access"],
|
|
189
|
+
involvement: data["involvement"]
|
|
190
|
+
)
|
|
191
|
+
end
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# @generated
|
|
195
|
+
BoardAccesses = Data.define(:board_id, :all_access, :users) do
|
|
196
|
+
# @param data [Hash] raw JSON response
|
|
197
|
+
def self.from_json(data)
|
|
198
|
+
new(
|
|
199
|
+
board_id: data["board_id"],
|
|
200
|
+
all_access: data["all_access"],
|
|
201
|
+
users: data["users"]&.map { |item| BoardAccessUser.from_json(item) }
|
|
98
202
|
)
|
|
99
203
|
end
|
|
100
204
|
end
|
|
@@ -129,14 +233,14 @@ module Fizzy
|
|
|
129
233
|
last_active_at: data["last_active_at"],
|
|
130
234
|
created_at: data["created_at"],
|
|
131
235
|
url: data["url"],
|
|
132
|
-
board: data["board"],
|
|
133
|
-
column: data["column"],
|
|
134
|
-
creator: data["creator"],
|
|
135
|
-
assignees: data["assignees"],
|
|
236
|
+
board: data["board"] && Board.from_json(data["board"]),
|
|
237
|
+
column: data["column"] && Column.from_json(data["column"]),
|
|
238
|
+
creator: data["creator"] && User.from_json(data["creator"]),
|
|
239
|
+
assignees: data["assignees"]&.map { |item| User.from_json(item) },
|
|
136
240
|
has_more_assignees: data["has_more_assignees"],
|
|
137
241
|
comments_url: data["comments_url"],
|
|
138
242
|
reactions_url: data["reactions_url"],
|
|
139
|
-
steps: data["steps"]
|
|
243
|
+
steps: data["steps"]&.map { |item| Step.from_json(item) }
|
|
140
244
|
)
|
|
141
245
|
end
|
|
142
246
|
end
|
|
@@ -164,14 +268,15 @@ module Fizzy
|
|
|
164
268
|
end
|
|
165
269
|
|
|
166
270
|
# @generated
|
|
167
|
-
Column = Data.define(:id, :name, :color, :created_at) do
|
|
271
|
+
Column = Data.define(:id, :name, :color, :created_at, :cards_url) do
|
|
168
272
|
# @param data [Hash] raw JSON response
|
|
169
273
|
def self.from_json(data)
|
|
170
274
|
new(
|
|
171
275
|
id: data["id"],
|
|
172
276
|
name: data["name"],
|
|
173
|
-
color: data["color"],
|
|
174
|
-
created_at: data["created_at"]
|
|
277
|
+
color: data["color"] && Color.from_json(data["color"]),
|
|
278
|
+
created_at: data["created_at"],
|
|
279
|
+
cards_url: data["cards_url"]
|
|
175
280
|
)
|
|
176
281
|
end
|
|
177
282
|
end
|
|
@@ -184,9 +289,9 @@ module Fizzy
|
|
|
184
289
|
id: data["id"],
|
|
185
290
|
created_at: data["created_at"],
|
|
186
291
|
updated_at: data["updated_at"],
|
|
187
|
-
body: data["body"],
|
|
188
|
-
creator: data["creator"],
|
|
189
|
-
card: data["card"],
|
|
292
|
+
body: data["body"] && RichTextBody.from_json(data["body"]),
|
|
293
|
+
creator: data["creator"] && User.from_json(data["creator"]),
|
|
294
|
+
card: data["card"] && CardRef.from_json(data["card"]),
|
|
190
295
|
reactions_url: data["reactions_url"],
|
|
191
296
|
url: data["url"]
|
|
192
297
|
)
|
|
@@ -376,6 +481,9 @@ module Fizzy
|
|
|
376
481
|
# @generated
|
|
377
482
|
CreateStepResponseContent = Data.define
|
|
378
483
|
|
|
484
|
+
# @generated
|
|
485
|
+
CreateUserDataExportResponseContent = Data.define
|
|
486
|
+
|
|
379
487
|
# @generated
|
|
380
488
|
CreateWebhookRequestContent = Data.define(:name, :url, :subscribed_actions) do
|
|
381
489
|
# @param data [Hash] raw JSON response
|
|
@@ -391,6 +499,19 @@ module Fizzy
|
|
|
391
499
|
# @generated
|
|
392
500
|
CreateWebhookResponseContent = Data.define
|
|
393
501
|
|
|
502
|
+
# @generated
|
|
503
|
+
DataExport = Data.define(:id, :status, :created_at, :download_url) do
|
|
504
|
+
# @param data [Hash] raw JSON response
|
|
505
|
+
def self.from_json(data)
|
|
506
|
+
new(
|
|
507
|
+
id: data["id"],
|
|
508
|
+
status: data["status"],
|
|
509
|
+
created_at: data["created_at"],
|
|
510
|
+
download_url: data["download_url"]
|
|
511
|
+
)
|
|
512
|
+
end
|
|
513
|
+
end
|
|
514
|
+
|
|
394
515
|
# @generated
|
|
395
516
|
DirectUpload = Data.define(:id, :key, :filename, :content_type, :byte_size, :checksum, :direct_upload) do
|
|
396
517
|
# @param data [Hash] raw JSON response
|
|
@@ -402,7 +523,7 @@ module Fizzy
|
|
|
402
523
|
content_type: data["content_type"],
|
|
403
524
|
byte_size: data["byte_size"],
|
|
404
525
|
checksum: data["checksum"],
|
|
405
|
-
direct_upload: data["direct_upload"]
|
|
526
|
+
direct_upload: data["direct_upload"] && DirectUploadMetadata.from_json(data["direct_upload"])
|
|
406
527
|
)
|
|
407
528
|
end
|
|
408
529
|
end
|
|
@@ -424,7 +545,7 @@ module Fizzy
|
|
|
424
545
|
def self.from_json(data)
|
|
425
546
|
new(
|
|
426
547
|
url: data["url"],
|
|
427
|
-
headers: data["headers"]
|
|
548
|
+
headers: data["headers"] && DirectUploadHeaders.from_json(data["headers"])
|
|
428
549
|
)
|
|
429
550
|
end
|
|
430
551
|
end
|
|
@@ -472,6 +593,9 @@ module Fizzy
|
|
|
472
593
|
# @generated
|
|
473
594
|
GetStepResponseContent = Data.define
|
|
474
595
|
|
|
596
|
+
# @generated
|
|
597
|
+
GetUserDataExportResponseContent = Data.define
|
|
598
|
+
|
|
475
599
|
# @generated
|
|
476
600
|
GetUserResponseContent = Data.define
|
|
477
601
|
|
|
@@ -486,7 +610,7 @@ module Fizzy
|
|
|
486
610
|
id: data["id"],
|
|
487
611
|
name: data["name"],
|
|
488
612
|
email_address: data["email_address"],
|
|
489
|
-
accounts: data["accounts"]
|
|
613
|
+
accounts: data["accounts"]&.map { |item| Account.from_json(item) }
|
|
490
614
|
)
|
|
491
615
|
end
|
|
492
616
|
end
|
|
@@ -502,13 +626,15 @@ module Fizzy
|
|
|
502
626
|
end
|
|
503
627
|
|
|
504
628
|
# @generated
|
|
505
|
-
JoinCode = Data.define(:code, :url, :usage_limit) do
|
|
629
|
+
JoinCode = Data.define(:code, :url, :usage_count, :usage_limit, :active) do
|
|
506
630
|
# @param data [Hash] raw JSON response
|
|
507
631
|
def self.from_json(data)
|
|
508
632
|
new(
|
|
509
633
|
code: data["code"],
|
|
510
634
|
url: data["url"],
|
|
511
|
-
|
|
635
|
+
usage_count: data["usage_count"],
|
|
636
|
+
usage_limit: data["usage_limit"],
|
|
637
|
+
active: data["active"]
|
|
512
638
|
)
|
|
513
639
|
end
|
|
514
640
|
end
|
|
@@ -516,6 +642,12 @@ module Fizzy
|
|
|
516
642
|
# @generated
|
|
517
643
|
ListAccessTokensResponseContent = Data.define
|
|
518
644
|
|
|
645
|
+
# @generated
|
|
646
|
+
ListActivitiesResponseContent = Data.define
|
|
647
|
+
|
|
648
|
+
# @generated
|
|
649
|
+
ListBoardAccessesResponseContent = Data.define
|
|
650
|
+
|
|
519
651
|
# @generated
|
|
520
652
|
ListBoardsResponseContent = Data.define
|
|
521
653
|
|
|
@@ -528,6 +660,9 @@ module Fizzy
|
|
|
528
660
|
# @generated
|
|
529
661
|
ListClosedCardsResponseContent = Data.define
|
|
530
662
|
|
|
663
|
+
# @generated
|
|
664
|
+
ListColumnCardsResponseContent = Data.define
|
|
665
|
+
|
|
531
666
|
# @generated
|
|
532
667
|
ListColumnsResponseContent = Data.define
|
|
533
668
|
|
|
@@ -558,6 +693,9 @@ module Fizzy
|
|
|
558
693
|
# @generated
|
|
559
694
|
ListUsersResponseContent = Data.define
|
|
560
695
|
|
|
696
|
+
# @generated
|
|
697
|
+
ListWebhookDeliveriesResponseContent = Data.define
|
|
698
|
+
|
|
561
699
|
# @generated
|
|
562
700
|
ListWebhooksResponseContent = Data.define
|
|
563
701
|
|
|
@@ -598,8 +736,8 @@ module Fizzy
|
|
|
598
736
|
source_type: data["source_type"],
|
|
599
737
|
title: data["title"],
|
|
600
738
|
body: data["body"],
|
|
601
|
-
creator: data["creator"],
|
|
602
|
-
card: data["card"],
|
|
739
|
+
creator: data["creator"] && User.from_json(data["creator"]),
|
|
740
|
+
card: data["card"] && NotificationCard.from_json(data["card"]),
|
|
603
741
|
url: data["url"]
|
|
604
742
|
)
|
|
605
743
|
end
|
|
@@ -618,7 +756,7 @@ module Fizzy
|
|
|
618
756
|
closed: data["closed"],
|
|
619
757
|
postponed: data["postponed"],
|
|
620
758
|
url: data["url"],
|
|
621
|
-
column: data["column"]
|
|
759
|
+
column: data["column"] && Column.from_json(data["column"])
|
|
622
760
|
)
|
|
623
761
|
end
|
|
624
762
|
end
|
|
@@ -660,7 +798,7 @@ module Fizzy
|
|
|
660
798
|
new(
|
|
661
799
|
id: data["id"],
|
|
662
800
|
content: data["content"],
|
|
663
|
-
reacter: data["reacter"],
|
|
801
|
+
reacter: data["reacter"] && User.from_json(data["reacter"]),
|
|
664
802
|
url: data["url"]
|
|
665
803
|
)
|
|
666
804
|
end
|
|
@@ -691,6 +829,16 @@ module Fizzy
|
|
|
691
829
|
end
|
|
692
830
|
end
|
|
693
831
|
|
|
832
|
+
# @generated
|
|
833
|
+
RequestEmailAddressChangeRequestContent = Data.define(:email_address) do
|
|
834
|
+
# @param data [Hash] raw JSON response
|
|
835
|
+
def self.from_json(data)
|
|
836
|
+
new(
|
|
837
|
+
email_address: data["email_address"]
|
|
838
|
+
)
|
|
839
|
+
end
|
|
840
|
+
end
|
|
841
|
+
|
|
694
842
|
# @generated
|
|
695
843
|
RichTextBody = Data.define(:plain_text, :html) do
|
|
696
844
|
# @param data [Hash] raw JSON response
|
|
@@ -728,6 +876,9 @@ module Fizzy
|
|
|
728
876
|
end
|
|
729
877
|
end
|
|
730
878
|
|
|
879
|
+
# @generated
|
|
880
|
+
StringMap = Data.define
|
|
881
|
+
|
|
731
882
|
# @generated
|
|
732
883
|
Tag = Data.define(:id, :title, :created_at, :url) do
|
|
733
884
|
# @param data [Hash] raw JSON response
|
|
@@ -979,18 +1130,84 @@ module Fizzy
|
|
|
979
1130
|
end
|
|
980
1131
|
|
|
981
1132
|
# @generated
|
|
982
|
-
Webhook = Data.define(:id, :name, :url, :subscribed_actions, :signing_secret, :active, :created_at, :updated_at) do
|
|
1133
|
+
Webhook = Data.define(:id, :name, :payload_url, :url, :subscribed_actions, :signing_secret, :active, :created_at, :updated_at, :board) do
|
|
983
1134
|
# @param data [Hash] raw JSON response
|
|
984
1135
|
def self.from_json(data)
|
|
985
1136
|
new(
|
|
986
1137
|
id: data["id"],
|
|
987
1138
|
name: data["name"],
|
|
1139
|
+
payload_url: data["payload_url"],
|
|
988
1140
|
url: data["url"],
|
|
989
1141
|
subscribed_actions: data["subscribed_actions"],
|
|
990
1142
|
signing_secret: data["signing_secret"],
|
|
991
1143
|
active: data["active"],
|
|
992
1144
|
created_at: data["created_at"],
|
|
993
|
-
updated_at: data["updated_at"]
|
|
1145
|
+
updated_at: data["updated_at"],
|
|
1146
|
+
board: data["board"] && Board.from_json(data["board"])
|
|
1147
|
+
)
|
|
1148
|
+
end
|
|
1149
|
+
end
|
|
1150
|
+
|
|
1151
|
+
# @generated
|
|
1152
|
+
WebhookDelivery = Data.define(:id, :state, :created_at, :updated_at, :request, :response, :event) do
|
|
1153
|
+
# @param data [Hash] raw JSON response
|
|
1154
|
+
def self.from_json(data)
|
|
1155
|
+
new(
|
|
1156
|
+
id: data["id"],
|
|
1157
|
+
state: data["state"],
|
|
1158
|
+
created_at: data["created_at"],
|
|
1159
|
+
updated_at: data["updated_at"],
|
|
1160
|
+
request: data["request"] && WebhookDeliveryRequest.from_json(data["request"]),
|
|
1161
|
+
response: data["response"] && WebhookDeliveryResponse.from_json(data["response"]),
|
|
1162
|
+
event: data["event"] && WebhookDeliveryEvent.from_json(data["event"])
|
|
1163
|
+
)
|
|
1164
|
+
end
|
|
1165
|
+
end
|
|
1166
|
+
|
|
1167
|
+
# @generated
|
|
1168
|
+
WebhookDeliveryEvent = Data.define(:id, :action, :created_at, :creator, :eventable) do
|
|
1169
|
+
# @param data [Hash] raw JSON response
|
|
1170
|
+
def self.from_json(data)
|
|
1171
|
+
new(
|
|
1172
|
+
id: data["id"],
|
|
1173
|
+
action: data["action"],
|
|
1174
|
+
created_at: data["created_at"],
|
|
1175
|
+
creator: data["creator"] && WebhookDeliveryEventCreator.from_json(data["creator"]),
|
|
1176
|
+
eventable: data["eventable"] && WebhookDeliveryEventEventable.from_json(data["eventable"])
|
|
1177
|
+
)
|
|
1178
|
+
end
|
|
1179
|
+
end
|
|
1180
|
+
|
|
1181
|
+
# @generated
|
|
1182
|
+
WebhookDeliveryEventCreator = Data.define(:id, :name) do
|
|
1183
|
+
# @param data [Hash] raw JSON response
|
|
1184
|
+
def self.from_json(data)
|
|
1185
|
+
new(
|
|
1186
|
+
id: data["id"],
|
|
1187
|
+
name: data["name"]
|
|
1188
|
+
)
|
|
1189
|
+
end
|
|
1190
|
+
end
|
|
1191
|
+
|
|
1192
|
+
# @generated
|
|
1193
|
+
WebhookDeliveryEventEventable = Data.define(:type, :id, :url) do
|
|
1194
|
+
# @param data [Hash] raw JSON response
|
|
1195
|
+
def self.from_json(data)
|
|
1196
|
+
new(
|
|
1197
|
+
type: data["type"],
|
|
1198
|
+
id: data["id"],
|
|
1199
|
+
url: data["url"]
|
|
1200
|
+
)
|
|
1201
|
+
end
|
|
1202
|
+
end
|
|
1203
|
+
|
|
1204
|
+
# @generated
|
|
1205
|
+
WebhookDeliveryResponse = Data.define(:code, :error) do
|
|
1206
|
+
# @param data [Hash] raw JSON response
|
|
1207
|
+
def self.from_json(data)
|
|
1208
|
+
new(
|
|
1209
|
+
code: data["code"],
|
|
1210
|
+
error: data["error"]
|
|
994
1211
|
)
|
|
995
1212
|
end
|
|
996
1213
|
end
|
data/lib/fizzy/version.rb
CHANGED
|
@@ -192,7 +192,14 @@ class ServiceGenerator
|
|
|
192
192
|
'CompleteSignup' => 'Sessions',
|
|
193
193
|
'GetNotificationTray' => 'Notifications',
|
|
194
194
|
'BulkReadNotifications' => 'Notifications',
|
|
195
|
-
'DeleteCardImage' => 'Cards'
|
|
195
|
+
'DeleteCardImage' => 'Cards',
|
|
196
|
+
'ListBoardAccesses' => 'Boards',
|
|
197
|
+
'ListActivities' => 'Cards',
|
|
198
|
+
'RequestEmailAddressChange' => 'Users',
|
|
199
|
+
'ConfirmEmailAddressChange' => 'Users',
|
|
200
|
+
'CreateUserDataExport' => 'Users',
|
|
201
|
+
'GetUserDataExport' => 'Users',
|
|
202
|
+
'ListWebhookDeliveries' => 'Webhooks'
|
|
196
203
|
}.freeze
|
|
197
204
|
|
|
198
205
|
SERVICE_SUFFIXES = [
|
|
@@ -392,7 +399,8 @@ class ServiceGenerator
|
|
|
392
399
|
end
|
|
393
400
|
|
|
394
401
|
def to_snake_case(str)
|
|
395
|
-
str.gsub(
|
|
402
|
+
str.gsub(/\[\]\z/, '')
|
|
403
|
+
.gsub(/([a-z\d])([A-Z])/, '\1_\2')
|
|
396
404
|
.gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
|
|
397
405
|
.downcase
|
|
398
406
|
end
|
data/scripts/generate-types.rb
CHANGED
|
@@ -74,7 +74,7 @@ class TypeGenerator
|
|
|
74
74
|
ruby_type = schema_to_ruby_type(field_schema)
|
|
75
75
|
required = required_fields.include?(field_name)
|
|
76
76
|
{ name: ruby_name, json_name: field_name, type: ruby_type, required: required, \
|
|
77
|
-
description: field_schema["description"] }
|
|
77
|
+
description: field_schema["description"], schema: field_schema }
|
|
78
78
|
end
|
|
79
79
|
|
|
80
80
|
if fields.empty?
|
|
@@ -92,7 +92,8 @@ class TypeGenerator
|
|
|
92
92
|
fields.each_with_index do |f, i|
|
|
93
93
|
comma = i < fields.length - 1 ? "," : ""
|
|
94
94
|
accessor = "data[\"#{f[:json_name]}\"]"
|
|
95
|
-
|
|
95
|
+
value = json_value_expression(f[:schema], accessor)
|
|
96
|
+
lines << " #{f[:name]}: #{value}#{comma}"
|
|
96
97
|
end
|
|
97
98
|
|
|
98
99
|
lines << " )"
|
|
@@ -102,13 +103,29 @@ class TypeGenerator
|
|
|
102
103
|
lines
|
|
103
104
|
end
|
|
104
105
|
|
|
106
|
+
def json_value_expression(schema, accessor)
|
|
107
|
+
ref_name = schema_ref_name(schema)
|
|
108
|
+
return "#{accessor} && #{ref_name}.from_json(#{accessor})" if ref_name
|
|
109
|
+
|
|
110
|
+
if schema["type"] == "array"
|
|
111
|
+
item_ref_name = schema_ref_name(schema["items"])
|
|
112
|
+
return "#{accessor}&.map { |item| #{item_ref_name}.from_json(item) }" if item_ref_name
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
accessor
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
def schema_ref_name(schema)
|
|
119
|
+
return nil unless schema && schema["$ref"]
|
|
120
|
+
|
|
121
|
+
schema["$ref"].split("/").last
|
|
122
|
+
end
|
|
123
|
+
|
|
105
124
|
def schema_to_ruby_type(schema)
|
|
106
125
|
return "Object" unless schema
|
|
107
126
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
return ref_name
|
|
111
|
-
end
|
|
127
|
+
ref_name = schema_ref_name(schema)
|
|
128
|
+
return ref_name if ref_name
|
|
112
129
|
|
|
113
130
|
case schema["type"]
|
|
114
131
|
when "integer" then "Integer"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fizzy-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Basecamp
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-04-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|