@maesn/typescript-sdk 0.8.28 → 0.8.30

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 (112) hide show
  1. package/README.md +5 -10
  2. package/esm/funcs/{events-handle-callback.d.ts → accounting-book-payment.d.ts} +3 -2
  3. package/esm/funcs/accounting-book-payment.d.ts.map +1 -0
  4. package/esm/funcs/{events-handle-callback.js → accounting-book-payment.js} +14 -8
  5. package/esm/funcs/accounting-book-payment.js.map +1 -0
  6. package/esm/funcs/accounting-get-projects-async.js +5 -1
  7. package/esm/funcs/accounting-get-projects-async.js.map +1 -1
  8. package/esm/funcs/{events-get-code.d.ts → auth-validate-connection.d.ts} +2 -2
  9. package/esm/funcs/auth-validate-connection.d.ts.map +1 -0
  10. package/esm/funcs/{events-get-code.js → auth-validate-connection.js} +8 -14
  11. package/esm/funcs/auth-validate-connection.js.map +1 -0
  12. package/esm/lib/config.d.ts +3 -3
  13. package/esm/lib/config.js +3 -3
  14. package/esm/lib/env.d.ts.map +1 -1
  15. package/esm/lib/env.js +4 -1
  16. package/esm/lib/env.js.map +1 -1
  17. package/esm/models/connection-validation-response-dto.d.ts +17 -0
  18. package/esm/models/connection-validation-response-dto.d.ts.map +1 -0
  19. package/esm/models/connection-validation-response-dto.js +15 -0
  20. package/esm/models/connection-validation-response-dto.js.map +1 -0
  21. package/esm/models/index.d.ts +2 -0
  22. package/esm/models/index.d.ts.map +1 -1
  23. package/esm/models/index.js +2 -0
  24. package/esm/models/index.js.map +1 -1
  25. package/esm/models/invoice-response-dto.d.ts +1 -0
  26. package/esm/models/invoice-response-dto.d.ts.map +1 -1
  27. package/esm/models/invoice-response-dto.js +1 -0
  28. package/esm/models/invoice-response-dto.js.map +1 -1
  29. package/esm/models/operations/book-payment.d.ts +36 -0
  30. package/esm/models/operations/book-payment.d.ts.map +1 -0
  31. package/esm/models/operations/book-payment.js +16 -0
  32. package/esm/models/operations/book-payment.js.map +1 -0
  33. package/esm/models/operations/get-projects-async.d.ts +5 -0
  34. package/esm/models/operations/get-projects-async.d.ts.map +1 -1
  35. package/esm/models/operations/get-projects-async.js +1 -0
  36. package/esm/models/operations/get-projects-async.js.map +1 -1
  37. package/esm/models/operations/index.d.ts +2 -3
  38. package/esm/models/operations/index.d.ts.map +1 -1
  39. package/esm/models/operations/index.js +2 -3
  40. package/esm/models/operations/index.js.map +1 -1
  41. package/esm/models/operations/validate-connection.d.ts +64 -0
  42. package/esm/models/operations/validate-connection.d.ts.map +1 -0
  43. package/esm/models/operations/validate-connection.js +55 -0
  44. package/esm/models/operations/validate-connection.js.map +1 -0
  45. package/esm/models/submission-page-input-texts-dto.d.ts +30 -0
  46. package/esm/models/submission-page-input-texts-dto.d.ts.map +1 -0
  47. package/esm/models/submission-page-input-texts-dto.js +21 -0
  48. package/esm/models/submission-page-input-texts-dto.js.map +1 -0
  49. package/esm/models/submission-page-localization-dto.d.ts +5 -0
  50. package/esm/models/submission-page-localization-dto.d.ts.map +1 -1
  51. package/esm/models/submission-page-localization-dto.js +3 -0
  52. package/esm/models/submission-page-localization-dto.js.map +1 -1
  53. package/esm/sdk/accounting.d.ts +1 -0
  54. package/esm/sdk/accounting.d.ts.map +1 -1
  55. package/esm/sdk/accounting.js +4 -0
  56. package/esm/sdk/accounting.js.map +1 -1
  57. package/esm/sdk/auth.d.ts +1 -0
  58. package/esm/sdk/auth.d.ts.map +1 -1
  59. package/esm/sdk/auth.js +4 -0
  60. package/esm/sdk/auth.js.map +1 -1
  61. package/esm/sdk/sdk.d.ts +0 -3
  62. package/esm/sdk/sdk.d.ts.map +1 -1
  63. package/esm/sdk/sdk.js +0 -5
  64. package/esm/sdk/sdk.js.map +1 -1
  65. package/jsr.json +1 -1
  66. package/package.json +2 -2
  67. package/src/funcs/{events-handle-configuration-callback.ts → accounting-book-payment.ts} +19 -16
  68. package/src/funcs/accounting-get-projects-async.ts +6 -1
  69. package/src/funcs/{events-get-code.ts → auth-validate-connection.ts} +16 -18
  70. package/src/lib/config.ts +3 -3
  71. package/src/lib/env.ts +7 -1
  72. package/src/models/connection-validation-response-dto.ts +39 -0
  73. package/src/models/index.ts +2 -0
  74. package/src/models/invoice-response-dto.ts +2 -0
  75. package/src/models/operations/book-payment.ts +59 -0
  76. package/src/models/operations/get-projects-async.ts +6 -0
  77. package/src/models/operations/index.ts +2 -3
  78. package/src/models/operations/validate-connection.ts +178 -0
  79. package/src/models/submission-page-input-texts-dto.ts +59 -0
  80. package/src/models/submission-page-localization-dto.ts +11 -0
  81. package/src/sdk/accounting.ts +12 -0
  82. package/src/sdk/auth.ts +12 -0
  83. package/src/sdk/sdk.ts +0 -6
  84. package/esm/funcs/events-get-code.d.ts.map +0 -1
  85. package/esm/funcs/events-get-code.js.map +0 -1
  86. package/esm/funcs/events-handle-callback.d.ts.map +0 -1
  87. package/esm/funcs/events-handle-callback.js.map +0 -1
  88. package/esm/funcs/events-handle-configuration-callback.d.ts +0 -11
  89. package/esm/funcs/events-handle-configuration-callback.d.ts.map +0 -1
  90. package/esm/funcs/events-handle-configuration-callback.js +0 -76
  91. package/esm/funcs/events-handle-configuration-callback.js.map +0 -1
  92. package/esm/models/operations/get-code.d.ts +0 -35
  93. package/esm/models/operations/get-code.d.ts.map +0 -1
  94. package/esm/models/operations/get-code.js +0 -20
  95. package/esm/models/operations/get-code.js.map +0 -1
  96. package/esm/models/operations/handle-callback.d.ts +0 -35
  97. package/esm/models/operations/handle-callback.d.ts.map +0 -1
  98. package/esm/models/operations/handle-callback.js +0 -20
  99. package/esm/models/operations/handle-callback.js.map +0 -1
  100. package/esm/models/operations/handle-configuration-callback.d.ts +0 -35
  101. package/esm/models/operations/handle-configuration-callback.d.ts.map +0 -1
  102. package/esm/models/operations/handle-configuration-callback.js +0 -20
  103. package/esm/models/operations/handle-configuration-callback.js.map +0 -1
  104. package/esm/sdk/events.d.ts +0 -8
  105. package/esm/sdk/events.d.ts.map +0 -1
  106. package/esm/sdk/events.js +0 -20
  107. package/esm/sdk/events.js.map +0 -1
  108. package/src/funcs/events-handle-callback.ts +0 -166
  109. package/src/models/operations/get-code.ts +0 -67
  110. package/src/models/operations/handle-callback.ts +0 -71
  111. package/src/models/operations/handle-configuration-callback.ts +0 -74
  112. package/src/sdk/events.ts +0 -45
@@ -0,0 +1,59 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+
7
+ export type BookPaymentGlobals = {
8
+ apiKey?: string | undefined;
9
+ accountKey?: string | undefined;
10
+ };
11
+
12
+ export type BookPaymentRequest = {
13
+ paymentId: string;
14
+ /**
15
+ * ID of the company (required for multi-company target systems)
16
+ */
17
+ companyId?: string | undefined;
18
+ /**
19
+ * Environment name (required for multi-environment systems such as Business Central)
20
+ */
21
+ environmentName?: string | undefined;
22
+ /**
23
+ * API key
24
+ */
25
+ apiKey?: string | undefined;
26
+ /**
27
+ * Account key
28
+ */
29
+ accountKey?: string | undefined;
30
+ };
31
+
32
+ /** @internal */
33
+ export type BookPaymentRequest$Outbound = {
34
+ paymentId: string;
35
+ companyId?: string | undefined;
36
+ environmentName?: string | undefined;
37
+ apiKey?: string | undefined;
38
+ accountKey?: string | undefined;
39
+ };
40
+
41
+ /** @internal */
42
+ export const BookPaymentRequest$outboundSchema: z.ZodMiniType<
43
+ BookPaymentRequest$Outbound,
44
+ BookPaymentRequest
45
+ > = z.object({
46
+ paymentId: z.string(),
47
+ companyId: z.optional(z.string()),
48
+ environmentName: z.optional(z.string()),
49
+ apiKey: z.optional(z.string()),
50
+ accountKey: z.optional(z.string()),
51
+ });
52
+
53
+ export function bookPaymentRequestToJSON(
54
+ bookPaymentRequest: BookPaymentRequest,
55
+ ): string {
56
+ return JSON.stringify(
57
+ BookPaymentRequest$outboundSchema.parse(bookPaymentRequest),
58
+ );
59
+ }
@@ -15,6 +15,10 @@ export type GetProjectsAsyncGlobals = {
15
15
  };
16
16
 
17
17
  export type GetProjectsAsyncRequest = {
18
+ /**
19
+ * Filter projects by exact project name
20
+ */
21
+ name?: string | undefined;
18
22
  /**
19
23
  * API key
20
24
  */
@@ -54,6 +58,7 @@ export type GetProjectsAsyncResponse = {
54
58
 
55
59
  /** @internal */
56
60
  export type GetProjectsAsyncRequest$Outbound = {
61
+ name?: string | undefined;
57
62
  apiKey?: string | undefined;
58
63
  accountKey?: string | undefined;
59
64
  };
@@ -63,6 +68,7 @@ export const GetProjectsAsyncRequest$outboundSchema: z.ZodMiniType<
63
68
  GetProjectsAsyncRequest$Outbound,
64
69
  GetProjectsAsyncRequest
65
70
  > = z.object({
71
+ name: z.optional(z.string()),
66
72
  apiKey: z.optional(z.string()),
67
73
  accountKey: z.optional(z.string()),
68
74
  });
@@ -3,6 +3,7 @@
3
3
  */
4
4
 
5
5
  export * from "./add-callback-url.js";
6
+ export * from "./book-payment.js";
6
7
  export * from "./check.js";
7
8
  export * from "./count-end-users-by-system.js";
8
9
  export * from "./create-account.js";
@@ -68,7 +69,6 @@ export * from "./get-booking-proposal-document.js";
68
69
  export * from "./get-booking-proposal.js";
69
70
  export * from "./get-booking-proposals.js";
70
71
  export * from "./get-callback-url.js";
71
- export * from "./get-code.js";
72
72
  export * from "./get-companies.js";
73
73
  export * from "./get-contact-async.js";
74
74
  export * from "./get-contact-v2.js";
@@ -151,8 +151,6 @@ export * from "./get-units.js";
151
151
  export * from "./get-user-info.js";
152
152
  export * from "./get-vendor-credits.js";
153
153
  export * from "./get-webhooks.js";
154
- export * from "./handle-callback.js";
155
- export * from "./handle-configuration-callback.js";
156
154
  export * from "./patch-contact-v2.js";
157
155
  export * from "./patch-contact.js";
158
156
  export * from "./patch-customers.js";
@@ -179,3 +177,4 @@ export * from "./update-journal-entry.js";
179
177
  export * from "./update-submission-page-style.js";
180
178
  export * from "./update-supplier.js";
181
179
  export * from "./update-vendor-credit.js";
180
+ export * from "./validate-connection.js";
@@ -0,0 +1,178 @@
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 * as types from "../../types/primitives.js";
9
+ import { SDKValidationError } from "../errors/sdk-validation-error.js";
10
+ import * as models from "../index.js";
11
+
12
+ export type ValidateConnectionGlobals = {
13
+ apiKey?: string | undefined;
14
+ accountKey?: string | undefined;
15
+ };
16
+
17
+ export type ValidateConnectionRequest = {
18
+ /**
19
+ * API key
20
+ */
21
+ apiKey?: string | undefined;
22
+ /**
23
+ * Account key
24
+ */
25
+ accountKey?: string | undefined;
26
+ };
27
+
28
+ export type ValidateConnectionPagination = {
29
+ total: number;
30
+ perPage: number;
31
+ currentPage: number;
32
+ totalPages: number;
33
+ };
34
+
35
+ export type ValidateConnectionMeta = {
36
+ warnings?: Array<string> | null | undefined;
37
+ pagination?: ValidateConnectionPagination | null | undefined;
38
+ partialErrors?: Array<models.PartialError> | null | undefined;
39
+ };
40
+
41
+ export type ValidateConnectionErrors = {};
42
+
43
+ export type ValidateConnectionRawData = {};
44
+
45
+ /**
46
+ * Validates the connection for the authenticated end user
47
+ */
48
+ export type ValidateConnectionResponse = {
49
+ meta?: ValidateConnectionMeta | null | undefined;
50
+ data: models.ConnectionValidationResponseDto;
51
+ errors: ValidateConnectionErrors | null;
52
+ rawData: ValidateConnectionRawData | null;
53
+ };
54
+
55
+ /** @internal */
56
+ export type ValidateConnectionRequest$Outbound = {
57
+ apiKey?: string | undefined;
58
+ accountKey?: string | undefined;
59
+ };
60
+
61
+ /** @internal */
62
+ export const ValidateConnectionRequest$outboundSchema: z.ZodMiniType<
63
+ ValidateConnectionRequest$Outbound,
64
+ ValidateConnectionRequest
65
+ > = z.object({
66
+ apiKey: z.optional(z.string()),
67
+ accountKey: z.optional(z.string()),
68
+ });
69
+
70
+ export function validateConnectionRequestToJSON(
71
+ validateConnectionRequest: ValidateConnectionRequest,
72
+ ): string {
73
+ return JSON.stringify(
74
+ ValidateConnectionRequest$outboundSchema.parse(validateConnectionRequest),
75
+ );
76
+ }
77
+
78
+ /** @internal */
79
+ export const ValidateConnectionPagination$inboundSchema: z.ZodMiniType<
80
+ ValidateConnectionPagination,
81
+ unknown
82
+ > = z.object({
83
+ total: types.number(),
84
+ perPage: types.number(),
85
+ currentPage: types.number(),
86
+ totalPages: types.number(),
87
+ });
88
+
89
+ export function validateConnectionPaginationFromJSON(
90
+ jsonString: string,
91
+ ): SafeParseResult<ValidateConnectionPagination, SDKValidationError> {
92
+ return safeParse(
93
+ jsonString,
94
+ (x) => ValidateConnectionPagination$inboundSchema.parse(JSON.parse(x)),
95
+ `Failed to parse 'ValidateConnectionPagination' from JSON`,
96
+ );
97
+ }
98
+
99
+ /** @internal */
100
+ export const ValidateConnectionMeta$inboundSchema: z.ZodMiniType<
101
+ ValidateConnectionMeta,
102
+ unknown
103
+ > = z.object({
104
+ warnings: z.optional(z.nullable(z.array(types.string()))),
105
+ pagination: z.optional(
106
+ z.nullable(z.lazy(() => ValidateConnectionPagination$inboundSchema)),
107
+ ),
108
+ partialErrors: z.optional(
109
+ z.nullable(z.array(models.PartialError$inboundSchema)),
110
+ ),
111
+ });
112
+
113
+ export function validateConnectionMetaFromJSON(
114
+ jsonString: string,
115
+ ): SafeParseResult<ValidateConnectionMeta, SDKValidationError> {
116
+ return safeParse(
117
+ jsonString,
118
+ (x) => ValidateConnectionMeta$inboundSchema.parse(JSON.parse(x)),
119
+ `Failed to parse 'ValidateConnectionMeta' from JSON`,
120
+ );
121
+ }
122
+
123
+ /** @internal */
124
+ export const ValidateConnectionErrors$inboundSchema: z.ZodMiniType<
125
+ ValidateConnectionErrors,
126
+ unknown
127
+ > = z.object({});
128
+
129
+ export function validateConnectionErrorsFromJSON(
130
+ jsonString: string,
131
+ ): SafeParseResult<ValidateConnectionErrors, SDKValidationError> {
132
+ return safeParse(
133
+ jsonString,
134
+ (x) => ValidateConnectionErrors$inboundSchema.parse(JSON.parse(x)),
135
+ `Failed to parse 'ValidateConnectionErrors' from JSON`,
136
+ );
137
+ }
138
+
139
+ /** @internal */
140
+ export const ValidateConnectionRawData$inboundSchema: z.ZodMiniType<
141
+ ValidateConnectionRawData,
142
+ unknown
143
+ > = z.object({});
144
+
145
+ export function validateConnectionRawDataFromJSON(
146
+ jsonString: string,
147
+ ): SafeParseResult<ValidateConnectionRawData, SDKValidationError> {
148
+ return safeParse(
149
+ jsonString,
150
+ (x) => ValidateConnectionRawData$inboundSchema.parse(JSON.parse(x)),
151
+ `Failed to parse 'ValidateConnectionRawData' from JSON`,
152
+ );
153
+ }
154
+
155
+ /** @internal */
156
+ export const ValidateConnectionResponse$inboundSchema: z.ZodMiniType<
157
+ ValidateConnectionResponse,
158
+ unknown
159
+ > = z.object({
160
+ meta: z.optional(
161
+ z.nullable(z.lazy(() => ValidateConnectionMeta$inboundSchema)),
162
+ ),
163
+ data: models.ConnectionValidationResponseDto$inboundSchema,
164
+ errors: types.nullable(z.lazy(() => ValidateConnectionErrors$inboundSchema)),
165
+ rawData: types.nullable(
166
+ z.lazy(() => ValidateConnectionRawData$inboundSchema),
167
+ ),
168
+ });
169
+
170
+ export function validateConnectionResponseFromJSON(
171
+ jsonString: string,
172
+ ): SafeParseResult<ValidateConnectionResponse, SDKValidationError> {
173
+ return safeParse(
174
+ jsonString,
175
+ (x) => ValidateConnectionResponse$inboundSchema.parse(JSON.parse(x)),
176
+ `Failed to parse 'ValidateConnectionResponse' from JSON`,
177
+ );
178
+ }
@@ -0,0 +1,59 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+
7
+ export type SubmissionPageInputTextsDto = {
8
+ apiKey?: string | undefined;
9
+ clientName?: string | undefined;
10
+ clientSecret?: string | undefined;
11
+ tenantId?: string | undefined;
12
+ username?: string | undefined;
13
+ password?: string | undefined;
14
+ database?: string | undefined;
15
+ url?: string | undefined;
16
+ mandant?: string | undefined;
17
+ baseUrl?: string | undefined;
18
+ };
19
+
20
+ /** @internal */
21
+ export type SubmissionPageInputTextsDto$Outbound = {
22
+ apiKey?: string | undefined;
23
+ clientName?: string | undefined;
24
+ clientSecret?: string | undefined;
25
+ tenantId?: string | undefined;
26
+ username?: string | undefined;
27
+ password?: string | undefined;
28
+ database?: string | undefined;
29
+ url?: string | undefined;
30
+ mandant?: string | undefined;
31
+ baseUrl?: string | undefined;
32
+ };
33
+
34
+ /** @internal */
35
+ export const SubmissionPageInputTextsDto$outboundSchema: z.ZodMiniType<
36
+ SubmissionPageInputTextsDto$Outbound,
37
+ SubmissionPageInputTextsDto
38
+ > = z.object({
39
+ apiKey: z.optional(z.string()),
40
+ clientName: z.optional(z.string()),
41
+ clientSecret: z.optional(z.string()),
42
+ tenantId: z.optional(z.string()),
43
+ username: z.optional(z.string()),
44
+ password: z.optional(z.string()),
45
+ database: z.optional(z.string()),
46
+ url: z.optional(z.string()),
47
+ mandant: z.optional(z.string()),
48
+ baseUrl: z.optional(z.string()),
49
+ });
50
+
51
+ export function submissionPageInputTextsDtoToJSON(
52
+ submissionPageInputTextsDto: SubmissionPageInputTextsDto,
53
+ ): string {
54
+ return JSON.stringify(
55
+ SubmissionPageInputTextsDto$outboundSchema.parse(
56
+ submissionPageInputTextsDto,
57
+ ),
58
+ );
59
+ }
@@ -3,6 +3,11 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod/v4-mini";
6
+ import {
7
+ SubmissionPageInputTextsDto,
8
+ SubmissionPageInputTextsDto$Outbound,
9
+ SubmissionPageInputTextsDto$outboundSchema,
10
+ } from "./submission-page-input-texts-dto.js";
6
11
 
7
12
  export type SubmissionPageLocalizationDto = {
8
13
  locale?: string | undefined;
@@ -10,6 +15,8 @@ export type SubmissionPageLocalizationDto = {
10
15
  freeText?: string | undefined;
11
16
  submitButtonText?: string | undefined;
12
17
  cancelButtonText?: string | undefined;
18
+ environmentPlaceholderText?: string | undefined;
19
+ inputTexts?: SubmissionPageInputTextsDto | undefined;
13
20
  };
14
21
 
15
22
  /** @internal */
@@ -19,6 +26,8 @@ export type SubmissionPageLocalizationDto$Outbound = {
19
26
  freeText?: string | undefined;
20
27
  submitButtonText?: string | undefined;
21
28
  cancelButtonText?: string | undefined;
29
+ environmentPlaceholderText?: string | undefined;
30
+ inputTexts?: SubmissionPageInputTextsDto$Outbound | undefined;
22
31
  };
23
32
 
24
33
  /** @internal */
@@ -31,6 +40,8 @@ export const SubmissionPageLocalizationDto$outboundSchema: z.ZodMiniType<
31
40
  freeText: z.optional(z.string()),
32
41
  submitButtonText: z.optional(z.string()),
33
42
  cancelButtonText: z.optional(z.string()),
43
+ environmentPlaceholderText: z.optional(z.string()),
44
+ inputTexts: z.optional(SubmissionPageInputTextsDto$outboundSchema),
34
45
  });
35
46
 
36
47
  export function submissionPageLocalizationDtoToJSON(
@@ -2,6 +2,7 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
+ import { accountingBookPayment } from "../funcs/accounting-book-payment.js";
5
6
  import { accountingCreateAccount } from "../funcs/accounting-create-account.js";
6
7
  import { accountingCreateBankAccount } from "../funcs/accounting-create-bank-account.js";
7
8
  import { accountingCreateBillLineItem } from "../funcs/accounting-create-bill-line-item.js";
@@ -1159,6 +1160,17 @@ export class Accounting extends ClientSDK {
1159
1160
  ));
1160
1161
  }
1161
1162
 
1163
+ async bookPayment(
1164
+ request: operations.BookPaymentRequest,
1165
+ options?: RequestOptions,
1166
+ ): Promise<models.BaseResponseDto> {
1167
+ return unwrapAsync(accountingBookPayment(
1168
+ this,
1169
+ request,
1170
+ options,
1171
+ ));
1172
+ }
1173
+
1162
1174
  async createEventSubscriptions(
1163
1175
  request: operations.CreateEventSubscriptionsRequest,
1164
1176
  options?: RequestOptions,
package/src/sdk/auth.ts CHANGED
@@ -7,6 +7,7 @@ import { authGetCompanies } from "../funcs/auth-get-companies.js";
7
7
  import { authGetEnvironments } from "../funcs/auth-get-environments.js";
8
8
  import { authSystemLoginUrlPostAuth } from "../funcs/auth-system-login-url-post-auth.js";
9
9
  import { authSystemLoginUrl } from "../funcs/auth-system-login-url.js";
10
+ import { authValidateConnection } from "../funcs/auth-validate-connection.js";
10
11
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
11
12
  import * as operations from "../models/operations/index.js";
12
13
  import { unwrapAsync } from "../types/fp.js";
@@ -34,6 +35,17 @@ export class Auth extends ClientSDK {
34
35
  ));
35
36
  }
36
37
 
38
+ async validateConnection(
39
+ request?: operations.ValidateConnectionRequest | undefined,
40
+ options?: RequestOptions,
41
+ ): Promise<operations.ValidateConnectionResponse> {
42
+ return unwrapAsync(authValidateConnection(
43
+ this,
44
+ request,
45
+ options,
46
+ ));
47
+ }
48
+
37
49
  async systemLoginUrl(
38
50
  request: operations.SystemLoginUrlRequest,
39
51
  options?: RequestOptions,
package/src/sdk/sdk.ts CHANGED
@@ -6,7 +6,6 @@ import { ClientSDK } from "../lib/sdks.js";
6
6
  import { AccountingV2 } from "./accounting-v2.js";
7
7
  import { Accounting } from "./accounting.js";
8
8
  import { Auth } from "./auth.js";
9
- import { Events } from "./events.js";
10
9
  import { Health } from "./health.js";
11
10
  import { Tenants } from "./tenants.js";
12
11
  import { User } from "./user.js";
@@ -38,11 +37,6 @@ export class Maesn extends ClientSDK {
38
37
  return (this._tenants ??= new Tenants(this._options));
39
38
  }
40
39
 
41
- private _events?: Events;
42
- get events(): Events {
43
- return (this._events ??= new Events(this._options));
44
- }
45
-
46
40
  private _webhooks?: Webhooks;
47
41
  get webhooks(): Webhooks {
48
42
  return (this._webhooks ??= new Webhooks(this._options));
@@ -1 +0,0 @@
1
- {"version":3,"file":"events-get-code.d.ts","sourceRoot":"","sources":["../../src/funcs/events-get-code.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAMvC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EACL,eAAe,E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AC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAC9E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,sBAAsB,EAC/B,UAAU,GACV,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"events-handle-callback.js","sourceRoot":"","sources":["../../src/funcs/events-handle-callback.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,CAAC,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAW3C,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGxD,MAAM,UAAU,oBAAoB,CAClC,MAAiB,EACjB,OAAyC,EACzC,OAAwB,EAaxB;IACA,OAAO,IAAI,UAAU,CAAC,GAAG,CACvB,MAAM,EACN,OAAO,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AAC,CAAC;IACH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,OAAO,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC;IAC/D,CAAC;IACD,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC;IAEhC,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,CAW5B,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,oCAAoC,CAAC,EAC5D,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IACjB,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAAA,CACjE"}
@@ -1,11 +0,0 @@
1
- import { MaesnCore } from "../core.js";
2
- import { RequestOptions } from "../lib/sdks.js";
3
- import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/http-client-errors.js";
4
- import { MaesnError } from "../models/errors/maesn-error.js";
5
- import { ResponseValidationError } from "../models/errors/response-validation-error.js";
6
- import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
7
- import * as operations from "../models/operations/index.js";
8
- import { APIPromise } from "../types/async.js";
9
- import { Result } from "../types/fp.js";
10
- export declare function eventsHandleConfigurationCallback(client: MaesnCore, request: operations.HandleConfigurationCallbackRequest, options?: RequestOptions): APIPromise<Result<operations.HandleConfigurationCallbackResponse, MaesnError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
11
- //# sourceMappingURL=events-handle-configuration-callback.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"events-handle-configuration-callback.d.ts","sourceRoot":"","sources":["../../src/funcs/events-handle-configuration-callback.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAMvC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAC9E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,UAAU,CAAC,kCAAkC,EACtD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,mCAAmC,EAC5C,UAAU,GACV,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
@@ -1,76 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
- import * as z from "zod/v4-mini";
5
- import { encodeSimple } from "../lib/encodings.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 { safeParse } from "../lib/schemas.js";
10
- import { pathToFunc } from "../lib/url.js";
11
- import * as operations from "../models/operations/index.js";
12
- import { APIPromise } from "../types/async.js";
13
- export function eventsHandleConfigurationCallback(client, request, options) {
14
- return new APIPromise($do(client, request, options));
15
- }
16
- async function $do(client, request, options) {
17
- const parsed = safeParse(request, (value) => z.parse(operations.HandleConfigurationCallbackRequest$outboundSchema, value), "Input validation failed");
18
- if (!parsed.ok) {
19
- return [parsed, { status: "invalid" }];
20
- }
21
- const payload = parsed.value;
22
- const body = null;
23
- const pathParams = {
24
- code: encodeSimple("code", payload.code, {
25
- explode: false,
26
- charEncoding: "percent",
27
- }),
28
- };
29
- const path = pathToFunc("/events/configuration/callback/{code}")(pathParams);
30
- const headers = new Headers(compactMap({
31
- Accept: "application/json",
32
- "X-ACCOUNT-KEY": encodeSimple("X-ACCOUNT-KEY", payload.accountKey ?? client._options.accountKey, { explode: false, charEncoding: "none" }),
33
- "X-API-KEY": encodeSimple("X-API-KEY", payload.apiKey ?? client._options.apiKey, { explode: false, charEncoding: "none" }),
34
- }));
35
- const context = {
36
- options: client._options,
37
- baseURL: options?.serverURL ?? client._baseURL ?? "",
38
- operationID: "handleConfigurationCallback",
39
- oAuth2Scopes: null,
40
- resolvedSecurity: null,
41
- securitySource: null,
42
- retryConfig: options?.retries
43
- || client._options.retryConfig
44
- || { strategy: "none" },
45
- retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
46
- };
47
- const requestRes = client._createRequest(context, {
48
- method: "POST",
49
- baseURL: options?.serverURL,
50
- path: path,
51
- headers: headers,
52
- body: body,
53
- userAgent: client._options.userAgent,
54
- timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
55
- }, options);
56
- if (!requestRes.ok) {
57
- return [requestRes, { status: "invalid" }];
58
- }
59
- const req = requestRes.value;
60
- const doResult = await client._do(req, {
61
- context,
62
- isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
63
- retryConfig: context.retryConfig,
64
- retryCodes: context.retryCodes,
65
- });
66
- if (!doResult.ok) {
67
- return [doResult, { status: "request-error", request: req }];
68
- }
69
- const response = doResult.value;
70
- const [result] = await M.match(M.json(202, operations.HandleConfigurationCallbackResponse$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req);
71
- if (!result.ok) {
72
- return [result, { status: "complete", request: req, response }];
73
- }
74
- return [result, { status: "complete", request: req, response }];
75
- }
76
- //# sourceMappingURL=events-handle-configuration-callback.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"events-handle-configuration-callback.js","sourceRoot":"","sources":["../../src/funcs/events-handle-configuration-callback.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,CAAC,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAW3C,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGxD,MAAM,UAAU,iCAAiC,CAC/C,MAAiB,EACjB,OAAsD,EACtD,OAAwB,EAaxB;IACA,OAAO,IAAI,UAAU,CAAC,GAAG,CACvB,MAAM,EACN,OAAO,EACP,OAAO,CACR,CAAC,CAAC;AAAA,CACJ;AAED,KAAK,UAAU,GAAG,CAChB,MAAiB,EACjB,OAAsD,EACtD,OAAwB,EAgBxB;IACA,MAAM,MAAM,GAAG,SAAS,CACtB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CACR,CAAC,CAAC,KAAK,CACL,UAAU,CAAC,iDAAi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,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,CAW5B,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,iDAAiD,CAAC,EACzE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IACjB,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAAA,CACjE"}
@@ -1,35 +0,0 @@
1
- import * as z from "zod/v4-mini";
2
- import { Result as SafeParseResult } from "../../types/fp.js";
3
- import { SDKValidationError } from "../errors/sdk-validation-error.js";
4
- export type GetCodeGlobals = {
5
- apiKey?: string | undefined;
6
- accountKey?: string | undefined;
7
- };
8
- export type GetCodeRequest = {
9
- code: string;
10
- /**
11
- * API key
12
- */
13
- apiKey?: string | undefined;
14
- /**
15
- * Account key
16
- */
17
- accountKey?: string | undefined;
18
- };
19
- /**
20
- * Authorization code saved successfully
21
- */
22
- export type GetCodeResponse = {};
23
- /** @internal */
24
- export type GetCodeRequest$Outbound = {
25
- code: string;
26
- apiKey?: string | undefined;
27
- accountKey?: string | undefined;
28
- };
29
- /** @internal */
30
- export declare const GetCodeRequest$outboundSchema: z.ZodMiniType<GetCodeRequest$Outbound, GetCodeRequest>;
31
- export declare function getCodeRequestToJSON(getCodeRequest: GetCodeRequest): string;
32
- /** @internal */
33
- export declare const GetCodeResponse$inboundSchema: z.ZodMiniType<GetCodeResponse, unknown>;
34
- export declare function getCodeResponseFromJSON(jsonString: string): SafeParseResult<GetCodeResponse, SDKValidationError>;
35
- //# sourceMappingURL=get-code.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-code.d.ts","sourceRoot":"","sources":["../../../src/models/operations/get-code.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAEvE,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,EAAE,CAAC;AAEjC,gBAAgB;AAChB,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,6BAA6B,EAAE,CAAC,CAAC,WAAW,CACvD,uBAAuB,EACvB,cAAc,CAKd,CAAC;AAEH,wBAAgB,oBAAoB,CAAC,cAAc,EAAE,cAAc,GAAG,MAAM,CAE3E;AAED,gBAAgB;AAChB,eAAO,MAAM,6BAA6B,EAAE,CAAC,CAAC,WAAW,CACvD,eAAe,EACf,OAAO,CACO,CAAC;AAEjB,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,eAAe,EAAE,kBAAkB,CAAC,CAMtD"}
@@ -1,20 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
- import * as z from "zod/v4-mini";
5
- import { safeParse } from "../../lib/schemas.js";
6
- /** @internal */
7
- export const GetCodeRequest$outboundSchema = z.object({
8
- code: z.string(),
9
- apiKey: z.optional(z.string()),
10
- accountKey: z.optional(z.string()),
11
- });
12
- export function getCodeRequestToJSON(getCodeRequest) {
13
- return JSON.stringify(GetCodeRequest$outboundSchema.parse(getCodeRequest));
14
- }
15
- /** @internal */
16
- export const GetCodeResponse$inboundSchema = z.object({});
17
- export function getCodeResponseFromJSON(jsonString) {
18
- return safeParse(jsonString, (x) => GetCodeResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetCodeResponse' from JSON`);
19
- }
20
- //# sourceMappingURL=get-code.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-code.js","sourceRoot":"","sources":["../../../src/models/operations/get-code.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAiCjD,gBAAgB;AAChB,MAAM,CAAC,MAAM,6BAA6B,GAGtC,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC9B,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CACnC,CAAC,CAAC;AAEH,MAAM,UAAU,oBAAoB,CAAC,cAA8B,EAAU;IAC3E,OAAO,IAAI,CAAC,SAAS,CAAC,6BAA6B,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC;AAAA,CAC5E;AAED,gBAAgB;AAChB,MAAM,CAAC,MAAM,6BAA6B,GAGtC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAEjB,MAAM,UAAU,uBAAuB,CACrC,UAAkB,EACoC;IACtD,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,6BAA6B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACzD,6CAA6C,CAC9C,CAAC;AAAA,CACH"}