@flexprice/sdk 2.1.49-dev.23 → 2.1.49-dev.25

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 (45) hide show
  1. package/docs/sdk/models/price-response.md +2 -1
  2. package/docs/sdks/scheduledtasks/README.md +0 -143
  3. package/esm/lib/config.d.ts +2 -2
  4. package/esm/lib/config.js +2 -2
  5. package/esm/sdk/models/index.d.ts +0 -2
  6. package/esm/sdk/models/index.d.ts.map +1 -1
  7. package/esm/sdk/models/index.js +0 -2
  8. package/esm/sdk/models/index.js.map +1 -1
  9. package/esm/sdk/models/price-response.d.ts +4 -0
  10. package/esm/sdk/models/price-response.d.ts.map +1 -1
  11. package/esm/sdk/models/price-response.js +1 -0
  12. package/esm/sdk/models/price-response.js.map +1 -1
  13. package/esm/sdk/scheduled-tasks.d.ts +0 -14
  14. package/esm/sdk/scheduled-tasks.d.ts.map +1 -1
  15. package/esm/sdk/scheduled-tasks.js +0 -20
  16. package/esm/sdk/scheduled-tasks.js.map +1 -1
  17. package/jsr.json +1 -1
  18. package/package.json +2 -2
  19. package/src/lib/config.ts +2 -2
  20. package/src/sdk/models/index.ts +0 -2
  21. package/src/sdk/models/price-response.ts +5 -0
  22. package/src/sdk/scheduled-tasks.ts +0 -34
  23. package/docs/sdk/models/schedule-draft-finalization-response.md +0 -16
  24. package/docs/sdk/models/schedule-update-billing-period-request.md +0 -16
  25. package/docs/sdk/models/schedule-update-billing-period-response.md +0 -16
  26. package/esm/funcs/scheduled-tasks-schedule-draft-finalization.d.ts +0 -17
  27. package/esm/funcs/scheduled-tasks-schedule-draft-finalization.d.ts.map +0 -1
  28. package/esm/funcs/scheduled-tasks-schedule-draft-finalization.js +0 -72
  29. package/esm/funcs/scheduled-tasks-schedule-draft-finalization.js.map +0 -1
  30. package/esm/funcs/scheduled-tasks-schedule-update-billing-period.d.ts +0 -17
  31. package/esm/funcs/scheduled-tasks-schedule-update-billing-period.d.ts.map +0 -1
  32. package/esm/funcs/scheduled-tasks-schedule-update-billing-period.js +0 -73
  33. package/esm/funcs/scheduled-tasks-schedule-update-billing-period.js.map +0 -1
  34. package/esm/sdk/models/schedule-draft-finalization-op.d.ts +0 -11
  35. package/esm/sdk/models/schedule-draft-finalization-op.d.ts.map +0 -1
  36. package/esm/sdk/models/schedule-draft-finalization-op.js +0 -11
  37. package/esm/sdk/models/schedule-draft-finalization-op.js.map +0 -1
  38. package/esm/sdk/models/schedule-update-billing-period-op.d.ts +0 -20
  39. package/esm/sdk/models/schedule-update-billing-period-op.d.ts.map +0 -1
  40. package/esm/sdk/models/schedule-update-billing-period-op.js +0 -16
  41. package/esm/sdk/models/schedule-update-billing-period-op.js.map +0 -1
  42. package/src/funcs/scheduled-tasks-schedule-draft-finalization.ts +0 -153
  43. package/src/funcs/scheduled-tasks-schedule-update-billing-period.ts +0 -157
  44. package/src/sdk/models/schedule-draft-finalization-op.ts +0 -29
  45. package/src/sdk/models/schedule-update-billing-period-op.ts +0 -54
@@ -1,157 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import { FlexpriceCore } from "../core.js";
6
- import { matchStatusCode } from "../lib/http.js";
7
- import * as M from "../lib/matchers.js";
8
- import { compactMap } from "../lib/primitives.js";
9
- import { RequestOptions } from "../lib/sdks.js";
10
- import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
- import { pathToFunc } from "../lib/url.js";
12
- import { FlexPriceError } from "../sdk/models/flex-price-error.js";
13
- import {
14
- ConnectionError,
15
- InvalidRequestError,
16
- RequestAbortedError,
17
- RequestTimeoutError,
18
- UnexpectedClientError,
19
- } from "../sdk/models/http-client-errors.js";
20
- import * as models from "../sdk/models/index.js";
21
- import { ResponseValidationError } from "../sdk/models/response-validation-error.js";
22
- import { SDKValidationError } from "../sdk/models/sdk-validation-error.js";
23
- import { APICall, APIPromise } from "../types/async.js";
24
- import { Result } from "../types/fp.js";
25
-
26
- /**
27
- * Schedule update billing period
28
- *
29
- * @remarks
30
- * Use when you need to trigger a billing-period update workflow (e.g. to recalculate or sync billing windows).
31
- */
32
- export function scheduledTasksScheduleUpdateBillingPeriod(
33
- client: FlexpriceCore,
34
- _request: models.ScheduleUpdateBillingPeriodRequest,
35
- options?: RequestOptions,
36
- ): APIPromise<
37
- Result<
38
- models.ScheduleUpdateBillingPeriodResponse,
39
- | models.ErrorsErrorResponse
40
- | FlexPriceError
41
- | ResponseValidationError
42
- | ConnectionError
43
- | RequestAbortedError
44
- | RequestTimeoutError
45
- | InvalidRequestError
46
- | UnexpectedClientError
47
- | SDKValidationError
48
- >
49
- > {
50
- return new APIPromise($do(
51
- client,
52
- _request,
53
- options,
54
- ));
55
- }
56
-
57
- async function $do(
58
- client: FlexpriceCore,
59
- _request: models.ScheduleUpdateBillingPeriodRequest,
60
- options?: RequestOptions,
61
- ): Promise<
62
- [
63
- Result<
64
- models.ScheduleUpdateBillingPeriodResponse,
65
- | models.ErrorsErrorResponse
66
- | FlexPriceError
67
- | ResponseValidationError
68
- | ConnectionError
69
- | RequestAbortedError
70
- | RequestTimeoutError
71
- | InvalidRequestError
72
- | UnexpectedClientError
73
- | SDKValidationError
74
- >,
75
- APICall,
76
- ]
77
- > {
78
- const path = pathToFunc("/tasks/scheduled/schedule-update-billing-period")();
79
-
80
- const headers = new Headers(compactMap({
81
- "Content-Type": "application/json",
82
- Accept: "application/json",
83
- }));
84
-
85
- const secConfig = await extractSecurity(client._options.apiKeyAuth);
86
- const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
87
- const requestSecurity = resolveGlobalSecurity(securityInput);
88
-
89
- const context = {
90
- options: client._options,
91
- baseURL: options?.serverURL ?? client._baseURL ?? "",
92
- operationID: "scheduleUpdateBillingPeriod",
93
- oAuth2Scopes: null,
94
-
95
- resolvedSecurity: requestSecurity,
96
-
97
- securitySource: client._options.apiKeyAuth,
98
- retryConfig: options?.retries
99
- || client._options.retryConfig
100
- || { strategy: "none" },
101
- retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
102
- };
103
-
104
- const requestRes = client._createRequest(context, {
105
- security: requestSecurity,
106
- method: "POST",
107
- baseURL: options?.serverURL,
108
- path: path,
109
- headers: headers,
110
- userAgent: client._options.userAgent,
111
- timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
112
- }, options);
113
- if (!requestRes.ok) {
114
- return [requestRes, { status: "invalid" }];
115
- }
116
- const req = requestRes.value;
117
-
118
- const doResult = await client._do(req, {
119
- context,
120
- isErrorStatusCode: (statusCode: number) =>
121
- matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
122
- retryConfig: context.retryConfig,
123
- retryCodes: context.retryCodes,
124
- });
125
- if (!doResult.ok) {
126
- return [doResult, { status: "request-error", request: req }];
127
- }
128
- const response = doResult.value;
129
-
130
- const responseFields = {
131
- HttpMeta: { Response: response, Request: req },
132
- };
133
-
134
- const [result] = await M.match<
135
- models.ScheduleUpdateBillingPeriodResponse,
136
- | models.ErrorsErrorResponse
137
- | FlexPriceError
138
- | ResponseValidationError
139
- | ConnectionError
140
- | RequestAbortedError
141
- | RequestTimeoutError
142
- | InvalidRequestError
143
- | UnexpectedClientError
144
- | SDKValidationError
145
- >(
146
- M.json(200, models.ScheduleUpdateBillingPeriodResponse$inboundSchema),
147
- M.jsonErr(400, models.ErrorsErrorResponse$inboundSchema),
148
- M.jsonErr(500, models.ErrorsErrorResponse$inboundSchema),
149
- M.fail("4XX"),
150
- M.fail("5XX"),
151
- )(response, req, { extraFields: responseFields });
152
- if (!result.ok) {
153
- return [result, { status: "complete", request: req, response }];
154
- }
155
-
156
- return [result, { status: "complete", request: req, response }];
157
- }
@@ -1,29 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v4-mini";
6
- import { safeParse } from "../../lib/schemas.js";
7
- import { Result as SafeParseResult } from "../../types/fp.js";
8
- import { SDKValidationError } from "./sdk-validation-error.js";
9
-
10
- /**
11
- * OK
12
- */
13
- export type ScheduleDraftFinalizationResponse = {};
14
-
15
- /** @internal */
16
- export const ScheduleDraftFinalizationResponse$inboundSchema: z.ZodMiniType<
17
- ScheduleDraftFinalizationResponse,
18
- unknown
19
- > = z.object({});
20
-
21
- export function scheduleDraftFinalizationResponseFromJSON(
22
- jsonString: string,
23
- ): SafeParseResult<ScheduleDraftFinalizationResponse, SDKValidationError> {
24
- return safeParse(
25
- jsonString,
26
- (x) => ScheduleDraftFinalizationResponse$inboundSchema.parse(JSON.parse(x)),
27
- `Failed to parse 'ScheduleDraftFinalizationResponse' from JSON`,
28
- );
29
- }
@@ -1,54 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v4-mini";
6
- import { safeParse } from "../../lib/schemas.js";
7
- import { Result as SafeParseResult } from "../../types/fp.js";
8
- import { SDKValidationError } from "./sdk-validation-error.js";
9
-
10
- /**
11
- * Schedule Update Billing Period Request
12
- */
13
- export type ScheduleUpdateBillingPeriodRequest = {};
14
-
15
- /**
16
- * OK
17
- */
18
- export type ScheduleUpdateBillingPeriodResponse = {};
19
-
20
- /** @internal */
21
- export type ScheduleUpdateBillingPeriodRequest$Outbound = {};
22
-
23
- /** @internal */
24
- export const ScheduleUpdateBillingPeriodRequest$outboundSchema: z.ZodMiniType<
25
- ScheduleUpdateBillingPeriodRequest$Outbound,
26
- ScheduleUpdateBillingPeriodRequest
27
- > = z.object({});
28
-
29
- export function scheduleUpdateBillingPeriodRequestToJSON(
30
- scheduleUpdateBillingPeriodRequest: ScheduleUpdateBillingPeriodRequest,
31
- ): string {
32
- return JSON.stringify(
33
- ScheduleUpdateBillingPeriodRequest$outboundSchema.parse(
34
- scheduleUpdateBillingPeriodRequest,
35
- ),
36
- );
37
- }
38
-
39
- /** @internal */
40
- export const ScheduleUpdateBillingPeriodResponse$inboundSchema: z.ZodMiniType<
41
- ScheduleUpdateBillingPeriodResponse,
42
- unknown
43
- > = z.object({});
44
-
45
- export function scheduleUpdateBillingPeriodResponseFromJSON(
46
- jsonString: string,
47
- ): SafeParseResult<ScheduleUpdateBillingPeriodResponse, SDKValidationError> {
48
- return safeParse(
49
- jsonString,
50
- (x) =>
51
- ScheduleUpdateBillingPeriodResponse$inboundSchema.parse(JSON.parse(x)),
52
- `Failed to parse 'ScheduleUpdateBillingPeriodResponse' from JSON`,
53
- );
54
- }