@planqk/planqk-service-sdk 2.6.2 → 2.8.0

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 (124) hide show
  1. package/dist/sdk/BaseClient.d.ts +26 -0
  2. package/dist/sdk/{api/resources/serviceApi/types/GetResultResponse.js → BaseClient.js} +1 -3
  3. package/dist/sdk/Client.d.ts +4 -22
  4. package/dist/sdk/Client.js +2 -4
  5. package/dist/sdk/api/index.d.ts +1 -1
  6. package/dist/sdk/api/index.js +1 -1
  7. package/dist/sdk/api/resources/index.d.ts +0 -1
  8. package/dist/sdk/api/resources/index.js +0 -4
  9. package/dist/sdk/api/resources/serviceApi/client/Client.d.ts +9 -26
  10. package/dist/sdk/api/resources/serviceApi/client/Client.js +43 -27
  11. package/dist/sdk/api/resources/serviceApi/index.d.ts +0 -1
  12. package/dist/sdk/api/resources/serviceApi/index.js +0 -1
  13. package/dist/sdk/api/types/HalLink.d.ts +0 -3
  14. package/dist/sdk/api/types/HalLink.js +1 -3
  15. package/dist/sdk/api/types/LogEntry.d.ts +19 -0
  16. package/dist/sdk/api/types/LogEntry.js +15 -0
  17. package/dist/sdk/api/types/RequestBody.d.ts +1 -0
  18. package/dist/sdk/api/types/RequestBody.js +3 -0
  19. package/dist/sdk/api/types/ResultResponse.d.ts +15 -0
  20. package/dist/sdk/api/types/ResultResponse.js +3 -0
  21. package/dist/sdk/api/types/ServiceExecution.d.ts +1 -4
  22. package/dist/sdk/api/types/ServiceExecution.js +1 -3
  23. package/dist/sdk/api/types/index.d.ts +3 -0
  24. package/dist/sdk/api/types/index.js +3 -0
  25. package/dist/sdk/core/auth/AuthProvider.d.ts +4 -0
  26. package/dist/sdk/core/auth/AuthProvider.js +2 -0
  27. package/dist/sdk/core/auth/AuthRequest.d.ts +9 -0
  28. package/dist/sdk/core/auth/AuthRequest.js +2 -0
  29. package/dist/sdk/core/auth/BasicAuth.js +2 -1
  30. package/dist/sdk/core/auth/index.d.ts +2 -0
  31. package/dist/sdk/core/fetcher/APIResponse.d.ts +1 -1
  32. package/dist/sdk/core/fetcher/BinaryResponse.d.ts +1 -1
  33. package/dist/sdk/core/fetcher/EndpointMetadata.d.ts +13 -0
  34. package/dist/sdk/core/fetcher/EndpointMetadata.js +2 -0
  35. package/dist/sdk/core/fetcher/EndpointSupplier.d.ts +12 -0
  36. package/dist/sdk/core/fetcher/EndpointSupplier.js +13 -0
  37. package/dist/sdk/core/fetcher/Fetcher.d.ts +6 -4
  38. package/dist/sdk/core/fetcher/Fetcher.js +3 -3
  39. package/dist/sdk/core/fetcher/HttpResponsePromise.d.ts +1 -1
  40. package/dist/sdk/core/fetcher/index.d.ts +7 -5
  41. package/dist/sdk/core/fetcher/index.js +7 -5
  42. package/dist/sdk/core/fetcher/requestWithRetries.js +44 -8
  43. package/dist/sdk/core/headers.d.ts +2 -3
  44. package/dist/sdk/core/url/join.js +23 -3
  45. package/dist/sdk/environments.d.ts +0 -3
  46. package/dist/sdk/environments.js +1 -3
  47. package/dist/sdk/errors/PlanqkServiceApiError.d.ts +0 -3
  48. package/dist/sdk/errors/PlanqkServiceApiError.js +1 -3
  49. package/dist/sdk/errors/PlanqkServiceApiTimeoutError.d.ts +0 -3
  50. package/dist/sdk/errors/PlanqkServiceApiTimeoutError.js +1 -3
  51. package/dist/sdk/index.d.ts +1 -0
  52. package/fern/fern.config.json +1 -1
  53. package/fern/generators.yml +6 -4
  54. package/fern/openapi/openapi.yml +115 -80
  55. package/package.json +1 -1
  56. package/planqk/service/_version.py +1 -1
  57. package/planqk/service/client.py +3 -3
  58. package/planqk/service/sdk/__init__.py +61 -8
  59. package/planqk/service/sdk/client.py +27 -7
  60. package/planqk/service/sdk/core/__init__.py +80 -20
  61. package/planqk/service/sdk/core/client_wrapper.py +8 -6
  62. package/planqk/service/sdk/core/force_multipart.py +4 -2
  63. package/planqk/service/sdk/core/http_response.py +1 -1
  64. package/planqk/service/sdk/core/http_sse/__init__.py +42 -0
  65. package/planqk/service/sdk/core/http_sse/_api.py +112 -0
  66. package/planqk/service/sdk/core/http_sse/_decoders.py +61 -0
  67. package/planqk/service/sdk/core/http_sse/_exceptions.py +7 -0
  68. package/planqk/service/sdk/core/http_sse/_models.py +17 -0
  69. package/planqk/service/sdk/core/pydantic_utilities.py +5 -2
  70. package/planqk/service/sdk/core/unchecked_base_model.py +341 -0
  71. package/planqk/service/sdk/service_api/__init__.py +0 -3
  72. package/planqk/service/sdk/service_api/client.py +17 -21
  73. package/planqk/service/sdk/service_api/raw_client.py +36 -40
  74. package/planqk/service/sdk/types/__init__.py +57 -4
  75. package/planqk/service/sdk/types/hal_link.py +3 -2
  76. package/planqk/service/sdk/types/log_entry.py +35 -0
  77. package/planqk/service/sdk/types/log_entry_severity.py +5 -0
  78. package/planqk/service/sdk/types/request_body.py +5 -0
  79. package/planqk/service/sdk/types/result_response.py +27 -0
  80. package/planqk/service/sdk/{service_api/types/get_result_response_embedded.py → types/result_response_embedded.py} +4 -3
  81. package/planqk/service/sdk/{service_api/types/get_result_response_links.py → types/result_response_links.py} +4 -3
  82. package/planqk/service/sdk/types/service_execution.py +3 -2
  83. package/pyproject.toml +1 -1
  84. package/requirements-dev.txt +59 -43
  85. package/requirements.txt +6 -6
  86. package/src/index.test.ts +10 -0
  87. package/src/sdk/BaseClient.ts +30 -0
  88. package/src/sdk/Client.ts +6 -23
  89. package/src/sdk/api/index.ts +1 -1
  90. package/src/sdk/api/resources/index.ts +0 -1
  91. package/src/sdk/api/resources/serviceApi/client/Client.ts +87 -82
  92. package/src/sdk/api/resources/serviceApi/index.ts +0 -1
  93. package/src/sdk/api/types/HalLink.ts +1 -3
  94. package/src/sdk/api/types/LogEntry.ts +22 -0
  95. package/src/sdk/api/types/RequestBody.ts +3 -0
  96. package/src/sdk/api/types/ResultResponse.ts +20 -0
  97. package/src/sdk/api/types/ServiceExecution.ts +2 -4
  98. package/src/sdk/api/types/index.ts +3 -0
  99. package/src/sdk/core/auth/AuthProvider.ts +5 -0
  100. package/src/sdk/core/auth/AuthRequest.ts +9 -0
  101. package/src/sdk/core/auth/BasicAuth.ts +2 -1
  102. package/src/sdk/core/auth/index.ts +2 -0
  103. package/src/sdk/core/fetcher/APIResponse.ts +1 -1
  104. package/src/sdk/core/fetcher/BinaryResponse.ts +1 -1
  105. package/src/sdk/core/fetcher/EndpointMetadata.ts +13 -0
  106. package/src/sdk/core/fetcher/EndpointSupplier.ts +14 -0
  107. package/src/sdk/core/fetcher/Fetcher.ts +8 -6
  108. package/src/sdk/core/fetcher/HttpResponsePromise.ts +1 -1
  109. package/src/sdk/core/fetcher/index.ts +7 -5
  110. package/src/sdk/core/fetcher/requestWithRetries.ts +49 -9
  111. package/src/sdk/core/headers.ts +8 -10
  112. package/src/sdk/core/url/join.ts +28 -3
  113. package/src/sdk/environments.ts +1 -3
  114. package/src/sdk/errors/PlanqkServiceApiError.ts +1 -3
  115. package/src/sdk/errors/PlanqkServiceApiTimeoutError.ts +1 -3
  116. package/src/sdk/index.ts +1 -0
  117. package/uv.lock +77 -47
  118. package/dist/sdk/api/resources/serviceApi/types/GetResultResponse.d.ts +0 -18
  119. package/dist/sdk/api/resources/serviceApi/types/index.d.ts +0 -1
  120. package/dist/sdk/api/resources/serviceApi/types/index.js +0 -17
  121. package/planqk/service/sdk/service_api/types/__init__.py +0 -9
  122. package/planqk/service/sdk/service_api/types/get_result_response.py +0 -26
  123. package/src/sdk/api/resources/serviceApi/types/GetResultResponse.ts +0 -22
  124. package/src/sdk/api/resources/serviceApi/types/index.ts +0 -1
@@ -8,10 +8,12 @@ from ..core.api_error import ApiError
8
8
  from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
9
9
  from ..core.http_response import AsyncHttpResponse, HttpResponse
10
10
  from ..core.jsonable_encoder import jsonable_encoder
11
- from ..core.pydantic_utilities import parse_obj_as
12
11
  from ..core.request_options import RequestOptions
12
+ from ..core.unchecked_base_model import construct_type
13
+ from ..types.log_entry import LogEntry
14
+ from ..types.request_body import RequestBody
15
+ from ..types.result_response import ResultResponse
13
16
  from ..types.service_execution import ServiceExecution
14
- from .types.get_result_response import GetResultResponse
15
17
 
16
18
  # this is used as the default value for optional parameters
17
19
  OMIT = typing.cast(typing.Any, ...)
@@ -46,7 +48,7 @@ class RawServiceApiClient:
46
48
  if 200 <= _response.status_code < 300:
47
49
  _data = typing.cast(
48
50
  typing.List[ServiceExecution],
49
- parse_obj_as(
51
+ construct_type(
50
52
  type_=typing.List[ServiceExecution], # type: ignore
51
53
  object_=_response.json(),
52
54
  ),
@@ -58,10 +60,7 @@ class RawServiceApiClient:
58
60
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
59
61
 
60
62
  def start_execution(
61
- self,
62
- *,
63
- request: typing.Dict[str, typing.Optional[typing.Any]],
64
- request_options: typing.Optional[RequestOptions] = None,
63
+ self, *, request: RequestBody, request_options: typing.Optional[RequestOptions] = None
65
64
  ) -> HttpResponse[ServiceExecution]:
66
65
  """
67
66
  Starts a service execution, which in turn is processed asynchronously.
@@ -69,7 +68,7 @@ class RawServiceApiClient:
69
68
 
70
69
  Parameters
71
70
  ----------
72
- request : typing.Dict[str, typing.Optional[typing.Any]]
71
+ request : RequestBody
73
72
 
74
73
  request_options : typing.Optional[RequestOptions]
75
74
  Request-specific configuration.
@@ -92,7 +91,7 @@ class RawServiceApiClient:
92
91
  if 200 <= _response.status_code < 300:
93
92
  _data = typing.cast(
94
93
  ServiceExecution,
95
- parse_obj_as(
94
+ construct_type(
96
95
  type_=ServiceExecution, # type: ignore
97
96
  object_=_response.json(),
98
97
  ),
@@ -132,7 +131,7 @@ class RawServiceApiClient:
132
131
  if 200 <= _response.status_code < 300:
133
132
  _data = typing.cast(
134
133
  ServiceExecution,
135
- parse_obj_as(
134
+ construct_type(
136
135
  type_=ServiceExecution, # type: ignore
137
136
  object_=_response.json(),
138
137
  ),
@@ -145,7 +144,7 @@ class RawServiceApiClient:
145
144
 
146
145
  def get_result(
147
146
  self, id: str, *, request_options: typing.Optional[RequestOptions] = None
148
- ) -> HttpResponse[GetResultResponse]:
147
+ ) -> HttpResponse[ResultResponse]:
149
148
  """
150
149
  Retrieves the result of a service execution.
151
150
  The result is returned as a JSON object containing the status and any additional data.
@@ -161,7 +160,7 @@ class RawServiceApiClient:
161
160
 
162
161
  Returns
163
162
  -------
164
- HttpResponse[GetResultResponse]
163
+ HttpResponse[ResultResponse]
165
164
  The service execution result
166
165
  """
167
166
  _response = self._client_wrapper.httpx_client.request(
@@ -172,9 +171,9 @@ class RawServiceApiClient:
172
171
  try:
173
172
  if 200 <= _response.status_code < 300:
174
173
  _data = typing.cast(
175
- GetResultResponse,
176
- parse_obj_as(
177
- type_=GetResultResponse, # type: ignore
174
+ ResultResponse,
175
+ construct_type(
176
+ type_=ResultResponse, # type: ignore
178
177
  object_=_response.json(),
179
178
  ),
180
179
  )
@@ -234,7 +233,7 @@ class RawServiceApiClient:
234
233
 
235
234
  def get_logs(
236
235
  self, id: str, *, request_options: typing.Optional[RequestOptions] = None
237
- ) -> HttpResponse[typing.List[str]]:
236
+ ) -> HttpResponse[typing.List[LogEntry]]:
238
237
  """
239
238
  Returns a list of log entries for a service execution in chronological order, where the first entry is the oldest.
240
239
 
@@ -248,7 +247,7 @@ class RawServiceApiClient:
248
247
 
249
248
  Returns
250
249
  -------
251
- HttpResponse[typing.List[str]]
250
+ HttpResponse[typing.List[LogEntry]]
252
251
  List of log entries
253
252
  """
254
253
  _response = self._client_wrapper.httpx_client.request(
@@ -259,9 +258,9 @@ class RawServiceApiClient:
259
258
  try:
260
259
  if 200 <= _response.status_code < 300:
261
260
  _data = typing.cast(
262
- typing.List[str],
263
- parse_obj_as(
264
- type_=typing.List[str], # type: ignore
261
+ typing.List[LogEntry],
262
+ construct_type(
263
+ type_=typing.List[LogEntry], # type: ignore
265
264
  object_=_response.json(),
266
265
  ),
267
266
  )
@@ -299,7 +298,7 @@ class RawServiceApiClient:
299
298
  if 200 <= _response.status_code < 300:
300
299
  _data = typing.cast(
301
300
  ServiceExecution,
302
- parse_obj_as(
301
+ construct_type(
303
302
  type_=ServiceExecution, # type: ignore
304
303
  object_=_response.json(),
305
304
  ),
@@ -340,7 +339,7 @@ class AsyncRawServiceApiClient:
340
339
  if 200 <= _response.status_code < 300:
341
340
  _data = typing.cast(
342
341
  typing.List[ServiceExecution],
343
- parse_obj_as(
342
+ construct_type(
344
343
  type_=typing.List[ServiceExecution], # type: ignore
345
344
  object_=_response.json(),
346
345
  ),
@@ -352,10 +351,7 @@ class AsyncRawServiceApiClient:
352
351
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
353
352
 
354
353
  async def start_execution(
355
- self,
356
- *,
357
- request: typing.Dict[str, typing.Optional[typing.Any]],
358
- request_options: typing.Optional[RequestOptions] = None,
354
+ self, *, request: RequestBody, request_options: typing.Optional[RequestOptions] = None
359
355
  ) -> AsyncHttpResponse[ServiceExecution]:
360
356
  """
361
357
  Starts a service execution, which in turn is processed asynchronously.
@@ -363,7 +359,7 @@ class AsyncRawServiceApiClient:
363
359
 
364
360
  Parameters
365
361
  ----------
366
- request : typing.Dict[str, typing.Optional[typing.Any]]
362
+ request : RequestBody
367
363
 
368
364
  request_options : typing.Optional[RequestOptions]
369
365
  Request-specific configuration.
@@ -386,7 +382,7 @@ class AsyncRawServiceApiClient:
386
382
  if 200 <= _response.status_code < 300:
387
383
  _data = typing.cast(
388
384
  ServiceExecution,
389
- parse_obj_as(
385
+ construct_type(
390
386
  type_=ServiceExecution, # type: ignore
391
387
  object_=_response.json(),
392
388
  ),
@@ -426,7 +422,7 @@ class AsyncRawServiceApiClient:
426
422
  if 200 <= _response.status_code < 300:
427
423
  _data = typing.cast(
428
424
  ServiceExecution,
429
- parse_obj_as(
425
+ construct_type(
430
426
  type_=ServiceExecution, # type: ignore
431
427
  object_=_response.json(),
432
428
  ),
@@ -439,7 +435,7 @@ class AsyncRawServiceApiClient:
439
435
 
440
436
  async def get_result(
441
437
  self, id: str, *, request_options: typing.Optional[RequestOptions] = None
442
- ) -> AsyncHttpResponse[GetResultResponse]:
438
+ ) -> AsyncHttpResponse[ResultResponse]:
443
439
  """
444
440
  Retrieves the result of a service execution.
445
441
  The result is returned as a JSON object containing the status and any additional data.
@@ -455,7 +451,7 @@ class AsyncRawServiceApiClient:
455
451
 
456
452
  Returns
457
453
  -------
458
- AsyncHttpResponse[GetResultResponse]
454
+ AsyncHttpResponse[ResultResponse]
459
455
  The service execution result
460
456
  """
461
457
  _response = await self._client_wrapper.httpx_client.request(
@@ -466,9 +462,9 @@ class AsyncRawServiceApiClient:
466
462
  try:
467
463
  if 200 <= _response.status_code < 300:
468
464
  _data = typing.cast(
469
- GetResultResponse,
470
- parse_obj_as(
471
- type_=GetResultResponse, # type: ignore
465
+ ResultResponse,
466
+ construct_type(
467
+ type_=ResultResponse, # type: ignore
472
468
  object_=_response.json(),
473
469
  ),
474
470
  )
@@ -529,7 +525,7 @@ class AsyncRawServiceApiClient:
529
525
 
530
526
  async def get_logs(
531
527
  self, id: str, *, request_options: typing.Optional[RequestOptions] = None
532
- ) -> AsyncHttpResponse[typing.List[str]]:
528
+ ) -> AsyncHttpResponse[typing.List[LogEntry]]:
533
529
  """
534
530
  Returns a list of log entries for a service execution in chronological order, where the first entry is the oldest.
535
531
 
@@ -543,7 +539,7 @@ class AsyncRawServiceApiClient:
543
539
 
544
540
  Returns
545
541
  -------
546
- AsyncHttpResponse[typing.List[str]]
542
+ AsyncHttpResponse[typing.List[LogEntry]]
547
543
  List of log entries
548
544
  """
549
545
  _response = await self._client_wrapper.httpx_client.request(
@@ -554,9 +550,9 @@ class AsyncRawServiceApiClient:
554
550
  try:
555
551
  if 200 <= _response.status_code < 300:
556
552
  _data = typing.cast(
557
- typing.List[str],
558
- parse_obj_as(
559
- type_=typing.List[str], # type: ignore
553
+ typing.List[LogEntry],
554
+ construct_type(
555
+ type_=typing.List[LogEntry], # type: ignore
560
556
  object_=_response.json(),
561
557
  ),
562
558
  )
@@ -594,7 +590,7 @@ class AsyncRawServiceApiClient:
594
590
  if 200 <= _response.status_code < 300:
595
591
  _data = typing.cast(
596
592
  ServiceExecution,
597
- parse_obj_as(
593
+ construct_type(
598
594
  type_=ServiceExecution, # type: ignore
599
595
  object_=_response.json(),
600
596
  ),
@@ -2,8 +2,61 @@
2
2
 
3
3
  # isort: skip_file
4
4
 
5
- from .hal_link import HalLink
6
- from .service_execution import ServiceExecution
7
- from .service_execution_status import ServiceExecutionStatus
5
+ import typing
6
+ from importlib import import_module
8
7
 
9
- __all__ = ["HalLink", "ServiceExecution", "ServiceExecutionStatus"]
8
+ if typing.TYPE_CHECKING:
9
+ from .hal_link import HalLink
10
+ from .log_entry import LogEntry
11
+ from .log_entry_severity import LogEntrySeverity
12
+ from .request_body import RequestBody
13
+ from .result_response import ResultResponse
14
+ from .result_response_embedded import ResultResponseEmbedded
15
+ from .result_response_links import ResultResponseLinks
16
+ from .service_execution import ServiceExecution
17
+ from .service_execution_status import ServiceExecutionStatus
18
+ _dynamic_imports: typing.Dict[str, str] = {
19
+ "HalLink": ".hal_link",
20
+ "LogEntry": ".log_entry",
21
+ "LogEntrySeverity": ".log_entry_severity",
22
+ "RequestBody": ".request_body",
23
+ "ResultResponse": ".result_response",
24
+ "ResultResponseEmbedded": ".result_response_embedded",
25
+ "ResultResponseLinks": ".result_response_links",
26
+ "ServiceExecution": ".service_execution",
27
+ "ServiceExecutionStatus": ".service_execution_status",
28
+ }
29
+
30
+
31
+ def __getattr__(attr_name: str) -> typing.Any:
32
+ module_name = _dynamic_imports.get(attr_name)
33
+ if module_name is None:
34
+ raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
35
+ try:
36
+ module = import_module(module_name, __package__)
37
+ if module_name == f".{attr_name}":
38
+ return module
39
+ else:
40
+ return getattr(module, attr_name)
41
+ except ImportError as e:
42
+ raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
43
+ except AttributeError as e:
44
+ raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
45
+
46
+
47
+ def __dir__():
48
+ lazy_attrs = list(_dynamic_imports.keys())
49
+ return sorted(lazy_attrs)
50
+
51
+
52
+ __all__ = [
53
+ "HalLink",
54
+ "LogEntry",
55
+ "LogEntrySeverity",
56
+ "RequestBody",
57
+ "ResultResponse",
58
+ "ResultResponseEmbedded",
59
+ "ResultResponseLinks",
60
+ "ServiceExecution",
61
+ "ServiceExecutionStatus",
62
+ ]
@@ -3,10 +3,11 @@
3
3
  import typing
4
4
 
5
5
  import pydantic
6
- from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
+ from ..core.unchecked_base_model import UncheckedBaseModel
7
8
 
8
9
 
9
- class HalLink(UniversalBaseModel):
10
+ class HalLink(UncheckedBaseModel):
10
11
  href: typing.Optional[str] = pydantic.Field(default=None)
11
12
  """
12
13
  The URL of the link
@@ -0,0 +1,35 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ import pydantic
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
+ from ..core.unchecked_base_model import UncheckedBaseModel
9
+ from .log_entry_severity import LogEntrySeverity
10
+
11
+
12
+ class LogEntry(UncheckedBaseModel):
13
+ message: typing.Optional[str] = pydantic.Field(default=None)
14
+ """
15
+ Log message content.
16
+ """
17
+
18
+ severity: typing.Optional[LogEntrySeverity] = pydantic.Field(default=None)
19
+ """
20
+ Severity of the log entry.
21
+ """
22
+
23
+ timestamp: typing.Optional[dt.datetime] = pydantic.Field(default=None)
24
+ """
25
+ Timestamp when the entry was logged.
26
+ """
27
+
28
+ if IS_PYDANTIC_V2:
29
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
30
+ else:
31
+
32
+ class Config:
33
+ frozen = True
34
+ smart_union = True
35
+ extra = pydantic.Extra.allow
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ LogEntrySeverity = typing.Union[typing.Literal["DEBUG", "NOTICE", "INFO", "WARNING", "ERROR"], typing.Any]
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ RequestBody = typing.Dict[str, typing.Optional[typing.Any]]
@@ -0,0 +1,27 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ import typing_extensions
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
+ from ..core.serialization import FieldMetadata
9
+ from ..core.unchecked_base_model import UncheckedBaseModel
10
+ from .result_response_embedded import ResultResponseEmbedded
11
+ from .result_response_links import ResultResponseLinks
12
+
13
+
14
+ class ResultResponse(UncheckedBaseModel):
15
+ links: typing_extensions.Annotated[typing.Optional[ResultResponseLinks], FieldMetadata(alias="_links")] = None
16
+ embedded: typing_extensions.Annotated[typing.Optional[ResultResponseEmbedded], FieldMetadata(alias="_embedded")] = (
17
+ None
18
+ )
19
+
20
+ if IS_PYDANTIC_V2:
21
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
22
+ else:
23
+
24
+ class Config:
25
+ frozen = True
26
+ smart_union = True
27
+ extra = pydantic.Extra.allow
@@ -3,11 +3,12 @@
3
3
  import typing
4
4
 
5
5
  import pydantic
6
- from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
- from ...types.service_execution import ServiceExecution
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
+ from ..core.unchecked_base_model import UncheckedBaseModel
8
+ from .service_execution import ServiceExecution
8
9
 
9
10
 
10
- class GetResultResponseEmbedded(UniversalBaseModel):
11
+ class ResultResponseEmbedded(UncheckedBaseModel):
11
12
  status: typing.Optional[ServiceExecution] = None
12
13
 
13
14
  if IS_PYDANTIC_V2:
@@ -3,11 +3,12 @@
3
3
  import typing
4
4
 
5
5
  import pydantic
6
- from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
- from ...types.hal_link import HalLink
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
+ from ..core.unchecked_base_model import UncheckedBaseModel
8
+ from .hal_link import HalLink
8
9
 
9
10
 
10
- class GetResultResponseLinks(UniversalBaseModel):
11
+ class ResultResponseLinks(UncheckedBaseModel):
11
12
  status: typing.Optional[HalLink] = None
12
13
 
13
14
  if IS_PYDANTIC_V2:
@@ -4,12 +4,13 @@ import typing
4
4
 
5
5
  import pydantic
6
6
  import typing_extensions
7
- from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
8
  from ..core.serialization import FieldMetadata
9
+ from ..core.unchecked_base_model import UncheckedBaseModel
9
10
  from .service_execution_status import ServiceExecutionStatus
10
11
 
11
12
 
12
- class ServiceExecution(UniversalBaseModel):
13
+ class ServiceExecution(UncheckedBaseModel):
13
14
  id: typing.Optional[str] = None
14
15
  status: typing.Optional[ServiceExecutionStatus] = None
15
16
  created_at: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="createdAt")] = None
package/pyproject.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "planqk-service-sdk"
3
- version = "2.6.2"
3
+ version = "2.8.0"
4
4
  description = "SDK to interact with PLANQK Managed Services."
5
5
  authors = [
6
6
  { name = "Kipu Quantum GmbH", email = "info@kipu-quantum.com" },
@@ -20,13 +20,13 @@ asttokens==3.0.0 \
20
20
  --hash=sha256:0dcd8baa8d62b0c1d118b399b2ddba3c4aff271d0d7a9e0d4c1681c79035bbc7 \
21
21
  --hash=sha256:e3078351a059199dd5138cb1c706e6430c05eff2ff136af5eb4790f9d28932e2
22
22
  # via stack-data
23
- authlib==1.6.4 \
24
- --hash=sha256:104b0442a43061dc8bc23b133d1d06a2b0a9c2e3e33f34c4338929e816287649 \
25
- --hash=sha256:39313d2a2caac3ecf6d8f95fbebdfd30ae6ea6ae6a6db794d976405fdd9aa796
23
+ authlib==1.6.5 \
24
+ --hash=sha256:3e0e0507807f842b02175507bdee8957a1d5707fd4afb17c32fb43fee90b6e3a \
25
+ --hash=sha256:6aaf9c79b7cc96c900f0b284061691c5d4e61221640a948fe690b556a6d6d10b
26
26
  # via planqk-service-sdk
27
- certifi==2025.8.3 \
28
- --hash=sha256:e564105f78ded564e3ae7c923924435e1daa7463faeab5bb932bc53ffae63407 \
29
- --hash=sha256:f6c12493cfb1b06ba2ff328595af9350c65d6644968e5d3a2ffd78699af217a5
27
+ certifi==2025.10.5 \
28
+ --hash=sha256:0f212c2744a9bb6de0c56639a6f68afe01ecd92d91f14ae897c4fe7bbeeef0de \
29
+ --hash=sha256:47c09d31ccf2acf0be3f701ea53595ee7e0b8fa08801c6624be771df09ae7b43
30
30
  # via
31
31
  # httpcore
32
32
  # httpx
@@ -325,12 +325,18 @@ pexpect==4.9.0 ; (python_full_version < '3.10' and sys_platform == 'emscripten')
325
325
  --hash=sha256:7236d1e080e4936be2dc3e326cec0af72acf9212a7e1d060210e70a47e253523 \
326
326
  --hash=sha256:ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f
327
327
  # via ipython
328
- platformdirs==4.4.0 \
328
+ platformdirs==4.4.0 ; python_full_version < '3.10' \
329
329
  --hash=sha256:abd01743f24e5287cd7a5db3752faf1a2d65353f38ec26d98e25a6db65958c85 \
330
330
  --hash=sha256:ca753cf4d81dc309bc67b0ea38fd15dc97bc30ce419a7f58d13eb3bf14c4febf
331
331
  # via
332
332
  # jupyter-core
333
333
  # pylint
334
+ platformdirs==4.5.0 ; python_full_version >= '3.10' \
335
+ --hash=sha256:70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312 \
336
+ --hash=sha256:e578a81bb873cbb89a41fcc904c7ef523cc18284b7e3b3ccf06aca1403b7ebd3
337
+ # via
338
+ # jupyter-core
339
+ # pylint
334
340
  pluggy==1.6.0 \
335
341
  --hash=sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3 \
336
342
  --hash=sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746
@@ -452,9 +458,9 @@ pygments==2.19.2 \
452
458
  # ipython
453
459
  # ipython-pygments-lexers
454
460
  # pytest
455
- pylint==3.3.8 \
456
- --hash=sha256:26698de19941363037e2937d3db9ed94fb3303fdadf7d98847875345a8bb6b05 \
457
- --hash=sha256:7ef94aa692a600e82fabdd17102b73fc226758218c97473c7ad67bd4cb905d83
461
+ pylint==3.3.9 \
462
+ --hash=sha256:01f9b0462c7730f94786c283f3e52a1fbdf0494bbe0971a78d7277ef46a751e7 \
463
+ --hash=sha256:d312737d7b25ccf6b01cc4ac629b5dcd14a0fcf3ec392735ac70f137a9d5f83a
458
464
  pytest==8.4.2 \
459
465
  --hash=sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01 \
460
466
  --hash=sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79
@@ -584,39 +590,49 @@ stack-data==0.6.3 \
584
590
  --hash=sha256:836a778de4fec4dcd1dcd89ed8abff8a221f58308462e1c4aa2a3cf30148f0b9 \
585
591
  --hash=sha256:d5558e0c25a4cb0853cddad3d77da9891a08cb85dd9f9f91b9f8cd66e511e695
586
592
  # via ipython
587
- tomli==2.2.1 ; python_full_version < '3.11' \
588
- --hash=sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6 \
589
- --hash=sha256:02abe224de6ae62c19f090f68da4e27b10af2b93213d36cf44e6e1c5abd19fdd \
590
- --hash=sha256:286f0ca2ffeeb5b9bd4fcc8d6c330534323ec51b2f52da063b11c502da16f30c \
591
- --hash=sha256:2d0f2fdd22b02c6d81637a3c95f8cd77f995846af7414c5c4b8d0545afa1bc4b \
592
- --hash=sha256:33580bccab0338d00994d7f16f4c4ec25b776af3ffaac1ed74e0b3fc95e885a8 \
593
- --hash=sha256:400e720fe168c0f8521520190686ef8ef033fb19fc493da09779e592861b78c6 \
594
- --hash=sha256:40741994320b232529c802f8bc86da4e1aa9f413db394617b9a256ae0f9a7f77 \
595
- --hash=sha256:465af0e0875402f1d226519c9904f37254b3045fc5084697cefb9bdde1ff99ff \
596
- --hash=sha256:4a8f6e44de52d5e6c657c9fe83b562f5f4256d8ebbfe4ff922c495620a7f6cea \
597
- --hash=sha256:4e340144ad7ae1533cb897d406382b4b6fede8890a03738ff1683af800d54192 \
598
- --hash=sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249 \
599
- --hash=sha256:6972ca9c9cc9f0acaa56a8ca1ff51e7af152a9f87fb64623e31d5c83700080ee \
600
- --hash=sha256:7fc04e92e1d624a4a63c76474610238576942d6b8950a2d7f908a340494e67e4 \
601
- --hash=sha256:889f80ef92701b9dbb224e49ec87c645ce5df3fa2cc548664eb8a25e03127a98 \
602
- --hash=sha256:8d57ca8095a641b8237d5b079147646153d22552f1c637fd3ba7f4b0b29167a8 \
603
- --hash=sha256:8dd28b3e155b80f4d54beb40a441d366adcfe740969820caf156c019fb5c7ec4 \
604
- --hash=sha256:9316dc65bed1684c9a98ee68759ceaed29d229e985297003e494aa825ebb0281 \
605
- --hash=sha256:a198f10c4d1b1375d7687bc25294306e551bf1abfa4eace6650070a5c1ae2744 \
606
- --hash=sha256:a38aa0308e754b0e3c67e344754dff64999ff9b513e691d0e786265c93583c69 \
607
- --hash=sha256:a92ef1a44547e894e2a17d24e7557a5e85a9e1d0048b0b5e7541f76c5032cb13 \
608
- --hash=sha256:ac065718db92ca818f8d6141b5f66369833d4a80a9d74435a268c52bdfa73140 \
609
- --hash=sha256:b82ebccc8c8a36f2094e969560a1b836758481f3dc360ce9a3277c65f374285e \
610
- --hash=sha256:c954d2250168d28797dd4e3ac5cf812a406cd5a92674ee4c8f123c889786aa8e \
611
- --hash=sha256:cb55c73c5f4408779d0cf3eef9f762b9c9f147a77de7b258bef0a5628adc85cc \
612
- --hash=sha256:cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff \
613
- --hash=sha256:d3f5614314d758649ab2ab3a62d4f2004c825922f9e370b29416484086b264ec \
614
- --hash=sha256:d920f33822747519673ee656a4b6ac33e382eca9d331c87770faa3eef562aeb2 \
615
- --hash=sha256:db2b95f9de79181805df90bedc5a5ab4c165e6ec3fe99f970d0e302f384ad222 \
616
- --hash=sha256:e59e304978767a54663af13c07b3d1af22ddee3bb2fb0618ca1593e4f593a106 \
617
- --hash=sha256:e85e99945e688e32d5a35c1ff38ed0b3f41f43fad8df0bdf79f72b2ba7bc5272 \
618
- --hash=sha256:ece47d672db52ac607a3d9599a9d48dcb2f2f735c6c2d1f34130085bb12b112a \
619
- --hash=sha256:f4039b9cbc3048b2416cc57ab3bda989a6fcf9b36cf8937f01a6e731b64f80d7
593
+ tomli==2.3.0 ; python_full_version < '3.11' \
594
+ --hash=sha256:00b5f5d95bbfc7d12f91ad8c593a1659b6387b43f054104cda404be6bda62456 \
595
+ --hash=sha256:0a154a9ae14bfcf5d8917a59b51ffd5a3ac1fd149b71b47a3a104ca4edcfa845 \
596
+ --hash=sha256:0c95ca56fbe89e065c6ead5b593ee64b84a26fca063b5d71a1122bf26e533999 \
597
+ --hash=sha256:0eea8cc5c5e9f89c9b90c4896a8deefc74f518db5927d0e0e8d4a80953d774d0 \
598
+ --hash=sha256:1cb4ed918939151a03f33d4242ccd0aa5f11b3547d0cf30f7c74a408a5b99878 \
599
+ --hash=sha256:4021923f97266babc6ccab9f5068642a0095faa0a51a246a6a02fccbb3514eaf \
600
+ --hash=sha256:4c2ef0244c75aba9355561272009d934953817c49f47d768070c3c94355c2aa3 \
601
+ --hash=sha256:4dc4ce8483a5d429ab602f111a93a6ab1ed425eae3122032db7e9acf449451be \
602
+ --hash=sha256:4f195fe57ecceac95a66a75ac24d9d5fbc98ef0962e09b2eddec5d39375aae52 \
603
+ --hash=sha256:5192f562738228945d7b13d4930baffda67b69425a7f0da96d360b0a3888136b \
604
+ --hash=sha256:5e01decd096b1530d97d5d85cb4dff4af2d8347bd35686654a004f8dea20fc67 \
605
+ --hash=sha256:64be704a875d2a59753d80ee8a533c3fe183e3f06807ff7dc2232938ccb01549 \
606
+ --hash=sha256:70a251f8d4ba2d9ac2542eecf008b3c8a9fc5c3f9f02c56a9d7952612be2fdba \
607
+ --hash=sha256:73ee0b47d4dad1c5e996e3cd33b8a76a50167ae5f96a2607cbe8cc773506ab22 \
608
+ --hash=sha256:74bf8464ff93e413514fefd2be591c3b0b23231a77f901db1eb30d6f712fc42c \
609
+ --hash=sha256:792262b94d5d0a466afb5bc63c7daa9d75520110971ee269152083270998316f \
610
+ --hash=sha256:7b0882799624980785240ab732537fcfc372601015c00f7fc367c55308c186f6 \
611
+ --hash=sha256:883b1c0d6398a6a9d29b508c331fa56adbcdff647f6ace4dfca0f50e90dfd0ba \
612
+ --hash=sha256:88bd15eb972f3664f5ed4b57c1634a97153b4bac4479dcb6a495f41921eb7f45 \
613
+ --hash=sha256:8a35dd0e643bb2610f156cca8db95d213a90015c11fee76c946aa62b7ae7e02f \
614
+ --hash=sha256:940d56ee0410fa17ee1f12b817b37a4d4e4dc4d27340863cc67236c74f582e77 \
615
+ --hash=sha256:97d5eec30149fd3294270e889b4234023f2c69747e555a27bd708828353ab606 \
616
+ --hash=sha256:a0e285d2649b78c0d9027570d4da3425bdb49830a6156121360b3f8511ea3441 \
617
+ --hash=sha256:a1f7f282fe248311650081faafa5f4732bdbfef5d45fe3f2e702fbc6f2d496e0 \
618
+ --hash=sha256:a4ea38c40145a357d513bffad0ed869f13c1773716cf71ccaa83b0fa0cc4e42f \
619
+ --hash=sha256:a56212bdcce682e56b0aaf79e869ba5d15a6163f88d5451cbde388d48b13f530 \
620
+ --hash=sha256:ad805ea85eda330dbad64c7ea7a4556259665bdf9d2672f5dccc740eb9d3ca05 \
621
+ --hash=sha256:b273fcbd7fc64dc3600c098e39136522650c49bca95df2d11cf3b626422392c8 \
622
+ --hash=sha256:b5870b50c9db823c595983571d1296a6ff3e1b88f734a4c8f6fc6188397de005 \
623
+ --hash=sha256:b74a0e59ec5d15127acdabd75ea17726ac4c5178ae51b85bfe39c4f8a278e879 \
624
+ --hash=sha256:be71c93a63d738597996be9528f4abe628d1adf5e6eb11607bc8fe1a510b5dae \
625
+ --hash=sha256:c22a8bf253bacc0cf11f35ad9808b6cb75ada2631c2d97c971122583b129afbc \
626
+ --hash=sha256:c4665508bcbac83a31ff8ab08f424b665200c0e1e645d2bd9ab3d3e557b6185b \
627
+ --hash=sha256:c5f3ffd1e098dfc032d4d3af5c0ac64f6d286d98bc148698356847b80fa4de1b \
628
+ --hash=sha256:cebc6fe843e0733ee827a282aca4999b596241195f43b4cc371d64fc6639da9e \
629
+ --hash=sha256:d1381caf13ab9f300e30dd8feadb3de072aeb86f1d34a8569453ff32a7dea4bf \
630
+ --hash=sha256:d7d86942e56ded512a594786a5ba0a5e521d02529b3826e7761a05138341a2ac \
631
+ --hash=sha256:e31d432427dcbf4d86958c184b9bfd1e96b5b71f8eb17e6d02531f434fd335b8 \
632
+ --hash=sha256:e95b1af3c5b07d9e643909b5abbec77cd9f1217e6d0bca72b0234736b9fb1f1b \
633
+ --hash=sha256:f85209946d1fe94416debbb88d00eb92ce9cd5266775424ff81bc959e001acaf \
634
+ --hash=sha256:feb0dacc61170ed7ab602d3d972a58f14ee3ee60494292d384649a3dc38ef463 \
635
+ --hash=sha256:ff72b71b5d10d22ecb084d345fc26f42b5143c5533db5e2eaba7d2d335358876
620
636
  # via
621
637
  # pylint
622
638
  # pytest
package/requirements.txt CHANGED
@@ -8,13 +8,13 @@ anyio==4.11.0 \
8
8
  --hash=sha256:0287e96f4d26d4149305414d4e3bc32f0dcd0862365a4bddea19d7a1ec38c4fc \
9
9
  --hash=sha256:82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4
10
10
  # via httpx
11
- authlib==1.6.4 \
12
- --hash=sha256:104b0442a43061dc8bc23b133d1d06a2b0a9c2e3e33f34c4338929e816287649 \
13
- --hash=sha256:39313d2a2caac3ecf6d8f95fbebdfd30ae6ea6ae6a6db794d976405fdd9aa796
11
+ authlib==1.6.5 \
12
+ --hash=sha256:3e0e0507807f842b02175507bdee8957a1d5707fd4afb17c32fb43fee90b6e3a \
13
+ --hash=sha256:6aaf9c79b7cc96c900f0b284061691c5d4e61221640a948fe690b556a6d6d10b
14
14
  # via planqk-service-sdk
15
- certifi==2025.8.3 \
16
- --hash=sha256:e564105f78ded564e3ae7c923924435e1daa7463faeab5bb932bc53ffae63407 \
17
- --hash=sha256:f6c12493cfb1b06ba2ff328595af9350c65d6644968e5d3a2ffd78699af217a5
15
+ certifi==2025.10.5 \
16
+ --hash=sha256:0f212c2744a9bb6de0c56639a6f68afe01ecd92d91f14ae897c4fe7bbeeef0de \
17
+ --hash=sha256:47c09d31ccf2acf0be3f701ea53595ee7e0b8fa08801c6624be771df09ae7b43
18
18
  # via
19
19
  # httpcore
20
20
  # httpx
package/src/index.test.ts CHANGED
@@ -14,6 +14,16 @@ console.log(`Service endpoint: ${serviceEndpoint}`)
14
14
  console.log(`Consumer key: ${consumerKey}`)
15
15
  console.log(`Consumer secret: ${consumerSecret}`)
16
16
 
17
+ test.skip('integration test: retrieve logs', {timeout: 5 * 60 * 1000}, async () => {
18
+ const client = new PlanqkServiceClient(serviceEndpoint!, consumerKey, consumerSecret, tokenEndpoint);
19
+
20
+ const serviceExecutions = await client.api().getServiceExecutions()
21
+ console.log(serviceExecutions)
22
+
23
+ const logs = await client.api().getLogs(serviceExecutions[0].id!)
24
+ console.log(logs)
25
+ })
26
+
17
27
  test.skip('integration test: coin toss', {timeout: 5 * 60 * 1000}, async () => {
18
28
  const client = new PlanqkServiceClient(serviceEndpoint!, consumerKey, consumerSecret, tokenEndpoint);
19
29