@sentry/junior-plugin-api 0.104.2 → 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.
@@ -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
@@ -459,6 +461,7 @@ export {
459
461
  defineJuniorPlugin,
460
462
  definePluginTool,
461
463
  destinationSchema,
464
+ destinationVisibilitySchema,
462
465
  dispatchOptionsSchema,
463
466
  getSourceKey,
464
467
  isPrivateSource,
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/junior-plugin-api",
3
- "version": "0.104.2",
3
+ "version": "0.105.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
package/src/dispatch.ts CHANGED
@@ -1,6 +1,12 @@
1
1
  import { z } from "zod";
2
- import { dispatchOptionsSchema } from "./schemas";
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/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,