@voltro/shared 0.83.1 → 0.85.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/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import { Schema } from 'effect';
2
2
  import { VoidIfEmpty } from 'effect/Types';
3
3
  import { YieldableError } from 'effect/Cause';
4
4
 
5
- export declare const ApiKeyId: Schema.brand<typeof Schema.NonEmptyString, "ApiKeyId">;
5
+ export declare const ApiKeyId: Schema.brand<Schema.NonEmptyString, "ApiKeyId">;
6
6
 
7
7
  export declare type ApiKeyId = typeof ApiKeyId.Type;
8
8
 
@@ -15,7 +15,7 @@ declare const BadRequest_base: new <A extends Record<string, any> = {}>(args: Vo
15
15
  readonly _tag: "@voltro/error/BadRequest";
16
16
  } & Readonly<A>;
17
17
 
18
- export declare const CallId: Schema.brand<typeof Schema.NonEmptyString, "CallId">;
18
+ export declare const CallId: Schema.brand<Schema.NonEmptyString, "CallId">;
19
19
 
20
20
  export declare type CallId = typeof CallId.Type;
21
21
 
@@ -29,7 +29,7 @@ declare const Conflict_base: new <A extends Record<string, any> = {}>(args: Void
29
29
  readonly _tag: "@voltro/error/Conflict";
30
30
  } & Readonly<A>;
31
31
 
32
- export declare const ConnectionId: Schema.brand<typeof Schema.NonEmptyString, "ConnectionId">;
32
+ export declare const ConnectionId: Schema.brand<Schema.NonEmptyString, "ConnectionId">;
33
33
 
34
34
  export declare type ConnectionId = typeof ConnectionId.Type;
35
35
 
@@ -53,7 +53,7 @@ declare const DatabaseUnavailable_base: new <A extends Record<string, any> = {}>
53
53
  readonly _tag: "@voltro/error/DatabaseUnavailable";
54
54
  } & Readonly<A>;
55
55
 
56
- export declare const EmailAddress: Schema.brand<Schema.filter<typeof Schema.String>, "EmailAddress">;
56
+ export declare const EmailAddress: Schema.brand<Schema.String, "EmailAddress">;
57
57
 
58
58
  export declare type EmailAddress = typeof EmailAddress.Type;
59
59
 
@@ -88,15 +88,15 @@ declare const I18nError_base: new <A extends Record<string, any> = {}>(args: Voi
88
88
  readonly _tag: "@voltro/error/I18nError";
89
89
  } & Readonly<A>;
90
90
 
91
- export declare const JsonValue: Schema.Schema<JsonValue_2>;
91
+ export declare const JsonValue: Schema.Codec<JsonValue_2>;
92
92
 
93
93
  declare type JsonValue_2 = null | boolean | number | string | ReadonlyArray<JsonValue_2> | {
94
94
  readonly [key: string]: JsonValue_2;
95
95
  };
96
96
 
97
- declare const JsonValue: Schema.Schema<JsonValue_2>;
97
+ declare const JsonValue: Schema.Codec<JsonValue_2>;
98
98
 
99
- export declare const LocaleTag: Schema.brand<Schema.filter<typeof Schema.String>, "LocaleTag">;
99
+ export declare const LocaleTag: Schema.brand<Schema.String, "LocaleTag">;
100
100
 
101
101
  export declare type LocaleTag = typeof LocaleTag.Type;
102
102
 
@@ -119,7 +119,7 @@ declare const RateLimitExceeded_base: new <A extends Record<string, any> = {}>(a
119
119
  readonly _tag: "@voltro/error/RateLimitExceeded";
120
120
  } & Readonly<A>;
121
121
 
122
- export declare const RouteId: Schema.brand<typeof Schema.NonEmptyString, "RouteId">;
122
+ export declare const RouteId: Schema.brand<Schema.NonEmptyString, "RouteId">;
123
123
 
124
124
  export declare type RouteId = typeof RouteId.Type;
125
125
 
@@ -133,7 +133,7 @@ declare const ServiceUnavailable_base: new <A extends Record<string, any> = {}>(
133
133
  readonly _tag: "@voltro/error/ServiceUnavailable";
134
134
  } & Readonly<A>;
135
135
 
136
- export declare const SubscriptionId: Schema.brand<typeof Schema.NonEmptyString, "SubscriptionId">;
136
+ export declare const SubscriptionId: Schema.brand<Schema.NonEmptyString, "SubscriptionId">;
137
137
 
138
138
  export declare type SubscriptionId = typeof SubscriptionId.Type;
139
139
 
@@ -146,17 +146,17 @@ declare const TenantContextMissing_base: new <A extends Record<string, any> = {}
146
146
  readonly _tag: "@voltro/error/TenantContextMissing";
147
147
  } & Readonly<A>;
148
148
 
149
- export declare const TenantId: Schema.brand<typeof Schema.NonEmptyString, "TenantId">;
149
+ export declare const TenantId: Schema.brand<Schema.NonEmptyString, "TenantId">;
150
150
 
151
151
  export declare type TenantId = typeof TenantId.Type;
152
152
 
153
- export declare const TimestampISO: typeof Schema.Date;
153
+ export declare const TimestampISO: Schema.DateFromString;
154
154
 
155
- export declare const TimezoneName: Schema.brand<Schema.filter<typeof Schema.String>, "TimezoneName">;
155
+ export declare const TimezoneName: Schema.brand<Schema.String, "TimezoneName">;
156
156
 
157
157
  export declare type TimezoneName = typeof TimezoneName.Type;
158
158
 
159
- export declare const TraceId: Schema.brand<typeof Schema.NonEmptyString, "TraceId">;
159
+ export declare const TraceId: Schema.brand<Schema.NonEmptyString, "TraceId">;
160
160
 
161
161
  export declare type TraceId = typeof TraceId.Type;
162
162
 
@@ -169,11 +169,11 @@ declare const Unauthorized_base: new <A extends Record<string, any> = {}>(args:
169
169
  readonly _tag: "@voltro/error/Unauthorized";
170
170
  } & Readonly<A>;
171
171
 
172
- export declare const UserId: Schema.brand<typeof Schema.NonEmptyString, "UserId">;
172
+ export declare const UserId: Schema.brand<Schema.NonEmptyString, "UserId">;
173
173
 
174
174
  export declare type UserId = typeof UserId.Type;
175
175
 
176
- export declare const WorkflowExecutionId: Schema.brand<typeof Schema.NonEmptyString, "WorkflowExecutionId">;
176
+ export declare const WorkflowExecutionId: Schema.brand<Schema.NonEmptyString, "WorkflowExecutionId">;
177
177
 
178
178
  export declare type WorkflowExecutionId = typeof WorkflowExecutionId.Type;
179
179
 
package/dist/index.js CHANGED
@@ -1,8 +1,12 @@
1
1
  import { Data as e, Schema as t } from "effect";
2
2
  //#region src/errors.ts
3
- var n = "@voltro/error", r = class extends e.TaggedError(`${n}/FrameworkError`) {}, i = class extends e.TaggedError(`${n}/I18nError`) {}, a = class extends e.TaggedError(`${n}/Unauthorized`) {}, o = class extends e.TaggedError(`${n}/Forbidden`) {}, s = class extends e.TaggedError(`${n}/NotFound`) {}, c = class extends e.TaggedError(`${n}/Conflict`) {}, l = class extends e.TaggedError(`${n}/BadRequest`) {}, u = class extends e.TaggedError(`${n}/RateLimitExceeded`) {}, d = class extends e.TaggedError(`${n}/DatabaseUnavailable`) {}, f = class extends e.TaggedError(`${n}/ServiceUnavailable`) {}, p = class extends e.TaggedError(`${n}/TenantContextMissing`) {}, m = class extends e.TaggedError(`${n}/CrossTenantAccessDenied`) {}, h = (e) => t.NonEmptyString.pipe(t.brand(e)), g = h("SubscriptionId"), _ = h("CallId"), v = h("TenantId"), y = h("UserId"), b = h("ApiKeyId"), x = h("WorkflowExecutionId"), S = h("ConnectionId"), C = h("RouteId"), w = h("TraceId"), T = t.Date, E = t.suspend(() => t.Union(t.Null, t.Boolean, t.Number, t.String, t.Array(E), t.Record({
4
- key: t.String,
5
- value: E
6
- }))), D = t.String.pipe(t.pattern(/^[^\s@]+@[^\s@]+\.[^\s@]+$/, { message: () => "invalid email address" }), t.brand("EmailAddress")), O = t.String.pipe(t.pattern(/^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$/), t.brand("LocaleTag")), k = t.String.pipe(t.pattern(/^[A-Za-z]+(\/[A-Za-z_-]+)*$/), t.brand("TimezoneName"));
3
+ var n = "@voltro/error", r = class extends e.TaggedError(`${n}/FrameworkError`) {}, i = class extends e.TaggedError(`${n}/I18nError`) {}, a = class extends e.TaggedError(`${n}/Unauthorized`) {}, o = class extends e.TaggedError(`${n}/Forbidden`) {}, s = class extends e.TaggedError(`${n}/NotFound`) {}, c = class extends e.TaggedError(`${n}/Conflict`) {}, l = class extends e.TaggedError(`${n}/BadRequest`) {}, u = class extends e.TaggedError(`${n}/RateLimitExceeded`) {}, d = class extends e.TaggedError(`${n}/DatabaseUnavailable`) {}, f = class extends e.TaggedError(`${n}/ServiceUnavailable`) {}, p = class extends e.TaggedError(`${n}/TenantContextMissing`) {}, m = class extends e.TaggedError(`${n}/CrossTenantAccessDenied`) {}, h = (e) => t.NonEmptyString.pipe(t.brand(e)), g = h("SubscriptionId"), _ = h("CallId"), v = h("TenantId"), y = h("UserId"), b = h("ApiKeyId"), x = h("WorkflowExecutionId"), S = h("ConnectionId"), C = h("RouteId"), w = h("TraceId"), T = t.DateFromString, E = t.suspend(() => t.Union([
4
+ t.Null,
5
+ t.Boolean,
6
+ t.Number,
7
+ t.String,
8
+ t.Array(E),
9
+ t.Record(t.String, E)
10
+ ])), D = t.String.pipe(t.check(t.isPattern(/^[^\s@]+@[^\s@]+\.[^\s@]+$/, { message: "invalid email address" })), t.brand("EmailAddress")), O = t.String.pipe(t.check(t.isPattern(/^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$/)), t.brand("LocaleTag")), k = t.String.pipe(t.check(t.isPattern(/^[A-Za-z]+(\/[A-Za-z_-]+)*$/)), t.brand("TimezoneName"));
7
11
  //#endregion
8
12
  export { b as ApiKeyId, l as BadRequest, _ as CallId, c as Conflict, S as ConnectionId, m as CrossTenantAccessDenied, d as DatabaseUnavailable, D as EmailAddress, o as Forbidden, r as FrameworkError, i as I18nError, E as JsonValue, O as LocaleTag, s as NotFound, u as RateLimitExceeded, C as RouteId, f as ServiceUnavailable, g as SubscriptionId, p as TenantContextMissing, v as TenantId, T as TimestampISO, k as TimezoneName, w as TraceId, a as Unauthorized, y as UserId, x as WorkflowExecutionId };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voltro/shared",
3
- "version": "0.83.1",
3
+ "version": "0.85.0",
4
4
  "description": "Internal shared utilities used across the @voltro/* packages.",
5
5
  "keywords": [
6
6
  "voltro",
@@ -33,7 +33,7 @@
33
33
  "node": ">=24.0.0"
34
34
  },
35
35
  "peerDependencies": {
36
- "effect": "^3.22.2"
36
+ "effect": "4.0.1"
37
37
  },
38
38
  "publishConfig": {
39
39
  "access": "public"