@stamn/stamn-plugin 0.1.0-alpha.46 → 0.1.0-alpha.48
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.js +29 -7
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/skills/stamn-blog/SKILL.md +135 -27
package/dist/index.js
CHANGED
|
@@ -4600,7 +4600,7 @@ ${l}
|
|
|
4600
4600
|
}
|
|
4601
4601
|
} }).prompt();
|
|
4602
4602
|
|
|
4603
|
-
// node_modules/.pnpm/@stamn+sdk@0.1.0-alpha.
|
|
4603
|
+
// node_modules/.pnpm/@stamn+sdk@0.1.0-alpha.8/node_modules/@stamn/sdk/dist/index.js
|
|
4604
4604
|
var Resource = class {
|
|
4605
4605
|
constructor(client) {
|
|
4606
4606
|
this.client = client;
|
|
@@ -4845,7 +4845,7 @@ var BlogResource = class extends Resource {
|
|
|
4845
4845
|
async create(options) {
|
|
4846
4846
|
const res = await this.client.request(
|
|
4847
4847
|
"POST",
|
|
4848
|
-
"/
|
|
4848
|
+
"/blog/posts",
|
|
4849
4849
|
options
|
|
4850
4850
|
);
|
|
4851
4851
|
return res.data;
|
|
@@ -4853,25 +4853,47 @@ var BlogResource = class extends Resource {
|
|
|
4853
4853
|
async get(postId) {
|
|
4854
4854
|
const res = await this.client.request(
|
|
4855
4855
|
"GET",
|
|
4856
|
-
`/
|
|
4856
|
+
`/blog/posts/${postId}`
|
|
4857
4857
|
);
|
|
4858
4858
|
return res.data;
|
|
4859
4859
|
}
|
|
4860
|
-
async list(participantId) {
|
|
4860
|
+
async list(participantId, limit) {
|
|
4861
|
+
const params = limit ? `?limit=${limit}` : "";
|
|
4861
4862
|
const res = await this.client.request(
|
|
4862
4863
|
"GET",
|
|
4863
|
-
`/
|
|
4864
|
+
`/blog/manage/${participantId}${params}`
|
|
4864
4865
|
);
|
|
4865
4866
|
return res.data;
|
|
4866
4867
|
}
|
|
4867
4868
|
async update(postId, options) {
|
|
4868
4869
|
const res = await this.client.request(
|
|
4869
4870
|
"PATCH",
|
|
4870
|
-
`/
|
|
4871
|
+
`/blog/posts/${postId}`,
|
|
4871
4872
|
options
|
|
4872
4873
|
);
|
|
4873
4874
|
return res.data;
|
|
4874
4875
|
}
|
|
4876
|
+
async delete(postId) {
|
|
4877
|
+
await this.client.request("DELETE", `/blog/posts/${postId}`);
|
|
4878
|
+
}
|
|
4879
|
+
async react(postId, type) {
|
|
4880
|
+
const res = await this.client.request(
|
|
4881
|
+
"POST",
|
|
4882
|
+
`/blog/posts/${postId}/reactions`,
|
|
4883
|
+
{ type }
|
|
4884
|
+
);
|
|
4885
|
+
return res.data;
|
|
4886
|
+
}
|
|
4887
|
+
async removeReaction(postId, type) {
|
|
4888
|
+
await this.client.request("DELETE", `/blog/posts/${postId}/reactions`, { type });
|
|
4889
|
+
}
|
|
4890
|
+
async getReactions(postId) {
|
|
4891
|
+
const res = await this.client.request(
|
|
4892
|
+
"GET",
|
|
4893
|
+
`/blog/posts/${postId}/reactions`
|
|
4894
|
+
);
|
|
4895
|
+
return res.data;
|
|
4896
|
+
}
|
|
4875
4897
|
};
|
|
4876
4898
|
var StamnApiError = class extends Error {
|
|
4877
4899
|
constructor(message, status) {
|
|
@@ -4990,7 +5012,7 @@ var StamnClient = class {
|
|
|
4990
5012
|
}
|
|
4991
5013
|
};
|
|
4992
5014
|
|
|
4993
|
-
// node_modules/.pnpm/@stamn+cli@0.1.0-alpha.
|
|
5015
|
+
// node_modules/.pnpm/@stamn+cli@0.1.0-alpha.20/node_modules/@stamn/cli/dist/chunk-LEIZD757.js
|
|
4994
5016
|
import { execSync } from "child_process";
|
|
4995
5017
|
import { mkdirSync, readFileSync, writeFileSync, unlinkSync } from "fs";
|
|
4996
5018
|
import { join } from "path";
|