@mittwald/api-client 4.466.0 → 4.468.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/README.md CHANGED
@@ -18,6 +18,7 @@ see the [LICENSE](../../LICENSE) file for details.
18
18
  - [Setting request parameters](#setting-request-parameters)
19
19
  - [Path parameters](#path-parameters)
20
20
  - [Headers, query parameters and request body](#headers-query-parameters-and-request-body)
21
+ - [Date and time values](#date-and-time-values)
21
22
  - [Example](#example)
22
23
  - [Usage in React](#usage-in-react)
23
24
  - [Installation](#installation)
@@ -151,6 +152,28 @@ const response = await mittwaldApi.category.operation({
151
152
  });
152
153
  ```
153
154
 
155
+ #### Date and time values
156
+
157
+ Wherever the API expects a date and time (an ISO 8601 string in the API
158
+ documentation), you can either pass that string yourself or simply pass a
159
+ JavaScript `Date`. `Date` values are converted to ISO 8601 before the request is
160
+ sent – in the request body (at any nesting depth), in query parameters, path
161
+ parameters and headers.
162
+
163
+ ```typescript
164
+ await mittwaldApi.contract.terminateContractItem({
165
+ contractId: "contract-id",
166
+ contractItemId: "contract-item-id",
167
+ data: {
168
+ terminationTargetDate: new Date("2024-12-10"),
169
+ },
170
+ });
171
+ ```
172
+
173
+ Note that this applies to `date-time` values only. Date-only values
174
+ (`YYYY-MM-DD`) still have to be passed as a string, and responses always contain
175
+ strings, never `Date` objects.
176
+
154
177
  ## Example
155
178
 
156
179
  ```typescript
@@ -214,6 +214,8 @@ const buildMarketplaceApi = (baseClient) => ({
214
214
  extensionListScopes: new ApiCallAsyncResourceFactory(descriptors.extensionListScopes, baseClient.marketplace.extensionListScopes).getApiResource,
215
215
  /** Get payment method details */
216
216
  customerGetPaymentMethod: new ApiCallAsyncResourceFactory(descriptors.marketplaceCustomerGetPaymentMethod, baseClient.marketplace.customerGetPaymentMethod).getApiResource,
217
+ /** Get a specific OAuth2 client. */
218
+ contributorGetOauthClient: new ApiCallAsyncResourceFactory(descriptors.contributorGetOauthClient, baseClient.marketplace.contributorGetOauthClient).getApiResource,
217
219
  });
218
220
  const buildConversationApi = (baseClient) => ({
219
221
  /** Get all conversation the authenticated user has created or has access to. */
@@ -410,6 +410,8 @@ export class MittwaldAPIV2Client extends ApiClientBase {
410
410
  customerGetPaymentMethod: this.requestFunctionFactory(descriptors.marketplaceCustomerGetPaymentMethod),
411
411
  /** Get the link to update the marketplace payment method */
412
412
  customerUpdatePaymentMethod: this.requestFunctionFactory(descriptors.marketplaceCustomerUpdatePaymentMethod),
413
+ /** Get a specific OAuth2 client. */
414
+ contributorGetOauthClient: this.requestFunctionFactory(descriptors.contributorGetOauthClient),
413
415
  };
414
416
  /** The conversation API allows you to manage your support conversations. */
415
417
  conversation = {
@@ -2896,3 +2896,9 @@ export const verificationVerifyCompany = {
2896
2896
  method: "POST",
2897
2897
  operationId: "verification-verify-company",
2898
2898
  };
2899
+ /** Get a specific OAuth2 client. */
2900
+ export const contributorGetOauthClient = {
2901
+ path: "/v2/oauth2/clients/{oauthClientId}",
2902
+ method: "GET",
2903
+ operationId: "contributor-get-oauth-client",
2904
+ };
@@ -214,6 +214,8 @@ const buildMarketplaceApi = (baseClient) => ({
214
214
  extensionListScopes: new ApiCallAsyncResourceFactory(descriptors.extensionListScopes, baseClient.marketplace.extensionListScopes).getApiResource,
215
215
  /** Get payment method details */
216
216
  customerGetPaymentMethod: new ApiCallAsyncResourceFactory(descriptors.marketplaceCustomerGetPaymentMethod, baseClient.marketplace.customerGetPaymentMethod).getApiResource,
217
+ /** Get a specific OAuth2 client. */
218
+ contributorGetOauthClient: new ApiCallAsyncResourceFactory(descriptors.contributorGetOauthClient, baseClient.marketplace.contributorGetOauthClient).getApiResource,
217
219
  });
218
220
  const buildConversationApi = (baseClient) => ({
219
221
  /** Get all conversation the authenticated user has created or has access to. */
@@ -410,6 +410,8 @@ export class MittwaldAPIV3NextClient extends ApiClientBase {
410
410
  customerGetPaymentMethod: this.requestFunctionFactory(descriptors.marketplaceCustomerGetPaymentMethod),
411
411
  /** Get the link to update the marketplace payment method */
412
412
  customerUpdatePaymentMethod: this.requestFunctionFactory(descriptors.marketplaceCustomerUpdatePaymentMethod),
413
+ /** Get a specific OAuth2 client. */
414
+ contributorGetOauthClient: this.requestFunctionFactory(descriptors.contributorGetOauthClient),
413
415
  };
414
416
  /** The conversation API allows you to manage your support conversations. */
415
417
  conversation = {
@@ -2896,3 +2896,9 @@ export const verificationVerifyCompany = {
2896
2896
  method: "POST",
2897
2897
  operationId: "verification-verify-company",
2898
2898
  };
2899
+ /** Get a specific OAuth2 client. */
2900
+ export const contributorGetOauthClient = {
2901
+ path: "/v3-next/oauth2/clients/{oauthClientId}",
2902
+ method: "GET",
2903
+ operationId: "contributor-get-oauth-client",
2904
+ };
@@ -1 +1 @@
1
- export const MittwaldAPIClientVersion = '4.465.0';
1
+ export const MittwaldAPIClientVersion = '4.467.0';