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,259 +0,0 @@
1
- # Update
2
-
3
- Access and manage updates (comments) via the `client.update` resource.
4
-
5
- ::: tip <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"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line></svg>What are Updates?</span>
6
- Updates are comments or posts made on items in monday.com. They appear in the item's updates section and can include text, mentions, and attachments.
7
- :::
8
-
9
- ## Methods
10
-
11
- ### query
12
-
13
- Retrieves updates from your account.
14
-
15
- ```ruby
16
- client.update.query(args: {}, select: DEFAULT_SELECT)
17
- ```
18
-
19
- **Parameters:**
20
-
21
- | Name | Type | Default | Description |
22
- |------|------|---------|-------------|
23
- | `args` | Hash | `{}` | Query arguments (see [updates query](https://developer.monday.com/api-reference/reference/updates#queries)) |
24
- | `select` | Array | `["id", "body", "created_at"]` | Fields to retrieve |
25
-
26
- **Returns:** `Monday::Response`
27
-
28
- **Common args:**
29
- - `ids` - Array of update IDs to retrieve
30
- - `limit` - Number of results (default: 25)
31
- - `page` - Page number
32
-
33
- **Example:**
34
-
35
- ```ruby
36
- response = client.update.query(
37
- args: { limit: 10 },
38
- select: ["id", "body", "created_at", "creator { id name }"]
39
- )
40
-
41
- updates = response.body.dig("data", "updates")
42
- updates.each do |update|
43
- puts "#{update.dig('creator', 'name')}: #{update['body']}"
44
- end
45
- ```
46
-
47
- **GraphQL:** `query { updates { ... } }`
48
-
49
- **See:** [monday.com updates query](https://developer.monday.com/api-reference/reference/updates#queries)
50
-
51
- ### create
52
-
53
- Creates a new update (comment) on an item.
54
-
55
- ```ruby
56
- client.update.create(args: {}, select: DEFAULT_SELECT)
57
- ```
58
-
59
- **Parameters:**
60
-
61
- | Name | Type | Default | Description |
62
- |------|------|---------|-------------|
63
- | `args` | Hash | `{}` | Creation arguments (required) |
64
- | `select` | Array | `["id", "body", "created_at"]` | Fields to retrieve |
65
-
66
- **Required args:**
67
- - `item_id` - Integer or String - Item to add update to
68
- - `body` - String - Update text content
69
-
70
- **Returns:** `Monday::Response`
71
-
72
- **Example:**
73
-
74
- ```ruby
75
- response = client.update.create(
76
- args: {
77
- item_id: 123456,
78
- body: "This is a comment on the item"
79
- }
80
- )
81
-
82
- update = response.body.dig("data", "create_update")
83
- # => {"id"=>"3325555116", "body"=>"This is a comment on the item", "created_at"=>"2024-07-25T03:46:49Z"}
84
- ```
85
-
86
- **GraphQL:** `mutation { create_update { ... } }`
87
-
88
- **See:** [monday.com create_update](https://developer.monday.com/api-reference/reference/updates#create-update)
89
-
90
- ### like
91
-
92
- Likes an update.
93
-
94
- ```ruby
95
- client.update.like(args: {}, select: ["id"])
96
- ```
97
-
98
- **Parameters:**
99
-
100
- | Name | Type | Default | Description |
101
- |------|------|---------|-------------|
102
- | `args` | Hash | `{}` | Arguments (required) |
103
- | `select` | Array | `["id"]` | Fields to retrieve |
104
-
105
- **Required args:**
106
- - `update_id` - Integer or String - Update ID to like
107
-
108
- **Returns:** `Monday::Response`
109
-
110
- **Example:**
111
-
112
- ```ruby
113
- response = client.update.like(
114
- args: { update_id: 3325555116 }
115
- )
116
-
117
- liked_update = response.body.dig("data", "like_update")
118
- # => {"id"=>"221186448"}
119
- ```
120
-
121
- **GraphQL:** `mutation { like_update { ... } }`
122
-
123
- **See:** [monday.com like_update](https://developer.monday.com/api-reference/reference/updates#like-update)
124
-
125
- ### clear_item_updates
126
-
127
- Clears all updates from an item.
128
-
129
- ```ruby
130
- client.update.clear_item_updates(args: {}, select: ["id"])
131
- ```
132
-
133
- **Parameters:**
134
-
135
- | Name | Type | Default | Description |
136
- |------|------|---------|-------------|
137
- | `args` | Hash | `{}` | Arguments (required) |
138
- | `select` | Array | `["id"]` | Fields to retrieve |
139
-
140
- **Required args:**
141
- - `item_id` - Integer or String - Item to clear updates from
142
-
143
- **Returns:** `Monday::Response`
144
-
145
- ::: 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>Destructive Operation</span>
146
- This permanently deletes all updates from the item. This cannot be undone.
147
- :::
148
-
149
- **Example:**
150
-
151
- ```ruby
152
- response = client.update.clear_item_updates(
153
- args: { item_id: 123456 }
154
- )
155
-
156
- result = response.body.dig("data", "clear_item_updates")
157
- # => {"id"=>"123456"}
158
- ```
159
-
160
- **GraphQL:** `mutation { clear_item_updates { ... } }`
161
-
162
- **See:** [monday.com clear_item_updates](https://developer.monday.com/api-reference/reference/updates#clear-item-updates)
163
-
164
- ### delete
165
-
166
- Permanently deletes an update.
167
-
168
- ```ruby
169
- client.update.delete(args: {}, select: ["id"])
170
- ```
171
-
172
- **Parameters:**
173
-
174
- | Name | Type | Default | Description |
175
- |------|------|---------|-------------|
176
- | `args` | Hash | `{}` | Arguments (required) |
177
- | `select` | Array | `["id"]` | Fields to retrieve |
178
-
179
- **Required args:**
180
- - `id` - Integer or String - Update ID to delete
181
-
182
- **Returns:** `Monday::Response`
183
-
184
- ::: 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>
185
- This operation cannot be undone. The update will be permanently deleted.
186
- :::
187
-
188
- **Example:**
189
-
190
- ```ruby
191
- response = client.update.delete(
192
- args: { id: 3325555116 }
193
- )
194
-
195
- deleted_update = response.body.dig("data", "delete_update")
196
- # => {"id"=>"3325555116"}
197
- ```
198
-
199
- **GraphQL:** `mutation { delete_update { ... } }`
200
-
201
- **See:** [monday.com delete_update](https://developer.monday.com/api-reference/reference/updates#delete-update)
202
-
203
- ## Response Structure
204
-
205
- All methods return a `Monday::Response` object. Access data using:
206
-
207
- ```ruby
208
- response.success? # => true/false
209
- response.status # => 200
210
- response.body # => Hash with GraphQL response
211
- ```
212
-
213
- ### Typical Response Pattern
214
-
215
- ```ruby
216
- response = client.update.create(
217
- args: {
218
- item_id: 123456,
219
- body: "Status update"
220
- }
221
- )
222
-
223
- if response.success?
224
- update = response.body.dig("data", "create_update")
225
- # Work with update
226
- else
227
- # Handle error
228
- end
229
- ```
230
-
231
- ## Constants
232
-
233
- ### DEFAULT_SELECT
234
-
235
- Default fields returned by `query` and `create`:
236
-
237
- ```ruby
238
- ["id", "body", "created_at"]
239
- ```
240
-
241
- ## Error Handling
242
-
243
- Common errors when working with updates:
244
-
245
- - `Monday::AuthorizationError` - Invalid or missing API token
246
- - `Monday::InvalidRequestError` - Invalid item_id or update_id
247
- - `Monday::Error` - Invalid field requested or other API errors
248
-
249
- See the [Error Handling guide](/guides/advanced/errors) for more details.
250
-
251
- ## Related Resources
252
-
253
- - [Item](/reference/resources/item) - Parent items that contain updates
254
- - [Board](/reference/resources/board) - Boards containing items
255
-
256
- ## External References
257
-
258
- - [monday.com Updates API](https://developer.monday.com/api-reference/reference/updates)
259
- - [GraphQL API Overview](https://developer.monday.com/api-reference/docs/introduction-to-graphql)
@@ -1,213 +0,0 @@
1
- # Workspace
2
-
3
- Access and manage workspaces via the `client.workspace` resource.
4
-
5
- ::: tip <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"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line></svg>What are Workspaces?</span>
6
- Workspaces are the highest level of organization in monday.com. They group related boards together and control access permissions. Think of them as team spaces or departmental hubs where you organize boards by project, team, or purpose.
7
- :::
8
-
9
- ## Methods
10
-
11
- ### query
12
-
13
- Retrieves workspaces from your account.
14
-
15
- ```ruby
16
- client.workspace.query(args: {}, select: DEFAULT_SELECT)
17
- ```
18
-
19
- **Parameters:**
20
-
21
- | Name | Type | Default | Description |
22
- |------|------|---------|-------------|
23
- | `args` | Hash | `{}` | Query arguments (see [workspaces query](https://developer.monday.com/api-reference/reference/workspaces#queries)) |
24
- | `select` | Array | `["id", "name", "description"]` | Fields to retrieve |
25
-
26
- **Returns:** `Monday::Response`
27
-
28
- **Common args:**
29
- - `ids` - Array of workspace IDs
30
- - `limit` - Number of results to return
31
- - `page` - Page number for pagination
32
- - `state` - Workspace state (`:active`, `:archived`, `:deleted`, or `:all`)
33
-
34
- **Example:**
35
-
36
- ```ruby
37
- response = client.workspace.query(
38
- select: ["id", "name", "description"]
39
- )
40
-
41
- workspaces = response.body.dig("data", "workspaces")
42
- # => [{"id"=>"7451845", "name"=>"Test Workspace", "description"=>"A test workspace"}, ...]
43
- ```
44
-
45
- **With specific IDs:**
46
-
47
- ```ruby
48
- response = client.workspace.query(
49
- args: { ids: [123, 456] },
50
- select: ["id", "name"]
51
- )
52
- ```
53
-
54
- **GraphQL:** `query { workspaces { ... } }`
55
-
56
- **See:** [monday.com workspaces query](https://developer.monday.com/api-reference/reference/workspaces#queries)
57
-
58
- ### create
59
-
60
- Creates a new workspace.
61
-
62
- ```ruby
63
- client.workspace.create(args: {}, select: DEFAULT_SELECT)
64
- ```
65
-
66
- **Parameters:**
67
-
68
- | Name | Type | Default | Description |
69
- |------|------|---------|-------------|
70
- | `args` | Hash | `{}` | Creation arguments (required) |
71
- | `select` | Array | `["id", "name", "description"]` | Fields to retrieve |
72
-
73
- **Required args:**
74
- - `name` - String (workspace name)
75
- - `kind` - Symbol (`:open` or `:closed`)
76
-
77
- **Optional args:**
78
- - `description` - String (workspace description)
79
-
80
- **Workspace kinds:**
81
- - `:open` - Open workspace (visible to all account members)
82
- - `:closed` - Closed workspace (visible only to workspace members)
83
-
84
- **Returns:** `Monday::Response`
85
-
86
- **Example:**
87
-
88
- ```ruby
89
- response = client.workspace.create(
90
- args: {
91
- name: "Product Team",
92
- kind: :open,
93
- description: "Workspace for product development"
94
- }
95
- )
96
-
97
- workspace = response.body.dig("data", "create_workspace")
98
- # => {"id"=>"7451865", "name"=>"Product Team", "description"=>"Workspace for product development"}
99
- ```
100
-
101
- **GraphQL:** `mutation { create_workspace { ... } }`
102
-
103
- **See:** [monday.com create_workspace](https://developer.monday.com/api-reference/reference/workspaces#create-workspace)
104
-
105
- ### delete
106
-
107
- Permanently deletes a workspace.
108
-
109
- ```ruby
110
- client.workspace.delete(workspace_id, select: ["id"])
111
- ```
112
-
113
- **Parameters:**
114
-
115
- | Name | Type | Default | Description |
116
- |------|------|---------|-------------|
117
- | `workspace_id` | Integer | - | Workspace ID to delete (required) |
118
- | `select` | Array | `["id"]` | Fields to retrieve |
119
-
120
- **Returns:** `Monday::Response`
121
-
122
- ::: 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>
123
- This operation cannot be undone. The workspace and all its boards will be permanently deleted.
124
- :::
125
-
126
- ::: tip <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"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line></svg>Note: Unique Method Signature</span>
127
- Unlike most resource methods, `delete` takes `workspace_id` as a positional parameter rather than in an `args` hash.
128
- :::
129
-
130
- **Example:**
131
-
132
- ```ruby
133
- response = client.workspace.delete(7451868)
134
-
135
- workspace = response.body.dig("data", "delete_workspace")
136
- # => {"id"=>"7451868"}
137
- ```
138
-
139
- **GraphQL:** `mutation { delete_workspace { ... } }`
140
-
141
- **See:** [monday.com delete_workspace](https://developer.monday.com/api-reference/reference/workspaces#delete-workspace)
142
-
143
- ## Response Structure
144
-
145
- All methods return a `Monday::Response` object. Access data using:
146
-
147
- ```ruby
148
- response.success? # => true/false
149
- response.status # => 200
150
- response.body # => Hash with GraphQL response
151
- ```
152
-
153
- ### Typical Response Pattern
154
-
155
- ```ruby
156
- response = client.workspace.query
157
-
158
- if response.success?
159
- workspaces = response.body.dig("data", "workspaces")
160
- # Work with workspaces
161
- else
162
- # Handle error
163
- end
164
- ```
165
-
166
- ## Constants
167
-
168
- ### DEFAULT_SELECT
169
-
170
- Default fields returned by `query` and `create`:
171
-
172
- ```ruby
173
- ["id", "name", "description"]
174
- ```
175
-
176
- ## Error Handling
177
-
178
- See the [Error Handling guide](/guides/advanced/errors) for common errors and how to handle them.
179
-
180
- ### Common Errors
181
-
182
- **Invalid Workspace ID:**
183
-
184
- ```ruby
185
- begin
186
- client.workspace.delete(123)
187
- rescue Monday::InvalidRequestError => e
188
- puts "Workspace not found: #{e.message}"
189
- # => "InvalidWorkspaceIdException: ..."
190
- end
191
- ```
192
-
193
- **Invalid Workspace Kind:**
194
-
195
- ```ruby
196
- begin
197
- client.workspace.create(
198
- args: { name: "Test", kind: "public" } # Wrong: String instead of Symbol
199
- )
200
- rescue Monday::Error => e
201
- puts "Invalid kind: #{e.message}"
202
- end
203
- ```
204
-
205
- ## Related Resources
206
-
207
- - [Board](/reference/resources/board) - Workspace boards
208
- - [Folder](/reference/resources/folder) - Workspace folders
209
-
210
- ## External References
211
-
212
- - [monday.com Workspaces API](https://developer.monday.com/api-reference/reference/workspaces)
213
- - [GraphQL API Overview](https://developer.monday.com/api-reference/docs/introduction-to-graphql)