@unified-api/typescript-sdk 2.32.0 → 2.36.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 +4 -0
- package/docs/sdks/accounting/README.md +164 -0
- package/docs/sdks/report/README.md +171 -0
- package/funcs/accountingGetAccountingReport.d.ts +14 -0
- package/funcs/accountingGetAccountingReport.d.ts.map +1 -0
- package/funcs/accountingGetAccountingReport.js +112 -0
- package/funcs/accountingGetAccountingReport.js.map +1 -0
- package/funcs/accountingListAccountingReports.d.ts +14 -0
- package/funcs/accountingListAccountingReports.d.ts.map +1 -0
- package/funcs/accountingListAccountingReports.js +116 -0
- package/funcs/accountingListAccountingReports.js.map +1 -0
- package/funcs/reportGetAccountingReport.d.ts +14 -0
- package/funcs/reportGetAccountingReport.d.ts.map +1 -0
- package/funcs/reportGetAccountingReport.js +112 -0
- package/funcs/reportGetAccountingReport.js.map +1 -0
- package/funcs/reportListAccountingReports.d.ts +14 -0
- package/funcs/reportListAccountingReports.d.ts.map +1 -0
- package/funcs/reportListAccountingReports.js +116 -0
- package/funcs/reportListAccountingReports.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/package.json +1 -1
- package/sdk/accounting.d.ts +8 -0
- package/sdk/accounting.d.ts.map +1 -1
- package/sdk/accounting.js +14 -0
- package/sdk/accounting.js.map +1 -1
- package/sdk/models/operations/getaccountingreport.d.ts +42 -0
- package/sdk/models/operations/getaccountingreport.d.ts.map +1 -0
- package/sdk/models/operations/getaccountingreport.js +72 -0
- package/sdk/models/operations/getaccountingreport.js.map +1 -0
- package/sdk/models/operations/index.d.ts +2 -0
- package/sdk/models/operations/index.d.ts.map +1 -1
- package/sdk/models/operations/index.js +2 -0
- package/sdk/models/operations/index.js.map +1 -1
- package/sdk/models/operations/listaccountingreports.d.ts +57 -0
- package/sdk/models/operations/listaccountingreports.d.ts.map +1 -0
- package/sdk/models/operations/listaccountingreports.js +87 -0
- package/sdk/models/operations/listaccountingreports.js.map +1 -0
- package/sdk/models/shared/accountingreport.d.ts +97 -0
- package/sdk/models/shared/accountingreport.d.ts.map +1 -0
- package/sdk/models/shared/accountingreport.js +137 -0
- package/sdk/models/shared/accountingreport.js.map +1 -0
- package/sdk/models/shared/index.d.ts +1 -0
- package/sdk/models/shared/index.d.ts.map +1 -1
- package/sdk/models/shared/index.js +1 -0
- package/sdk/models/shared/index.js.map +1 -1
- package/sdk/models/shared/integrationsupport.d.ts +2 -2
- package/sdk/models/shared/integrationsupport.d.ts.map +1 -1
- package/sdk/models/shared/integrationsupport.js +2 -2
- package/sdk/models/shared/integrationsupport.js.map +1 -1
- package/sdk/models/shared/propertyconnectionauth.d.ts +6 -23
- package/sdk/models/shared/propertyconnectionauth.d.ts.map +1 -1
- package/sdk/models/shared/propertyconnectionauth.js +3 -26
- package/sdk/models/shared/propertyconnectionauth.js.map +1 -1
- package/sdk/models/shared/propertyconnectionpermissions.d.ts +6 -0
- package/sdk/models/shared/propertyconnectionpermissions.d.ts.map +1 -1
- package/sdk/models/shared/propertyconnectionpermissions.js +2 -0
- package/sdk/models/shared/propertyconnectionpermissions.js.map +1 -1
- package/sdk/models/shared/webhook.d.ts +11 -25
- package/sdk/models/shared/webhook.d.ts.map +1 -1
- package/sdk/models/shared/webhook.js +6 -29
- package/sdk/models/shared/webhook.js.map +1 -1
- package/sdk/report.d.ts +14 -0
- package/sdk/report.d.ts.map +1 -0
- package/sdk/report.js +26 -0
- package/sdk/report.js.map +1 -0
- package/sdk/sdk.d.ts +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +4 -0
- package/sdk/sdk.js.map +1 -1
- package/src/funcs/accountingGetAccountingReport.ts +169 -0
- package/src/funcs/accountingListAccountingReports.ts +171 -0
- package/src/funcs/reportGetAccountingReport.ts +169 -0
- package/src/funcs/reportListAccountingReports.ts +171 -0
- package/src/lib/config.ts +2 -2
- package/src/sdk/accounting.ts +30 -0
- package/src/sdk/models/operations/getaccountingreport.ts +92 -0
- package/src/sdk/models/operations/index.ts +2 -0
- package/src/sdk/models/operations/listaccountingreports.ts +124 -0
- package/src/sdk/models/shared/accountingreport.ts +198 -0
- package/src/sdk/models/shared/index.ts +1 -0
- package/src/sdk/models/shared/integrationsupport.ts +4 -4
- package/src/sdk/models/shared/propertyconnectionauth.ts +4 -54
- package/src/sdk/models/shared/propertyconnectionpermissions.ts +2 -0
- package/src/sdk/models/shared/webhook.ts +9 -48
- package/src/sdk/report.ts +40 -0
- package/src/sdk/sdk.ts +6 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type ListAccountingReportsRequest = {
|
|
12
|
+
/**
|
|
13
|
+
* ID of the connection
|
|
14
|
+
*/
|
|
15
|
+
connectionId: string;
|
|
16
|
+
/**
|
|
17
|
+
* Comma-delimited fields to return
|
|
18
|
+
*/
|
|
19
|
+
fields?: Array<string> | undefined;
|
|
20
|
+
limit?: number | undefined;
|
|
21
|
+
offset?: number | undefined;
|
|
22
|
+
order?: string | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Query string to search. eg. email address or name
|
|
25
|
+
*/
|
|
26
|
+
query?: string | undefined;
|
|
27
|
+
sort?: string | undefined;
|
|
28
|
+
type?: string | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Return only results whose updated date is equal or greater to this value
|
|
31
|
+
*/
|
|
32
|
+
updatedGte?: Date | undefined;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/** @internal */
|
|
36
|
+
export const ListAccountingReportsRequest$inboundSchema: z.ZodType<
|
|
37
|
+
ListAccountingReportsRequest,
|
|
38
|
+
z.ZodTypeDef,
|
|
39
|
+
unknown
|
|
40
|
+
> = z.object({
|
|
41
|
+
connection_id: z.string(),
|
|
42
|
+
fields: z.array(z.string()).optional(),
|
|
43
|
+
limit: z.number().optional(),
|
|
44
|
+
offset: z.number().optional(),
|
|
45
|
+
order: z.string().optional(),
|
|
46
|
+
query: z.string().optional(),
|
|
47
|
+
sort: z.string().optional(),
|
|
48
|
+
type: z.string().optional(),
|
|
49
|
+
updated_gte: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
50
|
+
.optional(),
|
|
51
|
+
}).transform((v) => {
|
|
52
|
+
return remap$(v, {
|
|
53
|
+
"connection_id": "connectionId",
|
|
54
|
+
"updated_gte": "updatedGte",
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
/** @internal */
|
|
59
|
+
export type ListAccountingReportsRequest$Outbound = {
|
|
60
|
+
connection_id: string;
|
|
61
|
+
fields?: Array<string> | undefined;
|
|
62
|
+
limit?: number | undefined;
|
|
63
|
+
offset?: number | undefined;
|
|
64
|
+
order?: string | undefined;
|
|
65
|
+
query?: string | undefined;
|
|
66
|
+
sort?: string | undefined;
|
|
67
|
+
type?: string | undefined;
|
|
68
|
+
updated_gte?: string | undefined;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
/** @internal */
|
|
72
|
+
export const ListAccountingReportsRequest$outboundSchema: z.ZodType<
|
|
73
|
+
ListAccountingReportsRequest$Outbound,
|
|
74
|
+
z.ZodTypeDef,
|
|
75
|
+
ListAccountingReportsRequest
|
|
76
|
+
> = z.object({
|
|
77
|
+
connectionId: z.string(),
|
|
78
|
+
fields: z.array(z.string()).optional(),
|
|
79
|
+
limit: z.number().optional(),
|
|
80
|
+
offset: z.number().optional(),
|
|
81
|
+
order: z.string().optional(),
|
|
82
|
+
query: z.string().optional(),
|
|
83
|
+
sort: z.string().optional(),
|
|
84
|
+
type: z.string().optional(),
|
|
85
|
+
updatedGte: z.date().transform(v => v.toISOString()).optional(),
|
|
86
|
+
}).transform((v) => {
|
|
87
|
+
return remap$(v, {
|
|
88
|
+
connectionId: "connection_id",
|
|
89
|
+
updatedGte: "updated_gte",
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* @internal
|
|
95
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
96
|
+
*/
|
|
97
|
+
export namespace ListAccountingReportsRequest$ {
|
|
98
|
+
/** @deprecated use `ListAccountingReportsRequest$inboundSchema` instead. */
|
|
99
|
+
export const inboundSchema = ListAccountingReportsRequest$inboundSchema;
|
|
100
|
+
/** @deprecated use `ListAccountingReportsRequest$outboundSchema` instead. */
|
|
101
|
+
export const outboundSchema = ListAccountingReportsRequest$outboundSchema;
|
|
102
|
+
/** @deprecated use `ListAccountingReportsRequest$Outbound` instead. */
|
|
103
|
+
export type Outbound = ListAccountingReportsRequest$Outbound;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export function listAccountingReportsRequestToJSON(
|
|
107
|
+
listAccountingReportsRequest: ListAccountingReportsRequest,
|
|
108
|
+
): string {
|
|
109
|
+
return JSON.stringify(
|
|
110
|
+
ListAccountingReportsRequest$outboundSchema.parse(
|
|
111
|
+
listAccountingReportsRequest,
|
|
112
|
+
),
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export function listAccountingReportsRequestFromJSON(
|
|
117
|
+
jsonString: string,
|
|
118
|
+
): SafeParseResult<ListAccountingReportsRequest, SDKValidationError> {
|
|
119
|
+
return safeParse(
|
|
120
|
+
jsonString,
|
|
121
|
+
(x) => ListAccountingReportsRequest$inboundSchema.parse(JSON.parse(x)),
|
|
122
|
+
`Failed to parse 'ListAccountingReportsRequest' from JSON`,
|
|
123
|
+
);
|
|
124
|
+
}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type AccountingReportRaw = {};
|
|
13
|
+
|
|
14
|
+
export const AccountingReportType = {
|
|
15
|
+
TrialBalance: "TRIAL_BALANCE",
|
|
16
|
+
BalanceSheet: "BALANCE_SHEET",
|
|
17
|
+
ProfitAndLoss: "PROFIT_AND_LOSS",
|
|
18
|
+
} as const;
|
|
19
|
+
export type AccountingReportType = ClosedEnum<typeof AccountingReportType>;
|
|
20
|
+
|
|
21
|
+
export type AccountingReport = {
|
|
22
|
+
accountId?: string | undefined;
|
|
23
|
+
amount?: number | undefined;
|
|
24
|
+
contactId?: string | undefined;
|
|
25
|
+
createdAt?: Date | undefined;
|
|
26
|
+
group?: string | undefined;
|
|
27
|
+
id?: string | undefined;
|
|
28
|
+
raw?: AccountingReportRaw | undefined;
|
|
29
|
+
subgroup?: string | undefined;
|
|
30
|
+
type?: AccountingReportType | undefined;
|
|
31
|
+
updatedAt?: Date | undefined;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const AccountingReportRaw$inboundSchema: z.ZodType<
|
|
36
|
+
AccountingReportRaw,
|
|
37
|
+
z.ZodTypeDef,
|
|
38
|
+
unknown
|
|
39
|
+
> = z.object({});
|
|
40
|
+
|
|
41
|
+
/** @internal */
|
|
42
|
+
export type AccountingReportRaw$Outbound = {};
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export const AccountingReportRaw$outboundSchema: z.ZodType<
|
|
46
|
+
AccountingReportRaw$Outbound,
|
|
47
|
+
z.ZodTypeDef,
|
|
48
|
+
AccountingReportRaw
|
|
49
|
+
> = z.object({});
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @internal
|
|
53
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
54
|
+
*/
|
|
55
|
+
export namespace AccountingReportRaw$ {
|
|
56
|
+
/** @deprecated use `AccountingReportRaw$inboundSchema` instead. */
|
|
57
|
+
export const inboundSchema = AccountingReportRaw$inboundSchema;
|
|
58
|
+
/** @deprecated use `AccountingReportRaw$outboundSchema` instead. */
|
|
59
|
+
export const outboundSchema = AccountingReportRaw$outboundSchema;
|
|
60
|
+
/** @deprecated use `AccountingReportRaw$Outbound` instead. */
|
|
61
|
+
export type Outbound = AccountingReportRaw$Outbound;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function accountingReportRawToJSON(
|
|
65
|
+
accountingReportRaw: AccountingReportRaw,
|
|
66
|
+
): string {
|
|
67
|
+
return JSON.stringify(
|
|
68
|
+
AccountingReportRaw$outboundSchema.parse(accountingReportRaw),
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function accountingReportRawFromJSON(
|
|
73
|
+
jsonString: string,
|
|
74
|
+
): SafeParseResult<AccountingReportRaw, SDKValidationError> {
|
|
75
|
+
return safeParse(
|
|
76
|
+
jsonString,
|
|
77
|
+
(x) => AccountingReportRaw$inboundSchema.parse(JSON.parse(x)),
|
|
78
|
+
`Failed to parse 'AccountingReportRaw' from JSON`,
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/** @internal */
|
|
83
|
+
export const AccountingReportType$inboundSchema: z.ZodNativeEnum<
|
|
84
|
+
typeof AccountingReportType
|
|
85
|
+
> = z.nativeEnum(AccountingReportType);
|
|
86
|
+
|
|
87
|
+
/** @internal */
|
|
88
|
+
export const AccountingReportType$outboundSchema: z.ZodNativeEnum<
|
|
89
|
+
typeof AccountingReportType
|
|
90
|
+
> = AccountingReportType$inboundSchema;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* @internal
|
|
94
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
95
|
+
*/
|
|
96
|
+
export namespace AccountingReportType$ {
|
|
97
|
+
/** @deprecated use `AccountingReportType$inboundSchema` instead. */
|
|
98
|
+
export const inboundSchema = AccountingReportType$inboundSchema;
|
|
99
|
+
/** @deprecated use `AccountingReportType$outboundSchema` instead. */
|
|
100
|
+
export const outboundSchema = AccountingReportType$outboundSchema;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/** @internal */
|
|
104
|
+
export const AccountingReport$inboundSchema: z.ZodType<
|
|
105
|
+
AccountingReport,
|
|
106
|
+
z.ZodTypeDef,
|
|
107
|
+
unknown
|
|
108
|
+
> = z.object({
|
|
109
|
+
account_id: z.string().optional(),
|
|
110
|
+
amount: z.number().optional(),
|
|
111
|
+
contact_id: z.string().optional(),
|
|
112
|
+
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
113
|
+
.optional(),
|
|
114
|
+
group: z.string().optional(),
|
|
115
|
+
id: z.string().optional(),
|
|
116
|
+
raw: z.lazy(() => AccountingReportRaw$inboundSchema).optional(),
|
|
117
|
+
subgroup: z.string().optional(),
|
|
118
|
+
type: AccountingReportType$inboundSchema.optional(),
|
|
119
|
+
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
120
|
+
.optional(),
|
|
121
|
+
}).transform((v) => {
|
|
122
|
+
return remap$(v, {
|
|
123
|
+
"account_id": "accountId",
|
|
124
|
+
"contact_id": "contactId",
|
|
125
|
+
"created_at": "createdAt",
|
|
126
|
+
"updated_at": "updatedAt",
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
/** @internal */
|
|
131
|
+
export type AccountingReport$Outbound = {
|
|
132
|
+
account_id?: string | undefined;
|
|
133
|
+
amount?: number | undefined;
|
|
134
|
+
contact_id?: string | undefined;
|
|
135
|
+
created_at?: string | undefined;
|
|
136
|
+
group?: string | undefined;
|
|
137
|
+
id?: string | undefined;
|
|
138
|
+
raw?: AccountingReportRaw$Outbound | undefined;
|
|
139
|
+
subgroup?: string | undefined;
|
|
140
|
+
type?: string | undefined;
|
|
141
|
+
updated_at?: string | undefined;
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
/** @internal */
|
|
145
|
+
export const AccountingReport$outboundSchema: z.ZodType<
|
|
146
|
+
AccountingReport$Outbound,
|
|
147
|
+
z.ZodTypeDef,
|
|
148
|
+
AccountingReport
|
|
149
|
+
> = z.object({
|
|
150
|
+
accountId: z.string().optional(),
|
|
151
|
+
amount: z.number().optional(),
|
|
152
|
+
contactId: z.string().optional(),
|
|
153
|
+
createdAt: z.date().transform(v => v.toISOString()).optional(),
|
|
154
|
+
group: z.string().optional(),
|
|
155
|
+
id: z.string().optional(),
|
|
156
|
+
raw: z.lazy(() => AccountingReportRaw$outboundSchema).optional(),
|
|
157
|
+
subgroup: z.string().optional(),
|
|
158
|
+
type: AccountingReportType$outboundSchema.optional(),
|
|
159
|
+
updatedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
160
|
+
}).transform((v) => {
|
|
161
|
+
return remap$(v, {
|
|
162
|
+
accountId: "account_id",
|
|
163
|
+
contactId: "contact_id",
|
|
164
|
+
createdAt: "created_at",
|
|
165
|
+
updatedAt: "updated_at",
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* @internal
|
|
171
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
172
|
+
*/
|
|
173
|
+
export namespace AccountingReport$ {
|
|
174
|
+
/** @deprecated use `AccountingReport$inboundSchema` instead. */
|
|
175
|
+
export const inboundSchema = AccountingReport$inboundSchema;
|
|
176
|
+
/** @deprecated use `AccountingReport$outboundSchema` instead. */
|
|
177
|
+
export const outboundSchema = AccountingReport$outboundSchema;
|
|
178
|
+
/** @deprecated use `AccountingReport$Outbound` instead. */
|
|
179
|
+
export type Outbound = AccountingReport$Outbound;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export function accountingReportToJSON(
|
|
183
|
+
accountingReport: AccountingReport,
|
|
184
|
+
): string {
|
|
185
|
+
return JSON.stringify(
|
|
186
|
+
AccountingReport$outboundSchema.parse(accountingReport),
|
|
187
|
+
);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export function accountingReportFromJSON(
|
|
191
|
+
jsonString: string,
|
|
192
|
+
): SafeParseResult<AccountingReport, SDKValidationError> {
|
|
193
|
+
return safeParse(
|
|
194
|
+
jsonString,
|
|
195
|
+
(x) => AccountingReport$inboundSchema.parse(JSON.parse(x)),
|
|
196
|
+
`Failed to parse 'AccountingReport' from JSON`,
|
|
197
|
+
);
|
|
198
|
+
}
|
|
@@ -12,6 +12,7 @@ export * from "./accountingjournallineitem.js";
|
|
|
12
12
|
export * from "./accountinglineitem.js";
|
|
13
13
|
export * from "./accountingorder.js";
|
|
14
14
|
export * from "./accountingorganization.js";
|
|
15
|
+
export * from "./accountingreport.js";
|
|
15
16
|
export * from "./accountingtaxrate.js";
|
|
16
17
|
export * from "./accountingtelephone.js";
|
|
17
18
|
export * from "./accountingtransaction.js";
|
|
@@ -527,7 +527,7 @@ export type IntegrationSupport = {
|
|
|
527
527
|
listType?: ListType | undefined;
|
|
528
528
|
listUpdatedGte?: ListUpdatedGte | undefined;
|
|
529
529
|
listUserId?: ListUserId | undefined;
|
|
530
|
-
methods?: { [k: string]:
|
|
530
|
+
methods?: { [k: string]: any } | undefined;
|
|
531
531
|
nativeWebhookParentId?: NativeWebhookParentId | undefined;
|
|
532
532
|
nativeWebhookProjectId?: NativeWebhookProjectId | undefined;
|
|
533
533
|
outboundFields?: { [k: string]: any } | undefined;
|
|
@@ -1916,7 +1916,7 @@ export const IntegrationSupport$inboundSchema: z.ZodType<
|
|
|
1916
1916
|
list_type: ListType$inboundSchema.optional(),
|
|
1917
1917
|
list_updated_gte: ListUpdatedGte$inboundSchema.optional(),
|
|
1918
1918
|
list_user_id: ListUserId$inboundSchema.optional(),
|
|
1919
|
-
methods: z.record(z.
|
|
1919
|
+
methods: z.record(z.any()).optional(),
|
|
1920
1920
|
native_webhook_parent_id: NativeWebhookParentId$inboundSchema.optional(),
|
|
1921
1921
|
native_webhook_project_id: NativeWebhookProjectId$inboundSchema.optional(),
|
|
1922
1922
|
outbound_fields: z.record(z.any()).optional(),
|
|
@@ -2066,7 +2066,7 @@ export type IntegrationSupport$Outbound = {
|
|
|
2066
2066
|
list_type?: string | undefined;
|
|
2067
2067
|
list_updated_gte?: string | undefined;
|
|
2068
2068
|
list_user_id?: string | undefined;
|
|
2069
|
-
methods?: { [k: string]:
|
|
2069
|
+
methods?: { [k: string]: any } | undefined;
|
|
2070
2070
|
native_webhook_parent_id?: string | undefined;
|
|
2071
2071
|
native_webhook_project_id?: string | undefined;
|
|
2072
2072
|
outbound_fields?: { [k: string]: any } | undefined;
|
|
@@ -2145,7 +2145,7 @@ export const IntegrationSupport$outboundSchema: z.ZodType<
|
|
|
2145
2145
|
listType: ListType$outboundSchema.optional(),
|
|
2146
2146
|
listUpdatedGte: ListUpdatedGte$outboundSchema.optional(),
|
|
2147
2147
|
listUserId: ListUserId$outboundSchema.optional(),
|
|
2148
|
-
methods: z.record(z.
|
|
2148
|
+
methods: z.record(z.any()).optional(),
|
|
2149
2149
|
nativeWebhookParentId: NativeWebhookParentId$outboundSchema.optional(),
|
|
2150
2150
|
nativeWebhookProjectId: NativeWebhookProjectId$outboundSchema.optional(),
|
|
2151
2151
|
outboundFields: z.record(z.any()).optional(),
|
|
@@ -8,8 +8,6 @@ import { safeParse } from "../../../lib/schemas.js";
|
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
10
|
|
|
11
|
-
export type PropertyConnectionAuthMeta = {};
|
|
12
|
-
|
|
13
11
|
/**
|
|
14
12
|
* An authentication object that represents a specific authorized user's connection to an integration.
|
|
15
13
|
*/
|
|
@@ -27,7 +25,7 @@ export type PropertyConnectionAuth = {
|
|
|
27
25
|
expiresIn?: number | undefined;
|
|
28
26
|
expiryDate?: Date | undefined;
|
|
29
27
|
key?: string | undefined;
|
|
30
|
-
meta?:
|
|
28
|
+
meta?: { [k: string]: any } | undefined;
|
|
31
29
|
name?: string | undefined;
|
|
32
30
|
/**
|
|
33
31
|
* When integration.auth_type = "other", this field contains the authentication credentials in the same order as token_names
|
|
@@ -43,54 +41,6 @@ export type PropertyConnectionAuth = {
|
|
|
43
41
|
userId?: string | undefined;
|
|
44
42
|
};
|
|
45
43
|
|
|
46
|
-
/** @internal */
|
|
47
|
-
export const PropertyConnectionAuthMeta$inboundSchema: z.ZodType<
|
|
48
|
-
PropertyConnectionAuthMeta,
|
|
49
|
-
z.ZodTypeDef,
|
|
50
|
-
unknown
|
|
51
|
-
> = z.object({});
|
|
52
|
-
|
|
53
|
-
/** @internal */
|
|
54
|
-
export type PropertyConnectionAuthMeta$Outbound = {};
|
|
55
|
-
|
|
56
|
-
/** @internal */
|
|
57
|
-
export const PropertyConnectionAuthMeta$outboundSchema: z.ZodType<
|
|
58
|
-
PropertyConnectionAuthMeta$Outbound,
|
|
59
|
-
z.ZodTypeDef,
|
|
60
|
-
PropertyConnectionAuthMeta
|
|
61
|
-
> = z.object({});
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* @internal
|
|
65
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
66
|
-
*/
|
|
67
|
-
export namespace PropertyConnectionAuthMeta$ {
|
|
68
|
-
/** @deprecated use `PropertyConnectionAuthMeta$inboundSchema` instead. */
|
|
69
|
-
export const inboundSchema = PropertyConnectionAuthMeta$inboundSchema;
|
|
70
|
-
/** @deprecated use `PropertyConnectionAuthMeta$outboundSchema` instead. */
|
|
71
|
-
export const outboundSchema = PropertyConnectionAuthMeta$outboundSchema;
|
|
72
|
-
/** @deprecated use `PropertyConnectionAuthMeta$Outbound` instead. */
|
|
73
|
-
export type Outbound = PropertyConnectionAuthMeta$Outbound;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export function propertyConnectionAuthMetaToJSON(
|
|
77
|
-
propertyConnectionAuthMeta: PropertyConnectionAuthMeta,
|
|
78
|
-
): string {
|
|
79
|
-
return JSON.stringify(
|
|
80
|
-
PropertyConnectionAuthMeta$outboundSchema.parse(propertyConnectionAuthMeta),
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export function propertyConnectionAuthMetaFromJSON(
|
|
85
|
-
jsonString: string,
|
|
86
|
-
): SafeParseResult<PropertyConnectionAuthMeta, SDKValidationError> {
|
|
87
|
-
return safeParse(
|
|
88
|
-
jsonString,
|
|
89
|
-
(x) => PropertyConnectionAuthMeta$inboundSchema.parse(JSON.parse(x)),
|
|
90
|
-
`Failed to parse 'PropertyConnectionAuthMeta' from JSON`,
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
44
|
/** @internal */
|
|
95
45
|
export const PropertyConnectionAuth$inboundSchema: z.ZodType<
|
|
96
46
|
PropertyConnectionAuth,
|
|
@@ -111,7 +61,7 @@ export const PropertyConnectionAuth$inboundSchema: z.ZodType<
|
|
|
111
61
|
expiry_date: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
112
62
|
.optional(),
|
|
113
63
|
key: z.string().optional(),
|
|
114
|
-
meta: z.
|
|
64
|
+
meta: z.record(z.any()).optional(),
|
|
115
65
|
name: z.string().optional(),
|
|
116
66
|
other_auth_info: z.array(z.string()).optional(),
|
|
117
67
|
pem: z.string().optional(),
|
|
@@ -161,7 +111,7 @@ export type PropertyConnectionAuth$Outbound = {
|
|
|
161
111
|
expires_in?: number | undefined;
|
|
162
112
|
expiry_date?: string | undefined;
|
|
163
113
|
key?: string | undefined;
|
|
164
|
-
meta?:
|
|
114
|
+
meta?: { [k: string]: any } | undefined;
|
|
165
115
|
name?: string | undefined;
|
|
166
116
|
other_auth_info?: Array<string> | undefined;
|
|
167
117
|
pem?: string | undefined;
|
|
@@ -193,7 +143,7 @@ export const PropertyConnectionAuth$outboundSchema: z.ZodType<
|
|
|
193
143
|
expiresIn: z.number().optional(),
|
|
194
144
|
expiryDate: z.date().transform(v => v.toISOString()).optional(),
|
|
195
145
|
key: z.string().optional(),
|
|
196
|
-
meta: z.
|
|
146
|
+
meta: z.record(z.any()).optional(),
|
|
197
147
|
name: z.string().optional(),
|
|
198
148
|
otherAuthInfo: z.array(z.string()).optional(),
|
|
199
149
|
pem: z.string().optional(),
|
|
@@ -22,6 +22,8 @@ export const PropertyConnectionPermissions = {
|
|
|
22
22
|
AccountingOrganizationRead: "accounting_organization_read",
|
|
23
23
|
AccountingOrderRead: "accounting_order_read",
|
|
24
24
|
AccountingOrderWrite: "accounting_order_write",
|
|
25
|
+
AccountingReportRead: "accounting_report_read",
|
|
26
|
+
AccountingReportWrite: "accounting_report_write",
|
|
25
27
|
PaymentPaymentRead: "payment_payment_read",
|
|
26
28
|
PaymentPaymentWrite: "payment_payment_write",
|
|
27
29
|
PaymentPayoutRead: "payment_payout_read",
|
|
@@ -25,8 +25,6 @@ export const Event = {
|
|
|
25
25
|
} as const;
|
|
26
26
|
export type Event = ClosedEnum<typeof Event>;
|
|
27
27
|
|
|
28
|
-
export type Meta = {};
|
|
29
|
-
|
|
30
28
|
export const ObjectType = {
|
|
31
29
|
AccountingAccount: "accounting_account",
|
|
32
30
|
AccountingTransaction: "accounting_transaction",
|
|
@@ -36,6 +34,7 @@ export const ObjectType = {
|
|
|
36
34
|
AccountingTaxrate: "accounting_taxrate",
|
|
37
35
|
AccountingOrganization: "accounting_organization",
|
|
38
36
|
AccountingOrder: "accounting_order",
|
|
37
|
+
AccountingReport: "accounting_report",
|
|
39
38
|
PaymentPayment: "payment_payment",
|
|
40
39
|
PaymentLink: "payment_link",
|
|
41
40
|
PaymentPayout: "payment_payout",
|
|
@@ -126,14 +125,14 @@ export type Webhook = {
|
|
|
126
125
|
environment?: string | undefined;
|
|
127
126
|
event: Event;
|
|
128
127
|
fields?: string | undefined;
|
|
129
|
-
filters?: { [k: string]:
|
|
128
|
+
filters?: { [k: string]: any } | undefined;
|
|
130
129
|
hookUrl?: string | undefined;
|
|
131
130
|
id?: string | undefined;
|
|
132
131
|
integrationType?: string | undefined;
|
|
133
132
|
interval?: number | undefined;
|
|
134
133
|
isHealthy?: boolean | undefined;
|
|
135
134
|
isPaused?: boolean | undefined;
|
|
136
|
-
meta?:
|
|
135
|
+
meta?: { [k: string]: any } | undefined;
|
|
137
136
|
objectType: ObjectType;
|
|
138
137
|
pageMaxLimit?: number | undefined;
|
|
139
138
|
/**
|
|
@@ -184,44 +183,6 @@ export namespace Event$ {
|
|
|
184
183
|
export const outboundSchema = Event$outboundSchema;
|
|
185
184
|
}
|
|
186
185
|
|
|
187
|
-
/** @internal */
|
|
188
|
-
export const Meta$inboundSchema: z.ZodType<Meta, z.ZodTypeDef, unknown> = z
|
|
189
|
-
.object({});
|
|
190
|
-
|
|
191
|
-
/** @internal */
|
|
192
|
-
export type Meta$Outbound = {};
|
|
193
|
-
|
|
194
|
-
/** @internal */
|
|
195
|
-
export const Meta$outboundSchema: z.ZodType<Meta$Outbound, z.ZodTypeDef, Meta> =
|
|
196
|
-
z.object({});
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* @internal
|
|
200
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
201
|
-
*/
|
|
202
|
-
export namespace Meta$ {
|
|
203
|
-
/** @deprecated use `Meta$inboundSchema` instead. */
|
|
204
|
-
export const inboundSchema = Meta$inboundSchema;
|
|
205
|
-
/** @deprecated use `Meta$outboundSchema` instead. */
|
|
206
|
-
export const outboundSchema = Meta$outboundSchema;
|
|
207
|
-
/** @deprecated use `Meta$Outbound` instead. */
|
|
208
|
-
export type Outbound = Meta$Outbound;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
export function metaToJSON(meta: Meta): string {
|
|
212
|
-
return JSON.stringify(Meta$outboundSchema.parse(meta));
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
export function metaFromJSON(
|
|
216
|
-
jsonString: string,
|
|
217
|
-
): SafeParseResult<Meta, SDKValidationError> {
|
|
218
|
-
return safeParse(
|
|
219
|
-
jsonString,
|
|
220
|
-
(x) => Meta$inboundSchema.parse(JSON.parse(x)),
|
|
221
|
-
`Failed to parse 'Meta' from JSON`,
|
|
222
|
-
);
|
|
223
|
-
}
|
|
224
|
-
|
|
225
186
|
/** @internal */
|
|
226
187
|
export const ObjectType$inboundSchema: z.ZodNativeEnum<typeof ObjectType> = z
|
|
227
188
|
.nativeEnum(ObjectType);
|
|
@@ -276,14 +237,14 @@ export const Webhook$inboundSchema: z.ZodType<Webhook, z.ZodTypeDef, unknown> =
|
|
|
276
237
|
environment: z.string().default("Production"),
|
|
277
238
|
event: Event$inboundSchema,
|
|
278
239
|
fields: z.string().optional(),
|
|
279
|
-
filters: z.record(z.
|
|
240
|
+
filters: z.record(z.any()).optional(),
|
|
280
241
|
hook_url: z.string().optional(),
|
|
281
242
|
id: z.string().optional(),
|
|
282
243
|
integration_type: z.string().optional(),
|
|
283
244
|
interval: z.number().optional(),
|
|
284
245
|
is_healthy: z.boolean().optional(),
|
|
285
246
|
is_paused: z.boolean().optional(),
|
|
286
|
-
meta: z.
|
|
247
|
+
meta: z.record(z.any()).optional(),
|
|
287
248
|
object_type: ObjectType$inboundSchema,
|
|
288
249
|
page_max_limit: z.number().optional(),
|
|
289
250
|
runs: z.array(z.string()).optional(),
|
|
@@ -323,14 +284,14 @@ export type Webhook$Outbound = {
|
|
|
323
284
|
environment: string;
|
|
324
285
|
event: string;
|
|
325
286
|
fields?: string | undefined;
|
|
326
|
-
filters?: { [k: string]:
|
|
287
|
+
filters?: { [k: string]: any } | undefined;
|
|
327
288
|
hook_url?: string | undefined;
|
|
328
289
|
id?: string | undefined;
|
|
329
290
|
integration_type?: string | undefined;
|
|
330
291
|
interval?: number | undefined;
|
|
331
292
|
is_healthy?: boolean | undefined;
|
|
332
293
|
is_paused?: boolean | undefined;
|
|
333
|
-
meta?:
|
|
294
|
+
meta?: { [k: string]: any } | undefined;
|
|
334
295
|
object_type: string;
|
|
335
296
|
page_max_limit?: number | undefined;
|
|
336
297
|
runs?: Array<string> | undefined;
|
|
@@ -354,14 +315,14 @@ export const Webhook$outboundSchema: z.ZodType<
|
|
|
354
315
|
environment: z.string().default("Production"),
|
|
355
316
|
event: Event$outboundSchema,
|
|
356
317
|
fields: z.string().optional(),
|
|
357
|
-
filters: z.record(z.
|
|
318
|
+
filters: z.record(z.any()).optional(),
|
|
358
319
|
hookUrl: z.string().optional(),
|
|
359
320
|
id: z.string().optional(),
|
|
360
321
|
integrationType: z.string().optional(),
|
|
361
322
|
interval: z.number().optional(),
|
|
362
323
|
isHealthy: z.boolean().optional(),
|
|
363
324
|
isPaused: z.boolean().optional(),
|
|
364
|
-
meta: z.
|
|
325
|
+
meta: z.record(z.any()).optional(),
|
|
365
326
|
objectType: ObjectType$outboundSchema,
|
|
366
327
|
pageMaxLimit: z.number().optional(),
|
|
367
328
|
runs: z.array(z.string()).optional(),
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { reportGetAccountingReport } from "../funcs/reportGetAccountingReport.js";
|
|
6
|
+
import { reportListAccountingReports } from "../funcs/reportListAccountingReports.js";
|
|
7
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
8
|
+
import * as operations from "./models/operations/index.js";
|
|
9
|
+
import * as shared from "./models/shared/index.js";
|
|
10
|
+
import { unwrapAsync } from "./types/fp.js";
|
|
11
|
+
|
|
12
|
+
export class Report extends ClientSDK {
|
|
13
|
+
/**
|
|
14
|
+
* Retrieve a report
|
|
15
|
+
*/
|
|
16
|
+
async getAccountingReport(
|
|
17
|
+
request: operations.GetAccountingReportRequest,
|
|
18
|
+
options?: RequestOptions,
|
|
19
|
+
): Promise<shared.AccountingReport> {
|
|
20
|
+
return unwrapAsync(reportGetAccountingReport(
|
|
21
|
+
this,
|
|
22
|
+
request,
|
|
23
|
+
options,
|
|
24
|
+
));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* List all reports
|
|
29
|
+
*/
|
|
30
|
+
async listAccountingReports(
|
|
31
|
+
request: operations.ListAccountingReportsRequest,
|
|
32
|
+
options?: RequestOptions,
|
|
33
|
+
): Promise<Array<shared.AccountingReport>> {
|
|
34
|
+
return unwrapAsync(reportListAccountingReports(
|
|
35
|
+
this,
|
|
36
|
+
request,
|
|
37
|
+
options,
|
|
38
|
+
));
|
|
39
|
+
}
|
|
40
|
+
}
|
package/src/sdk/sdk.ts
CHANGED
|
@@ -75,6 +75,7 @@ import { Pullrequest } from "./pullrequest.js";
|
|
|
75
75
|
import { Recording } from "./recording.js";
|
|
76
76
|
import { Refund } from "./refund.js";
|
|
77
77
|
import { Repo } from "./repo.js";
|
|
78
|
+
import { Report } from "./report.js";
|
|
78
79
|
import { Repository } from "./repository.js";
|
|
79
80
|
import { Scim } from "./scim.js";
|
|
80
81
|
import { Scorecard } from "./scorecard.js";
|
|
@@ -129,6 +130,11 @@ export class UnifiedTo extends ClientSDK {
|
|
|
129
130
|
return (this._organization ??= new Organization(this._options));
|
|
130
131
|
}
|
|
131
132
|
|
|
133
|
+
private _report?: Report;
|
|
134
|
+
get report(): Report {
|
|
135
|
+
return (this._report ??= new Report(this._options));
|
|
136
|
+
}
|
|
137
|
+
|
|
132
138
|
private _taxrate?: Taxrate;
|
|
133
139
|
get taxrate(): Taxrate {
|
|
134
140
|
return (this._taxrate ??= new Taxrate(this._options));
|