ingestr 0.13.75__py3-none-any.whl → 0.14.98__py3-none-any.whl

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.

Potentially problematic release.


This version of ingestr might be problematic. Click here for more details.

Files changed (79) hide show
  1. ingestr/main.py +22 -3
  2. ingestr/src/adjust/__init__.py +4 -4
  3. ingestr/src/allium/__init__.py +128 -0
  4. ingestr/src/anthropic/__init__.py +277 -0
  5. ingestr/src/anthropic/helpers.py +525 -0
  6. ingestr/src/appstore/__init__.py +1 -0
  7. ingestr/src/asana_source/__init__.py +1 -1
  8. ingestr/src/buildinfo.py +1 -1
  9. ingestr/src/chess/__init__.py +1 -1
  10. ingestr/src/couchbase_source/__init__.py +118 -0
  11. ingestr/src/couchbase_source/helpers.py +135 -0
  12. ingestr/src/cursor/__init__.py +83 -0
  13. ingestr/src/cursor/helpers.py +188 -0
  14. ingestr/src/destinations.py +169 -1
  15. ingestr/src/docebo/__init__.py +589 -0
  16. ingestr/src/docebo/client.py +435 -0
  17. ingestr/src/docebo/helpers.py +97 -0
  18. ingestr/src/elasticsearch/helpers.py +138 -0
  19. ingestr/src/errors.py +8 -0
  20. ingestr/src/facebook_ads/__init__.py +26 -23
  21. ingestr/src/facebook_ads/helpers.py +47 -1
  22. ingestr/src/factory.py +48 -0
  23. ingestr/src/filesystem/__init__.py +8 -3
  24. ingestr/src/filters.py +9 -0
  25. ingestr/src/fluxx/__init__.py +9906 -0
  26. ingestr/src/fluxx/helpers.py +209 -0
  27. ingestr/src/frankfurter/__init__.py +157 -163
  28. ingestr/src/frankfurter/helpers.py +3 -3
  29. ingestr/src/freshdesk/__init__.py +25 -8
  30. ingestr/src/freshdesk/freshdesk_client.py +40 -5
  31. ingestr/src/fundraiseup/__init__.py +49 -0
  32. ingestr/src/fundraiseup/client.py +81 -0
  33. ingestr/src/github/__init__.py +6 -4
  34. ingestr/src/google_analytics/__init__.py +1 -1
  35. ingestr/src/hostaway/__init__.py +302 -0
  36. ingestr/src/hostaway/client.py +288 -0
  37. ingestr/src/http/__init__.py +35 -0
  38. ingestr/src/http/readers.py +114 -0
  39. ingestr/src/hubspot/__init__.py +6 -12
  40. ingestr/src/influxdb/__init__.py +1 -0
  41. ingestr/src/intercom/__init__.py +142 -0
  42. ingestr/src/intercom/helpers.py +674 -0
  43. ingestr/src/intercom/settings.py +279 -0
  44. ingestr/src/jira_source/__init__.py +340 -0
  45. ingestr/src/jira_source/helpers.py +439 -0
  46. ingestr/src/jira_source/settings.py +170 -0
  47. ingestr/src/klaviyo/__init__.py +5 -5
  48. ingestr/src/linear/__init__.py +553 -116
  49. ingestr/src/linear/helpers.py +77 -38
  50. ingestr/src/mailchimp/__init__.py +126 -0
  51. ingestr/src/mailchimp/helpers.py +226 -0
  52. ingestr/src/mailchimp/settings.py +164 -0
  53. ingestr/src/masking.py +344 -0
  54. ingestr/src/monday/__init__.py +246 -0
  55. ingestr/src/monday/helpers.py +392 -0
  56. ingestr/src/monday/settings.py +328 -0
  57. ingestr/src/mongodb/__init__.py +5 -2
  58. ingestr/src/mongodb/helpers.py +384 -10
  59. ingestr/src/plusvibeai/__init__.py +335 -0
  60. ingestr/src/plusvibeai/helpers.py +544 -0
  61. ingestr/src/plusvibeai/settings.py +252 -0
  62. ingestr/src/revenuecat/__init__.py +83 -0
  63. ingestr/src/revenuecat/helpers.py +237 -0
  64. ingestr/src/salesforce/__init__.py +15 -8
  65. ingestr/src/shopify/__init__.py +1 -1
  66. ingestr/src/smartsheets/__init__.py +33 -5
  67. ingestr/src/socrata_source/__init__.py +83 -0
  68. ingestr/src/socrata_source/helpers.py +85 -0
  69. ingestr/src/socrata_source/settings.py +8 -0
  70. ingestr/src/sources.py +1418 -54
  71. ingestr/src/stripe_analytics/__init__.py +2 -19
  72. ingestr/src/wise/__init__.py +68 -0
  73. ingestr/src/wise/client.py +63 -0
  74. ingestr/tests/unit/test_smartsheets.py +6 -9
  75. {ingestr-0.13.75.dist-info → ingestr-0.14.98.dist-info}/METADATA +24 -12
  76. {ingestr-0.13.75.dist-info → ingestr-0.14.98.dist-info}/RECORD +79 -37
  77. {ingestr-0.13.75.dist-info → ingestr-0.14.98.dist-info}/WHEEL +0 -0
  78. {ingestr-0.13.75.dist-info → ingestr-0.14.98.dist-info}/entry_points.txt +0 -0
  79. {ingestr-0.13.75.dist-info → ingestr-0.14.98.dist-info}/licenses/LICENSE.md +0 -0
@@ -0,0 +1,392 @@
1
+ from typing import Any, Dict, Iterator, Optional
2
+
3
+ from ingestr.src.http_client import create_client
4
+
5
+ from .settings import (
6
+ ACCOUNT_QUERY,
7
+ ACCOUNT_ROLES_QUERY,
8
+ BOARD_COLUMNS_QUERY,
9
+ BOARD_VIEWS_QUERY,
10
+ BOARDS_QUERY,
11
+ CUSTOM_ACTIVITIES_QUERY,
12
+ MAX_PAGE_SIZE,
13
+ TAGS_QUERY,
14
+ TEAMS_QUERY,
15
+ UPDATES_QUERY,
16
+ USERS_QUERY,
17
+ WEBHOOKS_QUERY,
18
+ WORKSPACES_QUERY,
19
+ )
20
+
21
+
22
+ def _paginate(
23
+ client: "MondayClient",
24
+ query: str,
25
+ field_name: str,
26
+ limit: int = 100,
27
+ extra_variables: Optional[Dict[str, Any]] = None,
28
+ ) -> Iterator[Dict[str, Any]]:
29
+ """
30
+ Helper function to paginate through Monday.com API results.
31
+
32
+ Args:
33
+ client: MondayClient instance
34
+ query: GraphQL query with $limit and $page variables
35
+ field_name: Name of the field in the response to extract
36
+ limit: Number of results per page
37
+ extra_variables: Additional variables to pass to the query
38
+
39
+ Yields:
40
+ Normalized dictionaries from the API response
41
+ """
42
+ page = 1
43
+
44
+ while True:
45
+ variables = {
46
+ "limit": min(limit, MAX_PAGE_SIZE),
47
+ "page": page,
48
+ }
49
+
50
+ if extra_variables:
51
+ variables.update(extra_variables)
52
+
53
+ data = client._execute_query(query, variables)
54
+ items = data.get(field_name, [])
55
+
56
+ if not items:
57
+ break
58
+
59
+ for item in items:
60
+ yield normalize_dict(item)
61
+
62
+ if len(items) < limit:
63
+ break
64
+
65
+ page += 1
66
+
67
+
68
+ def _get_all_board_ids(client: "MondayClient") -> list[str]:
69
+ """
70
+ Collect all board IDs from the Monday.com API.
71
+
72
+ Args:
73
+ client: MondayClient instance
74
+
75
+ Returns:
76
+ List of board IDs as strings
77
+ """
78
+ board_ids = []
79
+ for board in _paginate(client, BOARDS_QUERY, "boards", MAX_PAGE_SIZE):
80
+ board_id = board.get("id")
81
+ if board_id:
82
+ board_ids.append(str(board_id))
83
+ return board_ids
84
+
85
+
86
+ def _fetch_nested_board_data(
87
+ client: "MondayClient", query: str, nested_field: str
88
+ ) -> Iterator[Dict[str, Any]]:
89
+ """
90
+ Fetch nested data from boards (columns, views, etc).
91
+
92
+ Args:
93
+ client: MondayClient instance
94
+ query: GraphQL query to execute
95
+ nested_field: Name of the nested field to extract (e.g., "columns", "views")
96
+
97
+ Yields:
98
+ Dict containing nested data with board_id added
99
+ """
100
+ board_ids = _get_all_board_ids(client)
101
+
102
+ if not board_ids:
103
+ return
104
+
105
+ for board_id in board_ids:
106
+ variables = {"board_ids": [board_id]}
107
+ data = client._execute_query(query, variables)
108
+ boards = data.get("boards", [])
109
+
110
+ for board in boards:
111
+ nested_items = board.get(nested_field, [])
112
+
113
+ if nested_items and isinstance(nested_items, list):
114
+ for item in nested_items:
115
+ item_data = item.copy()
116
+ item_data["board_id"] = board.get("id")
117
+ yield normalize_dict(item_data)
118
+
119
+
120
+ def _fetch_simple_list(
121
+ client: "MondayClient", query: str, field_name: str
122
+ ) -> Iterator[Dict[str, Any]]:
123
+ """
124
+ Fetch a simple list of items from Monday.com API without pagination.
125
+
126
+ Args:
127
+ client: MondayClient instance
128
+ query: GraphQL query to execute
129
+ field_name: Name of the field in the response to extract
130
+
131
+ Yields:
132
+ Normalized dictionaries from the API response
133
+ """
134
+ data = client._execute_query(query)
135
+ items = data.get(field_name, [])
136
+
137
+ for item in items:
138
+ yield normalize_dict(item)
139
+
140
+
141
+ def normalize_dict(data: Dict[str, Any]) -> Dict[str, Any]:
142
+ """
143
+ Normalize dictionary fields by detecting their structure:
144
+ - Convert nested objects with 'id' field to {field_name}_id
145
+ - Convert objects with other fields to flattened {field_name}_{subfield}
146
+ - Convert arrays to JSON strings for storage
147
+ - Preserve null values
148
+
149
+ Args:
150
+ data: The dictionary to normalize
151
+
152
+ Returns:
153
+ Normalized dictionary with flattened structure
154
+
155
+ Example:
156
+ >>> normalize_dict({"user": {"id": "123"}, "plan": {"tier": "pro"}})
157
+ {"user_id": "123", "plan_tier": "pro"}
158
+ """
159
+ import json
160
+
161
+ normalized: Dict[str, Any] = {}
162
+
163
+ for key, value in data.items():
164
+ if value is None:
165
+ # Keep null values as-is
166
+ normalized[key] = None
167
+ elif isinstance(value, dict):
168
+ # If the dict has only an 'id' field, replace with {key}_id
169
+ if "id" in value and len(value) == 1:
170
+ normalized[f"{key}_id"] = value["id"]
171
+ # If dict has multiple fields, flatten them
172
+ elif value:
173
+ for subkey, subvalue in value.items():
174
+ normalized[f"{key}_{subkey}"] = subvalue
175
+ elif isinstance(value, list):
176
+ # If list contains dicts with only 'id' field, extract ids
177
+ if value and isinstance(value[0], dict) and list(value[0].keys()) == ["id"]:
178
+ normalized[key] = [item["id"] for item in value]
179
+ else:
180
+ # Convert other lists to JSON strings for storage
181
+ normalized[key] = json.dumps(value)
182
+ else:
183
+ # Add scalar values directly
184
+ normalized[key] = value
185
+
186
+ return normalized
187
+
188
+
189
+ class MondayClient:
190
+ """Monday.com GraphQL API client."""
191
+
192
+ def __init__(self, api_token: str) -> None:
193
+ self.api_token = api_token
194
+ self.base_url = "https://api.monday.com/v2"
195
+ self.session = create_client()
196
+
197
+ def _headers(self) -> Dict[str, str]:
198
+ return {
199
+ "Authorization": self.api_token,
200
+ "Content-Type": "application/json",
201
+ }
202
+
203
+ def _execute_query(
204
+ self, query: str, variables: Optional[Dict[str, Any]] = None
205
+ ) -> Dict[str, Any]:
206
+ """Execute a GraphQL query against Monday.com API."""
207
+ payload: Dict[str, Any] = {"query": query}
208
+ if variables:
209
+ payload["variables"] = variables
210
+
211
+ response = self.session.post(
212
+ self.base_url,
213
+ headers=self._headers(),
214
+ json=payload,
215
+ )
216
+ response.raise_for_status()
217
+ data = response.json()
218
+
219
+ if "errors" in data:
220
+ raise Exception(f"GraphQL errors: {data['errors']}")
221
+
222
+ return data.get("data", {})
223
+
224
+ def get_account(self) -> Dict[str, Any]:
225
+ """
226
+ Fetch account information from Monday.com API.
227
+
228
+ Returns:
229
+ Dict containing account data
230
+ """
231
+ data = self._execute_query(ACCOUNT_QUERY)
232
+ account = data.get("account", {})
233
+
234
+ if not account:
235
+ raise Exception("No account data returned from Monday.com API")
236
+
237
+ return normalize_dict(account)
238
+
239
+ def get_account_roles(self) -> Iterator[Dict[str, Any]]:
240
+ """
241
+ Fetch account roles from Monday.com API.
242
+
243
+ Yields:
244
+ Dict containing account role data
245
+ """
246
+ yield from _fetch_simple_list(self, ACCOUNT_ROLES_QUERY, "account_roles")
247
+
248
+ def get_users(self, limit: int = MAX_PAGE_SIZE) -> Iterator[Dict[str, Any]]:
249
+ """
250
+ Fetch users from Monday.com API with pagination.
251
+
252
+ Args:
253
+ limit: Number of results per page (max 100)
254
+
255
+ Yields:
256
+ Dict containing user data
257
+ """
258
+ yield from _paginate(self, USERS_QUERY, "users", limit)
259
+
260
+ def get_boards(self, limit: int = MAX_PAGE_SIZE) -> Iterator[Dict[str, Any]]:
261
+ """
262
+ Fetch boards from Monday.com API with pagination.
263
+
264
+ Args:
265
+ limit: Number of results per page (max 100)
266
+
267
+ Yields:
268
+ Dict containing board data
269
+ """
270
+ yield from _paginate(self, BOARDS_QUERY, "boards", limit)
271
+
272
+ def get_workspaces(self) -> Iterator[Dict[str, Any]]:
273
+ """
274
+ Fetch workspaces from Monday.com API.
275
+ First gets all boards to extract unique workspace IDs,
276
+ then fetches workspace details.
277
+
278
+ Yields:
279
+ Dict containing workspace data
280
+ """
281
+ # Collect unique workspace IDs from boards
282
+ workspace_ids = set()
283
+ for board in _paginate(self, BOARDS_QUERY, "boards", MAX_PAGE_SIZE):
284
+ workspace_id = board.get("workspace_id")
285
+ if workspace_id:
286
+ workspace_ids.add(str(workspace_id))
287
+
288
+ if not workspace_ids:
289
+ return
290
+
291
+ # Fetch workspace details
292
+ variables = {"ids": list(workspace_ids)}
293
+ data = self._execute_query(WORKSPACES_QUERY, variables)
294
+ workspaces = data.get("workspaces", [])
295
+
296
+ for workspace in workspaces:
297
+ yield normalize_dict(workspace)
298
+
299
+ def get_webhooks(self) -> Iterator[Dict[str, Any]]:
300
+ """
301
+ Fetch webhooks from Monday.com API.
302
+ First gets all board IDs, then fetches webhooks for each board.
303
+
304
+ Yields:
305
+ Dict containing webhook data
306
+ """
307
+ board_ids = _get_all_board_ids(self)
308
+
309
+ for board_id in board_ids:
310
+ variables = {"board_id": board_id}
311
+ data = self._execute_query(WEBHOOKS_QUERY, variables)
312
+ webhooks = data.get("webhooks", [])
313
+
314
+ for webhook in webhooks:
315
+ yield normalize_dict(webhook)
316
+
317
+ def get_updates(
318
+ self,
319
+ limit: int = MAX_PAGE_SIZE,
320
+ start_date: Optional[str] = None,
321
+ end_date: Optional[str] = None,
322
+ ) -> Iterator[Dict[str, Any]]:
323
+ """
324
+ Fetch updates from Monday.com API.
325
+
326
+ Args:
327
+ limit: Number of results (max 100)
328
+ start_date: Start date in YYYY-MM-DD format
329
+ end_date: End date in YYYY-MM-DD format
330
+
331
+ Yields:
332
+ Dict containing update data
333
+ """
334
+ variables: Dict[str, Any] = {"limit": min(limit, MAX_PAGE_SIZE)}
335
+
336
+ if start_date:
337
+ variables["from_date"] = start_date
338
+ if end_date:
339
+ variables["to_date"] = end_date
340
+
341
+ data = self._execute_query(UPDATES_QUERY, variables)
342
+ updates = data.get("updates", [])
343
+
344
+ for update in updates:
345
+ yield normalize_dict(update)
346
+
347
+ def get_teams(self) -> Iterator[Dict[str, Any]]:
348
+ """
349
+ Fetch teams from Monday.com API.
350
+
351
+ Yields:
352
+ Dict containing team data
353
+ """
354
+ yield from _fetch_simple_list(self, TEAMS_QUERY, "teams")
355
+
356
+ def get_tags(self) -> Iterator[Dict[str, Any]]:
357
+ """
358
+ Fetch tags from Monday.com API.
359
+
360
+ Yields:
361
+ Dict containing tag data
362
+ """
363
+ yield from _fetch_simple_list(self, TAGS_QUERY, "tags")
364
+
365
+ def get_custom_activities(self) -> Iterator[Dict[str, Any]]:
366
+ """
367
+ Fetch custom activities from Monday.com API.
368
+
369
+ Yields:
370
+ Dict containing custom activity data
371
+ """
372
+ yield from _fetch_simple_list(self, CUSTOM_ACTIVITIES_QUERY, "custom_activity")
373
+
374
+ def get_board_columns(self) -> Iterator[Dict[str, Any]]:
375
+ """
376
+ Fetch board columns from Monday.com API.
377
+ First gets all board IDs, then fetches columns for each board.
378
+
379
+ Yields:
380
+ Dict containing board column data with board_id
381
+ """
382
+ yield from _fetch_nested_board_data(self, BOARD_COLUMNS_QUERY, "columns")
383
+
384
+ def get_board_views(self) -> Iterator[Dict[str, Any]]:
385
+ """
386
+ Fetch board views from Monday.com API.
387
+ First gets all board IDs, then fetches views for each board.
388
+
389
+ Yields:
390
+ Dict containing board view data with board_id
391
+ """
392
+ yield from _fetch_nested_board_data(self, BOARD_VIEWS_QUERY, "views")
@@ -0,0 +1,328 @@
1
+ """Monday.com source settings and constants"""
2
+
3
+ # GraphQL query for fetching app installs
4
+ APP_INSTALLS_QUERY = """
5
+ query ($app_id: ID!, $account_id: ID, $limit: Int!, $page: Int!) {
6
+ app_installs(
7
+ app_id: $app_id
8
+ account_id: $account_id
9
+ limit: $limit
10
+ page: $page
11
+ ) {
12
+ app_id
13
+ timestamp
14
+ app_install_account {
15
+ id
16
+ }
17
+ app_install_user {
18
+ id
19
+ }
20
+ app_version {
21
+ major
22
+ minor
23
+ patch
24
+ type
25
+ text
26
+ }
27
+ permissions {
28
+ approved_scopes
29
+ required_scopes
30
+ }
31
+ }
32
+ }
33
+ """
34
+
35
+ # GraphQL query for fetching account information
36
+ ACCOUNT_QUERY = """
37
+ query {
38
+ account {
39
+ id
40
+ name
41
+ slug
42
+ tier
43
+ country_code
44
+ first_day_of_the_week
45
+ show_timeline_weekends
46
+ sign_up_product_kind
47
+ active_members_count
48
+ logo
49
+ plan {
50
+ max_users
51
+ period
52
+ tier
53
+ version
54
+ }
55
+ }
56
+ }
57
+ """
58
+
59
+ # GraphQL query for fetching account roles
60
+ ACCOUNT_ROLES_QUERY = """
61
+ query {
62
+ account_roles {
63
+ id
64
+ name
65
+ roleType
66
+ }
67
+ }
68
+ """
69
+
70
+ # GraphQL query for fetching users
71
+ USERS_QUERY = """
72
+ query ($limit: Int!, $page: Int!) {
73
+ users(limit: $limit, page: $page) {
74
+ id
75
+ name
76
+ email
77
+ enabled
78
+ is_admin
79
+ is_guest
80
+ is_pending
81
+ is_view_only
82
+ created_at
83
+ birthday
84
+ country_code
85
+ join_date
86
+ location
87
+ mobile_phone
88
+ phone
89
+ photo_original
90
+ photo_thumb
91
+ photo_tiny
92
+ time_zone_identifier
93
+ title
94
+ url
95
+ utc_hours_diff
96
+ current_language
97
+ account {
98
+ id
99
+ }
100
+ }
101
+ }
102
+ """
103
+
104
+ # GraphQL query for fetching boards
105
+ BOARDS_QUERY = """
106
+ query ($limit: Int!, $page: Int!) {
107
+ boards(limit: $limit, page: $page) {
108
+ id
109
+ name
110
+ description
111
+ state
112
+ board_kind
113
+ board_folder_id
114
+ workspace_id
115
+ permissions
116
+ item_terminology
117
+ items_count
118
+ updated_at
119
+ url
120
+ communication
121
+ object_type_unique_key
122
+ type
123
+ creator {
124
+ id
125
+ }
126
+ owners {
127
+ id
128
+ }
129
+ subscribers {
130
+ id
131
+ }
132
+ team_owners {
133
+ id
134
+ }
135
+ team_subscribers {
136
+ id
137
+ }
138
+ tags {
139
+ id
140
+
141
+ }
142
+ }
143
+ }
144
+ """
145
+
146
+ # GraphQL query for fetching custom activities
147
+ CUSTOM_ACTIVITIES_QUERY = """
148
+ query {
149
+ custom_activity {
150
+ id
151
+ name
152
+ type
153
+ color
154
+ icon_id
155
+ }
156
+ }
157
+ """
158
+
159
+ # GraphQL query for fetching board columns
160
+ BOARD_COLUMNS_QUERY = """
161
+ query ($board_ids: [ID!]) {
162
+ boards(ids: $board_ids) {
163
+ id
164
+ columns {
165
+ id
166
+ title
167
+ type
168
+ archived
169
+ description
170
+ settings_str
171
+ width
172
+ }
173
+ }
174
+ }
175
+ """
176
+
177
+ # GraphQL query for fetching board views
178
+ BOARD_VIEWS_QUERY = """
179
+ query ($board_ids: [ID!]) {
180
+ boards(ids: $board_ids) {
181
+ id
182
+ views {
183
+ id
184
+ name
185
+ type
186
+ settings_str
187
+ view_specific_data_str
188
+ source_view_id
189
+ access_level
190
+ }
191
+ }
192
+ }
193
+ """
194
+
195
+ # GraphQL query for fetching workspaces by IDs
196
+ WORKSPACES_QUERY = """
197
+ query ($ids: [ID!]) {
198
+ workspaces(ids: $ids) {
199
+ id
200
+ name
201
+ kind
202
+ description
203
+ created_at
204
+ is_default_workspace
205
+ state
206
+ account_product {
207
+ id
208
+ }
209
+ owners_subscribers {
210
+ id
211
+ }
212
+ team_owners_subscribers {
213
+ id
214
+ }
215
+ teams_subscribers {
216
+ id
217
+ }
218
+ users_subscribers {
219
+ id
220
+ }
221
+ settings {
222
+ icon
223
+ }
224
+ }
225
+ }
226
+ """
227
+
228
+ # GraphQL query for fetching webhooks by board ID
229
+ WEBHOOKS_QUERY = """
230
+ query ($board_id: ID!) {
231
+ webhooks(board_id: $board_id) {
232
+ id
233
+ event
234
+ board_id
235
+ config
236
+ }
237
+ }
238
+ """
239
+
240
+ # GraphQL query for fetching updates
241
+ UPDATES_QUERY = """
242
+ query ($limit: Int!, $from_date: String, $to_date: String) {
243
+ updates(limit: $limit, from_date: $from_date, to_date: $to_date) {
244
+ id
245
+ body
246
+ text_body
247
+ created_at
248
+ updated_at
249
+ edited_at
250
+ creator_id
251
+ item_id
252
+ creator {
253
+ id
254
+ }
255
+ item {
256
+ id
257
+ }
258
+ assets {
259
+ id
260
+ name
261
+ file_extension
262
+ file_size
263
+ public_url
264
+ url
265
+ url_thumbnail
266
+ created_at
267
+ original_geometry
268
+ uploaded_by {
269
+ id
270
+ }
271
+ }
272
+ replies {
273
+ id
274
+ body
275
+ text_body
276
+ created_at
277
+ updated_at
278
+ creator_id
279
+ creator {
280
+ id
281
+ }
282
+ }
283
+ likes {
284
+ id
285
+ }
286
+ pinned_to_top {
287
+ item_id
288
+ }
289
+ viewers {
290
+ medium
291
+ user_id
292
+ user {
293
+ id
294
+ }
295
+ }
296
+ }
297
+ }
298
+ """
299
+
300
+ # GraphQL query for fetching teams
301
+ TEAMS_QUERY = """
302
+ query {
303
+ teams {
304
+ id
305
+ name
306
+ picture_url
307
+ users {
308
+ id
309
+ created_at
310
+ phone
311
+ }
312
+ }
313
+ }
314
+ """
315
+
316
+ # GraphQL query for fetching tags
317
+ TAGS_QUERY = """
318
+ query {
319
+ tags {
320
+ id
321
+ name
322
+ color
323
+ }
324
+ }
325
+ """
326
+
327
+ # Maximum number of results per page
328
+ MAX_PAGE_SIZE = 100