@farcaster/hub-web 0.8.9 → 0.8.10
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 +189 -0
- package/dist/index.js +38 -3
- package/dist/index.mjs +38 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
@@ -3117,6 +3117,28 @@ function userDataTypeToJSON(object) {
|
|
3117
3117
|
throw new tsProtoGlobalThis2.Error("Unrecognized enum value " + object + " for enum UserDataType");
|
3118
3118
|
}
|
3119
3119
|
}
|
3120
|
+
function castTypeFromJSON(object) {
|
3121
|
+
switch (object) {
|
3122
|
+
case 0:
|
3123
|
+
case "CAST":
|
3124
|
+
return 0 /* CAST */;
|
3125
|
+
case 1:
|
3126
|
+
case "LONG_CAST":
|
3127
|
+
return 1 /* LONG_CAST */;
|
3128
|
+
default:
|
3129
|
+
throw new tsProtoGlobalThis2.Error("Unrecognized enum value " + object + " for enum CastType");
|
3130
|
+
}
|
3131
|
+
}
|
3132
|
+
function castTypeToJSON(object) {
|
3133
|
+
switch (object) {
|
3134
|
+
case 0 /* CAST */:
|
3135
|
+
return "CAST";
|
3136
|
+
case 1 /* LONG_CAST */:
|
3137
|
+
return "LONG_CAST";
|
3138
|
+
default:
|
3139
|
+
throw new tsProtoGlobalThis2.Error("Unrecognized enum value " + object + " for enum CastType");
|
3140
|
+
}
|
3141
|
+
}
|
3120
3142
|
function reactionTypeFromJSON(object) {
|
3121
3143
|
switch (object) {
|
3122
3144
|
case 0:
|
@@ -3653,7 +3675,8 @@ function createBaseCastAddBody() {
|
|
3653
3675
|
parentUrl: void 0,
|
3654
3676
|
text: "",
|
3655
3677
|
mentionsPositions: [],
|
3656
|
-
embeds: []
|
3678
|
+
embeds: [],
|
3679
|
+
type: 0
|
3657
3680
|
};
|
3658
3681
|
}
|
3659
3682
|
var CastAddBody = {
|
@@ -3683,6 +3706,9 @@ var CastAddBody = {
|
|
3683
3706
|
for (const v of message.embeds) {
|
3684
3707
|
Embed.encode(v, writer.uint32(50).fork()).ldelim();
|
3685
3708
|
}
|
3709
|
+
if (message.type !== 0) {
|
3710
|
+
writer.uint32(64).int32(message.type);
|
3711
|
+
}
|
3686
3712
|
return writer;
|
3687
3713
|
},
|
3688
3714
|
decode(input, length) {
|
@@ -3748,6 +3774,12 @@ var CastAddBody = {
|
|
3748
3774
|
}
|
3749
3775
|
message.embeds.push(Embed.decode(reader, reader.uint32()));
|
3750
3776
|
continue;
|
3777
|
+
case 8:
|
3778
|
+
if (tag != 64) {
|
3779
|
+
break;
|
3780
|
+
}
|
3781
|
+
message.type = reader.int32();
|
3782
|
+
continue;
|
3751
3783
|
}
|
3752
3784
|
if ((tag & 7) == 4 || tag == 0) {
|
3753
3785
|
break;
|
@@ -3764,7 +3796,8 @@ var CastAddBody = {
|
|
3764
3796
|
parentUrl: isSet2(object.parentUrl) ? String(object.parentUrl) : void 0,
|
3765
3797
|
text: isSet2(object.text) ? String(object.text) : "",
|
3766
3798
|
mentionsPositions: Array.isArray(object == null ? void 0 : object.mentionsPositions) ? object.mentionsPositions.map((e) => Number(e)) : [],
|
3767
|
-
embeds: Array.isArray(object == null ? void 0 : object.embeds) ? object.embeds.map((e) => Embed.fromJSON(e)) : []
|
3799
|
+
embeds: Array.isArray(object == null ? void 0 : object.embeds) ? object.embeds.map((e) => Embed.fromJSON(e)) : [],
|
3800
|
+
type: isSet2(object.type) ? castTypeFromJSON(object.type) : 0
|
3768
3801
|
};
|
3769
3802
|
},
|
3770
3803
|
toJSON(message) {
|
@@ -3792,13 +3825,14 @@ var CastAddBody = {
|
|
3792
3825
|
} else {
|
3793
3826
|
obj.embeds = [];
|
3794
3827
|
}
|
3828
|
+
message.type !== void 0 && (obj.type = castTypeToJSON(message.type));
|
3795
3829
|
return obj;
|
3796
3830
|
},
|
3797
3831
|
create(base) {
|
3798
3832
|
return CastAddBody.fromPartial(base != null ? base : {});
|
3799
3833
|
},
|
3800
3834
|
fromPartial(object) {
|
3801
|
-
var _a, _b, _c, _d, _e, _f;
|
3835
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
3802
3836
|
const message = createBaseCastAddBody();
|
3803
3837
|
message.embedsDeprecated = ((_a = object.embedsDeprecated) == null ? void 0 : _a.map((e) => e)) || [];
|
3804
3838
|
message.mentions = ((_b = object.mentions) == null ? void 0 : _b.map((e) => e)) || [];
|
@@ -3807,6 +3841,7 @@ var CastAddBody = {
|
|
3807
3841
|
message.text = (_d = object.text) != null ? _d : "";
|
3808
3842
|
message.mentionsPositions = ((_e = object.mentionsPositions) == null ? void 0 : _e.map((e) => e)) || [];
|
3809
3843
|
message.embeds = ((_f = object.embeds) == null ? void 0 : _f.map((e) => Embed.fromPartial(e))) || [];
|
3844
|
+
message.type = (_g = object.type) != null ? _g : 0;
|
3810
3845
|
return message;
|
3811
3846
|
}
|
3812
3847
|
};
|
package/dist/index.mjs
CHANGED
@@ -3053,6 +3053,28 @@ function userDataTypeToJSON(object) {
|
|
3053
3053
|
throw new tsProtoGlobalThis2.Error("Unrecognized enum value " + object + " for enum UserDataType");
|
3054
3054
|
}
|
3055
3055
|
}
|
3056
|
+
function castTypeFromJSON(object) {
|
3057
|
+
switch (object) {
|
3058
|
+
case 0:
|
3059
|
+
case "CAST":
|
3060
|
+
return 0 /* CAST */;
|
3061
|
+
case 1:
|
3062
|
+
case "LONG_CAST":
|
3063
|
+
return 1 /* LONG_CAST */;
|
3064
|
+
default:
|
3065
|
+
throw new tsProtoGlobalThis2.Error("Unrecognized enum value " + object + " for enum CastType");
|
3066
|
+
}
|
3067
|
+
}
|
3068
|
+
function castTypeToJSON(object) {
|
3069
|
+
switch (object) {
|
3070
|
+
case 0 /* CAST */:
|
3071
|
+
return "CAST";
|
3072
|
+
case 1 /* LONG_CAST */:
|
3073
|
+
return "LONG_CAST";
|
3074
|
+
default:
|
3075
|
+
throw new tsProtoGlobalThis2.Error("Unrecognized enum value " + object + " for enum CastType");
|
3076
|
+
}
|
3077
|
+
}
|
3056
3078
|
function reactionTypeFromJSON(object) {
|
3057
3079
|
switch (object) {
|
3058
3080
|
case 0:
|
@@ -3589,7 +3611,8 @@ function createBaseCastAddBody() {
|
|
3589
3611
|
parentUrl: void 0,
|
3590
3612
|
text: "",
|
3591
3613
|
mentionsPositions: [],
|
3592
|
-
embeds: []
|
3614
|
+
embeds: [],
|
3615
|
+
type: 0
|
3593
3616
|
};
|
3594
3617
|
}
|
3595
3618
|
var CastAddBody = {
|
@@ -3619,6 +3642,9 @@ var CastAddBody = {
|
|
3619
3642
|
for (const v of message.embeds) {
|
3620
3643
|
Embed.encode(v, writer.uint32(50).fork()).ldelim();
|
3621
3644
|
}
|
3645
|
+
if (message.type !== 0) {
|
3646
|
+
writer.uint32(64).int32(message.type);
|
3647
|
+
}
|
3622
3648
|
return writer;
|
3623
3649
|
},
|
3624
3650
|
decode(input, length) {
|
@@ -3684,6 +3710,12 @@ var CastAddBody = {
|
|
3684
3710
|
}
|
3685
3711
|
message.embeds.push(Embed.decode(reader, reader.uint32()));
|
3686
3712
|
continue;
|
3713
|
+
case 8:
|
3714
|
+
if (tag != 64) {
|
3715
|
+
break;
|
3716
|
+
}
|
3717
|
+
message.type = reader.int32();
|
3718
|
+
continue;
|
3687
3719
|
}
|
3688
3720
|
if ((tag & 7) == 4 || tag == 0) {
|
3689
3721
|
break;
|
@@ -3700,7 +3732,8 @@ var CastAddBody = {
|
|
3700
3732
|
parentUrl: isSet2(object.parentUrl) ? String(object.parentUrl) : void 0,
|
3701
3733
|
text: isSet2(object.text) ? String(object.text) : "",
|
3702
3734
|
mentionsPositions: Array.isArray(object == null ? void 0 : object.mentionsPositions) ? object.mentionsPositions.map((e) => Number(e)) : [],
|
3703
|
-
embeds: Array.isArray(object == null ? void 0 : object.embeds) ? object.embeds.map((e) => Embed.fromJSON(e)) : []
|
3735
|
+
embeds: Array.isArray(object == null ? void 0 : object.embeds) ? object.embeds.map((e) => Embed.fromJSON(e)) : [],
|
3736
|
+
type: isSet2(object.type) ? castTypeFromJSON(object.type) : 0
|
3704
3737
|
};
|
3705
3738
|
},
|
3706
3739
|
toJSON(message) {
|
@@ -3728,13 +3761,14 @@ var CastAddBody = {
|
|
3728
3761
|
} else {
|
3729
3762
|
obj.embeds = [];
|
3730
3763
|
}
|
3764
|
+
message.type !== void 0 && (obj.type = castTypeToJSON(message.type));
|
3731
3765
|
return obj;
|
3732
3766
|
},
|
3733
3767
|
create(base) {
|
3734
3768
|
return CastAddBody.fromPartial(base != null ? base : {});
|
3735
3769
|
},
|
3736
3770
|
fromPartial(object) {
|
3737
|
-
var _a, _b, _c, _d, _e, _f;
|
3771
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
3738
3772
|
const message = createBaseCastAddBody();
|
3739
3773
|
message.embedsDeprecated = ((_a = object.embedsDeprecated) == null ? void 0 : _a.map((e) => e)) || [];
|
3740
3774
|
message.mentions = ((_b = object.mentions) == null ? void 0 : _b.map((e) => e)) || [];
|
@@ -3743,6 +3777,7 @@ var CastAddBody = {
|
|
3743
3777
|
message.text = (_d = object.text) != null ? _d : "";
|
3744
3778
|
message.mentionsPositions = ((_e = object.mentionsPositions) == null ? void 0 : _e.map((e) => e)) || [];
|
3745
3779
|
message.embeds = ((_f = object.embeds) == null ? void 0 : _f.map((e) => Embed.fromPartial(e))) || [];
|
3780
|
+
message.type = (_g = object.type) != null ? _g : 0;
|
3746
3781
|
return message;
|
3747
3782
|
}
|
3748
3783
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@farcaster/hub-web",
|
3
|
-
"version": "0.8.
|
3
|
+
"version": "0.8.10",
|
4
4
|
"main": "./dist/index.js",
|
5
5
|
"module": "./dist/index.mjs",
|
6
6
|
"types": "./dist/index.d.ts",
|
@@ -32,7 +32,7 @@
|
|
32
32
|
"ts-proto": "^1.146.0"
|
33
33
|
},
|
34
34
|
"dependencies": {
|
35
|
-
"@farcaster/core": "^0.14.
|
35
|
+
"@farcaster/core": "^0.14.15",
|
36
36
|
"@improbable-eng/grpc-web": "^0.15.0",
|
37
37
|
"rxjs": "^7.8.0"
|
38
38
|
}
|