@juzi/wechaty-grpc 1.0.29 → 1.0.31
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/cjs/out/wechaty/puppet/post_pb.d.ts +25 -0
- package/dist/cjs/out/wechaty/puppet/post_pb.js +206 -4
- package/dist/cjs/out/wechaty/puppet.openapi.yaml +19 -7
- package/dist/cjs/out/wechaty/puppet.swagger.json +25 -7
- package/dist/cjs/out/wechaty/puppet_grpc_pb.d.ts +0 -102
- package/dist/cjs/out/wechaty/puppet_grpc_pb.js +1 -67
- package/dist/cjs/out/wechaty/puppet_pb_service.d.ts +0 -114
- package/dist/cjs/out/wechaty/puppet_pb_service.js +0 -240
- package/dist/cjs/proto/wechaty/puppet/post.proto +9 -0
- package/dist/cjs/proto/wechaty/puppet.proto +0 -42
- package/dist/cjs/src/package-json.js +1 -1
- package/dist/esm/out/wechaty/puppet/post_pb.d.ts +25 -0
- package/dist/esm/out/wechaty/puppet/post_pb.js +206 -4
- package/dist/esm/out/wechaty/puppet.openapi.yaml +19 -7
- package/dist/esm/out/wechaty/puppet.swagger.json +25 -7
- package/dist/esm/out/wechaty/puppet_grpc_pb.d.ts +0 -102
- package/dist/esm/out/wechaty/puppet_grpc_pb.js +1 -67
- package/dist/esm/out/wechaty/puppet_pb_service.d.ts +0 -114
- package/dist/esm/out/wechaty/puppet_pb_service.js +0 -240
- package/dist/esm/proto/wechaty/puppet/post.proto +9 -0
- package/dist/esm/proto/wechaty/puppet.proto +0 -42
- package/dist/esm/src/package-json.js +1 -1
- package/out/wechaty/puppet/post_pb.d.ts +25 -0
- package/out/wechaty/puppet/post_pb.js +206 -4
- package/out/wechaty/puppet.openapi.yaml +19 -7
- package/out/wechaty/puppet.swagger.json +25 -7
- package/out/wechaty/puppet_grpc_pb.d.ts +0 -102
- package/out/wechaty/puppet_grpc_pb.js +1 -67
- package/out/wechaty/puppet_pb_service.d.ts +0 -114
- package/out/wechaty/puppet_pb_service.js +0 -240
- package/package.json +1 -1
- package/src/package-json.ts +1 -1
|
@@ -2748,73 +2748,7 @@ momentPublish: {
|
|
|
2748
2748
|
// Moment & Post With Correct Name
|
|
2749
2749
|
//
|
|
2750
2750
|
//
|
|
2751
|
-
|
|
2752
|
-
path: '/wechaty.Puppet/MomentPublish',
|
|
2753
|
-
requestStream: false,
|
|
2754
|
-
responseStream: false,
|
|
2755
|
-
requestType: wechaty_puppet_moment_pb.MomentPublishRequest,
|
|
2756
|
-
responseType: wechaty_puppet_moment_pb.MomentPublishResponse,
|
|
2757
|
-
requestSerialize: serialize_wechaty_puppet_MomentPublishRequest,
|
|
2758
|
-
requestDeserialize: deserialize_wechaty_puppet_MomentPublishRequest,
|
|
2759
|
-
responseSerialize: serialize_wechaty_puppet_MomentPublishResponse,
|
|
2760
|
-
responseDeserialize: deserialize_wechaty_puppet_MomentPublishResponse,
|
|
2761
|
-
},
|
|
2762
|
-
postTap: {
|
|
2763
|
-
path: '/wechaty.Puppet/PostTap',
|
|
2764
|
-
requestStream: false,
|
|
2765
|
-
responseStream: false,
|
|
2766
|
-
requestType: wechaty_puppet_post_pb.PostTapRequest,
|
|
2767
|
-
responseType: wechaty_puppet_post_pb.PostTapResponse,
|
|
2768
|
-
requestSerialize: serialize_wechaty_puppet_PostTapRequest,
|
|
2769
|
-
requestDeserialize: deserialize_wechaty_puppet_PostTapRequest,
|
|
2770
|
-
responseSerialize: serialize_wechaty_puppet_PostTapResponse,
|
|
2771
|
-
responseDeserialize: deserialize_wechaty_puppet_PostTapResponse,
|
|
2772
|
-
},
|
|
2773
|
-
momentSignature: {
|
|
2774
|
-
path: '/wechaty.Puppet/MomentSignature',
|
|
2775
|
-
requestStream: false,
|
|
2776
|
-
responseStream: false,
|
|
2777
|
-
requestType: wechaty_puppet_moment_pb.MomentSignatureRequest,
|
|
2778
|
-
responseType: wechaty_puppet_moment_pb.MomentSignatureResponse,
|
|
2779
|
-
requestSerialize: serialize_wechaty_puppet_MomentSignatureRequest,
|
|
2780
|
-
requestDeserialize: deserialize_wechaty_puppet_MomentSignatureRequest,
|
|
2781
|
-
responseSerialize: serialize_wechaty_puppet_MomentSignatureResponse,
|
|
2782
|
-
responseDeserialize: deserialize_wechaty_puppet_MomentSignatureResponse,
|
|
2783
|
-
},
|
|
2784
|
-
momentCoverage: {
|
|
2785
|
-
path: '/wechaty.Puppet/MomentCoverage',
|
|
2786
|
-
requestStream: false,
|
|
2787
|
-
responseStream: false,
|
|
2788
|
-
requestType: wechaty_puppet_moment_pb.MomentCoverageRequest,
|
|
2789
|
-
responseType: wechaty_puppet_moment_pb.MomentCoverageResponse,
|
|
2790
|
-
requestSerialize: serialize_wechaty_puppet_MomentCoverageRequest,
|
|
2791
|
-
requestDeserialize: deserialize_wechaty_puppet_MomentCoverageRequest,
|
|
2792
|
-
responseSerialize: serialize_wechaty_puppet_MomentCoverageResponse,
|
|
2793
|
-
responseDeserialize: deserialize_wechaty_puppet_MomentCoverageResponse,
|
|
2794
|
-
},
|
|
2795
|
-
postPayload: {
|
|
2796
|
-
path: '/wechaty.Puppet/PostPayload',
|
|
2797
|
-
requestStream: false,
|
|
2798
|
-
responseStream: false,
|
|
2799
|
-
requestType: wechaty_puppet_post_pb.PostPayloadRequest,
|
|
2800
|
-
responseType: wechaty_puppet_post_pb.PostPayloadResponse,
|
|
2801
|
-
requestSerialize: serialize_wechaty_puppet_PostPayloadRequest,
|
|
2802
|
-
requestDeserialize: deserialize_wechaty_puppet_PostPayloadRequest,
|
|
2803
|
-
responseSerialize: serialize_wechaty_puppet_PostPayloadResponse,
|
|
2804
|
-
responseDeserialize: deserialize_wechaty_puppet_PostPayloadResponse,
|
|
2805
|
-
},
|
|
2806
|
-
postPayloadSayable: {
|
|
2807
|
-
path: '/wechaty.Puppet/PostPayloadSayable',
|
|
2808
|
-
requestStream: false,
|
|
2809
|
-
responseStream: false,
|
|
2810
|
-
requestType: wechaty_puppet_post_pb.PostPayloadSayableRequest,
|
|
2811
|
-
responseType: wechaty_puppet_post_pb.PostPayloadSayableResponse,
|
|
2812
|
-
requestSerialize: serialize_wechaty_puppet_PostPayloadSayableRequest,
|
|
2813
|
-
requestDeserialize: deserialize_wechaty_puppet_PostPayloadSayableRequest,
|
|
2814
|
-
responseSerialize: serialize_wechaty_puppet_PostPayloadSayableResponse,
|
|
2815
|
-
responseDeserialize: deserialize_wechaty_puppet_PostPayloadSayableResponse,
|
|
2816
|
-
},
|
|
2817
|
-
momentVisibleList: {
|
|
2751
|
+
momentVisibleList: {
|
|
2818
2752
|
path: '/wechaty.Puppet/MomentVisibleList',
|
|
2819
2753
|
requestStream: false,
|
|
2820
2754
|
responseStream: false,
|
|
@@ -729,60 +729,6 @@ type PuppetpostPayloadSayable = {
|
|
|
729
729
|
readonly responseType: typeof wechaty_puppet_post_pb.PostPayloadSayableResponse;
|
|
730
730
|
};
|
|
731
731
|
|
|
732
|
-
type PuppetMomentPublish = {
|
|
733
|
-
readonly methodName: string;
|
|
734
|
-
readonly service: typeof Puppet;
|
|
735
|
-
readonly requestStream: false;
|
|
736
|
-
readonly responseStream: false;
|
|
737
|
-
readonly requestType: typeof wechaty_puppet_moment_pb.MomentPublishRequest;
|
|
738
|
-
readonly responseType: typeof wechaty_puppet_moment_pb.MomentPublishResponse;
|
|
739
|
-
};
|
|
740
|
-
|
|
741
|
-
type PuppetPostTap = {
|
|
742
|
-
readonly methodName: string;
|
|
743
|
-
readonly service: typeof Puppet;
|
|
744
|
-
readonly requestStream: false;
|
|
745
|
-
readonly responseStream: false;
|
|
746
|
-
readonly requestType: typeof wechaty_puppet_post_pb.PostTapRequest;
|
|
747
|
-
readonly responseType: typeof wechaty_puppet_post_pb.PostTapResponse;
|
|
748
|
-
};
|
|
749
|
-
|
|
750
|
-
type PuppetMomentSignature = {
|
|
751
|
-
readonly methodName: string;
|
|
752
|
-
readonly service: typeof Puppet;
|
|
753
|
-
readonly requestStream: false;
|
|
754
|
-
readonly responseStream: false;
|
|
755
|
-
readonly requestType: typeof wechaty_puppet_moment_pb.MomentSignatureRequest;
|
|
756
|
-
readonly responseType: typeof wechaty_puppet_moment_pb.MomentSignatureResponse;
|
|
757
|
-
};
|
|
758
|
-
|
|
759
|
-
type PuppetMomentCoverage = {
|
|
760
|
-
readonly methodName: string;
|
|
761
|
-
readonly service: typeof Puppet;
|
|
762
|
-
readonly requestStream: false;
|
|
763
|
-
readonly responseStream: false;
|
|
764
|
-
readonly requestType: typeof wechaty_puppet_moment_pb.MomentCoverageRequest;
|
|
765
|
-
readonly responseType: typeof wechaty_puppet_moment_pb.MomentCoverageResponse;
|
|
766
|
-
};
|
|
767
|
-
|
|
768
|
-
type PuppetPostPayload = {
|
|
769
|
-
readonly methodName: string;
|
|
770
|
-
readonly service: typeof Puppet;
|
|
771
|
-
readonly requestStream: false;
|
|
772
|
-
readonly responseStream: false;
|
|
773
|
-
readonly requestType: typeof wechaty_puppet_post_pb.PostPayloadRequest;
|
|
774
|
-
readonly responseType: typeof wechaty_puppet_post_pb.PostPayloadResponse;
|
|
775
|
-
};
|
|
776
|
-
|
|
777
|
-
type PuppetPostPayloadSayable = {
|
|
778
|
-
readonly methodName: string;
|
|
779
|
-
readonly service: typeof Puppet;
|
|
780
|
-
readonly requestStream: false;
|
|
781
|
-
readonly responseStream: false;
|
|
782
|
-
readonly requestType: typeof wechaty_puppet_post_pb.PostPayloadSayableRequest;
|
|
783
|
-
readonly responseType: typeof wechaty_puppet_post_pb.PostPayloadSayableResponse;
|
|
784
|
-
};
|
|
785
|
-
|
|
786
732
|
type PuppetMomentVisibleList = {
|
|
787
733
|
readonly methodName: string;
|
|
788
734
|
readonly service: typeof Puppet;
|
|
@@ -891,12 +837,6 @@ export class Puppet {
|
|
|
891
837
|
static readonly momentCoverage: PuppetmomentCoverage;
|
|
892
838
|
static readonly postPayload: PuppetpostPayload;
|
|
893
839
|
static readonly postPayloadSayable: PuppetpostPayloadSayable;
|
|
894
|
-
static readonly MomentPublish: PuppetMomentPublish;
|
|
895
|
-
static readonly PostTap: PuppetPostTap;
|
|
896
|
-
static readonly MomentSignature: PuppetMomentSignature;
|
|
897
|
-
static readonly MomentCoverage: PuppetMomentCoverage;
|
|
898
|
-
static readonly PostPayload: PuppetPostPayload;
|
|
899
|
-
static readonly PostPayloadSayable: PuppetPostPayloadSayable;
|
|
900
840
|
static readonly MomentVisibleList: PuppetMomentVisibleList;
|
|
901
841
|
static readonly Download: PuppetDownload;
|
|
902
842
|
static readonly Upload: PuppetUpload;
|
|
@@ -1613,60 +1553,6 @@ export class PuppetClient {
|
|
|
1613
1553
|
requestMessage: wechaty_puppet_post_pb.PostPayloadSayableRequest,
|
|
1614
1554
|
callback: (error: ServiceError|null, responseMessage: wechaty_puppet_post_pb.PostPayloadSayableResponse|null) => void
|
|
1615
1555
|
): UnaryResponse;
|
|
1616
|
-
momentPublish(
|
|
1617
|
-
requestMessage: wechaty_puppet_moment_pb.MomentPublishRequest,
|
|
1618
|
-
metadata: grpc.Metadata,
|
|
1619
|
-
callback: (error: ServiceError|null, responseMessage: wechaty_puppet_moment_pb.MomentPublishResponse|null) => void
|
|
1620
|
-
): UnaryResponse;
|
|
1621
|
-
momentPublish(
|
|
1622
|
-
requestMessage: wechaty_puppet_moment_pb.MomentPublishRequest,
|
|
1623
|
-
callback: (error: ServiceError|null, responseMessage: wechaty_puppet_moment_pb.MomentPublishResponse|null) => void
|
|
1624
|
-
): UnaryResponse;
|
|
1625
|
-
postTap(
|
|
1626
|
-
requestMessage: wechaty_puppet_post_pb.PostTapRequest,
|
|
1627
|
-
metadata: grpc.Metadata,
|
|
1628
|
-
callback: (error: ServiceError|null, responseMessage: wechaty_puppet_post_pb.PostTapResponse|null) => void
|
|
1629
|
-
): UnaryResponse;
|
|
1630
|
-
postTap(
|
|
1631
|
-
requestMessage: wechaty_puppet_post_pb.PostTapRequest,
|
|
1632
|
-
callback: (error: ServiceError|null, responseMessage: wechaty_puppet_post_pb.PostTapResponse|null) => void
|
|
1633
|
-
): UnaryResponse;
|
|
1634
|
-
momentSignature(
|
|
1635
|
-
requestMessage: wechaty_puppet_moment_pb.MomentSignatureRequest,
|
|
1636
|
-
metadata: grpc.Metadata,
|
|
1637
|
-
callback: (error: ServiceError|null, responseMessage: wechaty_puppet_moment_pb.MomentSignatureResponse|null) => void
|
|
1638
|
-
): UnaryResponse;
|
|
1639
|
-
momentSignature(
|
|
1640
|
-
requestMessage: wechaty_puppet_moment_pb.MomentSignatureRequest,
|
|
1641
|
-
callback: (error: ServiceError|null, responseMessage: wechaty_puppet_moment_pb.MomentSignatureResponse|null) => void
|
|
1642
|
-
): UnaryResponse;
|
|
1643
|
-
momentCoverage(
|
|
1644
|
-
requestMessage: wechaty_puppet_moment_pb.MomentCoverageRequest,
|
|
1645
|
-
metadata: grpc.Metadata,
|
|
1646
|
-
callback: (error: ServiceError|null, responseMessage: wechaty_puppet_moment_pb.MomentCoverageResponse|null) => void
|
|
1647
|
-
): UnaryResponse;
|
|
1648
|
-
momentCoverage(
|
|
1649
|
-
requestMessage: wechaty_puppet_moment_pb.MomentCoverageRequest,
|
|
1650
|
-
callback: (error: ServiceError|null, responseMessage: wechaty_puppet_moment_pb.MomentCoverageResponse|null) => void
|
|
1651
|
-
): UnaryResponse;
|
|
1652
|
-
postPayload(
|
|
1653
|
-
requestMessage: wechaty_puppet_post_pb.PostPayloadRequest,
|
|
1654
|
-
metadata: grpc.Metadata,
|
|
1655
|
-
callback: (error: ServiceError|null, responseMessage: wechaty_puppet_post_pb.PostPayloadResponse|null) => void
|
|
1656
|
-
): UnaryResponse;
|
|
1657
|
-
postPayload(
|
|
1658
|
-
requestMessage: wechaty_puppet_post_pb.PostPayloadRequest,
|
|
1659
|
-
callback: (error: ServiceError|null, responseMessage: wechaty_puppet_post_pb.PostPayloadResponse|null) => void
|
|
1660
|
-
): UnaryResponse;
|
|
1661
|
-
postPayloadSayable(
|
|
1662
|
-
requestMessage: wechaty_puppet_post_pb.PostPayloadSayableRequest,
|
|
1663
|
-
metadata: grpc.Metadata,
|
|
1664
|
-
callback: (error: ServiceError|null, responseMessage: wechaty_puppet_post_pb.PostPayloadSayableResponse|null) => void
|
|
1665
|
-
): UnaryResponse;
|
|
1666
|
-
postPayloadSayable(
|
|
1667
|
-
requestMessage: wechaty_puppet_post_pb.PostPayloadSayableRequest,
|
|
1668
|
-
callback: (error: ServiceError|null, responseMessage: wechaty_puppet_post_pb.PostPayloadSayableResponse|null) => void
|
|
1669
|
-
): UnaryResponse;
|
|
1670
1556
|
momentVisibleList(
|
|
1671
1557
|
requestMessage: wechaty_puppet_moment_pb.MomentVisibleListRequest,
|
|
1672
1558
|
metadata: grpc.Metadata,
|
|
@@ -735,60 +735,6 @@ Puppet.postPayloadSayable = {
|
|
|
735
735
|
responseType: wechaty_puppet_post_pb.PostPayloadSayableResponse
|
|
736
736
|
};
|
|
737
737
|
|
|
738
|
-
Puppet.MomentPublish = {
|
|
739
|
-
methodName: "MomentPublish",
|
|
740
|
-
service: Puppet,
|
|
741
|
-
requestStream: false,
|
|
742
|
-
responseStream: false,
|
|
743
|
-
requestType: wechaty_puppet_moment_pb.MomentPublishRequest,
|
|
744
|
-
responseType: wechaty_puppet_moment_pb.MomentPublishResponse
|
|
745
|
-
};
|
|
746
|
-
|
|
747
|
-
Puppet.PostTap = {
|
|
748
|
-
methodName: "PostTap",
|
|
749
|
-
service: Puppet,
|
|
750
|
-
requestStream: false,
|
|
751
|
-
responseStream: false,
|
|
752
|
-
requestType: wechaty_puppet_post_pb.PostTapRequest,
|
|
753
|
-
responseType: wechaty_puppet_post_pb.PostTapResponse
|
|
754
|
-
};
|
|
755
|
-
|
|
756
|
-
Puppet.MomentSignature = {
|
|
757
|
-
methodName: "MomentSignature",
|
|
758
|
-
service: Puppet,
|
|
759
|
-
requestStream: false,
|
|
760
|
-
responseStream: false,
|
|
761
|
-
requestType: wechaty_puppet_moment_pb.MomentSignatureRequest,
|
|
762
|
-
responseType: wechaty_puppet_moment_pb.MomentSignatureResponse
|
|
763
|
-
};
|
|
764
|
-
|
|
765
|
-
Puppet.MomentCoverage = {
|
|
766
|
-
methodName: "MomentCoverage",
|
|
767
|
-
service: Puppet,
|
|
768
|
-
requestStream: false,
|
|
769
|
-
responseStream: false,
|
|
770
|
-
requestType: wechaty_puppet_moment_pb.MomentCoverageRequest,
|
|
771
|
-
responseType: wechaty_puppet_moment_pb.MomentCoverageResponse
|
|
772
|
-
};
|
|
773
|
-
|
|
774
|
-
Puppet.PostPayload = {
|
|
775
|
-
methodName: "PostPayload",
|
|
776
|
-
service: Puppet,
|
|
777
|
-
requestStream: false,
|
|
778
|
-
responseStream: false,
|
|
779
|
-
requestType: wechaty_puppet_post_pb.PostPayloadRequest,
|
|
780
|
-
responseType: wechaty_puppet_post_pb.PostPayloadResponse
|
|
781
|
-
};
|
|
782
|
-
|
|
783
|
-
Puppet.PostPayloadSayable = {
|
|
784
|
-
methodName: "PostPayloadSayable",
|
|
785
|
-
service: Puppet,
|
|
786
|
-
requestStream: false,
|
|
787
|
-
responseStream: false,
|
|
788
|
-
requestType: wechaty_puppet_post_pb.PostPayloadSayableRequest,
|
|
789
|
-
responseType: wechaty_puppet_post_pb.PostPayloadSayableResponse
|
|
790
|
-
};
|
|
791
|
-
|
|
792
738
|
Puppet.MomentVisibleList = {
|
|
793
739
|
methodName: "MomentVisibleList",
|
|
794
740
|
service: Puppet,
|
|
@@ -3306,192 +3252,6 @@ PuppetClient.prototype.postPayloadSayable = function postPayloadSayable(requestM
|
|
|
3306
3252
|
};
|
|
3307
3253
|
};
|
|
3308
3254
|
|
|
3309
|
-
PuppetClient.prototype.momentPublish = function momentPublish(requestMessage, metadata, callback) {
|
|
3310
|
-
if (arguments.length === 2) {
|
|
3311
|
-
callback = arguments[1];
|
|
3312
|
-
}
|
|
3313
|
-
var client = grpc.unary(Puppet.MomentPublish, {
|
|
3314
|
-
request: requestMessage,
|
|
3315
|
-
host: this.serviceHost,
|
|
3316
|
-
metadata: metadata,
|
|
3317
|
-
transport: this.options.transport,
|
|
3318
|
-
debug: this.options.debug,
|
|
3319
|
-
onEnd: function (response) {
|
|
3320
|
-
if (callback) {
|
|
3321
|
-
if (response.status !== grpc.Code.OK) {
|
|
3322
|
-
var err = new Error(response.statusMessage);
|
|
3323
|
-
err.code = response.status;
|
|
3324
|
-
err.metadata = response.trailers;
|
|
3325
|
-
callback(err, null);
|
|
3326
|
-
} else {
|
|
3327
|
-
callback(null, response.message);
|
|
3328
|
-
}
|
|
3329
|
-
}
|
|
3330
|
-
}
|
|
3331
|
-
});
|
|
3332
|
-
return {
|
|
3333
|
-
cancel: function () {
|
|
3334
|
-
callback = null;
|
|
3335
|
-
client.close();
|
|
3336
|
-
}
|
|
3337
|
-
};
|
|
3338
|
-
};
|
|
3339
|
-
|
|
3340
|
-
PuppetClient.prototype.postTap = function postTap(requestMessage, metadata, callback) {
|
|
3341
|
-
if (arguments.length === 2) {
|
|
3342
|
-
callback = arguments[1];
|
|
3343
|
-
}
|
|
3344
|
-
var client = grpc.unary(Puppet.PostTap, {
|
|
3345
|
-
request: requestMessage,
|
|
3346
|
-
host: this.serviceHost,
|
|
3347
|
-
metadata: metadata,
|
|
3348
|
-
transport: this.options.transport,
|
|
3349
|
-
debug: this.options.debug,
|
|
3350
|
-
onEnd: function (response) {
|
|
3351
|
-
if (callback) {
|
|
3352
|
-
if (response.status !== grpc.Code.OK) {
|
|
3353
|
-
var err = new Error(response.statusMessage);
|
|
3354
|
-
err.code = response.status;
|
|
3355
|
-
err.metadata = response.trailers;
|
|
3356
|
-
callback(err, null);
|
|
3357
|
-
} else {
|
|
3358
|
-
callback(null, response.message);
|
|
3359
|
-
}
|
|
3360
|
-
}
|
|
3361
|
-
}
|
|
3362
|
-
});
|
|
3363
|
-
return {
|
|
3364
|
-
cancel: function () {
|
|
3365
|
-
callback = null;
|
|
3366
|
-
client.close();
|
|
3367
|
-
}
|
|
3368
|
-
};
|
|
3369
|
-
};
|
|
3370
|
-
|
|
3371
|
-
PuppetClient.prototype.momentSignature = function momentSignature(requestMessage, metadata, callback) {
|
|
3372
|
-
if (arguments.length === 2) {
|
|
3373
|
-
callback = arguments[1];
|
|
3374
|
-
}
|
|
3375
|
-
var client = grpc.unary(Puppet.MomentSignature, {
|
|
3376
|
-
request: requestMessage,
|
|
3377
|
-
host: this.serviceHost,
|
|
3378
|
-
metadata: metadata,
|
|
3379
|
-
transport: this.options.transport,
|
|
3380
|
-
debug: this.options.debug,
|
|
3381
|
-
onEnd: function (response) {
|
|
3382
|
-
if (callback) {
|
|
3383
|
-
if (response.status !== grpc.Code.OK) {
|
|
3384
|
-
var err = new Error(response.statusMessage);
|
|
3385
|
-
err.code = response.status;
|
|
3386
|
-
err.metadata = response.trailers;
|
|
3387
|
-
callback(err, null);
|
|
3388
|
-
} else {
|
|
3389
|
-
callback(null, response.message);
|
|
3390
|
-
}
|
|
3391
|
-
}
|
|
3392
|
-
}
|
|
3393
|
-
});
|
|
3394
|
-
return {
|
|
3395
|
-
cancel: function () {
|
|
3396
|
-
callback = null;
|
|
3397
|
-
client.close();
|
|
3398
|
-
}
|
|
3399
|
-
};
|
|
3400
|
-
};
|
|
3401
|
-
|
|
3402
|
-
PuppetClient.prototype.momentCoverage = function momentCoverage(requestMessage, metadata, callback) {
|
|
3403
|
-
if (arguments.length === 2) {
|
|
3404
|
-
callback = arguments[1];
|
|
3405
|
-
}
|
|
3406
|
-
var client = grpc.unary(Puppet.MomentCoverage, {
|
|
3407
|
-
request: requestMessage,
|
|
3408
|
-
host: this.serviceHost,
|
|
3409
|
-
metadata: metadata,
|
|
3410
|
-
transport: this.options.transport,
|
|
3411
|
-
debug: this.options.debug,
|
|
3412
|
-
onEnd: function (response) {
|
|
3413
|
-
if (callback) {
|
|
3414
|
-
if (response.status !== grpc.Code.OK) {
|
|
3415
|
-
var err = new Error(response.statusMessage);
|
|
3416
|
-
err.code = response.status;
|
|
3417
|
-
err.metadata = response.trailers;
|
|
3418
|
-
callback(err, null);
|
|
3419
|
-
} else {
|
|
3420
|
-
callback(null, response.message);
|
|
3421
|
-
}
|
|
3422
|
-
}
|
|
3423
|
-
}
|
|
3424
|
-
});
|
|
3425
|
-
return {
|
|
3426
|
-
cancel: function () {
|
|
3427
|
-
callback = null;
|
|
3428
|
-
client.close();
|
|
3429
|
-
}
|
|
3430
|
-
};
|
|
3431
|
-
};
|
|
3432
|
-
|
|
3433
|
-
PuppetClient.prototype.postPayload = function postPayload(requestMessage, metadata, callback) {
|
|
3434
|
-
if (arguments.length === 2) {
|
|
3435
|
-
callback = arguments[1];
|
|
3436
|
-
}
|
|
3437
|
-
var client = grpc.unary(Puppet.PostPayload, {
|
|
3438
|
-
request: requestMessage,
|
|
3439
|
-
host: this.serviceHost,
|
|
3440
|
-
metadata: metadata,
|
|
3441
|
-
transport: this.options.transport,
|
|
3442
|
-
debug: this.options.debug,
|
|
3443
|
-
onEnd: function (response) {
|
|
3444
|
-
if (callback) {
|
|
3445
|
-
if (response.status !== grpc.Code.OK) {
|
|
3446
|
-
var err = new Error(response.statusMessage);
|
|
3447
|
-
err.code = response.status;
|
|
3448
|
-
err.metadata = response.trailers;
|
|
3449
|
-
callback(err, null);
|
|
3450
|
-
} else {
|
|
3451
|
-
callback(null, response.message);
|
|
3452
|
-
}
|
|
3453
|
-
}
|
|
3454
|
-
}
|
|
3455
|
-
});
|
|
3456
|
-
return {
|
|
3457
|
-
cancel: function () {
|
|
3458
|
-
callback = null;
|
|
3459
|
-
client.close();
|
|
3460
|
-
}
|
|
3461
|
-
};
|
|
3462
|
-
};
|
|
3463
|
-
|
|
3464
|
-
PuppetClient.prototype.postPayloadSayable = function postPayloadSayable(requestMessage, metadata, callback) {
|
|
3465
|
-
if (arguments.length === 2) {
|
|
3466
|
-
callback = arguments[1];
|
|
3467
|
-
}
|
|
3468
|
-
var client = grpc.unary(Puppet.PostPayloadSayable, {
|
|
3469
|
-
request: requestMessage,
|
|
3470
|
-
host: this.serviceHost,
|
|
3471
|
-
metadata: metadata,
|
|
3472
|
-
transport: this.options.transport,
|
|
3473
|
-
debug: this.options.debug,
|
|
3474
|
-
onEnd: function (response) {
|
|
3475
|
-
if (callback) {
|
|
3476
|
-
if (response.status !== grpc.Code.OK) {
|
|
3477
|
-
var err = new Error(response.statusMessage);
|
|
3478
|
-
err.code = response.status;
|
|
3479
|
-
err.metadata = response.trailers;
|
|
3480
|
-
callback(err, null);
|
|
3481
|
-
} else {
|
|
3482
|
-
callback(null, response.message);
|
|
3483
|
-
}
|
|
3484
|
-
}
|
|
3485
|
-
}
|
|
3486
|
-
});
|
|
3487
|
-
return {
|
|
3488
|
-
cancel: function () {
|
|
3489
|
-
callback = null;
|
|
3490
|
-
client.close();
|
|
3491
|
-
}
|
|
3492
|
-
};
|
|
3493
|
-
};
|
|
3494
|
-
|
|
3495
3255
|
PuppetClient.prototype.momentVisibleList = function momentVisibleList(requestMessage, metadata, callback) {
|
|
3496
3256
|
if (arguments.length === 2) {
|
|
3497
3257
|
callback = arguments[1];
|
|
@@ -9,6 +9,7 @@ import "google/protobuf/timestamp.proto";
|
|
|
9
9
|
|
|
10
10
|
import "wechaty/puppet/url-link.proto";
|
|
11
11
|
import "wechaty/puppet/channel.proto";
|
|
12
|
+
import "wechaty/puppet/location.proto";
|
|
12
13
|
|
|
13
14
|
enum PostType {
|
|
14
15
|
POST_TYPE_UNSPECIFIED = 0;
|
|
@@ -46,6 +47,9 @@ message PostPayloadClient {
|
|
|
46
47
|
string root_id = 2; // 转发的根id,评论时应该是朋友圈的id
|
|
47
48
|
PostType type = 3;
|
|
48
49
|
repeated PostSayable sayable_list = 4;
|
|
50
|
+
|
|
51
|
+
repeated string visible_List = 5;
|
|
52
|
+
LocationPayload location = 6;
|
|
49
53
|
}
|
|
50
54
|
|
|
51
55
|
message PostPayloadServer {
|
|
@@ -60,6 +64,11 @@ message PostPayloadServer {
|
|
|
60
64
|
int32 children = 7;
|
|
61
65
|
int32 descendant = 8;
|
|
62
66
|
int32 like = 9;
|
|
67
|
+
|
|
68
|
+
reserved 10 to 15;
|
|
69
|
+
|
|
70
|
+
repeated string visible_List = 16;
|
|
71
|
+
LocationPayload location = 17;
|
|
63
72
|
}
|
|
64
73
|
|
|
65
74
|
message PostTapRequest {
|
|
@@ -642,48 +642,6 @@ service Puppet {
|
|
|
642
642
|
*
|
|
643
643
|
*/
|
|
644
644
|
|
|
645
|
-
rpc MomentPublish (puppet.MomentPublishRequest) returns (puppet.MomentPublishResponse) {
|
|
646
|
-
option (google.api.http) = {
|
|
647
|
-
post: "/moment/publish"
|
|
648
|
-
body: "*"
|
|
649
|
-
};
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
rpc PostTap (puppet.PostTapRequest) returns (puppet.PostTapResponse) {
|
|
653
|
-
option (google.api.http) = {
|
|
654
|
-
post: "/post/like"
|
|
655
|
-
body: "*"
|
|
656
|
-
};
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
rpc MomentSignature (puppet.MomentSignatureRequest) returns (puppet.MomentSignatureResponse) {
|
|
660
|
-
option (google.api.http) = {
|
|
661
|
-
post: "/moment/signature"
|
|
662
|
-
body: "*"
|
|
663
|
-
};
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
rpc MomentCoverage (puppet.MomentCoverageRequest) returns (puppet.MomentCoverageResponse) {
|
|
667
|
-
option (google.api.http) = {
|
|
668
|
-
post: "/moment/coverage"
|
|
669
|
-
body: "*"
|
|
670
|
-
};
|
|
671
|
-
}
|
|
672
|
-
|
|
673
|
-
rpc PostPayload (puppet.PostPayloadRequest) returns (puppet.PostPayloadResponse) {
|
|
674
|
-
option (google.api.http) = {
|
|
675
|
-
post: "/post/payload"
|
|
676
|
-
body: "*"
|
|
677
|
-
};
|
|
678
|
-
}
|
|
679
|
-
|
|
680
|
-
rpc PostPayloadSayable (puppet.PostPayloadSayableRequest) returns (puppet.PostPayloadSayableResponse) {
|
|
681
|
-
option (google.api.http) = {
|
|
682
|
-
post: "/post/sayable"
|
|
683
|
-
body: "*"
|
|
684
|
-
};
|
|
685
|
-
}
|
|
686
|
-
|
|
687
645
|
rpc MomentVisibleList (puppet.MomentVisibleListRequest) returns (puppet.MomentVisibleListResponse) {
|
|
688
646
|
option (google.api.http) = {
|
|
689
647
|
get: "/moment/visibleList"
|
|
@@ -5,6 +5,7 @@ import * as jspb from "google-protobuf";
|
|
|
5
5
|
import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb";
|
|
6
6
|
import * as wechaty_puppet_url_link_pb from "../../wechaty/puppet/url-link_pb";
|
|
7
7
|
import * as wechaty_puppet_channel_pb from "../../wechaty/puppet/channel_pb";
|
|
8
|
+
import * as wechaty_puppet_location_pb from "../../wechaty/puppet/location_pb";
|
|
8
9
|
|
|
9
10
|
export class PostSayable extends jspb.Message {
|
|
10
11
|
getType(): SayableTypeMap[keyof SayableTypeMap];
|
|
@@ -71,6 +72,16 @@ export class PostPayloadClient extends jspb.Message {
|
|
|
71
72
|
setSayableListList(value: Array<PostSayable>): void;
|
|
72
73
|
addSayableList(value?: PostSayable, index?: number): PostSayable;
|
|
73
74
|
|
|
75
|
+
clearVisibleListList(): void;
|
|
76
|
+
getVisibleListList(): Array<string>;
|
|
77
|
+
setVisibleListList(value: Array<string>): void;
|
|
78
|
+
addVisibleList(value: string, index?: number): string;
|
|
79
|
+
|
|
80
|
+
hasLocation(): boolean;
|
|
81
|
+
clearLocation(): void;
|
|
82
|
+
getLocation(): wechaty_puppet_location_pb.LocationPayload | undefined;
|
|
83
|
+
setLocation(value?: wechaty_puppet_location_pb.LocationPayload): void;
|
|
84
|
+
|
|
74
85
|
serializeBinary(): Uint8Array;
|
|
75
86
|
toObject(includeInstance?: boolean): PostPayloadClient.AsObject;
|
|
76
87
|
static toObject(includeInstance: boolean, msg: PostPayloadClient): PostPayloadClient.AsObject;
|
|
@@ -87,6 +98,8 @@ export namespace PostPayloadClient {
|
|
|
87
98
|
rootId: string,
|
|
88
99
|
type: PostTypeMap[keyof PostTypeMap],
|
|
89
100
|
sayableListList: Array<PostSayable.AsObject>,
|
|
101
|
+
visibleListList: Array<string>,
|
|
102
|
+
location?: wechaty_puppet_location_pb.LocationPayload.AsObject,
|
|
90
103
|
}
|
|
91
104
|
}
|
|
92
105
|
|
|
@@ -122,6 +135,16 @@ export class PostPayloadServer extends jspb.Message {
|
|
|
122
135
|
getLike(): number;
|
|
123
136
|
setLike(value: number): void;
|
|
124
137
|
|
|
138
|
+
clearVisibleListList(): void;
|
|
139
|
+
getVisibleListList(): Array<string>;
|
|
140
|
+
setVisibleListList(value: Array<string>): void;
|
|
141
|
+
addVisibleList(value: string, index?: number): string;
|
|
142
|
+
|
|
143
|
+
hasLocation(): boolean;
|
|
144
|
+
clearLocation(): void;
|
|
145
|
+
getLocation(): wechaty_puppet_location_pb.LocationPayload | undefined;
|
|
146
|
+
setLocation(value?: wechaty_puppet_location_pb.LocationPayload): void;
|
|
147
|
+
|
|
125
148
|
serializeBinary(): Uint8Array;
|
|
126
149
|
toObject(includeInstance?: boolean): PostPayloadServer.AsObject;
|
|
127
150
|
static toObject(includeInstance: boolean, msg: PostPayloadServer): PostPayloadServer.AsObject;
|
|
@@ -143,6 +166,8 @@ export namespace PostPayloadServer {
|
|
|
143
166
|
children: number,
|
|
144
167
|
descendant: number,
|
|
145
168
|
like: number,
|
|
169
|
+
visibleListList: Array<string>,
|
|
170
|
+
location?: wechaty_puppet_location_pb.LocationPayload.AsObject,
|
|
146
171
|
}
|
|
147
172
|
}
|
|
148
173
|
|