@unified-api/typescript-sdk 2.75.2 → 2.76.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 +12 -0
- package/docs/sdks/accounting/README.md +482 -0
- package/docs/sdks/expense/README.md +489 -0
- package/examples/package-lock.json +1 -1
- package/funcs/accountingCreateAccountingExpense.d.ts +15 -0
- package/funcs/accountingCreateAccountingExpense.d.ts.map +1 -0
- package/funcs/accountingCreateAccountingExpense.js +122 -0
- package/funcs/accountingCreateAccountingExpense.js.map +1 -0
- package/funcs/accountingGetAccountingExpense.d.ts +15 -0
- package/funcs/accountingGetAccountingExpense.d.ts.map +1 -0
- package/funcs/accountingGetAccountingExpense.js +125 -0
- package/funcs/accountingGetAccountingExpense.js.map +1 -0
- package/funcs/accountingListAccountingExpenses.d.ts +15 -0
- package/funcs/accountingListAccountingExpenses.d.ts.map +1 -0
- package/funcs/accountingListAccountingExpenses.js +129 -0
- package/funcs/accountingListAccountingExpenses.js.map +1 -0
- package/funcs/accountingPatchAccountingExpense.d.ts +15 -0
- package/funcs/accountingPatchAccountingExpense.d.ts.map +1 -0
- package/funcs/accountingPatchAccountingExpense.js +126 -0
- package/funcs/accountingPatchAccountingExpense.js.map +1 -0
- package/funcs/accountingRemoveAccountingExpense.d.ts +14 -0
- package/funcs/accountingRemoveAccountingExpense.d.ts.map +1 -0
- package/funcs/accountingRemoveAccountingExpense.js +122 -0
- package/funcs/accountingRemoveAccountingExpense.js.map +1 -0
- package/funcs/accountingUpdateAccountingExpense.d.ts +15 -0
- package/funcs/accountingUpdateAccountingExpense.d.ts.map +1 -0
- package/funcs/accountingUpdateAccountingExpense.js +126 -0
- package/funcs/accountingUpdateAccountingExpense.js.map +1 -0
- package/funcs/messagingListMessagingMessages.js +1 -0
- package/funcs/messagingListMessagingMessages.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/package.json +1 -1
- package/sdk/accounting.d.ts +24 -0
- package/sdk/accounting.d.ts.map +1 -1
- package/sdk/accounting.js +42 -0
- package/sdk/accounting.js.map +1 -1
- package/sdk/expense.d.ts +30 -0
- package/sdk/expense.d.ts.map +1 -0
- package/sdk/expense.js +54 -0
- package/sdk/expense.js.map +1 -0
- package/sdk/models/operations/createaccountingexpense.d.ts +45 -0
- package/sdk/models/operations/createaccountingexpense.d.ts.map +1 -0
- package/sdk/models/operations/createaccountingexpense.js +87 -0
- package/sdk/models/operations/createaccountingexpense.js.map +1 -0
- package/sdk/models/operations/getaccountingexpense.d.ts +47 -0
- package/sdk/models/operations/getaccountingexpense.d.ts.map +1 -0
- package/sdk/models/operations/getaccountingexpense.js +84 -0
- package/sdk/models/operations/getaccountingexpense.js.map +1 -0
- package/sdk/models/operations/index.d.ts +6 -0
- package/sdk/models/operations/index.d.ts.map +1 -1
- package/sdk/models/operations/index.js +6 -0
- package/sdk/models/operations/index.js.map +1 -1
- package/sdk/models/operations/listaccountingexpenses.d.ts +65 -0
- package/sdk/models/operations/listaccountingexpenses.d.ts.map +1 -0
- package/sdk/models/operations/listaccountingexpenses.js +100 -0
- package/sdk/models/operations/listaccountingexpenses.js.map +1 -0
- package/sdk/models/operations/listmessagingmessages.d.ts +5 -0
- package/sdk/models/operations/listmessagingmessages.d.ts.map +1 -1
- package/sdk/models/operations/listmessagingmessages.js +4 -0
- package/sdk/models/operations/listmessagingmessages.js.map +1 -1
- package/sdk/models/operations/patchaccountingexpense.d.ts +50 -0
- package/sdk/models/operations/patchaccountingexpense.d.ts.map +1 -0
- package/sdk/models/operations/patchaccountingexpense.js +89 -0
- package/sdk/models/operations/patchaccountingexpense.js.map +1 -0
- package/sdk/models/operations/removeaccountingexpense.d.ts +66 -0
- package/sdk/models/operations/removeaccountingexpense.d.ts.map +1 -0
- package/sdk/models/operations/removeaccountingexpense.js +115 -0
- package/sdk/models/operations/removeaccountingexpense.js.map +1 -0
- package/sdk/models/operations/updateaccountingexpense.d.ts +50 -0
- package/sdk/models/operations/updateaccountingexpense.d.ts.map +1 -0
- package/sdk/models/operations/updateaccountingexpense.js +89 -0
- package/sdk/models/operations/updateaccountingexpense.js.map +1 -0
- package/sdk/models/shared/accountingexpense.d.ts +60 -0
- package/sdk/models/shared/accountingexpense.d.ts.map +1 -0
- package/sdk/models/shared/accountingexpense.js +124 -0
- package/sdk/models/shared/accountingexpense.js.map +1 -0
- package/sdk/models/shared/atsjob.d.ts +4 -0
- package/sdk/models/shared/atsjob.d.ts.map +1 -1
- package/sdk/models/shared/atsjob.js +8 -0
- package/sdk/models/shared/atsjob.js.map +1 -1
- 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/propertyconnectionpermissions.d.ts +2 -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 +1 -0
- package/sdk/models/shared/webhook.d.ts.map +1 -1
- package/sdk/models/shared/webhook.js +1 -0
- package/sdk/models/shared/webhook.js.map +1 -1
- 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/accountingCreateAccountingExpense.ts +171 -0
- package/src/funcs/accountingGetAccountingExpense.ts +176 -0
- package/src/funcs/accountingListAccountingExpenses.ts +178 -0
- package/src/funcs/accountingPatchAccountingExpense.ts +177 -0
- package/src/funcs/accountingRemoveAccountingExpense.ts +181 -0
- package/src/funcs/accountingUpdateAccountingExpense.ts +177 -0
- package/src/funcs/messagingListMessagingMessages.ts +1 -0
- package/src/lib/config.ts +3 -3
- package/src/sdk/accounting.ts +90 -0
- package/src/sdk/expense.ts +100 -0
- package/src/sdk/models/operations/createaccountingexpense.ts +101 -0
- package/src/sdk/models/operations/getaccountingexpense.ts +101 -0
- package/src/sdk/models/operations/index.ts +6 -0
- package/src/sdk/models/operations/listaccountingexpenses.ts +135 -0
- package/src/sdk/models/operations/listmessagingmessages.ts +9 -0
- package/src/sdk/models/operations/patchaccountingexpense.ts +108 -0
- package/src/sdk/models/operations/removeaccountingexpense.ts +155 -0
- package/src/sdk/models/operations/updateaccountingexpense.ts +108 -0
- package/src/sdk/models/shared/accountingexpense.ts +154 -0
- package/src/sdk/models/shared/atsjob.ts +12 -0
- package/src/sdk/models/shared/index.ts +1 -0
- package/src/sdk/models/shared/propertyconnectionpermissions.ts +2 -0
- package/src/sdk/models/shared/webhook.ts +1 -0
- package/src/sdk/sdk.ts +6 -0
|
@@ -53,6 +53,10 @@ export type ListMessagingMessagesRequest = {
|
|
|
53
53
|
* Return only results whose updated date is equal or greater to this value
|
|
54
54
|
*/
|
|
55
55
|
updatedGte?: string | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* The user/employee ID to filter by
|
|
58
|
+
*/
|
|
59
|
+
userId?: string | undefined;
|
|
56
60
|
};
|
|
57
61
|
|
|
58
62
|
/** @internal */
|
|
@@ -75,6 +79,7 @@ export const ListMessagingMessagesRequest$inboundSchema: z.ZodType<
|
|
|
75
79
|
sort: z.string().optional(),
|
|
76
80
|
start_gte: z.string().optional(),
|
|
77
81
|
updated_gte: z.string().optional(),
|
|
82
|
+
user_id: z.string().optional(),
|
|
78
83
|
}).transform((v) => {
|
|
79
84
|
return remap$(v, {
|
|
80
85
|
"channel_id": "channelId",
|
|
@@ -83,6 +88,7 @@ export const ListMessagingMessagesRequest$inboundSchema: z.ZodType<
|
|
|
83
88
|
"parent_id": "parentId",
|
|
84
89
|
"start_gte": "startGte",
|
|
85
90
|
"updated_gte": "updatedGte",
|
|
91
|
+
"user_id": "userId",
|
|
86
92
|
});
|
|
87
93
|
});
|
|
88
94
|
|
|
@@ -102,6 +108,7 @@ export type ListMessagingMessagesRequest$Outbound = {
|
|
|
102
108
|
sort?: string | undefined;
|
|
103
109
|
start_gte?: string | undefined;
|
|
104
110
|
updated_gte?: string | undefined;
|
|
111
|
+
user_id?: string | undefined;
|
|
105
112
|
};
|
|
106
113
|
|
|
107
114
|
/** @internal */
|
|
@@ -124,6 +131,7 @@ export const ListMessagingMessagesRequest$outboundSchema: z.ZodType<
|
|
|
124
131
|
sort: z.string().optional(),
|
|
125
132
|
startGte: z.string().optional(),
|
|
126
133
|
updatedGte: z.string().optional(),
|
|
134
|
+
userId: z.string().optional(),
|
|
127
135
|
}).transform((v) => {
|
|
128
136
|
return remap$(v, {
|
|
129
137
|
channelId: "channel_id",
|
|
@@ -132,6 +140,7 @@ export const ListMessagingMessagesRequest$outboundSchema: z.ZodType<
|
|
|
132
140
|
parentId: "parent_id",
|
|
133
141
|
startGte: "start_gte",
|
|
134
142
|
updatedGte: "updated_gte",
|
|
143
|
+
userId: "user_id",
|
|
135
144
|
});
|
|
136
145
|
});
|
|
137
146
|
|
|
@@ -0,0 +1,108 @@
|
|
|
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
|
+
import * as shared from "../shared/index.js";
|
|
11
|
+
|
|
12
|
+
export type PatchAccountingExpenseRequest = {
|
|
13
|
+
accountingExpense: shared.AccountingExpense;
|
|
14
|
+
/**
|
|
15
|
+
* ID of the connection
|
|
16
|
+
*/
|
|
17
|
+
connectionId: string;
|
|
18
|
+
/**
|
|
19
|
+
* Comma-delimited fields to return
|
|
20
|
+
*/
|
|
21
|
+
fields?: Array<string> | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* ID of the Expense
|
|
24
|
+
*/
|
|
25
|
+
id: string;
|
|
26
|
+
/**
|
|
27
|
+
* Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar
|
|
28
|
+
*/
|
|
29
|
+
raw?: string | undefined;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const PatchAccountingExpenseRequest$inboundSchema: z.ZodType<
|
|
34
|
+
PatchAccountingExpenseRequest,
|
|
35
|
+
z.ZodTypeDef,
|
|
36
|
+
unknown
|
|
37
|
+
> = z.object({
|
|
38
|
+
AccountingExpense: shared.AccountingExpense$inboundSchema,
|
|
39
|
+
connection_id: z.string(),
|
|
40
|
+
fields: z.array(z.string()).optional(),
|
|
41
|
+
id: z.string(),
|
|
42
|
+
raw: z.string().optional(),
|
|
43
|
+
}).transform((v) => {
|
|
44
|
+
return remap$(v, {
|
|
45
|
+
"AccountingExpense": "accountingExpense",
|
|
46
|
+
"connection_id": "connectionId",
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
/** @internal */
|
|
51
|
+
export type PatchAccountingExpenseRequest$Outbound = {
|
|
52
|
+
AccountingExpense: shared.AccountingExpense$Outbound;
|
|
53
|
+
connection_id: string;
|
|
54
|
+
fields?: Array<string> | undefined;
|
|
55
|
+
id: string;
|
|
56
|
+
raw?: string | undefined;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/** @internal */
|
|
60
|
+
export const PatchAccountingExpenseRequest$outboundSchema: z.ZodType<
|
|
61
|
+
PatchAccountingExpenseRequest$Outbound,
|
|
62
|
+
z.ZodTypeDef,
|
|
63
|
+
PatchAccountingExpenseRequest
|
|
64
|
+
> = z.object({
|
|
65
|
+
accountingExpense: shared.AccountingExpense$outboundSchema,
|
|
66
|
+
connectionId: z.string(),
|
|
67
|
+
fields: z.array(z.string()).optional(),
|
|
68
|
+
id: z.string(),
|
|
69
|
+
raw: z.string().optional(),
|
|
70
|
+
}).transform((v) => {
|
|
71
|
+
return remap$(v, {
|
|
72
|
+
accountingExpense: "AccountingExpense",
|
|
73
|
+
connectionId: "connection_id",
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* @internal
|
|
79
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
80
|
+
*/
|
|
81
|
+
export namespace PatchAccountingExpenseRequest$ {
|
|
82
|
+
/** @deprecated use `PatchAccountingExpenseRequest$inboundSchema` instead. */
|
|
83
|
+
export const inboundSchema = PatchAccountingExpenseRequest$inboundSchema;
|
|
84
|
+
/** @deprecated use `PatchAccountingExpenseRequest$outboundSchema` instead. */
|
|
85
|
+
export const outboundSchema = PatchAccountingExpenseRequest$outboundSchema;
|
|
86
|
+
/** @deprecated use `PatchAccountingExpenseRequest$Outbound` instead. */
|
|
87
|
+
export type Outbound = PatchAccountingExpenseRequest$Outbound;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function patchAccountingExpenseRequestToJSON(
|
|
91
|
+
patchAccountingExpenseRequest: PatchAccountingExpenseRequest,
|
|
92
|
+
): string {
|
|
93
|
+
return JSON.stringify(
|
|
94
|
+
PatchAccountingExpenseRequest$outboundSchema.parse(
|
|
95
|
+
patchAccountingExpenseRequest,
|
|
96
|
+
),
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function patchAccountingExpenseRequestFromJSON(
|
|
101
|
+
jsonString: string,
|
|
102
|
+
): SafeParseResult<PatchAccountingExpenseRequest, SDKValidationError> {
|
|
103
|
+
return safeParse(
|
|
104
|
+
jsonString,
|
|
105
|
+
(x) => PatchAccountingExpenseRequest$inboundSchema.parse(JSON.parse(x)),
|
|
106
|
+
`Failed to parse 'PatchAccountingExpenseRequest' from JSON`,
|
|
107
|
+
);
|
|
108
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
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 RemoveAccountingExpenseRequest = {
|
|
12
|
+
/**
|
|
13
|
+
* ID of the connection
|
|
14
|
+
*/
|
|
15
|
+
connectionId: string;
|
|
16
|
+
/**
|
|
17
|
+
* ID of the Expense
|
|
18
|
+
*/
|
|
19
|
+
id: string;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export type RemoveAccountingExpenseResponse = {
|
|
23
|
+
headers: { [k: string]: Array<string> };
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const RemoveAccountingExpenseRequest$inboundSchema: z.ZodType<
|
|
28
|
+
RemoveAccountingExpenseRequest,
|
|
29
|
+
z.ZodTypeDef,
|
|
30
|
+
unknown
|
|
31
|
+
> = z.object({
|
|
32
|
+
connection_id: z.string(),
|
|
33
|
+
id: z.string(),
|
|
34
|
+
}).transform((v) => {
|
|
35
|
+
return remap$(v, {
|
|
36
|
+
"connection_id": "connectionId",
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export type RemoveAccountingExpenseRequest$Outbound = {
|
|
42
|
+
connection_id: string;
|
|
43
|
+
id: string;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const RemoveAccountingExpenseRequest$outboundSchema: z.ZodType<
|
|
48
|
+
RemoveAccountingExpenseRequest$Outbound,
|
|
49
|
+
z.ZodTypeDef,
|
|
50
|
+
RemoveAccountingExpenseRequest
|
|
51
|
+
> = z.object({
|
|
52
|
+
connectionId: z.string(),
|
|
53
|
+
id: z.string(),
|
|
54
|
+
}).transform((v) => {
|
|
55
|
+
return remap$(v, {
|
|
56
|
+
connectionId: "connection_id",
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* @internal
|
|
62
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
63
|
+
*/
|
|
64
|
+
export namespace RemoveAccountingExpenseRequest$ {
|
|
65
|
+
/** @deprecated use `RemoveAccountingExpenseRequest$inboundSchema` instead. */
|
|
66
|
+
export const inboundSchema = RemoveAccountingExpenseRequest$inboundSchema;
|
|
67
|
+
/** @deprecated use `RemoveAccountingExpenseRequest$outboundSchema` instead. */
|
|
68
|
+
export const outboundSchema = RemoveAccountingExpenseRequest$outboundSchema;
|
|
69
|
+
/** @deprecated use `RemoveAccountingExpenseRequest$Outbound` instead. */
|
|
70
|
+
export type Outbound = RemoveAccountingExpenseRequest$Outbound;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function removeAccountingExpenseRequestToJSON(
|
|
74
|
+
removeAccountingExpenseRequest: RemoveAccountingExpenseRequest,
|
|
75
|
+
): string {
|
|
76
|
+
return JSON.stringify(
|
|
77
|
+
RemoveAccountingExpenseRequest$outboundSchema.parse(
|
|
78
|
+
removeAccountingExpenseRequest,
|
|
79
|
+
),
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function removeAccountingExpenseRequestFromJSON(
|
|
84
|
+
jsonString: string,
|
|
85
|
+
): SafeParseResult<RemoveAccountingExpenseRequest, SDKValidationError> {
|
|
86
|
+
return safeParse(
|
|
87
|
+
jsonString,
|
|
88
|
+
(x) => RemoveAccountingExpenseRequest$inboundSchema.parse(JSON.parse(x)),
|
|
89
|
+
`Failed to parse 'RemoveAccountingExpenseRequest' from JSON`,
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/** @internal */
|
|
94
|
+
export const RemoveAccountingExpenseResponse$inboundSchema: z.ZodType<
|
|
95
|
+
RemoveAccountingExpenseResponse,
|
|
96
|
+
z.ZodTypeDef,
|
|
97
|
+
unknown
|
|
98
|
+
> = z.object({
|
|
99
|
+
Headers: z.record(z.array(z.string())),
|
|
100
|
+
}).transform((v) => {
|
|
101
|
+
return remap$(v, {
|
|
102
|
+
"Headers": "headers",
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
/** @internal */
|
|
107
|
+
export type RemoveAccountingExpenseResponse$Outbound = {
|
|
108
|
+
Headers: { [k: string]: Array<string> };
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
/** @internal */
|
|
112
|
+
export const RemoveAccountingExpenseResponse$outboundSchema: z.ZodType<
|
|
113
|
+
RemoveAccountingExpenseResponse$Outbound,
|
|
114
|
+
z.ZodTypeDef,
|
|
115
|
+
RemoveAccountingExpenseResponse
|
|
116
|
+
> = z.object({
|
|
117
|
+
headers: z.record(z.array(z.string())),
|
|
118
|
+
}).transform((v) => {
|
|
119
|
+
return remap$(v, {
|
|
120
|
+
headers: "Headers",
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* @internal
|
|
126
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
127
|
+
*/
|
|
128
|
+
export namespace RemoveAccountingExpenseResponse$ {
|
|
129
|
+
/** @deprecated use `RemoveAccountingExpenseResponse$inboundSchema` instead. */
|
|
130
|
+
export const inboundSchema = RemoveAccountingExpenseResponse$inboundSchema;
|
|
131
|
+
/** @deprecated use `RemoveAccountingExpenseResponse$outboundSchema` instead. */
|
|
132
|
+
export const outboundSchema = RemoveAccountingExpenseResponse$outboundSchema;
|
|
133
|
+
/** @deprecated use `RemoveAccountingExpenseResponse$Outbound` instead. */
|
|
134
|
+
export type Outbound = RemoveAccountingExpenseResponse$Outbound;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export function removeAccountingExpenseResponseToJSON(
|
|
138
|
+
removeAccountingExpenseResponse: RemoveAccountingExpenseResponse,
|
|
139
|
+
): string {
|
|
140
|
+
return JSON.stringify(
|
|
141
|
+
RemoveAccountingExpenseResponse$outboundSchema.parse(
|
|
142
|
+
removeAccountingExpenseResponse,
|
|
143
|
+
),
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export function removeAccountingExpenseResponseFromJSON(
|
|
148
|
+
jsonString: string,
|
|
149
|
+
): SafeParseResult<RemoveAccountingExpenseResponse, SDKValidationError> {
|
|
150
|
+
return safeParse(
|
|
151
|
+
jsonString,
|
|
152
|
+
(x) => RemoveAccountingExpenseResponse$inboundSchema.parse(JSON.parse(x)),
|
|
153
|
+
`Failed to parse 'RemoveAccountingExpenseResponse' from JSON`,
|
|
154
|
+
);
|
|
155
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
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
|
+
import * as shared from "../shared/index.js";
|
|
11
|
+
|
|
12
|
+
export type UpdateAccountingExpenseRequest = {
|
|
13
|
+
accountingExpense: shared.AccountingExpense;
|
|
14
|
+
/**
|
|
15
|
+
* ID of the connection
|
|
16
|
+
*/
|
|
17
|
+
connectionId: string;
|
|
18
|
+
/**
|
|
19
|
+
* Comma-delimited fields to return
|
|
20
|
+
*/
|
|
21
|
+
fields?: Array<string> | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* ID of the Expense
|
|
24
|
+
*/
|
|
25
|
+
id: string;
|
|
26
|
+
/**
|
|
27
|
+
* Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar
|
|
28
|
+
*/
|
|
29
|
+
raw?: string | undefined;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const UpdateAccountingExpenseRequest$inboundSchema: z.ZodType<
|
|
34
|
+
UpdateAccountingExpenseRequest,
|
|
35
|
+
z.ZodTypeDef,
|
|
36
|
+
unknown
|
|
37
|
+
> = z.object({
|
|
38
|
+
AccountingExpense: shared.AccountingExpense$inboundSchema,
|
|
39
|
+
connection_id: z.string(),
|
|
40
|
+
fields: z.array(z.string()).optional(),
|
|
41
|
+
id: z.string(),
|
|
42
|
+
raw: z.string().optional(),
|
|
43
|
+
}).transform((v) => {
|
|
44
|
+
return remap$(v, {
|
|
45
|
+
"AccountingExpense": "accountingExpense",
|
|
46
|
+
"connection_id": "connectionId",
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
/** @internal */
|
|
51
|
+
export type UpdateAccountingExpenseRequest$Outbound = {
|
|
52
|
+
AccountingExpense: shared.AccountingExpense$Outbound;
|
|
53
|
+
connection_id: string;
|
|
54
|
+
fields?: Array<string> | undefined;
|
|
55
|
+
id: string;
|
|
56
|
+
raw?: string | undefined;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/** @internal */
|
|
60
|
+
export const UpdateAccountingExpenseRequest$outboundSchema: z.ZodType<
|
|
61
|
+
UpdateAccountingExpenseRequest$Outbound,
|
|
62
|
+
z.ZodTypeDef,
|
|
63
|
+
UpdateAccountingExpenseRequest
|
|
64
|
+
> = z.object({
|
|
65
|
+
accountingExpense: shared.AccountingExpense$outboundSchema,
|
|
66
|
+
connectionId: z.string(),
|
|
67
|
+
fields: z.array(z.string()).optional(),
|
|
68
|
+
id: z.string(),
|
|
69
|
+
raw: z.string().optional(),
|
|
70
|
+
}).transform((v) => {
|
|
71
|
+
return remap$(v, {
|
|
72
|
+
accountingExpense: "AccountingExpense",
|
|
73
|
+
connectionId: "connection_id",
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* @internal
|
|
79
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
80
|
+
*/
|
|
81
|
+
export namespace UpdateAccountingExpenseRequest$ {
|
|
82
|
+
/** @deprecated use `UpdateAccountingExpenseRequest$inboundSchema` instead. */
|
|
83
|
+
export const inboundSchema = UpdateAccountingExpenseRequest$inboundSchema;
|
|
84
|
+
/** @deprecated use `UpdateAccountingExpenseRequest$outboundSchema` instead. */
|
|
85
|
+
export const outboundSchema = UpdateAccountingExpenseRequest$outboundSchema;
|
|
86
|
+
/** @deprecated use `UpdateAccountingExpenseRequest$Outbound` instead. */
|
|
87
|
+
export type Outbound = UpdateAccountingExpenseRequest$Outbound;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function updateAccountingExpenseRequestToJSON(
|
|
91
|
+
updateAccountingExpenseRequest: UpdateAccountingExpenseRequest,
|
|
92
|
+
): string {
|
|
93
|
+
return JSON.stringify(
|
|
94
|
+
UpdateAccountingExpenseRequest$outboundSchema.parse(
|
|
95
|
+
updateAccountingExpenseRequest,
|
|
96
|
+
),
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function updateAccountingExpenseRequestFromJSON(
|
|
101
|
+
jsonString: string,
|
|
102
|
+
): SafeParseResult<UpdateAccountingExpenseRequest, SDKValidationError> {
|
|
103
|
+
return safeParse(
|
|
104
|
+
jsonString,
|
|
105
|
+
(x) => UpdateAccountingExpenseRequest$inboundSchema.parse(JSON.parse(x)),
|
|
106
|
+
`Failed to parse 'UpdateAccountingExpenseRequest' from JSON`,
|
|
107
|
+
);
|
|
108
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
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
|
+
import {
|
|
11
|
+
AccountingLineitem,
|
|
12
|
+
AccountingLineitem$inboundSchema,
|
|
13
|
+
AccountingLineitem$Outbound,
|
|
14
|
+
AccountingLineitem$outboundSchema,
|
|
15
|
+
} from "./accountinglineitem.js";
|
|
16
|
+
|
|
17
|
+
export type AccountingExpense = {
|
|
18
|
+
approvedAt?: Date | undefined;
|
|
19
|
+
approverUserId?: string | undefined;
|
|
20
|
+
createdAt?: Date | undefined;
|
|
21
|
+
currency?: string | undefined;
|
|
22
|
+
id?: string | undefined;
|
|
23
|
+
lineitems?: Array<AccountingLineitem> | undefined;
|
|
24
|
+
name?: string | undefined;
|
|
25
|
+
raw?: { [k: string]: any } | undefined;
|
|
26
|
+
reimbursedAmount?: number | undefined;
|
|
27
|
+
reimbursedAt?: Date | undefined;
|
|
28
|
+
taxAmount?: number | undefined;
|
|
29
|
+
totalAmount?: number | undefined;
|
|
30
|
+
updatedAt?: Date | undefined;
|
|
31
|
+
userId?: string | undefined;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const AccountingExpense$inboundSchema: z.ZodType<
|
|
36
|
+
AccountingExpense,
|
|
37
|
+
z.ZodTypeDef,
|
|
38
|
+
unknown
|
|
39
|
+
> = z.object({
|
|
40
|
+
approved_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
41
|
+
.optional(),
|
|
42
|
+
approver_user_id: z.string().optional(),
|
|
43
|
+
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
44
|
+
.optional(),
|
|
45
|
+
currency: z.string().optional(),
|
|
46
|
+
id: z.string().optional(),
|
|
47
|
+
lineitems: z.array(AccountingLineitem$inboundSchema).optional(),
|
|
48
|
+
name: z.string().optional(),
|
|
49
|
+
raw: z.record(z.any()).optional(),
|
|
50
|
+
reimbursed_amount: z.number().optional(),
|
|
51
|
+
reimbursed_at: z.string().datetime({ offset: true }).transform(v =>
|
|
52
|
+
new Date(v)
|
|
53
|
+
).optional(),
|
|
54
|
+
tax_amount: z.number().optional(),
|
|
55
|
+
total_amount: z.number().optional(),
|
|
56
|
+
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
57
|
+
.optional(),
|
|
58
|
+
user_id: z.string().optional(),
|
|
59
|
+
}).transform((v) => {
|
|
60
|
+
return remap$(v, {
|
|
61
|
+
"approved_at": "approvedAt",
|
|
62
|
+
"approver_user_id": "approverUserId",
|
|
63
|
+
"created_at": "createdAt",
|
|
64
|
+
"reimbursed_amount": "reimbursedAmount",
|
|
65
|
+
"reimbursed_at": "reimbursedAt",
|
|
66
|
+
"tax_amount": "taxAmount",
|
|
67
|
+
"total_amount": "totalAmount",
|
|
68
|
+
"updated_at": "updatedAt",
|
|
69
|
+
"user_id": "userId",
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
/** @internal */
|
|
74
|
+
export type AccountingExpense$Outbound = {
|
|
75
|
+
approved_at?: string | undefined;
|
|
76
|
+
approver_user_id?: string | undefined;
|
|
77
|
+
created_at?: string | undefined;
|
|
78
|
+
currency?: string | undefined;
|
|
79
|
+
id?: string | undefined;
|
|
80
|
+
lineitems?: Array<AccountingLineitem$Outbound> | undefined;
|
|
81
|
+
name?: string | undefined;
|
|
82
|
+
raw?: { [k: string]: any } | undefined;
|
|
83
|
+
reimbursed_amount?: number | undefined;
|
|
84
|
+
reimbursed_at?: string | undefined;
|
|
85
|
+
tax_amount?: number | undefined;
|
|
86
|
+
total_amount?: number | undefined;
|
|
87
|
+
updated_at?: string | undefined;
|
|
88
|
+
user_id?: string | undefined;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
/** @internal */
|
|
92
|
+
export const AccountingExpense$outboundSchema: z.ZodType<
|
|
93
|
+
AccountingExpense$Outbound,
|
|
94
|
+
z.ZodTypeDef,
|
|
95
|
+
AccountingExpense
|
|
96
|
+
> = z.object({
|
|
97
|
+
approvedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
98
|
+
approverUserId: z.string().optional(),
|
|
99
|
+
createdAt: z.date().transform(v => v.toISOString()).optional(),
|
|
100
|
+
currency: z.string().optional(),
|
|
101
|
+
id: z.string().optional(),
|
|
102
|
+
lineitems: z.array(AccountingLineitem$outboundSchema).optional(),
|
|
103
|
+
name: z.string().optional(),
|
|
104
|
+
raw: z.record(z.any()).optional(),
|
|
105
|
+
reimbursedAmount: z.number().optional(),
|
|
106
|
+
reimbursedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
107
|
+
taxAmount: z.number().optional(),
|
|
108
|
+
totalAmount: z.number().optional(),
|
|
109
|
+
updatedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
110
|
+
userId: z.string().optional(),
|
|
111
|
+
}).transform((v) => {
|
|
112
|
+
return remap$(v, {
|
|
113
|
+
approvedAt: "approved_at",
|
|
114
|
+
approverUserId: "approver_user_id",
|
|
115
|
+
createdAt: "created_at",
|
|
116
|
+
reimbursedAmount: "reimbursed_amount",
|
|
117
|
+
reimbursedAt: "reimbursed_at",
|
|
118
|
+
taxAmount: "tax_amount",
|
|
119
|
+
totalAmount: "total_amount",
|
|
120
|
+
updatedAt: "updated_at",
|
|
121
|
+
userId: "user_id",
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* @internal
|
|
127
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
128
|
+
*/
|
|
129
|
+
export namespace AccountingExpense$ {
|
|
130
|
+
/** @deprecated use `AccountingExpense$inboundSchema` instead. */
|
|
131
|
+
export const inboundSchema = AccountingExpense$inboundSchema;
|
|
132
|
+
/** @deprecated use `AccountingExpense$outboundSchema` instead. */
|
|
133
|
+
export const outboundSchema = AccountingExpense$outboundSchema;
|
|
134
|
+
/** @deprecated use `AccountingExpense$Outbound` instead. */
|
|
135
|
+
export type Outbound = AccountingExpense$Outbound;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export function accountingExpenseToJSON(
|
|
139
|
+
accountingExpense: AccountingExpense,
|
|
140
|
+
): string {
|
|
141
|
+
return JSON.stringify(
|
|
142
|
+
AccountingExpense$outboundSchema.parse(accountingExpense),
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export function accountingExpenseFromJSON(
|
|
147
|
+
jsonString: string,
|
|
148
|
+
): SafeParseResult<AccountingExpense, SDKValidationError> {
|
|
149
|
+
return safeParse(
|
|
150
|
+
jsonString,
|
|
151
|
+
(x) => AccountingExpense$inboundSchema.parse(JSON.parse(x)),
|
|
152
|
+
`Failed to parse 'AccountingExpense' from JSON`,
|
|
153
|
+
);
|
|
154
|
+
}
|
|
@@ -98,6 +98,8 @@ export type AtsJob = {
|
|
|
98
98
|
id?: string | undefined;
|
|
99
99
|
languageLocale?: string | undefined;
|
|
100
100
|
metadata?: Array<AtsMetadata> | undefined;
|
|
101
|
+
minimumDegree?: string | undefined;
|
|
102
|
+
minimumExperienceYears?: number | undefined;
|
|
101
103
|
name?: string | undefined;
|
|
102
104
|
numberOfOpenings?: number | undefined;
|
|
103
105
|
openings?: Array<AtsJobOpening> | undefined;
|
|
@@ -200,6 +202,8 @@ export const AtsJob$inboundSchema: z.ZodType<AtsJob, z.ZodTypeDef, unknown> = z
|
|
|
200
202
|
id: z.string().optional(),
|
|
201
203
|
language_locale: z.string().optional(),
|
|
202
204
|
metadata: z.array(AtsMetadata$inboundSchema).optional(),
|
|
205
|
+
minimum_degree: z.string().optional(),
|
|
206
|
+
minimum_experience_years: z.number().optional(),
|
|
203
207
|
name: z.string().optional(),
|
|
204
208
|
number_of_openings: z.number().optional(),
|
|
205
209
|
openings: z.array(AtsJobOpening$inboundSchema).optional(),
|
|
@@ -221,6 +225,8 @@ export const AtsJob$inboundSchema: z.ZodType<AtsJob, z.ZodTypeDef, unknown> = z
|
|
|
221
225
|
"employment_type": "employmentType",
|
|
222
226
|
"hiring_manager_ids": "hiringManagerIds",
|
|
223
227
|
"language_locale": "languageLocale",
|
|
228
|
+
"minimum_degree": "minimumDegree",
|
|
229
|
+
"minimum_experience_years": "minimumExperienceYears",
|
|
224
230
|
"number_of_openings": "numberOfOpenings",
|
|
225
231
|
"public_job_urls": "publicJobUrls",
|
|
226
232
|
"recruiter_ids": "recruiterIds",
|
|
@@ -243,6 +249,8 @@ export type AtsJob$Outbound = {
|
|
|
243
249
|
id?: string | undefined;
|
|
244
250
|
language_locale?: string | undefined;
|
|
245
251
|
metadata?: Array<AtsMetadata$Outbound> | undefined;
|
|
252
|
+
minimum_degree?: string | undefined;
|
|
253
|
+
minimum_experience_years?: number | undefined;
|
|
246
254
|
name?: string | undefined;
|
|
247
255
|
number_of_openings?: number | undefined;
|
|
248
256
|
openings?: Array<AtsJobOpening$Outbound> | undefined;
|
|
@@ -275,6 +283,8 @@ export const AtsJob$outboundSchema: z.ZodType<
|
|
|
275
283
|
id: z.string().optional(),
|
|
276
284
|
languageLocale: z.string().optional(),
|
|
277
285
|
metadata: z.array(AtsMetadata$outboundSchema).optional(),
|
|
286
|
+
minimumDegree: z.string().optional(),
|
|
287
|
+
minimumExperienceYears: z.number().optional(),
|
|
278
288
|
name: z.string().optional(),
|
|
279
289
|
numberOfOpenings: z.number().optional(),
|
|
280
290
|
openings: z.array(AtsJobOpening$outboundSchema).optional(),
|
|
@@ -294,6 +304,8 @@ export const AtsJob$outboundSchema: z.ZodType<
|
|
|
294
304
|
employmentType: "employment_type",
|
|
295
305
|
hiringManagerIds: "hiring_manager_ids",
|
|
296
306
|
languageLocale: "language_locale",
|
|
307
|
+
minimumDegree: "minimum_degree",
|
|
308
|
+
minimumExperienceYears: "minimum_experience_years",
|
|
297
309
|
numberOfOpenings: "number_of_openings",
|
|
298
310
|
publicJobUrls: "public_job_urls",
|
|
299
311
|
recruiterIds: "recruiter_ids",
|
|
@@ -13,6 +13,7 @@ export * from "./accountingcontact.js";
|
|
|
13
13
|
export * from "./accountingcontactpaymentmethod.js";
|
|
14
14
|
export * from "./accountingcreditmemo.js";
|
|
15
15
|
export * from "./accountingemail.js";
|
|
16
|
+
export * from "./accountingexpense.js";
|
|
16
17
|
export * from "./accountinginvoice.js";
|
|
17
18
|
export * from "./accountingjournal.js";
|
|
18
19
|
export * from "./accountingjournallineitem.js";
|
|
@@ -24,6 +24,8 @@ export const PropertyConnectionPermissions = {
|
|
|
24
24
|
AccountingCreditmemoWrite: "accounting_creditmemo_write",
|
|
25
25
|
AccountingContactRead: "accounting_contact_read",
|
|
26
26
|
AccountingContactWrite: "accounting_contact_write",
|
|
27
|
+
AccountingExpenseRead: "accounting_expense_read",
|
|
28
|
+
AccountingExpenseWrite: "accounting_expense_write",
|
|
27
29
|
AccountingTaxrateRead: "accounting_taxrate_read",
|
|
28
30
|
AccountingTaxrateWrite: "accounting_taxrate_write",
|
|
29
31
|
AccountingOrganizationRead: "accounting_organization_read",
|
|
@@ -47,6 +47,7 @@ export const ObjectType = {
|
|
|
47
47
|
AccountingProfitloss: "accounting_profitloss",
|
|
48
48
|
AccountingTrialbalance: "accounting_trialbalance",
|
|
49
49
|
AccountingCategory: "accounting_category",
|
|
50
|
+
AccountingExpense: "accounting_expense",
|
|
50
51
|
PaymentPayment: "payment_payment",
|
|
51
52
|
PaymentLink: "payment_link",
|
|
52
53
|
PaymentPayout: "payment_payout",
|
package/src/sdk/sdk.ts
CHANGED
|
@@ -40,6 +40,7 @@ import { Embedding } from "./embedding.js";
|
|
|
40
40
|
import { Employee } from "./employee.js";
|
|
41
41
|
import { Enrich } from "./enrich.js";
|
|
42
42
|
import { Event } from "./event.js";
|
|
43
|
+
import { Expense } from "./expense.js";
|
|
43
44
|
import { FileT } from "./file.js";
|
|
44
45
|
import { Genai } from "./genai.js";
|
|
45
46
|
import { Group } from "./group.js";
|
|
@@ -146,6 +147,11 @@ export class UnifiedTo extends ClientSDK {
|
|
|
146
147
|
return (this._creditmemo ??= new Creditmemo(this._options));
|
|
147
148
|
}
|
|
148
149
|
|
|
150
|
+
private _expense?: Expense;
|
|
151
|
+
get expense(): Expense {
|
|
152
|
+
return (this._expense ??= new Expense(this._options));
|
|
153
|
+
}
|
|
154
|
+
|
|
149
155
|
private _invoice?: Invoice;
|
|
150
156
|
get invoice(): Invoice {
|
|
151
157
|
return (this._invoice ??= new Invoice(this._options));
|