@activepieces/piece-ghostcms 0.0.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.
Files changed (41) hide show
  1. package/README.md +7 -0
  2. package/package.json +17 -0
  3. package/src/index.d.ts +8 -0
  4. package/src/index.js +62 -0
  5. package/src/index.js.map +1 -0
  6. package/src/lib/actions/create-member.d.ts +9 -0
  7. package/src/lib/actions/create-member.js +60 -0
  8. package/src/lib/actions/create-member.js.map +1 -0
  9. package/src/lib/actions/create-post.d.ts +14 -0
  10. package/src/lib/actions/create-post.js +84 -0
  11. package/src/lib/actions/create-post.js.map +1 -0
  12. package/src/lib/actions/find-member.d.ts +6 -0
  13. package/src/lib/actions/find-member.js +36 -0
  14. package/src/lib/actions/find-member.js.map +1 -0
  15. package/src/lib/actions/find-user.d.ts +6 -0
  16. package/src/lib/actions/find-user.js +36 -0
  17. package/src/lib/actions/find-user.js.map +1 -0
  18. package/src/lib/actions/update-member.d.ts +10 -0
  19. package/src/lib/actions/update-member.js +65 -0
  20. package/src/lib/actions/update-member.js.map +1 -0
  21. package/src/lib/common/index.d.ts +15 -0
  22. package/src/lib/common/index.js +198 -0
  23. package/src/lib/common/index.js.map +1 -0
  24. package/src/lib/triggers/member-added.d.ts +5 -0
  25. package/src/lib/triggers/member-added.js +101 -0
  26. package/src/lib/triggers/member-added.js.map +1 -0
  27. package/src/lib/triggers/member-deleted.d.ts +5 -0
  28. package/src/lib/triggers/member-deleted.js +101 -0
  29. package/src/lib/triggers/member-deleted.js.map +1 -0
  30. package/src/lib/triggers/member-edited.d.ts +5 -0
  31. package/src/lib/triggers/member-edited.js +106 -0
  32. package/src/lib/triggers/member-edited.js.map +1 -0
  33. package/src/lib/triggers/page-published.d.ts +5 -0
  34. package/src/lib/triggers/page-published.js +208 -0
  35. package/src/lib/triggers/page-published.js.map +1 -0
  36. package/src/lib/triggers/post-published.d.ts +5 -0
  37. package/src/lib/triggers/post-published.js +209 -0
  38. package/src/lib/triggers/post-published.js.map +1 -0
  39. package/src/lib/triggers/post-scheduled.d.ts +5 -0
  40. package/src/lib/triggers/post-scheduled.js +209 -0
  41. package/src/lib/triggers/post-scheduled.js.map +1 -0
@@ -0,0 +1,208 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.pagePublished = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const __1 = require("../..");
7
+ const common_1 = require("../common");
8
+ exports.pagePublished = (0, pieces_framework_1.createTrigger)({
9
+ auth: __1.ghostAuth,
10
+ name: 'page_published',
11
+ displayName: 'Page Published',
12
+ description: 'Triggers when a page is published',
13
+ type: pieces_framework_1.TriggerStrategy.WEBHOOK,
14
+ props: {},
15
+ onEnable(context) {
16
+ var _a;
17
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
18
+ const webhookData = yield common_1.common.subscribeWebhook(context.auth, 'page.published', context.webhookUrl);
19
+ yield ((_a = context.store) === null || _a === void 0 ? void 0 : _a.put('_page_published_trigger', {
20
+ webhookId: webhookData.webhooks[0].id,
21
+ }));
22
+ });
23
+ },
24
+ onDisable(context) {
25
+ var _a;
26
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
27
+ const response = yield ((_a = context.store) === null || _a === void 0 ? void 0 : _a.get('_page_published_trigger'));
28
+ if (response !== null && response !== undefined) {
29
+ yield common_1.common.unsubscribeWebhook(context.auth, response.webhookId);
30
+ }
31
+ });
32
+ },
33
+ run(context) {
34
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
35
+ return [context.payload.body];
36
+ });
37
+ },
38
+ sampleData: {
39
+ "page": {
40
+ "current": {
41
+ "id": "64be860724cb9a0001f49f37",
42
+ "url": "https://test-publication.ghost.io/my-page/",
43
+ "html": "<p>Page content</p>",
44
+ "slug": "my-page",
45
+ "tags": [],
46
+ "uuid": "c2d16c98-f967-4aaa-ba10-ff4fedbb351e",
47
+ "count": {
48
+ "signups": 0,
49
+ "paid_conversions": 0,
50
+ "negative_feedback": 0,
51
+ "positive_feedback": 0
52
+ },
53
+ "tiers": [
54
+ {
55
+ "id": "64be4f5a03946b00098ef8f4",
56
+ "name": "Free",
57
+ "slug": "free",
58
+ "type": "free",
59
+ "active": true,
60
+ "currency": null,
61
+ "created_at": "2023-07-24T10:15:54.000Z",
62
+ "trial_days": 0,
63
+ "updated_at": "2023-07-24T10:15:54.000Z",
64
+ "visibility": "public",
65
+ "description": null,
66
+ "yearly_price": null,
67
+ "monthly_price": null,
68
+ "yearly_price_id": null,
69
+ "monthly_price_id": null,
70
+ "welcome_page_url": null
71
+ },
72
+ {
73
+ "id": "64be4f5a03946b00098ef8f5",
74
+ "name": "Test Publication",
75
+ "slug": "default-product",
76
+ "type": "paid",
77
+ "active": true,
78
+ "currency": "usd",
79
+ "created_at": "2023-07-24T10:15:54.000Z",
80
+ "trial_days": 0,
81
+ "updated_at": "2023-07-24T10:15:54.000Z",
82
+ "visibility": "public",
83
+ "description": null,
84
+ "yearly_price": 5000,
85
+ "monthly_price": 500,
86
+ "yearly_price_id": null,
87
+ "monthly_price_id": null,
88
+ "welcome_page_url": null
89
+ }
90
+ ],
91
+ "title": "My Page",
92
+ "status": "published",
93
+ "authors": [
94
+ {
95
+ "id": "1",
96
+ "bio": null,
97
+ "url": "https://test-publication.ghost.io/author/slug/",
98
+ "name": "First Last",
99
+ "slug": "slug",
100
+ "tour": null,
101
+ "email": "my@email.com",
102
+ "roles": [
103
+ {
104
+ "id": "64be4f5903946b00098ef8eb",
105
+ "name": "Owner",
106
+ "created_at": "2023-07-24T10:15:53.000Z",
107
+ "updated_at": "2023-07-24T10:15:53.000Z",
108
+ "description": "Blog Owner"
109
+ }
110
+ ],
111
+ "status": "active",
112
+ "twitter": null,
113
+ "website": null,
114
+ "facebook": null,
115
+ "location": null,
116
+ "last_seen": "2023-07-24T14:05:21.000Z",
117
+ "created_at": "2023-07-24T10:15:53.000Z",
118
+ "meta_title": null,
119
+ "updated_at": "2023-07-24T14:05:21.000Z",
120
+ "cover_image": null,
121
+ "accessibility": "{\"nightShift\":true}",
122
+ "profile_image": "https://www.gravatar.com/avatar/123123123?s=250&r=x&d=mp",
123
+ "meta_description": null,
124
+ "comment_notifications": true,
125
+ "mention_notifications": true,
126
+ "milestone_notifications": true,
127
+ "free_member_signup_notification": true,
128
+ "paid_subscription_started_notification": true,
129
+ "paid_subscription_canceled_notification": false
130
+ }
131
+ ],
132
+ "excerpt": "Page content",
133
+ "featured": false,
134
+ "og_image": null,
135
+ "og_title": null,
136
+ "mobiledoc": "{\"version\":\"0.3.1\",\"atoms\":[],\"cards\":[],\"markups\":[],\"sections\":[[1,\"p\",[[0,[],0,\"Page content\"]]]],\"ghostVersion\":\"4.0\"}",
137
+ "plaintext": "Page content",
138
+ "comment_id": "64be860724cb9a0001f49f37",
139
+ "created_at": "2023-07-24T14:09:11.000Z",
140
+ "meta_title": null,
141
+ "updated_at": "2023-07-24T14:09:19.000Z",
142
+ "visibility": "public",
143
+ "frontmatter": null,
144
+ "primary_tag": null,
145
+ "published_at": "2023-07-24T14:09:19.000Z",
146
+ "reading_time": 0,
147
+ "canonical_url": null,
148
+ "feature_image": null,
149
+ "twitter_image": null,
150
+ "twitter_title": null,
151
+ "custom_excerpt": null,
152
+ "og_description": null,
153
+ "post_revisions": [],
154
+ "primary_author": {
155
+ "id": "1",
156
+ "bio": null,
157
+ "url": "https://test-publication.ghost.io/author/slug/",
158
+ "name": "First Last",
159
+ "slug": "slug",
160
+ "tour": null,
161
+ "email": "my@email.com",
162
+ "roles": [
163
+ {
164
+ "id": "64be4f5903946b00098ef8eb",
165
+ "name": "Owner",
166
+ "created_at": "2023-07-24T10:15:53.000Z",
167
+ "updated_at": "2023-07-24T10:15:53.000Z",
168
+ "description": "Blog Owner"
169
+ }
170
+ ],
171
+ "status": "active",
172
+ "twitter": null,
173
+ "website": null,
174
+ "facebook": null,
175
+ "location": null,
176
+ "last_seen": "2023-07-24T14:05:21.000Z",
177
+ "created_at": "2023-07-24T10:15:53.000Z",
178
+ "meta_title": null,
179
+ "updated_at": "2023-07-24T14:05:21.000Z",
180
+ "cover_image": null,
181
+ "accessibility": "{\"nightShift\":true}",
182
+ "profile_image": "https://www.gravatar.com/avatar/123123123?s=250&r=x&d=mp",
183
+ "meta_description": null,
184
+ "comment_notifications": true,
185
+ "mention_notifications": true,
186
+ "milestone_notifications": true,
187
+ "free_member_signup_notification": true,
188
+ "paid_subscription_started_notification": true,
189
+ "paid_subscription_canceled_notification": false
190
+ },
191
+ "custom_template": null,
192
+ "meta_description": null,
193
+ "feature_image_alt": null,
194
+ "codeinjection_foot": null,
195
+ "codeinjection_head": null,
196
+ "twitter_description": null,
197
+ "feature_image_caption": null,
198
+ "show_title_and_feature_image": true
199
+ },
200
+ "previous": {
201
+ "status": "draft",
202
+ "updated_at": "2023-07-24T14:09:16.000Z",
203
+ "published_at": null
204
+ }
205
+ }
206
+ }
207
+ });
208
+ //# sourceMappingURL=page-published.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-published.js","sourceRoot":"","sources":["../../../../../../../packages/pieces/ghostcms/src/lib/triggers/page-published.ts"],"names":[],"mappings":";;;;AAAA,qEAAgF;AAEhF,6BAAkC;AAClC,sCAAmC;AAEtB,QAAA,aAAa,GAAG,IAAA,gCAAa,EAAC;IACvC,IAAI,EAAE,aAAS;IACf,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EAAE,mCAAmC;IAChD,IAAI,EAAE,kCAAe,CAAC,OAAO;IAC7B,KAAK,EAAE,EAAE;IACH,QAAQ,CAAC,OAAO;;;YAClB,MAAM,WAAW,GAAQ,MAAM,eAAM,CAAC,gBAAgB,CAAC,OAAO,CAAC,IAAI,EAAE,gBAAgB,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;YAE3G,MAAM,CAAA,MAAA,OAAO,CAAC,KAAK,0CAAE,GAAG,CAAC,yBAAyB,EAAE;gBAChD,SAA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AE,IAAI;oBACf,UAAU,EAAE,IAAI;oBAChB,UAAU,EAAE,IAAI;oBAChB,WAAW,EAAE,0BAA0B;oBACvC,YAAY,EAAE,0BAA0B;oBACxC,YAAY,EAAE,IAAI;oBAClB,YAAY,EAAE,0BAA0B;oBACxC,aAAa,EAAE,IAAI;oBACnB,eAAe,EAAE,uBAAuB;oBACxC,eAAe,EAAE,0DAA0D;oBAC3E,kBAAkB,EAAE,IAAI;oBACxB,uBAAuB,EAAE,IAAI;oBAC7B,uBAAuB,EAAE,IAAI;oBAC7B,yBAAyB,EAAE,IAAI;oBAC/B,iCAAiC,EAAE,IAAI;oBACvC,wCAAwC,EAAE,IAAI;oBAC9C,yCAAyC,EAAE,KAAK;iBACnD;gBACD,iBAAiB,EAAE,IAAI;gBACvB,kBAAkB,EAAE,IAAI;gBACxB,mBAAmB,EAAE,IAAI;gBACzB,oBAAoB,EAAE,IAAI;gBAC1B,oBAAoB,EAAE,IAAI;gBAC1B,qBAAqB,EAAE,IAAI;gBAC3B,uBAAuB,EAAE,IAAI;gBAC7B,8BAA8B,EAAE,IAAI;aACvC;YACD,UAAU,EAAE;gBACR,QAAQ,EAAE,OAAO;gBACjB,YAAY,EAAE,0BAA0B;gBACxC,cAAc,EAAE,IAAI;aACvB;SACJ;KACJ;CACJ,CAAC,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { TriggerStrategy } from "@activepieces/pieces-framework";
2
+ export declare const postPublished: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").CustomAuthProperty<true, {
3
+ baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
+ apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
5
+ }>, {}>;
@@ -0,0 +1,209 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.postPublished = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const __1 = require("../..");
7
+ const common_1 = require("../common");
8
+ exports.postPublished = (0, pieces_framework_1.createTrigger)({
9
+ auth: __1.ghostAuth,
10
+ name: 'post_published',
11
+ displayName: 'Post Published',
12
+ description: 'Triggers when a post is published',
13
+ type: pieces_framework_1.TriggerStrategy.WEBHOOK,
14
+ props: {},
15
+ onEnable(context) {
16
+ var _a;
17
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
18
+ const webhookData = yield common_1.common.subscribeWebhook(context.auth, 'post.published', context.webhookUrl);
19
+ yield ((_a = context.store) === null || _a === void 0 ? void 0 : _a.put('_post_published_trigger', {
20
+ webhookId: webhookData.webhooks[0].id,
21
+ }));
22
+ });
23
+ },
24
+ onDisable(context) {
25
+ var _a;
26
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
27
+ const response = yield ((_a = context.store) === null || _a === void 0 ? void 0 : _a.get('_post_published_trigger'));
28
+ if (response !== null && response !== undefined) {
29
+ yield common_1.common.unsubscribeWebhook(context.auth, response.webhookId);
30
+ }
31
+ });
32
+ },
33
+ run(context) {
34
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
35
+ return [context.payload.body];
36
+ });
37
+ },
38
+ sampleData: {
39
+ "post": {
40
+ "current": {
41
+ "id": "64be83c424cb9a0001f49f1d",
42
+ "url": "https://test-publication.ghost.io/test-post/",
43
+ "html": "<p>Hello my friends</p><p></p><p>this is testing</p>",
44
+ "slug": "test-post",
45
+ "tags": [],
46
+ "uuid": "77afb2c2-af1a-4a7f-bebc-fa1e314579d0",
47
+ "count": {
48
+ "clicks": 0,
49
+ "negative_feedback": 0,
50
+ "positive_feedback": 0
51
+ },
52
+ "tiers": [
53
+ {
54
+ "id": "64be4f5a03946b00098ef8f4",
55
+ "name": "Free",
56
+ "slug": "free",
57
+ "type": "free",
58
+ "active": true,
59
+ "currency": null,
60
+ "created_at": "2023-07-24T10:15:54.000Z",
61
+ "trial_days": 0,
62
+ "updated_at": "2023-07-24T10:15:54.000Z",
63
+ "visibility": "public",
64
+ "description": null,
65
+ "yearly_price": null,
66
+ "monthly_price": null,
67
+ "yearly_price_id": null,
68
+ "monthly_price_id": null,
69
+ "welcome_page_url": null
70
+ },
71
+ {
72
+ "id": "64be4f5a03946b00098ef8f5",
73
+ "name": "Test Publication",
74
+ "slug": "default-product",
75
+ "type": "paid",
76
+ "active": true,
77
+ "currency": "usd",
78
+ "created_at": "2023-07-24T10:15:54.000Z",
79
+ "trial_days": 0,
80
+ "updated_at": "2023-07-24T10:15:54.000Z",
81
+ "visibility": "public",
82
+ "description": null,
83
+ "yearly_price": 5000,
84
+ "monthly_price": 500,
85
+ "yearly_price_id": null,
86
+ "monthly_price_id": null,
87
+ "welcome_page_url": null
88
+ }
89
+ ],
90
+ "title": "Test Post",
91
+ "status": "published",
92
+ "authors": [
93
+ {
94
+ "id": "1",
95
+ "bio": null,
96
+ "url": "https://test-publication.ghost.io/author/slug/",
97
+ "name": "First Last",
98
+ "slug": "slug",
99
+ "tour": null,
100
+ "email": "my@email.com",
101
+ "roles": [
102
+ {
103
+ "id": "64be4f5903946b00098ef8eb",
104
+ "name": "Owner",
105
+ "created_at": "2023-07-24T10:15:53.000Z",
106
+ "updated_at": "2023-07-24T10:15:53.000Z",
107
+ "description": "Blog Owner"
108
+ }
109
+ ],
110
+ "status": "active",
111
+ "twitter": null,
112
+ "website": null,
113
+ "facebook": null,
114
+ "location": null,
115
+ "last_seen": "2023-07-24T13:05:18.000Z",
116
+ "created_at": "2023-07-24T10:15:53.000Z",
117
+ "meta_title": null,
118
+ "updated_at": "2023-07-24T13:05:18.000Z",
119
+ "cover_image": null,
120
+ "accessibility": "{\"nightShift\":true}",
121
+ "profile_image": "https://www.gravatar.com/avatar/123123123?s=250&r=x&d=mp",
122
+ "meta_description": null,
123
+ "comment_notifications": true,
124
+ "mention_notifications": true,
125
+ "milestone_notifications": true,
126
+ "free_member_signup_notification": true,
127
+ "paid_subscription_started_notification": true,
128
+ "paid_subscription_canceled_notification": false
129
+ }
130
+ ],
131
+ "excerpt": "Hello my friends\n\n\n\nthis is testing",
132
+ "featured": false,
133
+ "og_image": null,
134
+ "og_title": null,
135
+ "mobiledoc": "{\"version\":\"0.3.1\",\"atoms\":[],\"cards\":[],\"markups\":[],\"sections\":[[1,\"p\",[[0,[],0,\"Hello my friends\"]]],[1,\"p\",[]],[1,\"p\",[[0,[],0,\"this is testing\"]]]],\"ghostVersion\":\"4.0\"}",
136
+ "plaintext": "Hello my friends\n\n\n\nthis is testing",
137
+ "comment_id": "64be83c424cb9a0001f49f1d",
138
+ "created_at": "2023-07-24T13:59:32.000Z",
139
+ "email_only": false,
140
+ "meta_title": null,
141
+ "updated_at": "2023-07-24T13:59:43.000Z",
142
+ "visibility": "public",
143
+ "frontmatter": null,
144
+ "primary_tag": null,
145
+ "published_at": "2023-07-24T13:59:43.000Z",
146
+ "reading_time": 0,
147
+ "canonical_url": null,
148
+ "email_segment": "all",
149
+ "email_subject": null,
150
+ "feature_image": null,
151
+ "twitter_image": null,
152
+ "twitter_title": null,
153
+ "custom_excerpt": null,
154
+ "og_description": null,
155
+ "post_revisions": [],
156
+ "primary_author": {
157
+ "id": "1",
158
+ "bio": null,
159
+ "url": "https://test-publication.ghost.io/author/slug/",
160
+ "name": "First Last",
161
+ "slug": "slug",
162
+ "tour": null,
163
+ "email": "my@email.com",
164
+ "roles": [
165
+ {
166
+ "id": "64be4f5903946b00098ef8eb",
167
+ "name": "Owner",
168
+ "created_at": "2023-07-24T10:15:53.000Z",
169
+ "updated_at": "2023-07-24T10:15:53.000Z",
170
+ "description": "Blog Owner"
171
+ }
172
+ ],
173
+ "status": "active",
174
+ "twitter": null,
175
+ "website": null,
176
+ "facebook": null,
177
+ "location": null,
178
+ "last_seen": "2023-07-24T13:05:18.000Z",
179
+ "created_at": "2023-07-24T10:15:53.000Z",
180
+ "meta_title": null,
181
+ "updated_at": "2023-07-24T13:05:18.000Z",
182
+ "cover_image": null,
183
+ "accessibility": "{\"nightShift\":true}",
184
+ "profile_image": "https://www.gravatar.com/avatar/123123123?s=250&r=x&d=mp",
185
+ "meta_description": null,
186
+ "comment_notifications": true,
187
+ "mention_notifications": true,
188
+ "milestone_notifications": true,
189
+ "free_member_signup_notification": true,
190
+ "paid_subscription_started_notification": true,
191
+ "paid_subscription_canceled_notification": false
192
+ },
193
+ "custom_template": null,
194
+ "meta_description": null,
195
+ "feature_image_alt": null,
196
+ "codeinjection_foot": null,
197
+ "codeinjection_head": null,
198
+ "twitter_description": null,
199
+ "feature_image_caption": null
200
+ },
201
+ "previous": {
202
+ "status": "draft",
203
+ "updated_at": "2023-07-24T13:59:39.000Z",
204
+ "published_at": null
205
+ }
206
+ }
207
+ }
208
+ });
209
+ //# sourceMappingURL=post-published.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"post-published.js","sourceRoot":"","sources":["../../../../../../../packages/pieces/ghostcms/src/lib/triggers/post-published.ts"],"names":[],"mappings":";;;;AAAA,qEAAgF;AAEhF,6BAAkC;AAClC,sCAAmC;AAEtB,QAAA,aAAa,GAAG,IAAA,gCAAa,EAAC;IACvC,IAAI,EAAE,aAAS;IACf,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EAAE,mCAAmC;IAChD,IAAI,EAAE,kCAAe,CAAC,OAAO;IAC7B,KAAK,EAAE,EAAE;IACH,QAAQ,CAAC,OAAO;;;YAClB,MAAM,WAAW,GAAQ,MAAM,eAAM,CAAC,gBAAgB,CAAC,OAAO,CAAC,IAAI,EAAE,gBAAgB,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;YAE3G,MAAM,CAAA,MAAA,OAAO,CAAC,KAAK,0CAAE,GAAG,CAAC,yBAAyB,EAAE;gBAChD,SAAS,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE;aACxC,CAAC,CAAA,CAAC;;KACN;IACK,SAAS,CAAC,OAAO;;;YACnB,MAAM,QAAQ,GAEH,MAAM,CAAA,MAAA,OAAO,CAAC,K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,YAAY,EAAE,IAAI;oBAClB,YAAY,EAAE,0BAA0B;oBACxC,aAAa,EAAE,IAAI;oBACnB,eAAe,EAAE,uBAAuB;oBACxC,eAAe,EAAE,0DAA0D;oBAC3E,kBAAkB,EAAE,IAAI;oBACxB,uBAAuB,EAAE,IAAI;oBAC7B,uBAAuB,EAAE,IAAI;oBAC7B,yBAAyB,EAAE,IAAI;oBAC/B,iCAAiC,EAAE,IAAI;oBACvC,wCAAwC,EAAE,IAAI;oBAC9C,yCAAyC,EAAE,KAAK;iBACnD;gBACD,iBAAiB,EAAE,IAAI;gBACvB,kBAAkB,EAAE,IAAI;gBACxB,mBAAmB,EAAE,IAAI;gBACzB,oBAAoB,EAAE,IAAI;gBAC1B,oBAAoB,EAAE,IAAI;gBAC1B,qBAAqB,EAAE,IAAI;gBAC3B,uBAAuB,EAAE,IAAI;aAChC;YACD,UAAU,EAAE;gBACR,QAAQ,EAAE,OAAO;gBACjB,YAAY,EAAE,0BAA0B;gBACxC,cAAc,EAAE,IAAI;aACvB;SACJ;KACJ;CACJ,CAAC,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { TriggerStrategy } from "@activepieces/pieces-framework";
2
+ export declare const postScheduled: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").CustomAuthProperty<true, {
3
+ baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
+ apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
5
+ }>, {}>;