@dazl/internal-api-client 1.0.0 → 1.0.1-alpha.1

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 (67) hide show
  1. package/package.json +1 -1
  2. package/src/sdk.gen.ts +7 -28
  3. package/src/types.gen.ts +27 -37
  4. package/dist/client/client.gen.d.ts +0 -3
  5. package/dist/client/client.gen.d.ts.map +0 -1
  6. package/dist/client/client.gen.js +0 -229
  7. package/dist/client/client.gen.js.map +0 -1
  8. package/dist/client/index.d.ts +0 -9
  9. package/dist/client/index.d.ts.map +0 -1
  10. package/dist/client/index.js +0 -7
  11. package/dist/client/index.js.map +0 -1
  12. package/dist/client/types.gen.d.ts +0 -118
  13. package/dist/client/types.gen.d.ts.map +0 -1
  14. package/dist/client/types.gen.js +0 -3
  15. package/dist/client/types.gen.js.map +0 -1
  16. package/dist/client/utils.gen.d.ts +0 -34
  17. package/dist/client/utils.gen.d.ts.map +0 -1
  18. package/dist/client/utils.gen.js +0 -232
  19. package/dist/client/utils.gen.js.map +0 -1
  20. package/dist/client.gen.d.ts +0 -13
  21. package/dist/client.gen.d.ts.map +0 -1
  22. package/dist/client.gen.js +0 -4
  23. package/dist/client.gen.js.map +0 -1
  24. package/dist/core/auth.gen.d.ts +0 -19
  25. package/dist/core/auth.gen.d.ts.map +0 -1
  26. package/dist/core/auth.gen.js +0 -15
  27. package/dist/core/auth.gen.js.map +0 -1
  28. package/dist/core/bodySerializer.gen.d.ts +0 -26
  29. package/dist/core/bodySerializer.gen.d.ts.map +0 -1
  30. package/dist/core/bodySerializer.gen.js +0 -58
  31. package/dist/core/bodySerializer.gen.js.map +0 -1
  32. package/dist/core/params.gen.d.ts +0 -44
  33. package/dist/core/params.gen.d.ts.map +0 -1
  34. package/dist/core/params.gen.js +0 -101
  35. package/dist/core/params.gen.js.map +0 -1
  36. package/dist/core/pathSerializer.gen.d.ts +0 -34
  37. package/dist/core/pathSerializer.gen.d.ts.map +0 -1
  38. package/dist/core/pathSerializer.gen.js +0 -115
  39. package/dist/core/pathSerializer.gen.js.map +0 -1
  40. package/dist/core/queryKeySerializer.gen.d.ts +0 -19
  41. package/dist/core/queryKeySerializer.gen.d.ts.map +0 -1
  42. package/dist/core/queryKeySerializer.gen.js +0 -100
  43. package/dist/core/queryKeySerializer.gen.js.map +0 -1
  44. package/dist/core/serverSentEvents.gen.d.ts +0 -72
  45. package/dist/core/serverSentEvents.gen.d.ts.map +0 -1
  46. package/dist/core/serverSentEvents.gen.js +0 -136
  47. package/dist/core/serverSentEvents.gen.js.map +0 -1
  48. package/dist/core/types.gen.d.ts +0 -79
  49. package/dist/core/types.gen.d.ts.map +0 -1
  50. package/dist/core/types.gen.js +0 -3
  51. package/dist/core/types.gen.js.map +0 -1
  52. package/dist/core/utils.gen.d.ts +0 -20
  53. package/dist/core/utils.gen.d.ts.map +0 -1
  54. package/dist/core/utils.gen.js +0 -88
  55. package/dist/core/utils.gen.js.map +0 -1
  56. package/dist/index.d.ts +0 -4
  57. package/dist/index.d.ts.map +0 -1
  58. package/dist/index.js +0 -4
  59. package/dist/index.js.map +0 -1
  60. package/dist/sdk.gen.d.ts +0 -28
  61. package/dist/sdk.gen.d.ts.map +0 -1
  62. package/dist/sdk.gen.js +0 -77
  63. package/dist/sdk.gen.js.map +0 -1
  64. package/dist/types.gen.d.ts +0 -458
  65. package/dist/types.gen.d.ts.map +0 -1
  66. package/dist/types.gen.js +0 -3
  67. package/dist/types.gen.js.map +0 -1
@@ -1,88 +0,0 @@
1
- // This file is auto-generated by @hey-api/openapi-ts
2
- import { serializeArrayParam, serializeObjectParam, serializePrimitiveParam, } from "./pathSerializer.gen.js";
3
- export const PATH_PARAM_RE = /\{[^{}]+\}/g;
4
- export const defaultPathSerializer = ({ path, url: _url }) => {
5
- let url = _url;
6
- const matches = _url.match(PATH_PARAM_RE);
7
- if (matches) {
8
- for (const match of matches) {
9
- let explode = false;
10
- let name = match.substring(1, match.length - 1);
11
- let style = 'simple';
12
- if (name.endsWith('*')) {
13
- explode = true;
14
- name = name.substring(0, name.length - 1);
15
- }
16
- if (name.startsWith('.')) {
17
- name = name.substring(1);
18
- style = 'label';
19
- }
20
- else if (name.startsWith(';')) {
21
- name = name.substring(1);
22
- style = 'matrix';
23
- }
24
- const value = path[name];
25
- if (value === undefined || value === null) {
26
- continue;
27
- }
28
- if (Array.isArray(value)) {
29
- url = url.replace(match, serializeArrayParam({ explode, name, style, value }));
30
- continue;
31
- }
32
- if (typeof value === 'object') {
33
- url = url.replace(match, serializeObjectParam({
34
- explode,
35
- name,
36
- style,
37
- value: value,
38
- valueOnly: true,
39
- }));
40
- continue;
41
- }
42
- if (style === 'matrix') {
43
- url = url.replace(match, `;${serializePrimitiveParam({
44
- name,
45
- value: value,
46
- })}`);
47
- continue;
48
- }
49
- const replaceValue = encodeURIComponent(style === 'label' ? `.${value}` : value);
50
- url = url.replace(match, replaceValue);
51
- }
52
- }
53
- return url;
54
- };
55
- export const getUrl = ({ baseUrl, path, query, querySerializer, url: _url, }) => {
56
- const pathUrl = _url.startsWith('/') ? _url : `/${_url}`;
57
- let url = (baseUrl ?? '') + pathUrl;
58
- if (path) {
59
- url = defaultPathSerializer({ path, url });
60
- }
61
- let search = query ? querySerializer(query) : '';
62
- if (search.startsWith('?')) {
63
- search = search.substring(1);
64
- }
65
- if (search) {
66
- url += `?${search}`;
67
- }
68
- return url;
69
- };
70
- export function getValidRequestBody(options) {
71
- const hasBody = options.body !== undefined;
72
- const isSerializedBody = hasBody && options.bodySerializer;
73
- if (isSerializedBody) {
74
- if ('serializedBody' in options) {
75
- const hasSerializedBody = options.serializedBody !== undefined && options.serializedBody !== '';
76
- return hasSerializedBody ? options.serializedBody : null;
77
- }
78
- // not all clients implement a serializedBody property (i.e. client-axios)
79
- return options.body !== '' ? options.body : null;
80
- }
81
- // plain/text body
82
- if (hasBody) {
83
- return options.body;
84
- }
85
- // no body was provided
86
- return undefined;
87
- }
88
- //# sourceMappingURL=utils.gen.js.map
@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AED,kBAAkB;IAClB,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,OAAO,CAAC,IAAI,CAAC;IACtB,CAAC;IAED,uBAAuB;IACvB,OAAO,SAAS,CAAC;AACnB,CAAC"}
package/dist/index.d.ts DELETED
@@ -1,4 +0,0 @@
1
- export type * from './types.gen.ts';
2
- export * from './client.gen.ts';
3
- export * from './sdk.gen.ts';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,mBAAmB,gBAAgB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC"}
package/dist/index.js DELETED
@@ -1,4 +0,0 @@
1
- // This file is auto-generated by @hey-api/openapi-ts
2
- export * from "./client.gen.js";
3
- export * from "./sdk.gen.js";
4
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qDAAqD;AAGrD,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC"}
package/dist/sdk.gen.d.ts DELETED
@@ -1,28 +0,0 @@
1
- import type { Client, Options as Options2, TDataShape } from './client/index.ts';
2
- import type { CancelScheduledUpdateByDazlIdData, CancelScheduledUpdateByDazlIdErrors, CancelScheduledUpdateByDazlIdResponses, CreateCustomerPortalSessionData, CreateCustomerPortalSessionErrors, CreateCustomerPortalSessionResponses, CreateCustomerWithDefaultSubscriptionData, CreateCustomerWithDefaultSubscriptionErrors, CreateCustomerWithDefaultSubscriptionResponses, GetAllProductsData, GetAllProductsErrors, GetAllProductsResponses, GetBalanceByDazlIdData, GetBalanceByDazlIdErrors, GetBalanceByDazlIdResponses, GetCustomerInfoByDazlIdData, GetCustomerInfoByDazlIdErrors, GetCustomerInfoByDazlIdResponses, GetHasSufficientCreditsByDazlIdData, GetHasSufficientCreditsByDazlIdErrors, GetHasSufficientCreditsByDazlIdResponses, GetMaxCreditsForDefaultFreeData, GetMaxCreditsForDefaultFreeResponses, GetPriceByPriceIdData, GetPriceByPriceIdErrors, GetPriceByPriceIdResponses, UpdateUserSubscriptionData, UpdateUserSubscriptionErrors, UpdateUserSubscriptionResponses } from './types.gen.ts';
3
- export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {
4
- /**
5
- * You can provide a client instance returned by `createClient()` instead of
6
- * individual options. This might be also useful if you want to implement a
7
- * custom client.
8
- */
9
- client?: Client;
10
- /**
11
- * You can pass arbitrary values through the `meta` object. This can be
12
- * used to access values that aren't defined as part of the SDK function.
13
- */
14
- meta?: Record<string, unknown>;
15
- };
16
- export declare class Billing {
17
- static getBalanceByDazlId<ThrowOnError extends boolean = false>(options: Options<GetBalanceByDazlIdData, ThrowOnError>): import("./client/types.gen.ts").RequestResult<GetBalanceByDazlIdResponses, GetBalanceByDazlIdErrors, ThrowOnError, "fields">;
18
- static getHasSufficientCreditsByDazlId<ThrowOnError extends boolean = false>(options: Options<GetHasSufficientCreditsByDazlIdData, ThrowOnError>): import("./client/types.gen.ts").RequestResult<GetHasSufficientCreditsByDazlIdResponses, GetHasSufficientCreditsByDazlIdErrors, ThrowOnError, "fields">;
19
- static getAllProducts<ThrowOnError extends boolean = false>(options?: Options<GetAllProductsData, ThrowOnError>): import("./client/types.gen.ts").RequestResult<GetAllProductsResponses, GetAllProductsErrors, ThrowOnError, "fields">;
20
- static getPriceByPriceId<ThrowOnError extends boolean = false>(options: Options<GetPriceByPriceIdData, ThrowOnError>): import("./client/types.gen.ts").RequestResult<GetPriceByPriceIdResponses, GetPriceByPriceIdErrors, ThrowOnError, "fields">;
21
- static getMaxCreditsForDefaultFree<ThrowOnError extends boolean = false>(options?: Options<GetMaxCreditsForDefaultFreeData, ThrowOnError>): import("./client/types.gen.ts").RequestResult<GetMaxCreditsForDefaultFreeResponses, unknown, ThrowOnError, "fields">;
22
- static getCustomerInfoByDazlId<ThrowOnError extends boolean = false>(options: Options<GetCustomerInfoByDazlIdData, ThrowOnError>): import("./client/types.gen.ts").RequestResult<GetCustomerInfoByDazlIdResponses, GetCustomerInfoByDazlIdErrors, ThrowOnError, "fields">;
23
- static updateUserSubscription<ThrowOnError extends boolean = false>(options: Options<UpdateUserSubscriptionData, ThrowOnError>): import("./client/types.gen.ts").RequestResult<UpdateUserSubscriptionResponses, UpdateUserSubscriptionErrors, ThrowOnError, "fields">;
24
- static cancelScheduledUpdateByDazlId<ThrowOnError extends boolean = false>(options: Options<CancelScheduledUpdateByDazlIdData, ThrowOnError>): import("./client/types.gen.ts").RequestResult<CancelScheduledUpdateByDazlIdResponses, CancelScheduledUpdateByDazlIdErrors, ThrowOnError, "fields">;
25
- static createCustomerPortalSession<ThrowOnError extends boolean = false>(options: Options<CreateCustomerPortalSessionData, ThrowOnError>): import("./client/types.gen.ts").RequestResult<CreateCustomerPortalSessionResponses, CreateCustomerPortalSessionErrors, ThrowOnError, "fields">;
26
- static createCustomerWithDefaultSubscription<ThrowOnError extends boolean = false>(options: Options<CreateCustomerWithDefaultSubscriptionData, ThrowOnError>): import("./client/types.gen.ts").RequestResult<CreateCustomerWithDefaultSubscriptionResponses, CreateCustomerWithDefaultSubscriptionErrors, ThrowOnError, "fields">;
27
- }
28
- //# sourceMappingURL=sdk.gen.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sdk.gen.d.ts","sourceRoot":"","sources":["../src/sdk.gen.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,IAAI,QAAQ,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACjF,OAAO,KAAK,EAAE,iCAAiC,EAAE,mCAAmC,EAAE,sCAAsC,EAAE,+BAA+B,EAAE,iCAAiC,EAAE,oCAAoC,EAAE,yCAAyC,EAAE,2CAA2C,EAAE,8CAA8C,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,u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YAAY,CAAC;WAOzH,sBAAsB,CAAC,YAAY,SAAS,OAAO,GAAG,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,0BAA0B,EAAE,YAAY,CAAC;WAWvH,6BAA6B,CAAC,YAAY,SAAS,OAAO,GAAG,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,iCAAiC,EAAE,YAAY,CAAC;WAOrI,2BAA2B,CAAC,YAAY,SAAS,OAAO,GAAG,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,+BAA+B,EAAE,YAAY,CAAC;WAWjI,qCAAqC,CAAC,YAAY,SAAS,OAAO,GAAG,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,yCAAyC,EAAE,YAAY,CAAC;CAUtK"}
package/dist/sdk.gen.js DELETED
@@ -1,77 +0,0 @@
1
- // This file is auto-generated by @hey-api/openapi-ts
2
- import { client } from "./client.gen.js";
3
- export class Billing {
4
- static getBalanceByDazlId(options) {
5
- return (options.client ?? client).get({
6
- url: '/billing/balance/{dazlId}',
7
- ...options
8
- });
9
- }
10
- static getHasSufficientCreditsByDazlId(options) {
11
- return (options.client ?? client).get({
12
- url: '/billing/has-sufficient-credits/{dazlId}',
13
- ...options
14
- });
15
- }
16
- static getAllProducts(options) {
17
- return (options?.client ?? client).get({
18
- url: '/billing/prices',
19
- ...options
20
- });
21
- }
22
- static getPriceByPriceId(options) {
23
- return (options.client ?? client).get({
24
- url: '/billing/price/{priceId}',
25
- ...options
26
- });
27
- }
28
- static getMaxCreditsForDefaultFree(options) {
29
- return (options?.client ?? client).get({
30
- url: '/billing/max-credits-for-default-free',
31
- ...options
32
- });
33
- }
34
- static getCustomerInfoByDazlId(options) {
35
- return (options.client ?? client).get({
36
- url: '/billing/customer-info/{dazlId}',
37
- ...options
38
- });
39
- }
40
- static updateUserSubscription(options) {
41
- return (options.client ?? client).post({
42
- url: '/billing/update-subscription',
43
- ...options,
44
- headers: {
45
- 'Content-Type': 'application/json',
46
- ...options.headers
47
- }
48
- });
49
- }
50
- static cancelScheduledUpdateByDazlId(options) {
51
- return (options.client ?? client).post({
52
- url: '/billing/cancel-scheduled-update/{dazlId}',
53
- ...options
54
- });
55
- }
56
- static createCustomerPortalSession(options) {
57
- return (options.client ?? client).post({
58
- url: '/billing/create-portal-session',
59
- ...options,
60
- headers: {
61
- 'Content-Type': 'application/json',
62
- ...options.headers
63
- }
64
- });
65
- }
66
- static createCustomerWithDefaultSubscription(options) {
67
- return (options.client ?? client).put({
68
- url: '/billing/create-customer-with-default-subscription',
69
- ...options,
70
- headers: {
71
- 'Content-Type': 'application/json',
72
- ...options.headers
73
- }
74
- });
75
- }
76
- }
77
- //# sourceMappingURL=sdk.gen.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sdk.gen.js","sourceRoot":"","sources":["../src/sdk.gen.ts"],"names":[],"mappings":"AAAA,qDAAqD;AAErD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAkBzC,MAAM,OAAO,OAAO;IACT,MAAM,CAAC,kBAAkB,CAAuC,OAAsD;QACzH,OAAO,CAAC,OAAO,CAAC,MAAM,IAAI,MAAM,CAAC,CAAC,GAAG,CAAsE;YACvG,GAAG,EAAE,2BAA2B;YAChC,GAAG,OAAO;SACb,CAAC,CAAC;IACP,CAAC;IAEM,MAAM,CAAC,+BAA+B,CAAuC,OAAmE;QACnJ,OAAO,CAAC,OAAO,CAAC,MAAM,IAAI,MAAM,CAAC,CAAC,GAAG,CAAgG;YACjI,GAAG,EAAE,0CAA0C;YAC/C,GAAG,OAAO;SACb,CAAC,CAAC;IACP,CAAC;IAEM,MAAM,CAAC,cAAc,CAAuC,OAAmD;QAClH,OAAO,CAAC,OAAO,EAAE,MAAM,IAAI,MAAM,CAAC,CAAC,GAAG,CAA8D;YAChG,GAAG,EAAE,iBAAiB;YACtB,GAAG,OAAO;SACb,CAAC,CAAC;IACP,CAAC;IAEM,MAAM,CAAC,iBAAiB,CAAuC,OAAqD;QACvH,OAAO,CAAC,OAAO,CAA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M,CAAC,qCAAqC,CAAuC,OAAyE;QAC/J,OAAO,CAAC,OAAO,CAAC,MAAM,IAAI,MAAM,CAAC,CAAC,GAAG,CAA4G;YAC7I,GAAG,EAAE,oDAAoD;YACzD,GAAG,OAAO;YACV,OAAO,EAAE;gBACL,cAAc,EAAE,kBAAkB;gBAClC,GAAG,OAAO,CAAC,OAAO;aACrB;SACJ,CAAC,CAAC;IACP,CAAC;CACJ"}
@@ -1,458 +0,0 @@
1
- export type ClientOptions = {
2
- baseUrl: `${string}://${string}` | (string & {});
3
- };
4
- export type BillingPrice = {
5
- credits: number;
6
- priceCents: number;
7
- priceId: string;
8
- productId: string;
9
- lookup_key: string | null;
10
- isDefaultFree: boolean;
11
- };
12
- export type StripeProduct = {
13
- id: string;
14
- name: string;
15
- description: string | null;
16
- active: boolean;
17
- created: number;
18
- updated: number;
19
- images: Array<string>;
20
- livemode: boolean;
21
- default_price?: string | null;
22
- marketing_features: Array<{
23
- name?: string;
24
- }>;
25
- metadata: {
26
- [key: string]: string;
27
- };
28
- object: 'product';
29
- package_dimensions: null;
30
- shippable: null;
31
- tax_code: null;
32
- type: 'service';
33
- url: string | null;
34
- };
35
- export type ScheduledUpdate = {
36
- type: 'downgrade';
37
- scheduleId: string;
38
- targetPriceId: string;
39
- updateTime: number;
40
- } | {
41
- type: 'cancel';
42
- updateTime: number;
43
- };
44
- export type GetBalanceByDazlIdData = {
45
- body?: never;
46
- path: {
47
- dazlId: string;
48
- };
49
- query?: never;
50
- url: '/billing/balance/{dazlId}';
51
- };
52
- export type GetBalanceByDazlIdErrors = {
53
- /**
54
- * Bad request - Invalid parameters or malformed JSON
55
- */
56
- 400: {
57
- message: string;
58
- issues: string;
59
- };
60
- /**
61
- * Unauthorized
62
- */
63
- 401: {
64
- message: string;
65
- };
66
- /**
67
- * Internal server error
68
- */
69
- 500: {
70
- message: string;
71
- };
72
- };
73
- export type GetBalanceByDazlIdError = GetBalanceByDazlIdErrors[keyof GetBalanceByDazlIdErrors];
74
- export type GetBalanceByDazlIdResponses = {
75
- /**
76
- * Returns user credit balance
77
- */
78
- 200: {
79
- balance: number;
80
- productId?: string;
81
- priceId?: string;
82
- isSubscriptionFree?: boolean;
83
- };
84
- };
85
- export type GetBalanceByDazlIdResponse = GetBalanceByDazlIdResponses[keyof GetBalanceByDazlIdResponses];
86
- export type GetHasSufficientCreditsByDazlIdData = {
87
- body?: never;
88
- path: {
89
- dazlId: string;
90
- };
91
- query?: never;
92
- url: '/billing/has-sufficient-credits/{dazlId}';
93
- };
94
- export type GetHasSufficientCreditsByDazlIdErrors = {
95
- /**
96
- * Bad request - Invalid parameters or malformed JSON
97
- */
98
- 400: {
99
- message: string;
100
- issues: string;
101
- };
102
- /**
103
- * Unauthorized
104
- */
105
- 401: {
106
- message: string;
107
- };
108
- /**
109
- * Internal server error
110
- */
111
- 500: {
112
- message: string;
113
- };
114
- };
115
- export type GetHasSufficientCreditsByDazlIdError = GetHasSufficientCreditsByDazlIdErrors[keyof GetHasSufficientCreditsByDazlIdErrors];
116
- export type GetHasSufficientCreditsByDazlIdResponses = {
117
- /**
118
- * Returns whether user has sufficient credits
119
- */
120
- 200: {
121
- hasSufficientCredits: boolean;
122
- };
123
- };
124
- export type GetHasSufficientCreditsByDazlIdResponse = GetHasSufficientCreditsByDazlIdResponses[keyof GetHasSufficientCreditsByDazlIdResponses];
125
- export type GetAllProductsData = {
126
- body?: never;
127
- path?: never;
128
- query?: never;
129
- url: '/billing/prices';
130
- };
131
- export type GetAllProductsErrors = {
132
- /**
133
- * Bad request - Invalid parameters or malformed JSON
134
- */
135
- 400: {
136
- message: string;
137
- issues: string;
138
- };
139
- /**
140
- * Unauthorized
141
- */
142
- 401: {
143
- message: string;
144
- };
145
- /**
146
- * Internal server error
147
- */
148
- 500: {
149
- message: string;
150
- };
151
- };
152
- export type GetAllProductsError = GetAllProductsErrors[keyof GetAllProductsErrors];
153
- export type GetAllProductsResponses = {
154
- /**
155
- * Returns all available products and prices
156
- */
157
- 200: {
158
- [key: string]: {
159
- prices: Array<BillingPrice>;
160
- product: StripeProduct;
161
- isDefaultFree?: boolean;
162
- };
163
- };
164
- };
165
- export type GetAllProductsResponse = GetAllProductsResponses[keyof GetAllProductsResponses];
166
- export type GetPriceByPriceIdData = {
167
- body?: never;
168
- path: {
169
- priceId: string;
170
- };
171
- query?: never;
172
- url: '/billing/price/{priceId}';
173
- };
174
- export type GetPriceByPriceIdErrors = {
175
- /**
176
- * Bad request - Invalid parameters or malformed JSON
177
- */
178
- 400: {
179
- message: string;
180
- issues: string;
181
- };
182
- /**
183
- * Unauthorized
184
- */
185
- 401: {
186
- message: string;
187
- };
188
- /**
189
- * Internal server error
190
- */
191
- 500: {
192
- message: string;
193
- };
194
- };
195
- export type GetPriceByPriceIdError = GetPriceByPriceIdErrors[keyof GetPriceByPriceIdErrors];
196
- export type GetPriceByPriceIdResponses = {
197
- /**
198
- * Returns price details
199
- */
200
- 200: {
201
- credits: number;
202
- priceCents: number;
203
- priceId: string;
204
- productId: string;
205
- lookup_key: string | null;
206
- isDefaultFree: boolean;
207
- };
208
- };
209
- export type GetPriceByPriceIdResponse = GetPriceByPriceIdResponses[keyof GetPriceByPriceIdResponses];
210
- export type GetMaxCreditsForDefaultFreeData = {
211
- body?: never;
212
- path?: never;
213
- query?: never;
214
- url: '/billing/max-credits-for-default-free';
215
- };
216
- export type GetMaxCreditsForDefaultFreeResponses = {
217
- /**
218
- * Returns maximum credits for free tier
219
- */
220
- 200: {
221
- maxCreditsForDefaultFree: number;
222
- };
223
- };
224
- export type GetMaxCreditsForDefaultFreeResponse = GetMaxCreditsForDefaultFreeResponses[keyof GetMaxCreditsForDefaultFreeResponses];
225
- export type GetCustomerInfoByDazlIdData = {
226
- body?: never;
227
- path: {
228
- dazlId: string;
229
- };
230
- query?: never;
231
- url: '/billing/customer-info/{dazlId}';
232
- };
233
- export type GetCustomerInfoByDazlIdErrors = {
234
- /**
235
- * Bad request - Invalid parameters or malformed JSON
236
- */
237
- 400: {
238
- message: string;
239
- issues: string;
240
- };
241
- /**
242
- * Unauthorized
243
- */
244
- 401: {
245
- message: string;
246
- };
247
- /**
248
- * Internal server error
249
- */
250
- 500: {
251
- message: string;
252
- };
253
- };
254
- export type GetCustomerInfoByDazlIdError = GetCustomerInfoByDazlIdErrors[keyof GetCustomerInfoByDazlIdErrors];
255
- export type GetCustomerInfoByDazlIdResponses = {
256
- /**
257
- * Returns customer subscription information
258
- */
259
- 200: {
260
- productId: string;
261
- credits: number;
262
- isDefaultFree: boolean;
263
- priceId: string;
264
- subscriptionItemId: string;
265
- subscriptionId: string;
266
- currentCycle: {
267
- start: number;
268
- end: number;
269
- };
270
- scheduledUpdate?: ScheduledUpdate;
271
- defaultFreePriceId?: string;
272
- customerId: string;
273
- hasEarlyAccessCoupon: boolean;
274
- };
275
- };
276
- export type GetCustomerInfoByDazlIdResponse = GetCustomerInfoByDazlIdResponses[keyof GetCustomerInfoByDazlIdResponses];
277
- export type UpdateUserSubscriptionData = {
278
- body: {
279
- dazlId: string;
280
- targetPriceId: string;
281
- successUrl: string;
282
- cancelUrl: string;
283
- };
284
- path?: never;
285
- query?: never;
286
- url: '/billing/update-subscription';
287
- };
288
- export type UpdateUserSubscriptionErrors = {
289
- /**
290
- * Bad request - Invalid parameters or malformed JSON
291
- */
292
- 400: {
293
- message: string;
294
- issues: string;
295
- };
296
- /**
297
- * Unauthorized
298
- */
299
- 401: {
300
- message: string;
301
- };
302
- /**
303
- * Internal server error
304
- */
305
- 500: {
306
- message: string;
307
- };
308
- };
309
- export type UpdateUserSubscriptionError = UpdateUserSubscriptionErrors[keyof UpdateUserSubscriptionErrors];
310
- export type UpdateUserSubscriptionResponses = {
311
- /**
312
- * Returns updated subscription details
313
- */
314
- 200: {
315
- type: 'checkout';
316
- session: string;
317
- } | {
318
- type: 'update';
319
- newPrice: {
320
- credits: number;
321
- priceCents: number;
322
- priceId: string;
323
- productId: string;
324
- lookup_key: string | null;
325
- isDefaultFree: boolean;
326
- };
327
- } | {
328
- type: 'cancel';
329
- };
330
- };
331
- export type UpdateUserSubscriptionResponse = UpdateUserSubscriptionResponses[keyof UpdateUserSubscriptionResponses];
332
- export type CancelScheduledUpdateByDazlIdData = {
333
- body?: never;
334
- path: {
335
- dazlId: string;
336
- };
337
- query?: never;
338
- url: '/billing/cancel-scheduled-update/{dazlId}';
339
- };
340
- export type CancelScheduledUpdateByDazlIdErrors = {
341
- /**
342
- * Bad request - Invalid parameters or malformed JSON
343
- */
344
- 400: {
345
- message: string;
346
- issues: string;
347
- };
348
- /**
349
- * Unauthorized
350
- */
351
- 401: {
352
- message: string;
353
- };
354
- /**
355
- * Internal server error
356
- */
357
- 500: {
358
- message: string;
359
- };
360
- };
361
- export type CancelScheduledUpdateByDazlIdError = CancelScheduledUpdateByDazlIdErrors[keyof CancelScheduledUpdateByDazlIdErrors];
362
- export type CancelScheduledUpdateByDazlIdResponses = {
363
- /**
364
- * Returns cancellation status
365
- */
366
- 200: {
367
- success: boolean;
368
- };
369
- };
370
- export type CancelScheduledUpdateByDazlIdResponse = CancelScheduledUpdateByDazlIdResponses[keyof CancelScheduledUpdateByDazlIdResponses];
371
- export type CreateCustomerPortalSessionData = {
372
- body: {
373
- dazlId: string;
374
- returnUrl?: string;
375
- };
376
- path?: never;
377
- query?: never;
378
- url: '/billing/create-portal-session';
379
- };
380
- export type CreateCustomerPortalSessionErrors = {
381
- /**
382
- * Bad request - Invalid parameters or malformed JSON
383
- */
384
- 400: {
385
- message: string;
386
- issues: string;
387
- };
388
- /**
389
- * Unauthorized
390
- */
391
- 401: {
392
- message: string;
393
- };
394
- /**
395
- * Internal server error
396
- */
397
- 500: {
398
- message: string;
399
- };
400
- };
401
- export type CreateCustomerPortalSessionError = CreateCustomerPortalSessionErrors[keyof CreateCustomerPortalSessionErrors];
402
- export type CreateCustomerPortalSessionResponses = {
403
- /**
404
- * Returns billing portal session URL
405
- */
406
- 200: {
407
- url: string;
408
- };
409
- };
410
- export type CreateCustomerPortalSessionResponse = CreateCustomerPortalSessionResponses[keyof CreateCustomerPortalSessionResponses];
411
- export type CreateCustomerWithDefaultSubscriptionData = {
412
- body: {
413
- email: string;
414
- name?: string;
415
- customerOptions?: {
416
- idempotencyKey: string;
417
- };
418
- subscriptionOptions?: {
419
- idempotencyKey: string;
420
- };
421
- };
422
- path?: never;
423
- query?: never;
424
- url: '/billing/create-customer-with-default-subscription';
425
- };
426
- export type CreateCustomerWithDefaultSubscriptionErrors = {
427
- /**
428
- * Bad request - Invalid parameters or malformed JSON
429
- */
430
- 400: {
431
- message: string;
432
- issues: string;
433
- };
434
- /**
435
- * Unauthorized
436
- */
437
- 401: {
438
- message: string;
439
- };
440
- /**
441
- * Internal server error
442
- */
443
- 500: {
444
- message: string;
445
- };
446
- };
447
- export type CreateCustomerWithDefaultSubscriptionError = CreateCustomerWithDefaultSubscriptionErrors[keyof CreateCustomerWithDefaultSubscriptionErrors];
448
- export type CreateCustomerWithDefaultSubscriptionResponses = {
449
- /**
450
- * Returns created customer ID
451
- */
452
- 200: {
453
- customerId: string;
454
- noStripe: boolean;
455
- };
456
- };
457
- export type CreateCustomerWithDefaultSubscriptionResponse = CreateCustomerWithDefaultSubscriptionResponses[keyof CreateCustomerWithDefaultSubscriptionResponses];
458
- //# sourceMappingURL=types.gen.d.ts.map