codemie-sdk-python 0.1.722__py3-none-any.whl → 0.1.723__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.
@@ -163,8 +163,11 @@ class HostedApplicationService:
163
163
  project: str,
164
164
  shared: bool = False,
165
165
  idempotency_key: str | None = None,
166
+ categories: list[str] | None = None,
166
167
  ) -> HostedApplication:
167
168
  """Create a private application, or one shared with every member of ``project``."""
169
+ # ``categories`` holds up to 3 category ids; an empty list is sent as given and
170
+ # ``None`` leaves the key out of the request.
168
171
  return self._api.request(
169
172
  "POST",
170
173
  _BASE,
@@ -174,11 +177,54 @@ class HostedApplicationService:
174
177
  "description": description,
175
178
  "project": project,
176
179
  "shared": shared,
180
+ **({"categories": categories} if categories is not None else {}),
177
181
  },
178
182
  extra_headers=self._headers(idempotency_key=idempotency_key),
179
183
  wrap_response=False,
180
184
  )
181
185
 
186
+ def update_application(
187
+ self,
188
+ app_id: str,
189
+ if_match: str,
190
+ name: str | None = None,
191
+ description: str | None = None,
192
+ project: str | None = None,
193
+ shared: bool | None = None,
194
+ categories: list[str] | None = None,
195
+ idempotency_key: str | None = None,
196
+ ) -> HostedApplication:
197
+ """Change the metadata of an application; only the values given are sent.
198
+
199
+ Args:
200
+ app_id: Application id
201
+ if_match: ``etag`` of the application
202
+ name: New name
203
+ description: New description
204
+ project: New project
205
+ shared: New sharing with the project members
206
+ categories: Up to 3 category ids that replace the current ones; an empty list
207
+ clears them. A published application must keep at least one.
208
+ idempotency_key: Key to repeat the request safely
209
+ """
210
+ changes = {
211
+ "name": name,
212
+ "description": description,
213
+ "project": project,
214
+ "shared": shared,
215
+ "categories": categories,
216
+ }
217
+ return self._api.request(
218
+ "PATCH",
219
+ self._path(app_id),
220
+ HostedApplication,
221
+ json_data={
222
+ key: value for key, value in changes.items() if value is not None
223
+ },
224
+ extra_headers=self._headers(if_match, idempotency_key),
225
+ wrap_response=False,
226
+ )
227
+
182
228
  def delete_application(
183
229
  self, app_id: str, if_match: str, idempotency_key: str | None = None
184
230
  ) -> HostedApplicationDeletion:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codemie-sdk-python
3
- Version: 0.1.722
3
+ Version: 0.1.723
4
4
  Summary: CodeMie SDK for Python
5
5
  License: Apache-2.0
6
6
  Author: CodeMie
@@ -61,7 +61,7 @@ codemie_sdk/services/datasource.py,sha256=4Glf8pyytMM0kZi41FBIjY_DVCa9brrVMIBAGt
61
61
  codemie_sdk/services/dynamic_config.py,sha256=amgSOZ-835r6O_U72sjiFe60rrxJZqJ2L7oKCK-avE4,4214
62
62
  codemie_sdk/services/export.py,sha256=JFkci7R33hamwJ2rqCGDe6aRGIPKmW7QuZHdJDXp54g,2259
63
63
  codemie_sdk/services/files.py,sha256=ERb6irexO2hIKepUiTw498J0dt0427YNdKrXdcOu9tM,2762
64
- codemie_sdk/services/hosted_application.py,sha256=KpipphE3shxw5UH91SR06sEZ8-s3NqEgiRB1i3rYkh8,21587
64
+ codemie_sdk/services/hosted_application.py,sha256=9XlWmniH3g7EP-HuEtV84YGSSXTKU0ytNe8OtZQZLvk,23332
65
65
  codemie_sdk/services/integration.py,sha256=gwkbH2gPoyRAXJSr2LLeKi2nqlFwJ0NAzwVx7uqKlvk,11678
66
66
  codemie_sdk/services/llm.py,sha256=R03Q_JCF-IDTsV7gkjtFo6d_FkKMS6gBnYU2LdnYt_0,1448
67
67
  codemie_sdk/services/marketplace_management.py,sha256=89JEPEg7tdwlFJ1LfKQJRJp4oug_nxMGBIjCf1S4H6U,7991
@@ -87,6 +87,6 @@ codemie_sdk/services/workspace.py,sha256=eLwZ0fhi1BfOesrXaQlTdOll8q7ENP9b_jb5eyb
87
87
  codemie_sdk/utils/__init__.py,sha256=EzK_UrS5KHmAnE73Hci9LaObB5omjVUhIq4svh0gfwo,137
88
88
  codemie_sdk/utils/http.py,sha256=94PBmIuT646i4B-FHWCZ8YDKybht_glzL1Qnrk0HrRI,16615
89
89
  codemie_sdk/utils/payload.py,sha256=XwIAdPWE3TdetV0bImx1Xkery0Hgm9dU_lAXmf2OSZI,313
90
- codemie_sdk_python-0.1.722.dist-info/METADATA,sha256=2jCgP81XR6Z727ZKodFgRIxLR-6I2FkLCYxzB1MMPyQ,53842
91
- codemie_sdk_python-0.1.722.dist-info/WHEEL,sha256=L-WvLdSBvJWHXv5zrQxDvNRnIgoBzLUpcbuiw19KCuQ,88
92
- codemie_sdk_python-0.1.722.dist-info/RECORD,,
90
+ codemie_sdk_python-0.1.723.dist-info/METADATA,sha256=AlqUxe7N1YfLNfQvNjhA4ohsBi3H7QlwZXPhnejSfBU,53842
91
+ codemie_sdk_python-0.1.723.dist-info/WHEEL,sha256=L-WvLdSBvJWHXv5zrQxDvNRnIgoBzLUpcbuiw19KCuQ,88
92
+ codemie_sdk_python-0.1.723.dist-info/RECORD,,