@planqk/planqk-api-sdk 1.1.0 → 1.3.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/.env.template +2 -1
- package/.gitlab-ci.yml +1 -0
- package/README-node.md +13 -0
- package/README-python.md +13 -0
- package/README.md +6 -49
- package/apps/python-test-app/main.py +159 -0
- package/apps/python-test-app/my_file.txt +1 -0
- package/apps/ts-test-app/index.ts +140 -0
- package/apps/ts-test-app/package-lock.json +693 -0
- package/apps/ts-test-app/package.json +19 -0
- package/apps/ts-test-app/test-file.txt +1 -0
- package/apps/ts-test-app/tsconfig.json +11 -0
- package/dist/index.d.ts +1 -4
- package/dist/index.js +4 -31
- package/dist/{Client.d.ts → sdk/Client.d.ts} +4 -1
- package/dist/{Client.js → sdk/Client.js} +1 -1
- package/dist/{api → sdk/api}/resources/dataPools/client/Client.d.ts +7 -0
- package/dist/{api → sdk/api}/resources/dataPools/client/Client.js +36 -8
- package/dist/sdk/index.d.ts +4 -0
- package/dist/sdk/index.js +44 -0
- package/fern/fern.config.json +1 -1
- package/fern/openapi/openapi.json +121 -15
- package/package.json +3 -4
- package/planqk/api/_version.py +1 -1
- package/planqk/api/client.py +1 -5
- package/planqk/api/sdk/__init__.py +34 -2
- package/planqk/api/sdk/authentication/__init__.py +7 -0
- package/planqk/api/sdk/authentication/client.py +102 -0
- package/planqk/api/sdk/authentication/raw_client.py +183 -0
- package/planqk/api/sdk/authentication/types/__init__.py +7 -0
- package/planqk/api/sdk/authentication/types/authorize_response.py +8 -0
- package/planqk/api/sdk/client.py +11 -0
- package/planqk/api/sdk/core/client_wrapper.py +12 -2
- package/planqk/api/sdk/data_pools/client.py +16 -0
- package/planqk/api/sdk/environment.py +1 -1
- package/planqk/api/sdk/types/__init__.py +30 -1
- package/planqk/api/sdk/types/access_token.py +26 -0
- package/planqk/api/sdk/types/organization_membership.py +27 -0
- package/planqk/api/sdk/types/organization_membership_account_type.py +5 -0
- package/planqk/api/sdk/types/organization_membership_role.py +5 -0
- package/planqk/api/sdk/types/personal_access_token_principal.py +31 -0
- package/planqk/api/sdk/types/personal_access_token_principal_account_type.py +5 -0
- package/planqk/api/sdk/types/service_execution.py +27 -0
- package/planqk/api/sdk/types/service_execution_status.py +7 -0
- package/planqk/api/sdk/types/service_execution_token_principal.py +34 -0
- package/planqk/api/sdk/types/user_context.py +35 -0
- package/planqk/api/sdk/types/user_context_account_type.py +5 -0
- package/planqk/api/sdk/types/user_context_context_type.py +5 -0
- package/pyproject.toml +2 -6
- package/src/index.test.ts +6 -5
- package/src/index.ts +1 -4
- package/src/{Client.ts → sdk/Client.ts} +5 -2
- package/src/{api → sdk/api}/resources/dataPools/client/Client.ts +40 -8
- package/src/sdk/index.ts +4 -0
- package/uv.lock +340 -559
- /package/dist/{api → sdk/api}/errors/BadRequestError.d.ts +0 -0
- /package/dist/{api → sdk/api}/errors/BadRequestError.js +0 -0
- /package/dist/{api → sdk/api}/errors/ForbiddenError.d.ts +0 -0
- /package/dist/{api → sdk/api}/errors/ForbiddenError.js +0 -0
- /package/dist/{api → sdk/api}/errors/InternalServerError.d.ts +0 -0
- /package/dist/{api → sdk/api}/errors/InternalServerError.js +0 -0
- /package/dist/{api → sdk/api}/errors/NotFoundError.d.ts +0 -0
- /package/dist/{api → sdk/api}/errors/NotFoundError.js +0 -0
- /package/dist/{api → sdk/api}/errors/UnauthorizedError.d.ts +0 -0
- /package/dist/{api → sdk/api}/errors/UnauthorizedError.js +0 -0
- /package/dist/{api → sdk/api}/errors/index.d.ts +0 -0
- /package/dist/{api → sdk/api}/errors/index.js +0 -0
- /package/dist/{api → sdk/api}/index.d.ts +0 -0
- /package/dist/{api → sdk/api}/index.js +0 -0
- /package/dist/{api → sdk/api}/resources/dataPools/client/index.d.ts +0 -0
- /package/dist/{api → sdk/api}/resources/dataPools/client/index.js +0 -0
- /package/dist/{api → sdk/api}/resources/dataPools/client/requests/AddDataPoolFileRequest.d.ts +0 -0
- /package/dist/{api → sdk/api}/resources/dataPools/client/requests/AddDataPoolFileRequest.js +0 -0
- /package/dist/{api → sdk/api}/resources/dataPools/client/requests/CreateDataPoolRequest.d.ts +0 -0
- /package/dist/{api → sdk/api}/resources/dataPools/client/requests/CreateDataPoolRequest.js +0 -0
- /package/dist/{api → sdk/api}/resources/dataPools/client/requests/UpdateDataPoolRequest.d.ts +0 -0
- /package/dist/{api → sdk/api}/resources/dataPools/client/requests/UpdateDataPoolRequest.js +0 -0
- /package/dist/{api → sdk/api}/resources/dataPools/client/requests/index.d.ts +0 -0
- /package/dist/{api → sdk/api}/resources/dataPools/client/requests/index.js +0 -0
- /package/dist/{api → sdk/api}/resources/dataPools/index.d.ts +0 -0
- /package/dist/{api → sdk/api}/resources/dataPools/index.js +0 -0
- /package/dist/{api → sdk/api}/resources/index.d.ts +0 -0
- /package/dist/{api → sdk/api}/resources/index.js +0 -0
- /package/dist/{api → sdk/api}/types/DataPoolDto.d.ts +0 -0
- /package/dist/{api → sdk/api}/types/DataPoolDto.js +0 -0
- /package/dist/{api → sdk/api}/types/DataPoolFileDto.d.ts +0 -0
- /package/dist/{api → sdk/api}/types/DataPoolFileDto.js +0 -0
- /package/dist/{api → sdk/api}/types/OauthScope.d.ts +0 -0
- /package/dist/{api → sdk/api}/types/OauthScope.js +0 -0
- /package/dist/{api → sdk/api}/types/index.d.ts +0 -0
- /package/dist/{api → sdk/api}/types/index.js +0 -0
- /package/dist/{core → sdk/core}/fetcher/APIResponse.d.ts +0 -0
- /package/dist/{core → sdk/core}/fetcher/APIResponse.js +0 -0
- /package/dist/{core → sdk/core}/fetcher/BinaryResponse.d.ts +0 -0
- /package/dist/{core → sdk/core}/fetcher/BinaryResponse.js +0 -0
- /package/dist/{core → sdk/core}/fetcher/Fetcher.d.ts +0 -0
- /package/dist/{core → sdk/core}/fetcher/Fetcher.js +0 -0
- /package/dist/{core → sdk/core}/fetcher/Headers.d.ts +0 -0
- /package/dist/{core → sdk/core}/fetcher/Headers.js +0 -0
- /package/dist/{core → sdk/core}/fetcher/HttpResponsePromise.d.ts +0 -0
- /package/dist/{core → sdk/core}/fetcher/HttpResponsePromise.js +0 -0
- /package/dist/{core → sdk/core}/fetcher/RawResponse.d.ts +0 -0
- /package/dist/{core → sdk/core}/fetcher/RawResponse.js +0 -0
- /package/dist/{core → sdk/core}/fetcher/ResponseWithBody.d.ts +0 -0
- /package/dist/{core → sdk/core}/fetcher/ResponseWithBody.js +0 -0
- /package/dist/{core → sdk/core}/fetcher/Supplier.d.ts +0 -0
- /package/dist/{core → sdk/core}/fetcher/Supplier.js +0 -0
- /package/dist/{core → sdk/core}/fetcher/createRequestUrl.d.ts +0 -0
- /package/dist/{core → sdk/core}/fetcher/createRequestUrl.js +0 -0
- /package/dist/{core → sdk/core}/fetcher/getErrorResponseBody.d.ts +0 -0
- /package/dist/{core → sdk/core}/fetcher/getErrorResponseBody.js +0 -0
- /package/dist/{core → sdk/core}/fetcher/getFetchFn.d.ts +0 -0
- /package/dist/{core → sdk/core}/fetcher/getFetchFn.js +0 -0
- /package/dist/{core → sdk/core}/fetcher/getHeader.d.ts +0 -0
- /package/dist/{core → sdk/core}/fetcher/getHeader.js +0 -0
- /package/dist/{core → sdk/core}/fetcher/getRequestBody.d.ts +0 -0
- /package/dist/{core → sdk/core}/fetcher/getRequestBody.js +0 -0
- /package/dist/{core → sdk/core}/fetcher/getResponseBody.d.ts +0 -0
- /package/dist/{core → sdk/core}/fetcher/getResponseBody.js +0 -0
- /package/dist/{core → sdk/core}/fetcher/index.d.ts +0 -0
- /package/dist/{core → sdk/core}/fetcher/index.js +0 -0
- /package/dist/{core → sdk/core}/fetcher/makeRequest.d.ts +0 -0
- /package/dist/{core → sdk/core}/fetcher/makeRequest.js +0 -0
- /package/dist/{core → sdk/core}/fetcher/requestWithRetries.d.ts +0 -0
- /package/dist/{core → sdk/core}/fetcher/requestWithRetries.js +0 -0
- /package/dist/{core → sdk/core}/fetcher/signals.d.ts +0 -0
- /package/dist/{core → sdk/core}/fetcher/signals.js +0 -0
- /package/dist/{core → sdk/core}/file.d.ts +0 -0
- /package/dist/{core → sdk/core}/file.js +0 -0
- /package/dist/{core → sdk/core}/form-data-utils/FormDataWrapper.d.ts +0 -0
- /package/dist/{core → sdk/core}/form-data-utils/FormDataWrapper.js +0 -0
- /package/dist/{core → sdk/core}/form-data-utils/encodeAsFormParameter.d.ts +0 -0
- /package/dist/{core → sdk/core}/form-data-utils/encodeAsFormParameter.js +0 -0
- /package/dist/{core → sdk/core}/form-data-utils/index.d.ts +0 -0
- /package/dist/{core → sdk/core}/form-data-utils/index.js +0 -0
- /package/dist/{core → sdk/core}/headers.d.ts +0 -0
- /package/dist/{core → sdk/core}/headers.js +0 -0
- /package/dist/{core → sdk/core}/index.d.ts +0 -0
- /package/dist/{core → sdk/core}/index.js +0 -0
- /package/dist/{core → sdk/core}/json.d.ts +0 -0
- /package/dist/{core → sdk/core}/json.js +0 -0
- /package/dist/{core → sdk/core}/runtime/index.d.ts +0 -0
- /package/dist/{core → sdk/core}/runtime/index.js +0 -0
- /package/dist/{core → sdk/core}/runtime/runtime.d.ts +0 -0
- /package/dist/{core → sdk/core}/runtime/runtime.js +0 -0
- /package/dist/{core → sdk/core}/url/index.d.ts +0 -0
- /package/dist/{core → sdk/core}/url/index.js +0 -0
- /package/dist/{core → sdk/core}/url/join.d.ts +0 -0
- /package/dist/{core → sdk/core}/url/join.js +0 -0
- /package/dist/{core → sdk/core}/url/qs.d.ts +0 -0
- /package/dist/{core → sdk/core}/url/qs.js +0 -0
- /package/dist/{environments.d.ts → sdk/environments.d.ts} +0 -0
- /package/dist/{environments.js → sdk/environments.js} +0 -0
- /package/dist/{errors → sdk/errors}/PlanqkApiError.d.ts +0 -0
- /package/dist/{errors → sdk/errors}/PlanqkApiError.js +0 -0
- /package/dist/{errors → sdk/errors}/PlanqkApiTimeoutError.d.ts +0 -0
- /package/dist/{errors → sdk/errors}/PlanqkApiTimeoutError.js +0 -0
- /package/dist/{errors → sdk/errors}/index.d.ts +0 -0
- /package/dist/{errors → sdk/errors}/index.js +0 -0
- /package/src/{api → sdk/api}/errors/BadRequestError.ts +0 -0
- /package/src/{api → sdk/api}/errors/ForbiddenError.ts +0 -0
- /package/src/{api → sdk/api}/errors/InternalServerError.ts +0 -0
- /package/src/{api → sdk/api}/errors/NotFoundError.ts +0 -0
- /package/src/{api → sdk/api}/errors/UnauthorizedError.ts +0 -0
- /package/src/{api → sdk/api}/errors/index.ts +0 -0
- /package/src/{api → sdk/api}/index.ts +0 -0
- /package/src/{api → sdk/api}/resources/dataPools/client/index.ts +0 -0
- /package/src/{api → sdk/api}/resources/dataPools/client/requests/AddDataPoolFileRequest.ts +0 -0
- /package/src/{api → sdk/api}/resources/dataPools/client/requests/CreateDataPoolRequest.ts +0 -0
- /package/src/{api → sdk/api}/resources/dataPools/client/requests/UpdateDataPoolRequest.ts +0 -0
- /package/src/{api → sdk/api}/resources/dataPools/client/requests/index.ts +0 -0
- /package/src/{api → sdk/api}/resources/dataPools/index.ts +0 -0
- /package/src/{api → sdk/api}/resources/index.ts +0 -0
- /package/src/{api → sdk/api}/types/DataPoolDto.ts +0 -0
- /package/src/{api → sdk/api}/types/DataPoolFileDto.ts +0 -0
- /package/src/{api → sdk/api}/types/OauthScope.ts +0 -0
- /package/src/{api → sdk/api}/types/index.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/APIResponse.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/BinaryResponse.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/Fetcher.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/Headers.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/HttpResponsePromise.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/RawResponse.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/ResponseWithBody.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/Supplier.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/createRequestUrl.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/getErrorResponseBody.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/getFetchFn.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/getHeader.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/getRequestBody.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/getResponseBody.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/index.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/makeRequest.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/requestWithRetries.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/signals.ts +0 -0
- /package/src/{core → sdk/core}/file.ts +0 -0
- /package/src/{core → sdk/core}/form-data-utils/FormDataWrapper.ts +0 -0
- /package/src/{core → sdk/core}/form-data-utils/encodeAsFormParameter.ts +0 -0
- /package/src/{core → sdk/core}/form-data-utils/index.ts +0 -0
- /package/src/{core → sdk/core}/headers.ts +0 -0
- /package/src/{core → sdk/core}/index.ts +0 -0
- /package/src/{core → sdk/core}/json.ts +0 -0
- /package/src/{core → sdk/core}/runtime/index.ts +0 -0
- /package/src/{core → sdk/core}/runtime/runtime.ts +0 -0
- /package/src/{core → sdk/core}/url/index.ts +0 -0
- /package/src/{core → sdk/core}/url/join.ts +0 -0
- /package/src/{core → sdk/core}/url/qs.ts +0 -0
- /package/src/{environments.ts → sdk/environments.ts} +0 -0
- /package/src/{errors → sdk/errors}/PlanqkApiError.ts +0 -0
- /package/src/{errors → sdk/errors}/PlanqkApiTimeoutError.ts +0 -0
- /package/src/{errors → sdk/errors}/index.ts +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
import typing_extensions
|
|
8
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
9
|
+
from ..core.serialization import FieldMetadata
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class AccessToken(UniversalBaseModel):
|
|
13
|
+
id: typing.Optional[str] = None
|
|
14
|
+
name: typing.Optional[str] = None
|
|
15
|
+
created_at: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="createdAt")] = None
|
|
16
|
+
used_at: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="usedAt")] = None
|
|
17
|
+
expires_at: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="expiresAt")] = None
|
|
18
|
+
|
|
19
|
+
if IS_PYDANTIC_V2:
|
|
20
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
21
|
+
else:
|
|
22
|
+
|
|
23
|
+
class Config:
|
|
24
|
+
frozen = True
|
|
25
|
+
smart_union = True
|
|
26
|
+
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, UniversalBaseModel
|
|
8
|
+
from ..core.serialization import FieldMetadata
|
|
9
|
+
from .organization_membership_account_type import OrganizationMembershipAccountType
|
|
10
|
+
from .organization_membership_role import OrganizationMembershipRole
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class OrganizationMembership(UniversalBaseModel):
|
|
14
|
+
id: typing.Optional[str] = None
|
|
15
|
+
account_type: typing_extensions.Annotated[
|
|
16
|
+
typing.Optional[OrganizationMembershipAccountType], FieldMetadata(alias="accountType")
|
|
17
|
+
] = None
|
|
18
|
+
role: typing.Optional[OrganizationMembershipRole] = None
|
|
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
|
|
@@ -0,0 +1,31 @@
|
|
|
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, UniversalBaseModel
|
|
8
|
+
from ..core.serialization import FieldMetadata
|
|
9
|
+
from .access_token import AccessToken
|
|
10
|
+
from .organization_membership import OrganizationMembership
|
|
11
|
+
from .personal_access_token_principal_account_type import PersonalAccessTokenPrincipalAccountType
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class PersonalAccessTokenPrincipal(UniversalBaseModel):
|
|
15
|
+
id: typing.Optional[str] = None
|
|
16
|
+
access_token: typing_extensions.Annotated[typing.Optional[AccessToken], FieldMetadata(alias="accessToken")] = None
|
|
17
|
+
account_type: typing_extensions.Annotated[
|
|
18
|
+
typing.Optional[PersonalAccessTokenPrincipalAccountType], FieldMetadata(alias="accountType")
|
|
19
|
+
] = None
|
|
20
|
+
organization_memberships: typing_extensions.Annotated[
|
|
21
|
+
typing.Optional[typing.List[OrganizationMembership]], FieldMetadata(alias="organizationMemberships")
|
|
22
|
+
] = None
|
|
23
|
+
|
|
24
|
+
if IS_PYDANTIC_V2:
|
|
25
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
26
|
+
else:
|
|
27
|
+
|
|
28
|
+
class Config:
|
|
29
|
+
frozen = True
|
|
30
|
+
smart_union = True
|
|
31
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
import typing_extensions
|
|
8
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
9
|
+
from ..core.serialization import FieldMetadata
|
|
10
|
+
from .service_execution_status import ServiceExecutionStatus
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ServiceExecution(UniversalBaseModel):
|
|
14
|
+
id: typing.Optional[str] = None
|
|
15
|
+
created_at: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="createdAt")] = None
|
|
16
|
+
started_at: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="startedAt")] = None
|
|
17
|
+
ended_at: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="endedAt")] = None
|
|
18
|
+
status: typing.Optional[ServiceExecutionStatus] = None
|
|
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
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import typing
|
|
6
|
+
|
|
7
|
+
import pydantic
|
|
8
|
+
import typing_extensions
|
|
9
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs
|
|
10
|
+
from ..core.serialization import FieldMetadata
|
|
11
|
+
from .service_execution import ServiceExecution
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class ServiceExecutionTokenPrincipal(UniversalBaseModel):
|
|
15
|
+
service_execution: typing_extensions.Annotated[
|
|
16
|
+
typing.Optional[ServiceExecution], FieldMetadata(alias="serviceExecution")
|
|
17
|
+
] = None
|
|
18
|
+
service_provider: typing_extensions.Annotated[
|
|
19
|
+
typing.Optional["UserContext"], FieldMetadata(alias="serviceProvider")
|
|
20
|
+
] = None
|
|
21
|
+
|
|
22
|
+
if IS_PYDANTIC_V2:
|
|
23
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
24
|
+
else:
|
|
25
|
+
|
|
26
|
+
class Config:
|
|
27
|
+
frozen = True
|
|
28
|
+
smart_union = True
|
|
29
|
+
extra = pydantic.Extra.allow
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
from .user_context import UserContext # noqa: E402, F401, I001
|
|
33
|
+
|
|
34
|
+
update_forward_refs(ServiceExecutionTokenPrincipal)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import typing
|
|
6
|
+
|
|
7
|
+
import pydantic
|
|
8
|
+
import typing_extensions
|
|
9
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs
|
|
10
|
+
from ..core.serialization import FieldMetadata
|
|
11
|
+
from .user_context_account_type import UserContextAccountType
|
|
12
|
+
from .user_context_context_type import UserContextContextType
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class UserContext(UniversalBaseModel):
|
|
16
|
+
id: typing.Optional[str] = None
|
|
17
|
+
context_type: typing_extensions.Annotated[
|
|
18
|
+
typing.Optional[UserContextContextType], FieldMetadata(alias="contextType")
|
|
19
|
+
] = None
|
|
20
|
+
account_type: typing_extensions.Annotated[
|
|
21
|
+
typing.Optional[UserContextAccountType], FieldMetadata(alias="accountType")
|
|
22
|
+
] = None
|
|
23
|
+
parent: typing.Optional["UserContext"] = None
|
|
24
|
+
|
|
25
|
+
if IS_PYDANTIC_V2:
|
|
26
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
27
|
+
else:
|
|
28
|
+
|
|
29
|
+
class Config:
|
|
30
|
+
frozen = True
|
|
31
|
+
smart_union = True
|
|
32
|
+
extra = pydantic.Extra.allow
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
update_forward_refs(UserContext)
|
package/pyproject.toml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "planqk-api-sdk"
|
|
3
|
-
version = "1.
|
|
3
|
+
version = "1.3.0"
|
|
4
4
|
description = "SDK to interact with the official PLANQK API."
|
|
5
5
|
authors = [
|
|
6
6
|
{ name = "Kipu Quantum GmbH", email = "info@kipu-quantum.com" },
|
|
@@ -28,6 +28,7 @@ dev = [
|
|
|
28
28
|
"pylint>=3.3.5",
|
|
29
29
|
"pytest>=8.3.5",
|
|
30
30
|
"pytest-dotenv>=0.5.2",
|
|
31
|
+
"python-dotenv>=1.1.1",
|
|
31
32
|
]
|
|
32
33
|
|
|
33
34
|
[project.urls]
|
|
@@ -49,8 +50,3 @@ include = ["planqk*"]
|
|
|
49
50
|
ignore-paths = '^planqk/api/sdk/.*$'
|
|
50
51
|
max-line-length = 120
|
|
51
52
|
disable = ['missing-module-docstring', 'missing-class-docstring', 'missing-function-docstring']
|
|
52
|
-
|
|
53
|
-
[tool.uv.workspace]
|
|
54
|
-
members = [
|
|
55
|
-
"python-test-app",
|
|
56
|
-
]
|
package/src/index.test.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import process from 'node:process'
|
|
2
2
|
import {test} from 'vitest'
|
|
3
3
|
import 'dotenv/config'
|
|
4
|
-
import {PlanqkApiClient} from "./
|
|
4
|
+
import {PlanqkApiClient} from "./sdk";
|
|
5
5
|
|
|
6
|
-
test.skip('
|
|
7
|
-
const accessToken = process.env.PLANQK_PERSONAL_ACCESS_TOKEN!
|
|
6
|
+
test.skip('integration test: data pools', {timeout: 5 * 60 * 1000}, async () => {
|
|
8
7
|
const baseUrl = process.env.PLANQK_API_BASE_URL!
|
|
8
|
+
const apiKey = process.env.PLANQK_PERSONAL_ACCESS_TOKEN!
|
|
9
|
+
const organizationId = process.env.PLANQK_ORGANIZATION_ID
|
|
9
10
|
|
|
10
|
-
const client = new PlanqkApiClient({baseUrl
|
|
11
|
+
const client = new PlanqkApiClient({baseUrl, apiKey, organizationId})
|
|
11
12
|
|
|
12
|
-
const dataPools = await client.dataPools.getDataPools()
|
|
13
|
+
const dataPools = await client.dataPools.getDataPools()
|
|
13
14
|
console.log(dataPools)
|
|
14
15
|
|
|
15
16
|
const files = await client.dataPools.getDataPoolFiles(dataPools[0].id!)
|
package/src/index.ts
CHANGED
|
@@ -13,7 +13,8 @@ export declare namespace PlanqkApiClient {
|
|
|
13
13
|
/** Specify a custom URL to connect the client to. */
|
|
14
14
|
baseUrl?: core.Supplier<string>;
|
|
15
15
|
apiKey: core.Supplier<string>;
|
|
16
|
-
|
|
16
|
+
/** Override the X-OrganizationId header */
|
|
17
|
+
organizationId?: core.Supplier<string | undefined>;
|
|
17
18
|
/** Additional headers to include in requests. */
|
|
18
19
|
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
19
20
|
}
|
|
@@ -25,6 +26,8 @@ export declare namespace PlanqkApiClient {
|
|
|
25
26
|
maxRetries?: number;
|
|
26
27
|
/** A hook to abort the request. */
|
|
27
28
|
abortSignal?: AbortSignal;
|
|
29
|
+
/** Override the X-OrganizationId header */
|
|
30
|
+
organizationId?: string | undefined;
|
|
28
31
|
/** Additional headers to include in the request. */
|
|
29
32
|
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
30
33
|
}
|
|
@@ -39,10 +42,10 @@ export class PlanqkApiClient {
|
|
|
39
42
|
..._options,
|
|
40
43
|
headers: mergeHeaders(
|
|
41
44
|
{
|
|
45
|
+
"X-OrganizationId": _options?.organizationId,
|
|
42
46
|
"X-Fern-Language": "JavaScript",
|
|
43
47
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
44
48
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
45
|
-
"X-OrganizationId": _options.organizationId,
|
|
46
49
|
},
|
|
47
50
|
_options?.headers,
|
|
48
51
|
),
|
|
@@ -15,6 +15,8 @@ export declare namespace DataPools {
|
|
|
15
15
|
/** Specify a custom URL to connect the client to. */
|
|
16
16
|
baseUrl?: core.Supplier<string>;
|
|
17
17
|
apiKey: core.Supplier<string>;
|
|
18
|
+
/** Override the X-OrganizationId header */
|
|
19
|
+
organizationId?: core.Supplier<string | undefined>;
|
|
18
20
|
/** Additional headers to include in requests. */
|
|
19
21
|
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
20
22
|
}
|
|
@@ -26,11 +28,16 @@ export declare namespace DataPools {
|
|
|
26
28
|
maxRetries?: number;
|
|
27
29
|
/** A hook to abort the request. */
|
|
28
30
|
abortSignal?: AbortSignal;
|
|
31
|
+
/** Override the X-OrganizationId header */
|
|
32
|
+
organizationId?: string | undefined;
|
|
29
33
|
/** Additional headers to include in the request. */
|
|
30
34
|
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
31
35
|
}
|
|
32
36
|
}
|
|
33
37
|
|
|
38
|
+
/**
|
|
39
|
+
* Manage data pools, which are organized collections of files that serve as reusable data sources for services.
|
|
40
|
+
*/
|
|
34
41
|
export class DataPools {
|
|
35
42
|
protected readonly _options: DataPools.Options;
|
|
36
43
|
|
|
@@ -73,7 +80,10 @@ export class DataPools {
|
|
|
73
80
|
method: "GET",
|
|
74
81
|
headers: mergeHeaders(
|
|
75
82
|
this._options?.headers,
|
|
76
|
-
mergeOnlyDefinedHeaders({
|
|
83
|
+
mergeOnlyDefinedHeaders({
|
|
84
|
+
"X-OrganizationId": requestOptions?.organizationId,
|
|
85
|
+
...(await this._getCustomAuthorizationHeaders()),
|
|
86
|
+
}),
|
|
77
87
|
requestOptions?.headers,
|
|
78
88
|
),
|
|
79
89
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -160,7 +170,10 @@ export class DataPools {
|
|
|
160
170
|
method: "PUT",
|
|
161
171
|
headers: mergeHeaders(
|
|
162
172
|
this._options?.headers,
|
|
163
|
-
mergeOnlyDefinedHeaders({
|
|
173
|
+
mergeOnlyDefinedHeaders({
|
|
174
|
+
"X-OrganizationId": requestOptions?.organizationId,
|
|
175
|
+
...(await this._getCustomAuthorizationHeaders()),
|
|
176
|
+
}),
|
|
164
177
|
requestOptions?.headers,
|
|
165
178
|
),
|
|
166
179
|
contentType: "application/json",
|
|
@@ -245,7 +258,10 @@ export class DataPools {
|
|
|
245
258
|
method: "DELETE",
|
|
246
259
|
headers: mergeHeaders(
|
|
247
260
|
this._options?.headers,
|
|
248
|
-
mergeOnlyDefinedHeaders({
|
|
261
|
+
mergeOnlyDefinedHeaders({
|
|
262
|
+
"X-OrganizationId": requestOptions?.organizationId,
|
|
263
|
+
...(await this._getCustomAuthorizationHeaders()),
|
|
264
|
+
}),
|
|
249
265
|
requestOptions?.headers,
|
|
250
266
|
),
|
|
251
267
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -323,7 +339,10 @@ export class DataPools {
|
|
|
323
339
|
method: "GET",
|
|
324
340
|
headers: mergeHeaders(
|
|
325
341
|
this._options?.headers,
|
|
326
|
-
mergeOnlyDefinedHeaders({
|
|
342
|
+
mergeOnlyDefinedHeaders({
|
|
343
|
+
"X-OrganizationId": requestOptions?.organizationId,
|
|
344
|
+
...(await this._getCustomAuthorizationHeaders()),
|
|
345
|
+
}),
|
|
327
346
|
requestOptions?.headers,
|
|
328
347
|
),
|
|
329
348
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -407,7 +426,10 @@ export class DataPools {
|
|
|
407
426
|
method: "POST",
|
|
408
427
|
headers: mergeHeaders(
|
|
409
428
|
this._options?.headers,
|
|
410
|
-
mergeOnlyDefinedHeaders({
|
|
429
|
+
mergeOnlyDefinedHeaders({
|
|
430
|
+
"X-OrganizationId": requestOptions?.organizationId,
|
|
431
|
+
...(await this._getCustomAuthorizationHeaders()),
|
|
432
|
+
}),
|
|
411
433
|
requestOptions?.headers,
|
|
412
434
|
),
|
|
413
435
|
contentType: "application/json",
|
|
@@ -495,7 +517,10 @@ export class DataPools {
|
|
|
495
517
|
method: "GET",
|
|
496
518
|
headers: mergeHeaders(
|
|
497
519
|
this._options?.headers,
|
|
498
|
-
mergeOnlyDefinedHeaders({
|
|
520
|
+
mergeOnlyDefinedHeaders({
|
|
521
|
+
"X-OrganizationId": requestOptions?.organizationId,
|
|
522
|
+
...(await this._getCustomAuthorizationHeaders()),
|
|
523
|
+
}),
|
|
499
524
|
requestOptions?.headers,
|
|
500
525
|
),
|
|
501
526
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -593,6 +618,7 @@ export class DataPools {
|
|
|
593
618
|
headers: mergeHeaders(
|
|
594
619
|
this._options?.headers,
|
|
595
620
|
mergeOnlyDefinedHeaders({
|
|
621
|
+
"X-OrganizationId": requestOptions?.organizationId,
|
|
596
622
|
...(await this._getCustomAuthorizationHeaders()),
|
|
597
623
|
..._maybeEncodedRequest.headers,
|
|
598
624
|
}),
|
|
@@ -679,7 +705,10 @@ export class DataPools {
|
|
|
679
705
|
method: "GET",
|
|
680
706
|
headers: mergeHeaders(
|
|
681
707
|
this._options?.headers,
|
|
682
|
-
mergeOnlyDefinedHeaders({
|
|
708
|
+
mergeOnlyDefinedHeaders({
|
|
709
|
+
"X-OrganizationId": requestOptions?.organizationId,
|
|
710
|
+
...(await this._getCustomAuthorizationHeaders()),
|
|
711
|
+
}),
|
|
683
712
|
requestOptions?.headers,
|
|
684
713
|
),
|
|
685
714
|
responseType: "binary-response",
|
|
@@ -768,7 +797,10 @@ export class DataPools {
|
|
|
768
797
|
method: "DELETE",
|
|
769
798
|
headers: mergeHeaders(
|
|
770
799
|
this._options?.headers,
|
|
771
|
-
mergeOnlyDefinedHeaders({
|
|
800
|
+
mergeOnlyDefinedHeaders({
|
|
801
|
+
"X-OrganizationId": requestOptions?.organizationId,
|
|
802
|
+
...(await this._getCustomAuthorizationHeaders()),
|
|
803
|
+
}),
|
|
772
804
|
requestOptions?.headers,
|
|
773
805
|
),
|
|
774
806
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
package/src/sdk/index.ts
ADDED