@posty5/n8n-nodes-posty5 4.2.0 → 5.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.
- package/README.md +364 -16
- package/dist/credentials/Posty5Api.credentials.d.ts +4 -0
- package/dist/credentials/Posty5Api.credentials.d.ts.map +1 -1
- package/dist/credentials/Posty5Api.credentials.js +30 -4
- package/dist/credentials/Posty5Api.credentials.js.map +1 -1
- package/dist/nodes/Posty5FormSubmission/Posty5FormSubmission.node.d.ts.map +1 -1
- package/dist/nodes/Posty5FormSubmission/Posty5FormSubmission.node.js +6 -2
- package/dist/nodes/Posty5FormSubmission/Posty5FormSubmission.node.js.map +1 -1
- package/dist/nodes/Posty5HtmlHosting/Posty5HtmlHosting.node.d.ts.map +1 -1
- package/dist/nodes/Posty5HtmlHosting/Posty5HtmlHosting.node.js +14 -3
- package/dist/nodes/Posty5HtmlHosting/Posty5HtmlHosting.node.js.map +1 -1
- package/dist/nodes/Posty5QrCode/Posty5QrCode.node.d.ts +8 -0
- package/dist/nodes/Posty5QrCode/Posty5QrCode.node.d.ts.map +1 -1
- package/dist/nodes/Posty5QrCode/Posty5QrCode.node.js +885 -190
- package/dist/nodes/Posty5QrCode/Posty5QrCode.node.js.map +1 -1
- package/dist/nodes/Posty5QrCode/helpers.d.ts +12 -0
- package/dist/nodes/Posty5QrCode/helpers.d.ts.map +1 -0
- package/dist/nodes/Posty5QrCode/helpers.js +56 -0
- package/dist/nodes/Posty5QrCode/helpers.js.map +1 -0
- package/dist/nodes/Posty5ShortLink/Posty5ShortLink.node.d.ts +8 -0
- package/dist/nodes/Posty5ShortLink/Posty5ShortLink.node.d.ts.map +1 -1
- package/dist/nodes/Posty5ShortLink/Posty5ShortLink.node.js +389 -78
- package/dist/nodes/Posty5ShortLink/Posty5ShortLink.node.js.map +1 -1
- package/dist/nodes/Posty5ShortLink/helpers.d.ts +12 -0
- package/dist/nodes/Posty5ShortLink/helpers.d.ts.map +1 -0
- package/dist/nodes/Posty5ShortLink/helpers.js +46 -0
- package/dist/nodes/Posty5ShortLink/helpers.js.map +1 -0
- package/dist/nodes/Posty5SocialPublisherPost/Posty5SocialPublisherPost.node.d.ts.map +1 -1
- package/dist/nodes/Posty5SocialPublisherPost/Posty5SocialPublisherPost.node.js +143 -52
- package/dist/nodes/Posty5SocialPublisherPost/Posty5SocialPublisherPost.node.js.map +1 -1
- package/dist/nodes/Posty5Store/Posty5Store.node.d.ts +17 -0
- package/dist/nodes/Posty5Store/Posty5Store.node.d.ts.map +1 -0
- package/dist/nodes/Posty5Store/Posty5Store.node.js +230 -0
- package/dist/nodes/Posty5Store/Posty5Store.node.js.map +1 -0
- package/dist/nodes/Posty5Store/descriptions/fulfilment-group.description.d.ts +4 -0
- package/dist/nodes/Posty5Store/descriptions/fulfilment-group.description.d.ts.map +1 -0
- package/dist/nodes/Posty5Store/descriptions/fulfilment-group.description.js +55 -0
- package/dist/nodes/Posty5Store/descriptions/fulfilment-group.description.js.map +1 -0
- package/dist/nodes/Posty5Store/descriptions/order.description.d.ts +4 -0
- package/dist/nodes/Posty5Store/descriptions/order.description.d.ts.map +1 -0
- package/dist/nodes/Posty5Store/descriptions/order.description.js +91 -0
- package/dist/nodes/Posty5Store/descriptions/order.description.js.map +1 -0
- package/dist/nodes/Posty5Store/descriptions/product-link.description.d.ts +4 -0
- package/dist/nodes/Posty5Store/descriptions/product-link.description.d.ts.map +1 -0
- package/dist/nodes/Posty5Store/descriptions/product-link.description.js +48 -0
- package/dist/nodes/Posty5Store/descriptions/product-link.description.js.map +1 -0
- package/dist/nodes/Posty5Store/descriptions/supplier-order.description.d.ts +4 -0
- package/dist/nodes/Posty5Store/descriptions/supplier-order.description.d.ts.map +1 -0
- package/dist/nodes/Posty5Store/descriptions/supplier-order.description.js +118 -0
- package/dist/nodes/Posty5Store/descriptions/supplier-order.description.js.map +1 -0
- package/dist/nodes/Posty5Store/descriptions/supplier-product.description.d.ts +4 -0
- package/dist/nodes/Posty5Store/descriptions/supplier-product.description.d.ts.map +1 -0
- package/dist/nodes/Posty5Store/descriptions/supplier-product.description.js +167 -0
- package/dist/nodes/Posty5Store/descriptions/supplier-product.description.js.map +1 -0
- package/dist/nodes/Posty5Store/descriptions/supplier.description.d.ts +4 -0
- package/dist/nodes/Posty5Store/descriptions/supplier.description.d.ts.map +1 -0
- package/dist/nodes/Posty5Store/descriptions/supplier.description.js +50 -0
- package/dist/nodes/Posty5Store/descriptions/supplier.description.js.map +1 -0
- package/dist/nodes/Posty5Trigger/Posty5Trigger.node.d.ts +13 -0
- package/dist/nodes/Posty5Trigger/Posty5Trigger.node.d.ts.map +1 -0
- package/dist/nodes/Posty5Trigger/Posty5Trigger.node.js +171 -0
- package/dist/nodes/Posty5Trigger/Posty5Trigger.node.js.map +1 -0
- package/dist/nodes/Posty5Trigger/config.d.ts +51 -0
- package/dist/nodes/Posty5Trigger/config.d.ts.map +1 -0
- package/dist/nodes/Posty5Trigger/config.js +76 -0
- package/dist/nodes/Posty5Trigger/config.js.map +1 -0
- package/dist/nodes/Posty5Trigger/descriptions.d.ts +4 -0
- package/dist/nodes/Posty5Trigger/descriptions.d.ts.map +1 -0
- package/dist/nodes/Posty5Trigger/descriptions.js +99 -0
- package/dist/nodes/Posty5Trigger/descriptions.js.map +1 -0
- package/dist/nodes/Posty5Trigger/helpers.d.ts +34 -0
- package/dist/nodes/Posty5Trigger/helpers.d.ts.map +1 -0
- package/dist/nodes/Posty5Trigger/helpers.js +139 -0
- package/dist/nodes/Posty5Trigger/helpers.js.map +1 -0
- package/dist/package.json +78 -0
- package/dist/types/common.d.ts +70 -0
- package/dist/types/common.d.ts.map +1 -1
- package/dist/types/link-analytics.types.d.ts +147 -0
- package/dist/types/link-analytics.types.d.ts.map +1 -0
- package/dist/types/link-analytics.types.js +10 -0
- package/dist/types/link-analytics.types.js.map +1 -0
- package/dist/types/link-bulk.types.d.ts +68 -0
- package/dist/types/link-bulk.types.d.ts.map +1 -0
- package/dist/types/link-bulk.types.js +8 -0
- package/dist/types/link-bulk.types.js.map +1 -0
- package/dist/types/qr-code.types.d.ts +252 -56
- package/dist/types/qr-code.types.d.ts.map +1 -1
- package/dist/types/short-link-controls.types.d.ts +82 -0
- package/dist/types/short-link-controls.types.d.ts.map +1 -0
- package/dist/types/short-link-controls.types.js +7 -0
- package/dist/types/short-link-controls.types.js.map +1 -0
- package/dist/types/short-link.types.d.ts +63 -15
- package/dist/types/short-link.types.d.ts.map +1 -1
- package/dist/types/store.types.d.ts +71 -0
- package/dist/types/store.types.d.ts.map +1 -0
- package/dist/types/store.types.js +7 -0
- package/dist/types/store.types.js.map +1 -0
- package/dist/types/webhook.types.d.ts +66 -0
- package/dist/types/webhook.types.d.ts.map +1 -0
- package/dist/types/webhook.types.js +7 -0
- package/dist/types/webhook.types.js.map +1 -0
- package/dist/utils/analytics.helpers.d.ts +68 -0
- package/dist/utils/analytics.helpers.d.ts.map +1 -0
- package/dist/utils/analytics.helpers.js +202 -0
- package/dist/utils/analytics.helpers.js.map +1 -0
- package/dist/utils/analytics.properties.d.ts +10 -0
- package/dist/utils/analytics.properties.d.ts.map +1 -0
- package/dist/utils/analytics.properties.js +172 -0
- package/dist/utils/analytics.properties.js.map +1 -0
- package/dist/utils/api.helpers.d.ts +50 -3
- package/dist/utils/api.helpers.d.ts.map +1 -1
- package/dist/utils/api.helpers.js +170 -7
- package/dist/utils/api.helpers.js.map +1 -1
- package/dist/utils/constants.d.ts +239 -0
- package/dist/utils/constants.d.ts.map +1 -1
- package/dist/utils/constants.js +260 -1
- package/dist/utils/constants.js.map +1 -1
- package/dist/utils/date.helpers.d.ts +25 -0
- package/dist/utils/date.helpers.d.ts.map +1 -0
- package/dist/utils/date.helpers.js +65 -0
- package/dist/utils/date.helpers.js.map +1 -0
- package/dist/utils/link-bulk.helpers.d.ts +26 -0
- package/dist/utils/link-bulk.helpers.d.ts.map +1 -0
- package/dist/utils/link-bulk.helpers.js +135 -0
- package/dist/utils/link-bulk.helpers.js.map +1 -0
- package/dist/utils/link-bulk.properties.d.ts +9 -0
- package/dist/utils/link-bulk.properties.d.ts.map +1 -0
- package/dist/utils/link-bulk.properties.js +113 -0
- package/dist/utils/link-bulk.properties.js.map +1 -0
- package/dist/utils/link-tool.helpers.d.ts +43 -0
- package/dist/utils/link-tool.helpers.d.ts.map +1 -0
- package/dist/utils/link-tool.helpers.js +121 -0
- package/dist/utils/link-tool.helpers.js.map +1 -0
- package/dist/utils/post-comments.d.ts +43 -0
- package/dist/utils/post-comments.d.ts.map +1 -0
- package/dist/utils/post-comments.js +53 -0
- package/dist/utils/post-comments.js.map +1 -0
- package/dist/utils/qr-content.config.d.ts +66 -0
- package/dist/utils/qr-content.config.d.ts.map +1 -0
- package/dist/utils/qr-content.config.js +139 -0
- package/dist/utils/qr-content.config.js.map +1 -0
- package/dist/utils/qr-file.helpers.d.ts +22 -0
- package/dist/utils/qr-file.helpers.d.ts.map +1 -0
- package/dist/utils/qr-file.helpers.js +63 -0
- package/dist/utils/qr-file.helpers.js.map +1 -0
- package/dist/utils/qr-render.helpers.d.ts +48 -0
- package/dist/utils/qr-render.helpers.d.ts.map +1 -0
- package/dist/utils/qr-render.helpers.js +172 -0
- package/dist/utils/qr-render.helpers.js.map +1 -0
- package/dist/utils/qr-render.properties.d.ts +8 -0
- package/dist/utils/qr-render.properties.d.ts.map +1 -0
- package/dist/utils/qr-render.properties.js +143 -0
- package/dist/utils/qr-render.properties.js.map +1 -0
- package/dist/utils/qr-target.helpers.d.ts +35 -0
- package/dist/utils/qr-target.helpers.d.ts.map +1 -0
- package/dist/utils/qr-target.helpers.js +260 -0
- package/dist/utils/qr-target.helpers.js.map +1 -0
- package/dist/utils/qr-templates.helpers.d.ts +26 -0
- package/dist/utils/qr-templates.helpers.d.ts.map +1 -0
- package/dist/utils/qr-templates.helpers.js +70 -0
- package/dist/utils/qr-templates.helpers.js.map +1 -0
- package/dist/utils/short-link-controls.helpers.d.ts +31 -0
- package/dist/utils/short-link-controls.helpers.d.ts.map +1 -0
- package/dist/utils/short-link-controls.helpers.js +185 -0
- package/dist/utils/short-link-controls.helpers.js.map +1 -0
- package/dist/utils/short-link-controls.properties.d.ts +17 -0
- package/dist/utils/short-link-controls.properties.d.ts.map +1 -0
- package/dist/utils/short-link-controls.properties.js +315 -0
- package/dist/utils/short-link-controls.properties.js.map +1 -0
- package/dist/utils/store.helpers.d.ts +43 -0
- package/dist/utils/store.helpers.d.ts.map +1 -0
- package/dist/utils/store.helpers.js +87 -0
- package/dist/utils/store.helpers.js.map +1 -0
- package/dist/utils/versioned-write.helpers.d.ts +31 -0
- package/dist/utils/versioned-write.helpers.d.ts.map +1 -0
- package/dist/utils/versioned-write.helpers.js +120 -0
- package/dist/utils/versioned-write.helpers.js.map +1 -0
- package/package.json +7 -3
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Short link controls (access, routing, variants, UTM, pixels, tags, campaign,
|
|
3
|
+
* health) as the node reads them from its parameters and sends them to the API.
|
|
4
|
+
*/
|
|
5
|
+
import type { LINK_CAMPAIGN_COLORS, LINK_PIXEL_PROVIDERS } from '../utils/constants';
|
|
6
|
+
export type LinkPixelProviderType = (typeof LINK_PIXEL_PROVIDERS)[number];
|
|
7
|
+
export type LinkCampaignColorType = (typeof LINK_CAMPAIGN_COLORS)[number];
|
|
8
|
+
/** The control fields of the Create / Update Additional Fields and of Set Rules' Rules. */
|
|
9
|
+
export interface IShortLinkControlFields {
|
|
10
|
+
tags?: string;
|
|
11
|
+
campaignId?: string;
|
|
12
|
+
activeFrom?: string;
|
|
13
|
+
expiresAt?: string;
|
|
14
|
+
maxVisits?: number;
|
|
15
|
+
fallbackUrl?: string;
|
|
16
|
+
password?: string;
|
|
17
|
+
removePassword?: boolean;
|
|
18
|
+
utm?: {
|
|
19
|
+
values?: IShortLinkUtm;
|
|
20
|
+
};
|
|
21
|
+
routingRules?: string | unknown[];
|
|
22
|
+
variants?: string | unknown[];
|
|
23
|
+
pixels?: {
|
|
24
|
+
pixel?: IShortLinkPixel[];
|
|
25
|
+
};
|
|
26
|
+
pixelsConsentAcknowledged?: boolean;
|
|
27
|
+
healthMonitor?: boolean;
|
|
28
|
+
}
|
|
29
|
+
export interface IShortLinkUtm {
|
|
30
|
+
source?: string | null;
|
|
31
|
+
medium?: string | null;
|
|
32
|
+
campaign?: string | null;
|
|
33
|
+
term?: string | null;
|
|
34
|
+
content?: string | null;
|
|
35
|
+
}
|
|
36
|
+
export interface IShortLinkPixel {
|
|
37
|
+
provider: LinkPixelProviderType;
|
|
38
|
+
id: string;
|
|
39
|
+
}
|
|
40
|
+
export interface IShortLinkAccess {
|
|
41
|
+
activeFrom?: string | null;
|
|
42
|
+
expiresAt?: string | null;
|
|
43
|
+
maxVisits?: number | null;
|
|
44
|
+
fallbackUrl?: string | null;
|
|
45
|
+
password?: string | null;
|
|
46
|
+
}
|
|
47
|
+
/** The control keys of a create / update body. */
|
|
48
|
+
export interface IShortLinkControlBody {
|
|
49
|
+
tags?: string[];
|
|
50
|
+
campaignId?: string | null;
|
|
51
|
+
access?: IShortLinkAccess;
|
|
52
|
+
utm?: IShortLinkUtm | null;
|
|
53
|
+
routing?: unknown[] | null;
|
|
54
|
+
variants?: unknown[] | null;
|
|
55
|
+
pixels?: IShortLinkPixel[] | null;
|
|
56
|
+
pixelsConsentAcknowledged?: boolean;
|
|
57
|
+
health?: {
|
|
58
|
+
enabled: boolean;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
/** Campaign operations' fields. */
|
|
62
|
+
export interface ILinkCampaignFields {
|
|
63
|
+
description?: string;
|
|
64
|
+
color?: LinkCampaignColorType | '';
|
|
65
|
+
utm?: {
|
|
66
|
+
values?: IShortLinkUtm;
|
|
67
|
+
};
|
|
68
|
+
archived?: boolean;
|
|
69
|
+
}
|
|
70
|
+
export interface ILinkCampaignBody {
|
|
71
|
+
name?: string;
|
|
72
|
+
description?: string | null;
|
|
73
|
+
color?: LinkCampaignColorType | null;
|
|
74
|
+
utm?: IShortLinkUtm | null;
|
|
75
|
+
archived?: boolean;
|
|
76
|
+
}
|
|
77
|
+
export interface ILinkCampaignLookupItem {
|
|
78
|
+
_id: string;
|
|
79
|
+
name: string;
|
|
80
|
+
archived?: boolean;
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=short-link-controls.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"short-link-controls.types.d.ts","sourceRoot":"","sources":["../../types/short-link-controls.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAErF,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAC1E,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1E,2FAA2F;AAC3F,MAAM,WAAW,uBAAuB;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,GAAG,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,aAAa,CAAA;KAAE,CAAC;IACjC,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,EAAE,CAAC;IAClC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,EAAE,CAAC;IAC9B,MAAM,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,eAAe,EAAE,CAAA;KAAE,CAAC;IACvC,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,aAAa,CAAC,EAAE,O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;IACrB,KAAK,CAAC,EAAE,qBAAqB,GAAG,EAAE,CAAC;IACnC,GAAG,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,aAAa,CAAA;KAAE,CAAC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,KAAK,CAAC,EAAE,qBAAqB,GAAG,IAAI,CAAC;IACrC,GAAG,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,uBAAuB;IACvC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Short link controls (access, routing, variants, UTM, pixels, tags, campaign,
|
|
4
|
+
* health) as the node reads them from its parameters and sends them to the API.
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
//# sourceMappingURL=short-link-controls.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"short-link-controls.types.js","sourceRoot":"","sources":["../../types/short-link-controls.types.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
|
|
@@ -2,7 +2,36 @@
|
|
|
2
2
|
* Short Link Types for Posty5 N8N Nodes
|
|
3
3
|
* Type definitions for Short Link operations
|
|
4
4
|
*/
|
|
5
|
-
import { IPaginationResponse } from './common';
|
|
5
|
+
import { ILinkToolAdditionalFields, IPaginationResponse } from './common';
|
|
6
|
+
import type { IShortLinkControlBody, IShortLinkControlFields } from './short-link-controls.types';
|
|
7
|
+
/**
|
|
8
|
+
* The Short Link node's Additional Fields: the shared ones plus the device
|
|
9
|
+
* destinations and, on Update, a new destination URL.
|
|
10
|
+
*/
|
|
11
|
+
export interface IShortLinkAdditionalFields extends ILinkToolAdditionalFields, IShortLinkControlFields {
|
|
12
|
+
/** Update only: a new destination. Left out, the stored one is sent. */
|
|
13
|
+
baseUrl?: string;
|
|
14
|
+
androidUrl?: string;
|
|
15
|
+
iosUrl?: string;
|
|
16
|
+
}
|
|
17
|
+
/** The Short Link node's List filters. */
|
|
18
|
+
export interface IShortLinkListFilters {
|
|
19
|
+
tag?: string;
|
|
20
|
+
/** Comma-separated. */
|
|
21
|
+
tags?: string;
|
|
22
|
+
campaignId?: string;
|
|
23
|
+
refId?: string;
|
|
24
|
+
/** Matched against the name only. */
|
|
25
|
+
search?: string;
|
|
26
|
+
/** "Destination URL Contains". */
|
|
27
|
+
baseUrl?: string;
|
|
28
|
+
isEnableLandingPage?: boolean;
|
|
29
|
+
}
|
|
30
|
+
/** The device destinations the node sends (only the keys it decided to send). */
|
|
31
|
+
export interface IShortLinkDeepLinks {
|
|
32
|
+
androidUrl?: string;
|
|
33
|
+
iosUrl?: string;
|
|
34
|
+
}
|
|
6
35
|
/**
|
|
7
36
|
* Short link status type
|
|
8
37
|
*/
|
|
@@ -36,8 +65,11 @@ export interface IShortLinkMetaData {
|
|
|
36
65
|
* Page info response
|
|
37
66
|
*/
|
|
38
67
|
export interface IPageInfoResponse {
|
|
39
|
-
title?: string;
|
|
40
|
-
description?: string;
|
|
68
|
+
title?: string | null;
|
|
69
|
+
description?: string | null;
|
|
70
|
+
descriptionIsHtmlFile?: boolean | null;
|
|
71
|
+
/** Read-only (taken from the target page); the update schema refuses it. */
|
|
72
|
+
image?: string | null;
|
|
41
73
|
}
|
|
42
74
|
/**
|
|
43
75
|
* Short link response interface
|
|
@@ -59,7 +91,6 @@ export interface IShortLinkResponse {
|
|
|
59
91
|
templateId?: string;
|
|
60
92
|
qrCodeTemplateName?: string;
|
|
61
93
|
isEnableLandingPage?: boolean;
|
|
62
|
-
isEnableMonetization?: boolean;
|
|
63
94
|
pageInfo?: IPageInfoResponse;
|
|
64
95
|
qrCodeLandingPageURL: string;
|
|
65
96
|
qrCodeDownloadURL: string;
|
|
@@ -82,6 +113,7 @@ export interface IShortLinkFullDetailsResponse extends IShortLinkResponse {
|
|
|
82
113
|
isSupportAndroidDeepUrl?: boolean;
|
|
83
114
|
isForDeepLink?: boolean;
|
|
84
115
|
createdFrom?: string;
|
|
116
|
+
subCategory?: number | null;
|
|
85
117
|
previewReasons?: IPreviewReason[];
|
|
86
118
|
}
|
|
87
119
|
/**
|
|
@@ -100,34 +132,47 @@ export interface IPageInfo {
|
|
|
100
132
|
descriptionIsHtmlFile?: boolean;
|
|
101
133
|
}
|
|
102
134
|
/**
|
|
103
|
-
* Create short link request
|
|
135
|
+
* Create short link request (`POST /api/short-link`)
|
|
104
136
|
*/
|
|
105
|
-
export interface ICreateShortLinkRequest {
|
|
137
|
+
export interface ICreateShortLinkRequest extends IShortLinkControlBody {
|
|
106
138
|
name?: string | null;
|
|
107
139
|
baseUrl: string;
|
|
108
140
|
refId?: string | null;
|
|
109
141
|
tag?: string | null;
|
|
110
|
-
|
|
142
|
+
/** Required for every API-key call; the node refuses to send a create without it. */
|
|
143
|
+
templateId: string;
|
|
111
144
|
customLandingId?: string | null;
|
|
112
|
-
|
|
145
|
+
isEnableLandingPage?: boolean | null;
|
|
113
146
|
pageInfo?: IPageInfo;
|
|
147
|
+
/** An http(s) link or an app link; left out, the target page's own deep link is used. */
|
|
148
|
+
androidUrl?: string | null;
|
|
149
|
+
iosUrl?: string | null;
|
|
114
150
|
}
|
|
115
151
|
/**
|
|
116
|
-
* Update short link request
|
|
152
|
+
* Update short link request (`PUT /api/short-link/:id`). The API replaces the
|
|
153
|
+
* record with this body, so the node sends the stored value of everything the
|
|
154
|
+
* user did not change. It never carries `customLandingId`: the API refuses it on
|
|
155
|
+
* update.
|
|
117
156
|
*/
|
|
118
|
-
export interface IUpdateShortLinkRequest {
|
|
157
|
+
export interface IUpdateShortLinkRequest extends IShortLinkControlBody {
|
|
119
158
|
name?: string | null;
|
|
120
159
|
baseUrl: string;
|
|
121
160
|
refId?: string | null;
|
|
122
161
|
tag?: string | null;
|
|
123
|
-
|
|
162
|
+
/** Required for every API-key call; the node falls back to the stored one. */
|
|
163
|
+
templateId: string;
|
|
124
164
|
templateType?: string | null;
|
|
125
|
-
recaptcha?: string | null;
|
|
126
165
|
isEnableLandingPage?: boolean | null;
|
|
127
|
-
isEnableMonetization?: boolean | null;
|
|
128
166
|
pageInfo?: IPageInfo;
|
|
129
167
|
subCategory?: number | null;
|
|
130
168
|
createdFrom?: string | null;
|
|
169
|
+
/**
|
|
170
|
+
* Sent only when the user set it, so the API decides the rest: present means
|
|
171
|
+
* that value (`""` clears it); absent keeps the stored one, or re-reads the
|
|
172
|
+
* new target page's deep link when `baseUrl` changed.
|
|
173
|
+
*/
|
|
174
|
+
androidUrl?: string | null;
|
|
175
|
+
iosUrl?: string | null;
|
|
131
176
|
}
|
|
132
177
|
/**
|
|
133
178
|
* List parameters for filtering
|
|
@@ -135,15 +180,18 @@ export interface IUpdateShortLinkRequest {
|
|
|
135
180
|
export interface IListParams {
|
|
136
181
|
baseUrl?: string;
|
|
137
182
|
name?: string;
|
|
138
|
-
'
|
|
183
|
+
'pageInfo.title'?: string;
|
|
139
184
|
createdFrom?: string;
|
|
140
185
|
shortLinkId?: string;
|
|
141
186
|
refId?: string;
|
|
142
187
|
tag?: string;
|
|
188
|
+
/** Comma-joined tags. */
|
|
189
|
+
tags?: string;
|
|
190
|
+
campaignId?: string;
|
|
143
191
|
templateId?: string;
|
|
144
192
|
status?: string;
|
|
145
193
|
isForDeepLink?: boolean;
|
|
146
|
-
|
|
194
|
+
isEnableLandingPage?: boolean;
|
|
147
195
|
}
|
|
148
196
|
export type ISearchShortLinkResponse = IPaginationResponse<IShortLinkResponse>;
|
|
149
197
|
export type ILookupShortLinkResponse = IShortLinkLookupItem[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"short-link.types.d.ts","sourceRoot":"","sources":["../../types/short-link.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"short-link.types.d.ts","sourceRoot":"","sources":["../../types/short-link.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC1E,OAAO,KAAK,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAElG;;;GAGG;AACH,MAAM,WAAW,0BAA2B,SAAQ,yBAAyB,EAAE,uBAAuB;IACrG,wEAAwE;IACxE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,0CAA0C;AAC1C,MAAM,WAAW,qBAAqB;IACrC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,uBAAuB;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kCAAkC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,iFAAiF;AACjF,MAAM,WAAW,mBAAmB;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,KAAK,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;AAE9E;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACd;AAED;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C;IACb,yBAAyB;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAGD,MAAM,MAAM,wBAAwB,GAAG,mBAAmB,CAAC,kBAAkB,CAAC,CAAC;AAC/E,MAAM,MAAM,wBAAwB,GAAG,oBAAoB,EAAE,CAAC;AAC9D,MAAM,MAAM,wBAAwB,GAAG,kBAAkB,CAAC;AAC1D,MAAM,MAAM,wBAAwB,GAAG,kBAAkB,CAAC;AAC1D,MAAM,MAAM,qBAAqB,GAAG,6BAA6B,CAAC;AAClE,MAAM,WAAW,wBAAwB;IACxC,OAAO,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Store Types for Posty5 N8N Nodes — dropshipping.
|
|
3
|
+
* The names match `@posty5/store`, so a reader of one recognises the other.
|
|
4
|
+
*/
|
|
5
|
+
export type StoreSupplierOrderStatus = 'queued' | 'needsReview' | 'submitted' | 'confirmed' | 'processing' | 'shipped' | 'delivered' | 'cancelled' | 'failed';
|
|
6
|
+
export type StoreSupplierOrderReviewReason = 'insufficientBalance' | 'variantUnavailable' | 'destinationUnsupported' | 'costAboveLimit' | 'costChanged' | 'customerPaymentPending' | 'customerPaymentNotSettled' | 'connectionUnhealthy' | 'supplierRefused' | 'connectionMissing' | 'supplierAlreadyShipped' | 'testMode' | 'customerCaptureFailed';
|
|
7
|
+
export type StoreFulfilmentGroupStatus = 'pending' | 'processing' | 'shipped' | 'delivered' | 'cancelled';
|
|
8
|
+
/** The part actions that address a part (order + part key). */
|
|
9
|
+
export type FulfilmentGroupAction = 'submit' | 'fulfil-manually';
|
|
10
|
+
/** The actions that address one supplier order by its id. */
|
|
11
|
+
export type SupplierOrderAction = 'retry' | 'pay' | 'cancel';
|
|
12
|
+
/** One supplier order, as far as the node reads it. */
|
|
13
|
+
export interface IStoreSupplierOrder {
|
|
14
|
+
_id: string;
|
|
15
|
+
orderId: string;
|
|
16
|
+
orderNumber?: string;
|
|
17
|
+
fulfilmentGroupKey: string;
|
|
18
|
+
supplierKey: string;
|
|
19
|
+
status: StoreSupplierOrderStatus;
|
|
20
|
+
reviewReason?: StoreSupplierOrderReviewReason | null;
|
|
21
|
+
reviewMessage?: string | null;
|
|
22
|
+
retryable: boolean;
|
|
23
|
+
[key: string]: unknown;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The pagination block of a cursor-paged store list — the platform's list
|
|
27
|
+
* envelope (`req.end_Searchable`), used by the orders search and the
|
|
28
|
+
* supplier-order queue alike.
|
|
29
|
+
*/
|
|
30
|
+
export interface IStoreCursorPagination {
|
|
31
|
+
nextCursor?: string | null;
|
|
32
|
+
previousCursor?: string | null;
|
|
33
|
+
hasMore?: boolean;
|
|
34
|
+
totalCount?: number;
|
|
35
|
+
pageSize?: number;
|
|
36
|
+
}
|
|
37
|
+
/** One page of a cursor-paged store list. */
|
|
38
|
+
export interface IStoreCursorPage<T> {
|
|
39
|
+
items?: T[];
|
|
40
|
+
pagination?: IStoreCursorPagination;
|
|
41
|
+
}
|
|
42
|
+
/** One part of a store order. */
|
|
43
|
+
export interface IOrderFulfilmentGroup {
|
|
44
|
+
key: string;
|
|
45
|
+
kind: 'merchant' | 'thirdParty';
|
|
46
|
+
label: string;
|
|
47
|
+
status: StoreFulfilmentGroupStatus;
|
|
48
|
+
supplierOrderId?: string;
|
|
49
|
+
shipment?: {
|
|
50
|
+
carrierName?: string;
|
|
51
|
+
trackingNumber?: string;
|
|
52
|
+
trackingUrl?: string;
|
|
53
|
+
status?: string;
|
|
54
|
+
};
|
|
55
|
+
[key: string]: unknown;
|
|
56
|
+
}
|
|
57
|
+
/** A store order as the node reads it for Split Parts. */
|
|
58
|
+
export interface IStoreOrderWithParts {
|
|
59
|
+
_id: string;
|
|
60
|
+
orderNumber?: string;
|
|
61
|
+
fulfilmentGroups?: IOrderFulfilmentGroup[];
|
|
62
|
+
supplierOrders?: IStoreSupplierOrder[];
|
|
63
|
+
[key: string]: unknown;
|
|
64
|
+
}
|
|
65
|
+
/** One output item of Split Parts: the part, with its order and supplier order attached. */
|
|
66
|
+
export interface IOrderPartItem extends IOrderFulfilmentGroup {
|
|
67
|
+
orderId: string;
|
|
68
|
+
orderNumber?: string;
|
|
69
|
+
supplierOrder: IStoreSupplierOrder | null;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=store.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.types.d.ts","sourceRoot":"","sources":["../../types/store.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,wBAAwB,GACjC,QAAQ,GACR,aAAa,GACb,WAAW,GACX,WAAW,GACX,YAAY,GACZ,SAAS,GACT,WAAW,GACX,WAAW,GACX,QAAQ,CAAC;AAEZ,MAAM,MAAM,8BAA8B,GACvC,qBAAqB,GACrB,oBAAoB,GACpB,wBAAwB,GACxB,gBAAgB,GAChB,aAAa,GACb,wBAAwB,GACxB,2BAA2B,GAC3B,qBAAqB,GACrB,iBAAiB,GACjB,mBAAmB,GACnB,wBAAwB,GACxB,UAAU,GACV,uBAAuB,CAAC;AAE3B,MAAM,MAAM,0BAA0B,GAAG,SAAS,GAAG,YAAY,GAAG,SAAS,GAAG,WAAW,GAAG,WAAW,CAAC;AAE1G,+DAA+D;AAC/D,MAAM,MAAM,qBAAqB,GAAG,QAAQ,GAAG,iBAAiB,CAAC;AAEjE,6DAA6D;AAC7D,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;AAE7D,uDAAuD;AACvD,MAAM,WAAW,mBAAmB;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAA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M,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,qBAAqB,EAAE,CAAC;IAC3C,cAAc,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACvC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACvB;AAED,4FAA4F;AAC5F,MAAM,WAAW,cAAe,SAAQ,qBAAqB;IAC5D,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,mBAAmB,GAAG,IAAI,CAAC;CAC1C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.types.js","sourceRoot":"","sources":["../../types/store.types.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Posty5 webhooks as the trigger node sees them. Mirrors the API's
|
|
3
|
+
* `shared-area/webhooks/interface.ts` and `@posty5/webhooks`.
|
|
4
|
+
*/
|
|
5
|
+
export type WebhookEventType = 'short_link.visited' | 'short_link.visits_milestone' | 'qr_code.scanned' | 'qr_code.scans_milestone' | 'webhook.test';
|
|
6
|
+
export type WebhookDeliveryMode = 'each' | 'batch';
|
|
7
|
+
export interface IWebhookTargets {
|
|
8
|
+
shortLinkIds?: string[];
|
|
9
|
+
qrCodeIds?: string[];
|
|
10
|
+
}
|
|
11
|
+
export interface IWebhookDelivery {
|
|
12
|
+
mode: WebhookDeliveryMode;
|
|
13
|
+
windowSeconds?: number;
|
|
14
|
+
}
|
|
15
|
+
/** `POST /api/webhook-endpoints` body (the helper stamps `createdFrom`). */
|
|
16
|
+
export interface ICreateWebhookEndpointRequest {
|
|
17
|
+
url: string;
|
|
18
|
+
description?: string;
|
|
19
|
+
events: WebhookEventType[];
|
|
20
|
+
targets?: IWebhookTargets;
|
|
21
|
+
includeBots: boolean;
|
|
22
|
+
milestones?: number[];
|
|
23
|
+
delivery: IWebhookDelivery;
|
|
24
|
+
}
|
|
25
|
+
/** The fields of a stored endpoint the trigger compares. */
|
|
26
|
+
export interface IWebhookEndpoint {
|
|
27
|
+
_id: string;
|
|
28
|
+
url: string;
|
|
29
|
+
events: WebhookEventType[];
|
|
30
|
+
targets?: IWebhookTargets;
|
|
31
|
+
enabled: boolean;
|
|
32
|
+
includeBots?: boolean;
|
|
33
|
+
milestones?: number[];
|
|
34
|
+
delivery?: IWebhookDelivery;
|
|
35
|
+
}
|
|
36
|
+
/** The create answer: the endpoint plus its signing secret, returned this once. */
|
|
37
|
+
export interface ICreateWebhookEndpointResponse {
|
|
38
|
+
endpoint: IWebhookEndpoint;
|
|
39
|
+
secret: string;
|
|
40
|
+
}
|
|
41
|
+
/** What the trigger keeps in the node's workflow static data. */
|
|
42
|
+
export interface IPosty5TriggerStaticData {
|
|
43
|
+
endpointId?: string;
|
|
44
|
+
secret?: string;
|
|
45
|
+
}
|
|
46
|
+
/** A delivered envelope (single event or batch). */
|
|
47
|
+
export interface IWebhookEnvelope {
|
|
48
|
+
id: string;
|
|
49
|
+
type: WebhookEventType | 'batch';
|
|
50
|
+
apiVersion?: string;
|
|
51
|
+
createdAt: string;
|
|
52
|
+
data: Record<string, unknown> & {
|
|
53
|
+
events?: IWebhookEnvelope[];
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
/** The node's *Options* collection. */
|
|
57
|
+
export interface IPosty5TriggerOptions {
|
|
58
|
+
includeBots?: boolean;
|
|
59
|
+
milestones?: string;
|
|
60
|
+
delivery?: string;
|
|
61
|
+
splitBatches?: boolean;
|
|
62
|
+
}
|
|
63
|
+
/** Why a delivery was refused (same reasons as `@posty5/webhooks`). */
|
|
64
|
+
export type WebhookVerifyFailure = 'missingHeaders' | 'timestampOutOfRange' | 'noMatchingSignature' | 'invalidJson';
|
|
65
|
+
export type WebhookHeaders = Record<string, string | string[] | undefined>;
|
|
66
|
+
//# sourceMappingURL=webhook.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|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jE,MAAM,WAAW,wBAAwB;IACxC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,oDAAoD;AACpD,MAAM,WAAW,gBAAgB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;QAAE,MAAM,CAAC,EAAE,gBAAgB,EAAE,CAAA;KAAE,CAAC;CAChE;AAED,uCAAuC;AACvC,MAAM,WAAW,qBAAqB;IACrC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,uEAAuE;AACvE,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,GAAG,qBAAqB,GAAG,qBAAqB,GAAG,aAAa,CAAC;AAEpH,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhook.types.js","sourceRoot":"","sources":["../../types/webhook.types.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* *Get Analytics* on the Short Link and QR Code nodes (contract C2).
|
|
3
|
+
*
|
|
4
|
+
* Both nodes read the same parameters and answer the same shape, so the range
|
|
5
|
+
* resolution, the query, the output shaping and the plan-gate error live here,
|
|
6
|
+
* not in either node's `execute`. The query follows the SDKs: dates as
|
|
7
|
+
* `YYYY-MM-DD`, an explicit breakdown list joined with `,`, `all` sent as is,
|
|
8
|
+
* an empty list left out (the API default applies).
|
|
9
|
+
*/
|
|
10
|
+
import type { IExecuteFunctions } from 'n8n-workflow';
|
|
11
|
+
import type { ILinkAnalyticsDateRange, ILinkAnalyticsOptions, ILinkAnalyticsParameters, ILinkAnalyticsQuery, ILinkAnalyticsResponse, ILinkAnalyticsSeriesItem, LinkAnalyticsOutput, ILinkStatisticsQuery, ILinkStatisticsResponse, LinkStatisticsPeriod } from '../types/link-analytics.types';
|
|
12
|
+
/**
|
|
13
|
+
* Runs *Get Analytics* for item `itemIndex`: reads its parameters, resolves the
|
|
14
|
+
* range, calls `GET <basePath>/<id>/analytics` and shapes the output.
|
|
15
|
+
* @param basePath `API_ENDPOINTS.SHORT_LINK` or `API_ENDPOINTS.QR_CODE`.
|
|
16
|
+
* @param id The record's ID parameter value.
|
|
17
|
+
*/
|
|
18
|
+
export declare function executeGetAnalytics(context: IExecuteFunctions, apiKey: string, basePath: string, id: unknown, itemIndex: number): Promise<ILinkAnalyticsResponse | ILinkAnalyticsSeriesItem[]>;
|
|
19
|
+
/** Reads every *Get Analytics* parameter of item `itemIndex`. */
|
|
20
|
+
export declare function getAnalyticsParameters(context: IExecuteFunctions, itemIndex: number): ILinkAnalyticsParameters;
|
|
21
|
+
/**
|
|
22
|
+
* The zone of one request: the Time Zone option, else the workflow's time zone
|
|
23
|
+
* (Workflow Settings → Timezone, which defaults to the instance's
|
|
24
|
+
* `GENERIC_TIMEZONE`), else UTC. Sent as `tz` so the API buckets days in the
|
|
25
|
+
* same zone the presets count "today" in.
|
|
26
|
+
*/
|
|
27
|
+
export declare function resolveAnalyticsTimeZone(context: IExecuteFunctions, options: ILinkAnalyticsOptions): string;
|
|
28
|
+
/**
|
|
29
|
+
* `<basePath>/<id>/analytics`, with the ID trimmed and escaped.
|
|
30
|
+
* @throws NodeOperationError when the ID is empty.
|
|
31
|
+
*/
|
|
32
|
+
export declare function buildAnalyticsEndpoint(context: IExecuteFunctions, basePath: string, id: unknown, itemIndex: number): string;
|
|
33
|
+
/**
|
|
34
|
+
* The range as two inclusive day keys. A preset ends today — counted in
|
|
35
|
+
* `parameters.timeZone` — and spans its number of days, today included
|
|
36
|
+
* (*Last 7 days* on 2026-10-05 is 2026-09-29 … 2026-10-05). *Custom* sends the
|
|
37
|
+
* From and To days as picked; the API checks their order, span and plan window.
|
|
38
|
+
* @throws NodeOperationError for an unknown time zone, or a missing or
|
|
39
|
+
* unreadable custom date.
|
|
40
|
+
*/
|
|
41
|
+
export declare function resolveAnalyticsRange(context: IExecuteFunctions, parameters: ILinkAnalyticsParameters, now: Date, itemIndex: number): ILinkAnalyticsDateRange;
|
|
42
|
+
/** The query string of one *Get Analytics* request. */
|
|
43
|
+
export declare function buildAnalyticsQuery(range: ILinkAnalyticsDateRange, parameters: ILinkAnalyticsParameters): ILinkAnalyticsQuery;
|
|
44
|
+
/**
|
|
45
|
+
* What the operation outputs for one input item: the API answer unchanged, or
|
|
46
|
+
* — *Series as Items* — one item per series point, each still carrying `meta`.
|
|
47
|
+
*/
|
|
48
|
+
export declare function toAnalyticsOutput(response: ILinkAnalyticsResponse, output: LinkAnalyticsOutput): ILinkAnalyticsResponse | ILinkAnalyticsSeriesItem[];
|
|
49
|
+
/**
|
|
50
|
+
* A failed analytics request as the node throws it. The plan-gate 403 (a
|
|
51
|
+
* breakdown or a range the owner's plan does not include, or a record the API
|
|
52
|
+
* key may not read) becomes a `NodeApiError` carrying the API's message
|
|
53
|
+
* unchanged (C4: no client hard-codes a plan); any other error is returned as is.
|
|
54
|
+
*/
|
|
55
|
+
export declare function toAnalyticsError(context: IExecuteFunctions, error: unknown, itemIndex: number): unknown;
|
|
56
|
+
/**
|
|
57
|
+
* Runs *Get Statistics* for item `itemIndex`: `GET <basePath>/statistics` with
|
|
58
|
+
* the Period (and, for Custom, From / To), returning the API answer unchanged.
|
|
59
|
+
* @param basePath `API_ENDPOINTS.SHORT_LINK` or `API_ENDPOINTS.QR_CODE`.
|
|
60
|
+
*/
|
|
61
|
+
export declare function executeGetStatistics(context: IExecuteFunctions, apiKey: string, basePath: string, itemIndex: number): Promise<ILinkStatisticsResponse>;
|
|
62
|
+
/**
|
|
63
|
+
* The *Get Statistics* query: the period, plus `from` / `to` as day keys for
|
|
64
|
+
* Custom (both required, like *Get Analytics*).
|
|
65
|
+
* @throws NodeOperationError for a missing or unreadable custom date.
|
|
66
|
+
*/
|
|
67
|
+
export declare function buildStatisticsQuery(context: IExecuteFunctions, period: LinkStatisticsPeriod, from: unknown, to: unknown, itemIndex: number): ILinkStatisticsQuery;
|
|
68
|
+
//# sourceMappingURL=analytics.helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analytics.helpers.d.ts","sourceRoot":"","sources":["../../utils/analytics.helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAc,MAAM,cAAc,CAAC;AAMlE,OAAO,KAAK,EACX,uBAAuB,EACvB,qBAAqB,EACrB,wBAAwB,EACxB,mBAAmB,EACnB,sBAAsB,EACtB,wBAAwB,EAGxB,mBAAmB,EAEnB,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,MAAM,+BAA+B,CAAC;AAEvC;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACxC,OAAO,EAAE,iBAAiB,EAC1B,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,EAAE,EAAE,OAAO,EACX,SAAS,EAAE,MAAM,GACf,OAAO,CAAC,sBAAsB,GAAG,wBAAwB,EAAE,CAAC,CAa9D;AAED,iEAAiE;AACjE,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,GAAG,wBAAwB,CAsB9G;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,qBAAqB,GAAG,MAAM,CAM3G;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACrC,OAAO,EAA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