effect-app 0.203.0 → 0.204.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/CHANGELOG.md +14 -0
- package/_cjs/Operations.cjs +14 -15
- package/_cjs/Operations.cjs.map +1 -1
- package/dist/Operations.d.ts +39 -40
- package/dist/Operations.d.ts.map +1 -1
- package/dist/Operations.js +15 -16
- package/dist/client/errors.d.ts +8 -8
- package/package.json +2 -2
- package/src/Operations.ts +15 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @effect-app/prelude
|
|
2
2
|
|
|
3
|
+
## 0.204.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- version prob
|
|
8
|
+
|
|
9
|
+
## 0.203.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- ff5d466: cleanup Struct type
|
|
14
|
+
- Updated dependencies [ff5d466]
|
|
15
|
+
- @effect-app/schema@0.221.1
|
|
16
|
+
|
|
3
17
|
## 0.203.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
package/_cjs/Operations.cjs
CHANGED
|
@@ -4,32 +4,31 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Success = exports.OperationResult = exports.OperationProgress = exports.OperationId = exports.Operation = exports.Failure = void 0;
|
|
7
|
-
var S = _interopRequireWildcard(require("
|
|
8
|
-
var S2 = _interopRequireWildcard(require("./schema.cjs"));
|
|
7
|
+
var S = _interopRequireWildcard(require("./schema.cjs"));
|
|
9
8
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
10
9
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
11
|
-
const OperationId = exports.OperationId =
|
|
12
|
-
class OperationProgress extends
|
|
13
|
-
completed:
|
|
14
|
-
total:
|
|
10
|
+
const OperationId = exports.OperationId = S.StringId;
|
|
11
|
+
class OperationProgress extends S.ExtendedClass()({
|
|
12
|
+
completed: S.NonNegativeInt,
|
|
13
|
+
total: S.NonNegativeInt
|
|
15
14
|
}) {}
|
|
16
15
|
exports.OperationProgress = OperationProgress;
|
|
17
|
-
class Success extends
|
|
18
|
-
message:
|
|
16
|
+
class Success extends S.ExtendedTaggedClass()("Success", {
|
|
17
|
+
message: S.NullOr(S.NonEmptyString2k).withDefault
|
|
19
18
|
}) {}
|
|
20
19
|
exports.Success = Success;
|
|
21
|
-
class Failure extends
|
|
22
|
-
message:
|
|
20
|
+
class Failure extends S.ExtendedTaggedClass()("Failure", {
|
|
21
|
+
message: S.NullOr(S.NonEmptyString2k).withDefault
|
|
23
22
|
}) {}
|
|
24
23
|
exports.Failure = Failure;
|
|
25
|
-
const OperationResult = exports.OperationResult =
|
|
26
|
-
class Operation extends
|
|
24
|
+
const OperationResult = exports.OperationResult = S.ExtendTaggedUnion(S.Union(Success, Failure));
|
|
25
|
+
class Operation extends S.ExtendedClass()({
|
|
27
26
|
id: OperationId,
|
|
28
|
-
title:
|
|
27
|
+
title: S.NonEmptyString2k,
|
|
29
28
|
progress: S.optional(OperationProgress),
|
|
30
29
|
result: S.optional(OperationResult),
|
|
31
|
-
createdAt:
|
|
32
|
-
updatedAt:
|
|
30
|
+
createdAt: S.Date.withDefault,
|
|
31
|
+
updatedAt: S.NullOr(S.Date).withDefault
|
|
33
32
|
}) {}
|
|
34
33
|
/* eslint-enable */
|
|
35
34
|
//
|
package/_cjs/Operations.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Operations.cjs","names":["S","_interopRequireWildcard","require","
|
|
1
|
+
{"version":3,"file":"Operations.cjs","names":["S","_interopRequireWildcard","require","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","OperationId","exports","StringId","OperationProgress","ExtendedClass","completed","NonNegativeInt","total","Success","ExtendedTaggedClass","message","NullOr","NonEmptyString2k","withDefault","Failure","OperationResult","ExtendTaggedUnion","Union","Operation","id","title","progress","optional","result","createdAt","Date","updatedAt"],"sources":["../src/Operations.ts"],"sourcesContent":[null],"mappings":";;;;;;AAAA,IAAAA,CAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAgC,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAH,wBAAAG,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA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M,OAAO,CAAC,CAAC;AAGvE,MAAOI,SAAU,SAAQzC,CAAC,CAAC2B,aAAa,EAA6B,CAAC;EAC1Ee,EAAE,EAAEnB,WAAW;EACfoB,KAAK,EAAE3C,CAAC,CAACmC,gBAAgB;EACzBS,QAAQ,EAAE5C,CAAC,CAAC6C,QAAQ,CAACnB,iBAAiB,CAAC;EACvCoB,MAAM,EAAE9C,CAAC,CAAC6C,QAAQ,CAACP,eAAe,CAAC;EACnCS,SAAS,EAAE/C,CAAC,CAACgD,IAAI,CAACZ,WAAW;EAC7Ba,SAAS,EAAEjD,CAAC,CAACkC,MAAM,CAAClC,CAAC,CAACgD,IAAI,CAAC,CAACZ;CAC7B,CAAC;AAiBF;AACA;AACA;AAAAZ,OAAA,CAAAiB,SAAA,GAAAA,SAAA","ignoreList":[]}
|
package/dist/Operations.d.ts
CHANGED
|
@@ -1,81 +1,80 @@
|
|
|
1
|
-
import * as S from "
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
withDefault: S.PropertySignature<":", S2.StringId, never, ":", string, true, never>;
|
|
1
|
+
import * as S from "./schema.js";
|
|
2
|
+
export type OperationId = S.StringId;
|
|
3
|
+
export declare const OperationId: S.WithDefaults<S.Schema<string & S.StringIdBrand, string, never> & {
|
|
4
|
+
make: () => S.StringId;
|
|
5
|
+
withDefault: S.PropertySignature<":", S.StringId, never, ":", string, true, never>;
|
|
6
|
+
}> & S.Schema<string & S.StringIdBrand, string, never> & {
|
|
7
|
+
make: () => S.StringId;
|
|
8
|
+
withDefault: S.PropertySignature<":", S.StringId, never, ":", string, true, never>;
|
|
10
9
|
};
|
|
11
|
-
declare const OperationProgress_base:
|
|
12
|
-
completed:
|
|
13
|
-
withDefault: S.PropertySignature<":", number &
|
|
10
|
+
declare const OperationProgress_base: S.EnhancedClass<OperationProgress, {
|
|
11
|
+
completed: S.WithDefaults<S.Schema<number & S.NonNegativeIntBrand, number, never>> & S.Schema<number & S.NonNegativeIntBrand, number, never> & {
|
|
12
|
+
withDefault: S.PropertySignature<":", number & S.NonNegativeIntBrand, never, ":", number, true, never>;
|
|
14
13
|
};
|
|
15
|
-
total:
|
|
16
|
-
withDefault: S.PropertySignature<":", number &
|
|
14
|
+
total: S.WithDefaults<S.Schema<number & S.NonNegativeIntBrand, number, never>> & S.Schema<number & S.NonNegativeIntBrand, number, never> & {
|
|
15
|
+
withDefault: S.PropertySignature<":", number & S.NonNegativeIntBrand, never, ":", number, true, never>;
|
|
17
16
|
};
|
|
18
17
|
}, {
|
|
19
|
-
readonly completed: number &
|
|
20
|
-
readonly total: number &
|
|
18
|
+
readonly completed: number & S.NonNegativeIntBrand;
|
|
19
|
+
readonly total: number & S.NonNegativeIntBrand;
|
|
21
20
|
}, OperationProgress.From, never, {
|
|
22
|
-
readonly completed: number &
|
|
23
|
-
readonly total: number &
|
|
21
|
+
readonly completed: number & S.NonNegativeIntBrand;
|
|
22
|
+
readonly total: number & S.NonNegativeIntBrand;
|
|
24
23
|
}, {}, {}>;
|
|
25
24
|
export declare class OperationProgress extends OperationProgress_base {
|
|
26
25
|
}
|
|
27
|
-
declare const Success_base:
|
|
26
|
+
declare const Success_base: S.EnhancedClass<Success, {
|
|
28
27
|
readonly _tag: S.Literal<["Success"]>;
|
|
29
28
|
} & {
|
|
30
|
-
message: S.PropertySignature<":", (string &
|
|
29
|
+
message: S.PropertySignature<":", (string & S.NonEmptyString2kBrand) | null, never, ":", string | null, true, never>;
|
|
31
30
|
}, {
|
|
32
31
|
readonly _tag: "Success";
|
|
33
|
-
readonly message: (string &
|
|
32
|
+
readonly message: (string & S.NonEmptyString2kBrand) | null;
|
|
34
33
|
}, Success.From, never, {
|
|
35
|
-
readonly message?: (string &
|
|
34
|
+
readonly message?: (string & S.NonEmptyString2kBrand) | null;
|
|
36
35
|
}, {}, {}>;
|
|
37
36
|
export declare class Success extends Success_base {
|
|
38
37
|
}
|
|
39
|
-
declare const Failure_base:
|
|
38
|
+
declare const Failure_base: S.EnhancedClass<Failure, {
|
|
40
39
|
readonly _tag: S.Literal<["Failure"]>;
|
|
41
40
|
} & {
|
|
42
|
-
message: S.PropertySignature<":", (string &
|
|
41
|
+
message: S.PropertySignature<":", (string & S.NonEmptyString2kBrand) | null, never, ":", string | null, true, never>;
|
|
43
42
|
}, {
|
|
44
43
|
readonly _tag: "Failure";
|
|
45
|
-
readonly message: (string &
|
|
44
|
+
readonly message: (string & S.NonEmptyString2kBrand) | null;
|
|
46
45
|
}, Failure.From, never, {
|
|
47
|
-
readonly message?: (string &
|
|
46
|
+
readonly message?: (string & S.NonEmptyString2kBrand) | null;
|
|
48
47
|
}, {}, {}>;
|
|
49
48
|
export declare class Failure extends Failure_base {
|
|
50
49
|
}
|
|
51
50
|
export declare const OperationResult: S.Schema<Success | Failure, Success.From | Failure.From, never> & {
|
|
52
|
-
is:
|
|
53
|
-
isAnyOf:
|
|
51
|
+
is: S.Is<Success | Failure>;
|
|
52
|
+
isAnyOf: S.IsAny<Success | Failure>;
|
|
54
53
|
};
|
|
55
54
|
export type OperationResult = S.Schema.Type<typeof OperationResult>;
|
|
56
|
-
declare const Operation_base:
|
|
57
|
-
id:
|
|
58
|
-
make: () =>
|
|
59
|
-
withDefault: S.PropertySignature<":",
|
|
60
|
-
}> & S.Schema<string &
|
|
61
|
-
make: () =>
|
|
62
|
-
withDefault: S.PropertySignature<":",
|
|
55
|
+
declare const Operation_base: S.EnhancedClass<Operation, {
|
|
56
|
+
id: S.WithDefaults<S.Schema<string & S.StringIdBrand, string, never> & {
|
|
57
|
+
make: () => S.StringId;
|
|
58
|
+
withDefault: S.PropertySignature<":", S.StringId, never, ":", string, true, never>;
|
|
59
|
+
}> & S.Schema<string & S.StringIdBrand, string, never> & {
|
|
60
|
+
make: () => S.StringId;
|
|
61
|
+
withDefault: S.PropertySignature<":", S.StringId, never, ":", string, true, never>;
|
|
63
62
|
};
|
|
64
|
-
title:
|
|
63
|
+
title: S.WithDefaults<S.Schema<string & S.NonEmptyString2kBrand, string, never>> & S.Schema<string & S.NonEmptyString2kBrand, string, never>;
|
|
65
64
|
progress: S.PropertySignature<"?:", OperationProgress | undefined, never, "?:", OperationProgress.From | undefined, false, never>;
|
|
66
65
|
result: S.PropertySignature<"?:", Success | Failure | undefined, never, "?:", Success.From | Failure.From | undefined, false, never>;
|
|
67
66
|
createdAt: S.PropertySignature<":", Date, never, ":", string, true, never>;
|
|
68
67
|
updatedAt: S.PropertySignature<":", Date | null, never, ":", string | null, true, never>;
|
|
69
68
|
}, {
|
|
70
|
-
readonly id: string &
|
|
71
|
-
readonly title: string &
|
|
69
|
+
readonly id: string & S.StringIdBrand;
|
|
70
|
+
readonly title: string & S.NonEmptyString2kBrand;
|
|
72
71
|
readonly progress?: OperationProgress | undefined;
|
|
73
72
|
readonly result?: Success | Failure | undefined;
|
|
74
73
|
readonly createdAt: Date;
|
|
75
74
|
readonly updatedAt: Date | null;
|
|
76
75
|
}, Operation.From, never, {
|
|
77
|
-
readonly id: string &
|
|
78
|
-
readonly title: string &
|
|
76
|
+
readonly id: string & S.StringIdBrand;
|
|
77
|
+
readonly title: string & S.NonEmptyString2kBrand;
|
|
79
78
|
readonly progress?: OperationProgress | undefined;
|
|
80
79
|
readonly result?: Success | Failure | undefined;
|
|
81
80
|
readonly createdAt?: Date;
|
package/dist/Operations.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Operations.d.ts","sourceRoot":"","sources":["../src/Operations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"Operations.d.ts","sourceRoot":"","sources":["../src/Operations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAA;AAEhC,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,QAAQ,CAAA;AACpC,eAAO,MAAM,WAAW;;;;;;CAAa,CAAA;;;;;;;;;;;;;;;AAErC,qBAAa,iBAAkB,SAAQ,sBAMrC;CAAG;;;;;;;;;;;AAEL,qBAAa,OAAQ,SAAQ,YAE3B;CAAG;;;;;;;;;;;AAEL,qBAAa,OAAQ,SAAQ,YAE3B;CAAG;AAEL,eAAO,MAAM,eAAe;;;CAAiD,CAAA;AAC7E,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,eAAe,CAAC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEnE,qBAAa,SAAU,SAAQ,cAO7B;CAAG;AAKL,yBAAiB,iBAAiB,CAAC;IACjC,UAAiB,IAAK,SAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,iBAAiB,CAAC,QAAQ,CAAC,CAAC;KAAG;CACtF;AACD,yBAAiB,OAAO,CAAC;IACvB,UAAiB,IAAK,SAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;KAAG;CAC5E;AACD,yBAAiB,OAAO,CAAC;IACvB,UAAiB,IAAK,SAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;KAAG;CAC5E;AACD,yBAAiB,SAAS,CAAC;IACzB,UAAiB,IAAK,SAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,SAAS,CAAC,QAAQ,CAAC,CAAC;KAAG;CAC9E"}
|
package/dist/Operations.js
CHANGED
|
@@ -1,30 +1,29 @@
|
|
|
1
|
-
import * as S from "
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
total: S2.NonNegativeInt
|
|
1
|
+
import * as S from "./schema.js";
|
|
2
|
+
export const OperationId = S.StringId;
|
|
3
|
+
export class OperationProgress extends S.ExtendedClass()({
|
|
4
|
+
completed: S.NonNegativeInt,
|
|
5
|
+
total: S.NonNegativeInt
|
|
7
6
|
}) {
|
|
8
7
|
}
|
|
9
|
-
export class Success extends
|
|
10
|
-
message:
|
|
8
|
+
export class Success extends S.ExtendedTaggedClass()("Success", {
|
|
9
|
+
message: S.NullOr(S.NonEmptyString2k).withDefault
|
|
11
10
|
}) {
|
|
12
11
|
}
|
|
13
|
-
export class Failure extends
|
|
14
|
-
message:
|
|
12
|
+
export class Failure extends S.ExtendedTaggedClass()("Failure", {
|
|
13
|
+
message: S.NullOr(S.NonEmptyString2k).withDefault
|
|
15
14
|
}) {
|
|
16
15
|
}
|
|
17
|
-
export const OperationResult =
|
|
18
|
-
export class Operation extends
|
|
16
|
+
export const OperationResult = S.ExtendTaggedUnion(S.Union(Success, Failure));
|
|
17
|
+
export class Operation extends S.ExtendedClass()({
|
|
19
18
|
id: OperationId,
|
|
20
|
-
title:
|
|
19
|
+
title: S.NonEmptyString2k,
|
|
21
20
|
progress: S.optional(OperationProgress),
|
|
22
21
|
result: S.optional(OperationResult),
|
|
23
|
-
createdAt:
|
|
24
|
-
updatedAt:
|
|
22
|
+
createdAt: S.Date.withDefault,
|
|
23
|
+
updatedAt: S.NullOr(S.Date).withDefault
|
|
25
24
|
}) {
|
|
26
25
|
}
|
|
27
26
|
/* eslint-enable */
|
|
28
27
|
//
|
|
29
28
|
// codegen:end
|
|
30
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
29
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiT3BlcmF0aW9ucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9PcGVyYXRpb25zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxDQUFDLE1BQU0sYUFBYSxDQUFBO0FBR2hDLE1BQU0sQ0FBQyxNQUFNLFdBQVcsR0FBRyxDQUFDLENBQUMsUUFBUSxDQUFBO0FBRXJDLE1BQU0sT0FBTyxpQkFBa0IsU0FBUSxDQUFDLENBQUMsYU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QyxDQUFDLFdBQVc7Q0FDeEMsQ0FBQztDQUFHO0FBaUJMLG1CQUFtQjtBQUNuQixFQUFFO0FBQ0YsY0FBYyJ9
|
package/dist/client/errors.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { S } from "../lib.js";
|
|
2
|
-
declare const NotFoundError_base: import("@effect/
|
|
2
|
+
declare const NotFoundError_base: import("@effect/schema/Schema").Class<NotFoundError<ItemType>, {
|
|
3
3
|
readonly _tag: S.Literal<["NotFoundError"]>;
|
|
4
4
|
} & {
|
|
5
5
|
type: S.$String;
|
|
@@ -20,7 +20,7 @@ declare const NotFoundError_base: import("@effect/Schema/Schema").Class<NotFound
|
|
|
20
20
|
export declare class NotFoundError<ItemType = string> extends NotFoundError_base {
|
|
21
21
|
get message(): string;
|
|
22
22
|
}
|
|
23
|
-
declare const InvalidStateError_base: import("@effect/
|
|
23
|
+
declare const InvalidStateError_base: import("@effect/schema/Schema").Class<InvalidStateError, {
|
|
24
24
|
readonly _tag: S.Literal<["InvalidStateError"]>;
|
|
25
25
|
} & {
|
|
26
26
|
message: S.$String;
|
|
@@ -39,7 +39,7 @@ export declare class InvalidStateError extends InvalidStateError_base {
|
|
|
39
39
|
message: string;
|
|
40
40
|
}, disableValidation?: boolean);
|
|
41
41
|
}
|
|
42
|
-
declare const ServiceUnavailableError_base: import("@effect/
|
|
42
|
+
declare const ServiceUnavailableError_base: import("@effect/schema/Schema").Class<ServiceUnavailableError, {
|
|
43
43
|
readonly _tag: S.Literal<["ServiceUnavailableError"]>;
|
|
44
44
|
} & {
|
|
45
45
|
message: S.$String;
|
|
@@ -58,7 +58,7 @@ export declare class ServiceUnavailableError extends ServiceUnavailableError_bas
|
|
|
58
58
|
message: string;
|
|
59
59
|
}, disableValidation?: boolean);
|
|
60
60
|
}
|
|
61
|
-
declare const ValidationError_base: import("@effect/
|
|
61
|
+
declare const ValidationError_base: import("@effect/schema/Schema").Class<ValidationError, {
|
|
62
62
|
readonly _tag: S.Literal<["ValidationError"]>;
|
|
63
63
|
} & {
|
|
64
64
|
errors: S.$Array<S.Unknown> & {
|
|
@@ -77,7 +77,7 @@ declare const ValidationError_base: import("@effect/Schema/Schema").Class<Valida
|
|
|
77
77
|
export declare class ValidationError extends ValidationError_base {
|
|
78
78
|
get message(): string;
|
|
79
79
|
}
|
|
80
|
-
declare const NotLoggedInError_base: import("@effect/
|
|
80
|
+
declare const NotLoggedInError_base: import("@effect/schema/Schema").Class<NotLoggedInError, {
|
|
81
81
|
readonly _tag: S.Literal<["NotLoggedInError"]>;
|
|
82
82
|
} & {
|
|
83
83
|
message: S.PropertySignature<"?:", string | undefined, never, "?:", string | undefined, false, never>;
|
|
@@ -96,7 +96,7 @@ export declare class NotLoggedInError extends NotLoggedInError_base {
|
|
|
96
96
|
message?: string;
|
|
97
97
|
}, disableValidation?: boolean);
|
|
98
98
|
}
|
|
99
|
-
declare const LoginError_base: import("@effect/
|
|
99
|
+
declare const LoginError_base: import("@effect/schema/Schema").Class<LoginError, {
|
|
100
100
|
readonly _tag: S.Literal<["NotLoggedInError"]>;
|
|
101
101
|
} & {
|
|
102
102
|
message: S.PropertySignature<"?:", string | undefined, never, "?:", string | undefined, false, never>;
|
|
@@ -118,7 +118,7 @@ export declare class LoginError extends LoginError_base {
|
|
|
118
118
|
message?: string;
|
|
119
119
|
}, disableValidation?: boolean);
|
|
120
120
|
}
|
|
121
|
-
declare const UnauthorizedError_base: import("@effect/
|
|
121
|
+
declare const UnauthorizedError_base: import("@effect/schema/Schema").Class<UnauthorizedError, {
|
|
122
122
|
readonly _tag: S.Literal<["UnauthorizedError"]>;
|
|
123
123
|
} & {
|
|
124
124
|
message: S.PropertySignature<"?:", string | undefined, never, "?:", string | undefined, false, never>;
|
|
@@ -143,7 +143,7 @@ type OptimisticConcurrencyDetails = {
|
|
|
143
143
|
readonly current?: string | undefined;
|
|
144
144
|
readonly found?: string | undefined;
|
|
145
145
|
};
|
|
146
|
-
declare const OptimisticConcurrencyException_base: import("@effect/
|
|
146
|
+
declare const OptimisticConcurrencyException_base: import("@effect/schema/Schema").Class<OptimisticConcurrencyException, {
|
|
147
147
|
readonly _tag: S.Literal<["OptimisticConcurrencyException"]>;
|
|
148
148
|
} & {
|
|
149
149
|
message: S.$String;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "effect-app",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.204.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"uuid": "^9.0.1",
|
|
14
14
|
"validator": "^13.11.0",
|
|
15
15
|
"@effect-app/core": "0.170.0",
|
|
16
|
-
"@effect-app/schema": "0.221.
|
|
16
|
+
"@effect-app/schema": "0.221.1"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@babel/cli": "^7.24.1",
|
package/src/Operations.ts
CHANGED
|
@@ -1,35 +1,34 @@
|
|
|
1
|
-
import * as S from "
|
|
2
|
-
import * as S2 from "./schema.js"
|
|
1
|
+
import * as S from "./schema.js"
|
|
3
2
|
|
|
4
|
-
export type OperationId =
|
|
5
|
-
export const OperationId =
|
|
3
|
+
export type OperationId = S.StringId
|
|
4
|
+
export const OperationId = S.StringId
|
|
6
5
|
|
|
7
|
-
export class OperationProgress extends
|
|
6
|
+
export class OperationProgress extends S.ExtendedClass<
|
|
8
7
|
OperationProgress,
|
|
9
8
|
OperationProgress.From
|
|
10
9
|
>()({
|
|
11
|
-
completed:
|
|
12
|
-
total:
|
|
10
|
+
completed: S.NonNegativeInt,
|
|
11
|
+
total: S.NonNegativeInt
|
|
13
12
|
}) {}
|
|
14
13
|
|
|
15
|
-
export class Success extends
|
|
16
|
-
message:
|
|
14
|
+
export class Success extends S.ExtendedTaggedClass<Success, Success.From>()("Success", {
|
|
15
|
+
message: S.NullOr(S.NonEmptyString2k).withDefault
|
|
17
16
|
}) {}
|
|
18
17
|
|
|
19
|
-
export class Failure extends
|
|
20
|
-
message:
|
|
18
|
+
export class Failure extends S.ExtendedTaggedClass<Failure, Failure.From>()("Failure", {
|
|
19
|
+
message: S.NullOr(S.NonEmptyString2k).withDefault
|
|
21
20
|
}) {}
|
|
22
21
|
|
|
23
|
-
export const OperationResult =
|
|
22
|
+
export const OperationResult = S.ExtendTaggedUnion(S.Union(Success, Failure))
|
|
24
23
|
export type OperationResult = S.Schema.Type<typeof OperationResult>
|
|
25
24
|
|
|
26
|
-
export class Operation extends
|
|
25
|
+
export class Operation extends S.ExtendedClass<Operation, Operation.From>()({
|
|
27
26
|
id: OperationId,
|
|
28
|
-
title:
|
|
27
|
+
title: S.NonEmptyString2k,
|
|
29
28
|
progress: S.optional(OperationProgress),
|
|
30
29
|
result: S.optional(OperationResult),
|
|
31
|
-
createdAt:
|
|
32
|
-
updatedAt:
|
|
30
|
+
createdAt: S.Date.withDefault,
|
|
31
|
+
updatedAt: S.NullOr(S.Date).withDefault
|
|
33
32
|
}) {}
|
|
34
33
|
|
|
35
34
|
// codegen:start {preset: model}
|