@4players/odin-common 4.1.0 → 4.1.1

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/schema/token.d.ts +13 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@4players/odin-common",
3
- "version": "4.1.0",
3
+ "version": "4.1.1",
4
4
  "description": "A collection of commonly used type definitions and utility functions across ODIN web projects",
5
5
  "author": "Josho Bleicker <josho.bleicker@4players.io> (https://www.4players.io)",
6
6
  "homepage": "https://www.4players.io",
package/schema/token.d.ts CHANGED
@@ -4,15 +4,15 @@ export declare const TokenSubjectSchema: z.ZodEnum<["connect", "roomclose", "roo
4
4
  export declare const TokenClaimsSchema: z.ZodObject<{
5
5
  uid: z.ZodString;
6
6
  cid: z.ZodOptional<z.ZodString>;
7
- rid: z.ZodEffects<z.ZodType<z.ZodString[], z.ZodTypeDef, z.ZodString[]>, z.ZodString[], z.ZodString[]>;
7
+ rid: z.ZodEffects<z.ZodType<string[], z.ZodTypeDef, string[]>, string[], string[]>;
8
8
  nsp: z.ZodOptional<z.ZodString>;
9
9
  adr: z.ZodOptional<z.ZodString>;
10
- aud: z.ZodOptional<z.ZodType<z.ZodEnum<["sfu", "gateway"]>[], z.ZodTypeDef, z.ZodEnum<["sfu", "gateway"]>[]>>;
11
- sub: z.ZodOptional<z.ZodType<z.ZodEnum<["connect", "roomclose", "roomupdate", "roombanclient", "roomsendmessage"]>[], z.ZodTypeDef, z.ZodEnum<["connect", "roomclose", "roomupdate", "roombanclient", "roomsendmessage"]>[]>>;
10
+ aud: z.ZodOptional<z.ZodType<("sfu" | "gateway")[], z.ZodTypeDef, ("sfu" | "gateway")[]>>;
11
+ sub: z.ZodOptional<z.ZodType<("connect" | "roomclose" | "roomupdate" | "roombanclient" | "roomsendmessage")[], z.ZodTypeDef, ("connect" | "roomclose" | "roomupdate" | "roombanclient" | "roomsendmessage")[]>>;
12
12
  exp: z.ZodOptional<z.ZodNumber>;
13
13
  nbf: z.ZodOptional<z.ZodNumber>;
14
14
  ups: z.ZodOptional<z.ZodString>;
15
- tgs: z.ZodOptional<z.ZodType<z.ZodString[], z.ZodTypeDef, z.ZodString[]>>;
15
+ tgs: z.ZodOptional<z.ZodType<string[], z.ZodTypeDef, string[]>>;
16
16
  tsp: z.ZodOptional<z.ZodNumber>;
17
17
  internal: z.ZodOptional<z.ZodObject<{
18
18
  server: z.ZodOptional<z.ZodString>;
@@ -23,36 +23,36 @@ export declare const TokenClaimsSchema: z.ZodObject<{
23
23
  }>>;
24
24
  }, "strip", z.ZodTypeAny, {
25
25
  uid: string;
26
- rid: z.ZodString[];
27
- sub?: z.ZodEnum<["connect", "roomclose", "roomupdate", "roombanclient", "roomsendmessage"]>[] | undefined;
26
+ rid: string[];
27
+ sub?: ("connect" | "roomclose" | "roomupdate" | "roombanclient" | "roomsendmessage")[] | undefined;
28
28
  internal?: {
29
29
  server?: string | undefined;
30
30
  } | undefined;
31
31
  cid?: string | undefined;
32
32
  nsp?: string | undefined;
33
33
  adr?: string | undefined;
34
- aud?: z.ZodEnum<["sfu", "gateway"]>[] | undefined;
34
+ aud?: ("sfu" | "gateway")[] | undefined;
35
35
  exp?: number | undefined;
36
36
  nbf?: number | undefined;
37
37
  ups?: string | undefined;
38
- tgs?: z.ZodString[] | undefined;
38
+ tgs?: string[] | undefined;
39
39
  tsp?: number | undefined;
40
40
  }, {
41
41
  uid: string;
42
- rid: z.ZodString[];
43
- sub?: z.ZodEnum<["connect", "roomclose", "roomupdate", "roombanclient", "roomsendmessage"]>[] | undefined;
42
+ rid: string[];
43
+ sub?: ("connect" | "roomclose" | "roomupdate" | "roombanclient" | "roomsendmessage")[] | undefined;
44
44
  internal?: {
45
45
  server?: string | undefined;
46
46
  } | undefined;
47
47
  cid?: string | undefined;
48
48
  nsp?: string | undefined;
49
49
  adr?: string | undefined;
50
- aud?: z.ZodEnum<["sfu", "gateway"]>[] | undefined;
50
+ aud?: ("sfu" | "gateway")[] | undefined;
51
51
  exp?: number | undefined;
52
52
  nbf?: number | undefined;
53
53
  ups?: string | undefined;
54
- tgs?: z.ZodString[] | undefined;
54
+ tgs?: string[] | undefined;
55
55
  tsp?: number | undefined;
56
56
  }>;
57
57
  export type TokenClaims = z.infer<typeof TokenClaimsSchema>;
58
- export declare function oneOrMany<T extends z.ZodTypeAny>(type: T): z.ZodType<T[]>;
58
+ export declare function oneOrMany<T extends z.ZodTypeAny>(type: T): z.ZodType<z.infer<T>[]>;