@robinpath/wordpress 0.1.0 → 0.1.1
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 +143 -143
- package/package.json +35 -7
- package/dist/index.d.ts +0 -6
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -12
- package/dist/index.js.map +0 -1
- package/dist/wordpress.d.ts +0 -675
- package/dist/wordpress.d.ts.map +0 -1
- package/dist/wordpress.js +0 -1007
- package/dist/wordpress.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,143 +1,143 @@
|
|
|
1
|
-
# @robinpath/wordpress
|
|
2
|
-
|
|
3
|
-
> WordPress module for RobinPath.
|
|
4
|
-
|
|
5
|
-
   
|
|
6
|
-
|
|
7
|
-
## Why use this module?
|
|
8
|
-
|
|
9
|
-
The `wordpress` module lets you:
|
|
10
|
-
|
|
11
|
-
- List posts with optional filters.
|
|
12
|
-
- Get a single post by ID.
|
|
13
|
-
- Create a new post.
|
|
14
|
-
- Update an existing post.
|
|
15
|
-
- Delete a post (trash or force-delete).
|
|
16
|
-
|
|
17
|
-
All functions are callable directly from RobinPath scripts with a simple, consistent API.
|
|
18
|
-
|
|
19
|
-
## Installation
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
npm install @robinpath/wordpress
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Quick Start
|
|
26
|
-
|
|
27
|
-
**1. Set up credentials**
|
|
28
|
-
|
|
29
|
-
```robinpath
|
|
30
|
-
wordpress.setCredentials "https://mysite.com" "admin" "xxxx xxxx xxxx xxxx"
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
**2. List posts with optional filters.**
|
|
34
|
-
|
|
35
|
-
```robinpath
|
|
36
|
-
wordpress.listPosts {"per_page":5,"status":"publish"}
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Available Functions
|
|
40
|
-
|
|
41
|
-
| Function | Description |
|
|
42
|
-
|----------|-------------|
|
|
43
|
-
| `wordpress.setCredentials` | Set WordPress site URL and Application Password credentials. |
|
|
44
|
-
| `wordpress.listPosts` | List posts with optional filters. |
|
|
45
|
-
| `wordpress.getPost` | Get a single post by ID. |
|
|
46
|
-
| `wordpress.createPost` | Create a new post. |
|
|
47
|
-
| `wordpress.updatePost` | Update an existing post. |
|
|
48
|
-
| `wordpress.deletePost` | Delete a post (trash or force-delete). |
|
|
49
|
-
| `wordpress.listPages` | List pages with optional filters. |
|
|
50
|
-
| `wordpress.createPage` | Create a new page. |
|
|
51
|
-
| `wordpress.updatePage` | Update an existing page. |
|
|
52
|
-
| `wordpress.deletePage` | Delete a page (trash or force-delete). |
|
|
53
|
-
| `wordpress.listCategories` | List post categories. |
|
|
54
|
-
| `wordpress.createCategory` | Create a new category. |
|
|
55
|
-
| `wordpress.deleteCategory` | Permanently delete a category. |
|
|
56
|
-
| `wordpress.listTags` | List post tags. |
|
|
57
|
-
| `wordpress.createTag` | Create a new tag. |
|
|
58
|
-
| `wordpress.deleteTag` | Permanently delete a tag. |
|
|
59
|
-
| `wordpress.listComments` | List comments with optional filters. |
|
|
60
|
-
| `wordpress.getComment` | Get a single comment by ID. |
|
|
61
|
-
| `wordpress.createComment` | Create a new comment. |
|
|
62
|
-
| `wordpress.updateComment` | Update an existing comment. |
|
|
63
|
-
| `wordpress.deleteComment` | Delete a comment (trash or force-delete). |
|
|
64
|
-
| `wordpress.moderateComment` | Change a comment's moderation status. |
|
|
65
|
-
| `wordpress.listMedia` | List media library items. |
|
|
66
|
-
| `wordpress.getMedia` | Get a media item by ID. |
|
|
67
|
-
| `wordpress.uploadMedia` | Upload a media file. |
|
|
68
|
-
| `wordpress.updateMedia` | Update media metadata (title, alt_text, caption, description). |
|
|
69
|
-
| `wordpress.deleteMedia` | Permanently delete a media item. |
|
|
70
|
-
| `wordpress.listUsers` | List users on the site. |
|
|
71
|
-
| `wordpress.getUser` | Get a user by ID. |
|
|
72
|
-
| `wordpress.createUser` | Create a new user. |
|
|
73
|
-
| `wordpress.updateUser` | Update a user's profile. |
|
|
74
|
-
| `wordpress.deleteUser` | Delete a user and reassign their content. |
|
|
75
|
-
| `wordpress.getMeta` | Get custom fields/meta for a post or page. |
|
|
76
|
-
| `wordpress.updateMeta` | Update custom fields/meta on a post or page. |
|
|
77
|
-
| `wordpress.deleteMeta` | Remove a custom field/meta key from a post or page. |
|
|
78
|
-
| `wordpress.listRevisions` | List revisions for a post or page. |
|
|
79
|
-
| `wordpress.getRevision` | Get a specific revision. |
|
|
80
|
-
| `wordpress.deleteRevision` | Permanently delete a revision. |
|
|
81
|
-
| `wordpress.listTaxonomies` | List all registered taxonomies. |
|
|
82
|
-
| `wordpress.listTerms` | List terms for any taxonomy. |
|
|
83
|
-
| `wordpress.createTerm` | Create a term in any taxonomy. |
|
|
84
|
-
| `wordpress.listPlugins` | List all installed plugins with status. |
|
|
85
|
-
| `wordpress.activatePlugin` | Activate a plugin. |
|
|
86
|
-
| `wordpress.deactivatePlugin` | Deactivate a plugin. |
|
|
87
|
-
| `wordpress.installPlugin` | Install a plugin from the WordPress.org marketplace. |
|
|
88
|
-
| `wordpress.deletePlugin` | Delete (uninstall) a plugin. Plugin must be deactivated first. |
|
|
89
|
-
| `wordpress.listThemes` | List all installed themes. |
|
|
90
|
-
| `wordpress.activateTheme` | Activate a theme. |
|
|
91
|
-
| `wordpress.getSettings` | Get site settings (title, description, timezone, etc.). |
|
|
92
|
-
| `wordpress.updateSettings` | Update site settings. |
|
|
93
|
-
| `wordpress.search` | Global search across all content types. |
|
|
94
|
-
| `wordpress.bulkUpdatePosts` | Update multiple posts at once with the same changes. |
|
|
95
|
-
| `wordpress.bulkDeletePosts` | Delete multiple posts at once. |
|
|
96
|
-
|
|
97
|
-
## Examples
|
|
98
|
-
|
|
99
|
-
### List posts with optional filters.
|
|
100
|
-
|
|
101
|
-
```robinpath
|
|
102
|
-
wordpress.listPosts {"per_page":5,"status":"publish"}
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
### Get a single post by ID.
|
|
106
|
-
|
|
107
|
-
```robinpath
|
|
108
|
-
wordpress.getPost "123"
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
### Create a new post.
|
|
112
|
-
|
|
113
|
-
```robinpath
|
|
114
|
-
wordpress.createPost {"title":"My Post","content":"<p>Hello</p>","status":"draft"}
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
## Integration with RobinPath
|
|
118
|
-
|
|
119
|
-
```typescript
|
|
120
|
-
import { RobinPath } from "@wiredwp/robinpath";
|
|
121
|
-
import Module from "@robinpath/wordpress";
|
|
122
|
-
|
|
123
|
-
const rp = new RobinPath();
|
|
124
|
-
rp.registerModule(Module.name, Module.functions);
|
|
125
|
-
rp.registerModuleMeta(Module.name, Module.functionMetadata);
|
|
126
|
-
|
|
127
|
-
const result = await rp.executeScript(`
|
|
128
|
-
wordpress.setCredentials "https://mysite.com" "admin" "xxxx xxxx xxxx xxxx"
|
|
129
|
-
wordpress.listPosts {"per_page":5,"status":"publish"}
|
|
130
|
-
`);
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
## Full API Reference
|
|
134
|
-
|
|
135
|
-
See [MODULE.md](./MODULE.md) for complete documentation including all parameters, return types, error handling, and advanced examples.
|
|
136
|
-
|
|
137
|
-
## Related Modules
|
|
138
|
-
|
|
139
|
-
- [`@robinpath/json`](../json) — JSON module for complementary functionality
|
|
140
|
-
|
|
141
|
-
## License
|
|
142
|
-
|
|
143
|
-
MIT
|
|
1
|
+
# @robinpath/wordpress
|
|
2
|
+
|
|
3
|
+
> WordPress module for RobinPath.
|
|
4
|
+
|
|
5
|
+
   
|
|
6
|
+
|
|
7
|
+
## Why use this module?
|
|
8
|
+
|
|
9
|
+
The `wordpress` module lets you:
|
|
10
|
+
|
|
11
|
+
- List posts with optional filters.
|
|
12
|
+
- Get a single post by ID.
|
|
13
|
+
- Create a new post.
|
|
14
|
+
- Update an existing post.
|
|
15
|
+
- Delete a post (trash or force-delete).
|
|
16
|
+
|
|
17
|
+
All functions are callable directly from RobinPath scripts with a simple, consistent API.
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install @robinpath/wordpress
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Quick Start
|
|
26
|
+
|
|
27
|
+
**1. Set up credentials**
|
|
28
|
+
|
|
29
|
+
```robinpath
|
|
30
|
+
wordpress.setCredentials "https://mysite.com" "admin" "xxxx xxxx xxxx xxxx"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**2. List posts with optional filters.**
|
|
34
|
+
|
|
35
|
+
```robinpath
|
|
36
|
+
wordpress.listPosts {"per_page":5,"status":"publish"}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Available Functions
|
|
40
|
+
|
|
41
|
+
| Function | Description |
|
|
42
|
+
|----------|-------------|
|
|
43
|
+
| `wordpress.setCredentials` | Set WordPress site URL and Application Password credentials. |
|
|
44
|
+
| `wordpress.listPosts` | List posts with optional filters. |
|
|
45
|
+
| `wordpress.getPost` | Get a single post by ID. |
|
|
46
|
+
| `wordpress.createPost` | Create a new post. |
|
|
47
|
+
| `wordpress.updatePost` | Update an existing post. |
|
|
48
|
+
| `wordpress.deletePost` | Delete a post (trash or force-delete). |
|
|
49
|
+
| `wordpress.listPages` | List pages with optional filters. |
|
|
50
|
+
| `wordpress.createPage` | Create a new page. |
|
|
51
|
+
| `wordpress.updatePage` | Update an existing page. |
|
|
52
|
+
| `wordpress.deletePage` | Delete a page (trash or force-delete). |
|
|
53
|
+
| `wordpress.listCategories` | List post categories. |
|
|
54
|
+
| `wordpress.createCategory` | Create a new category. |
|
|
55
|
+
| `wordpress.deleteCategory` | Permanently delete a category. |
|
|
56
|
+
| `wordpress.listTags` | List post tags. |
|
|
57
|
+
| `wordpress.createTag` | Create a new tag. |
|
|
58
|
+
| `wordpress.deleteTag` | Permanently delete a tag. |
|
|
59
|
+
| `wordpress.listComments` | List comments with optional filters. |
|
|
60
|
+
| `wordpress.getComment` | Get a single comment by ID. |
|
|
61
|
+
| `wordpress.createComment` | Create a new comment. |
|
|
62
|
+
| `wordpress.updateComment` | Update an existing comment. |
|
|
63
|
+
| `wordpress.deleteComment` | Delete a comment (trash or force-delete). |
|
|
64
|
+
| `wordpress.moderateComment` | Change a comment's moderation status. |
|
|
65
|
+
| `wordpress.listMedia` | List media library items. |
|
|
66
|
+
| `wordpress.getMedia` | Get a media item by ID. |
|
|
67
|
+
| `wordpress.uploadMedia` | Upload a media file. |
|
|
68
|
+
| `wordpress.updateMedia` | Update media metadata (title, alt_text, caption, description). |
|
|
69
|
+
| `wordpress.deleteMedia` | Permanently delete a media item. |
|
|
70
|
+
| `wordpress.listUsers` | List users on the site. |
|
|
71
|
+
| `wordpress.getUser` | Get a user by ID. |
|
|
72
|
+
| `wordpress.createUser` | Create a new user. |
|
|
73
|
+
| `wordpress.updateUser` | Update a user's profile. |
|
|
74
|
+
| `wordpress.deleteUser` | Delete a user and reassign their content. |
|
|
75
|
+
| `wordpress.getMeta` | Get custom fields/meta for a post or page. |
|
|
76
|
+
| `wordpress.updateMeta` | Update custom fields/meta on a post or page. |
|
|
77
|
+
| `wordpress.deleteMeta` | Remove a custom field/meta key from a post or page. |
|
|
78
|
+
| `wordpress.listRevisions` | List revisions for a post or page. |
|
|
79
|
+
| `wordpress.getRevision` | Get a specific revision. |
|
|
80
|
+
| `wordpress.deleteRevision` | Permanently delete a revision. |
|
|
81
|
+
| `wordpress.listTaxonomies` | List all registered taxonomies. |
|
|
82
|
+
| `wordpress.listTerms` | List terms for any taxonomy. |
|
|
83
|
+
| `wordpress.createTerm` | Create a term in any taxonomy. |
|
|
84
|
+
| `wordpress.listPlugins` | List all installed plugins with status. |
|
|
85
|
+
| `wordpress.activatePlugin` | Activate a plugin. |
|
|
86
|
+
| `wordpress.deactivatePlugin` | Deactivate a plugin. |
|
|
87
|
+
| `wordpress.installPlugin` | Install a plugin from the WordPress.org marketplace. |
|
|
88
|
+
| `wordpress.deletePlugin` | Delete (uninstall) a plugin. Plugin must be deactivated first. |
|
|
89
|
+
| `wordpress.listThemes` | List all installed themes. |
|
|
90
|
+
| `wordpress.activateTheme` | Activate a theme. |
|
|
91
|
+
| `wordpress.getSettings` | Get site settings (title, description, timezone, etc.). |
|
|
92
|
+
| `wordpress.updateSettings` | Update site settings. |
|
|
93
|
+
| `wordpress.search` | Global search across all content types. |
|
|
94
|
+
| `wordpress.bulkUpdatePosts` | Update multiple posts at once with the same changes. |
|
|
95
|
+
| `wordpress.bulkDeletePosts` | Delete multiple posts at once. |
|
|
96
|
+
|
|
97
|
+
## Examples
|
|
98
|
+
|
|
99
|
+
### List posts with optional filters.
|
|
100
|
+
|
|
101
|
+
```robinpath
|
|
102
|
+
wordpress.listPosts {"per_page":5,"status":"publish"}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Get a single post by ID.
|
|
106
|
+
|
|
107
|
+
```robinpath
|
|
108
|
+
wordpress.getPost "123"
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Create a new post.
|
|
112
|
+
|
|
113
|
+
```robinpath
|
|
114
|
+
wordpress.createPost {"title":"My Post","content":"<p>Hello</p>","status":"draft"}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Integration with RobinPath
|
|
118
|
+
|
|
119
|
+
```typescript
|
|
120
|
+
import { RobinPath } from "@wiredwp/robinpath";
|
|
121
|
+
import Module from "@robinpath/wordpress";
|
|
122
|
+
|
|
123
|
+
const rp = new RobinPath();
|
|
124
|
+
rp.registerModule(Module.name, Module.functions);
|
|
125
|
+
rp.registerModuleMeta(Module.name, Module.functionMetadata);
|
|
126
|
+
|
|
127
|
+
const result = await rp.executeScript(`
|
|
128
|
+
wordpress.setCredentials "https://mysite.com" "admin" "xxxx xxxx xxxx xxxx"
|
|
129
|
+
wordpress.listPosts {"per_page":5,"status":"publish"}
|
|
130
|
+
`);
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Full API Reference
|
|
134
|
+
|
|
135
|
+
See [MODULE.md](./MODULE.md) for complete documentation including all parameters, return types, error handling, and advanced examples.
|
|
136
|
+
|
|
137
|
+
## Related Modules
|
|
138
|
+
|
|
139
|
+
- [`@robinpath/json`](../json) — JSON module for complementary functionality
|
|
140
|
+
|
|
141
|
+
## License
|
|
142
|
+
|
|
143
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,13 +1,41 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robinpath/wordpress",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"publishConfig": {
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
6
|
+
},
|
|
5
7
|
"type": "module",
|
|
6
8
|
"main": "dist/index.js",
|
|
7
9
|
"types": "dist/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"types": "./dist/index.d.ts"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "tsc"
|
|
21
|
+
},
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"@robinpath/core": ">=0.20.0"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@robinpath/core": "^0.30.1",
|
|
27
|
+
"typescript": "^5.6.0"
|
|
28
|
+
},
|
|
29
|
+
"description": "WordPress module for RobinPath.",
|
|
30
|
+
"keywords": [
|
|
31
|
+
"wordpress",
|
|
32
|
+
"cms"
|
|
33
|
+
],
|
|
34
|
+
"license": "MIT",
|
|
35
|
+
"robinpath": {
|
|
36
|
+
"category": "cms",
|
|
37
|
+
"type": "integration",
|
|
38
|
+
"auth": "api-key",
|
|
39
|
+
"functionCount": 53
|
|
40
|
+
}
|
|
13
41
|
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { ModuleAdapter } from "@wiredwp/robinpath";
|
|
2
|
-
declare const WordpressModule: ModuleAdapter;
|
|
3
|
-
export default WordpressModule;
|
|
4
|
-
export { WordpressModule };
|
|
5
|
-
export { WordpressFunctions, WordpressFunctionMetadata, WordpressModuleMetadata } from "./wordpress.js";
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGxD,QAAA,MAAM,eAAe,EAAE,aAMtB,CAAC;AAEF,eAAe,eAAe,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,CAAC;AAC3B,OAAO,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { WordpressFunctions, WordpressFunctionMetadata, WordpressModuleMetadata } from "./wordpress.js";
|
|
2
|
-
const WordpressModule = {
|
|
3
|
-
name: "wordpress",
|
|
4
|
-
functions: WordpressFunctions,
|
|
5
|
-
functionMetadata: WordpressFunctionMetadata,
|
|
6
|
-
moduleMetadata: WordpressModuleMetadata,
|
|
7
|
-
global: false,
|
|
8
|
-
}; // as ModuleAdapter
|
|
9
|
-
export default WordpressModule;
|
|
10
|
-
export { WordpressModule };
|
|
11
|
-
export { WordpressFunctions, WordpressFunctionMetadata, WordpressModuleMetadata } from "./wordpress.js";
|
|
12
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAExG,MAAM,eAAe,GAAkB;IACrC,IAAI,EAAE,WAAW;IACjB,SAAS,EAAE,kBAAkB;IAC7B,gBAAgB,EAAE,yBAAgC;IAClD,cAAc,EAAE,uBAA8B;IAC9C,MAAM,EAAE,KAAK;CACd,CAAC,CAAC,mBAAmB;AAEtB,eAAe,eAAe,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,CAAC;AAC3B,OAAO,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC"}
|