codemie-sdk-python 0.1.720__py3-none-any.whl → 0.1.721__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.
codemie_sdk/__init__.py CHANGED
@@ -221,6 +221,7 @@ from .services.export import ExportService
221
221
  from .models.hosted_application import (
222
222
  HostedApplication,
223
223
  HostedApplicationCapabilities,
224
+ HostedApplicationCategory,
224
225
  HostedApplicationCreator,
225
226
  HostedApplicationDeletion,
226
227
  HostedApplicationDeletionStatus,
@@ -415,6 +416,7 @@ __all__ = [
415
416
  "MarketplaceManagementService",
416
417
  "HostedApplication",
417
418
  "HostedApplicationCapabilities",
419
+ "HostedApplicationCategory",
418
420
  "HostedApplicationCreator",
419
421
  "HostedApplicationDeletion",
420
422
  "HostedApplicationDeletionStatus",
@@ -58,6 +58,15 @@ class HostedApplicationCreator(BaseModel):
58
58
  name: str | None = None
59
59
 
60
60
 
61
+ class HostedApplicationCategory(BaseModel):
62
+ """A category of an application: its id and its name."""
63
+
64
+ model_config = ConfigDict(extra="ignore")
65
+
66
+ id: str
67
+ name: str
68
+
69
+
61
70
  class HostedApplication(BaseModel):
62
71
  """An application as the caller sees it.
63
72
 
@@ -75,6 +84,10 @@ class HostedApplication(BaseModel):
75
84
  project: str | None = None
76
85
  shared: bool = False
77
86
  is_global: bool = False
87
+ categories: list[HostedApplicationCategory] = Field(
88
+ default_factory=list,
89
+ description="Categories of the application, in the order they were set",
90
+ )
78
91
  created_by: HostedApplicationCreator | None = None
79
92
  user_abilities: list[str] = Field(default_factory=list)
80
93
  can_share: bool = False
@@ -412,14 +412,28 @@ class HostedApplicationService:
412
412
  )
413
413
 
414
414
  def marketplace_publish(
415
- self, app_id: str, if_match: str, idempotency_key: str | None = None
415
+ self,
416
+ app_id: str,
417
+ if_match: str,
418
+ idempotency_key: str | None = None,
419
+ categories: list[str] | None = None,
416
420
  ) -> HostedApplication:
417
- """Publish an application to the marketplace."""
421
+ """Publish an application to the marketplace.
422
+
423
+ Args:
424
+ app_id: Application id
425
+ if_match: ``etag`` of the application
426
+ idempotency_key: Key to repeat the request safely
427
+ categories: 1 to 3 category ids to publish under; they replace the
428
+ categories of the application. The platform refuses a publication
429
+ without them, so leaving this out only works against a platform
430
+ that does not ask for categories.
431
+ """
418
432
  return self._api.request(
419
433
  "POST",
420
434
  self._path(app_id, "marketplace", "publish"),
421
435
  HostedApplication,
422
- json_data={},
436
+ json_data={} if categories is None else {"categories": categories},
423
437
  extra_headers=self._headers(if_match, idempotency_key),
424
438
  wrap_response=False,
425
439
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codemie-sdk-python
3
- Version: 0.1.720
3
+ Version: 0.1.721
4
4
  Summary: CodeMie SDK for Python
5
5
  License: Apache-2.0
6
6
  Author: CodeMie
@@ -1,4 +1,4 @@
1
- codemie_sdk/__init__.py,sha256=oi8RUO78Ul4ODITBHScPXGksd4K7s0t-AE8ksFBAq9I,13048
1
+ codemie_sdk/__init__.py,sha256=0QAUxYVwLruC4lDrM6lr_0T_WjOrGVOB80K1P9SaAZ0,13112
2
2
  codemie_sdk/auth/__init__.py,sha256=IksEj223xEZtJ-cQ0AT9L0Bs9psIJ8QNzDXrPTUQ3xQ,126
3
3
  codemie_sdk/auth/credentials.py,sha256=hO0X3EQWZSlIm0ABhiJo4fIIndm2blB0JZWMaWvsuTE,7774
4
4
  codemie_sdk/builders/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -23,7 +23,7 @@ codemie_sdk/models/datasource.py,sha256=jp1Rbx1f0cvgUierU-3ru0xfq7NEpjaB_NBpp7Vf
23
23
  codemie_sdk/models/errors.py,sha256=tQXoPUhM2U95NoyTxsSSJws8PQ-Fr3iOQQ8IjJCsx78,11658
24
24
  codemie_sdk/models/file_operation.py,sha256=h5UBCCAbQQGm1EavF0AHn_dNE2t_Cc9be20lv_K5Vo8,722
25
25
  codemie_sdk/models/guardrails.py,sha256=813PRnu9VEF6hoUB-lw5xG_qAZXPic38qL40AwYkSMQ,2114
26
- codemie_sdk/models/hosted_application.py,sha256=zf-NfhbRp1jnnPjtMkzkaoOG08MTNPlewAhHC9r-Fhs,8241
26
+ codemie_sdk/models/hosted_application.py,sha256=0HdnlgV_fN9i7hNieJa-QWYaIvpvFR8hTLuxO7LDqrE,8596
27
27
  codemie_sdk/models/integration.py,sha256=9drr2veHPbJ7-op6Mya4lFwKBY1AX6HfwgEA8jucTHE,4039
28
28
  codemie_sdk/models/llm.py,sha256=0B7CxcL2iF2GcA7d-99FB6kIWD37fYV_sCyGXDrCcjA,2996
29
29
  codemie_sdk/models/marketplace_management.py,sha256=T51fSW0G8RGyBxMBnT_o5D8E00UQaW_Fcq1nw-RGlZY,6396
@@ -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=r1VstJmhoqOmx1HsiIrRuefVNzfYwVZxm8Ueqa8RnSs,21001
64
+ codemie_sdk/services/hosted_application.py,sha256=KpipphE3shxw5UH91SR06sEZ8-s3NqEgiRB1i3rYkh8,21587
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.720.dist-info/METADATA,sha256=n1VP0d3kZaMPMiEOmoE0tX_l3V3u0YaLNi38lyLSkY0,52067
91
- codemie_sdk_python-0.1.720.dist-info/WHEEL,sha256=L-WvLdSBvJWHXv5zrQxDvNRnIgoBzLUpcbuiw19KCuQ,88
92
- codemie_sdk_python-0.1.720.dist-info/RECORD,,
90
+ codemie_sdk_python-0.1.721.dist-info/METADATA,sha256=LXbEhGMWoy1n2YbY3IwdGGa6GGVUXDYfzDDP4NtzsqE,52067
91
+ codemie_sdk_python-0.1.721.dist-info/WHEEL,sha256=L-WvLdSBvJWHXv5zrQxDvNRnIgoBzLUpcbuiw19KCuQ,88
92
+ codemie_sdk_python-0.1.721.dist-info/RECORD,,