@unified-api/typescript-sdk 2.9.6 → 2.9.8
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/funcs/messageListMessagingMessages.d.ts.map +1 -1
- package/funcs/messageListMessagingMessages.js +1 -0
- package/funcs/messageListMessagingMessages.js.map +1 -1
- package/funcs/messagingListMessagingMessages.d.ts.map +1 -1
- package/funcs/messagingListMessagingMessages.js +1 -0
- package/funcs/messagingListMessagingMessages.js.map +1 -1
- package/hooks/hooks.d.ts.map +1 -1
- package/hooks/hooks.js +18 -0
- package/hooks/hooks.js.map +1 -1
- package/hooks/types.d.ts +1 -0
- package/hooks/types.d.ts.map +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/package.json +1 -3
- package/sdk/models/operations/listmessagingmessages.d.ts +2 -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/listunifiedapicalls.d.ts +2 -2
- package/sdk/models/operations/listunifiedwebhooks.d.ts +6 -54
- package/sdk/models/operations/listunifiedwebhooks.d.ts.map +1 -1
- package/sdk/models/operations/listunifiedwebhooks.js +5 -51
- package/sdk/models/operations/listunifiedwebhooks.js.map +1 -1
- package/sdk/models/shared/integrationsupport.d.ts +30 -0
- package/sdk/models/shared/integrationsupport.d.ts.map +1 -1
- package/sdk/models/shared/integrationsupport.js +30 -5
- package/sdk/models/shared/integrationsupport.js.map +1 -1
- package/sdk/models/shared/messagingmessage.d.ts +2 -0
- package/sdk/models/shared/messagingmessage.d.ts.map +1 -1
- package/sdk/models/shared/messagingmessage.js +4 -0
- package/sdk/models/shared/messagingmessage.js.map +1 -1
- package/src/funcs/messageListMessagingMessages.ts +1 -0
- package/src/funcs/messagingListMessagingMessages.ts +1 -0
- package/src/hooks/hooks.ts +20 -0
- package/src/hooks/types.ts +7 -0
- package/src/lib/config.ts +3 -3
- package/src/sdk/models/operations/listmessagingmessages.ts +6 -0
- package/src/sdk/models/operations/listunifiedapicalls.ts +2 -2
- package/src/sdk/models/operations/listunifiedwebhooks.ts +10 -110
- package/src/sdk/models/shared/integrationsupport.ts +32 -0
- package/src/sdk/models/shared/messagingmessage.ts +6 -0
|
@@ -8,30 +8,20 @@ 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
|
-
/**
|
|
12
|
-
* A connection represents a specific authentication of an integration.
|
|
13
|
-
*/
|
|
14
|
-
export type ConnectionId = {};
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Informational object for supported integrations.
|
|
18
|
-
*/
|
|
19
|
-
export type IntegrationType = {};
|
|
20
|
-
|
|
21
11
|
export type ListUnifiedWebhooksRequest = {
|
|
22
12
|
/**
|
|
23
|
-
*
|
|
13
|
+
* Filter the results to just this integration
|
|
24
14
|
*/
|
|
25
|
-
connectionId?:
|
|
15
|
+
connectionId?: string | undefined;
|
|
26
16
|
/**
|
|
27
17
|
* Return only results whose created date is equal or less to this value
|
|
28
18
|
*/
|
|
29
19
|
createdLte?: Date | undefined;
|
|
30
20
|
env?: string | undefined;
|
|
31
21
|
/**
|
|
32
|
-
*
|
|
22
|
+
* Filter the results to just this integration
|
|
33
23
|
*/
|
|
34
|
-
integrationType?:
|
|
24
|
+
integrationType?: string | undefined;
|
|
35
25
|
limit?: number | undefined;
|
|
36
26
|
/**
|
|
37
27
|
* Filter the results for webhooks for only this object
|
|
@@ -46,107 +36,17 @@ export type ListUnifiedWebhooksRequest = {
|
|
|
46
36
|
updatedGte?: Date | undefined;
|
|
47
37
|
};
|
|
48
38
|
|
|
49
|
-
/** @internal */
|
|
50
|
-
export const ConnectionId$inboundSchema: z.ZodType<
|
|
51
|
-
ConnectionId,
|
|
52
|
-
z.ZodTypeDef,
|
|
53
|
-
unknown
|
|
54
|
-
> = z.object({});
|
|
55
|
-
|
|
56
|
-
/** @internal */
|
|
57
|
-
export type ConnectionId$Outbound = {};
|
|
58
|
-
|
|
59
|
-
/** @internal */
|
|
60
|
-
export const ConnectionId$outboundSchema: z.ZodType<
|
|
61
|
-
ConnectionId$Outbound,
|
|
62
|
-
z.ZodTypeDef,
|
|
63
|
-
ConnectionId
|
|
64
|
-
> = z.object({});
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* @internal
|
|
68
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
69
|
-
*/
|
|
70
|
-
export namespace ConnectionId$ {
|
|
71
|
-
/** @deprecated use `ConnectionId$inboundSchema` instead. */
|
|
72
|
-
export const inboundSchema = ConnectionId$inboundSchema;
|
|
73
|
-
/** @deprecated use `ConnectionId$outboundSchema` instead. */
|
|
74
|
-
export const outboundSchema = ConnectionId$outboundSchema;
|
|
75
|
-
/** @deprecated use `ConnectionId$Outbound` instead. */
|
|
76
|
-
export type Outbound = ConnectionId$Outbound;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export function connectionIdToJSON(connectionId: ConnectionId): string {
|
|
80
|
-
return JSON.stringify(ConnectionId$outboundSchema.parse(connectionId));
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export function connectionIdFromJSON(
|
|
84
|
-
jsonString: string,
|
|
85
|
-
): SafeParseResult<ConnectionId, SDKValidationError> {
|
|
86
|
-
return safeParse(
|
|
87
|
-
jsonString,
|
|
88
|
-
(x) => ConnectionId$inboundSchema.parse(JSON.parse(x)),
|
|
89
|
-
`Failed to parse 'ConnectionId' from JSON`,
|
|
90
|
-
);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/** @internal */
|
|
94
|
-
export const IntegrationType$inboundSchema: z.ZodType<
|
|
95
|
-
IntegrationType,
|
|
96
|
-
z.ZodTypeDef,
|
|
97
|
-
unknown
|
|
98
|
-
> = z.object({});
|
|
99
|
-
|
|
100
|
-
/** @internal */
|
|
101
|
-
export type IntegrationType$Outbound = {};
|
|
102
|
-
|
|
103
|
-
/** @internal */
|
|
104
|
-
export const IntegrationType$outboundSchema: z.ZodType<
|
|
105
|
-
IntegrationType$Outbound,
|
|
106
|
-
z.ZodTypeDef,
|
|
107
|
-
IntegrationType
|
|
108
|
-
> = z.object({});
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* @internal
|
|
112
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
113
|
-
*/
|
|
114
|
-
export namespace IntegrationType$ {
|
|
115
|
-
/** @deprecated use `IntegrationType$inboundSchema` instead. */
|
|
116
|
-
export const inboundSchema = IntegrationType$inboundSchema;
|
|
117
|
-
/** @deprecated use `IntegrationType$outboundSchema` instead. */
|
|
118
|
-
export const outboundSchema = IntegrationType$outboundSchema;
|
|
119
|
-
/** @deprecated use `IntegrationType$Outbound` instead. */
|
|
120
|
-
export type Outbound = IntegrationType$Outbound;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
export function integrationTypeToJSON(
|
|
124
|
-
integrationType: IntegrationType,
|
|
125
|
-
): string {
|
|
126
|
-
return JSON.stringify(IntegrationType$outboundSchema.parse(integrationType));
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
export function integrationTypeFromJSON(
|
|
130
|
-
jsonString: string,
|
|
131
|
-
): SafeParseResult<IntegrationType, SDKValidationError> {
|
|
132
|
-
return safeParse(
|
|
133
|
-
jsonString,
|
|
134
|
-
(x) => IntegrationType$inboundSchema.parse(JSON.parse(x)),
|
|
135
|
-
`Failed to parse 'IntegrationType' from JSON`,
|
|
136
|
-
);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
39
|
/** @internal */
|
|
140
40
|
export const ListUnifiedWebhooksRequest$inboundSchema: z.ZodType<
|
|
141
41
|
ListUnifiedWebhooksRequest,
|
|
142
42
|
z.ZodTypeDef,
|
|
143
43
|
unknown
|
|
144
44
|
> = z.object({
|
|
145
|
-
connection_id: z.
|
|
45
|
+
connection_id: z.string().optional(),
|
|
146
46
|
created_lte: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
147
47
|
.optional(),
|
|
148
48
|
env: z.string().optional(),
|
|
149
|
-
integration_type: z.
|
|
49
|
+
integration_type: z.string().optional(),
|
|
150
50
|
limit: z.number().optional(),
|
|
151
51
|
object: z.string().optional(),
|
|
152
52
|
offset: z.number().optional(),
|
|
@@ -165,10 +65,10 @@ export const ListUnifiedWebhooksRequest$inboundSchema: z.ZodType<
|
|
|
165
65
|
|
|
166
66
|
/** @internal */
|
|
167
67
|
export type ListUnifiedWebhooksRequest$Outbound = {
|
|
168
|
-
connection_id?:
|
|
68
|
+
connection_id?: string | undefined;
|
|
169
69
|
created_lte?: string | undefined;
|
|
170
70
|
env?: string | undefined;
|
|
171
|
-
integration_type?:
|
|
71
|
+
integration_type?: string | undefined;
|
|
172
72
|
limit?: number | undefined;
|
|
173
73
|
object?: string | undefined;
|
|
174
74
|
offset?: number | undefined;
|
|
@@ -183,10 +83,10 @@ export const ListUnifiedWebhooksRequest$outboundSchema: z.ZodType<
|
|
|
183
83
|
z.ZodTypeDef,
|
|
184
84
|
ListUnifiedWebhooksRequest
|
|
185
85
|
> = z.object({
|
|
186
|
-
connectionId: z.
|
|
86
|
+
connectionId: z.string().optional(),
|
|
187
87
|
createdLte: z.date().transform(v => v.toISOString()).optional(),
|
|
188
88
|
env: z.string().optional(),
|
|
189
|
-
integrationType: z.
|
|
89
|
+
integrationType: z.string().optional(),
|
|
190
90
|
limit: z.number().optional(),
|
|
191
91
|
object: z.string().optional(),
|
|
192
92
|
offset: z.number().optional(),
|
|
@@ -211,6 +211,13 @@ export const ListRawFields = {
|
|
|
211
211
|
} as const;
|
|
212
212
|
export type ListRawFields = ClosedEnum<typeof ListRawFields>;
|
|
213
213
|
|
|
214
|
+
export const ListRootId = {
|
|
215
|
+
SupportedRequired: "supported-required",
|
|
216
|
+
Supported: "supported",
|
|
217
|
+
NotSupported: "not-supported",
|
|
218
|
+
} as const;
|
|
219
|
+
export type ListRootId = ClosedEnum<typeof ListRootId>;
|
|
220
|
+
|
|
214
221
|
export const ListSortByCreatedAt = {
|
|
215
222
|
SupportedRequired: "supported-required",
|
|
216
223
|
Supported: "supported",
|
|
@@ -431,6 +438,7 @@ export type IntegrationSupport = {
|
|
|
431
438
|
listProjectId?: ListProjectId | undefined;
|
|
432
439
|
listQuery?: ListQuery | undefined;
|
|
433
440
|
listRawFields?: ListRawFields | undefined;
|
|
441
|
+
listRootId?: ListRootId | undefined;
|
|
434
442
|
listSortByCreatedAt?: ListSortByCreatedAt | undefined;
|
|
435
443
|
listSortByName?: ListSortByName | undefined;
|
|
436
444
|
listSortByUpdatedAt?: ListSortByUpdatedAt | undefined;
|
|
@@ -1028,6 +1036,25 @@ export namespace ListRawFields$ {
|
|
|
1028
1036
|
export const outboundSchema = ListRawFields$outboundSchema;
|
|
1029
1037
|
}
|
|
1030
1038
|
|
|
1039
|
+
/** @internal */
|
|
1040
|
+
export const ListRootId$inboundSchema: z.ZodNativeEnum<typeof ListRootId> = z
|
|
1041
|
+
.nativeEnum(ListRootId);
|
|
1042
|
+
|
|
1043
|
+
/** @internal */
|
|
1044
|
+
export const ListRootId$outboundSchema: z.ZodNativeEnum<typeof ListRootId> =
|
|
1045
|
+
ListRootId$inboundSchema;
|
|
1046
|
+
|
|
1047
|
+
/**
|
|
1048
|
+
* @internal
|
|
1049
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1050
|
+
*/
|
|
1051
|
+
export namespace ListRootId$ {
|
|
1052
|
+
/** @deprecated use `ListRootId$inboundSchema` instead. */
|
|
1053
|
+
export const inboundSchema = ListRootId$inboundSchema;
|
|
1054
|
+
/** @deprecated use `ListRootId$outboundSchema` instead. */
|
|
1055
|
+
export const outboundSchema = ListRootId$outboundSchema;
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1031
1058
|
/** @internal */
|
|
1032
1059
|
export const ListSortByCreatedAt$inboundSchema: z.ZodNativeEnum<
|
|
1033
1060
|
typeof ListSortByCreatedAt
|
|
@@ -1595,6 +1622,7 @@ export const IntegrationSupport$inboundSchema: z.ZodType<
|
|
|
1595
1622
|
list_project_id: ListProjectId$inboundSchema.optional(),
|
|
1596
1623
|
list_query: ListQuery$inboundSchema.optional(),
|
|
1597
1624
|
list_raw_fields: ListRawFields$inboundSchema.optional(),
|
|
1625
|
+
list_root_id: ListRootId$inboundSchema.optional(),
|
|
1598
1626
|
list_sort_by_created_at: ListSortByCreatedAt$inboundSchema.optional(),
|
|
1599
1627
|
list_sort_by_name: ListSortByName$inboundSchema.optional(),
|
|
1600
1628
|
list_sort_by_updated_at: ListSortByUpdatedAt$inboundSchema.optional(),
|
|
@@ -1658,6 +1686,7 @@ export const IntegrationSupport$inboundSchema: z.ZodType<
|
|
|
1658
1686
|
"list_project_id": "listProjectId",
|
|
1659
1687
|
"list_query": "listQuery",
|
|
1660
1688
|
"list_raw_fields": "listRawFields",
|
|
1689
|
+
"list_root_id": "listRootId",
|
|
1661
1690
|
"list_sort_by_created_at": "listSortByCreatedAt",
|
|
1662
1691
|
"list_sort_by_name": "listSortByName",
|
|
1663
1692
|
"list_sort_by_updated_at": "listSortByUpdatedAt",
|
|
@@ -1721,6 +1750,7 @@ export type IntegrationSupport$Outbound = {
|
|
|
1721
1750
|
list_project_id?: string | undefined;
|
|
1722
1751
|
list_query?: string | undefined;
|
|
1723
1752
|
list_raw_fields?: string | undefined;
|
|
1753
|
+
list_root_id?: string | undefined;
|
|
1724
1754
|
list_sort_by_created_at?: string | undefined;
|
|
1725
1755
|
list_sort_by_name?: string | undefined;
|
|
1726
1756
|
list_sort_by_updated_at?: string | undefined;
|
|
@@ -1788,6 +1818,7 @@ export const IntegrationSupport$outboundSchema: z.ZodType<
|
|
|
1788
1818
|
listProjectId: ListProjectId$outboundSchema.optional(),
|
|
1789
1819
|
listQuery: ListQuery$outboundSchema.optional(),
|
|
1790
1820
|
listRawFields: ListRawFields$outboundSchema.optional(),
|
|
1821
|
+
listRootId: ListRootId$outboundSchema.optional(),
|
|
1791
1822
|
listSortByCreatedAt: ListSortByCreatedAt$outboundSchema.optional(),
|
|
1792
1823
|
listSortByName: ListSortByName$outboundSchema.optional(),
|
|
1793
1824
|
listSortByUpdatedAt: ListSortByUpdatedAt$outboundSchema.optional(),
|
|
@@ -1850,6 +1881,7 @@ export const IntegrationSupport$outboundSchema: z.ZodType<
|
|
|
1850
1881
|
listProjectId: "list_project_id",
|
|
1851
1882
|
listQuery: "list_query",
|
|
1852
1883
|
listRawFields: "list_raw_fields",
|
|
1884
|
+
listRootId: "list_root_id",
|
|
1853
1885
|
listSortByCreatedAt: "list_sort_by_created_at",
|
|
1854
1886
|
listSortByName: "list_sort_by_name",
|
|
1855
1887
|
listSortByUpdatedAt: "list_sort_by_updated_at",
|
|
@@ -40,6 +40,7 @@ export type MessagingMessage = {
|
|
|
40
40
|
parentMessageId?: string | undefined;
|
|
41
41
|
raw?: { [k: string]: any } | undefined;
|
|
42
42
|
reference?: string | undefined;
|
|
43
|
+
rootMessageId?: string | undefined;
|
|
43
44
|
subject?: string | undefined;
|
|
44
45
|
updatedAt?: Date | undefined;
|
|
45
46
|
webUrl?: string | undefined;
|
|
@@ -65,6 +66,7 @@ export const MessagingMessage$inboundSchema: z.ZodType<
|
|
|
65
66
|
parent_message_id: z.string().optional(),
|
|
66
67
|
raw: z.record(z.any()).optional(),
|
|
67
68
|
reference: z.string().optional(),
|
|
69
|
+
root_message_id: z.string().optional(),
|
|
68
70
|
subject: z.string().optional(),
|
|
69
71
|
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
70
72
|
.optional(),
|
|
@@ -79,6 +81,7 @@ export const MessagingMessage$inboundSchema: z.ZodType<
|
|
|
79
81
|
"mentioned_members": "mentionedMembers",
|
|
80
82
|
"message_html": "messageHtml",
|
|
81
83
|
"parent_message_id": "parentMessageId",
|
|
84
|
+
"root_message_id": "rootMessageId",
|
|
82
85
|
"updated_at": "updatedAt",
|
|
83
86
|
"web_url": "webUrl",
|
|
84
87
|
});
|
|
@@ -99,6 +102,7 @@ export type MessagingMessage$Outbound = {
|
|
|
99
102
|
parent_message_id?: string | undefined;
|
|
100
103
|
raw?: { [k: string]: any } | undefined;
|
|
101
104
|
reference?: string | undefined;
|
|
105
|
+
root_message_id?: string | undefined;
|
|
102
106
|
subject?: string | undefined;
|
|
103
107
|
updated_at?: string | undefined;
|
|
104
108
|
web_url?: string | undefined;
|
|
@@ -123,6 +127,7 @@ export const MessagingMessage$outboundSchema: z.ZodType<
|
|
|
123
127
|
parentMessageId: z.string().optional(),
|
|
124
128
|
raw: z.record(z.any()).optional(),
|
|
125
129
|
reference: z.string().optional(),
|
|
130
|
+
rootMessageId: z.string().optional(),
|
|
126
131
|
subject: z.string().optional(),
|
|
127
132
|
updatedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
128
133
|
webUrl: z.string().optional(),
|
|
@@ -136,6 +141,7 @@ export const MessagingMessage$outboundSchema: z.ZodType<
|
|
|
136
141
|
mentionedMembers: "mentioned_members",
|
|
137
142
|
messageHtml: "message_html",
|
|
138
143
|
parentMessageId: "parent_message_id",
|
|
144
|
+
rootMessageId: "root_message_id",
|
|
139
145
|
updatedAt: "updated_at",
|
|
140
146
|
webUrl: "web_url",
|
|
141
147
|
});
|