@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.
- package/dist/sdk/BaseClient.d.ts +26 -0
- package/dist/sdk/{api/resources/serviceApi/types/GetResultResponse.js → BaseClient.js} +1 -3
- package/dist/sdk/Client.d.ts +4 -22
- package/dist/sdk/Client.js +2 -4
- package/dist/sdk/api/index.d.ts +1 -1
- package/dist/sdk/api/index.js +1 -1
- package/dist/sdk/api/resources/index.d.ts +0 -1
- package/dist/sdk/api/resources/index.js +0 -4
- package/dist/sdk/api/resources/serviceApi/client/Client.d.ts +9 -26
- package/dist/sdk/api/resources/serviceApi/client/Client.js +43 -27
- package/dist/sdk/api/resources/serviceApi/index.d.ts +0 -1
- package/dist/sdk/api/resources/serviceApi/index.js +0 -1
- package/dist/sdk/api/types/HalLink.d.ts +0 -3
- package/dist/sdk/api/types/HalLink.js +1 -3
- package/dist/sdk/api/types/LogEntry.d.ts +19 -0
- package/dist/sdk/api/types/LogEntry.js +15 -0
- package/dist/sdk/api/types/RequestBody.d.ts +1 -0
- package/dist/sdk/api/types/RequestBody.js +3 -0
- package/dist/sdk/api/types/ResultResponse.d.ts +15 -0
- package/dist/sdk/api/types/ResultResponse.js +3 -0
- package/dist/sdk/api/types/ServiceExecution.d.ts +1 -4
- package/dist/sdk/api/types/ServiceExecution.js +1 -3
- package/dist/sdk/api/types/index.d.ts +3 -0
- package/dist/sdk/api/types/index.js +3 -0
- package/dist/sdk/core/auth/AuthProvider.d.ts +4 -0
- package/dist/sdk/core/auth/AuthProvider.js +2 -0
- package/dist/sdk/core/auth/AuthRequest.d.ts +9 -0
- package/dist/sdk/core/auth/AuthRequest.js +2 -0
- package/dist/sdk/core/auth/BasicAuth.js +2 -1
- package/dist/sdk/core/auth/index.d.ts +2 -0
- package/dist/sdk/core/fetcher/APIResponse.d.ts +1 -1
- package/dist/sdk/core/fetcher/BinaryResponse.d.ts +1 -1
- package/dist/sdk/core/fetcher/EndpointMetadata.d.ts +13 -0
- package/dist/sdk/core/fetcher/EndpointMetadata.js +2 -0
- package/dist/sdk/core/fetcher/EndpointSupplier.d.ts +12 -0
- package/dist/sdk/core/fetcher/EndpointSupplier.js +13 -0
- package/dist/sdk/core/fetcher/Fetcher.d.ts +6 -4
- package/dist/sdk/core/fetcher/Fetcher.js +3 -3
- package/dist/sdk/core/fetcher/HttpResponsePromise.d.ts +1 -1
- package/dist/sdk/core/fetcher/index.d.ts +7 -5
- package/dist/sdk/core/fetcher/index.js +7 -5
- package/dist/sdk/core/fetcher/requestWithRetries.js +44 -8
- package/dist/sdk/core/headers.d.ts +2 -3
- package/dist/sdk/core/url/join.js +23 -3
- package/dist/sdk/environments.d.ts +0 -3
- package/dist/sdk/environments.js +1 -3
- package/dist/sdk/errors/PlanqkServiceApiError.d.ts +0 -3
- package/dist/sdk/errors/PlanqkServiceApiError.js +1 -3
- package/dist/sdk/errors/PlanqkServiceApiTimeoutError.d.ts +0 -3
- package/dist/sdk/errors/PlanqkServiceApiTimeoutError.js +1 -3
- package/dist/sdk/index.d.ts +1 -0
- package/fern/fern.config.json +1 -1
- package/fern/generators.yml +6 -4
- package/fern/openapi/openapi.yml +115 -80
- package/package.json +1 -1
- package/planqk/service/_version.py +1 -1
- package/planqk/service/client.py +3 -3
- package/planqk/service/sdk/__init__.py +61 -8
- package/planqk/service/sdk/client.py +27 -7
- package/planqk/service/sdk/core/__init__.py +80 -20
- package/planqk/service/sdk/core/client_wrapper.py +8 -6
- package/planqk/service/sdk/core/force_multipart.py +4 -2
- package/planqk/service/sdk/core/http_response.py +1 -1
- package/planqk/service/sdk/core/http_sse/__init__.py +42 -0
- package/planqk/service/sdk/core/http_sse/_api.py +112 -0
- package/planqk/service/sdk/core/http_sse/_decoders.py +61 -0
- package/planqk/service/sdk/core/http_sse/_exceptions.py +7 -0
- package/planqk/service/sdk/core/http_sse/_models.py +17 -0
- package/planqk/service/sdk/core/pydantic_utilities.py +5 -2
- package/planqk/service/sdk/core/unchecked_base_model.py +341 -0
- package/planqk/service/sdk/service_api/__init__.py +0 -3
- package/planqk/service/sdk/service_api/client.py +17 -21
- package/planqk/service/sdk/service_api/raw_client.py +36 -40
- package/planqk/service/sdk/types/__init__.py +57 -4
- package/planqk/service/sdk/types/hal_link.py +3 -2
- package/planqk/service/sdk/types/log_entry.py +35 -0
- package/planqk/service/sdk/types/log_entry_severity.py +5 -0
- package/planqk/service/sdk/types/request_body.py +5 -0
- package/planqk/service/sdk/types/result_response.py +27 -0
- package/planqk/service/sdk/{service_api/types/get_result_response_embedded.py → types/result_response_embedded.py} +4 -3
- package/planqk/service/sdk/{service_api/types/get_result_response_links.py → types/result_response_links.py} +4 -3
- package/planqk/service/sdk/types/service_execution.py +3 -2
- package/pyproject.toml +1 -1
- package/requirements-dev.txt +59 -43
- package/requirements.txt +6 -6
- package/src/index.test.ts +10 -0
- package/src/sdk/BaseClient.ts +30 -0
- package/src/sdk/Client.ts +6 -23
- package/src/sdk/api/index.ts +1 -1
- package/src/sdk/api/resources/index.ts +0 -1
- package/src/sdk/api/resources/serviceApi/client/Client.ts +87 -82
- package/src/sdk/api/resources/serviceApi/index.ts +0 -1
- package/src/sdk/api/types/HalLink.ts +1 -3
- package/src/sdk/api/types/LogEntry.ts +22 -0
- package/src/sdk/api/types/RequestBody.ts +3 -0
- package/src/sdk/api/types/ResultResponse.ts +20 -0
- package/src/sdk/api/types/ServiceExecution.ts +2 -4
- package/src/sdk/api/types/index.ts +3 -0
- package/src/sdk/core/auth/AuthProvider.ts +5 -0
- package/src/sdk/core/auth/AuthRequest.ts +9 -0
- package/src/sdk/core/auth/BasicAuth.ts +2 -1
- package/src/sdk/core/auth/index.ts +2 -0
- package/src/sdk/core/fetcher/APIResponse.ts +1 -1
- package/src/sdk/core/fetcher/BinaryResponse.ts +1 -1
- package/src/sdk/core/fetcher/EndpointMetadata.ts +13 -0
- package/src/sdk/core/fetcher/EndpointSupplier.ts +14 -0
- package/src/sdk/core/fetcher/Fetcher.ts +8 -6
- package/src/sdk/core/fetcher/HttpResponsePromise.ts +1 -1
- package/src/sdk/core/fetcher/index.ts +7 -5
- package/src/sdk/core/fetcher/requestWithRetries.ts +49 -9
- package/src/sdk/core/headers.ts +8 -10
- package/src/sdk/core/url/join.ts +28 -3
- package/src/sdk/environments.ts +1 -3
- package/src/sdk/errors/PlanqkServiceApiError.ts +1 -3
- package/src/sdk/errors/PlanqkServiceApiTimeoutError.ts +1 -3
- package/src/sdk/index.ts +1 -0
- package/uv.lock +77 -47
- package/dist/sdk/api/resources/serviceApi/types/GetResultResponse.d.ts +0 -18
- package/dist/sdk/api/resources/serviceApi/types/index.d.ts +0 -1
- package/dist/sdk/api/resources/serviceApi/types/index.js +0 -17
- package/planqk/service/sdk/service_api/types/__init__.py +0 -9
- package/planqk/service/sdk/service_api/types/get_result_response.py +0 -26
- package/src/sdk/api/resources/serviceApi/types/GetResultResponse.ts +0 -22
- 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
|
-
|
|
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 :
|
|
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
|
-
|
|
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
|
-
|
|
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[
|
|
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[
|
|
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
|
-
|
|
176
|
-
|
|
177
|
-
type_=
|
|
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[
|
|
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[
|
|
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[
|
|
263
|
-
|
|
264
|
-
type_=typing.List[
|
|
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
|
-
|
|
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
|
-
|
|
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 :
|
|
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
|
-
|
|
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
|
-
|
|
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[
|
|
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[
|
|
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
|
-
|
|
470
|
-
|
|
471
|
-
type_=
|
|
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[
|
|
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[
|
|
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[
|
|
558
|
-
|
|
559
|
-
type_=typing.List[
|
|
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
|
-
|
|
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
|
-
|
|
6
|
-
from
|
|
7
|
-
from .service_execution_status import ServiceExecutionStatus
|
|
5
|
+
import typing
|
|
6
|
+
from importlib import import_module
|
|
8
7
|
|
|
9
|
-
|
|
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
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
7
8
|
|
|
8
9
|
|
|
9
|
-
class HalLink(
|
|
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,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
|
|
7
|
-
from
|
|
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
|
|
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
|
|
7
|
-
from
|
|
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
|
|
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
|
|
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(
|
|
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
package/requirements-dev.txt
CHANGED
|
@@ -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.
|
|
24
|
-
--hash=sha256:
|
|
25
|
-
--hash=sha256:
|
|
23
|
+
authlib==1.6.5 \
|
|
24
|
+
--hash=sha256:3e0e0507807f842b02175507bdee8957a1d5707fd4afb17c32fb43fee90b6e3a \
|
|
25
|
+
--hash=sha256:6aaf9c79b7cc96c900f0b284061691c5d4e61221640a948fe690b556a6d6d10b
|
|
26
26
|
# via planqk-service-sdk
|
|
27
|
-
certifi==2025.
|
|
28
|
-
--hash=sha256:
|
|
29
|
-
--hash=sha256:
|
|
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.
|
|
456
|
-
--hash=sha256:
|
|
457
|
-
--hash=sha256:
|
|
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.
|
|
588
|
-
--hash=sha256:
|
|
589
|
-
--hash=sha256:
|
|
590
|
-
--hash=sha256:
|
|
591
|
-
--hash=sha256:
|
|
592
|
-
--hash=sha256:
|
|
593
|
-
--hash=sha256:
|
|
594
|
-
--hash=sha256:
|
|
595
|
-
--hash=sha256:
|
|
596
|
-
--hash=sha256:
|
|
597
|
-
--hash=sha256:
|
|
598
|
-
--hash=sha256:
|
|
599
|
-
--hash=sha256:
|
|
600
|
-
--hash=sha256:
|
|
601
|
-
--hash=sha256:
|
|
602
|
-
--hash=sha256:
|
|
603
|
-
--hash=sha256:
|
|
604
|
-
--hash=sha256:
|
|
605
|
-
--hash=sha256:
|
|
606
|
-
--hash=sha256:
|
|
607
|
-
--hash=sha256:
|
|
608
|
-
--hash=sha256:
|
|
609
|
-
--hash=sha256:
|
|
610
|
-
--hash=sha256:
|
|
611
|
-
--hash=sha256:
|
|
612
|
-
--hash=sha256:
|
|
613
|
-
--hash=sha256:
|
|
614
|
-
--hash=sha256:
|
|
615
|
-
--hash=sha256:
|
|
616
|
-
--hash=sha256:
|
|
617
|
-
--hash=sha256:
|
|
618
|
-
--hash=sha256:
|
|
619
|
-
--hash=sha256:
|
|
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.
|
|
12
|
-
--hash=sha256:
|
|
13
|
-
--hash=sha256:
|
|
11
|
+
authlib==1.6.5 \
|
|
12
|
+
--hash=sha256:3e0e0507807f842b02175507bdee8957a1d5707fd4afb17c32fb43fee90b6e3a \
|
|
13
|
+
--hash=sha256:6aaf9c79b7cc96c900f0b284061691c5d4e61221640a948fe690b556a6d6d10b
|
|
14
14
|
# via planqk-service-sdk
|
|
15
|
-
certifi==2025.
|
|
16
|
-
--hash=sha256:
|
|
17
|
-
--hash=sha256:
|
|
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
|
|