@misofm/platform 0.29.0 → 0.30.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/errors.d.ts +9 -5
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +19 -5
- package/dist/errors.js.map +1 -1
- package/dist/party/internal.d.ts.map +1 -1
- package/dist/party/internal.js +3 -2
- package/dist/party/internal.js.map +1 -1
- package/dist/party/types.d.ts +2 -2
- package/dist/party/types.js +2 -2
- package/dist/party/types.js.map +1 -1
- package/package.json +5 -5
- package/src/errors.ts +19 -5
- package/src/party/internal.ts +3 -2
- package/src/party/types.ts +2 -2
package/dist/errors.d.ts
CHANGED
|
@@ -51,12 +51,13 @@ export declare class MisoChainIdentifierMismatchError extends MisoChainIdentifie
|
|
|
51
51
|
get message(): string;
|
|
52
52
|
}
|
|
53
53
|
declare const MalformedRecordSoldEventError_base: Schema.Class<MalformedRecordSoldEventError, Schema.TaggedStruct<"MalformedRecordSoldEventError", {
|
|
54
|
-
readonly digest: Schema.
|
|
55
|
-
readonly reason: Schema.
|
|
54
|
+
readonly digest: Schema.optionalKey<Schema.String>;
|
|
55
|
+
readonly reason: Schema.optionalKey<Schema.String>;
|
|
56
56
|
}>, import("effect/Cause").YieldableError>;
|
|
57
57
|
/** An on-chain `RecordSoldEvent` could not be decoded into a `RecordSale`. */
|
|
58
58
|
export declare class MalformedRecordSoldEventError extends MalformedRecordSoldEventError_base {
|
|
59
59
|
readonly outcome: Outcome;
|
|
60
|
+
get message(): string;
|
|
60
61
|
}
|
|
61
62
|
/** Authenticated-fetch / API-authorization signing or verification failure. */
|
|
62
63
|
export declare const MisoAuthErrorCode: Schema.Literals<readonly ["invalid_target", "challenge_rejected", "invalid_challenge", "signing_failed"]>;
|
|
@@ -64,8 +65,8 @@ export type MisoAuthErrorCode = typeof MisoAuthErrorCode.Type;
|
|
|
64
65
|
declare const MisoAuthError_base: Schema.Class<MisoAuthError, Schema.TaggedStruct<"MisoAuthError", {
|
|
65
66
|
readonly code: Schema.Literals<readonly ["invalid_target", "challenge_rejected", "invalid_challenge", "signing_failed"]>;
|
|
66
67
|
readonly reason: Schema.String;
|
|
67
|
-
readonly status: Schema.
|
|
68
|
-
readonly cause: Schema.
|
|
68
|
+
readonly status: Schema.optionalKey<Schema.Number>;
|
|
69
|
+
readonly cause: Schema.optionalKey<Schema.Defect>;
|
|
69
70
|
}>, import("effect/Cause").YieldableError>;
|
|
70
71
|
export declare class MisoAuthError extends MisoAuthError_base {
|
|
71
72
|
/** An HTTP authorization failure never submits a transaction. */
|
|
@@ -78,6 +79,7 @@ declare const ReleaseNotFoundError_base: Schema.Class<ReleaseNotFoundError, Sche
|
|
|
78
79
|
/** No Release exists at the requested id (or it is not a Release from the configured deployment). */
|
|
79
80
|
export declare class ReleaseNotFoundError extends ReleaseNotFoundError_base {
|
|
80
81
|
readonly outcome: Outcome;
|
|
82
|
+
get message(): string;
|
|
81
83
|
}
|
|
82
84
|
declare const ReceiptNotFoundError_base: Schema.Class<ReceiptNotFoundError, Schema.TaggedStruct<"ReceiptNotFoundError", {
|
|
83
85
|
readonly digest: Schema.String;
|
|
@@ -85,6 +87,7 @@ declare const ReceiptNotFoundError_base: Schema.Class<ReceiptNotFoundError, Sche
|
|
|
85
87
|
/** The fullnode and the indexer both have no record of this transaction digest. */
|
|
86
88
|
export declare class ReceiptNotFoundError extends ReceiptNotFoundError_base {
|
|
87
89
|
readonly outcome: Outcome;
|
|
90
|
+
get message(): string;
|
|
88
91
|
}
|
|
89
92
|
declare const RecordPurchaseNotFoundError_base: Schema.Class<RecordPurchaseNotFoundError, Schema.TaggedStruct<"RecordPurchaseNotFoundError", {
|
|
90
93
|
readonly digest: Schema.String;
|
|
@@ -92,10 +95,11 @@ declare const RecordPurchaseNotFoundError_base: Schema.Class<RecordPurchaseNotFo
|
|
|
92
95
|
/** The transaction exists, but its effects contain no `record_shop::listing::RecordSoldEvent`. */
|
|
93
96
|
export declare class RecordPurchaseNotFoundError extends RecordPurchaseNotFoundError_base {
|
|
94
97
|
readonly outcome: Outcome;
|
|
98
|
+
get message(): string;
|
|
95
99
|
}
|
|
96
100
|
declare const ForeignPressingError_base: Schema.Class<ForeignPressingError, Schema.TaggedStruct<"ForeignPressingError", {
|
|
97
101
|
readonly pressingId: Schema.String;
|
|
98
|
-
readonly actualType: Schema.
|
|
102
|
+
readonly actualType: Schema.optionalKey<Schema.String>;
|
|
99
103
|
}>, import("effect/Cause").YieldableError>;
|
|
100
104
|
/** An object exists at the requested Pressing id, but is not a Pressing from the configured Record package. */
|
|
101
105
|
export declare class ForeignPressingError extends ForeignPressingError_base {
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAavD,OAAO,EACL,WAAW,EACX,eAAe,EACf,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,KAAK,cAAc,EACnB,KAAK,cAAc,GACpB,MAAM,yBAAyB,CAAC;;;;AAEjC,8EAA8E;AAC9E,qBAAa,2BAA4B,SAAQ,gCAKhD;IACC,4FAA4F;IAC5F,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAiB;IAC1C,IAAa,OAAO,IAAI,MAAM,CAE7B;CACF;;;;AAED,yEAAyE;AACzE,qBAAa,0BAA2B,SAAQ,+BAK/C;IACC,4FAA4F;IAC5F,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAiB;IAC1C,IAAa,OAAO,IAAI,MAAM,CAE7B;CACF;;;;AAED,wFAAwF;AACxF,qBAAa,kCAAmC,SAAQ,uCAKvD;IACC,uHAAuH;IACvH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAiB;CAC3C;;;;;AAED,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QAAQ,CAAC,OAAO,EAAE,OAAO,CAAiB;IAC1C,IAAa,OAAO,IAAI,MAAM,CAE7B;CACF"}
|
package/dist/errors.js
CHANGED
|
@@ -76,10 +76,15 @@ export class MisoChainIdentifierMismatchError extends Schema.TaggedError()("Miso
|
|
|
76
76
|
}
|
|
77
77
|
/** An on-chain `RecordSoldEvent` could not be decoded into a `RecordSale`. */
|
|
78
78
|
export class MalformedRecordSoldEventError extends Schema.TaggedError()("MalformedRecordSoldEventError", {
|
|
79
|
-
digest: Schema.
|
|
80
|
-
reason: Schema.
|
|
79
|
+
digest: Schema.optionalKey(Schema.String),
|
|
80
|
+
reason: Schema.optionalKey(Schema.String),
|
|
81
81
|
}) {
|
|
82
82
|
outcome = "not_applied";
|
|
83
|
+
get message() {
|
|
84
|
+
const digest = this.digest ? ` (transaction ${this.digest})` : "";
|
|
85
|
+
const reason = this.reason ? `: ${this.reason}` : "";
|
|
86
|
+
return `@misofm/platform: malformed RecordSoldEvent${digest}${reason}.`;
|
|
87
|
+
}
|
|
83
88
|
}
|
|
84
89
|
/** Authenticated-fetch / API-authorization signing or verification failure. */
|
|
85
90
|
export const MisoAuthErrorCode = Schema.Literals([
|
|
@@ -91,8 +96,8 @@ export const MisoAuthErrorCode = Schema.Literals([
|
|
|
91
96
|
export class MisoAuthError extends Schema.TaggedError()("MisoAuthError", {
|
|
92
97
|
code: MisoAuthErrorCode,
|
|
93
98
|
reason: Schema.String,
|
|
94
|
-
status: Schema.
|
|
95
|
-
cause: Schema.
|
|
99
|
+
status: Schema.optionalKey(Schema.Number),
|
|
100
|
+
cause: Schema.optionalKey(Schema.Defect()),
|
|
96
101
|
}) {
|
|
97
102
|
/** An HTTP authorization failure never submits a transaction. */
|
|
98
103
|
outcome = "not_applied";
|
|
@@ -111,23 +116,32 @@ export class ReleaseNotFoundError extends Schema.TaggedError()("ReleaseNotFoundE
|
|
|
111
116
|
releaseId: Schema.String,
|
|
112
117
|
}) {
|
|
113
118
|
outcome = "not_applied";
|
|
119
|
+
get message() {
|
|
120
|
+
return `@misofm/platform: no Release exists at id ${this.releaseId}.`;
|
|
121
|
+
}
|
|
114
122
|
}
|
|
115
123
|
/** The fullnode and the indexer both have no record of this transaction digest. */
|
|
116
124
|
export class ReceiptNotFoundError extends Schema.TaggedError()("ReceiptNotFoundError", {
|
|
117
125
|
digest: Schema.String,
|
|
118
126
|
}) {
|
|
119
127
|
outcome = "not_applied";
|
|
128
|
+
get message() {
|
|
129
|
+
return `@misofm/platform: no receipt found for transaction ${this.digest}.`;
|
|
130
|
+
}
|
|
120
131
|
}
|
|
121
132
|
/** The transaction exists, but its effects contain no `record_shop::listing::RecordSoldEvent`. */
|
|
122
133
|
export class RecordPurchaseNotFoundError extends Schema.TaggedError()("RecordPurchaseNotFoundError", {
|
|
123
134
|
digest: Schema.String,
|
|
124
135
|
}) {
|
|
125
136
|
outcome = "not_applied";
|
|
137
|
+
get message() {
|
|
138
|
+
return `@misofm/platform: transaction ${this.digest} contains no RecordSoldEvent.`;
|
|
139
|
+
}
|
|
126
140
|
}
|
|
127
141
|
/** An object exists at the requested Pressing id, but is not a Pressing from the configured Record package. */
|
|
128
142
|
export class ForeignPressingError extends Schema.TaggedError()("ForeignPressingError", {
|
|
129
143
|
pressingId: Schema.String,
|
|
130
|
-
actualType: Schema.
|
|
144
|
+
actualType: Schema.optionalKey(Schema.String),
|
|
131
145
|
}) {
|
|
132
146
|
outcome = "not_applied";
|
|
133
147
|
get message() {
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,sCAAsC;AAEtC,wEAAwE;AACxE,wEAAwE;AACxE,0EAA0E;AAC1E,2EAA2E;AAC3E,iEAAiE;AACjE,0EAA0E;AAC1E,4EAA4E;AAC5E,+EAA+E;AAC/E,kBAAkB;AAElB,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CA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,CAAC,WAAW,EAAqC,CAC5G,mCAAmC,EACnC;IACE,MAAM,EAAE,MAAM,CAAC,MAAM;IACrB,MAAM,EAAE,MAAM,CAAC,MAAM;CACtB,CACF;IACU,OAAO,GAAY,aAAa,CAAC;IAC1C,IAAa,OAAO;QAClB,OAAO,qBAAqB,IAAI,CAAC,MAAM,iBAAiB,IAAI,CAAC,MAAM,IAAI,CAAC;IAC1E,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../src/party/internal.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AActD,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAE3D;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAElD;AASD,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../src/party/internal.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AActD,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAE3D;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAElD;AASD,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,GAAG,OAAO,CAW3D;AAKD,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,GAAG,KAAK,CAEvD;AAsBD,2DAA2D;AAE3D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,GAAG,GAAG,MAAM,EAAE,CAGzC;AAED,wDAAwD;AAExD,wBAAgB,OAAO,CAAC,CAAC,EAAE,GAAG,GAAG,MAAM,EAAE,CAGxC;AAED,kEAAkE;AAElE,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,GAAG,MAAM,EAAE,CAG1C;AAED,sFAAsF;AAEtF,wBAAgB,OAAO,CAAC,CAAC,EAAE,GAAG,GAAG,GAAG,EAAE,CAErC"}
|
package/dist/party/internal.js
CHANGED
|
@@ -28,11 +28,12 @@ function unwrapCode(v) {
|
|
|
28
28
|
}
|
|
29
29
|
// deno-lint-ignore no-explicit-any -- generated parse output is loosely typed
|
|
30
30
|
export function mapProfile(partyId, d) {
|
|
31
|
+
const country = unwrapCode(d.country);
|
|
31
32
|
return {
|
|
32
33
|
partyId,
|
|
33
34
|
bioShort: d.bio_short,
|
|
34
|
-
bioLong: d.bio_long
|
|
35
|
-
country:
|
|
35
|
+
...(d.bio_long == null ? {} : { bioLong: d.bio_long }),
|
|
36
|
+
...(country === undefined ? {} : { country }),
|
|
36
37
|
languages: Array.isArray(d.languages)
|
|
37
38
|
? d.languages.map((l) => unwrapCode(l)).filter((c) => Boolean(c))
|
|
38
39
|
: [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../src/party/internal.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,sCAAsC;AAEtC,mFAAmF;AACnF,kCAAkC;AAElC,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAGzD,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;AAExB,SAAS,WAAW,CAAC,KAAiB;IACpC,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC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AAI,EAAE,CAAC;IACjF,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAU,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAClF,CAAC;AAED,sFAAsF;AACtF,8EAA8E;AAC9E,MAAM,UAAU,OAAO,CAAC,CAAM;IAC5B,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;AACvG,CAAC"}
|
package/dist/party/types.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import { Schema } from "effect";
|
|
|
2
2
|
declare const Profile_base: Schema.Class<Profile, Schema.Struct<{
|
|
3
3
|
readonly partyId: Schema.String;
|
|
4
4
|
readonly bioShort: Schema.String;
|
|
5
|
-
readonly bioLong: Schema.
|
|
5
|
+
readonly bioLong: Schema.optionalKey<Schema.String>;
|
|
6
6
|
/** ISO 3166-1 alpha-2 country code, e.g. "GB". */
|
|
7
|
-
readonly country: Schema.
|
|
7
|
+
readonly country: Schema.optionalKey<Schema.String>;
|
|
8
8
|
/** ISO 639-1 language codes, e.g. ["en"]. */
|
|
9
9
|
readonly languages: Schema.$Array<Schema.String>;
|
|
10
10
|
}>, {}>;
|
package/dist/party/types.js
CHANGED
|
@@ -8,9 +8,9 @@ import { Schema } from "effect";
|
|
|
8
8
|
export class Profile extends Schema.Class("@misofm/platform/Profile")({
|
|
9
9
|
partyId: Schema.String,
|
|
10
10
|
bioShort: Schema.String,
|
|
11
|
-
bioLong: Schema.
|
|
11
|
+
bioLong: Schema.optionalKey(Schema.String),
|
|
12
12
|
/** ISO 3166-1 alpha-2 country code, e.g. "GB". */
|
|
13
|
-
country: Schema.
|
|
13
|
+
country: Schema.optionalKey(Schema.String),
|
|
14
14
|
/** ISO 639-1 language codes, e.g. ["en"]. */
|
|
15
15
|
languages: Schema.Array(Schema.String),
|
|
16
16
|
}) {
|
package/dist/party/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/party/types.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,sCAAsC;AAEtC,0EAA0E;AAC1E,+EAA+E;AAC/E,0EAA0E;AAC1E,4CAA4C;AAE5C,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,MAAM,OAAO,OAAQ,SAAQ,MAAM,CAAC,KAAK,CAAU,0BAA0B,CAAC,CAAC;IAC7E,OAAO,EAAE,MAAM,CAAC,MAAM;IACtB,QAAQ,EAAE,MAAM,CAAC,MAAM;IACvB,OAAO,EAAE,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/party/types.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,sCAAsC;AAEtC,0EAA0E;AAC1E,+EAA+E;AAC/E,0EAA0E;AAC1E,4CAA4C;AAE5C,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,MAAM,OAAO,OAAQ,SAAQ,MAAM,CAAC,KAAK,CAAU,0BAA0B,CAAC,CAAC;IAC7E,OAAO,EAAE,MAAM,CAAC,MAAM;IACtB,QAAQ,EAAE,MAAM,CAAC,MAAM;IACvB,OAAO,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC;IAC1C,kDAAkD;IAClD,OAAO,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC;IAC1C,6CAA6C;IAC7C,SAAS,EA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|
3
|
+
"version": "0.30.0",
|
|
4
4
|
"packageManager": "bun@1.4.0",
|
|
5
5
|
"description": "Complete client SDK for the Miso platform on Sui \u2014 high-level reads, pressings, listings, records, work publishing, Party extensions, and the first-party extensions built on top of the @misofm/musicos object model and the @misofm/partyos Party identity model.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -153,21 +153,21 @@
|
|
|
153
153
|
"dependencies": {
|
|
154
154
|
"@misofm/streaming": "0.3.0",
|
|
155
155
|
"@mysten/bcs": "^2.1.1",
|
|
156
|
-
"@misofm/musicos": "0.
|
|
157
|
-
"@misofm/partyos": "0.
|
|
156
|
+
"@misofm/musicos": "0.5.0",
|
|
157
|
+
"@misofm/partyos": "0.5.0"
|
|
158
158
|
},
|
|
159
159
|
"devDependencies": {
|
|
160
160
|
"@mysten/move-bytecode-template": "^0.4.0",
|
|
161
161
|
"@mysten/sui": "2.29.0",
|
|
162
162
|
"@types/bun": "^1.3.14",
|
|
163
|
-
"@unconfirmed/sui-effect": "0.
|
|
163
|
+
"@unconfirmed/sui-effect": "0.2.0",
|
|
164
164
|
"effect": "4.0.0-rc.112",
|
|
165
165
|
"typescript": "^7.0.2"
|
|
166
166
|
},
|
|
167
167
|
"peerDependencies": {
|
|
168
168
|
"@mysten/move-bytecode-template": "^0.4.0",
|
|
169
169
|
"@mysten/sui": "2.29.0",
|
|
170
|
-
"@unconfirmed/sui-effect": "
|
|
170
|
+
"@unconfirmed/sui-effect": ">=0.1.0 <0.3.0",
|
|
171
171
|
"effect": "4.0.0-rc.112",
|
|
172
172
|
"typescript": "^5.7 || ^6 || ^7"
|
|
173
173
|
},
|
package/src/errors.ts
CHANGED
|
@@ -113,11 +113,16 @@ export class MisoChainIdentifierMismatchError extends Schema.TaggedError<MisoCha
|
|
|
113
113
|
export class MalformedRecordSoldEventError extends Schema.TaggedError<MalformedRecordSoldEventError>()(
|
|
114
114
|
"MalformedRecordSoldEventError",
|
|
115
115
|
{
|
|
116
|
-
digest: Schema.
|
|
117
|
-
reason: Schema.
|
|
116
|
+
digest: Schema.optionalKey(Schema.String),
|
|
117
|
+
reason: Schema.optionalKey(Schema.String),
|
|
118
118
|
},
|
|
119
119
|
) {
|
|
120
120
|
readonly outcome: Outcome = "not_applied";
|
|
121
|
+
override get message(): string {
|
|
122
|
+
const digest = this.digest ? ` (transaction ${this.digest})` : "";
|
|
123
|
+
const reason = this.reason ? `: ${this.reason}` : "";
|
|
124
|
+
return `@misofm/platform: malformed RecordSoldEvent${digest}${reason}.`;
|
|
125
|
+
}
|
|
121
126
|
}
|
|
122
127
|
|
|
123
128
|
/** Authenticated-fetch / API-authorization signing or verification failure. */
|
|
@@ -132,8 +137,8 @@ export type MisoAuthErrorCode = typeof MisoAuthErrorCode.Type;
|
|
|
132
137
|
export class MisoAuthError extends Schema.TaggedError<MisoAuthError>()("MisoAuthError", {
|
|
133
138
|
code: MisoAuthErrorCode,
|
|
134
139
|
reason: Schema.String,
|
|
135
|
-
status: Schema.
|
|
136
|
-
cause: Schema.
|
|
140
|
+
status: Schema.optionalKey(Schema.Number),
|
|
141
|
+
cause: Schema.optionalKey(Schema.Defect()),
|
|
137
142
|
}) {
|
|
138
143
|
/** An HTTP authorization failure never submits a transaction. */
|
|
139
144
|
readonly outcome: Outcome = "not_applied";
|
|
@@ -154,6 +159,9 @@ export class ReleaseNotFoundError extends Schema.TaggedError<ReleaseNotFoundErro
|
|
|
154
159
|
releaseId: Schema.String,
|
|
155
160
|
}) {
|
|
156
161
|
readonly outcome: Outcome = "not_applied";
|
|
162
|
+
override get message(): string {
|
|
163
|
+
return `@misofm/platform: no Release exists at id ${this.releaseId}.`;
|
|
164
|
+
}
|
|
157
165
|
}
|
|
158
166
|
|
|
159
167
|
/** The fullnode and the indexer both have no record of this transaction digest. */
|
|
@@ -161,6 +169,9 @@ export class ReceiptNotFoundError extends Schema.TaggedError<ReceiptNotFoundErro
|
|
|
161
169
|
digest: Schema.String,
|
|
162
170
|
}) {
|
|
163
171
|
readonly outcome: Outcome = "not_applied";
|
|
172
|
+
override get message(): string {
|
|
173
|
+
return `@misofm/platform: no receipt found for transaction ${this.digest}.`;
|
|
174
|
+
}
|
|
164
175
|
}
|
|
165
176
|
|
|
166
177
|
/** The transaction exists, but its effects contain no `record_shop::listing::RecordSoldEvent`. */
|
|
@@ -171,12 +182,15 @@ export class RecordPurchaseNotFoundError extends Schema.TaggedError<RecordPurcha
|
|
|
171
182
|
},
|
|
172
183
|
) {
|
|
173
184
|
readonly outcome: Outcome = "not_applied";
|
|
185
|
+
override get message(): string {
|
|
186
|
+
return `@misofm/platform: transaction ${this.digest} contains no RecordSoldEvent.`;
|
|
187
|
+
}
|
|
174
188
|
}
|
|
175
189
|
|
|
176
190
|
/** An object exists at the requested Pressing id, but is not a Pressing from the configured Record package. */
|
|
177
191
|
export class ForeignPressingError extends Schema.TaggedError<ForeignPressingError>()("ForeignPressingError", {
|
|
178
192
|
pressingId: Schema.String,
|
|
179
|
-
actualType: Schema.
|
|
193
|
+
actualType: Schema.optionalKey(Schema.String),
|
|
180
194
|
}) {
|
|
181
195
|
readonly outcome: Outcome = "not_applied";
|
|
182
196
|
override get message(): string {
|
package/src/party/internal.ts
CHANGED
|
@@ -36,11 +36,12 @@ function unwrapCode(v: unknown): string | undefined {
|
|
|
36
36
|
|
|
37
37
|
// deno-lint-ignore no-explicit-any -- generated parse output is loosely typed
|
|
38
38
|
export function mapProfile(partyId: string, d: any): Profile {
|
|
39
|
+
const country = unwrapCode(d.country);
|
|
39
40
|
return {
|
|
40
41
|
partyId,
|
|
41
42
|
bioShort: d.bio_short,
|
|
42
|
-
bioLong: d.bio_long
|
|
43
|
-
country:
|
|
43
|
+
...(d.bio_long == null ? {} : { bioLong: d.bio_long }),
|
|
44
|
+
...(country === undefined ? {} : { country }),
|
|
44
45
|
languages: Array.isArray(d.languages)
|
|
45
46
|
? d.languages.map((l: unknown) => unwrapCode(l)).filter((c: unknown): c is string => Boolean(c))
|
|
46
47
|
: [],
|
package/src/party/types.ts
CHANGED
|
@@ -11,9 +11,9 @@ import { Schema } from "effect";
|
|
|
11
11
|
export class Profile extends Schema.Class<Profile>("@misofm/platform/Profile")({
|
|
12
12
|
partyId: Schema.String,
|
|
13
13
|
bioShort: Schema.String,
|
|
14
|
-
bioLong: Schema.
|
|
14
|
+
bioLong: Schema.optionalKey(Schema.String),
|
|
15
15
|
/** ISO 3166-1 alpha-2 country code, e.g. "GB". */
|
|
16
|
-
country: Schema.
|
|
16
|
+
country: Schema.optionalKey(Schema.String),
|
|
17
17
|
/** ISO 639-1 language codes, e.g. ["en"]. */
|
|
18
18
|
languages: Schema.Array(Schema.String),
|
|
19
19
|
}) {}
|