@unified-api/typescript-sdk 2.73.3 → 2.73.4
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/bin/mcp-server.js +67 -24
- package/bin/mcp-server.js.map +13 -12
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/mcp-server/cli/start/command.d.ts.map +1 -1
- package/mcp-server/cli/start/command.js +0 -12
- package/mcp-server/cli/start/command.js.map +1 -1
- package/mcp-server/cli/start/impl.d.ts +0 -2
- package/mcp-server/cli/start/impl.d.ts.map +1 -1
- package/mcp-server/cli/start/impl.js +0 -2
- package/mcp-server/cli/start/impl.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/package.json +1 -1
- package/sdk/models/errors/sdkerror.d.ts.map +1 -1
- package/sdk/models/errors/sdkerror.js +8 -2
- package/sdk/models/errors/sdkerror.js.map +1 -1
- package/sdk/models/shared/index.d.ts +2 -0
- package/sdk/models/shared/index.d.ts.map +1 -1
- package/sdk/models/shared/index.js +2 -0
- package/sdk/models/shared/index.js.map +1 -1
- package/sdk/models/shared/messagingmessage.d.ts +3 -0
- package/sdk/models/shared/messagingmessage.d.ts.map +1 -1
- package/sdk/models/shared/messagingmessage.js +3 -0
- package/sdk/models/shared/messagingmessage.js.map +1 -1
- package/sdk/models/shared/messagingreaction.d.ts +32 -0
- package/sdk/models/shared/messagingreaction.d.ts.map +1 -0
- package/sdk/models/shared/messagingreaction.js +62 -0
- package/sdk/models/shared/messagingreaction.js.map +1 -0
- package/sdk/models/shared/propertymessagingreactionmember.d.ts +33 -0
- package/sdk/models/shared/propertymessagingreactionmember.d.ts.map +1 -0
- package/sdk/models/shared/propertymessagingreactionmember.js +72 -0
- package/sdk/models/shared/propertymessagingreactionmember.js.map +1 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/cli/start/command.ts +0 -13
- package/src/mcp-server/cli/start/impl.ts +0 -4
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/sdk/models/errors/sdkerror.ts +8 -2
- package/src/sdk/models/shared/index.ts +2 -0
- package/src/sdk/models/shared/messagingmessage.ts +10 -0
- package/src/sdk/models/shared/messagingreaction.ts +76 -0
- package/src/sdk/models/shared/propertymessagingreactionmember.ts +85 -0
|
@@ -6,7 +6,6 @@ import { buildCommand } from "@stricli/core";
|
|
|
6
6
|
import { numberParser } from "@stricli/core";
|
|
7
7
|
import * as z from "zod";
|
|
8
8
|
import { consoleLoggerLevels } from "../../console-logger.js";
|
|
9
|
-
import { mcpScopes } from "../../scopes.js";
|
|
10
9
|
|
|
11
10
|
export const startCommand = buildCommand({
|
|
12
11
|
loader: async () => {
|
|
@@ -37,18 +36,6 @@ export const startCommand = buildCommand({
|
|
|
37
36
|
return z.string().parse(value);
|
|
38
37
|
},
|
|
39
38
|
},
|
|
40
|
-
...(mcpScopes.length
|
|
41
|
-
? {
|
|
42
|
-
scope: {
|
|
43
|
-
kind: "enum",
|
|
44
|
-
brief:
|
|
45
|
-
"Mount tools/resources that match given scope (repeatable flag)",
|
|
46
|
-
values: mcpScopes,
|
|
47
|
-
variadic: true,
|
|
48
|
-
optional: true,
|
|
49
|
-
},
|
|
50
|
-
}
|
|
51
|
-
: {}),
|
|
52
39
|
jwt: {
|
|
53
40
|
kind: "parsed",
|
|
54
41
|
brief: "Sets the jwt auth field for the API",
|
|
@@ -11,14 +11,12 @@ import {
|
|
|
11
11
|
ConsoleLoggerLevel,
|
|
12
12
|
createConsoleLogger,
|
|
13
13
|
} from "../../console-logger.js";
|
|
14
|
-
import { MCPScope } from "../../scopes.js";
|
|
15
14
|
import { createMCPServer } from "../../server.js";
|
|
16
15
|
|
|
17
16
|
interface StartCommandFlags {
|
|
18
17
|
readonly transport: "stdio" | "sse";
|
|
19
18
|
readonly port: number;
|
|
20
19
|
readonly tool?: string[];
|
|
21
|
-
readonly scope?: MCPScope[];
|
|
22
20
|
readonly jwt?: string | undefined;
|
|
23
21
|
readonly "server-url"?: string;
|
|
24
22
|
readonly "server-index"?: SDKOptions["serverIdx"];
|
|
@@ -49,7 +47,6 @@ async function startStdio(flags: StartCommandFlags) {
|
|
|
49
47
|
const server = createMCPServer({
|
|
50
48
|
logger,
|
|
51
49
|
allowedTools: flags.tool,
|
|
52
|
-
scopes: flags.scope,
|
|
53
50
|
security: { jwt: flags.jwt ?? "" },
|
|
54
51
|
serverURL: flags["server-url"],
|
|
55
52
|
serverIdx: flags["server-index"],
|
|
@@ -70,7 +67,6 @@ async function startSSE(flags: StartCommandFlags) {
|
|
|
70
67
|
const mcpServer = createMCPServer({
|
|
71
68
|
logger,
|
|
72
69
|
allowedTools: flags.tool,
|
|
73
|
-
scopes: flags.scope,
|
|
74
70
|
security: { jwt: flags.jwt ?? "" },
|
|
75
71
|
serverURL: flags["server-url"],
|
|
76
72
|
serverIdx: flags["server-index"],
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -25,8 +25,14 @@ export class SDKError extends UnifiedToError {
|
|
|
25
25
|
}`;
|
|
26
26
|
}
|
|
27
27
|
const body = httpMeta.body || `""`;
|
|
28
|
-
message += body.length > 100 ? "\n" : " ";
|
|
29
|
-
|
|
28
|
+
message += body.length > 100 ? "\n" : ". ";
|
|
29
|
+
let bodyDisplay = body;
|
|
30
|
+
if (body.length > 10000) {
|
|
31
|
+
const truncated = body.substring(0, 10000);
|
|
32
|
+
const remaining = body.length - 10000;
|
|
33
|
+
bodyDisplay = `${truncated}...and ${remaining} more chars`;
|
|
34
|
+
}
|
|
35
|
+
message += `Body: ${bodyDisplay}`;
|
|
30
36
|
message = message.trim();
|
|
31
37
|
super(message, httpMeta);
|
|
32
38
|
this.name = "SDKError";
|
|
@@ -124,6 +124,7 @@ export * from "./messagingattachment.js";
|
|
|
124
124
|
export * from "./messagingchannel.js";
|
|
125
125
|
export * from "./messagingmember.js";
|
|
126
126
|
export * from "./messagingmessage.js";
|
|
127
|
+
export * from "./messagingreaction.js";
|
|
127
128
|
export * from "./metadatametadata.js";
|
|
128
129
|
export * from "./paymentlineitem.js";
|
|
129
130
|
export * from "./paymentlink.js";
|
|
@@ -171,6 +172,7 @@ export * from "./propertyhrislocationaddress.js";
|
|
|
171
172
|
export * from "./propertyintegrationcategories.js";
|
|
172
173
|
export * from "./propertylmsstudentaddress.js";
|
|
173
174
|
export * from "./propertymessagingmessageauthormember.js";
|
|
175
|
+
export * from "./propertymessagingreactionmember.js";
|
|
174
176
|
export * from "./propertyscimgroupmeta.js";
|
|
175
177
|
export * from "./propertyscimgroupschemas.js";
|
|
176
178
|
export * from "./propertyscimusermeta.js";
|
|
@@ -19,6 +19,12 @@ import {
|
|
|
19
19
|
MessagingMember$Outbound,
|
|
20
20
|
MessagingMember$outboundSchema,
|
|
21
21
|
} from "./messagingmember.js";
|
|
22
|
+
import {
|
|
23
|
+
MessagingReaction,
|
|
24
|
+
MessagingReaction$inboundSchema,
|
|
25
|
+
MessagingReaction$Outbound,
|
|
26
|
+
MessagingReaction$outboundSchema,
|
|
27
|
+
} from "./messagingreaction.js";
|
|
22
28
|
import {
|
|
23
29
|
PropertyMessagingMessageAuthorMember,
|
|
24
30
|
PropertyMessagingMessageAuthorMember$inboundSchema,
|
|
@@ -45,6 +51,7 @@ export type MessagingMessage = {
|
|
|
45
51
|
messageMarkdown?: string | undefined;
|
|
46
52
|
parentMessageId?: string | undefined;
|
|
47
53
|
raw?: { [k: string]: any } | undefined;
|
|
54
|
+
reactions?: Array<MessagingReaction> | undefined;
|
|
48
55
|
reference?: string | undefined;
|
|
49
56
|
rootMessageId?: string | undefined;
|
|
50
57
|
subject?: string | undefined;
|
|
@@ -74,6 +81,7 @@ export const MessagingMessage$inboundSchema: z.ZodType<
|
|
|
74
81
|
message_markdown: z.string().optional(),
|
|
75
82
|
parent_message_id: z.string().optional(),
|
|
76
83
|
raw: z.record(z.any()).optional(),
|
|
84
|
+
reactions: z.array(MessagingReaction$inboundSchema).optional(),
|
|
77
85
|
reference: z.string().optional(),
|
|
78
86
|
root_message_id: z.string().optional(),
|
|
79
87
|
subject: z.string().optional(),
|
|
@@ -116,6 +124,7 @@ export type MessagingMessage$Outbound = {
|
|
|
116
124
|
message_markdown?: string | undefined;
|
|
117
125
|
parent_message_id?: string | undefined;
|
|
118
126
|
raw?: { [k: string]: any } | undefined;
|
|
127
|
+
reactions?: Array<MessagingReaction$Outbound> | undefined;
|
|
119
128
|
reference?: string | undefined;
|
|
120
129
|
root_message_id?: string | undefined;
|
|
121
130
|
subject?: string | undefined;
|
|
@@ -144,6 +153,7 @@ export const MessagingMessage$outboundSchema: z.ZodType<
|
|
|
144
153
|
messageMarkdown: z.string().optional(),
|
|
145
154
|
parentMessageId: z.string().optional(),
|
|
146
155
|
raw: z.record(z.any()).optional(),
|
|
156
|
+
reactions: z.array(MessagingReaction$outboundSchema).optional(),
|
|
147
157
|
reference: z.string().optional(),
|
|
148
158
|
rootMessageId: z.string().optional(),
|
|
149
159
|
subject: z.string().optional(),
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
PropertyMessagingReactionMember,
|
|
11
|
+
PropertyMessagingReactionMember$inboundSchema,
|
|
12
|
+
PropertyMessagingReactionMember$Outbound,
|
|
13
|
+
PropertyMessagingReactionMember$outboundSchema,
|
|
14
|
+
} from "./propertymessagingreactionmember.js";
|
|
15
|
+
|
|
16
|
+
export type MessagingReaction = {
|
|
17
|
+
member: PropertyMessagingReactionMember;
|
|
18
|
+
reaction: string;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const MessagingReaction$inboundSchema: z.ZodType<
|
|
23
|
+
MessagingReaction,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
member: PropertyMessagingReactionMember$inboundSchema,
|
|
28
|
+
reaction: z.string(),
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export type MessagingReaction$Outbound = {
|
|
33
|
+
member: PropertyMessagingReactionMember$Outbound;
|
|
34
|
+
reaction: string;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const MessagingReaction$outboundSchema: z.ZodType<
|
|
39
|
+
MessagingReaction$Outbound,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
MessagingReaction
|
|
42
|
+
> = z.object({
|
|
43
|
+
member: PropertyMessagingReactionMember$outboundSchema,
|
|
44
|
+
reaction: z.string(),
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @internal
|
|
49
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
50
|
+
*/
|
|
51
|
+
export namespace MessagingReaction$ {
|
|
52
|
+
/** @deprecated use `MessagingReaction$inboundSchema` instead. */
|
|
53
|
+
export const inboundSchema = MessagingReaction$inboundSchema;
|
|
54
|
+
/** @deprecated use `MessagingReaction$outboundSchema` instead. */
|
|
55
|
+
export const outboundSchema = MessagingReaction$outboundSchema;
|
|
56
|
+
/** @deprecated use `MessagingReaction$Outbound` instead. */
|
|
57
|
+
export type Outbound = MessagingReaction$Outbound;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function messagingReactionToJSON(
|
|
61
|
+
messagingReaction: MessagingReaction,
|
|
62
|
+
): string {
|
|
63
|
+
return JSON.stringify(
|
|
64
|
+
MessagingReaction$outboundSchema.parse(messagingReaction),
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function messagingReactionFromJSON(
|
|
69
|
+
jsonString: string,
|
|
70
|
+
): SafeParseResult<MessagingReaction, SDKValidationError> {
|
|
71
|
+
return safeParse(
|
|
72
|
+
jsonString,
|
|
73
|
+
(x) => MessagingReaction$inboundSchema.parse(JSON.parse(x)),
|
|
74
|
+
`Failed to parse 'MessagingReaction' from JSON`,
|
|
75
|
+
);
|
|
76
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
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 PropertyMessagingReactionMember = {
|
|
12
|
+
email?: string | undefined;
|
|
13
|
+
name?: string | undefined;
|
|
14
|
+
userId?: string | undefined;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const PropertyMessagingReactionMember$inboundSchema: z.ZodType<
|
|
19
|
+
PropertyMessagingReactionMember,
|
|
20
|
+
z.ZodTypeDef,
|
|
21
|
+
unknown
|
|
22
|
+
> = z.object({
|
|
23
|
+
email: z.string().optional(),
|
|
24
|
+
name: z.string().optional(),
|
|
25
|
+
user_id: z.string().optional(),
|
|
26
|
+
}).transform((v) => {
|
|
27
|
+
return remap$(v, {
|
|
28
|
+
"user_id": "userId",
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export type PropertyMessagingReactionMember$Outbound = {
|
|
34
|
+
email?: string | undefined;
|
|
35
|
+
name?: string | undefined;
|
|
36
|
+
user_id?: string | undefined;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const PropertyMessagingReactionMember$outboundSchema: z.ZodType<
|
|
41
|
+
PropertyMessagingReactionMember$Outbound,
|
|
42
|
+
z.ZodTypeDef,
|
|
43
|
+
PropertyMessagingReactionMember
|
|
44
|
+
> = z.object({
|
|
45
|
+
email: z.string().optional(),
|
|
46
|
+
name: z.string().optional(),
|
|
47
|
+
userId: z.string().optional(),
|
|
48
|
+
}).transform((v) => {
|
|
49
|
+
return remap$(v, {
|
|
50
|
+
userId: "user_id",
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @internal
|
|
56
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
57
|
+
*/
|
|
58
|
+
export namespace PropertyMessagingReactionMember$ {
|
|
59
|
+
/** @deprecated use `PropertyMessagingReactionMember$inboundSchema` instead. */
|
|
60
|
+
export const inboundSchema = PropertyMessagingReactionMember$inboundSchema;
|
|
61
|
+
/** @deprecated use `PropertyMessagingReactionMember$outboundSchema` instead. */
|
|
62
|
+
export const outboundSchema = PropertyMessagingReactionMember$outboundSchema;
|
|
63
|
+
/** @deprecated use `PropertyMessagingReactionMember$Outbound` instead. */
|
|
64
|
+
export type Outbound = PropertyMessagingReactionMember$Outbound;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function propertyMessagingReactionMemberToJSON(
|
|
68
|
+
propertyMessagingReactionMember: PropertyMessagingReactionMember,
|
|
69
|
+
): string {
|
|
70
|
+
return JSON.stringify(
|
|
71
|
+
PropertyMessagingReactionMember$outboundSchema.parse(
|
|
72
|
+
propertyMessagingReactionMember,
|
|
73
|
+
),
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function propertyMessagingReactionMemberFromJSON(
|
|
78
|
+
jsonString: string,
|
|
79
|
+
): SafeParseResult<PropertyMessagingReactionMember, SDKValidationError> {
|
|
80
|
+
return safeParse(
|
|
81
|
+
jsonString,
|
|
82
|
+
(x) => PropertyMessagingReactionMember$inboundSchema.parse(JSON.parse(x)),
|
|
83
|
+
`Failed to parse 'PropertyMessagingReactionMember' from JSON`,
|
|
84
|
+
);
|
|
85
|
+
}
|