@readyfor/api-client-pigeon 0.187.0-pr967.5407288 → 0.188.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/dist/{chunk-OFV6CH56.mjs → chunk-3Z5NWUOW.mjs} +1 -1
- package/dist/chunk-4SU5CULQ.mjs +52 -0
- package/dist/{chunk-IWONQAFN.mjs → chunk-5MLVK6DT.mjs} +1 -1
- package/dist/chunk-BPH2HBOC.mjs +42 -0
- package/dist/{chunk-ZWYL7OFL.mjs → chunk-FQJQLQ46.mjs} +1 -1
- package/dist/{chunk-LXUPJN65.mjs → chunk-HSXALJPX.mjs} +1 -1
- package/dist/{chunk-324IXKQ7.mjs → chunk-IYLCHCAP.mjs} +25 -2
- package/dist/chunk-QUJ4NBJ3.mjs +19 -0
- package/dist/{chunk-SWDMGLLG.mjs → chunk-R2YUVCPF.mjs} +1 -1
- package/dist/chunk-SDN4KE74.mjs +19 -0
- package/dist/chunk-SM5VJ7AA.mjs +19 -0
- package/dist/{chunk-JGIFSXIQ.mjs → chunk-TLAACSJI.mjs} +1 -1
- package/dist/chunk-Z47EI77Z.mjs +42 -0
- package/dist/components.d.mts +187 -77
- package/dist/components.d.ts +187 -77
- package/dist/components.js +30 -2
- package/dist/components.mjs +11 -1
- package/dist/fetch/campaigns.js +20 -2
- package/dist/fetch/campaigns.mjs +2 -2
- package/dist/fetch/campaignsId.d.mts +8 -8
- package/dist/fetch/campaignsId.d.ts +8 -8
- package/dist/fetch/campaignsId.js +20 -2
- package/dist/fetch/campaignsId.mjs +2 -2
- package/dist/fetch/projectsProjectIdOrKeyword.js +20 -2
- package/dist/fetch/projectsProjectIdOrKeyword.mjs +2 -2
- package/dist/fetch/segmentsBehaviorSegments.d.mts +24 -0
- package/dist/fetch/segmentsBehaviorSegments.d.ts +24 -0
- package/dist/fetch/segmentsBehaviorSegments.js +251 -0
- package/dist/fetch/segmentsBehaviorSegments.mjs +9 -0
- package/dist/fetch/segmentsProfileSegments.d.mts +24 -0
- package/dist/fetch/segmentsProfileSegments.d.ts +24 -0
- package/dist/fetch/segmentsProfileSegments.js +251 -0
- package/dist/fetch/segmentsProfileSegments.mjs +9 -0
- package/dist/fetch/segmentsTargetUsersCount.d.mts +17 -0
- package/dist/fetch/segmentsTargetUsersCount.d.ts +17 -0
- package/dist/fetch/segmentsTargetUsersCount.js +251 -0
- package/dist/fetch/segmentsTargetUsersCount.mjs +9 -0
- package/dist/hooks/index.d.mts +6 -0
- package/dist/hooks/index.d.ts +6 -0
- package/dist/hooks/index.js +173 -16
- package/dist/hooks/index.mjs +36 -9
- package/dist/hooks/useCampaigns.js +33 -6
- package/dist/hooks/useCampaigns.mjs +9 -6
- package/dist/hooks/useCampaignsId.js +33 -6
- package/dist/hooks/useCampaignsId.mjs +9 -6
- package/dist/hooks/useProjectsProjectIdOrKeyword.js +33 -6
- package/dist/hooks/useProjectsProjectIdOrKeyword.mjs +9 -6
- package/dist/hooks/useSegmentsBehaviorSegments.d.mts +37 -0
- package/dist/hooks/useSegmentsBehaviorSegments.d.ts +37 -0
- package/dist/hooks/useSegmentsBehaviorSegments.js +310 -0
- package/dist/hooks/useSegmentsBehaviorSegments.mjs +19 -0
- package/dist/hooks/useSegmentsProfileSegments.d.mts +37 -0
- package/dist/hooks/useSegmentsProfileSegments.d.ts +37 -0
- package/dist/hooks/useSegmentsProfileSegments.js +310 -0
- package/dist/hooks/useSegmentsProfileSegments.mjs +19 -0
- package/dist/hooks/useSegmentsTargetUsersCount.d.mts +38 -0
- package/dist/hooks/useSegmentsTargetUsersCount.d.ts +38 -0
- package/dist/hooks/useSegmentsTargetUsersCount.js +320 -0
- package/dist/hooks/useSegmentsTargetUsersCount.mjs +19 -0
- package/dist/index.d.mts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +66 -2
- package/dist/index.mjs +33 -5
- package/dist/schemaType.d.mts +113 -2
- package/dist/schemaType.d.ts +113 -2
- package/package.json +10 -9
- /package/dist/{chunk-M47LJF5A.mjs → chunk-CEHYORRT.mjs} +0 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import {
|
|
2
|
+
buildSegmentsTargetUsersCountGetFetcher
|
|
3
|
+
} from "./chunk-SM5VJ7AA.mjs";
|
|
4
|
+
|
|
5
|
+
// src/hooks/useSegmentsTargetUsersCount.ts
|
|
6
|
+
import useSWRImmutable from "swr/immutable";
|
|
7
|
+
import useSWRInfinite from "swr/infinite";
|
|
8
|
+
import useSWR from "swr";
|
|
9
|
+
import { __internal__requestUrl } from "@readyfor/api-client-base";
|
|
10
|
+
import { useRequestInit } from "@readyfor/api-client-base/react";
|
|
11
|
+
var segmentsTargetUsersCountGetFetcher = buildSegmentsTargetUsersCountGetFetcher();
|
|
12
|
+
var useSegmentsTargetUsersCount = (query, swrConfig = {}) => {
|
|
13
|
+
const key = __internal__requestUrl(
|
|
14
|
+
"/api/segments/target_users_count",
|
|
15
|
+
{},
|
|
16
|
+
query
|
|
17
|
+
);
|
|
18
|
+
const requestInit = useRequestInit();
|
|
19
|
+
const result = useSWR(
|
|
20
|
+
swrConfig?.shouldNotFetch ? null : key,
|
|
21
|
+
buildSegmentsTargetUsersCountGetFetcher(requestInit),
|
|
22
|
+
swrConfig
|
|
23
|
+
);
|
|
24
|
+
return { key, ...result };
|
|
25
|
+
};
|
|
26
|
+
var useSegmentsTargetUsersCountImmutable = (query, swrConfig = {}) => {
|
|
27
|
+
const key = __internal__requestUrl(
|
|
28
|
+
"/api/segments/target_users_count",
|
|
29
|
+
{},
|
|
30
|
+
query
|
|
31
|
+
);
|
|
32
|
+
const requestInit = useRequestInit();
|
|
33
|
+
const result = useSWRImmutable(
|
|
34
|
+
swrConfig?.shouldNotFetch ? null : key,
|
|
35
|
+
buildSegmentsTargetUsersCountGetFetcher(requestInit),
|
|
36
|
+
swrConfig
|
|
37
|
+
);
|
|
38
|
+
return { key, ...result };
|
|
39
|
+
};
|
|
40
|
+
var useSegmentsTargetUsersCountInfinite = (getKey, swrConfig) => useSWRInfinite(
|
|
41
|
+
getKey(
|
|
42
|
+
(query) => __internal__requestUrl({}, query)
|
|
43
|
+
),
|
|
44
|
+
segmentsTargetUsersCountGetFetcher,
|
|
45
|
+
swrConfig
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
export {
|
|
49
|
+
useSegmentsTargetUsersCount,
|
|
50
|
+
useSegmentsTargetUsersCountImmutable,
|
|
51
|
+
useSegmentsTargetUsersCountInfinite
|
|
52
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import {
|
|
2
|
+
buildSegmentsBehaviorSegmentsGetFetcher
|
|
3
|
+
} from "./chunk-SDN4KE74.mjs";
|
|
4
|
+
|
|
5
|
+
// src/hooks/useSegmentsBehaviorSegments.ts
|
|
6
|
+
import useSWRImmutable from "swr/immutable";
|
|
7
|
+
import useSWRInfinite from "swr/infinite";
|
|
8
|
+
import useSWR from "swr";
|
|
9
|
+
import { __internal__requestUrl } from "@readyfor/api-client-base";
|
|
10
|
+
import { useRequestInit } from "@readyfor/api-client-base/react";
|
|
11
|
+
var segmentsBehaviorSegmentsGetFetcher = buildSegmentsBehaviorSegmentsGetFetcher();
|
|
12
|
+
var useSegmentsBehaviorSegments = (swrConfig = {}) => {
|
|
13
|
+
const key = __internal__requestUrl("/api/segments/behavior_segments");
|
|
14
|
+
const requestInit = useRequestInit();
|
|
15
|
+
const result = useSWR(
|
|
16
|
+
swrConfig?.shouldNotFetch ? null : key,
|
|
17
|
+
buildSegmentsBehaviorSegmentsGetFetcher(requestInit),
|
|
18
|
+
swrConfig
|
|
19
|
+
);
|
|
20
|
+
return { key, ...result };
|
|
21
|
+
};
|
|
22
|
+
var useSegmentsBehaviorSegmentsImmutable = (swrConfig = {}) => {
|
|
23
|
+
const key = __internal__requestUrl("/api/segments/behavior_segments");
|
|
24
|
+
const requestInit = useRequestInit();
|
|
25
|
+
const result = useSWRImmutable(
|
|
26
|
+
swrConfig?.shouldNotFetch ? null : key,
|
|
27
|
+
buildSegmentsBehaviorSegmentsGetFetcher(requestInit),
|
|
28
|
+
swrConfig
|
|
29
|
+
);
|
|
30
|
+
return { key, ...result };
|
|
31
|
+
};
|
|
32
|
+
var useSegmentsBehaviorSegmentsInfinite = (getKey, swrConfig) => useSWRInfinite(
|
|
33
|
+
getKey(() => __internal__requestUrl()),
|
|
34
|
+
segmentsBehaviorSegmentsGetFetcher,
|
|
35
|
+
swrConfig
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
export {
|
|
39
|
+
useSegmentsBehaviorSegments,
|
|
40
|
+
useSegmentsBehaviorSegmentsImmutable,
|
|
41
|
+
useSegmentsBehaviorSegmentsInfinite
|
|
42
|
+
};
|
|
@@ -66,8 +66,8 @@ var CurationMailMagazineTargetProject = z.object({
|
|
|
66
66
|
});
|
|
67
67
|
var CurationMailMagazineTarget = z.object({
|
|
68
68
|
id: z.number(),
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
behaviorSegmentCodes: z.array(z.string()),
|
|
70
|
+
profileSegmentCodes: z.array(z.string())
|
|
71
71
|
});
|
|
72
72
|
var PersonalizedMailMagazineDetailTarget = z.object({
|
|
73
73
|
csvFileName: z.string(),
|
|
@@ -142,6 +142,13 @@ var CampaignKind = z.union([
|
|
|
142
142
|
z.literal("curationMailMagazine"),
|
|
143
143
|
z.literal("personalizedMailMagazine")
|
|
144
144
|
]);
|
|
145
|
+
var Segment = z.object({
|
|
146
|
+
code: z.string(),
|
|
147
|
+
label: z.string(),
|
|
148
|
+
isActive: z.boolean(),
|
|
149
|
+
displayOrder: z.union([z.number(), z.null()]),
|
|
150
|
+
description: z.union([z.string(), z.null()])
|
|
151
|
+
});
|
|
145
152
|
var ReadyforProject = z.object({
|
|
146
153
|
projectId: z.number(),
|
|
147
154
|
keyword: z.string(),
|
|
@@ -175,6 +182,17 @@ var Campaign = z.object({
|
|
|
175
182
|
lastEditorName: z.string(),
|
|
176
183
|
lastEditedAt: z.string()
|
|
177
184
|
});
|
|
185
|
+
var TargetSegments = z.object({
|
|
186
|
+
behaviorSegmentCodes: z.array(z.string()),
|
|
187
|
+
profileSegmentCodes: z.array(z.string())
|
|
188
|
+
});
|
|
189
|
+
var TargetUsersCountResponse = z.object({ count: z.number() });
|
|
190
|
+
var GetSegmentsResponse_1 = z.object({
|
|
191
|
+
profileSegments: z.array(Segment)
|
|
192
|
+
});
|
|
193
|
+
var GetSegmentsResponse = z.object({
|
|
194
|
+
behaviorSegments: z.array(Segment)
|
|
195
|
+
});
|
|
178
196
|
var GetProjectsProjectIdOrKeywordResponse = z.object({
|
|
179
197
|
project: ReadyforProject
|
|
180
198
|
});
|
|
@@ -223,11 +241,16 @@ export {
|
|
|
223
241
|
CampaignDetailWithCurationMailMagazine,
|
|
224
242
|
CampaignDetailWithPersonalizedMailMagazine,
|
|
225
243
|
CampaignKind,
|
|
244
|
+
Segment,
|
|
226
245
|
ReadyforProject,
|
|
227
246
|
CampaignFormData,
|
|
228
247
|
CampaignDetail,
|
|
229
248
|
Pagination,
|
|
230
249
|
Campaign,
|
|
250
|
+
TargetSegments,
|
|
251
|
+
TargetUsersCountResponse,
|
|
252
|
+
GetSegmentsResponse_1,
|
|
253
|
+
GetSegmentsResponse,
|
|
231
254
|
GetProjectsProjectIdOrKeywordResponse,
|
|
232
255
|
HttpErrorBadRequest,
|
|
233
256
|
PatchCampaignsCampaignIdRequestBody,
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
GetSegmentsResponse
|
|
3
|
+
} from "./chunk-IYLCHCAP.mjs";
|
|
4
|
+
|
|
5
|
+
// src/fetch/segmentsProfileSegments.ts
|
|
6
|
+
import {
|
|
7
|
+
createJsonFetcher,
|
|
8
|
+
__internal__requestUrl
|
|
9
|
+
} from "@readyfor/api-client-base";
|
|
10
|
+
var buildSegmentsProfileSegmentsGetFetcher = (requestInit) => createJsonFetcher(GetSegmentsResponse, { ...requestInit });
|
|
11
|
+
var getSegmentsProfileSegments = (requestInit) => buildSegmentsProfileSegmentsGetFetcher()(
|
|
12
|
+
__internal__requestUrl("/api/segments/profile_segments"),
|
|
13
|
+
{ ...requestInit, method: "GET" }
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
buildSegmentsProfileSegmentsGetFetcher,
|
|
18
|
+
getSegmentsProfileSegments
|
|
19
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
GetSegmentsResponse
|
|
3
|
+
} from "./chunk-IYLCHCAP.mjs";
|
|
4
|
+
|
|
5
|
+
// src/fetch/segmentsBehaviorSegments.ts
|
|
6
|
+
import {
|
|
7
|
+
createJsonFetcher,
|
|
8
|
+
__internal__requestUrl
|
|
9
|
+
} from "@readyfor/api-client-base";
|
|
10
|
+
var buildSegmentsBehaviorSegmentsGetFetcher = (requestInit) => createJsonFetcher(GetSegmentsResponse, { ...requestInit });
|
|
11
|
+
var getSegmentsBehaviorSegments = (requestInit) => buildSegmentsBehaviorSegmentsGetFetcher()(
|
|
12
|
+
__internal__requestUrl("/api/segments/behavior_segments"),
|
|
13
|
+
{ ...requestInit, method: "GET" }
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
buildSegmentsBehaviorSegmentsGetFetcher,
|
|
18
|
+
getSegmentsBehaviorSegments
|
|
19
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TargetUsersCountResponse
|
|
3
|
+
} from "./chunk-IYLCHCAP.mjs";
|
|
4
|
+
|
|
5
|
+
// src/fetch/segmentsTargetUsersCount.ts
|
|
6
|
+
import {
|
|
7
|
+
createJsonFetcher,
|
|
8
|
+
__internal__requestUrl
|
|
9
|
+
} from "@readyfor/api-client-base";
|
|
10
|
+
var buildSegmentsTargetUsersCountGetFetcher = (requestInit) => createJsonFetcher(TargetUsersCountResponse, { ...requestInit });
|
|
11
|
+
var getSegmentsTargetUsersCount = (query, requestInit) => buildSegmentsTargetUsersCountGetFetcher()(
|
|
12
|
+
__internal__requestUrl("/api/segments/target_users_count", {}, query),
|
|
13
|
+
{ ...requestInit, method: "GET" }
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
buildSegmentsTargetUsersCountGetFetcher,
|
|
18
|
+
getSegmentsTargetUsersCount
|
|
19
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import {
|
|
2
|
+
buildSegmentsProfileSegmentsGetFetcher
|
|
3
|
+
} from "./chunk-QUJ4NBJ3.mjs";
|
|
4
|
+
|
|
5
|
+
// src/hooks/useSegmentsProfileSegments.ts
|
|
6
|
+
import useSWRImmutable from "swr/immutable";
|
|
7
|
+
import useSWRInfinite from "swr/infinite";
|
|
8
|
+
import useSWR from "swr";
|
|
9
|
+
import { __internal__requestUrl } from "@readyfor/api-client-base";
|
|
10
|
+
import { useRequestInit } from "@readyfor/api-client-base/react";
|
|
11
|
+
var segmentsProfileSegmentsGetFetcher = buildSegmentsProfileSegmentsGetFetcher();
|
|
12
|
+
var useSegmentsProfileSegments = (swrConfig = {}) => {
|
|
13
|
+
const key = __internal__requestUrl("/api/segments/profile_segments");
|
|
14
|
+
const requestInit = useRequestInit();
|
|
15
|
+
const result = useSWR(
|
|
16
|
+
swrConfig?.shouldNotFetch ? null : key,
|
|
17
|
+
buildSegmentsProfileSegmentsGetFetcher(requestInit),
|
|
18
|
+
swrConfig
|
|
19
|
+
);
|
|
20
|
+
return { key, ...result };
|
|
21
|
+
};
|
|
22
|
+
var useSegmentsProfileSegmentsImmutable = (swrConfig = {}) => {
|
|
23
|
+
const key = __internal__requestUrl("/api/segments/profile_segments");
|
|
24
|
+
const requestInit = useRequestInit();
|
|
25
|
+
const result = useSWRImmutable(
|
|
26
|
+
swrConfig?.shouldNotFetch ? null : key,
|
|
27
|
+
buildSegmentsProfileSegmentsGetFetcher(requestInit),
|
|
28
|
+
swrConfig
|
|
29
|
+
);
|
|
30
|
+
return { key, ...result };
|
|
31
|
+
};
|
|
32
|
+
var useSegmentsProfileSegmentsInfinite = (getKey, swrConfig) => useSWRInfinite(
|
|
33
|
+
getKey(() => __internal__requestUrl()),
|
|
34
|
+
segmentsProfileSegmentsGetFetcher,
|
|
35
|
+
swrConfig
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
export {
|
|
39
|
+
useSegmentsProfileSegments,
|
|
40
|
+
useSegmentsProfileSegmentsImmutable,
|
|
41
|
+
useSegmentsProfileSegmentsInfinite
|
|
42
|
+
};
|