@synnaxlabs/client 0.43.0 → 0.43.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.
@@ -4,14 +4,14 @@ export declare const keyZ: z.ZodString;
4
4
  export type Key = z.infer<typeof keyZ>;
5
5
  export declare const stateZ: z.ZodObject<{
6
6
  key: z.ZodString;
7
- variant: z.ZodEnum<{
7
+ variant: z.ZodUnion<[z.ZodEnum<{
8
8
  success: "success";
9
9
  error: "error";
10
10
  info: "info";
11
11
  warning: "warning";
12
12
  loading: "loading";
13
13
  disabled: "disabled";
14
- }>;
14
+ }>, z.ZodPipe<z.ZodLiteral<"">, z.ZodTransform<"success" | "error" | "info" | "warning" | "loading" | "disabled", "">>]>;
15
15
  details: z.ZodUnion<[z.ZodRecord<z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodSymbol]>, z.ZodUnknown>, z.ZodPipe<z.ZodString, z.ZodTransform<UnknownRecord, string>>]>;
16
16
  }, z.core.$strip>;
17
17
  export interface State<Details extends {} = UnknownRecord> extends Omit<z.infer<typeof stateZ>, "details"> {
@@ -32,7 +32,7 @@ export declare const deviceZ: z.ZodObject<{
32
32
  details: UnknownRecord | Record<string | number | symbol, unknown>;
33
33
  }, {
34
34
  key: string;
35
- variant: "success" | "error" | "info" | "warning" | "loading" | "disabled";
35
+ variant: "" | "success" | "error" | "info" | "warning" | "loading" | "disabled";
36
36
  details: string | Record<string | number | symbol, unknown>;
37
37
  }, z.core.$ZodTypeInternals<{
38
38
  key: string;
@@ -40,7 +40,7 @@ export declare const deviceZ: z.ZodObject<{
40
40
  details: UnknownRecord | Record<string | number | symbol, unknown>;
41
41
  }, {
42
42
  key: string;
43
- variant: "success" | "error" | "info" | "warning" | "loading" | "disabled";
43
+ variant: "" | "success" | "error" | "info" | "warning" | "loading" | "disabled";
44
44
  details: string | Record<string | number | symbol, unknown>;
45
45
  }>>>, z.ZodTransform<{
46
46
  key: string;
@@ -72,7 +72,7 @@ export declare const newZ: z.ZodObject<{
72
72
  details: UnknownRecord | Record<string | number | symbol, unknown>;
73
73
  }, {
74
74
  key: string;
75
- variant: "success" | "error" | "info" | "warning" | "loading" | "disabled";
75
+ variant: "" | "success" | "error" | "info" | "warning" | "loading" | "disabled";
76
76
  details: string | Record<string | number | symbol, unknown>;
77
77
  }, z.core.$ZodTypeInternals<{
78
78
  key: string;
@@ -80,7 +80,7 @@ export declare const newZ: z.ZodObject<{
80
80
  details: UnknownRecord | Record<string | number | symbol, unknown>;
81
81
  }, {
82
82
  key: string;
83
- variant: "success" | "error" | "info" | "warning" | "loading" | "disabled";
83
+ variant: "" | "success" | "error" | "info" | "warning" | "loading" | "disabled";
84
84
  details: string | Record<string | number | symbol, unknown>;
85
85
  }>>>, z.ZodTransform<{
86
86
  key: string;
@@ -4,14 +4,14 @@ export declare const keyZ: z.ZodUInt32;
4
4
  export type Key = z.infer<typeof keyZ>;
5
5
  export declare const stateZ: z.ZodObject<{
6
6
  key: z.ZodUInt32;
7
- variant: z.ZodEnum<{
7
+ variant: z.ZodUnion<[z.ZodEnum<{
8
8
  success: "success";
9
9
  error: "error";
10
10
  info: "info";
11
11
  warning: "warning";
12
12
  loading: "loading";
13
13
  disabled: "disabled";
14
- }>;
14
+ }>, z.ZodPipe<z.ZodLiteral<"">, z.ZodTransform<"success" | "error" | "info" | "warning" | "loading" | "disabled", "">>]>;
15
15
  message: z.ZodString;
16
16
  lastReceived: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
17
17
  value: z.ZodBigInt;
@@ -31,7 +31,7 @@ export declare const rackZ: z.ZodObject<{
31
31
  lastReceived: TimeStamp;
32
32
  }, {
33
33
  key: number;
34
- variant: "success" | "error" | "info" | "warning" | "loading" | "disabled";
34
+ variant: "" | "success" | "error" | "info" | "warning" | "loading" | "disabled";
35
35
  message: string;
36
36
  lastReceived: string | number | Number | TimeStamp | {
37
37
  value: bigint;
@@ -43,7 +43,7 @@ export declare const rackZ: z.ZodObject<{
43
43
  lastReceived: TimeStamp;
44
44
  }, {
45
45
  key: number;
46
- variant: "success" | "error" | "info" | "warning" | "loading" | "disabled";
46
+ variant: "" | "success" | "error" | "info" | "warning" | "loading" | "disabled";
47
47
  message: string;
48
48
  lastReceived: string | number | Number | TimeStamp | {
49
49
  value: bigint;
@@ -72,7 +72,7 @@ export declare const newZ: z.ZodObject<{
72
72
  lastReceived: TimeStamp;
73
73
  }, {
74
74
  key: number;
75
- variant: "success" | "error" | "info" | "warning" | "loading" | "disabled";
75
+ variant: "" | "success" | "error" | "info" | "warning" | "loading" | "disabled";
76
76
  message: string;
77
77
  lastReceived: string | number | Number | TimeStamp | {
78
78
  value: bigint;
@@ -84,7 +84,7 @@ export declare const newZ: z.ZodObject<{
84
84
  lastReceived: TimeStamp;
85
85
  }, {
86
86
  key: number;
87
- variant: "success" | "error" | "info" | "warning" | "loading" | "disabled";
87
+ variant: "" | "success" | "error" | "info" | "warning" | "loading" | "disabled";
88
88
  message: string;
89
89
  lastReceived: string | number | Number | TimeStamp | {
90
90
  value: bigint;
@@ -5,14 +5,14 @@ export declare const keyZ: z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodBigI
5
5
  export type Key = z.infer<typeof keyZ>;
6
6
  export declare const stateZ: z.ZodObject<{
7
7
  task: z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodBigInt, z.ZodTransform<string, bigint>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>]>;
8
- variant: z.ZodEnum<{
8
+ variant: z.ZodUnion<[z.ZodEnum<{
9
9
  success: "success";
10
10
  error: "error";
11
11
  info: "info";
12
12
  warning: "warning";
13
13
  loading: "loading";
14
14
  disabled: "disabled";
15
- }>;
15
+ }>, z.ZodPipe<z.ZodLiteral<"">, z.ZodTransform<"success" | "error" | "info" | "warning" | "loading" | "disabled", "">>]>;
16
16
  key: z.ZodOptional<z.ZodString>;
17
17
  details: z.ZodType<UnknownRecord | undefined>;
18
18
  }, z.core.$strip>;
@@ -27,14 +27,14 @@ export declare const taskZ: z.ZodObject<{
27
27
  config: z.ZodUnion<[z.ZodRecord<z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodSymbol]>, z.ZodUnknown>, z.ZodPipe<z.ZodString, z.ZodTransform<UnknownRecord, string>>]>;
28
28
  state: z.ZodNullable<z.ZodOptional<z.ZodObject<{
29
29
  task: z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodBigInt, z.ZodTransform<string, bigint>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>]>;
30
- variant: z.ZodEnum<{
30
+ variant: z.ZodUnion<[z.ZodEnum<{
31
31
  success: "success";
32
32
  error: "error";
33
33
  info: "info";
34
34
  warning: "warning";
35
35
  loading: "loading";
36
36
  disabled: "disabled";
37
- }>;
37
+ }>, z.ZodPipe<z.ZodLiteral<"">, z.ZodTransform<"success" | "error" | "info" | "warning" | "loading" | "disabled", "">>]>;
38
38
  key: z.ZodOptional<z.ZodString>;
39
39
  details: z.ZodType<UnknownRecord | undefined>;
40
40
  }, z.core.$strip>>>;
@@ -51,14 +51,14 @@ export declare const newZ: z.ZodObject<{
51
51
  internal: z.ZodOptional<z.ZodBoolean>;
52
52
  state: z.ZodNullable<z.ZodOptional<z.ZodObject<{
53
53
  task: z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodBigInt, z.ZodTransform<string, bigint>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>]>;
54
- variant: z.ZodEnum<{
54
+ variant: z.ZodUnion<[z.ZodEnum<{
55
55
  success: "success";
56
56
  error: "error";
57
57
  info: "info";
58
58
  warning: "warning";
59
59
  loading: "loading";
60
60
  disabled: "disabled";
61
- }>;
61
+ }>, z.ZodPipe<z.ZodLiteral<"">, z.ZodTransform<"success" | "error" | "info" | "warning" | "loading" | "disabled", "">>]>;
62
62
  key: z.ZodOptional<z.ZodString>;
63
63
  details: z.ZodType<UnknownRecord | undefined>;
64
64
  }, z.core.$strip>>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synnaxlabs/client",
3
- "version": "0.43.0",
3
+ "version": "0.43.1",
4
4
  "description": "The Synnax Client Library",
5
5
  "keywords": [
6
6
  "synnax",
@@ -18,7 +18,7 @@ export type Key = z.infer<typeof keyZ>;
18
18
 
19
19
  export const stateZ = z.object({
20
20
  key: keyZ,
21
- variant: status.variantZ,
21
+ variant: status.variantZ.or(z.literal("").transform<status.Variant>(() => "info")),
22
22
  details: unknownRecordZ.or(z.string().transform(decodeJSONString)),
23
23
  });
24
24
 
@@ -16,7 +16,7 @@ export type Key = z.infer<typeof keyZ>;
16
16
 
17
17
  export const stateZ = z.object({
18
18
  key: keyZ,
19
- variant: status.variantZ,
19
+ variant: status.variantZ.or(z.literal("").transform<status.Variant>(() => "info")),
20
20
  message: z.string(),
21
21
  lastReceived: TimeStamp.z,
22
22
  });
@@ -29,7 +29,7 @@ export type Key = z.infer<typeof keyZ>;
29
29
 
30
30
  export const stateZ = z.object({
31
31
  task: keyZ,
32
- variant: status.variantZ,
32
+ variant: status.variantZ.or(z.literal("").transform<status.Variant>(() => "info")),
33
33
  key: z.string().optional(),
34
34
  details: unknownRecordZ
35
35
  .or(z.string().transform(parseWithoutKeyConversion))