@misofm/platform 0.29.1 → 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 +5 -5
- package/dist/errors.js +5 -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 +5 -5
- package/src/party/internal.ts +3 -2
- package/src/party/types.ts +2 -2
package/dist/errors.d.ts
CHANGED
|
@@ -51,8 +51,8 @@ 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 {
|
|
@@ -65,8 +65,8 @@ export type MisoAuthErrorCode = typeof MisoAuthErrorCode.Type;
|
|
|
65
65
|
declare const MisoAuthError_base: Schema.Class<MisoAuthError, Schema.TaggedStruct<"MisoAuthError", {
|
|
66
66
|
readonly code: Schema.Literals<readonly ["invalid_target", "challenge_rejected", "invalid_challenge", "signing_failed"]>;
|
|
67
67
|
readonly reason: Schema.String;
|
|
68
|
-
readonly status: Schema.
|
|
69
|
-
readonly cause: Schema.
|
|
68
|
+
readonly status: Schema.optionalKey<Schema.Number>;
|
|
69
|
+
readonly cause: Schema.optionalKey<Schema.Defect>;
|
|
70
70
|
}>, import("effect/Cause").YieldableError>;
|
|
71
71
|
export declare class MisoAuthError extends MisoAuthError_base {
|
|
72
72
|
/** An HTTP authorization failure never submits a transaction. */
|
|
@@ -99,7 +99,7 @@ export declare class RecordPurchaseNotFoundError extends RecordPurchaseNotFoundE
|
|
|
99
99
|
}
|
|
100
100
|
declare const ForeignPressingError_base: Schema.Class<ForeignPressingError, Schema.TaggedStruct<"ForeignPressingError", {
|
|
101
101
|
readonly pressingId: Schema.String;
|
|
102
|
-
readonly actualType: Schema.
|
|
102
|
+
readonly actualType: Schema.optionalKey<Schema.String>;
|
|
103
103
|
}>, import("effect/Cause").YieldableError>;
|
|
104
104
|
/** An object exists at the requested Pressing id, but is not a Pressing from the configured Record package. */
|
|
105
105
|
export declare class ForeignPressingError extends ForeignPressingError_base {
|
package/dist/errors.js
CHANGED
|
@@ -76,8 +76,8 @@ 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
83
|
get message() {
|
|
@@ -96,8 +96,8 @@ export const MisoAuthErrorCode = Schema.Literals([
|
|
|
96
96
|
export class MisoAuthError extends Schema.TaggedError()("MisoAuthError", {
|
|
97
97
|
code: MisoAuthErrorCode,
|
|
98
98
|
reason: Schema.String,
|
|
99
|
-
status: Schema.
|
|
100
|
-
cause: Schema.
|
|
99
|
+
status: Schema.optionalKey(Schema.Number),
|
|
100
|
+
cause: Schema.optionalKey(Schema.Defect()),
|
|
101
101
|
}) {
|
|
102
102
|
/** An HTTP authorization failure never submits a transaction. */
|
|
103
103
|
outcome = "not_applied";
|
|
@@ -141,7 +141,7 @@ export class RecordPurchaseNotFoundError extends Schema.TaggedError()("RecordPur
|
|
|
141
141
|
/** An object exists at the requested Pressing id, but is not a Pressing from the configured Record package. */
|
|
142
142
|
export class ForeignPressingError extends Schema.TaggedError()("ForeignPressingError", {
|
|
143
143
|
pressingId: Schema.String,
|
|
144
|
-
actualType: Schema.
|
|
144
|
+
actualType: Schema.optionalKey(Schema.String),
|
|
145
145
|
}) {
|
|
146
146
|
outcome = "not_applied";
|
|
147
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,CAAC;AAGhC,2EAA2E;AAC3E,4EAA4E;AAC5E,0EAA0E;AAC1E,8DAA8D;AAC9D,4EAA4E;AAC5E,sEAAsE;AACtE,gFAAgF;AAChF,gFAAgF;AAChF,sEAAsE;AACtE,yEAAyE;AACzE,4EAA4E;AAC5E,OAAO,EACL,WAAW,EACX,eAAe,EACf,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,cAAc,GAGf,MAAM,yBAAyB,CAAC;AAEjC,8EAA8E;AAC9E,MAAM,OAAO,2BAA4B,SAAQ,MAAM,CAAC,WAAW,EAA+B,CAChG,6BAA6B,EAC7B;IACE,MAAM,EAAE,MAAM,CAAC,MAAM;CACtB,CACF;IACC,4FAA4F;IACnF,OAAO,GAAY,aAAa,CAAC;IAC1C,IAAa,OAAO;QAClB,OAAO,mDAAmD,IAAI,CA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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,CAAC;AACtF,CAAC;AAED,SAAS,aAAa,CAAC,KAAa;IAClC,IAAI,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAC7D,OAAO,MAAM,CAAC,MAAM,GAAG,CAAC;QAAE,MAAM,IAAI,GAAG,CAAC;IACxC,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC;AAC5B,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,KAAsB;IACjD,OAAO,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;AAC9D,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,KAAa;IACxC,OAAO,IAAI,CAAC,KAAK,CAAC,a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AM,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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,wBAAwB;IACxB,GAAG;IACH,WAAW;IACX,SAAS;IACT,QAAQ;IACR,SAAS;IACT,SAAS;IACT,UAAU;IACV,QAAQ;IACR,QAAQ;IACR,UAAU;IACV,sBAAsB;IACtB,SAAS;IACT,UAAU;IACV,YAAY;IACZ,YAAY;IACZ,QAAQ;IACR,OAAO;IACP,aAAa;IACb,WAAW;IACX,2CAA2C;IAC3C,SAAS;IACT,aAAa;IACb,gBAAgB;IAChB,eAAe;IACf,WAAW;IACX,KAAK;IACL,SAAS;IACT,UAAU;IACV,MAAM;CACP,CAAC,CAAC;AAGH;;;;GAIG;AACH,MAAM,OAAO,YAAa,SAAQ,MAAM,CAAC,KAAK,CAAe,+BAA+B,CAAC,CAAC;IAC5F,QAAQ,EAAE,WAAW;IACrB,sFAAsF;IACtF,KAAK,EAAE,MAAM,CAAC,MAAM;IACpB,oDAAoD;IACpD,GAAG,EAAE,MAAM,CAAC,MAAM;CACnB,CAAC;CAAG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@misofm/platform",
|
|
3
|
-
"version": "0.
|
|
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,8 +113,8 @@ 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";
|
|
@@ -137,8 +137,8 @@ export type MisoAuthErrorCode = typeof MisoAuthErrorCode.Type;
|
|
|
137
137
|
export class MisoAuthError extends Schema.TaggedError<MisoAuthError>()("MisoAuthError", {
|
|
138
138
|
code: MisoAuthErrorCode,
|
|
139
139
|
reason: Schema.String,
|
|
140
|
-
status: Schema.
|
|
141
|
-
cause: Schema.
|
|
140
|
+
status: Schema.optionalKey(Schema.Number),
|
|
141
|
+
cause: Schema.optionalKey(Schema.Defect()),
|
|
142
142
|
}) {
|
|
143
143
|
/** An HTTP authorization failure never submits a transaction. */
|
|
144
144
|
readonly outcome: Outcome = "not_applied";
|
|
@@ -190,7 +190,7 @@ export class RecordPurchaseNotFoundError extends Schema.TaggedError<RecordPurcha
|
|
|
190
190
|
/** An object exists at the requested Pressing id, but is not a Pressing from the configured Record package. */
|
|
191
191
|
export class ForeignPressingError extends Schema.TaggedError<ForeignPressingError>()("ForeignPressingError", {
|
|
192
192
|
pressingId: Schema.String,
|
|
193
|
-
actualType: Schema.
|
|
193
|
+
actualType: Schema.optionalKey(Schema.String),
|
|
194
194
|
}) {
|
|
195
195
|
readonly outcome: Outcome = "not_applied";
|
|
196
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
|
}) {}
|