@posty5/n8n-nodes-posty5 2.0.0 → 2.1.0

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 (59) hide show
  1. package/README.md +7 -7
  2. package/dist/nodes/Posty5FormSubmission/Posty5FormSubmission.node.d.ts.map +1 -1
  3. package/dist/nodes/Posty5FormSubmission/Posty5FormSubmission.node.js +41 -72
  4. package/dist/nodes/Posty5FormSubmission/Posty5FormSubmission.node.js.map +1 -1
  5. package/dist/nodes/Posty5HtmlHosting/Posty5HtmlHosting.node.d.ts.map +1 -1
  6. package/dist/nodes/Posty5HtmlHosting/Posty5HtmlHosting.node.js +93 -84
  7. package/dist/nodes/Posty5HtmlHosting/Posty5HtmlHosting.node.js.map +1 -1
  8. package/dist/nodes/Posty5QrCode/Posty5QrCode.node.d.ts.map +1 -1
  9. package/dist/nodes/Posty5QrCode/Posty5QrCode.node.js +73 -118
  10. package/dist/nodes/Posty5QrCode/Posty5QrCode.node.js.map +1 -1
  11. package/dist/nodes/Posty5ShortLink/Posty5ShortLink.node.d.ts.map +1 -1
  12. package/dist/nodes/Posty5ShortLink/Posty5ShortLink.node.js +59 -78
  13. package/dist/nodes/Posty5ShortLink/Posty5ShortLink.node.js.map +1 -1
  14. package/dist/nodes/{Posty5SocialPublisherTask/Posty5SocialPublisherTask.node.d.ts → Posty5SocialPublisherPost/Posty5SocialPublisherPost.node.d.ts} +2 -2
  15. package/dist/nodes/Posty5SocialPublisherPost/Posty5SocialPublisherPost.node.d.ts.map +1 -0
  16. package/dist/nodes/{Posty5SocialPublisherTask/Posty5SocialPublisherTask.node.js → Posty5SocialPublisherPost/Posty5SocialPublisherPost.node.js} +151 -116
  17. package/dist/nodes/Posty5SocialPublisherPost/Posty5SocialPublisherPost.node.js.map +1 -0
  18. package/dist/nodes/Posty5SocialPublisherWorkspace/Posty5SocialPublisherWorkspace.node.d.ts.map +1 -1
  19. package/dist/nodes/Posty5SocialPublisherWorkspace/Posty5SocialPublisherWorkspace.node.js +31 -159
  20. package/dist/nodes/Posty5SocialPublisherWorkspace/Posty5SocialPublisherWorkspace.node.js.map +1 -1
  21. package/dist/types/common.d.ts +58 -0
  22. package/dist/types/common.d.ts.map +1 -0
  23. package/dist/types/common.js +7 -0
  24. package/dist/types/common.js.map +1 -0
  25. package/dist/types/form-submission.types.d.ts +110 -0
  26. package/dist/types/form-submission.types.d.ts.map +1 -0
  27. package/dist/types/form-submission.types.js +7 -0
  28. package/dist/types/form-submission.types.js.map +1 -0
  29. package/dist/types/html-hosting.types.d.ts +177 -0
  30. package/dist/types/html-hosting.types.d.ts.map +1 -0
  31. package/dist/types/html-hosting.types.js +7 -0
  32. package/dist/types/html-hosting.types.js.map +1 -0
  33. package/dist/types/qr-code.types.d.ts +259 -0
  34. package/dist/types/qr-code.types.d.ts.map +1 -0
  35. package/dist/types/qr-code.types.js +7 -0
  36. package/dist/types/qr-code.types.js.map +1 -0
  37. package/dist/types/short-link.types.d.ts +156 -0
  38. package/dist/types/short-link.types.d.ts.map +1 -0
  39. package/dist/types/short-link.types.js +7 -0
  40. package/dist/types/short-link.types.js.map +1 -0
  41. package/dist/types/task.types.d.ts +332 -0
  42. package/dist/types/task.types.d.ts.map +1 -0
  43. package/dist/types/task.types.js +7 -0
  44. package/dist/types/task.types.js.map +1 -0
  45. package/dist/types/workspace.types.d.ts +105 -0
  46. package/dist/types/workspace.types.d.ts.map +1 -0
  47. package/dist/types/workspace.types.js +7 -0
  48. package/dist/types/workspace.types.js.map +1 -0
  49. package/dist/utils/api.helpers.d.ts +40 -0
  50. package/dist/utils/api.helpers.d.ts.map +1 -0
  51. package/dist/utils/api.helpers.js +101 -0
  52. package/dist/utils/api.helpers.js.map +1 -0
  53. package/dist/utils/constants.d.ts +22 -0
  54. package/dist/utils/constants.d.ts.map +1 -0
  55. package/dist/utils/constants.js +25 -0
  56. package/dist/utils/constants.js.map +1 -0
  57. package/package.json +9 -14
  58. package/dist/nodes/Posty5SocialPublisherTask/Posty5SocialPublisherTask.node.d.ts.map +0 -1
  59. package/dist/nodes/Posty5SocialPublisherTask/Posty5SocialPublisherTask.node.js.map +0 -1
@@ -0,0 +1,332 @@
1
+ /**
2
+ * Social Publisher Task Types for Posty5 N8N Nodes
3
+ * Type definitions for Social Publisher Task operations
4
+ */
5
+ import { IPaginationResponse } from './common';
6
+ import { SocialPublisherAccountStatusType } from './workspace.types';
7
+ /**
8
+ * Social publisher task status type
9
+ */
10
+ export type SocialPublisherPostStatusType = 'pending' | 'processing' | 'processingInPlatform' | 'failedByPlatform' | 'done' | 'error' | 'canceled' | 'needsMaintenance' | 'invalidVideoURL' | 'invalidPostVideoURL' | 'retrying';
11
+ /**
12
+ * Social publisher task type
13
+ */
14
+ export type SocialPublisherPostType = 'shortVideo';
15
+ /**
16
+ * Social publisher task account type
17
+ */
18
+ export type SocialPublisherPostAccountType = 'youtube' | 'facebook' | 'instagram' | 'tiktok';
19
+ /**
20
+ * Social publisher task schedule type
21
+ */
22
+ export type SocialPublisherPostScheduleType = 'now' | 'schedule';
23
+ /**
24
+ * Social publisher task source type
25
+ */
26
+ export type SocialPublisherPostSourceType = 'video-file' | 'video-url' | 'facebook-video' | 'youtube-video' | 'tiktok-video';
27
+ /**
28
+ * Upload config for video and thumbnail
29
+ */
30
+ export interface IUploadConfig {
31
+ url: string;
32
+ fields: Record<string, string>;
33
+ }
34
+ /**
35
+ * Generate upload URLs response
36
+ */
37
+ export interface IGenerateUploadUrlsResponse {
38
+ postId: string;
39
+ thumb: {
40
+ fileURL: string | undefined;
41
+ uploadFileURL: string | undefined;
42
+ bucketFilePath: string | undefined;
43
+ };
44
+ video: {
45
+ fileURL: string | undefined;
46
+ uploadFileURL: string | undefined;
47
+ bucketFilePath: string | undefined;
48
+ };
49
+ }
50
+ /**
51
+ * Social publisher task status log
52
+ */
53
+ export interface ISocialPublisherPostStatusLog {
54
+ status: SocialPublisherPostStatusType;
55
+ error: string;
56
+ changedAt: Date;
57
+ }
58
+ /**
59
+ * Social publisher task post info
60
+ */
61
+ export interface ISocialPublisherPostPostInfo {
62
+ platformAccountId: string;
63
+ currentError: string;
64
+ isAllow: boolean;
65
+ currentStatus: SocialPublisherPostStatusType;
66
+ currentStatusChangedAt: Date;
67
+ publishId: string;
68
+ videoId: string;
69
+ videoURL: string;
70
+ statusHistory: {
71
+ status: SocialPublisherPostStatusType;
72
+ changedAt: Date;
73
+ }[];
74
+ socialPublisherAccountId: string | any;
75
+ }
76
+ /**
77
+ * Social publisher task platform
78
+ */
79
+ export interface ISocialPublisherPostPlatform {
80
+ postInfo: ISocialPublisherPostPostInfo;
81
+ }
82
+ /**
83
+ * Social publisher task response
84
+ */
85
+ export interface ISocialPublisherPostResponse {
86
+ _id: string;
87
+ numbering: string;
88
+ caption: string;
89
+ createdAt: Date;
90
+ currentStatus: SocialPublisherPostStatusType;
91
+ isAllow: {
92
+ tiktok: boolean;
93
+ facebookPage: boolean;
94
+ instagram: boolean;
95
+ youtube: boolean;
96
+ };
97
+ workspace: {
98
+ _id: string;
99
+ name: string;
100
+ };
101
+ schedule: {
102
+ type: 'schedule' | 'now';
103
+ scheduledAt: Date;
104
+ executedAt: Date;
105
+ };
106
+ refId: string;
107
+ tag: string;
108
+ }
109
+ /**
110
+ * Base status history grouped day
111
+ */
112
+ export interface IBaseStatusHistoryGroupedDay<StatusType> {
113
+ day: Date;
114
+ history: IBaseStatusHistoryGroupedItem<StatusType>[];
115
+ }
116
+ /**
117
+ * Base status history grouped item
118
+ */
119
+ export interface IBaseStatusHistoryGroupedItem<StatusType> {
120
+ time: Date;
121
+ status: StatusType;
122
+ }
123
+ /**
124
+ * Social publisher task status response
125
+ */
126
+ export interface ISocialPublisherPostStatusResponse {
127
+ _id: string;
128
+ numbering: string;
129
+ type: 'shortVideo';
130
+ source: SocialPublisherPostSourceType;
131
+ sourceURLs: {
132
+ thumbURL?: string | null;
133
+ videoURL?: string;
134
+ postURL?: string;
135
+ };
136
+ currentStatus: SocialPublisherPostStatusType;
137
+ currentError: string;
138
+ currentStatusChangedAt: string;
139
+ statusHistoryGrouped: IBaseStatusHistoryGroupedDay<SocialPublisherPostStatusType>[];
140
+ tiktok?: ISocialPublisherPostTikTokPostDetails;
141
+ facebook?: ISocialPublisherPostFacebookPagePostDetails;
142
+ instagram?: ISocialPublisherPostInstagramPostDetails;
143
+ youtube?: ISocialPublisherPostYouTubePostDetails;
144
+ workspace: ISocialPublisherWorkspace;
145
+ createdAt: Date;
146
+ startedAt: Date;
147
+ schedule: {
148
+ type: 'schedule' | 'now';
149
+ scheduledAt: Date;
150
+ executedAt: Date;
151
+ };
152
+ }
153
+ /**
154
+ * Social publisher workspace
155
+ */
156
+ export interface ISocialPublisherWorkspace {
157
+ _id: string;
158
+ name: string;
159
+ description: string;
160
+ createdAt: Date;
161
+ account: {
162
+ youtube?: ISocialPublisherAccount;
163
+ tiktok?: ISocialPublisherAccount;
164
+ facebook?: ISocialPublisherAccount;
165
+ instagram?: ISocialPublisherAccount;
166
+ };
167
+ }
168
+ /**
169
+ * Social publisher account
170
+ */
171
+ export interface ISocialPublisherAccount {
172
+ _id: string;
173
+ status: SocialPublisherAccountStatusType;
174
+ link: string;
175
+ name: string;
176
+ thumbnail: string;
177
+ platformAccountId: string;
178
+ }
179
+ /**
180
+ * Social publisher task account
181
+ */
182
+ export interface ISocialPublisherPostAccount {
183
+ tags: string[];
184
+ postInfo: {
185
+ isAllow: boolean;
186
+ currentStatus: SocialPublisherPostStatusType;
187
+ statusHistoryGrouped: IBaseStatusHistoryGroupedDay<SocialPublisherPostStatusType>[];
188
+ videoURL: string;
189
+ socialPublisherAccount: ISocialPublisherAccount;
190
+ };
191
+ }
192
+ /**
193
+ * Social publisher task TikTok post details
194
+ */
195
+ export interface ISocialPublisherPostTikTokPostDetails extends ISocialPublisherPostAccount {
196
+ caption: string;
197
+ disable_duet: boolean;
198
+ disable_stitch: boolean;
199
+ disable_comment: boolean;
200
+ privacy_level: string;
201
+ }
202
+ /**
203
+ * Social publisher task Facebook page post details
204
+ */
205
+ export interface ISocialPublisherPostFacebookPagePostDetails extends ISocialPublisherPostAccount {
206
+ description: string;
207
+ title: string;
208
+ }
209
+ /**
210
+ * Social publisher task Instagram post details
211
+ */
212
+ export interface ISocialPublisherPostInstagramPostDetails extends ISocialPublisherPostAccount {
213
+ description: string;
214
+ share_to_feed: boolean;
215
+ is_published_to_both_feed_and_story: boolean;
216
+ }
217
+ /**
218
+ * Social publisher task YouTube post details
219
+ */
220
+ export interface ISocialPublisherPostYouTubePostDetails extends ISocialPublisherPostAccount {
221
+ title: string;
222
+ description: string;
223
+ tags: string[];
224
+ madeForKids: boolean;
225
+ defaultLanguage: string;
226
+ defaultAudioLanguage: string;
227
+ categoryId: string;
228
+ localizationLanguages: string[];
229
+ localizations: any;
230
+ }
231
+ /**
232
+ * Social publisher task next/previous response
233
+ */
234
+ export interface ISocialPublisherPostNextPreviousResponse {
235
+ nextId?: string;
236
+ previousId?: string;
237
+ }
238
+ /**
239
+ * YouTube configuration
240
+ */
241
+ export interface IYouTubeConfig {
242
+ title: string;
243
+ description: string;
244
+ tags: string[];
245
+ madeForKids?: boolean;
246
+ defaultLanguage?: string;
247
+ defaultAudioLanguage?: string;
248
+ categoryId?: string;
249
+ localizationLanguages?: string[];
250
+ }
251
+ /**
252
+ * TikTok configuration
253
+ */
254
+ export interface ITikTokConfig {
255
+ caption: string;
256
+ disable_duet: boolean;
257
+ disable_stitch: boolean;
258
+ disable_comment: boolean;
259
+ privacy_level: string;
260
+ }
261
+ /**
262
+ * Facebook page configuration
263
+ */
264
+ export interface IFacebookPageConfig {
265
+ description: string;
266
+ title?: string;
267
+ }
268
+ /**
269
+ * Instagram configuration
270
+ */
271
+ export interface IInstagramConfig {
272
+ description: string;
273
+ share_to_feed?: boolean;
274
+ is_published_to_both_feed_and_story?: boolean;
275
+ }
276
+ /**
277
+ * Schedule configuration
278
+ */
279
+ export interface IScheduleConfig {
280
+ type: SocialPublisherPostScheduleType;
281
+ scheduledAt?: Date;
282
+ }
283
+ /**
284
+ * Create social publisher task request
285
+ */
286
+ export interface ICreateSocialPublisherPostRequest {
287
+ workspaceId: string;
288
+ source: SocialPublisherPostSourceType;
289
+ isAllowYouTube: boolean;
290
+ isAllowTiktok: boolean;
291
+ isAllowFacebookPage: boolean;
292
+ isAllowInstagram: boolean;
293
+ youTube?: IYouTubeConfig;
294
+ tiktok?: ITikTokConfig;
295
+ facebook?: IFacebookPageConfig;
296
+ instagram?: IInstagramConfig;
297
+ videoURL?: string;
298
+ thumbURL?: string;
299
+ postURL?: string;
300
+ schedule?: IScheduleConfig;
301
+ tag?: string;
302
+ refId?: string;
303
+ }
304
+ /**
305
+ * Generate upload URLs request
306
+ */
307
+ export interface IGenerateUploadUrlsRequest {
308
+ thumbFileType?: string;
309
+ videoFileType?: string;
310
+ }
311
+ /**
312
+ * List parameters for filtering tasks
313
+ */
314
+ export interface IListParams {
315
+ caption?: string;
316
+ numbering?: string;
317
+ currentStatus?: string;
318
+ workspaceId?: string;
319
+ refId?: string;
320
+ tag?: string;
321
+ 'youtube.postInfo.isAllow'?: boolean;
322
+ 'facebook.postInfo.isAllow'?: boolean;
323
+ 'instagram.postInfo.isAllow'?: boolean;
324
+ 'tiktok.postInfo.isAllow'?: boolean;
325
+ }
326
+ export type ISearchSocialPublisherPostResponse = IPaginationResponse<ISocialPublisherPostResponse>;
327
+ export type IGetTaskResponse = ISocialPublisherPostStatusResponse;
328
+ export type IgetPostStatusResponse = ISocialPublisherPostStatusResponse;
329
+ export interface IDeleteTaskResponse {
330
+ message?: string;
331
+ }
332
+ //# sourceMappingURL=task.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task.types.d.ts","sourceRoot":"","sources":["../../types/task.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,gCAAgC,EAAE,MAAM,mBAAmB,CAAC;AAErE;;GAEG;AACH,MAAM,M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;AACxE,MAAM,WAAW,mBAAmB;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ /**
3
+ * Social Publisher Task Types for Posty5 N8N Nodes
4
+ * Type definitions for Social Publisher Task operations
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ //# sourceMappingURL=task.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task.types.js","sourceRoot":"","sources":["../../types/task.types.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
@@ -0,0 +1,105 @@
1
+ /**
2
+ * Social Publisher Workspace Types for Posty5 N8N Nodes
3
+ * Type definitions for Social Publisher Workspace operations
4
+ */
5
+ import { IPaginationResponse } from './common';
6
+ /**
7
+ * Social publisher account status type
8
+ */
9
+ export type SocialPublisherAccountStatusType = 'active' | 'inactive' | 'authenticationExpired';
10
+ /**
11
+ * Account sample details
12
+ */
13
+ export interface IAccountSampleDetails {
14
+ link: string;
15
+ name: string;
16
+ thumbnail: string;
17
+ platformAccountId: string;
18
+ status: SocialPublisherAccountStatusType;
19
+ }
20
+ /**
21
+ * Workspace account configuration
22
+ */
23
+ export interface IWorkspaceAccount {
24
+ youtube?: IAccountSampleDetails | any;
25
+ facebook?: IAccountSampleDetails | any;
26
+ instagram?: IAccountSampleDetails | any;
27
+ tiktok?: IAccountSampleDetails | any;
28
+ facebookPlatformPageId?: string;
29
+ instagramPlatformAccountId?: string;
30
+ }
31
+ /**
32
+ * Workspace response
33
+ */
34
+ export interface IWorkspaceResponse {
35
+ _id: string;
36
+ name: string;
37
+ description: string;
38
+ imageUrl?: string;
39
+ account: IWorkspaceAccount;
40
+ }
41
+ /**
42
+ * Workspace sample details (used in lists)
43
+ */
44
+ export interface IWorkspaceSampleDetails {
45
+ _id: string;
46
+ name: string;
47
+ description: string;
48
+ imageUrl?: string;
49
+ createdAt: string;
50
+ updatedAt?: string;
51
+ refId?: string;
52
+ tag: string;
53
+ }
54
+ /**
55
+ * Upload image configuration returned by API
56
+ */
57
+ export interface IUploadImageConfig {
58
+ uploadUrl: string;
59
+ imageUrl: string;
60
+ }
61
+ /**
62
+ * Workspace details with upload config
63
+ */
64
+ export interface IWorkspaceWithUploadConfig {
65
+ workspaceId: string;
66
+ uploadImageConfig: IUploadImageConfig | null;
67
+ }
68
+ /**
69
+ * Workspace details formatted for new task creation with populated accounts
70
+ */
71
+ export interface IWorkspaceForNewTaskResponse {
72
+ _id: string;
73
+ name: string;
74
+ description: string;
75
+ imageUrl?: string;
76
+ account: IWorkspaceAccount;
77
+ }
78
+ /**
79
+ * Workspace request
80
+ */
81
+ export interface IWorkspaceRequest {
82
+ name: string;
83
+ description: string;
84
+ tag?: string;
85
+ refId?: string;
86
+ }
87
+ /**
88
+ * List parameters for filtering workspaces
89
+ */
90
+ export interface IListParams {
91
+ name?: string;
92
+ description?: string;
93
+ tag?: string;
94
+ refId?: string;
95
+ }
96
+ export type ISearchWorkspaceResponse = IPaginationResponse<IWorkspaceSampleDetails>;
97
+ export type ICreateWorkspaceRequest = IWorkspaceRequest;
98
+ export type IUpdateWorkspaceRequest = IWorkspaceRequest;
99
+ export type ICreateWorkspaceResponse = IWorkspaceWithUploadConfig;
100
+ export type IUpdateWorkspaceResponse = IWorkspaceWithUploadConfig;
101
+ export type IGetWorkspaceResponse = IWorkspaceResponse;
102
+ export interface IDeleteWorkspaceResponse {
103
+ message?: string;
104
+ }
105
+ //# sourceMappingURL=workspace.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace.types.d.ts","sourceRoot":"","sources":["../../types/workspace.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE/C;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAAG,QAAQ,GAAG,UAAU,GAAG,uBAAuB,CAAC;AAE/F;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC,IAAI,EAAE,MAAM,CAAC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AAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,iBAAiB,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAGD,MAAM,MAAM,wBAAwB,GAAG,mBAAmB,CAAC,uBAAuB,CAAC,CAAC;AACpF,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,CAAC;AACxD,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,CAAC;AACxD,MAAM,MAAM,wBAAwB,GAAG,0BAA0B,CAAC;AAClE,MAAM,MAAM,wBAAwB,GAAG,0BAA0B,CAAC;AAClE,MAAM,MAAM,qBAAqB,GAAG,kBAAkB,CAAC;AACvD,MAAM,WAAW,wBAAwB;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ /**
3
+ * Social Publisher Workspace Types for Posty5 N8N Nodes
4
+ * Type definitions for Social Publisher Workspace operations
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ //# sourceMappingURL=workspace.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace.types.js","sourceRoot":"","sources":["../../types/workspace.types.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Posty5 API Helper Functions
3
+ * Utility functions for making API requests using n8n's native HTTP helpers
4
+ */
5
+ import { IExecuteFunctions } from 'n8n-workflow';
6
+ export interface IApiRequestOptions {
7
+ method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
8
+ endpoint: string;
9
+ body?: any;
10
+ qs?: any;
11
+ }
12
+ /**
13
+ * Make an API request to Posty5 API using n8n's HTTP request helper
14
+ * @param context - N8n execution context
15
+ * @param apiKey - Posty5 API key
16
+ * @param options - Request options
17
+ * @returns API response
18
+ */
19
+ export declare function makeApiRequest(this: IExecuteFunctions, apiKey: string, options: IApiRequestOptions): Promise<any>;
20
+ /**
21
+ * Make a paginated list request
22
+ * @param context - N8n execution context
23
+ * @param apiKey - Posty5 API key
24
+ * @param endpoint - API endpoint
25
+ * @param filters - Filter parameters
26
+ * @param pagination - Pagination parameters
27
+ * @returns Paginated response
28
+ */
29
+ export declare function makePaginatedRequest(this: IExecuteFunctions, apiKey: string, endpoint: string, filters?: any, pagination?: {
30
+ page?: number;
31
+ pageSize?: number;
32
+ }): Promise<any>;
33
+ /**
34
+ * Upload file to a pre-signed URL (direct upload to cloud storage)
35
+ * @param uploadUrl - Pre-signed URL to upload to
36
+ * @param fileBuffer - File buffer to upload
37
+ * @returns Upload result
38
+ */
39
+ export declare function uploadFile(this: IExecuteFunctions, uploadUrl: string, fileBuffer: Buffer): Promise<any>;
40
+ //# sourceMappingURL=api.helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.helpers.d.ts","sourceRoot":"","sources":["../../utils/api.helpers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAuB,MAAM,cAAc,CAAC;AAGtE,MAAM,WAAW,kBAAkB;IAClC,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;IACpD,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,EAAE,CAAC,EAAE,GAAG,CAAC;CACT;AAED;;;;;;GAMG;AACH,wBAAsB,cAAc,CACnC,IAAI,EAAE,iBAAiB,EACvB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,kBAAkB,GACzB,OAAO,CAAC,GAAG,CAAC,CA4Cd;AAED;;;;;;;;GAQG;AACH,wBAAsB,oBAAoB,CACzC,IAAI,EAAE,iBAAiB,EACvB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,GAAQ,EACjB,UAAU,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAO,GACnD,OAAO,CAAC,GAAG,CAAC,CASd;AAED;;;;;GAKG;AACH,wBAAsB,UAAU,CAC/B,IAAI,EAAE,iBAAiB,EACvB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,GAChB,OAAO,CAAC,GAAG,CAAC,CAkBd"}
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+ /**
3
+ * Posty5 API Helper Functions
4
+ * Utility functions for making API requests using n8n's native HTTP helpers
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.makeApiRequest = makeApiRequest;
8
+ exports.makePaginatedRequest = makePaginatedRequest;
9
+ exports.uploadFile = uploadFile;
10
+ const constants_1 = require("./constants");
11
+ /**
12
+ * Make an API request to Posty5 API using n8n's HTTP request helper
13
+ * @param context - N8n execution context
14
+ * @param apiKey - Posty5 API key
15
+ * @param options - Request options
16
+ * @returns API response
17
+ */
18
+ async function makeApiRequest(apiKey, options) {
19
+ const baseUrl = process.env.POSTY5_BASE_URL || constants_1.POSTY5_API_BASE_URL;
20
+ const requestOptions = {
21
+ method: options.method,
22
+ url: `${baseUrl}${options.endpoint}`,
23
+ headers: {
24
+ 'X-API-Key': apiKey,
25
+ 'Content-Type': 'application/json',
26
+ },
27
+ json: true,
28
+ };
29
+ if (options.body) {
30
+ requestOptions.body = options.body;
31
+ }
32
+ // Add createdFrom to all POST request bodies
33
+ if (options.method === 'POST') {
34
+ requestOptions.body = { ...requestOptions.body, createdFrom: 'n8n' };
35
+ }
36
+ if (options.qs) {
37
+ requestOptions.qs = options.qs;
38
+ }
39
+ try {
40
+ const response = await this.helpers.httpRequest(requestOptions);
41
+ // Handle standard Posty5 API response format
42
+ if (response && typeof response === 'object') {
43
+ // API returns { success, result, message } format
44
+ if ('result' in response) {
45
+ return response.result;
46
+ }
47
+ return response;
48
+ }
49
+ return response;
50
+ }
51
+ catch (error) {
52
+ // Enhance error message with API details
53
+ const errorMessage = error.response?.body?.message || error.message || 'Unknown error';
54
+ throw new Error(`Posty5 API Error: ${errorMessage}`);
55
+ }
56
+ }
57
+ /**
58
+ * Make a paginated list request
59
+ * @param context - N8n execution context
60
+ * @param apiKey - Posty5 API key
61
+ * @param endpoint - API endpoint
62
+ * @param filters - Filter parameters
63
+ * @param pagination - Pagination parameters
64
+ * @returns Paginated response
65
+ */
66
+ async function makePaginatedRequest(apiKey, endpoint, filters = {}, pagination = {}) {
67
+ return makeApiRequest.call(this, apiKey, {
68
+ method: 'GET',
69
+ endpoint,
70
+ qs: {
71
+ ...filters,
72
+ ...pagination,
73
+ },
74
+ });
75
+ }
76
+ /**
77
+ * Upload file to a pre-signed URL (direct upload to cloud storage)
78
+ * @param uploadUrl - Pre-signed URL to upload to
79
+ * @param fileBuffer - File buffer to upload
80
+ * @returns Upload result
81
+ */
82
+ async function uploadFile(uploadUrl, fileBuffer) {
83
+ const requestOptions = {
84
+ method: 'PUT',
85
+ url: uploadUrl,
86
+ body: fileBuffer,
87
+ headers: {
88
+ 'Content-Type': 'application/octet-stream',
89
+ },
90
+ returnFullResponse: true,
91
+ };
92
+ try {
93
+ const response = await this.helpers.httpRequest(requestOptions);
94
+ return response;
95
+ }
96
+ catch (error) {
97
+ const errorMessage = error.response?.body?.message || error.message || 'Unknown error';
98
+ throw new Error(`File Upload Error: ${errorMessage}`);
99
+ }
100
+ }
101
+ //# sourceMappingURL=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0,0 +1,22 @@
1
+ /**
2
+ * Posty5 API Constants
3
+ * Central location for all API-related constants
4
+ */
5
+ export declare const POSTY5_API_BASE_URL = "https://api.posty5.com";
6
+ export declare const API_ENDPOINTS: {
7
+ readonly SHORT_LINK: "/api/short-link";
8
+ readonly QR_CODE: "/api/qr-code";
9
+ readonly HTML_HOSTING: "/api/html-hosting";
10
+ readonly FORM_SUBMISSION: "/api/html-hosting-form-submission";
11
+ readonly SOCIAL_PUBLISHER_WORKSPACE: "/api/social-publisher-workspace";
12
+ readonly SOCIAL_PUBLISHER_POST: "/api/social-publisher-post";
13
+ };
14
+ export declare const DEFAULT_PAGINATION: {
15
+ readonly page: 1;
16
+ readonly pageSize: 50;
17
+ };
18
+ export declare const API_TIMEOUTS: {
19
+ readonly DEFAULT: 30000;
20
+ readonly UPLOAD: 120000;
21
+ };
22
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../utils/constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,mBAAmB,2BAA2B,CAAC;AAE5D,eAAO,MAAM,aAAa;;;;;;;CAOhB,CAAC;AAEX,eAAO,MAAM,kBAAkB;;;CAGrB,CAAC;AAEX,eAAO,MAAM,YAAY;;;CAGf,CAAC"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ /**
3
+ * Posty5 API Constants
4
+ * Central location for all API-related constants
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.API_TIMEOUTS = exports.DEFAULT_PAGINATION = exports.API_ENDPOINTS = exports.POSTY5_API_BASE_URL = void 0;
8
+ exports.POSTY5_API_BASE_URL = 'https://api.posty5.com';
9
+ exports.API_ENDPOINTS = {
10
+ SHORT_LINK: '/api/short-link',
11
+ QR_CODE: '/api/qr-code',
12
+ HTML_HOSTING: '/api/html-hosting',
13
+ FORM_SUBMISSION: '/api/html-hosting-form-submission',
14
+ SOCIAL_PUBLISHER_WORKSPACE: '/api/social-publisher-workspace',
15
+ SOCIAL_PUBLISHER_POST: '/api/social-publisher-post',
16
+ };
17
+ exports.DEFAULT_PAGINATION = {
18
+ page: 1,
19
+ pageSize: 50,
20
+ };
21
+ exports.API_TIMEOUTS = {
22
+ DEFAULT: 30000, // 30 seconds
23
+ UPLOAD: 120000, // 2 minutes for uploads
24
+ };
25
+ //# sourceMappingURL=constants.js.map