@scalemule/sdk 0.0.69 → 0.0.71
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/README.md +49 -0
- package/dist/index.d.mts +408 -1
- package/dist/index.d.ts +408 -1
- package/dist/index.js +175 -0
- package/dist/index.mjs +172 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -5057,6 +5057,13 @@ var SocialService = class extends ServiceModule {
|
|
|
5057
5057
|
super(...arguments);
|
|
5058
5058
|
this.basePath = "/v1/social";
|
|
5059
5059
|
}
|
|
5060
|
+
/** Client API-key route; never send an internal platform token from an app. */
|
|
5061
|
+
async upsertContentPost(input, options) {
|
|
5062
|
+
return this.post("/client/content-posts/upsert", input, options);
|
|
5063
|
+
}
|
|
5064
|
+
async upsertDiscoveryCreator(input, options) {
|
|
5065
|
+
return this.post("/client/discovery/creators/upsert", input, options);
|
|
5066
|
+
}
|
|
5060
5067
|
// --------------------------------------------------------------------------
|
|
5061
5068
|
// Follow / Unfollow
|
|
5062
5069
|
// --------------------------------------------------------------------------
|
|
@@ -6798,6 +6805,167 @@ var ListingsService = class extends ServiceModule {
|
|
|
6798
6805
|
}
|
|
6799
6806
|
};
|
|
6800
6807
|
|
|
6808
|
+
// src/services/community-maps.ts
|
|
6809
|
+
var segment = (value) => encodeURIComponent(value);
|
|
6810
|
+
var CommunityMapsService = class extends ServiceModule {
|
|
6811
|
+
constructor(client) {
|
|
6812
|
+
super(client);
|
|
6813
|
+
this.basePath = "/v1/knowledge/community-maps";
|
|
6814
|
+
this.editorial = new CommunityMapsEditorialService(client);
|
|
6815
|
+
this.geography = new CommunityMapsGeographyService(client);
|
|
6816
|
+
}
|
|
6817
|
+
listCollections(query = {}, options) {
|
|
6818
|
+
return this._get(this.withQuery("/collections", { ...query }), options);
|
|
6819
|
+
}
|
|
6820
|
+
getCollection(slug, options) {
|
|
6821
|
+
return this._get("/collections/" + segment(slug), options);
|
|
6822
|
+
}
|
|
6823
|
+
listFeatures(slug, query = {}, options) {
|
|
6824
|
+
return this._get(this.withQuery("/collections/" + segment(slug) + "/features", { ...query }), options);
|
|
6825
|
+
}
|
|
6826
|
+
getFeature(slug, id, options) {
|
|
6827
|
+
return this._get("/collections/" + segment(slug) + "/features/" + segment(id), options);
|
|
6828
|
+
}
|
|
6829
|
+
createSubmission(slug, data, options) {
|
|
6830
|
+
return this.post("/collections/" + segment(slug) + "/submissions", data, options);
|
|
6831
|
+
}
|
|
6832
|
+
uploadPhoto(slug, submission, file, fields, options) {
|
|
6833
|
+
return this._upload(
|
|
6834
|
+
"/collections/" + segment(slug) + "/submissions/" + segment(submission) + "/media",
|
|
6835
|
+
file,
|
|
6836
|
+
{ caption: fields.caption, attribution: fields.attribution, rights_confirmed: String(fields.rights_confirmed) },
|
|
6837
|
+
options
|
|
6838
|
+
);
|
|
6839
|
+
}
|
|
6840
|
+
react(slug, feature, reaction, active = true, options) {
|
|
6841
|
+
return this.post(
|
|
6842
|
+
"/collections/" + segment(slug) + "/features/" + segment(feature) + "/reactions",
|
|
6843
|
+
{ reaction, active },
|
|
6844
|
+
options
|
|
6845
|
+
);
|
|
6846
|
+
}
|
|
6847
|
+
report(slug, feature, data, options) {
|
|
6848
|
+
return this.post("/collections/" + segment(slug) + "/features/" + segment(feature) + "/reports", data, options);
|
|
6849
|
+
}
|
|
6850
|
+
/** Proxy this path through your server; never append a secret API key to an image URL. */
|
|
6851
|
+
mediaPath(slug, media) {
|
|
6852
|
+
return this.basePath + "/collections/" + segment(slug) + "/media/" + segment(media);
|
|
6853
|
+
}
|
|
6854
|
+
};
|
|
6855
|
+
var CommunityMapsEditorialService = class _CommunityMapsEditorialService extends ServiceModule {
|
|
6856
|
+
constructor(client, applicationId) {
|
|
6857
|
+
super(client);
|
|
6858
|
+
this.applicationId = applicationId;
|
|
6859
|
+
this.basePath = "/v1/knowledge/community-maps/manage";
|
|
6860
|
+
}
|
|
6861
|
+
forApplication(id) {
|
|
6862
|
+
return new _CommunityMapsEditorialService(this.client, id);
|
|
6863
|
+
}
|
|
6864
|
+
path(path, query = {}) {
|
|
6865
|
+
return this.withQuery(path, { ...query, ...this.applicationId ? { application_id: this.applicationId } : {} });
|
|
6866
|
+
}
|
|
6867
|
+
listCollections(query = {}, options) {
|
|
6868
|
+
return this._get(this.path("/collections", { ...query }), options);
|
|
6869
|
+
}
|
|
6870
|
+
getCollection(id, options) {
|
|
6871
|
+
return this._get(this.path("/collections/" + segment(id)), options);
|
|
6872
|
+
}
|
|
6873
|
+
createCollection(data, options) {
|
|
6874
|
+
return this.post(this.path("/collections"), data, options);
|
|
6875
|
+
}
|
|
6876
|
+
updateCollection(id, data, options) {
|
|
6877
|
+
return this.put(this.path("/collections/" + segment(id)), data, options);
|
|
6878
|
+
}
|
|
6879
|
+
listFeatures(collection, query = {}, options) {
|
|
6880
|
+
return this._get(this.path("/collections/" + segment(collection) + "/features", { ...query }), options);
|
|
6881
|
+
}
|
|
6882
|
+
getFeature(collection, id, options) {
|
|
6883
|
+
return this._get(this.path("/collections/" + segment(collection) + "/features/" + segment(id)), options);
|
|
6884
|
+
}
|
|
6885
|
+
createFeature(collection, data, options) {
|
|
6886
|
+
return this.post(this.path("/collections/" + segment(collection) + "/features"), data, options);
|
|
6887
|
+
}
|
|
6888
|
+
updateFeature(collection, id, data, options) {
|
|
6889
|
+
return this.put(this.path("/collections/" + segment(collection) + "/features/" + segment(id)), data, options);
|
|
6890
|
+
}
|
|
6891
|
+
featureCommand(collection, id, data, options) {
|
|
6892
|
+
return this.post(
|
|
6893
|
+
this.path("/collections/" + segment(collection) + "/features/" + segment(id) + "/commands"),
|
|
6894
|
+
data,
|
|
6895
|
+
options
|
|
6896
|
+
);
|
|
6897
|
+
}
|
|
6898
|
+
listSubmissions(collection, query = {}, options) {
|
|
6899
|
+
return this._get(this.path("/collections/" + segment(collection) + "/submissions", { ...query }), options);
|
|
6900
|
+
}
|
|
6901
|
+
reviewSubmission(collection, id, data, options) {
|
|
6902
|
+
return this.post(
|
|
6903
|
+
this.path("/collections/" + segment(collection) + "/submissions/" + segment(id) + "/commands"),
|
|
6904
|
+
data,
|
|
6905
|
+
options
|
|
6906
|
+
);
|
|
6907
|
+
}
|
|
6908
|
+
duplicates(collection, submission, options) {
|
|
6909
|
+
return this._get(
|
|
6910
|
+
this.path("/collections/" + segment(collection) + "/submissions/" + segment(submission) + "/duplicates"),
|
|
6911
|
+
options
|
|
6912
|
+
);
|
|
6913
|
+
}
|
|
6914
|
+
listReports(collection, query = {}, options) {
|
|
6915
|
+
return this._get(this.path("/collections/" + segment(collection) + "/reports", { ...query }), options);
|
|
6916
|
+
}
|
|
6917
|
+
reviewReport(collection, id, data, options) {
|
|
6918
|
+
return this.post(
|
|
6919
|
+
this.path("/collections/" + segment(collection) + "/reports/" + segment(id) + "/commands"),
|
|
6920
|
+
data,
|
|
6921
|
+
options
|
|
6922
|
+
);
|
|
6923
|
+
}
|
|
6924
|
+
listMedia(collection, query = {}, options) {
|
|
6925
|
+
return this._get(this.path("/collections/" + segment(collection) + "/media", { ...query }), options);
|
|
6926
|
+
}
|
|
6927
|
+
reviewMedia(collection, id, data, options) {
|
|
6928
|
+
return this.put(this.path("/collections/" + segment(collection) + "/media/" + segment(id)), data, options);
|
|
6929
|
+
}
|
|
6930
|
+
inviteView(collection, data, options) {
|
|
6931
|
+
return this.post(this.path("/collections/" + segment(collection) + "/views"), data, options);
|
|
6932
|
+
}
|
|
6933
|
+
listViews(query = {}, options) {
|
|
6934
|
+
return this._get(this.path("/views", { ...query }), options);
|
|
6935
|
+
}
|
|
6936
|
+
acceptView(id, data, options) {
|
|
6937
|
+
return this.put(this.path("/views/" + segment(id)), data, options);
|
|
6938
|
+
}
|
|
6939
|
+
revokeView(collection, view, options) {
|
|
6940
|
+
return this.del(this.path("/collections/" + segment(collection) + "/views/" + segment(view)), options);
|
|
6941
|
+
}
|
|
6942
|
+
getCoverage(publication, options) {
|
|
6943
|
+
return this._get(this.path("/coverage/" + segment(publication)), options);
|
|
6944
|
+
}
|
|
6945
|
+
setCoverage(publication, areaIds, expectedRevision, options) {
|
|
6946
|
+
return this.put(
|
|
6947
|
+
this.path("/coverage/" + segment(publication)),
|
|
6948
|
+
{ area_ids: areaIds, expected_revision: expectedRevision },
|
|
6949
|
+
options
|
|
6950
|
+
);
|
|
6951
|
+
}
|
|
6952
|
+
};
|
|
6953
|
+
var CommunityMapsGeographyService = class extends ServiceModule {
|
|
6954
|
+
constructor() {
|
|
6955
|
+
super(...arguments);
|
|
6956
|
+
this.basePath = "/v1/knowledge/community-maps/admin/geography";
|
|
6957
|
+
}
|
|
6958
|
+
list(query = {}, options) {
|
|
6959
|
+
return this._get(this.withQuery("", { ...query }), options);
|
|
6960
|
+
}
|
|
6961
|
+
save(data, options) {
|
|
6962
|
+
return this.post("", data, options);
|
|
6963
|
+
}
|
|
6964
|
+
referencePlaces(query, options) {
|
|
6965
|
+
return this._get(this.withQuery("/reference-places", query), options);
|
|
6966
|
+
}
|
|
6967
|
+
};
|
|
6968
|
+
|
|
6801
6969
|
// src/services/polls.ts
|
|
6802
6970
|
var PollsService = class extends ServiceModule {
|
|
6803
6971
|
constructor() {
|
|
@@ -8823,6 +8991,7 @@ var ScaleMule = class {
|
|
|
8823
8991
|
this.webhooks = new WebhooksService(this._client);
|
|
8824
8992
|
this.leaderboard = new LeaderboardService(this._client);
|
|
8825
8993
|
this.listings = new ListingsService(this._client);
|
|
8994
|
+
this.communityMaps = new CommunityMapsService(this._client);
|
|
8826
8995
|
this.polls = new PollsService(this._client);
|
|
8827
8996
|
this.events = new EventsService(this._client);
|
|
8828
8997
|
this.graph = new GraphService(this._client);
|
|
@@ -8981,6 +9150,9 @@ export {
|
|
|
8981
9150
|
CatalogService,
|
|
8982
9151
|
ChatService,
|
|
8983
9152
|
CommunicationService,
|
|
9153
|
+
CommunityMapsEditorialService,
|
|
9154
|
+
CommunityMapsGeographyService,
|
|
9155
|
+
CommunityMapsService,
|
|
8984
9156
|
ComplianceService,
|
|
8985
9157
|
ConferenceService,
|
|
8986
9158
|
CreatorMakerService,
|