wandb 0.19.10__py3-none-win_amd64.whl → 0.19.11__py3-none-win_amd64.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.
Files changed (91) hide show
  1. wandb/__init__.py +1 -1
  2. wandb/__init__.pyi +3 -3
  3. wandb/_pydantic/__init__.py +2 -3
  4. wandb/_pydantic/base.py +11 -31
  5. wandb/_pydantic/utils.py +8 -1
  6. wandb/_pydantic/v1_compat.py +3 -3
  7. wandb/apis/public/api.py +590 -22
  8. wandb/apis/public/artifacts.py +13 -5
  9. wandb/apis/public/automations.py +1 -1
  10. wandb/apis/public/integrations.py +22 -10
  11. wandb/apis/public/registries/__init__.py +0 -0
  12. wandb/apis/public/registries/_freezable_list.py +179 -0
  13. wandb/apis/public/{registries.py → registries/registries_search.py} +22 -129
  14. wandb/apis/public/registries/registry.py +357 -0
  15. wandb/apis/public/registries/utils.py +140 -0
  16. wandb/apis/public/runs.py +58 -56
  17. wandb/automations/__init__.py +16 -24
  18. wandb/automations/_filters/expressions.py +12 -10
  19. wandb/automations/_filters/operators.py +10 -19
  20. wandb/automations/_filters/run_metrics.py +231 -82
  21. wandb/automations/_generated/__init__.py +27 -34
  22. wandb/automations/_generated/create_automation.py +17 -0
  23. wandb/automations/_generated/delete_automation.py +17 -0
  24. wandb/automations/_generated/fragments.py +40 -25
  25. wandb/automations/_generated/{get_triggers.py → get_automations.py} +5 -5
  26. wandb/automations/_generated/get_automations_by_entity.py +26 -0
  27. wandb/automations/_generated/operations.py +35 -98
  28. wandb/automations/_generated/update_automation.py +17 -0
  29. wandb/automations/_utils.py +178 -64
  30. wandb/automations/_validators.py +94 -2
  31. wandb/automations/actions.py +113 -98
  32. wandb/automations/automations.py +47 -69
  33. wandb/automations/events.py +139 -87
  34. wandb/automations/integrations.py +23 -4
  35. wandb/automations/scopes.py +22 -20
  36. wandb/bin/gpu_stats.exe +0 -0
  37. wandb/bin/wandb-core +0 -0
  38. wandb/env.py +11 -0
  39. wandb/old/settings.py +4 -1
  40. wandb/proto/v3/wandb_internal_pb2.py +240 -236
  41. wandb/proto/v3/wandb_telemetry_pb2.py +10 -10
  42. wandb/proto/v4/wandb_internal_pb2.py +236 -236
  43. wandb/proto/v4/wandb_telemetry_pb2.py +10 -10
  44. wandb/proto/v5/wandb_internal_pb2.py +236 -236
  45. wandb/proto/v5/wandb_telemetry_pb2.py +10 -10
  46. wandb/proto/v6/wandb_internal_pb2.py +236 -236
  47. wandb/proto/v6/wandb_telemetry_pb2.py +10 -10
  48. wandb/sdk/artifacts/_generated/__init__.py +42 -1
  49. wandb/sdk/artifacts/_generated/add_aliases.py +21 -0
  50. wandb/sdk/artifacts/_generated/delete_aliases.py +21 -0
  51. wandb/sdk/artifacts/_generated/fetch_linked_artifacts.py +67 -0
  52. wandb/sdk/artifacts/_generated/fragments.py +35 -0
  53. wandb/sdk/artifacts/_generated/input_types.py +12 -0
  54. wandb/sdk/artifacts/_generated/operations.py +101 -0
  55. wandb/sdk/artifacts/_generated/update_artifact.py +26 -0
  56. wandb/sdk/artifacts/_graphql_fragments.py +1 -0
  57. wandb/sdk/artifacts/_validators.py +120 -1
  58. wandb/sdk/artifacts/artifact.py +380 -203
  59. wandb/sdk/artifacts/artifact_file_cache.py +4 -6
  60. wandb/sdk/artifacts/artifact_manifest_entry.py +11 -2
  61. wandb/sdk/artifacts/storage_policies/wandb_storage_policy.py +182 -1
  62. wandb/sdk/artifacts/storage_policy.py +3 -0
  63. wandb/sdk/data_types/video.py +46 -32
  64. wandb/sdk/interface/interface.py +2 -3
  65. wandb/sdk/internal/internal_api.py +21 -31
  66. wandb/sdk/internal/sender.py +5 -2
  67. wandb/sdk/launch/sweeps/utils.py +8 -0
  68. wandb/sdk/projects/_generated/__init__.py +47 -0
  69. wandb/sdk/projects/_generated/delete_project.py +22 -0
  70. wandb/sdk/projects/_generated/enums.py +4 -0
  71. wandb/sdk/projects/_generated/fetch_registry.py +22 -0
  72. wandb/sdk/projects/_generated/fragments.py +41 -0
  73. wandb/sdk/projects/_generated/input_types.py +13 -0
  74. wandb/sdk/projects/_generated/operations.py +88 -0
  75. wandb/sdk/projects/_generated/rename_project.py +27 -0
  76. wandb/sdk/projects/_generated/upsert_registry_project.py +27 -0
  77. wandb/sdk/service/service.py +9 -1
  78. wandb/sdk/wandb_init.py +32 -5
  79. wandb/sdk/wandb_run.py +37 -9
  80. wandb/sdk/wandb_settings.py +6 -7
  81. wandb/sdk/wandb_setup.py +12 -0
  82. wandb/util.py +7 -3
  83. {wandb-0.19.10.dist-info → wandb-0.19.11.dist-info}/METADATA +1 -1
  84. {wandb-0.19.10.dist-info → wandb-0.19.11.dist-info}/RECORD +87 -70
  85. wandb/automations/_generated/create_filter_trigger.py +0 -21
  86. wandb/automations/_generated/delete_trigger.py +0 -19
  87. wandb/automations/_generated/get_triggers_by_entity.py +0 -24
  88. wandb/automations/_generated/update_filter_trigger.py +0 -21
  89. {wandb-0.19.10.dist-info → wandb-0.19.11.dist-info}/WHEEL +0 -0
  90. {wandb-0.19.10.dist-info → wandb-0.19.11.dist-info}/entry_points.txt +0 -0
  91. {wandb-0.19.10.dist-info → wandb-0.19.11.dist-info}/licenses/LICENSE +0 -0
@@ -1,13 +1,13 @@
1
1
  # Generated by ariadne-codegen
2
2
 
3
- from .create_filter_trigger import CreateFilterTrigger
3
+ from .create_automation import CreateAutomation
4
4
  from .create_generic_webhook_integration import (
5
5
  CreateGenericWebhookIntegration,
6
6
  CreateGenericWebhookIntegrationCreateGenericWebhookIntegration,
7
7
  CreateGenericWebhookIntegrationCreateGenericWebhookIntegrationIntegrationGenericWebhookIntegration,
8
8
  CreateGenericWebhookIntegrationCreateGenericWebhookIntegrationIntegrationIntegration,
9
9
  )
10
- from .delete_trigger import DeleteTrigger
10
+ from .delete_automation import DeleteAutomation
11
11
  from .enums import (
12
12
  AlertSeverity,
13
13
  EventTriggeringConditionType,
@@ -17,8 +17,6 @@ from .enums import (
17
17
  from .fragments import (
18
18
  ArtifactPortfolioScopeFields,
19
19
  ArtifactSequenceScopeFields,
20
- CreateFilterTriggerResult,
21
- DeleteTriggerResult,
22
20
  FilterEventFields,
23
21
  GenericWebhookActionFields,
24
22
  GenericWebhookActionFieldsIntegrationGenericWebhookIntegration,
@@ -28,7 +26,6 @@ from .fragments import (
28
26
  GenericWebhookIntegrationConnectionFieldsEdgesNodeGenericWebhookIntegration,
29
27
  GenericWebhookIntegrationConnectionFieldsEdgesNodeIntegration,
30
28
  GenericWebhookIntegrationFields,
31
- GithubIntegrationFields,
32
29
  IntegrationConnectionFields,
33
30
  IntegrationConnectionFieldsEdges,
34
31
  IntegrationConnectionFieldsEdgesNodeGenericWebhookIntegration,
@@ -44,7 +41,7 @@ from .fragments import (
44
41
  ProjectConnectionFieldsEdgesNode,
45
42
  ProjectScopeFields,
46
43
  QueueJobActionFields,
47
- RunQueueFields,
44
+ QueueJobActionFieldsQueue,
48
45
  SlackIntegrationConnectionFields,
49
46
  SlackIntegrationConnectionFieldsEdges,
50
47
  SlackIntegrationConnectionFieldsEdgesNodeIntegration,
@@ -59,15 +56,16 @@ from .fragments import (
59
56
  TriggerFieldsScopeArtifactPortfolio,
60
57
  TriggerFieldsScopeArtifactSequence,
61
58
  TriggerFieldsScopeProject,
62
- UpdateFilterTriggerResult,
63
- UserFields,
64
59
  )
65
60
  from .generic_webhook_integrations_by_entity import (
66
61
  GenericWebhookIntegrationsByEntity,
67
62
  GenericWebhookIntegrationsByEntityEntity,
68
63
  )
69
- from .get_triggers import GetTriggers, GetTriggersSearchScope
70
- from .get_triggers_by_entity import GetTriggersByEntity, GetTriggersByEntitySearchScope
64
+ from .get_automations import GetAutomations, GetAutomationsSearchScope
65
+ from .get_automations_by_entity import (
66
+ GetAutomationsByEntity,
67
+ GetAutomationsByEntitySearchScope,
68
+ )
71
69
  from .input_types import (
72
70
  CreateFilterTriggerInput,
73
71
  CreateGenericWebhookIntegrationInput,
@@ -80,39 +78,39 @@ from .input_types import (
80
78
  )
81
79
  from .integrations_by_entity import IntegrationsByEntity, IntegrationsByEntityEntity
82
80
  from .operations import (
83
- CREATE_FILTER_TRIGGER_GQL,
81
+ CREATE_AUTOMATION_GQL,
84
82
  CREATE_GENERIC_WEBHOOK_INTEGRATION_GQL,
85
- DELETE_TRIGGER_GQL,
83
+ DELETE_AUTOMATION_GQL,
86
84
  GENERIC_WEBHOOK_INTEGRATIONS_BY_ENTITY_GQL,
87
- GET_TRIGGERS_BY_ENTITY_GQL,
88
- GET_TRIGGERS_GQL,
85
+ GET_AUTOMATIONS_BY_ENTITY_GQL,
86
+ GET_AUTOMATIONS_GQL,
89
87
  INTEGRATIONS_BY_ENTITY_GQL,
90
88
  SLACK_INTEGRATIONS_BY_ENTITY_GQL,
91
- UPDATE_FILTER_TRIGGER_GQL,
89
+ UPDATE_AUTOMATION_GQL,
92
90
  )
93
91
  from .slack_integrations_by_entity import (
94
92
  SlackIntegrationsByEntity,
95
93
  SlackIntegrationsByEntityEntity,
96
94
  )
97
- from .update_filter_trigger import UpdateFilterTrigger
95
+ from .update_automation import UpdateAutomation
98
96
 
99
97
  __all__ = [
100
- "CREATE_FILTER_TRIGGER_GQL",
98
+ "CREATE_AUTOMATION_GQL",
101
99
  "CREATE_GENERIC_WEBHOOK_INTEGRATION_GQL",
102
- "DELETE_TRIGGER_GQL",
100
+ "DELETE_AUTOMATION_GQL",
103
101
  "GENERIC_WEBHOOK_INTEGRATIONS_BY_ENTITY_GQL",
104
- "GET_TRIGGERS_BY_ENTITY_GQL",
105
- "GET_TRIGGERS_GQL",
102
+ "GET_AUTOMATIONS_BY_ENTITY_GQL",
103
+ "GET_AUTOMATIONS_GQL",
106
104
  "INTEGRATIONS_BY_ENTITY_GQL",
107
105
  "SLACK_INTEGRATIONS_BY_ENTITY_GQL",
108
- "UPDATE_FILTER_TRIGGER_GQL",
109
- "GetTriggers",
110
- "GetTriggersSearchScope",
111
- "GetTriggersByEntity",
112
- "GetTriggersByEntitySearchScope",
113
- "CreateFilterTrigger",
114
- "UpdateFilterTrigger",
115
- "DeleteTrigger",
106
+ "UPDATE_AUTOMATION_GQL",
107
+ "GetAutomations",
108
+ "GetAutomationsSearchScope",
109
+ "GetAutomationsByEntity",
110
+ "GetAutomationsByEntitySearchScope",
111
+ "CreateAutomation",
112
+ "UpdateAutomation",
113
+ "DeleteAutomation",
116
114
  "IntegrationsByEntity",
117
115
  "IntegrationsByEntityEntity",
118
116
  "SlackIntegrationsByEntity",
@@ -133,8 +131,6 @@ __all__ = [
133
131
  "UpdateFilterTriggerInput",
134
132
  "ArtifactPortfolioScopeFields",
135
133
  "ArtifactSequenceScopeFields",
136
- "CreateFilterTriggerResult",
137
- "DeleteTriggerResult",
138
134
  "FilterEventFields",
139
135
  "GenericWebhookActionFields",
140
136
  "GenericWebhookActionFieldsIntegrationGenericWebhookIntegration",
@@ -144,7 +140,6 @@ __all__ = [
144
140
  "GenericWebhookIntegrationConnectionFieldsEdgesNodeGenericWebhookIntegration",
145
141
  "GenericWebhookIntegrationConnectionFieldsEdgesNodeIntegration",
146
142
  "GenericWebhookIntegrationFields",
147
- "GithubIntegrationFields",
148
143
  "IntegrationConnectionFields",
149
144
  "IntegrationConnectionFieldsEdges",
150
145
  "IntegrationConnectionFieldsEdgesNodeGenericWebhookIntegration",
@@ -160,7 +155,7 @@ __all__ = [
160
155
  "ProjectConnectionFieldsEdgesNode",
161
156
  "ProjectScopeFields",
162
157
  "QueueJobActionFields",
163
- "RunQueueFields",
158
+ "QueueJobActionFieldsQueue",
164
159
  "SlackIntegrationConnectionFields",
165
160
  "SlackIntegrationConnectionFieldsEdges",
166
161
  "SlackIntegrationConnectionFieldsEdgesNodeIntegration",
@@ -175,8 +170,6 @@ __all__ = [
175
170
  "TriggerFieldsScopeArtifactPortfolio",
176
171
  "TriggerFieldsScopeArtifactSequence",
177
172
  "TriggerFieldsScopeProject",
178
- "UpdateFilterTriggerResult",
179
- "UserFields",
180
173
  "AlertSeverity",
181
174
  "EventTriggeringConditionType",
182
175
  "TriggerScopeType",
@@ -0,0 +1,17 @@
1
+ # Generated by ariadne-codegen
2
+ # Source: tools/graphql_codegen/automations/
3
+
4
+ from __future__ import annotations
5
+
6
+ from typing import Optional
7
+
8
+ from wandb._pydantic import GQLBase
9
+
10
+ from .fragments import CreateAutomationResult
11
+
12
+
13
+ class CreateAutomation(GQLBase):
14
+ result: Optional[CreateAutomationResult]
15
+
16
+
17
+ CreateAutomation.model_rebuild()
@@ -0,0 +1,17 @@
1
+ # Generated by ariadne-codegen
2
+ # Source: tools/graphql_codegen/automations/
3
+
4
+ from __future__ import annotations
5
+
6
+ from typing import Optional
7
+
8
+ from wandb._pydantic import GQLBase
9
+
10
+ from .fragments import DeleteAutomationResult
11
+
12
+
13
+ class DeleteAutomation(GQLBase):
14
+ result: Optional[DeleteAutomationResult]
15
+
16
+
17
+ DeleteAutomation.model_rebuild()
@@ -26,14 +26,14 @@ class ArtifactSequenceScopeFields(GQLBase):
26
26
  name: str
27
27
 
28
28
 
29
- class CreateFilterTriggerResult(GQLBase):
29
+ class CreateAutomationResult(GQLBase):
30
30
  typename__: Typename[Literal["CreateFilterTriggerPayload"]] = (
31
31
  "CreateFilterTriggerPayload"
32
32
  )
33
33
  trigger: Optional[TriggerFields]
34
34
 
35
35
 
36
- class DeleteTriggerResult(GQLBase):
36
+ class DeleteAutomationResult(GQLBase):
37
37
  typename__: Typename[Literal["DeleteTriggerPayload"]] = "DeleteTriggerPayload"
38
38
  success: bool
39
39
 
@@ -95,12 +95,6 @@ class GenericWebhookIntegrationFields(GQLBase):
95
95
  id: GQLId
96
96
  name: str
97
97
  url_endpoint: str = Field(alias="urlEndpoint")
98
- created_at: datetime = Field(alias="createdAt")
99
-
100
-
101
- class GithubIntegrationFields(GQLBase):
102
- typename__: Typename[Literal["GitHubOAuthIntegration"]] = "GitHubOAuthIntegration"
103
- id: GQLId
104
98
 
105
99
 
106
100
  class IntegrationConnectionFields(GQLBase):
@@ -179,12 +173,11 @@ class ProjectScopeFields(GQLBase):
179
173
 
180
174
  class QueueJobActionFields(GQLBase):
181
175
  typename__: Typename[Literal["QueueJobTriggeredAction"]] = "QueueJobTriggeredAction"
182
- queue: Optional[RunQueueFields]
176
+ queue: Optional[QueueJobActionFieldsQueue]
183
177
  template: str
184
178
 
185
179
 
186
- class RunQueueFields(GQLBase):
187
- typename__: Typename[Literal["RunQueue"]] = "RunQueue"
180
+ class QueueJobActionFieldsQueue(GQLBase):
188
181
  id: GQLId
189
182
  name: str
190
183
 
@@ -225,7 +218,6 @@ class TriggerFields(GQLBase):
225
218
  typename__: Typename[Literal["Trigger"]] = "Trigger"
226
219
  id: GQLId
227
220
  created_at: datetime = Field(alias="createdAt")
228
- created_by: UserFields = Field(alias="createdBy")
229
221
  updated_at: Optional[datetime] = Field(alias="updatedAt")
230
222
  name: str
231
223
  description: Optional[str]
@@ -244,19 +236,13 @@ class TriggerFields(GQLBase):
244
236
  ] = Field(discriminator="typename__")
245
237
 
246
238
 
247
- class UpdateFilterTriggerResult(GQLBase):
239
+ class UpdateAutomationResult(GQLBase):
248
240
  typename__: Typename[Literal["UpdateFilterTriggerPayload"]] = (
249
241
  "UpdateFilterTriggerPayload"
250
242
  )
251
243
  trigger: Optional[TriggerFields]
252
244
 
253
245
 
254
- class UserFields(GQLBase):
255
- typename__: Typename[Literal["User"]] = "User"
256
- id: GQLId
257
- username: Optional[str]
258
-
259
-
260
246
  class TriggerFieldsScopeArtifactPortfolio(ArtifactPortfolioScopeFields):
261
247
  typename__: Typename[Literal["ArtifactPortfolio"]]
262
248
 
@@ -321,23 +307,52 @@ class SlackIntegrationConnectionFieldsEdgesNodeSlackIntegration(SlackIntegration
321
307
 
322
308
  ArtifactPortfolioScopeFields.model_rebuild()
323
309
  ArtifactSequenceScopeFields.model_rebuild()
324
- CreateFilterTriggerResult.model_rebuild()
325
- DeleteTriggerResult.model_rebuild()
310
+ CreateAutomationResult.model_rebuild()
311
+ DeleteAutomationResult.model_rebuild()
326
312
  FilterEventFields.model_rebuild()
327
313
  GenericWebhookActionFields.model_rebuild()
314
+ GenericWebhookActionFieldsIntegrationIntegration.model_rebuild()
328
315
  GenericWebhookIntegrationConnectionFields.model_rebuild()
316
+ GenericWebhookIntegrationConnectionFieldsEdges.model_rebuild()
317
+ GenericWebhookIntegrationConnectionFieldsEdgesNodeIntegration.model_rebuild()
329
318
  GenericWebhookIntegrationFields.model_rebuild()
330
- GithubIntegrationFields.model_rebuild()
331
319
  IntegrationConnectionFields.model_rebuild()
320
+ IntegrationConnectionFieldsEdges.model_rebuild()
321
+ IntegrationConnectionFieldsEdgesNodeIntegration.model_rebuild()
332
322
  NoOpActionFields.model_rebuild()
333
323
  NotificationActionFields.model_rebuild()
324
+ NotificationActionFieldsIntegrationIntegration.model_rebuild()
334
325
  PageInfoFields.model_rebuild()
335
326
  ProjectConnectionFields.model_rebuild()
327
+ ProjectConnectionFieldsEdges.model_rebuild()
328
+ ProjectConnectionFieldsEdgesNode.model_rebuild()
336
329
  ProjectScopeFields.model_rebuild()
337
330
  QueueJobActionFields.model_rebuild()
338
- RunQueueFields.model_rebuild()
331
+ QueueJobActionFieldsQueue.model_rebuild()
339
332
  SlackIntegrationConnectionFields.model_rebuild()
333
+ SlackIntegrationConnectionFieldsEdges.model_rebuild()
334
+ SlackIntegrationConnectionFieldsEdgesNodeIntegration.model_rebuild()
340
335
  SlackIntegrationFields.model_rebuild()
341
336
  TriggerFields.model_rebuild()
342
- UpdateFilterTriggerResult.model_rebuild()
343
- UserFields.model_rebuild()
337
+ UpdateAutomationResult.model_rebuild()
338
+ TriggerFieldsScopeArtifactPortfolio.model_rebuild()
339
+ TriggerFieldsScopeArtifactSequence.model_rebuild()
340
+ TriggerFieldsEventFilterEventTriggeringCondition.model_rebuild()
341
+ TriggerFieldsActionGenericWebhookTriggeredAction.model_rebuild()
342
+ GenericWebhookActionFieldsIntegrationGenericWebhookIntegration.model_rebuild()
343
+ GenericWebhookIntegrationConnectionFieldsEdgesNodeGenericWebhookIntegration.model_rebuild()
344
+ IntegrationConnectionFieldsEdgesNodeGenericWebhookIntegration.model_rebuild()
345
+ TriggerFieldsActionNoOpTriggeredAction.model_rebuild()
346
+ TriggerFieldsActionNotificationTriggeredAction.model_rebuild()
347
+ PageInfoFields.model_rebuild()
348
+ PageInfoFields.model_rebuild()
349
+ PageInfoFields.model_rebuild()
350
+ PageInfoFields.model_rebuild()
351
+ TriggerFieldsScopeProject.model_rebuild()
352
+ TriggerFieldsActionQueueJobTriggeredAction.model_rebuild()
353
+ IntegrationConnectionFieldsEdgesNodeSlackIntegration.model_rebuild()
354
+ NotificationActionFieldsIntegrationSlackIntegration.model_rebuild()
355
+ SlackIntegrationConnectionFieldsEdgesNodeSlackIntegration.model_rebuild()
356
+ TriggerFields.model_rebuild()
357
+ TriggerFields.model_rebuild()
358
+ TriggerFields.model_rebuild()
@@ -12,13 +12,13 @@ from wandb._pydantic import GQLBase
12
12
  from .fragments import ProjectConnectionFields
13
13
 
14
14
 
15
- class GetTriggers(GQLBase):
16
- search_scope: Optional[GetTriggersSearchScope] = Field(alias="searchScope")
15
+ class GetAutomations(GQLBase):
16
+ search_scope: Optional[GetAutomationsSearchScope] = Field(alias="searchScope")
17
17
 
18
18
 
19
- class GetTriggersSearchScope(GQLBase):
19
+ class GetAutomationsSearchScope(GQLBase):
20
20
  projects: Optional[ProjectConnectionFields]
21
21
 
22
22
 
23
- GetTriggers.model_rebuild()
24
- GetTriggersSearchScope.model_rebuild()
23
+ GetAutomations.model_rebuild()
24
+ GetAutomationsSearchScope.model_rebuild()
@@ -0,0 +1,26 @@
1
+ # Generated by ariadne-codegen
2
+ # Source: tools/graphql_codegen/automations/
3
+
4
+ from __future__ import annotations
5
+
6
+ from typing import Optional
7
+
8
+ from pydantic import Field
9
+
10
+ from wandb._pydantic import GQLBase
11
+
12
+ from .fragments import ProjectConnectionFields
13
+
14
+
15
+ class GetAutomationsByEntity(GQLBase):
16
+ search_scope: Optional[GetAutomationsByEntitySearchScope] = Field(
17
+ alias="searchScope"
18
+ )
19
+
20
+
21
+ class GetAutomationsByEntitySearchScope(GQLBase):
22
+ projects: Optional[ProjectConnectionFields]
23
+
24
+
25
+ GetAutomationsByEntity.model_rebuild()
26
+ GetAutomationsByEntitySearchScope.model_rebuild()
@@ -2,19 +2,19 @@
2
2
  # Source: tools/graphql_codegen/automations/
3
3
 
4
4
  __all__ = [
5
- "CREATE_FILTER_TRIGGER_GQL",
5
+ "CREATE_AUTOMATION_GQL",
6
6
  "CREATE_GENERIC_WEBHOOK_INTEGRATION_GQL",
7
- "DELETE_TRIGGER_GQL",
7
+ "DELETE_AUTOMATION_GQL",
8
8
  "GENERIC_WEBHOOK_INTEGRATIONS_BY_ENTITY_GQL",
9
- "GET_TRIGGERS_BY_ENTITY_GQL",
10
- "GET_TRIGGERS_GQL",
9
+ "GET_AUTOMATIONS_BY_ENTITY_GQL",
10
+ "GET_AUTOMATIONS_GQL",
11
11
  "INTEGRATIONS_BY_ENTITY_GQL",
12
12
  "SLACK_INTEGRATIONS_BY_ENTITY_GQL",
13
- "UPDATE_FILTER_TRIGGER_GQL",
13
+ "UPDATE_AUTOMATION_GQL",
14
14
  ]
15
15
 
16
- GET_TRIGGERS_GQL = """
17
- query GetTriggers($cursor: String, $perPage: Int) {
16
+ GET_AUTOMATIONS_GQL = """
17
+ query GetAutomations($cursor: String, $perPage: Int) {
18
18
  searchScope: viewer {
19
19
  projects(after: $cursor, first: $perPage) {
20
20
  ...ProjectConnectionFields
@@ -54,7 +54,6 @@ fragment GenericWebhookIntegrationFields on GenericWebhookIntegration {
54
54
  id
55
55
  name
56
56
  urlEndpoint
57
- createdAt
58
57
  }
59
58
 
60
59
  fragment NoOpActionFields on NoOpTriggeredAction {
@@ -102,17 +101,12 @@ fragment ProjectScopeFields on Project {
102
101
  fragment QueueJobActionFields on QueueJobTriggeredAction {
103
102
  __typename
104
103
  queue {
105
- ...RunQueueFields
104
+ id
105
+ name
106
106
  }
107
107
  template
108
108
  }
109
109
 
110
- fragment RunQueueFields on RunQueue {
111
- __typename
112
- id
113
- name
114
- }
115
-
116
110
  fragment SlackIntegrationFields on SlackIntegration {
117
111
  __typename
118
112
  id
@@ -124,9 +118,6 @@ fragment TriggerFields on Trigger {
124
118
  __typename
125
119
  id
126
120
  createdAt
127
- createdBy {
128
- ...UserFields
129
- }
130
121
  updatedAt
131
122
  name
132
123
  description
@@ -149,16 +140,10 @@ fragment TriggerFields on Trigger {
149
140
  ...NoOpActionFields
150
141
  }
151
142
  }
152
-
153
- fragment UserFields on User {
154
- __typename
155
- id
156
- username
157
- }
158
143
  """
159
144
 
160
- GET_TRIGGERS_BY_ENTITY_GQL = """
161
- query GetTriggersByEntity($entityName: String!, $cursor: String, $perPage: Int) {
145
+ GET_AUTOMATIONS_BY_ENTITY_GQL = """
146
+ query GetAutomationsByEntity($entityName: String!, $cursor: String, $perPage: Int) {
162
147
  searchScope: entity(name: $entityName) {
163
148
  projects(after: $cursor, first: $perPage) {
164
149
  ...ProjectConnectionFields
@@ -198,7 +183,6 @@ fragment GenericWebhookIntegrationFields on GenericWebhookIntegration {
198
183
  id
199
184
  name
200
185
  urlEndpoint
201
- createdAt
202
186
  }
203
187
 
204
188
  fragment NoOpActionFields on NoOpTriggeredAction {
@@ -246,17 +230,12 @@ fragment ProjectScopeFields on Project {
246
230
  fragment QueueJobActionFields on QueueJobTriggeredAction {
247
231
  __typename
248
232
  queue {
249
- ...RunQueueFields
233
+ id
234
+ name
250
235
  }
251
236
  template
252
237
  }
253
238
 
254
- fragment RunQueueFields on RunQueue {
255
- __typename
256
- id
257
- name
258
- }
259
-
260
239
  fragment SlackIntegrationFields on SlackIntegration {
261
240
  __typename
262
241
  id
@@ -268,9 +247,6 @@ fragment TriggerFields on Trigger {
268
247
  __typename
269
248
  id
270
249
  createdAt
271
- createdBy {
272
- ...UserFields
273
- }
274
250
  updatedAt
275
251
  name
276
252
  description
@@ -293,18 +269,12 @@ fragment TriggerFields on Trigger {
293
269
  ...NoOpActionFields
294
270
  }
295
271
  }
296
-
297
- fragment UserFields on User {
298
- __typename
299
- id
300
- username
301
- }
302
272
  """
303
273
 
304
- CREATE_FILTER_TRIGGER_GQL = """
305
- mutation CreateFilterTrigger($params: CreateFilterTriggerInput!) {
306
- createFilterTrigger(input: $params) {
307
- ...CreateFilterTriggerResult
274
+ CREATE_AUTOMATION_GQL = """
275
+ mutation CreateAutomation($params: CreateFilterTriggerInput!) {
276
+ result: createFilterTrigger(input: $params) {
277
+ ...CreateAutomationResult
308
278
  }
309
279
  }
310
280
 
@@ -320,7 +290,7 @@ fragment ArtifactSequenceScopeFields on ArtifactSequence {
320
290
  name
321
291
  }
322
292
 
323
- fragment CreateFilterTriggerResult on CreateFilterTriggerPayload {
293
+ fragment CreateAutomationResult on CreateFilterTriggerPayload {
324
294
  __typename
325
295
  trigger {
326
296
  ...TriggerFields
@@ -347,7 +317,6 @@ fragment GenericWebhookIntegrationFields on GenericWebhookIntegration {
347
317
  id
348
318
  name
349
319
  urlEndpoint
350
- createdAt
351
320
  }
352
321
 
353
322
  fragment NoOpActionFields on NoOpTriggeredAction {
@@ -375,17 +344,12 @@ fragment ProjectScopeFields on Project {
375
344
  fragment QueueJobActionFields on QueueJobTriggeredAction {
376
345
  __typename
377
346
  queue {
378
- ...RunQueueFields
347
+ id
348
+ name
379
349
  }
380
350
  template
381
351
  }
382
352
 
383
- fragment RunQueueFields on RunQueue {
384
- __typename
385
- id
386
- name
387
- }
388
-
389
353
  fragment SlackIntegrationFields on SlackIntegration {
390
354
  __typename
391
355
  id
@@ -397,9 +361,6 @@ fragment TriggerFields on Trigger {
397
361
  __typename
398
362
  id
399
363
  createdAt
400
- createdBy {
401
- ...UserFields
402
- }
403
364
  updatedAt
404
365
  name
405
366
  description
@@ -422,18 +383,12 @@ fragment TriggerFields on Trigger {
422
383
  ...NoOpActionFields
423
384
  }
424
385
  }
425
-
426
- fragment UserFields on User {
427
- __typename
428
- id
429
- username
430
- }
431
386
  """
432
387
 
433
- UPDATE_FILTER_TRIGGER_GQL = """
434
- mutation UpdateFilterTrigger($params: UpdateFilterTriggerInput!) {
435
- updateFilterTrigger(input: $params) {
436
- ...UpdateFilterTriggerResult
388
+ UPDATE_AUTOMATION_GQL = """
389
+ mutation UpdateAutomation($params: UpdateFilterTriggerInput!) {
390
+ result: updateFilterTrigger(input: $params) {
391
+ ...UpdateAutomationResult
437
392
  }
438
393
  }
439
394
 
@@ -469,7 +424,6 @@ fragment GenericWebhookIntegrationFields on GenericWebhookIntegration {
469
424
  id
470
425
  name
471
426
  urlEndpoint
472
- createdAt
473
427
  }
474
428
 
475
429
  fragment NoOpActionFields on NoOpTriggeredAction {
@@ -497,17 +451,12 @@ fragment ProjectScopeFields on Project {
497
451
  fragment QueueJobActionFields on QueueJobTriggeredAction {
498
452
  __typename
499
453
  queue {
500
- ...RunQueueFields
454
+ id
455
+ name
501
456
  }
502
457
  template
503
458
  }
504
459
 
505
- fragment RunQueueFields on RunQueue {
506
- __typename
507
- id
508
- name
509
- }
510
-
511
460
  fragment SlackIntegrationFields on SlackIntegration {
512
461
  __typename
513
462
  id
@@ -519,9 +468,6 @@ fragment TriggerFields on Trigger {
519
468
  __typename
520
469
  id
521
470
  createdAt
522
- createdBy {
523
- ...UserFields
524
- }
525
471
  updatedAt
526
472
  name
527
473
  description
@@ -545,35 +491,29 @@ fragment TriggerFields on Trigger {
545
491
  }
546
492
  }
547
493
 
548
- fragment UpdateFilterTriggerResult on UpdateFilterTriggerPayload {
494
+ fragment UpdateAutomationResult on UpdateFilterTriggerPayload {
549
495
  __typename
550
496
  trigger {
551
497
  ...TriggerFields
552
498
  }
553
499
  }
554
-
555
- fragment UserFields on User {
556
- __typename
557
- id
558
- username
559
- }
560
500
  """
561
501
 
562
- DELETE_TRIGGER_GQL = """
563
- mutation DeleteTrigger($id: ID!) {
564
- deleteTrigger(input: {triggerID: $id}) {
565
- ...DeleteTriggerResult
502
+ DELETE_AUTOMATION_GQL = """
503
+ mutation DeleteAutomation($id: ID!) {
504
+ result: deleteTrigger(input: {triggerID: $id}) {
505
+ ...DeleteAutomationResult
566
506
  }
567
507
  }
568
508
 
569
- fragment DeleteTriggerResult on DeleteTriggerPayload {
509
+ fragment DeleteAutomationResult on DeleteTriggerPayload {
570
510
  __typename
571
511
  success
572
512
  }
573
513
  """
574
514
 
575
515
  INTEGRATIONS_BY_ENTITY_GQL = """
576
- query IntegrationsByEntity($entityName: String!, $cursor: String, $perPage: Int, $includeSlack: Boolean = false, $includeWebhook: Boolean = false) {
516
+ query IntegrationsByEntity($entityName: String!, $cursor: String, $perPage: Int) {
577
517
  entity(name: $entityName) {
578
518
  integrations(after: $cursor, first: $perPage) {
579
519
  ...IntegrationConnectionFields
@@ -586,7 +526,6 @@ fragment GenericWebhookIntegrationFields on GenericWebhookIntegration {
586
526
  id
587
527
  name
588
528
  urlEndpoint
589
- createdAt
590
529
  }
591
530
 
592
531
  fragment IntegrationConnectionFields on IntegrationConnection {
@@ -598,8 +537,8 @@ fragment IntegrationConnectionFields on IntegrationConnection {
598
537
  cursor
599
538
  node {
600
539
  __typename
601
- ...SlackIntegrationFields @include(if: $includeSlack)
602
- ...GenericWebhookIntegrationFields @include(if: $includeWebhook)
540
+ ...SlackIntegrationFields
541
+ ...GenericWebhookIntegrationFields
603
542
  }
604
543
  }
605
544
  }
@@ -681,7 +620,6 @@ fragment GenericWebhookIntegrationFields on GenericWebhookIntegration {
681
620
  id
682
621
  name
683
622
  urlEndpoint
684
- createdAt
685
623
  }
686
624
 
687
625
  fragment PageInfoFields on PageInfo {
@@ -705,6 +643,5 @@ fragment GenericWebhookIntegrationFields on GenericWebhookIntegration {
705
643
  id
706
644
  name
707
645
  urlEndpoint
708
- createdAt
709
646
  }
710
647
  """