@dyqr/sdk 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -0
- package/dist/routing-types.d.ts +37 -0
- package/dist/routing-types.js +5 -0
- package/dist/types.d.ts +3 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3,4 +3,5 @@ export { DyqrClient } from './client.js';
|
|
|
3
3
|
export type { DeepLinkTarget } from './deep-link.js';
|
|
4
4
|
export { buildDashboardDeepLink } from './deep-link.js';
|
|
5
5
|
export { DyqrApiError } from './errors.js';
|
|
6
|
+
export type { SmartRoutingCondition, SmartRoutingConditionType, SmartRoutingDevice, SmartRoutingOs, SmartRoutingRuleInput, } from './routing-types.js';
|
|
6
7
|
export type { CreateLinkInput, CreateLinkResult, DyqrLink, DyqrLinkListItem, GetLinkResult, LinkRedirectMode, ListLinksParams, ListLinksResult, QrFormat, QrImage, QrStyleInput, UpdateLinkInput, } from './types.js';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export type SmartRoutingDevice = 'mobile' | 'desktop';
|
|
2
|
+
export type SmartRoutingOs = 'ios' | 'android' | 'windows' | 'macos' | 'linux';
|
|
3
|
+
export type SmartRoutingConditionType = 'country' | 'continent' | 'regionCode' | 'device' | 'os' | 'language' | 'time' | 'clicks';
|
|
4
|
+
export type SmartRoutingCondition = {
|
|
5
|
+
type: 'country';
|
|
6
|
+
countries: string[];
|
|
7
|
+
} | {
|
|
8
|
+
type: 'continent';
|
|
9
|
+
continents: string[];
|
|
10
|
+
} | {
|
|
11
|
+
type: 'regionCode';
|
|
12
|
+
regionCodes: string[];
|
|
13
|
+
} | {
|
|
14
|
+
type: 'device';
|
|
15
|
+
devices: SmartRoutingDevice[];
|
|
16
|
+
} | {
|
|
17
|
+
type: 'os';
|
|
18
|
+
os: SmartRoutingOs[];
|
|
19
|
+
} | {
|
|
20
|
+
type: 'language';
|
|
21
|
+
languages: string[];
|
|
22
|
+
} | {
|
|
23
|
+
type: 'time';
|
|
24
|
+
timezone: string;
|
|
25
|
+
start: string;
|
|
26
|
+
end: string;
|
|
27
|
+
} | {
|
|
28
|
+
type: 'clicks';
|
|
29
|
+
min?: number;
|
|
30
|
+
max?: number;
|
|
31
|
+
};
|
|
32
|
+
export type SmartRoutingRuleInput = {
|
|
33
|
+
id?: string;
|
|
34
|
+
enabled?: boolean;
|
|
35
|
+
conditions?: SmartRoutingCondition[];
|
|
36
|
+
targetUrl: string;
|
|
37
|
+
};
|
package/dist/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SmartRoutingRuleInput } from './routing-types.js';
|
|
1
2
|
export type DyqrLink = {
|
|
2
3
|
alias: string;
|
|
3
4
|
title: string;
|
|
@@ -47,6 +48,7 @@ export type CreateLinkInput = {
|
|
|
47
48
|
campaignId?: string | null;
|
|
48
49
|
qrStyle?: QrStyleInput;
|
|
49
50
|
qrStyleSource?: 'own' | 'campaign';
|
|
51
|
+
routingRules?: SmartRoutingRuleInput[];
|
|
50
52
|
};
|
|
51
53
|
export type UpdateLinkInput = {
|
|
52
54
|
title?: string;
|
|
@@ -59,6 +61,7 @@ export type UpdateLinkInput = {
|
|
|
59
61
|
qrStyle?: QrStyleInput;
|
|
60
62
|
qrStyleSource?: 'own' | 'campaign';
|
|
61
63
|
isDisabled?: boolean;
|
|
64
|
+
routingRules?: SmartRoutingRuleInput[];
|
|
62
65
|
};
|
|
63
66
|
export type ListLinksParams = {
|
|
64
67
|
page?: number;
|