monday_ruby 1.2.0 → 1.2.1

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.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +10 -0
  3. data/lib/monday/version.rb +1 -1
  4. metadata +3 -79
  5. data/.env +0 -1
  6. data/.rspec +0 -2
  7. data/.rubocop.yml +0 -41
  8. data/.simplecov +0 -4
  9. data/.vscode/settings.json +0 -4
  10. data/CODE_OF_CONDUCT.md +0 -84
  11. data/CONTRIBUTING.md +0 -190
  12. data/Rakefile +0 -11
  13. data/docs/.vitepress/config.mjs +0 -255
  14. data/docs/.vitepress/theme/index.js +0 -4
  15. data/docs/.vitepress/theme/style.css +0 -43
  16. data/docs/README.md +0 -80
  17. data/docs/explanation/architecture.md +0 -507
  18. data/docs/explanation/best-practices/errors.md +0 -478
  19. data/docs/explanation/best-practices/performance.md +0 -1084
  20. data/docs/explanation/best-practices/rate-limiting.md +0 -630
  21. data/docs/explanation/best-practices/testing.md +0 -820
  22. data/docs/explanation/column-values.md +0 -857
  23. data/docs/explanation/design.md +0 -795
  24. data/docs/explanation/graphql.md +0 -356
  25. data/docs/explanation/migration/v1.md +0 -808
  26. data/docs/explanation/pagination.md +0 -447
  27. data/docs/guides/advanced/batch.md +0 -1274
  28. data/docs/guides/advanced/complex-queries.md +0 -1114
  29. data/docs/guides/advanced/errors.md +0 -818
  30. data/docs/guides/advanced/pagination.md +0 -934
  31. data/docs/guides/advanced/rate-limiting.md +0 -981
  32. data/docs/guides/authentication.md +0 -286
  33. data/docs/guides/boards/create.md +0 -386
  34. data/docs/guides/boards/delete.md +0 -405
  35. data/docs/guides/boards/duplicate.md +0 -511
  36. data/docs/guides/boards/query.md +0 -530
  37. data/docs/guides/boards/update.md +0 -453
  38. data/docs/guides/columns/create.md +0 -452
  39. data/docs/guides/columns/metadata.md +0 -492
  40. data/docs/guides/columns/query.md +0 -455
  41. data/docs/guides/columns/update-multiple.md +0 -459
  42. data/docs/guides/columns/update-values.md +0 -509
  43. data/docs/guides/files/add-to-column.md +0 -40
  44. data/docs/guides/files/add-to-update.md +0 -37
  45. data/docs/guides/files/clear-column.md +0 -33
  46. data/docs/guides/first-request.md +0 -285
  47. data/docs/guides/folders/manage.md +0 -750
  48. data/docs/guides/groups/items.md +0 -626
  49. data/docs/guides/groups/manage.md +0 -501
  50. data/docs/guides/installation.md +0 -169
  51. data/docs/guides/items/create.md +0 -493
  52. data/docs/guides/items/delete.md +0 -514
  53. data/docs/guides/items/query.md +0 -605
  54. data/docs/guides/items/subitems.md +0 -483
  55. data/docs/guides/items/update.md +0 -699
  56. data/docs/guides/updates/manage.md +0 -619
  57. data/docs/guides/use-cases/dashboard.md +0 -1421
  58. data/docs/guides/use-cases/import.md +0 -1962
  59. data/docs/guides/use-cases/task-management.md +0 -1381
  60. data/docs/guides/workspaces/manage.md +0 -502
  61. data/docs/index.md +0 -69
  62. data/docs/package-lock.json +0 -2468
  63. data/docs/package.json +0 -13
  64. data/docs/reference/client.md +0 -540
  65. data/docs/reference/configuration.md +0 -586
  66. data/docs/reference/errors.md +0 -693
  67. data/docs/reference/resources/account.md +0 -208
  68. data/docs/reference/resources/activity-log.md +0 -369
  69. data/docs/reference/resources/board-view.md +0 -359
  70. data/docs/reference/resources/board.md +0 -393
  71. data/docs/reference/resources/column.md +0 -543
  72. data/docs/reference/resources/file.md +0 -236
  73. data/docs/reference/resources/folder.md +0 -386
  74. data/docs/reference/resources/group.md +0 -507
  75. data/docs/reference/resources/item.md +0 -348
  76. data/docs/reference/resources/subitem.md +0 -267
  77. data/docs/reference/resources/update.md +0 -259
  78. data/docs/reference/resources/workspace.md +0 -213
  79. data/docs/reference/response.md +0 -560
  80. data/docs/tutorial/first-integration.md +0 -713
@@ -1,393 +0,0 @@
1
- # Board
2
-
3
- Access and manage boards via the `client.board` resource.
4
-
5
- ## Methods
6
-
7
- ### query
8
-
9
- Retrieves boards from your account.
10
-
11
- ```ruby
12
- client.board.query(args: {}, select: DEFAULT_SELECT)
13
- ```
14
-
15
- **Parameters:**
16
-
17
- | Name | Type | Default | Description |
18
- |------|------|---------|-------------|
19
- | `args` | Hash | `{}` | Query arguments (see [boards query](https://developer.monday.com/api-reference/reference/boards#queries)) |
20
- | `select` | Array | `["id", "name", "description"]` | Fields to retrieve |
21
-
22
- **Returns:** `Monday::Response`
23
-
24
- **Common args:**
25
- - `ids` - Array of board IDs
26
- - `limit` - Number of results (default: 25)
27
- - `page` - Page number
28
- - `state` - `:active`, `:archived`, `:deleted`, or `:all`
29
- - `board_kind` - `:public`, `:private`, or `:share`
30
- - `workspace_ids` - Array of workspace IDs
31
- - `order_by` - `:created_at` or `:used_at`
32
-
33
- **Example:**
34
-
35
- ```ruby
36
- response = client.board.query(
37
- args: { ids: [123, 456], state: :active },
38
- select: ["id", "name", "url"]
39
- )
40
-
41
- boards = response.body.dig("data", "boards")
42
- ```
43
-
44
- **GraphQL:** `query { boards { ... } }`
45
-
46
- **See:** [monday.com boards query](https://developer.monday.com/api-reference/reference/boards#queries)
47
-
48
- ### create
49
-
50
- Creates a new board.
51
-
52
- ```ruby
53
- client.board.create(args: {}, select: DEFAULT_SELECT)
54
- ```
55
-
56
- **Parameters:**
57
-
58
- | Name | Type | Default | Description |
59
- |------|------|---------|-------------|
60
- | `args` | Hash | `{}` | Creation arguments (required) |
61
- | `select` | Array | `["id", "name", "description"]` | Fields to retrieve |
62
-
63
- **Required args:**
64
- - `board_name` - String
65
- - `board_kind` - Symbol (`:public`, `:private`, or `:share`)
66
-
67
- **Optional args:**
68
- - `description` - String
69
- - `workspace_id` - Integer
70
- - `folder_id` - Integer
71
- - `template_id` - Integer
72
-
73
- **Returns:** `Monday::Response`
74
-
75
- **Example:**
76
-
77
- ```ruby
78
- response = client.board.create(
79
- args: {
80
- board_name: "New Board",
81
- board_kind: :public
82
- }
83
- )
84
-
85
- board = response.body.dig("data", "create_board")
86
- ```
87
-
88
- **GraphQL:** `mutation { create_board { ... } }`
89
-
90
- **See:** [monday.com create_board](https://developer.monday.com/api-reference/reference/boards#create-board)
91
-
92
- ### update
93
-
94
- Updates a board's attributes.
95
-
96
- ```ruby
97
- client.board.update(args: {})
98
- ```
99
-
100
- **Parameters:**
101
-
102
- | Name | Type | Default | Description |
103
- |------|------|---------|-------------|
104
- | `args` | Hash | `{}` | Update arguments (required) |
105
-
106
- **Required args:**
107
- - `board_id` - Integer
108
- - `board_attribute` - Symbol (`:name`, `:description`, or `:communication`)
109
- - `new_value` - String
110
-
111
- **Returns:** `Monday::Response`
112
-
113
- The response body contains a JSON string at `response.body["data"]["update_board"]` that must be parsed:
114
-
115
- ```ruby
116
- result = JSON.parse(response.body["data"]["update_board"])
117
- # => { "success" => true, "undo_data" => "..." }
118
- ```
119
-
120
- **Example:**
121
-
122
- ```ruby
123
- response = client.board.update(
124
- args: {
125
- board_id: 123,
126
- board_attribute: :name,
127
- new_value: "Updated Name"
128
- }
129
- )
130
-
131
- result = JSON.parse(response.body["data"]["update_board"])
132
- ```
133
-
134
- **GraphQL:** `mutation { update_board { ... } }`
135
-
136
- **See:** [monday.com update_board](https://developer.monday.com/api-reference/reference/boards#update-board)
137
-
138
- ### duplicate
139
-
140
- Duplicates an existing board.
141
-
142
- ```ruby
143
- client.board.duplicate(args: {}, select: DEFAULT_SELECT)
144
- ```
145
-
146
- **Parameters:**
147
-
148
- | Name | Type | Default | Description |
149
- |------|------|---------|-------------|
150
- | `args` | Hash | `{}` | Duplication arguments (required) |
151
- | `select` | Array | `["id", "name", "description"]` | Fields to retrieve |
152
-
153
- **Required args:**
154
- - `board_id` - Integer
155
- - `duplicate_type` - Symbol
156
-
157
- **Duplicate types:**
158
- - `:duplicate_board_with_structure` - Structure only
159
- - `:duplicate_board_with_pulses` - Structure + items
160
- - `:duplicate_board_with_pulses_and_updates` - Structure + items + updates
161
-
162
- **Optional args:**
163
- - `board_name` - String
164
- - `workspace_id` - Integer
165
- - `folder_id` - Integer
166
- - `keep_subscribers` - Boolean
167
-
168
- **Returns:** `Monday::Response`
169
-
170
- The duplicated board is nested under `board`:
171
-
172
- ```ruby
173
- board = response.body.dig("data", "duplicate_board", "board")
174
- ```
175
-
176
- **Example:**
177
-
178
- ```ruby
179
- response = client.board.duplicate(
180
- args: {
181
- board_id: 123,
182
- duplicate_type: :duplicate_board_with_structure
183
- }
184
- )
185
-
186
- board = response.body.dig("data", "duplicate_board", "board")
187
- ```
188
-
189
- **GraphQL:** `mutation { duplicate_board { board { ... } } }`
190
-
191
- **See:** [monday.com duplicate_board](https://developer.monday.com/api-reference/reference/boards#duplicate-board)
192
-
193
- ### archive
194
-
195
- Archives a board.
196
-
197
- ```ruby
198
- client.board.archive(board_id, select: ["id"])
199
- ```
200
-
201
- **Parameters:**
202
-
203
- | Name | Type | Default | Description |
204
- |------|------|---------|-------------|
205
- | `board_id` | Integer | - | Board ID to archive (required) |
206
- | `select` | Array | `["id"]` | Fields to retrieve |
207
-
208
- **Returns:** `Monday::Response`
209
-
210
- **Example:**
211
-
212
- ```ruby
213
- response = client.board.archive(123)
214
-
215
- board = response.body.dig("data", "archive_board")
216
- ```
217
-
218
- **GraphQL:** `mutation { archive_board { ... } }`
219
-
220
- **See:** [monday.com archive_board](https://developer.monday.com/api-reference/reference/boards#archive-board)
221
-
222
- ### delete
223
-
224
- Permanently deletes a board.
225
-
226
- ```ruby
227
- client.board.delete(board_id, select: ["id"])
228
- ```
229
-
230
- **Parameters:**
231
-
232
- | Name | Type | Default | Description |
233
- |------|------|---------|-------------|
234
- | `board_id` | Integer | - | Board ID to delete (required) |
235
- | `select` | Array | `["id"]` | Fields to retrieve |
236
-
237
- **Returns:** `Monday::Response`
238
-
239
- ::: warning <span style="display: inline-flex; align-items: center; gap: 6px;"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>Permanent Deletion</span>
240
- This operation cannot be undone. All board data will be permanently lost.
241
- :::
242
-
243
- **Example:**
244
-
245
- ```ruby
246
- response = client.board.delete(123)
247
-
248
- board = response.body.dig("data", "delete_board")
249
- ```
250
-
251
- **GraphQL:** `mutation { delete_board { ... } }`
252
-
253
- **See:** [monday.com delete_board](https://developer.monday.com/api-reference/reference/boards#delete-board)
254
-
255
- ### items_page
256
-
257
- Retrieves paginated items from a board using cursor-based pagination.
258
-
259
- ```ruby
260
- client.board.items_page(
261
- board_ids:,
262
- limit: 25,
263
- cursor: nil,
264
- query_params: nil,
265
- select: DEFAULT_PAGINATED_SELECT
266
- )
267
- ```
268
-
269
- **Parameters:**
270
-
271
- | Name | Type | Default | Description |
272
- |------|------|---------|-------------|
273
- | `board_ids` | Integer or Array | - | Board ID(s) to query (required) |
274
- | `limit` | Integer | `25` | Items per page (max: 500) |
275
- | `cursor` | String | `nil` | Pagination cursor |
276
- | `query_params` | Hash | `nil` | Query filters with rules and operators |
277
- | `select` | Array | `["id", "name"]` | Item fields to retrieve |
278
-
279
- **Returns:** `Monday::Response`
280
-
281
- The response contains items and cursor:
282
-
283
- ```ruby
284
- items_page = response.body.dig("data", "boards", 0, "items_page")
285
- items = items_page["items"]
286
- cursor = items_page["cursor"]
287
- ```
288
-
289
- **Example:**
290
-
291
- ```ruby
292
- # First page
293
- response = client.board.items_page(
294
- board_ids: 123,
295
- limit: 50
296
- )
297
-
298
- items_page = response.body.dig("data", "boards", 0, "items_page")
299
- cursor = items_page["cursor"]
300
-
301
- # Next page
302
- response = client.board.items_page(
303
- board_ids: 123,
304
- cursor: cursor
305
- )
306
- ```
307
-
308
- **GraphQL:** `query { boards { items_page { ... } } }`
309
-
310
- **See:**
311
- - [monday.com items_page](https://developer.monday.com/api-reference/reference/items-page)
312
- - [Pagination guide](/guides/advanced/pagination)
313
-
314
- ### delete_subscribers
315
-
316
- ::: warning <span style="display: inline-flex; align-items: center; gap: 6px;"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>Deprecated</span>
317
- This method is deprecated and will be removed in v2.0.0. Use `client.user.delete_from_board` instead.
318
- :::
319
-
320
- Deletes subscribers from a board.
321
-
322
- ```ruby
323
- client.board.delete_subscribers(board_id, user_ids, select: ["id"])
324
- ```
325
-
326
- **Parameters:**
327
-
328
- | Name | Type | Default | Description |
329
- |------|------|---------|-------------|
330
- | `board_id` | Integer | - | Board ID (required) |
331
- | `user_ids` | Integer[] | - | User IDs to remove (required) |
332
- | `select` | Array | `["id"]` | Fields to retrieve | -->
333
-
334
- **Returns:** `Monday::Response`
335
-
336
- **GraphQL:** `mutation { delete_subscribers_from_board { ... } }`
337
-
338
- ## Response Structure
339
-
340
- All methods return a `Monday::Response` object. Access data using:
341
-
342
- ```ruby
343
- response.success? # => true/false
344
- response.status # => 200
345
- response.body # => Hash with GraphQL response
346
- ```
347
-
348
- ### Typical Response Pattern
349
-
350
- ```ruby
351
- response = client.board.query(args: { ids: [123] })
352
-
353
- if response.success?
354
- boards = response.body.dig("data", "boards")
355
- # Work with boards
356
- else
357
- # Handle error
358
- end
359
- ```
360
-
361
- ## Constants
362
-
363
- ### DEFAULT_SELECT
364
-
365
- Default fields returned by `query`, `create`, and `duplicate`:
366
-
367
- ```ruby
368
- ["id", "name", "description"]
369
- ```
370
-
371
- ### DEFAULT_PAGINATED_SELECT
372
-
373
- Default fields returned by `items_page`:
374
-
375
- ```ruby
376
- ["id", "name"]
377
- ```
378
-
379
- ## Error Handling
380
-
381
- See the [Error Handling guide](/guides/advanced/errors) for common errors and how to handle them.
382
-
383
- ## Related Resources
384
-
385
- - [Item](/reference/resources/item) - Board items
386
- - [Column](/reference/resources/column) - Board columns
387
- - [Group](/reference/resources/group) - Board groups
388
- - [Workspace](/reference/resources/workspace) - Board workspaces
389
-
390
- ## External References
391
-
392
- - [monday.com Boards API](https://developer.monday.com/api-reference/reference/boards)
393
- - [GraphQL API Overview](https://developer.monday.com/api-reference/docs/introduction-to-graphql)