@sentry/junior-plugin-api 0.104.1 → 0.105.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/dist/dispatch.d.ts +2 -1
- package/dist/index.js +3 -1
- package/dist/operations.d.ts +0 -1
- package/dist/schemas.d.ts +9 -0
- package/package.json +1 -1
- package/src/dispatch.ts +7 -1
- package/src/operations.ts +0 -1
- package/src/schemas.ts +4 -0
package/dist/dispatch.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { dispatchOptionsSchema } from "./schemas";
|
|
2
|
+
import { destinationVisibilitySchema, dispatchOptionsSchema } from "./schemas";
|
|
3
|
+
export type DestinationVisibility = z.output<typeof destinationVisibilitySchema>;
|
|
3
4
|
export type DispatchOptions = z.output<typeof dispatchOptionsSchema>;
|
|
4
5
|
export interface DispatchResult {
|
|
5
6
|
id: string;
|
package/dist/index.js
CHANGED
|
@@ -12,6 +12,7 @@ var exactNonBlankStringSchema = nonBlankStringSchema.refine(
|
|
|
12
12
|
);
|
|
13
13
|
var platformSchema = z.enum(["slack", "local"]);
|
|
14
14
|
var sourceTypeSchema = z.enum(["pub", "priv"]);
|
|
15
|
+
var destinationVisibilitySchema = z.enum(["public", "private"]);
|
|
15
16
|
var slackAddressSchema = z.object({
|
|
16
17
|
platform: z.literal("slack"),
|
|
17
18
|
teamId: slackTeamIdSchema,
|
|
@@ -132,6 +133,7 @@ var dispatchOptionsSchema = z.object({
|
|
|
132
133
|
idempotencyKey: nonBlankStringSchema.pipe(z.string().max(512)),
|
|
133
134
|
credentialSubject: pluginCredentialSubjectSchema.optional(),
|
|
134
135
|
destination: slackDestinationSchema,
|
|
136
|
+
destinationVisibility: destinationVisibilitySchema,
|
|
135
137
|
input: nonBlankStringSchema.pipe(z.string().max(32e3)),
|
|
136
138
|
metadata: dispatchMetadataSchema.optional(),
|
|
137
139
|
source: sourceSchema
|
|
@@ -330,7 +332,6 @@ var pluginApiRouteRequestContextSchema = z6.object({
|
|
|
330
332
|
user: z6.object({
|
|
331
333
|
email: z6.string().nullable().optional(),
|
|
332
334
|
emailVerified: z6.boolean().optional(),
|
|
333
|
-
hostedDomain: z6.string().nullable().optional(),
|
|
334
335
|
name: z6.string().nullable().optional()
|
|
335
336
|
}).strict()
|
|
336
337
|
}).strict(),
|
|
@@ -460,6 +461,7 @@ export {
|
|
|
460
461
|
defineJuniorPlugin,
|
|
461
462
|
definePluginTool,
|
|
462
463
|
destinationSchema,
|
|
464
|
+
destinationVisibilitySchema,
|
|
463
465
|
dispatchOptionsSchema,
|
|
464
466
|
getSourceKey,
|
|
465
467
|
isPrivateSource,
|
package/dist/operations.d.ts
CHANGED
|
@@ -80,7 +80,6 @@ export declare const pluginApiRouteRequestContextSchema: z.ZodObject<{
|
|
|
80
80
|
user: z.ZodObject<{
|
|
81
81
|
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
82
82
|
emailVerified: z.ZodOptional<z.ZodBoolean>;
|
|
83
|
-
hostedDomain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
84
83
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
85
84
|
}, z.core.$strict>;
|
|
86
85
|
}, z.core.$strict>;
|
package/dist/schemas.d.ts
CHANGED
|
@@ -10,6 +10,11 @@ export declare const sourceTypeSchema: z.ZodEnum<{
|
|
|
10
10
|
pub: "pub";
|
|
11
11
|
priv: "priv";
|
|
12
12
|
}>;
|
|
13
|
+
/** Provider-neutral visibility of a routed destination. */
|
|
14
|
+
export declare const destinationVisibilitySchema: z.ZodEnum<{
|
|
15
|
+
public: "public";
|
|
16
|
+
private: "private";
|
|
17
|
+
}>;
|
|
13
18
|
/** Runtime-owned Slack address for routing future work or side effects. */
|
|
14
19
|
export declare const slackDestinationSchema: z.ZodObject<{
|
|
15
20
|
platform: z.ZodLiteral<"slack">;
|
|
@@ -130,6 +135,10 @@ export declare const dispatchOptionsSchema: z.ZodObject<{
|
|
|
130
135
|
teamId: z.ZodString;
|
|
131
136
|
channelId: z.ZodString;
|
|
132
137
|
}, z.core.$strict>;
|
|
138
|
+
destinationVisibility: z.ZodEnum<{
|
|
139
|
+
public: "public";
|
|
140
|
+
private: "private";
|
|
141
|
+
}>;
|
|
133
142
|
input: z.ZodPipe<z.ZodString, z.ZodString>;
|
|
134
143
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
135
144
|
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
package/package.json
CHANGED
package/src/dispatch.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
destinationVisibilitySchema,
|
|
4
|
+
dispatchOptionsSchema,
|
|
5
|
+
} from "./schemas";
|
|
3
6
|
|
|
7
|
+
export type DestinationVisibility = z.output<
|
|
8
|
+
typeof destinationVisibilitySchema
|
|
9
|
+
>;
|
|
4
10
|
export type DispatchOptions = z.output<typeof dispatchOptionsSchema>;
|
|
5
11
|
|
|
6
12
|
export interface DispatchResult {
|
package/src/operations.ts
CHANGED
|
@@ -112,7 +112,6 @@ export const pluginApiRouteRequestContextSchema = z
|
|
|
112
112
|
.object({
|
|
113
113
|
email: z.string().nullable().optional(),
|
|
114
114
|
emailVerified: z.boolean().optional(),
|
|
115
|
-
hostedDomain: z.string().nullable().optional(),
|
|
116
115
|
name: z.string().nullable().optional(),
|
|
117
116
|
})
|
|
118
117
|
.strict(),
|
package/src/schemas.ts
CHANGED
|
@@ -25,6 +25,9 @@ export const platformSchema = z.enum(["slack", "local"]);
|
|
|
25
25
|
/** Runtime source visibility visible to plugins. */
|
|
26
26
|
export const sourceTypeSchema = z.enum(["pub", "priv"]);
|
|
27
27
|
|
|
28
|
+
/** Provider-neutral visibility of a routed destination. */
|
|
29
|
+
export const destinationVisibilitySchema = z.enum(["public", "private"]);
|
|
30
|
+
|
|
28
31
|
const slackAddressSchema = z
|
|
29
32
|
.object({
|
|
30
33
|
platform: z.literal("slack"),
|
|
@@ -190,6 +193,7 @@ export const dispatchOptionsSchema = z
|
|
|
190
193
|
idempotencyKey: nonBlankStringSchema.pipe(z.string().max(512)),
|
|
191
194
|
credentialSubject: pluginCredentialSubjectSchema.optional(),
|
|
192
195
|
destination: slackDestinationSchema,
|
|
196
|
+
destinationVisibility: destinationVisibilitySchema,
|
|
193
197
|
input: nonBlankStringSchema.pipe(z.string().max(32_000)),
|
|
194
198
|
metadata: dispatchMetadataSchema.optional(),
|
|
195
199
|
source: sourceSchema,
|