@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.
Files changed (211) hide show
  1. package/.env.template +2 -1
  2. package/.gitlab-ci.yml +1 -0
  3. package/README-node.md +13 -0
  4. package/README-python.md +13 -0
  5. package/README.md +6 -49
  6. package/apps/python-test-app/main.py +159 -0
  7. package/apps/python-test-app/my_file.txt +1 -0
  8. package/apps/ts-test-app/index.ts +140 -0
  9. package/apps/ts-test-app/package-lock.json +693 -0
  10. package/apps/ts-test-app/package.json +19 -0
  11. package/apps/ts-test-app/test-file.txt +1 -0
  12. package/apps/ts-test-app/tsconfig.json +11 -0
  13. package/dist/index.d.ts +1 -4
  14. package/dist/index.js +4 -31
  15. package/dist/{Client.d.ts → sdk/Client.d.ts} +4 -1
  16. package/dist/{Client.js → sdk/Client.js} +1 -1
  17. package/dist/{api → sdk/api}/resources/dataPools/client/Client.d.ts +7 -0
  18. package/dist/{api → sdk/api}/resources/dataPools/client/Client.js +36 -8
  19. package/dist/sdk/index.d.ts +4 -0
  20. package/dist/sdk/index.js +44 -0
  21. package/fern/fern.config.json +1 -1
  22. package/fern/openapi/openapi.json +121 -15
  23. package/package.json +3 -4
  24. package/planqk/api/_version.py +1 -1
  25. package/planqk/api/client.py +1 -5
  26. package/planqk/api/sdk/__init__.py +34 -2
  27. package/planqk/api/sdk/authentication/__init__.py +7 -0
  28. package/planqk/api/sdk/authentication/client.py +102 -0
  29. package/planqk/api/sdk/authentication/raw_client.py +183 -0
  30. package/planqk/api/sdk/authentication/types/__init__.py +7 -0
  31. package/planqk/api/sdk/authentication/types/authorize_response.py +8 -0
  32. package/planqk/api/sdk/client.py +11 -0
  33. package/planqk/api/sdk/core/client_wrapper.py +12 -2
  34. package/planqk/api/sdk/data_pools/client.py +16 -0
  35. package/planqk/api/sdk/environment.py +1 -1
  36. package/planqk/api/sdk/types/__init__.py +30 -1
  37. package/planqk/api/sdk/types/access_token.py +26 -0
  38. package/planqk/api/sdk/types/organization_membership.py +27 -0
  39. package/planqk/api/sdk/types/organization_membership_account_type.py +5 -0
  40. package/planqk/api/sdk/types/organization_membership_role.py +5 -0
  41. package/planqk/api/sdk/types/personal_access_token_principal.py +31 -0
  42. package/planqk/api/sdk/types/personal_access_token_principal_account_type.py +5 -0
  43. package/planqk/api/sdk/types/service_execution.py +27 -0
  44. package/planqk/api/sdk/types/service_execution_status.py +7 -0
  45. package/planqk/api/sdk/types/service_execution_token_principal.py +34 -0
  46. package/planqk/api/sdk/types/user_context.py +35 -0
  47. package/planqk/api/sdk/types/user_context_account_type.py +5 -0
  48. package/planqk/api/sdk/types/user_context_context_type.py +5 -0
  49. package/pyproject.toml +2 -6
  50. package/src/index.test.ts +6 -5
  51. package/src/index.ts +1 -4
  52. package/src/{Client.ts → sdk/Client.ts} +5 -2
  53. package/src/{api → sdk/api}/resources/dataPools/client/Client.ts +40 -8
  54. package/src/sdk/index.ts +4 -0
  55. package/uv.lock +340 -559
  56. /package/dist/{api → sdk/api}/errors/BadRequestError.d.ts +0 -0
  57. /package/dist/{api → sdk/api}/errors/BadRequestError.js +0 -0
  58. /package/dist/{api → sdk/api}/errors/ForbiddenError.d.ts +0 -0
  59. /package/dist/{api → sdk/api}/errors/ForbiddenError.js +0 -0
  60. /package/dist/{api → sdk/api}/errors/InternalServerError.d.ts +0 -0
  61. /package/dist/{api → sdk/api}/errors/InternalServerError.js +0 -0
  62. /package/dist/{api → sdk/api}/errors/NotFoundError.d.ts +0 -0
  63. /package/dist/{api → sdk/api}/errors/NotFoundError.js +0 -0
  64. /package/dist/{api → sdk/api}/errors/UnauthorizedError.d.ts +0 -0
  65. /package/dist/{api → sdk/api}/errors/UnauthorizedError.js +0 -0
  66. /package/dist/{api → sdk/api}/errors/index.d.ts +0 -0
  67. /package/dist/{api → sdk/api}/errors/index.js +0 -0
  68. /package/dist/{api → sdk/api}/index.d.ts +0 -0
  69. /package/dist/{api → sdk/api}/index.js +0 -0
  70. /package/dist/{api → sdk/api}/resources/dataPools/client/index.d.ts +0 -0
  71. /package/dist/{api → sdk/api}/resources/dataPools/client/index.js +0 -0
  72. /package/dist/{api → sdk/api}/resources/dataPools/client/requests/AddDataPoolFileRequest.d.ts +0 -0
  73. /package/dist/{api → sdk/api}/resources/dataPools/client/requests/AddDataPoolFileRequest.js +0 -0
  74. /package/dist/{api → sdk/api}/resources/dataPools/client/requests/CreateDataPoolRequest.d.ts +0 -0
  75. /package/dist/{api → sdk/api}/resources/dataPools/client/requests/CreateDataPoolRequest.js +0 -0
  76. /package/dist/{api → sdk/api}/resources/dataPools/client/requests/UpdateDataPoolRequest.d.ts +0 -0
  77. /package/dist/{api → sdk/api}/resources/dataPools/client/requests/UpdateDataPoolRequest.js +0 -0
  78. /package/dist/{api → sdk/api}/resources/dataPools/client/requests/index.d.ts +0 -0
  79. /package/dist/{api → sdk/api}/resources/dataPools/client/requests/index.js +0 -0
  80. /package/dist/{api → sdk/api}/resources/dataPools/index.d.ts +0 -0
  81. /package/dist/{api → sdk/api}/resources/dataPools/index.js +0 -0
  82. /package/dist/{api → sdk/api}/resources/index.d.ts +0 -0
  83. /package/dist/{api → sdk/api}/resources/index.js +0 -0
  84. /package/dist/{api → sdk/api}/types/DataPoolDto.d.ts +0 -0
  85. /package/dist/{api → sdk/api}/types/DataPoolDto.js +0 -0
  86. /package/dist/{api → sdk/api}/types/DataPoolFileDto.d.ts +0 -0
  87. /package/dist/{api → sdk/api}/types/DataPoolFileDto.js +0 -0
  88. /package/dist/{api → sdk/api}/types/OauthScope.d.ts +0 -0
  89. /package/dist/{api → sdk/api}/types/OauthScope.js +0 -0
  90. /package/dist/{api → sdk/api}/types/index.d.ts +0 -0
  91. /package/dist/{api → sdk/api}/types/index.js +0 -0
  92. /package/dist/{core → sdk/core}/fetcher/APIResponse.d.ts +0 -0
  93. /package/dist/{core → sdk/core}/fetcher/APIResponse.js +0 -0
  94. /package/dist/{core → sdk/core}/fetcher/BinaryResponse.d.ts +0 -0
  95. /package/dist/{core → sdk/core}/fetcher/BinaryResponse.js +0 -0
  96. /package/dist/{core → sdk/core}/fetcher/Fetcher.d.ts +0 -0
  97. /package/dist/{core → sdk/core}/fetcher/Fetcher.js +0 -0
  98. /package/dist/{core → sdk/core}/fetcher/Headers.d.ts +0 -0
  99. /package/dist/{core → sdk/core}/fetcher/Headers.js +0 -0
  100. /package/dist/{core → sdk/core}/fetcher/HttpResponsePromise.d.ts +0 -0
  101. /package/dist/{core → sdk/core}/fetcher/HttpResponsePromise.js +0 -0
  102. /package/dist/{core → sdk/core}/fetcher/RawResponse.d.ts +0 -0
  103. /package/dist/{core → sdk/core}/fetcher/RawResponse.js +0 -0
  104. /package/dist/{core → sdk/core}/fetcher/ResponseWithBody.d.ts +0 -0
  105. /package/dist/{core → sdk/core}/fetcher/ResponseWithBody.js +0 -0
  106. /package/dist/{core → sdk/core}/fetcher/Supplier.d.ts +0 -0
  107. /package/dist/{core → sdk/core}/fetcher/Supplier.js +0 -0
  108. /package/dist/{core → sdk/core}/fetcher/createRequestUrl.d.ts +0 -0
  109. /package/dist/{core → sdk/core}/fetcher/createRequestUrl.js +0 -0
  110. /package/dist/{core → sdk/core}/fetcher/getErrorResponseBody.d.ts +0 -0
  111. /package/dist/{core → sdk/core}/fetcher/getErrorResponseBody.js +0 -0
  112. /package/dist/{core → sdk/core}/fetcher/getFetchFn.d.ts +0 -0
  113. /package/dist/{core → sdk/core}/fetcher/getFetchFn.js +0 -0
  114. /package/dist/{core → sdk/core}/fetcher/getHeader.d.ts +0 -0
  115. /package/dist/{core → sdk/core}/fetcher/getHeader.js +0 -0
  116. /package/dist/{core → sdk/core}/fetcher/getRequestBody.d.ts +0 -0
  117. /package/dist/{core → sdk/core}/fetcher/getRequestBody.js +0 -0
  118. /package/dist/{core → sdk/core}/fetcher/getResponseBody.d.ts +0 -0
  119. /package/dist/{core → sdk/core}/fetcher/getResponseBody.js +0 -0
  120. /package/dist/{core → sdk/core}/fetcher/index.d.ts +0 -0
  121. /package/dist/{core → sdk/core}/fetcher/index.js +0 -0
  122. /package/dist/{core → sdk/core}/fetcher/makeRequest.d.ts +0 -0
  123. /package/dist/{core → sdk/core}/fetcher/makeRequest.js +0 -0
  124. /package/dist/{core → sdk/core}/fetcher/requestWithRetries.d.ts +0 -0
  125. /package/dist/{core → sdk/core}/fetcher/requestWithRetries.js +0 -0
  126. /package/dist/{core → sdk/core}/fetcher/signals.d.ts +0 -0
  127. /package/dist/{core → sdk/core}/fetcher/signals.js +0 -0
  128. /package/dist/{core → sdk/core}/file.d.ts +0 -0
  129. /package/dist/{core → sdk/core}/file.js +0 -0
  130. /package/dist/{core → sdk/core}/form-data-utils/FormDataWrapper.d.ts +0 -0
  131. /package/dist/{core → sdk/core}/form-data-utils/FormDataWrapper.js +0 -0
  132. /package/dist/{core → sdk/core}/form-data-utils/encodeAsFormParameter.d.ts +0 -0
  133. /package/dist/{core → sdk/core}/form-data-utils/encodeAsFormParameter.js +0 -0
  134. /package/dist/{core → sdk/core}/form-data-utils/index.d.ts +0 -0
  135. /package/dist/{core → sdk/core}/form-data-utils/index.js +0 -0
  136. /package/dist/{core → sdk/core}/headers.d.ts +0 -0
  137. /package/dist/{core → sdk/core}/headers.js +0 -0
  138. /package/dist/{core → sdk/core}/index.d.ts +0 -0
  139. /package/dist/{core → sdk/core}/index.js +0 -0
  140. /package/dist/{core → sdk/core}/json.d.ts +0 -0
  141. /package/dist/{core → sdk/core}/json.js +0 -0
  142. /package/dist/{core → sdk/core}/runtime/index.d.ts +0 -0
  143. /package/dist/{core → sdk/core}/runtime/index.js +0 -0
  144. /package/dist/{core → sdk/core}/runtime/runtime.d.ts +0 -0
  145. /package/dist/{core → sdk/core}/runtime/runtime.js +0 -0
  146. /package/dist/{core → sdk/core}/url/index.d.ts +0 -0
  147. /package/dist/{core → sdk/core}/url/index.js +0 -0
  148. /package/dist/{core → sdk/core}/url/join.d.ts +0 -0
  149. /package/dist/{core → sdk/core}/url/join.js +0 -0
  150. /package/dist/{core → sdk/core}/url/qs.d.ts +0 -0
  151. /package/dist/{core → sdk/core}/url/qs.js +0 -0
  152. /package/dist/{environments.d.ts → sdk/environments.d.ts} +0 -0
  153. /package/dist/{environments.js → sdk/environments.js} +0 -0
  154. /package/dist/{errors → sdk/errors}/PlanqkApiError.d.ts +0 -0
  155. /package/dist/{errors → sdk/errors}/PlanqkApiError.js +0 -0
  156. /package/dist/{errors → sdk/errors}/PlanqkApiTimeoutError.d.ts +0 -0
  157. /package/dist/{errors → sdk/errors}/PlanqkApiTimeoutError.js +0 -0
  158. /package/dist/{errors → sdk/errors}/index.d.ts +0 -0
  159. /package/dist/{errors → sdk/errors}/index.js +0 -0
  160. /package/src/{api → sdk/api}/errors/BadRequestError.ts +0 -0
  161. /package/src/{api → sdk/api}/errors/ForbiddenError.ts +0 -0
  162. /package/src/{api → sdk/api}/errors/InternalServerError.ts +0 -0
  163. /package/src/{api → sdk/api}/errors/NotFoundError.ts +0 -0
  164. /package/src/{api → sdk/api}/errors/UnauthorizedError.ts +0 -0
  165. /package/src/{api → sdk/api}/errors/index.ts +0 -0
  166. /package/src/{api → sdk/api}/index.ts +0 -0
  167. /package/src/{api → sdk/api}/resources/dataPools/client/index.ts +0 -0
  168. /package/src/{api → sdk/api}/resources/dataPools/client/requests/AddDataPoolFileRequest.ts +0 -0
  169. /package/src/{api → sdk/api}/resources/dataPools/client/requests/CreateDataPoolRequest.ts +0 -0
  170. /package/src/{api → sdk/api}/resources/dataPools/client/requests/UpdateDataPoolRequest.ts +0 -0
  171. /package/src/{api → sdk/api}/resources/dataPools/client/requests/index.ts +0 -0
  172. /package/src/{api → sdk/api}/resources/dataPools/index.ts +0 -0
  173. /package/src/{api → sdk/api}/resources/index.ts +0 -0
  174. /package/src/{api → sdk/api}/types/DataPoolDto.ts +0 -0
  175. /package/src/{api → sdk/api}/types/DataPoolFileDto.ts +0 -0
  176. /package/src/{api → sdk/api}/types/OauthScope.ts +0 -0
  177. /package/src/{api → sdk/api}/types/index.ts +0 -0
  178. /package/src/{core → sdk/core}/fetcher/APIResponse.ts +0 -0
  179. /package/src/{core → sdk/core}/fetcher/BinaryResponse.ts +0 -0
  180. /package/src/{core → sdk/core}/fetcher/Fetcher.ts +0 -0
  181. /package/src/{core → sdk/core}/fetcher/Headers.ts +0 -0
  182. /package/src/{core → sdk/core}/fetcher/HttpResponsePromise.ts +0 -0
  183. /package/src/{core → sdk/core}/fetcher/RawResponse.ts +0 -0
  184. /package/src/{core → sdk/core}/fetcher/ResponseWithBody.ts +0 -0
  185. /package/src/{core → sdk/core}/fetcher/Supplier.ts +0 -0
  186. /package/src/{core → sdk/core}/fetcher/createRequestUrl.ts +0 -0
  187. /package/src/{core → sdk/core}/fetcher/getErrorResponseBody.ts +0 -0
  188. /package/src/{core → sdk/core}/fetcher/getFetchFn.ts +0 -0
  189. /package/src/{core → sdk/core}/fetcher/getHeader.ts +0 -0
  190. /package/src/{core → sdk/core}/fetcher/getRequestBody.ts +0 -0
  191. /package/src/{core → sdk/core}/fetcher/getResponseBody.ts +0 -0
  192. /package/src/{core → sdk/core}/fetcher/index.ts +0 -0
  193. /package/src/{core → sdk/core}/fetcher/makeRequest.ts +0 -0
  194. /package/src/{core → sdk/core}/fetcher/requestWithRetries.ts +0 -0
  195. /package/src/{core → sdk/core}/fetcher/signals.ts +0 -0
  196. /package/src/{core → sdk/core}/file.ts +0 -0
  197. /package/src/{core → sdk/core}/form-data-utils/FormDataWrapper.ts +0 -0
  198. /package/src/{core → sdk/core}/form-data-utils/encodeAsFormParameter.ts +0 -0
  199. /package/src/{core → sdk/core}/form-data-utils/index.ts +0 -0
  200. /package/src/{core → sdk/core}/headers.ts +0 -0
  201. /package/src/{core → sdk/core}/index.ts +0 -0
  202. /package/src/{core → sdk/core}/json.ts +0 -0
  203. /package/src/{core → sdk/core}/runtime/index.ts +0 -0
  204. /package/src/{core → sdk/core}/runtime/runtime.ts +0 -0
  205. /package/src/{core → sdk/core}/url/index.ts +0 -0
  206. /package/src/{core → sdk/core}/url/join.ts +0 -0
  207. /package/src/{core → sdk/core}/url/qs.ts +0 -0
  208. /package/src/{environments.ts → sdk/environments.ts} +0 -0
  209. /package/src/{errors → sdk/errors}/PlanqkApiError.ts +0 -0
  210. /package/src/{errors → sdk/errors}/PlanqkApiTimeoutError.ts +0 -0
  211. /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,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ OrganizationMembershipAccountType = typing.Union[typing.Literal["BASIC", "PRO", "BUSINESS"], typing.Any]
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ OrganizationMembershipRole = typing.Union[typing.Literal["VIEWER", "MAINTAINER", "OWNER"], typing.Any]
@@ -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,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ PersonalAccessTokenPrincipalAccountType = typing.Union[typing.Literal["BASIC", "PRO", "BUSINESS"], typing.Any]
@@ -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,7 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ ServiceExecutionStatus = typing.Union[
6
+ typing.Literal["UNKNOWN", "PENDING", "RUNNING", "SUCCEEDED", "FAILED"], typing.Any
7
+ ]
@@ -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)
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ UserContextAccountType = typing.Union[typing.Literal["BASIC", "PRO", "BUSINESS"], typing.Any]
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ UserContextContextType = typing.Union[typing.Literal["USER", "ORGANIZATION", "SERVICE_EXECUTION"], typing.Any]
package/pyproject.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "planqk-api-sdk"
3
- version = "1.1.0"
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 "./Client";
4
+ import {PlanqkApiClient} from "./sdk";
5
5
 
6
- test.skip('adds 1 + 2 to equal 3', {timeout: 5 * 60 * 1000}, async () => {
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: baseUrl, apiKey: () => accessToken});
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
@@ -1,4 +1 @@
1
- export * as PlanqkApi from "./api/index.js";
2
- export { PlanqkApiError, PlanqkApiTimeoutError } from "./errors/index.js";
3
- export { PlanqkApiClient } from "./Client.js";
4
- export { PlanqkApiEnvironment } from "./environments.js";
1
+ export * from "./sdk";
@@ -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
- organizationId?: core.Supplier<string>;
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({ ...(await this._getCustomAuthorizationHeaders()) }),
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({ ...(await this._getCustomAuthorizationHeaders()) }),
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({ ...(await this._getCustomAuthorizationHeaders()) }),
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({ ...(await this._getCustomAuthorizationHeaders()) }),
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({ ...(await this._getCustomAuthorizationHeaders()) }),
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({ ...(await this._getCustomAuthorizationHeaders()) }),
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({ ...(await this._getCustomAuthorizationHeaders()) }),
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({ ...(await this._getCustomAuthorizationHeaders()) }),
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,
@@ -0,0 +1,4 @@
1
+ export * as PlanqkApi from "./api/index.js";
2
+ export { PlanqkApiError, PlanqkApiTimeoutError } from "./errors/index.js";
3
+ export { PlanqkApiClient } from "./Client.js";
4
+ export { PlanqkApiEnvironment } from "./environments.js";