@aiqadam/qadam-wordpress 0.0.0-stage → 0.5.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/LICENSE +22 -0
- package/NOTICE +6 -0
- package/README.md +4 -2
- package/package.json +21 -3
- package/src/i18n/ca.json +68 -0
- package/src/i18n/de.json +77 -0
- package/src/i18n/es.json +77 -0
- package/src/i18n/fr.json +77 -0
- package/src/i18n/hi.json +68 -0
- package/src/i18n/id.json +68 -0
- package/src/i18n/ja.json +77 -0
- package/src/i18n/nl.json +77 -0
- package/src/i18n/pt.json +77 -0
- package/src/i18n/ru.json +68 -0
- package/src/i18n/translation.json +77 -0
- package/src/i18n/vi.json +68 -0
- package/src/i18n/zh.json +77 -0
- package/src/index.d.ts +11 -0
- package/src/index.d.ts.map +1 -0
- package/src/index.js +120 -0
- package/src/index.js.map +1 -0
- package/src/lib/actions/create-page.action.d.ts +15 -0
- package/src/lib/actions/create-page.action.d.ts.map +1 -0
- package/src/lib/actions/create-page.action.js +105 -0
- package/src/lib/actions/create-page.action.js.map +1 -0
- package/src/lib/actions/create-post.action.d.ts +32 -0
- package/src/lib/actions/create-post.action.d.ts.map +1 -0
- package/src/lib/actions/create-post.action.js +136 -0
- package/src/lib/actions/create-post.action.js.map +1 -0
- package/src/lib/actions/get-post.action.d.ts +8 -0
- package/src/lib/actions/get-post.action.d.ts.map +1 -0
- package/src/lib/actions/get-post.action.js +40 -0
- package/src/lib/actions/get-post.action.js.map +1 -0
- package/src/lib/actions/update-post.action.d.ts +37 -0
- package/src/lib/actions/update-post.action.d.ts.map +1 -0
- package/src/lib/actions/update-post.action.js +142 -0
- package/src/lib/actions/update-post.action.js.map +1 -0
- package/src/lib/common/index.d.ts +84 -0
- package/src/lib/common/index.d.ts.map +1 -0
- package/src/lib/common/index.js +435 -0
- package/src/lib/common/index.js.map +1 -0
- package/src/lib/trigger/new-post.trigger.d.ts +43 -0
- package/src/lib/trigger/new-post.trigger.d.ts.map +1 -0
- package/src/lib/trigger/new-post.trigger.js +187 -0
- package/src/lib/trigger/new-post.trigger.js.map +1 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createWordPressPage = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const qadams_framework_1 = require("@aiqadam/qadams-framework");
|
|
6
|
+
const common_1 = require("../common");
|
|
7
|
+
const qadams_common_1 = require("@aiqadam/qadams-common");
|
|
8
|
+
const __1 = require("../..");
|
|
9
|
+
exports.createWordPressPage = (0, qadams_framework_1.createAction)({
|
|
10
|
+
auth: __1.wordpressAuth,
|
|
11
|
+
name: 'create_page',
|
|
12
|
+
description: 'Create new page on WordPress',
|
|
13
|
+
audience: 'both',
|
|
14
|
+
aiMetadata: { description: 'Publishes a new static page (not a blog post) on a WordPress site via the REST API, with optional status, slug, excerpt, and comment settings. Choose this for standalone pages like About or Contact rather than dated posts. Requires a title and HTML content; not idempotent — each call creates a separate page.', idempotent: false },
|
|
15
|
+
displayName: 'Create Page',
|
|
16
|
+
props: {
|
|
17
|
+
title: qadams_framework_1.Property.ShortText({
|
|
18
|
+
description: 'Title of the page about to be added',
|
|
19
|
+
displayName: 'Title',
|
|
20
|
+
required: true,
|
|
21
|
+
}),
|
|
22
|
+
content: qadams_framework_1.Property.LongText({
|
|
23
|
+
description: 'Uses the WordPress Text Editor which supports HTML',
|
|
24
|
+
displayName: 'Content',
|
|
25
|
+
required: true,
|
|
26
|
+
}),
|
|
27
|
+
slug: qadams_framework_1.Property.ShortText({
|
|
28
|
+
displayName: 'Slug',
|
|
29
|
+
required: false,
|
|
30
|
+
}),
|
|
31
|
+
date: qadams_framework_1.Property.ShortText({
|
|
32
|
+
description: 'Page publish date (ISO-8601)',
|
|
33
|
+
displayName: 'Date',
|
|
34
|
+
required: false,
|
|
35
|
+
}),
|
|
36
|
+
status: qadams_framework_1.Property.StaticDropdown({
|
|
37
|
+
description: 'Choose status',
|
|
38
|
+
displayName: 'Status',
|
|
39
|
+
required: false,
|
|
40
|
+
options: {
|
|
41
|
+
disabled: false,
|
|
42
|
+
options: [
|
|
43
|
+
{ value: 'publish', label: 'Published' },
|
|
44
|
+
{ value: 'future', label: 'Scheduled' },
|
|
45
|
+
{ value: 'draft', label: 'Draft' },
|
|
46
|
+
{ value: 'pending', label: 'Pending' },
|
|
47
|
+
{ value: 'private', label: 'Private' },
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
}),
|
|
51
|
+
excerpt: qadams_framework_1.Property.LongText({
|
|
52
|
+
description: 'Uses the WordPress Text Editor which supports HTML',
|
|
53
|
+
displayName: 'Excerpt',
|
|
54
|
+
required: false,
|
|
55
|
+
}),
|
|
56
|
+
comment_status: qadams_framework_1.Property.Checkbox({
|
|
57
|
+
displayName: 'Enable Comments',
|
|
58
|
+
required: false,
|
|
59
|
+
}),
|
|
60
|
+
ping_status: qadams_framework_1.Property.Checkbox({
|
|
61
|
+
displayName: 'Open to Pinging',
|
|
62
|
+
required: false,
|
|
63
|
+
}),
|
|
64
|
+
},
|
|
65
|
+
run(context) {
|
|
66
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
if (!(yield common_1.wordpressCommon.urlExists(context.auth.props.website_url.trim()))) {
|
|
68
|
+
throw new Error('Website url is invalid: ' + context.auth.props.website_url);
|
|
69
|
+
}
|
|
70
|
+
const requestBody = {};
|
|
71
|
+
if (context.propsValue.date) {
|
|
72
|
+
requestBody['date'] = context.propsValue.date;
|
|
73
|
+
}
|
|
74
|
+
if (context.propsValue.comment_status) {
|
|
75
|
+
requestBody['comment_status'] = context.propsValue.comment_status
|
|
76
|
+
? 'open'
|
|
77
|
+
: 'closed';
|
|
78
|
+
}
|
|
79
|
+
if (context.propsValue.slug) {
|
|
80
|
+
requestBody['slug'] = context.propsValue.slug;
|
|
81
|
+
}
|
|
82
|
+
if (context.propsValue.excerpt) {
|
|
83
|
+
requestBody['excerpt'] = context.propsValue.excerpt;
|
|
84
|
+
}
|
|
85
|
+
if (context.propsValue.status) {
|
|
86
|
+
requestBody['status'] = context.propsValue.status;
|
|
87
|
+
}
|
|
88
|
+
requestBody['content'] = context.propsValue.content;
|
|
89
|
+
requestBody['title'] = context.propsValue.title;
|
|
90
|
+
const request = {
|
|
91
|
+
method: qadams_common_1.HttpMethod.POST,
|
|
92
|
+
url: `${context.auth.props.website_url.trim()}/wp-json/wp/v2/pages`,
|
|
93
|
+
authentication: {
|
|
94
|
+
type: qadams_common_1.AuthenticationType.BASIC,
|
|
95
|
+
username: context.auth.props.username,
|
|
96
|
+
password: context.auth.props.password,
|
|
97
|
+
},
|
|
98
|
+
body: requestBody,
|
|
99
|
+
};
|
|
100
|
+
const response = yield qadams_common_1.httpClient.sendRequest(request);
|
|
101
|
+
return response;
|
|
102
|
+
});
|
|
103
|
+
},
|
|
104
|
+
});
|
|
105
|
+
//# sourceMappingURL=create-page.action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-page.action.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-page.action.ts"],"names":[],"mappings":";;;;AAAA,gEAAmE;AACnE,sCAA4C;AAC5C,0DAKgC;AAChC,6BAAsC;AAEzB,QAAA,mBAAmB,GAAG,IAAA,+BAAY,EAAC;IAC9C,IAAI,EAAE,iBAAa;IACnB,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,8BAA8B;IAC3C,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,uTAAuT,EAAE,UAAU,EAAE,KAAK,EAAE;IACvW,WAAW,EAAE,aAAa;IAC1B,KAAK,EAAE;QACL,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,qCAAqC;YAClD,WAAW,EAAE,OAAO;YACpB,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,OAAO,EAAE,2BAAQ,CAAC,QAAQ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C,IAAI;gBACvB,GAAG,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,sBAAsB;gBACnE,cAAc,EAAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,KAAK;oBAC9B,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ;oBACrC,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ;iBACtC;gBACD,IAAI,EAAE,WAAW;aAClB,CAAC;YACF,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAE3C,OAAO,CAAC,CAAC;YACX,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export declare const createWordPressPost: import("@aiqadam/qadams-framework").IAction<import("@aiqadam/qadams-framework").CustomAuthProperty<{
|
|
2
|
+
username: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
3
|
+
password: import("@aiqadam/qadams-framework").SecretTextProperty<true>;
|
|
4
|
+
website_url: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
5
|
+
}>, {
|
|
6
|
+
title: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
7
|
+
content: import("@aiqadam/qadams-framework").LongTextProperty<true>;
|
|
8
|
+
slug: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
9
|
+
date: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
10
|
+
featured_media_file: import("@aiqadam/qadams-framework").FileProperty<false>;
|
|
11
|
+
tags: import("@aiqadam/qadams-framework").MultiSelectDropdownProperty<string, false, import("@aiqadam/qadams-framework").CustomAuthProperty<{
|
|
12
|
+
username: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
13
|
+
password: import("@aiqadam/qadams-framework").SecretTextProperty<true>;
|
|
14
|
+
website_url: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
15
|
+
}>>;
|
|
16
|
+
acfFields: import("@aiqadam/qadams-framework").ObjectProperty<false>;
|
|
17
|
+
categories: import("@aiqadam/qadams-framework").MultiSelectDropdownProperty<string, false, import("@aiqadam/qadams-framework").CustomAuthProperty<{
|
|
18
|
+
username: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
19
|
+
password: import("@aiqadam/qadams-framework").SecretTextProperty<true>;
|
|
20
|
+
website_url: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
21
|
+
}>>;
|
|
22
|
+
featured_media: import("@aiqadam/qadams-framework").DropdownProperty<string, false, import("@aiqadam/qadams-framework").CustomAuthProperty<{
|
|
23
|
+
username: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
24
|
+
password: import("@aiqadam/qadams-framework").SecretTextProperty<true>;
|
|
25
|
+
website_url: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
26
|
+
}>>;
|
|
27
|
+
status: import("@aiqadam/qadams-framework").StaticDropdownProperty<string, false>;
|
|
28
|
+
excerpt: import("@aiqadam/qadams-framework").LongTextProperty<false>;
|
|
29
|
+
comment_status: import("@aiqadam/qadams-framework").CheckboxProperty<false>;
|
|
30
|
+
ping_status: import("@aiqadam/qadams-framework").CheckboxProperty<false>;
|
|
31
|
+
}>;
|
|
32
|
+
//# sourceMappingURL=create-post.action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-post.action.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-post.action.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgI9B,CAAC"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createWordPressPost = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const qadams_framework_1 = require("@aiqadam/qadams-framework");
|
|
6
|
+
const common_1 = require("../common");
|
|
7
|
+
const qadams_common_1 = require("@aiqadam/qadams-common");
|
|
8
|
+
const form_data_1 = tslib_1.__importDefault(require("form-data"));
|
|
9
|
+
const __1 = require("../..");
|
|
10
|
+
exports.createWordPressPost = (0, qadams_framework_1.createAction)({
|
|
11
|
+
auth: __1.wordpressAuth,
|
|
12
|
+
name: 'create_post',
|
|
13
|
+
description: 'Create new post on WordPress',
|
|
14
|
+
audience: 'both',
|
|
15
|
+
aiMetadata: { description: 'Publishes a new blog post on a WordPress site via the REST API, with optional status (draft/publish/etc.), categories, tags, excerpt, featured image, and custom ACF fields. Choose this to add fresh content; for editing an existing post use Update Post. Requires a title and HTML content; not idempotent — each call creates a separate post.', idempotent: false },
|
|
16
|
+
displayName: 'Create Post',
|
|
17
|
+
props: {
|
|
18
|
+
title: qadams_framework_1.Property.ShortText({
|
|
19
|
+
description: 'Title of the post about to be added',
|
|
20
|
+
displayName: 'Title',
|
|
21
|
+
required: true,
|
|
22
|
+
}),
|
|
23
|
+
content: qadams_framework_1.Property.LongText({
|
|
24
|
+
description: 'Uses the WordPress Text Editor which supports HTML',
|
|
25
|
+
displayName: 'Content',
|
|
26
|
+
required: true,
|
|
27
|
+
}),
|
|
28
|
+
slug: qadams_framework_1.Property.ShortText({
|
|
29
|
+
displayName: 'Slug',
|
|
30
|
+
required: false,
|
|
31
|
+
}),
|
|
32
|
+
date: qadams_framework_1.Property.ShortText({
|
|
33
|
+
description: 'Post publish date (ISO-8601)',
|
|
34
|
+
displayName: 'Date',
|
|
35
|
+
required: false,
|
|
36
|
+
}),
|
|
37
|
+
featured_media_file: common_1.wordpressCommon.featured_media_file,
|
|
38
|
+
tags: common_1.wordpressCommon.tags,
|
|
39
|
+
acfFields: qadams_framework_1.Property.Object({
|
|
40
|
+
displayName: 'Custom ACF fields',
|
|
41
|
+
description: 'Provide field name with value.You can find out field name from ACF plugin menu.',
|
|
42
|
+
required: false,
|
|
43
|
+
}),
|
|
44
|
+
categories: common_1.wordpressCommon.categories,
|
|
45
|
+
featured_media: common_1.wordpressCommon.featured_media,
|
|
46
|
+
status: common_1.wordpressCommon.status,
|
|
47
|
+
excerpt: qadams_framework_1.Property.LongText({
|
|
48
|
+
description: 'Uses the WordPress Text Editor which supports HTML',
|
|
49
|
+
displayName: 'Excerpt',
|
|
50
|
+
required: false,
|
|
51
|
+
}),
|
|
52
|
+
comment_status: qadams_framework_1.Property.Checkbox({
|
|
53
|
+
displayName: 'Enable Comments',
|
|
54
|
+
required: false,
|
|
55
|
+
}),
|
|
56
|
+
ping_status: qadams_framework_1.Property.Checkbox({
|
|
57
|
+
displayName: 'Open to Pinging',
|
|
58
|
+
required: false,
|
|
59
|
+
}),
|
|
60
|
+
},
|
|
61
|
+
run(context) {
|
|
62
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
63
|
+
if (!(yield common_1.wordpressCommon.urlExists(context.auth.props.website_url.trim()))) {
|
|
64
|
+
throw new Error('Website url is invalid: ' + context.auth.props.website_url);
|
|
65
|
+
}
|
|
66
|
+
const requestBody = {};
|
|
67
|
+
if (context.propsValue.date) {
|
|
68
|
+
requestBody['date'] = context.propsValue.date;
|
|
69
|
+
}
|
|
70
|
+
if (context.propsValue.comment_status) {
|
|
71
|
+
requestBody['comment_status'] = context.propsValue.comment_status
|
|
72
|
+
? 'open'
|
|
73
|
+
: 'closed';
|
|
74
|
+
}
|
|
75
|
+
if (context.propsValue.categories) {
|
|
76
|
+
requestBody['categories'] = context.propsValue.categories;
|
|
77
|
+
}
|
|
78
|
+
if (context.propsValue.slug) {
|
|
79
|
+
requestBody['slug'] = context.propsValue.slug;
|
|
80
|
+
}
|
|
81
|
+
if (context.propsValue.excerpt) {
|
|
82
|
+
requestBody['excerpt'] = context.propsValue.excerpt;
|
|
83
|
+
}
|
|
84
|
+
if (context.propsValue.tags) {
|
|
85
|
+
requestBody['tags'] = context.propsValue.tags;
|
|
86
|
+
}
|
|
87
|
+
if (context.propsValue.ping_status) {
|
|
88
|
+
requestBody['ping_status'] = context.propsValue.ping_status
|
|
89
|
+
? 'open'
|
|
90
|
+
: 'closed';
|
|
91
|
+
}
|
|
92
|
+
if (context.propsValue.status) {
|
|
93
|
+
requestBody['status'] = context.propsValue.status;
|
|
94
|
+
}
|
|
95
|
+
if (context.propsValue.featured_media) {
|
|
96
|
+
requestBody['featured_media'] = context.propsValue.featured_media;
|
|
97
|
+
}
|
|
98
|
+
if (context.propsValue.acfFields &&
|
|
99
|
+
Object.keys(context.propsValue.acfFields).length > 0) {
|
|
100
|
+
requestBody['acf'] = context.propsValue.acfFields;
|
|
101
|
+
}
|
|
102
|
+
if (context.propsValue.featured_media_file) {
|
|
103
|
+
const formData = new form_data_1.default();
|
|
104
|
+
const { filename, base64 } = context.propsValue.featured_media_file;
|
|
105
|
+
formData.append('file', Buffer.from(base64, 'base64'), filename);
|
|
106
|
+
const uploadMediaResponse = yield qadams_common_1.httpClient.sendRequest({
|
|
107
|
+
method: qadams_common_1.HttpMethod.POST,
|
|
108
|
+
url: `${context.auth.props.website_url.trim()}/wp-json/wp/v2/media`,
|
|
109
|
+
body: formData,
|
|
110
|
+
headers: {
|
|
111
|
+
'Content-Type': 'multipart/form-data',
|
|
112
|
+
},
|
|
113
|
+
authentication: {
|
|
114
|
+
type: qadams_common_1.AuthenticationType.BASIC,
|
|
115
|
+
username: context.auth.props.username,
|
|
116
|
+
password: context.auth.props.password,
|
|
117
|
+
},
|
|
118
|
+
});
|
|
119
|
+
requestBody['featured_media'] = uploadMediaResponse.body.id;
|
|
120
|
+
}
|
|
121
|
+
requestBody['content'] = context.propsValue.content;
|
|
122
|
+
requestBody['title'] = context.propsValue.title;
|
|
123
|
+
return yield qadams_common_1.httpClient.sendRequest({
|
|
124
|
+
method: qadams_common_1.HttpMethod.POST,
|
|
125
|
+
url: `${context.auth.props.website_url.trim()}/wp-json/wp/v2/posts`,
|
|
126
|
+
authentication: {
|
|
127
|
+
type: qadams_common_1.AuthenticationType.BASIC,
|
|
128
|
+
username: context.auth.props.username,
|
|
129
|
+
password: context.auth.props.password,
|
|
130
|
+
},
|
|
131
|
+
body: requestBody,
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
},
|
|
135
|
+
});
|
|
136
|
+
//# sourceMappingURL=create-post.action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-post.action.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-post.action.ts"],"names":[],"mappings":";;;;AAAA,gEAGmC;AACnC,sCAA4C;AAC5C,0DAIgC;AAChC,kEAAiC;AACjC,6BAAsC;AAEzB,QAAA,mBAAmB,GAAG,IAAA,+BAAY,EAAC;IAC9C,IAAI,EAAE,iBAAa;IACnB,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,8BAA8B;IAC3C,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,qVAAqV,EAAE,UAAU,EAAE,KAAK,EAAE;IACrY,WAAW,EAAE,aAAa;IAC1B,KAAK,EAAE;QACL,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,qCAAqC;YAClD,WAAW,EAAE,OAAO;YACpB,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,OAAO,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACzB,WAAW,EAAE,oDAAoD;YACjE,WAAW,EAAE,SAAS;YACtB,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,MAAM;YACnB,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,8BAA8B;YAC3C,WAAW,EAAE,MAAM;YACnB,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,mBAAmB,EAAE,wBAAe,CAAC,mBAAmB;QACxD,IAAI,EAAE,wBAAe,CAAC,IAAI;Q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AAI,EAAE,sBAAsB;gBACnE,cAAc,EAAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,KAAK;oBAC9B,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ;oBACrC,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ;iBACtC;gBACD,IAAI,EAAE,WAAW;aAClB,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const getWordPressPost: import("@aiqadam/qadams-framework").IAction<import("@aiqadam/qadams-framework").CustomAuthProperty<{
|
|
2
|
+
username: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
3
|
+
password: import("@aiqadam/qadams-framework").SecretTextProperty<true>;
|
|
4
|
+
website_url: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
5
|
+
}>, {
|
|
6
|
+
id: import("@aiqadam/qadams-framework").NumberProperty<true>;
|
|
7
|
+
}>;
|
|
8
|
+
//# sourceMappingURL=get-post.action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-post.action.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/get-post.action.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,gBAAgB;;;;;;EA+B3B,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getWordPressPost = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const qadams_framework_1 = require("@aiqadam/qadams-framework");
|
|
6
|
+
const common_1 = require("../common");
|
|
7
|
+
const qadams_common_1 = require("@aiqadam/qadams-common");
|
|
8
|
+
const __1 = require("../..");
|
|
9
|
+
exports.getWordPressPost = (0, qadams_framework_1.createAction)({
|
|
10
|
+
auth: __1.wordpressAuth,
|
|
11
|
+
name: 'get_post',
|
|
12
|
+
description: 'Get a post from WordPress',
|
|
13
|
+
audience: 'both',
|
|
14
|
+
aiMetadata: { description: 'Fetches a single WordPress post by its numeric post ID via the REST API. Use it to read the current content, status, or metadata of a known post before acting on it. Requires the post ID; read-only and idempotent.', idempotent: true },
|
|
15
|
+
displayName: 'Get Post Details',
|
|
16
|
+
props: {
|
|
17
|
+
id: qadams_framework_1.Property.Number({
|
|
18
|
+
description: 'The ID of the post to get',
|
|
19
|
+
displayName: 'Post ID',
|
|
20
|
+
required: true,
|
|
21
|
+
}),
|
|
22
|
+
},
|
|
23
|
+
run(context) {
|
|
24
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
if (!(yield common_1.wordpressCommon.urlExists(context.auth.props.website_url.trim()))) {
|
|
26
|
+
throw new Error('Website url is invalid: ' + context.auth.props.website_url);
|
|
27
|
+
}
|
|
28
|
+
return yield qadams_common_1.httpClient.sendRequest({
|
|
29
|
+
method: qadams_common_1.HttpMethod.GET,
|
|
30
|
+
url: `${context.auth.props.website_url.trim()}/wp-json/wp/v2/posts/${context.propsValue.id}`,
|
|
31
|
+
authentication: {
|
|
32
|
+
type: qadams_common_1.AuthenticationType.BASIC,
|
|
33
|
+
username: context.auth.props.username,
|
|
34
|
+
password: context.auth.props.password,
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=get-post.action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-post.action.js","sourceRoot":"","sources":["../../../../src/lib/actions/get-post.action.ts"],"names":[],"mappings":";;;;AAAA,gEAGmC;AACnC,sCAA4C;AAC5C,0DAIgC;AAChC,6BAAsC;AAEzB,QAAA,gBAAgB,GAAG,IAAA,+BAAY,EAAC;IAC3C,IAAI,EAAE,iBAAa;IACnB,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,2BAA2B;IACxC,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,uNAAuN,EAAE,UAAU,EAAE,IAAI,EAAE;IACtQ,WAAW,EAAE,kBAAkB;IAC/B,KAAK,EAAE;QACL,EAAE,EAAE,2BAAQ,CAAC,MAAM,CAAC;YAClB,WAAW,EAAE,2BAA2B;YACxC,WAAW,EAAE,SAAS;YACtB,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,IAAI,CAAC,CAAC,MAAM,wBAAe,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;gBAC9E,MAAM,IAAI,KAAK,CAAC,0BAA0B,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;YAC/E,CAAC;YAED,OAAO,MAAM,0BAAU,CAAC,WAAW,CAAiC;gBAClE,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,wBAC3C,OAAO,CAAC,UAAU,CAAC,EACrB,EAAE;gBACF,cAAc,EAAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,KAAK;oBAC9B,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ;oBACrC,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ;iBACtC;aACF,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare const updateWordPressPost: import("@aiqadam/qadams-framework").IAction<import("@aiqadam/qadams-framework").CustomAuthProperty<{
|
|
2
|
+
username: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
3
|
+
password: import("@aiqadam/qadams-framework").SecretTextProperty<true>;
|
|
4
|
+
website_url: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
5
|
+
}>, {
|
|
6
|
+
post: import("@aiqadam/qadams-framework").DropdownProperty<number, true, import("@aiqadam/qadams-framework").CustomAuthProperty<{
|
|
7
|
+
username: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
8
|
+
password: import("@aiqadam/qadams-framework").SecretTextProperty<true>;
|
|
9
|
+
website_url: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
10
|
+
}>>;
|
|
11
|
+
title: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
12
|
+
content: import("@aiqadam/qadams-framework").LongTextProperty<false>;
|
|
13
|
+
slug: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
14
|
+
date: import("@aiqadam/qadams-framework").ShortTextProperty<false>;
|
|
15
|
+
featured_media_file: import("@aiqadam/qadams-framework").FileProperty<false>;
|
|
16
|
+
tags: import("@aiqadam/qadams-framework").MultiSelectDropdownProperty<string, false, import("@aiqadam/qadams-framework").CustomAuthProperty<{
|
|
17
|
+
username: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
18
|
+
password: import("@aiqadam/qadams-framework").SecretTextProperty<true>;
|
|
19
|
+
website_url: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
20
|
+
}>>;
|
|
21
|
+
acfFields: import("@aiqadam/qadams-framework").ObjectProperty<false>;
|
|
22
|
+
categories: import("@aiqadam/qadams-framework").MultiSelectDropdownProperty<string, false, import("@aiqadam/qadams-framework").CustomAuthProperty<{
|
|
23
|
+
username: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
24
|
+
password: import("@aiqadam/qadams-framework").SecretTextProperty<true>;
|
|
25
|
+
website_url: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
26
|
+
}>>;
|
|
27
|
+
featured_media: import("@aiqadam/qadams-framework").DropdownProperty<string, false, import("@aiqadam/qadams-framework").CustomAuthProperty<{
|
|
28
|
+
username: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
29
|
+
password: import("@aiqadam/qadams-framework").SecretTextProperty<true>;
|
|
30
|
+
website_url: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
31
|
+
}>>;
|
|
32
|
+
status: import("@aiqadam/qadams-framework").StaticDropdownProperty<string, false>;
|
|
33
|
+
excerpt: import("@aiqadam/qadams-framework").LongTextProperty<false>;
|
|
34
|
+
comment_status: import("@aiqadam/qadams-framework").CheckboxProperty<false>;
|
|
35
|
+
ping_status: import("@aiqadam/qadams-framework").CheckboxProperty<false>;
|
|
36
|
+
}>;
|
|
37
|
+
//# sourceMappingURL=update-post.action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-post.action.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/update-post.action.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6I9B,CAAC"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateWordPressPost = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const qadams_framework_1 = require("@aiqadam/qadams-framework");
|
|
6
|
+
const common_1 = require("../common");
|
|
7
|
+
const qadams_common_1 = require("@aiqadam/qadams-common");
|
|
8
|
+
const form_data_1 = tslib_1.__importDefault(require("form-data"));
|
|
9
|
+
const __1 = require("../..");
|
|
10
|
+
exports.updateWordPressPost = (0, qadams_framework_1.createAction)({
|
|
11
|
+
auth: __1.wordpressAuth,
|
|
12
|
+
name: 'update_post',
|
|
13
|
+
description: 'Update an existing post on WordPress.',
|
|
14
|
+
audience: 'both',
|
|
15
|
+
aiMetadata: { description: 'Updates an existing WordPress post identified by its post ID, changing only the fields you supply (title, content, status, categories, tags, excerpt, featured image, or ACF fields). Choose this to edit or republish a known post rather than create a new one. Requires the target post ID; idempotent — repeating with the same input leaves the post in the same final state.', idempotent: true },
|
|
16
|
+
displayName: 'Update Post',
|
|
17
|
+
props: {
|
|
18
|
+
post: common_1.wordpressCommon.post,
|
|
19
|
+
title: qadams_framework_1.Property.ShortText({
|
|
20
|
+
description: 'Title of the post about to be added',
|
|
21
|
+
displayName: 'Title',
|
|
22
|
+
required: false,
|
|
23
|
+
}),
|
|
24
|
+
content: qadams_framework_1.Property.LongText({
|
|
25
|
+
description: 'Uses the WordPress Text Editor which supports HTML',
|
|
26
|
+
displayName: 'Content',
|
|
27
|
+
required: false,
|
|
28
|
+
}),
|
|
29
|
+
slug: qadams_framework_1.Property.ShortText({
|
|
30
|
+
displayName: 'Slug',
|
|
31
|
+
required: false,
|
|
32
|
+
}),
|
|
33
|
+
date: qadams_framework_1.Property.ShortText({
|
|
34
|
+
description: 'Post publish date (ISO-8601)',
|
|
35
|
+
displayName: 'Date',
|
|
36
|
+
required: false,
|
|
37
|
+
}),
|
|
38
|
+
featured_media_file: common_1.wordpressCommon.featured_media_file,
|
|
39
|
+
tags: common_1.wordpressCommon.tags,
|
|
40
|
+
acfFields: qadams_framework_1.Property.Object({
|
|
41
|
+
displayName: 'Custom ACF fields',
|
|
42
|
+
description: 'Provide field name with value.You can find out field name from ACF plugin menu.',
|
|
43
|
+
required: false,
|
|
44
|
+
}),
|
|
45
|
+
categories: common_1.wordpressCommon.categories,
|
|
46
|
+
featured_media: common_1.wordpressCommon.featured_media,
|
|
47
|
+
status: common_1.wordpressCommon.status,
|
|
48
|
+
excerpt: qadams_framework_1.Property.LongText({
|
|
49
|
+
description: 'Uses the WordPress Text Editor which supports HTML',
|
|
50
|
+
displayName: 'Excerpt',
|
|
51
|
+
required: false,
|
|
52
|
+
}),
|
|
53
|
+
comment_status: qadams_framework_1.Property.Checkbox({
|
|
54
|
+
displayName: 'Enable Comments',
|
|
55
|
+
required: false,
|
|
56
|
+
}),
|
|
57
|
+
ping_status: qadams_framework_1.Property.Checkbox({
|
|
58
|
+
displayName: 'Open to Pinging',
|
|
59
|
+
required: false,
|
|
60
|
+
}),
|
|
61
|
+
},
|
|
62
|
+
run(context) {
|
|
63
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
if (!(yield common_1.wordpressCommon.urlExists(context.auth.props.website_url.trim()))) {
|
|
65
|
+
throw new Error('Website url is invalid: ' + context.auth.props.website_url);
|
|
66
|
+
}
|
|
67
|
+
const requestBody = {};
|
|
68
|
+
if (context.propsValue.title) {
|
|
69
|
+
requestBody['title'] = context.propsValue.title;
|
|
70
|
+
}
|
|
71
|
+
if (context.propsValue.content) {
|
|
72
|
+
requestBody['content'] = context.propsValue.content;
|
|
73
|
+
}
|
|
74
|
+
if (context.propsValue.date) {
|
|
75
|
+
requestBody['date'] = context.propsValue.date;
|
|
76
|
+
}
|
|
77
|
+
if (context.propsValue.comment_status) {
|
|
78
|
+
requestBody['comment_status'] = context.propsValue.comment_status
|
|
79
|
+
? 'open'
|
|
80
|
+
: 'closed';
|
|
81
|
+
}
|
|
82
|
+
if (context.propsValue.categories) {
|
|
83
|
+
requestBody['categories'] = context.propsValue.categories;
|
|
84
|
+
}
|
|
85
|
+
if (context.propsValue.slug) {
|
|
86
|
+
requestBody['slug'] = context.propsValue.slug;
|
|
87
|
+
}
|
|
88
|
+
if (context.propsValue.excerpt) {
|
|
89
|
+
requestBody['excerpt'] = context.propsValue.excerpt;
|
|
90
|
+
}
|
|
91
|
+
if (context.propsValue.tags) {
|
|
92
|
+
requestBody['tags'] = context.propsValue.tags;
|
|
93
|
+
}
|
|
94
|
+
if (context.propsValue.ping_status) {
|
|
95
|
+
requestBody['ping_status'] = context.propsValue.ping_status
|
|
96
|
+
? 'open'
|
|
97
|
+
: 'closed';
|
|
98
|
+
}
|
|
99
|
+
if (context.propsValue.status) {
|
|
100
|
+
requestBody['status'] = context.propsValue.status;
|
|
101
|
+
}
|
|
102
|
+
if (context.propsValue.featured_media) {
|
|
103
|
+
requestBody['featured_media'] = context.propsValue.featured_media;
|
|
104
|
+
}
|
|
105
|
+
if (context.propsValue.acfFields &&
|
|
106
|
+
Object.keys(context.propsValue.acfFields).length > 0) {
|
|
107
|
+
requestBody['acf'] = context.propsValue.acfFields;
|
|
108
|
+
}
|
|
109
|
+
if (context.propsValue.featured_media_file) {
|
|
110
|
+
const formData = new form_data_1.default();
|
|
111
|
+
const { filename, base64 } = context.propsValue.featured_media_file;
|
|
112
|
+
formData.append('file', Buffer.from(base64, 'base64'), filename);
|
|
113
|
+
const uploadMediaResponse = yield qadams_common_1.httpClient.sendRequest({
|
|
114
|
+
method: qadams_common_1.HttpMethod.POST,
|
|
115
|
+
url: `${context.auth.props.website_url.trim()}/wp-json/wp/v2/media`,
|
|
116
|
+
body: formData,
|
|
117
|
+
headers: {
|
|
118
|
+
'Content-Type': 'multipart/form-data',
|
|
119
|
+
},
|
|
120
|
+
authentication: {
|
|
121
|
+
type: qadams_common_1.AuthenticationType.BASIC,
|
|
122
|
+
username: context.auth.props.username,
|
|
123
|
+
password: context.auth.props.password,
|
|
124
|
+
},
|
|
125
|
+
});
|
|
126
|
+
requestBody['featured_media'] = uploadMediaResponse.body.id;
|
|
127
|
+
}
|
|
128
|
+
const response = yield qadams_common_1.httpClient.sendRequest({
|
|
129
|
+
method: qadams_common_1.HttpMethod.POST,
|
|
130
|
+
url: `${context.auth.props.website_url.trim()}/wp-json/wp/v2/posts/${context.propsValue.post}`,
|
|
131
|
+
authentication: {
|
|
132
|
+
type: qadams_common_1.AuthenticationType.BASIC,
|
|
133
|
+
username: context.auth.props.username,
|
|
134
|
+
password: context.auth.props.password,
|
|
135
|
+
},
|
|
136
|
+
body: requestBody,
|
|
137
|
+
});
|
|
138
|
+
return response.body;
|
|
139
|
+
});
|
|
140
|
+
},
|
|
141
|
+
});
|
|
142
|
+
//# sourceMappingURL=update-post.action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-post.action.js","sourceRoot":"","sources":["../../../../src/lib/actions/update-post.action.ts"],"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K;oBAC9B,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ;oBACrC,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ;iBACtC;gBACD,IAAI,EAAE,WAAW;aAClB,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
export type WordPressMedia = {
|
|
2
|
+
id: string;
|
|
3
|
+
title: {
|
|
4
|
+
rendered: string;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
export declare const wordpressCommon: {
|
|
8
|
+
featured_media_file: import("@aiqadam/qadams-framework").FileProperty<false>;
|
|
9
|
+
authors: import("@aiqadam/qadams-framework").DropdownProperty<string, false, import("@aiqadam/qadams-framework").CustomAuthProperty<{
|
|
10
|
+
username: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
11
|
+
password: import("@aiqadam/qadams-framework").SecretTextProperty<true>;
|
|
12
|
+
website_url: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
13
|
+
}>>;
|
|
14
|
+
tags: import("@aiqadam/qadams-framework").MultiSelectDropdownProperty<string, false, import("@aiqadam/qadams-framework").CustomAuthProperty<{
|
|
15
|
+
username: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
16
|
+
password: import("@aiqadam/qadams-framework").SecretTextProperty<true>;
|
|
17
|
+
website_url: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
18
|
+
}>>;
|
|
19
|
+
categories: import("@aiqadam/qadams-framework").MultiSelectDropdownProperty<string, false, import("@aiqadam/qadams-framework").CustomAuthProperty<{
|
|
20
|
+
username: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
21
|
+
password: import("@aiqadam/qadams-framework").SecretTextProperty<true>;
|
|
22
|
+
website_url: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
23
|
+
}>>;
|
|
24
|
+
featured_media: import("@aiqadam/qadams-framework").DropdownProperty<string, false, import("@aiqadam/qadams-framework").CustomAuthProperty<{
|
|
25
|
+
username: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
26
|
+
password: import("@aiqadam/qadams-framework").SecretTextProperty<true>;
|
|
27
|
+
website_url: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
28
|
+
}>>;
|
|
29
|
+
status: import("@aiqadam/qadams-framework").StaticDropdownProperty<string, false>;
|
|
30
|
+
post: import("@aiqadam/qadams-framework").DropdownProperty<number, true, import("@aiqadam/qadams-framework").CustomAuthProperty<{
|
|
31
|
+
username: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
32
|
+
password: import("@aiqadam/qadams-framework").SecretTextProperty<true>;
|
|
33
|
+
website_url: import("@aiqadam/qadams-framework").ShortTextProperty<true>;
|
|
34
|
+
}>>;
|
|
35
|
+
getPosts(params: {
|
|
36
|
+
websiteUrl: string;
|
|
37
|
+
username: string;
|
|
38
|
+
password: string;
|
|
39
|
+
authors: string | undefined;
|
|
40
|
+
afterDate: string;
|
|
41
|
+
page: number;
|
|
42
|
+
}): Promise<{
|
|
43
|
+
posts: {
|
|
44
|
+
date: string;
|
|
45
|
+
}[];
|
|
46
|
+
totalPages: number;
|
|
47
|
+
}>;
|
|
48
|
+
getMedia(params: {
|
|
49
|
+
websiteUrl: string;
|
|
50
|
+
username: string;
|
|
51
|
+
password: string;
|
|
52
|
+
page: number;
|
|
53
|
+
}): Promise<{
|
|
54
|
+
media: WordPressMedia[];
|
|
55
|
+
totalPages: number;
|
|
56
|
+
}>;
|
|
57
|
+
getTags(params: {
|
|
58
|
+
websiteUrl: string;
|
|
59
|
+
username: string;
|
|
60
|
+
password: string;
|
|
61
|
+
page: number;
|
|
62
|
+
}): Promise<{
|
|
63
|
+
tags: {
|
|
64
|
+
id: string;
|
|
65
|
+
name: string;
|
|
66
|
+
}[];
|
|
67
|
+
totalPages: number;
|
|
68
|
+
}>;
|
|
69
|
+
getCategories(params: {
|
|
70
|
+
websiteUrl: string;
|
|
71
|
+
username: string;
|
|
72
|
+
password: string;
|
|
73
|
+
page: number;
|
|
74
|
+
}): Promise<{
|
|
75
|
+
categories: {
|
|
76
|
+
id: string;
|
|
77
|
+
name: string;
|
|
78
|
+
}[];
|
|
79
|
+
totalPages: number;
|
|
80
|
+
}>;
|
|
81
|
+
urlExists(url: string): Promise<boolean>;
|
|
82
|
+
isBaseUrl(urlString: string): Promise<boolean>;
|
|
83
|
+
};
|
|
84
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/common/index.ts"],"names":[],"mappings":"AAWA,MAAM,MAAM,cAAc,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAAC;AAIzE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAiUH;QACrB,UAAU,EAAE,MAAM,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;QAC5B,SAAS,EAAE,MAAM,CAAC;QAClB,IAAI,EAAE,MAAM,CAAC;KACd;;kBAqBuD,MAAM;;;;qBASvC;QACrB,UAAU,EAAE,MAAM,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;KACd;;;;oBAsBqB;QACpB,UAAU,EAAE,MAAM,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;KACd;;gBAcS,MAAM;kBAAQ,MAAM;;;;0BAUF;QAC1B,UAAU,EAAE,MAAM,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;KACd;;gBAcS,MAAM;kBAAQ,MAAM;;;;mBAUT,MAAM;yBAYA,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CASrD,CAAC"}
|