@readyfor/api-client-pigeon 0.169.0 → 0.170.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-IOFBDHPP.mjs → chunk-DKYFCOP3.mjs} +1 -1
- package/dist/{chunk-6US3CWHW.mjs → chunk-PP4BT57Q.mjs} +35 -5
- package/dist/{chunk-2PGNAMJH.mjs → chunk-QZLWVAVL.mjs} +1 -1
- package/dist/chunk-S64EIV3P.mjs +19 -0
- package/dist/chunk-WSTLSTU4.mjs +42 -0
- package/dist/components.d.mts +214 -2
- package/dist/components.d.ts +214 -2
- package/dist/components.js +39 -4
- package/dist/components.mjs +11 -1
- package/dist/fetch/campaigns.js +29 -4
- package/dist/fetch/campaigns.mjs +2 -2
- package/dist/fetch/campaignsId.d.mts +47 -0
- package/dist/fetch/campaignsId.d.ts +47 -0
- package/dist/fetch/campaignsId.js +103 -0
- package/dist/fetch/campaignsId.mjs +9 -0
- package/dist/hooks/index.d.mts +2 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.js +76 -8
- package/dist/hooks/index.mjs +13 -4
- package/dist/hooks/useCampaigns.js +36 -8
- package/dist/hooks/useCampaigns.mjs +5 -4
- package/dist/hooks/useCampaignsId.d.mts +38 -0
- package/dist/hooks/useCampaignsId.d.ts +38 -0
- package/dist/hooks/useCampaignsId.js +147 -0
- package/dist/hooks/useCampaignsId.mjs +14 -0
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +51 -4
- package/dist/index.mjs +19 -3
- package/dist/schemaType.d.mts +72 -0
- package/dist/schemaType.d.ts +72 -0
- package/package.json +3 -3
- /package/dist/{chunk-WY7GF7TX.mjs → chunk-KZFT6V6I.mjs} +0 -0
|
@@ -2,10 +2,11 @@ import {
|
|
|
2
2
|
useCampaigns,
|
|
3
3
|
useCampaignsImmutable,
|
|
4
4
|
useCampaignsInfinite
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-QZLWVAVL.mjs";
|
|
6
|
+
import "../chunk-KZFT6V6I.mjs";
|
|
7
|
+
import "../chunk-DKYFCOP3.mjs";
|
|
8
|
+
import "../chunk-S64EIV3P.mjs";
|
|
9
|
+
import "../chunk-PP4BT57Q.mjs";
|
|
9
10
|
export {
|
|
10
11
|
useCampaigns,
|
|
11
12
|
useCampaignsImmutable,
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as swr_infinite from 'swr/infinite';
|
|
2
|
+
import { SWRInfiniteKeyLoader, SWRInfiniteConfiguration } from 'swr/infinite';
|
|
3
|
+
import * as swr from 'swr';
|
|
4
|
+
import { Arguments } from 'swr';
|
|
5
|
+
import { components } from '../schemaType.mjs';
|
|
6
|
+
import { Configuration } from '@readyfor/api-client-base/react';
|
|
7
|
+
import { CampaignsIdGetPath, CampaignsIdGetResponse } from '../fetch/campaignsId.mjs';
|
|
8
|
+
import '@readyfor/api-client-base';
|
|
9
|
+
|
|
10
|
+
declare const useCampaignsId: (path: CampaignsIdGetPath, swrConfig?: Configuration<CampaignsIdGetResponse>) => {
|
|
11
|
+
data: {
|
|
12
|
+
campaignDetail: components["schemas"]["CampaignDetail"];
|
|
13
|
+
} | undefined;
|
|
14
|
+
error: any;
|
|
15
|
+
mutate: swr.KeyedMutator<{
|
|
16
|
+
campaignDetail: components["schemas"]["CampaignDetail"];
|
|
17
|
+
}>;
|
|
18
|
+
isValidating: boolean;
|
|
19
|
+
isLoading: boolean;
|
|
20
|
+
key: string;
|
|
21
|
+
};
|
|
22
|
+
declare const useCampaignsIdImmutable: (path: CampaignsIdGetPath, swrConfig?: Configuration<CampaignsIdGetResponse>) => {
|
|
23
|
+
data: {
|
|
24
|
+
campaignDetail: components["schemas"]["CampaignDetail"];
|
|
25
|
+
} | undefined;
|
|
26
|
+
error: any;
|
|
27
|
+
mutate: swr.KeyedMutator<{
|
|
28
|
+
campaignDetail: components["schemas"]["CampaignDetail"];
|
|
29
|
+
}>;
|
|
30
|
+
isValidating: boolean;
|
|
31
|
+
isLoading: boolean;
|
|
32
|
+
key: string;
|
|
33
|
+
};
|
|
34
|
+
declare const useCampaignsIdInfinite: <Args extends Arguments>(getKey: (keyBuilder: (path: CampaignsIdGetPath) => string) => SWRInfiniteKeyLoader<CampaignsIdGetResponse, Args>, swrConfig?: SWRInfiniteConfiguration<CampaignsIdGetResponse>) => swr_infinite.SWRInfiniteResponse<{
|
|
35
|
+
campaignDetail: components["schemas"]["CampaignDetail"];
|
|
36
|
+
}, any>;
|
|
37
|
+
|
|
38
|
+
export { useCampaignsId, useCampaignsIdImmutable, useCampaignsIdInfinite };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as swr_infinite from 'swr/infinite';
|
|
2
|
+
import { SWRInfiniteKeyLoader, SWRInfiniteConfiguration } from 'swr/infinite';
|
|
3
|
+
import * as swr from 'swr';
|
|
4
|
+
import { Arguments } from 'swr';
|
|
5
|
+
import { components } from '../schemaType.js';
|
|
6
|
+
import { Configuration } from '@readyfor/api-client-base/react';
|
|
7
|
+
import { CampaignsIdGetPath, CampaignsIdGetResponse } from '../fetch/campaignsId.js';
|
|
8
|
+
import '@readyfor/api-client-base';
|
|
9
|
+
|
|
10
|
+
declare const useCampaignsId: (path: CampaignsIdGetPath, swrConfig?: Configuration<CampaignsIdGetResponse>) => {
|
|
11
|
+
data: {
|
|
12
|
+
campaignDetail: components["schemas"]["CampaignDetail"];
|
|
13
|
+
} | undefined;
|
|
14
|
+
error: any;
|
|
15
|
+
mutate: swr.KeyedMutator<{
|
|
16
|
+
campaignDetail: components["schemas"]["CampaignDetail"];
|
|
17
|
+
}>;
|
|
18
|
+
isValidating: boolean;
|
|
19
|
+
isLoading: boolean;
|
|
20
|
+
key: string;
|
|
21
|
+
};
|
|
22
|
+
declare const useCampaignsIdImmutable: (path: CampaignsIdGetPath, swrConfig?: Configuration<CampaignsIdGetResponse>) => {
|
|
23
|
+
data: {
|
|
24
|
+
campaignDetail: components["schemas"]["CampaignDetail"];
|
|
25
|
+
} | undefined;
|
|
26
|
+
error: any;
|
|
27
|
+
mutate: swr.KeyedMutator<{
|
|
28
|
+
campaignDetail: components["schemas"]["CampaignDetail"];
|
|
29
|
+
}>;
|
|
30
|
+
isValidating: boolean;
|
|
31
|
+
isLoading: boolean;
|
|
32
|
+
key: string;
|
|
33
|
+
};
|
|
34
|
+
declare const useCampaignsIdInfinite: <Args extends Arguments>(getKey: (keyBuilder: (path: CampaignsIdGetPath) => string) => SWRInfiniteKeyLoader<CampaignsIdGetResponse, Args>, swrConfig?: SWRInfiniteConfiguration<CampaignsIdGetResponse>) => swr_infinite.SWRInfiniteResponse<{
|
|
35
|
+
campaignDetail: components["schemas"]["CampaignDetail"];
|
|
36
|
+
}, any>;
|
|
37
|
+
|
|
38
|
+
export { useCampaignsId, useCampaignsIdImmutable, useCampaignsIdInfinite };
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/hooks/useCampaignsId.ts
|
|
31
|
+
var useCampaignsId_exports = {};
|
|
32
|
+
__export(useCampaignsId_exports, {
|
|
33
|
+
useCampaignsId: () => useCampaignsId,
|
|
34
|
+
useCampaignsIdImmutable: () => useCampaignsIdImmutable,
|
|
35
|
+
useCampaignsIdInfinite: () => useCampaignsIdInfinite
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(useCampaignsId_exports);
|
|
38
|
+
var import_immutable = __toESM(require("swr/immutable"));
|
|
39
|
+
var import_infinite = __toESM(require("swr/infinite"));
|
|
40
|
+
var import_swr = __toESM(require("swr"));
|
|
41
|
+
var import_api_client_base3 = require("@readyfor/api-client-base");
|
|
42
|
+
var import_react = require("@readyfor/api-client-base/react");
|
|
43
|
+
|
|
44
|
+
// src/components.ts
|
|
45
|
+
var import_zod = require("zod");
|
|
46
|
+
var PersonalizedMailMagazineCampaignDetailTarget = import_zod.z.object({
|
|
47
|
+
csvFileName: import_zod.z.string(),
|
|
48
|
+
targetUsersCount: import_zod.z.number(),
|
|
49
|
+
excludedUsersCount: import_zod.z.number()
|
|
50
|
+
});
|
|
51
|
+
var CampaignStatus = import_zod.z.union([
|
|
52
|
+
import_zod.z.literal("draft"),
|
|
53
|
+
import_zod.z.literal("scheduled"),
|
|
54
|
+
import_zod.z.literal("delivering"),
|
|
55
|
+
import_zod.z.literal("delivered"),
|
|
56
|
+
import_zod.z.literal("deliveryFailed")
|
|
57
|
+
]);
|
|
58
|
+
var CurationMailMagazineCampaignDetail = import_zod.z.object({
|
|
59
|
+
__type: import_zod.z.literal("CurationMailMagazineCampaignDetail"),
|
|
60
|
+
id: import_zod.z.number()
|
|
61
|
+
});
|
|
62
|
+
var PersonalizedMailMagazineCampaignDetail = import_zod.z.object({
|
|
63
|
+
__type: import_zod.z.literal("PersonalizedMailMagazineCampaignDetail"),
|
|
64
|
+
id: import_zod.z.number(),
|
|
65
|
+
status: CampaignStatus,
|
|
66
|
+
title: import_zod.z.union([import_zod.z.string(), import_zod.z.null()]),
|
|
67
|
+
utmCampaign: import_zod.z.union([import_zod.z.string(), import_zod.z.null()]),
|
|
68
|
+
scheduledDeliveryAt: import_zod.z.union([import_zod.z.string(), import_zod.z.null()]),
|
|
69
|
+
target: import_zod.z.union([PersonalizedMailMagazineCampaignDetailTarget, import_zod.z.null()])
|
|
70
|
+
});
|
|
71
|
+
var CampaignKind = import_zod.z.union([
|
|
72
|
+
import_zod.z.literal("curationMailMagazine"),
|
|
73
|
+
import_zod.z.literal("personalizedMailMagazine")
|
|
74
|
+
]);
|
|
75
|
+
var CampaignDetail = import_zod.z.union([
|
|
76
|
+
PersonalizedMailMagazineCampaignDetail,
|
|
77
|
+
CurationMailMagazineCampaignDetail
|
|
78
|
+
]);
|
|
79
|
+
var Pagination = import_zod.z.object({
|
|
80
|
+
totalPages: import_zod.z.number(),
|
|
81
|
+
totalCount: import_zod.z.number(),
|
|
82
|
+
currentPerPage: import_zod.z.number(),
|
|
83
|
+
currentPage: import_zod.z.number(),
|
|
84
|
+
prevPage: import_zod.z.union([import_zod.z.number(), import_zod.z.null()]),
|
|
85
|
+
nextPage: import_zod.z.union([import_zod.z.number(), import_zod.z.null()]),
|
|
86
|
+
isFirstPage: import_zod.z.boolean(),
|
|
87
|
+
isLastPage: import_zod.z.boolean()
|
|
88
|
+
});
|
|
89
|
+
var Campaign = import_zod.z.object({
|
|
90
|
+
id: import_zod.z.number(),
|
|
91
|
+
title: import_zod.z.optional(import_zod.z.union([import_zod.z.string(), import_zod.z.null()])),
|
|
92
|
+
status: CampaignStatus,
|
|
93
|
+
kind: CampaignKind,
|
|
94
|
+
deliveryAt: import_zod.z.union([import_zod.z.string(), import_zod.z.null()]),
|
|
95
|
+
lastEditorName: import_zod.z.string(),
|
|
96
|
+
lastEditedAt: import_zod.z.string()
|
|
97
|
+
});
|
|
98
|
+
var GetCampaignsCampaignIdResponse = import_zod.z.object({
|
|
99
|
+
campaignDetail: CampaignDetail
|
|
100
|
+
});
|
|
101
|
+
var PostCampaignsRequestBody = import_zod.z.object({ kind: CampaignKind });
|
|
102
|
+
var PostCampaignsResponse = import_zod.z.object({ id: import_zod.z.number() });
|
|
103
|
+
var GetCampaignsResponse = import_zod.z.object({
|
|
104
|
+
campaigns: import_zod.z.array(Campaign),
|
|
105
|
+
pagination: Pagination
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
// src/fetch/campaigns.ts
|
|
109
|
+
var import_api_client_base = require("@readyfor/api-client-base");
|
|
110
|
+
|
|
111
|
+
// src/fetch/campaignsId.ts
|
|
112
|
+
var import_api_client_base2 = require("@readyfor/api-client-base");
|
|
113
|
+
var buildCampaignsIdGetFetcher = (requestInit) => (0, import_api_client_base2.createJsonFetcher)(GetCampaignsCampaignIdResponse, { ...requestInit });
|
|
114
|
+
|
|
115
|
+
// src/hooks/useCampaignsId.ts
|
|
116
|
+
var campaignsIdGetFetcher = buildCampaignsIdGetFetcher();
|
|
117
|
+
var useCampaignsId = (path, swrConfig) => {
|
|
118
|
+
const key = (0, import_api_client_base3.__internal__requestUrl)("/api/campaigns/{id}", path);
|
|
119
|
+
const requestInit = (0, import_react.useRequestInit)();
|
|
120
|
+
const result = (0, import_swr.default)(
|
|
121
|
+
swrConfig?.shouldNotFetch ? null : key,
|
|
122
|
+
buildCampaignsIdGetFetcher(requestInit),
|
|
123
|
+
swrConfig
|
|
124
|
+
);
|
|
125
|
+
return { key, ...result };
|
|
126
|
+
};
|
|
127
|
+
var useCampaignsIdImmutable = (path, swrConfig) => {
|
|
128
|
+
const key = (0, import_api_client_base3.__internal__requestUrl)("/api/campaigns/{id}", path);
|
|
129
|
+
const requestInit = (0, import_react.useRequestInit)();
|
|
130
|
+
const result = (0, import_immutable.default)(
|
|
131
|
+
swrConfig?.shouldNotFetch ? null : key,
|
|
132
|
+
buildCampaignsIdGetFetcher(requestInit),
|
|
133
|
+
swrConfig
|
|
134
|
+
);
|
|
135
|
+
return { key, ...result };
|
|
136
|
+
};
|
|
137
|
+
var useCampaignsIdInfinite = (getKey, swrConfig) => (0, import_infinite.default)(
|
|
138
|
+
getKey((path) => (0, import_api_client_base3.__internal__requestUrl)(path)),
|
|
139
|
+
campaignsIdGetFetcher,
|
|
140
|
+
swrConfig
|
|
141
|
+
);
|
|
142
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
143
|
+
0 && (module.exports = {
|
|
144
|
+
useCampaignsId,
|
|
145
|
+
useCampaignsIdImmutable,
|
|
146
|
+
useCampaignsIdInfinite
|
|
147
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useCampaignsId,
|
|
3
|
+
useCampaignsIdImmutable,
|
|
4
|
+
useCampaignsIdInfinite
|
|
5
|
+
} from "../chunk-WSTLSTU4.mjs";
|
|
6
|
+
import "../chunk-KZFT6V6I.mjs";
|
|
7
|
+
import "../chunk-DKYFCOP3.mjs";
|
|
8
|
+
import "../chunk-S64EIV3P.mjs";
|
|
9
|
+
import "../chunk-PP4BT57Q.mjs";
|
|
10
|
+
export {
|
|
11
|
+
useCampaignsId,
|
|
12
|
+
useCampaignsIdImmutable,
|
|
13
|
+
useCampaignsIdInfinite
|
|
14
|
+
};
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { $defs, components, external, operations, paths, webhooks } from './schemaType.mjs';
|
|
2
|
-
export { Campaign, CampaignKind, CampaignStatus, GetCampaignsResponse, Pagination, PostCampaignsRequestBody, PostCampaignsResponse } from './components.mjs';
|
|
2
|
+
export { Campaign, CampaignDetail, CampaignKind, CampaignStatus, CurationMailMagazineCampaignDetail, GetCampaignsCampaignIdResponse, GetCampaignsResponse, Pagination, PersonalizedMailMagazineCampaignDetail, PersonalizedMailMagazineCampaignDetailTarget, PostCampaignsRequestBody, PostCampaignsResponse } from './components.mjs';
|
|
3
3
|
export { CampaignsGetQuery, CampaignsGetResponse, CampaignsPostRequestBody, CampaignsPostResponse, buildCampaignsGetFetcher, buildCampaignsPostFetcher, getCampaigns, postCampaigns } from './fetch/campaigns.mjs';
|
|
4
|
+
export { CampaignsIdGetPath, CampaignsIdGetResponse, buildCampaignsIdGetFetcher, getCampaignsId } from './fetch/campaignsId.mjs';
|
|
4
5
|
import 'zod';
|
|
5
6
|
import '@readyfor/api-client-base';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { $defs, components, external, operations, paths, webhooks } from './schemaType.js';
|
|
2
|
-
export { Campaign, CampaignKind, CampaignStatus, GetCampaignsResponse, Pagination, PostCampaignsRequestBody, PostCampaignsResponse } from './components.js';
|
|
2
|
+
export { Campaign, CampaignDetail, CampaignKind, CampaignStatus, CurationMailMagazineCampaignDetail, GetCampaignsCampaignIdResponse, GetCampaignsResponse, Pagination, PersonalizedMailMagazineCampaignDetail, PersonalizedMailMagazineCampaignDetailTarget, PostCampaignsRequestBody, PostCampaignsResponse } from './components.js';
|
|
3
3
|
export { CampaignsGetQuery, CampaignsGetResponse, CampaignsPostRequestBody, CampaignsPostResponse, buildCampaignsGetFetcher, buildCampaignsPostFetcher, getCampaigns, postCampaigns } from './fetch/campaigns.js';
|
|
4
|
+
export { CampaignsIdGetPath, CampaignsIdGetResponse, buildCampaignsIdGetFetcher, getCampaignsId } from './fetch/campaignsId.js';
|
|
4
5
|
import 'zod';
|
|
5
6
|
import '@readyfor/api-client-base';
|
package/dist/index.js
CHANGED
|
@@ -21,25 +21,33 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var src_exports = {};
|
|
22
22
|
__export(src_exports, {
|
|
23
23
|
Campaign: () => Campaign,
|
|
24
|
+
CampaignDetail: () => CampaignDetail,
|
|
24
25
|
CampaignKind: () => CampaignKind,
|
|
25
26
|
CampaignStatus: () => CampaignStatus,
|
|
27
|
+
CurationMailMagazineCampaignDetail: () => CurationMailMagazineCampaignDetail,
|
|
28
|
+
GetCampaignsCampaignIdResponse: () => GetCampaignsCampaignIdResponse,
|
|
26
29
|
GetCampaignsResponse: () => GetCampaignsResponse,
|
|
27
30
|
Pagination: () => Pagination,
|
|
31
|
+
PersonalizedMailMagazineCampaignDetail: () => PersonalizedMailMagazineCampaignDetail,
|
|
32
|
+
PersonalizedMailMagazineCampaignDetailTarget: () => PersonalizedMailMagazineCampaignDetailTarget,
|
|
28
33
|
PostCampaignsRequestBody: () => PostCampaignsRequestBody,
|
|
29
34
|
PostCampaignsResponse: () => PostCampaignsResponse,
|
|
30
35
|
buildCampaignsGetFetcher: () => buildCampaignsGetFetcher,
|
|
36
|
+
buildCampaignsIdGetFetcher: () => buildCampaignsIdGetFetcher,
|
|
31
37
|
buildCampaignsPostFetcher: () => buildCampaignsPostFetcher,
|
|
32
38
|
getCampaigns: () => getCampaigns,
|
|
39
|
+
getCampaignsId: () => getCampaignsId,
|
|
33
40
|
postCampaigns: () => postCampaigns
|
|
34
41
|
});
|
|
35
42
|
module.exports = __toCommonJS(src_exports);
|
|
36
43
|
|
|
37
44
|
// src/components.ts
|
|
38
45
|
var import_zod = require("zod");
|
|
39
|
-
var
|
|
40
|
-
import_zod.z.
|
|
41
|
-
import_zod.z.
|
|
42
|
-
|
|
46
|
+
var PersonalizedMailMagazineCampaignDetailTarget = import_zod.z.object({
|
|
47
|
+
csvFileName: import_zod.z.string(),
|
|
48
|
+
targetUsersCount: import_zod.z.number(),
|
|
49
|
+
excludedUsersCount: import_zod.z.number()
|
|
50
|
+
});
|
|
43
51
|
var CampaignStatus = import_zod.z.union([
|
|
44
52
|
import_zod.z.literal("draft"),
|
|
45
53
|
import_zod.z.literal("scheduled"),
|
|
@@ -47,6 +55,27 @@ var CampaignStatus = import_zod.z.union([
|
|
|
47
55
|
import_zod.z.literal("delivered"),
|
|
48
56
|
import_zod.z.literal("deliveryFailed")
|
|
49
57
|
]);
|
|
58
|
+
var CurationMailMagazineCampaignDetail = import_zod.z.object({
|
|
59
|
+
__type: import_zod.z.literal("CurationMailMagazineCampaignDetail"),
|
|
60
|
+
id: import_zod.z.number()
|
|
61
|
+
});
|
|
62
|
+
var PersonalizedMailMagazineCampaignDetail = import_zod.z.object({
|
|
63
|
+
__type: import_zod.z.literal("PersonalizedMailMagazineCampaignDetail"),
|
|
64
|
+
id: import_zod.z.number(),
|
|
65
|
+
status: CampaignStatus,
|
|
66
|
+
title: import_zod.z.union([import_zod.z.string(), import_zod.z.null()]),
|
|
67
|
+
utmCampaign: import_zod.z.union([import_zod.z.string(), import_zod.z.null()]),
|
|
68
|
+
scheduledDeliveryAt: import_zod.z.union([import_zod.z.string(), import_zod.z.null()]),
|
|
69
|
+
target: import_zod.z.union([PersonalizedMailMagazineCampaignDetailTarget, import_zod.z.null()])
|
|
70
|
+
});
|
|
71
|
+
var CampaignKind = import_zod.z.union([
|
|
72
|
+
import_zod.z.literal("curationMailMagazine"),
|
|
73
|
+
import_zod.z.literal("personalizedMailMagazine")
|
|
74
|
+
]);
|
|
75
|
+
var CampaignDetail = import_zod.z.union([
|
|
76
|
+
PersonalizedMailMagazineCampaignDetail,
|
|
77
|
+
CurationMailMagazineCampaignDetail
|
|
78
|
+
]);
|
|
50
79
|
var Pagination = import_zod.z.object({
|
|
51
80
|
totalPages: import_zod.z.number(),
|
|
52
81
|
totalCount: import_zod.z.number(),
|
|
@@ -66,6 +95,9 @@ var Campaign = import_zod.z.object({
|
|
|
66
95
|
lastEditorName: import_zod.z.string(),
|
|
67
96
|
lastEditedAt: import_zod.z.string()
|
|
68
97
|
});
|
|
98
|
+
var GetCampaignsCampaignIdResponse = import_zod.z.object({
|
|
99
|
+
campaignDetail: CampaignDetail
|
|
100
|
+
});
|
|
69
101
|
var PostCampaignsRequestBody = import_zod.z.object({ kind: CampaignKind });
|
|
70
102
|
var PostCampaignsResponse = import_zod.z.object({ id: import_zod.z.number() });
|
|
71
103
|
var GetCampaignsResponse = import_zod.z.object({
|
|
@@ -87,17 +119,32 @@ var postCampaigns = (requestBody, requestInit) => buildCampaignsPostFetcher()((0
|
|
|
87
119
|
headers: { ...requestInit?.headers, "Content-Type": "application/json" },
|
|
88
120
|
body: JSON.stringify(requestBody)
|
|
89
121
|
});
|
|
122
|
+
|
|
123
|
+
// src/fetch/campaignsId.ts
|
|
124
|
+
var import_api_client_base2 = require("@readyfor/api-client-base");
|
|
125
|
+
var buildCampaignsIdGetFetcher = (requestInit) => (0, import_api_client_base2.createJsonFetcher)(GetCampaignsCampaignIdResponse, { ...requestInit });
|
|
126
|
+
var getCampaignsId = (path, requestInit) => buildCampaignsIdGetFetcher()(
|
|
127
|
+
(0, import_api_client_base2.__internal__requestUrl)("/api/campaigns/{id}", path),
|
|
128
|
+
{ ...requestInit, method: "GET" }
|
|
129
|
+
);
|
|
90
130
|
// Annotate the CommonJS export names for ESM import in node:
|
|
91
131
|
0 && (module.exports = {
|
|
92
132
|
Campaign,
|
|
133
|
+
CampaignDetail,
|
|
93
134
|
CampaignKind,
|
|
94
135
|
CampaignStatus,
|
|
136
|
+
CurationMailMagazineCampaignDetail,
|
|
137
|
+
GetCampaignsCampaignIdResponse,
|
|
95
138
|
GetCampaignsResponse,
|
|
96
139
|
Pagination,
|
|
140
|
+
PersonalizedMailMagazineCampaignDetail,
|
|
141
|
+
PersonalizedMailMagazineCampaignDetailTarget,
|
|
97
142
|
PostCampaignsRequestBody,
|
|
98
143
|
PostCampaignsResponse,
|
|
99
144
|
buildCampaignsGetFetcher,
|
|
145
|
+
buildCampaignsIdGetFetcher,
|
|
100
146
|
buildCampaignsPostFetcher,
|
|
101
147
|
getCampaigns,
|
|
148
|
+
getCampaignsId,
|
|
102
149
|
postCampaigns
|
|
103
150
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -1,29 +1,45 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-KZFT6V6I.mjs";
|
|
2
2
|
import {
|
|
3
3
|
buildCampaignsGetFetcher,
|
|
4
4
|
buildCampaignsPostFetcher,
|
|
5
5
|
getCampaigns,
|
|
6
6
|
postCampaigns
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-DKYFCOP3.mjs";
|
|
8
|
+
import {
|
|
9
|
+
buildCampaignsIdGetFetcher,
|
|
10
|
+
getCampaignsId
|
|
11
|
+
} from "./chunk-S64EIV3P.mjs";
|
|
8
12
|
import {
|
|
9
13
|
Campaign,
|
|
14
|
+
CampaignDetail,
|
|
10
15
|
CampaignKind,
|
|
11
16
|
CampaignStatus,
|
|
17
|
+
CurationMailMagazineCampaignDetail,
|
|
18
|
+
GetCampaignsCampaignIdResponse,
|
|
12
19
|
GetCampaignsResponse,
|
|
13
20
|
Pagination,
|
|
21
|
+
PersonalizedMailMagazineCampaignDetail,
|
|
22
|
+
PersonalizedMailMagazineCampaignDetailTarget,
|
|
14
23
|
PostCampaignsRequestBody,
|
|
15
24
|
PostCampaignsResponse
|
|
16
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-PP4BT57Q.mjs";
|
|
17
26
|
export {
|
|
18
27
|
Campaign,
|
|
28
|
+
CampaignDetail,
|
|
19
29
|
CampaignKind,
|
|
20
30
|
CampaignStatus,
|
|
31
|
+
CurationMailMagazineCampaignDetail,
|
|
32
|
+
GetCampaignsCampaignIdResponse,
|
|
21
33
|
GetCampaignsResponse,
|
|
22
34
|
Pagination,
|
|
35
|
+
PersonalizedMailMagazineCampaignDetail,
|
|
36
|
+
PersonalizedMailMagazineCampaignDetailTarget,
|
|
23
37
|
PostCampaignsRequestBody,
|
|
24
38
|
PostCampaignsResponse,
|
|
25
39
|
buildCampaignsGetFetcher,
|
|
40
|
+
buildCampaignsIdGetFetcher,
|
|
26
41
|
buildCampaignsPostFetcher,
|
|
27
42
|
getCampaigns,
|
|
43
|
+
getCampaignsId,
|
|
28
44
|
postCampaigns
|
|
29
45
|
};
|
package/dist/schemaType.d.mts
CHANGED
|
@@ -9,6 +9,10 @@ interface paths {
|
|
|
9
9
|
/** キャンペーンを作成する */
|
|
10
10
|
post: operations["PostCampaigns"];
|
|
11
11
|
};
|
|
12
|
+
"/api/campaigns/{id}": {
|
|
13
|
+
/** キャンペーン詳細を取得する */
|
|
14
|
+
get: operations["GetCampaignsCampaignId"];
|
|
15
|
+
};
|
|
12
16
|
}
|
|
13
17
|
type webhooks = Record<string, never>;
|
|
14
18
|
interface components {
|
|
@@ -103,6 +107,58 @@ interface components {
|
|
|
103
107
|
* @enum {string}
|
|
104
108
|
*/
|
|
105
109
|
CampaignKind: "curationMailMagazine" | "personalizedMailMagazine";
|
|
110
|
+
/**
|
|
111
|
+
* @example {
|
|
112
|
+
* "campaignDetail": {
|
|
113
|
+
* "__type": "PersonalizedMailMagazineCampaignDetail",
|
|
114
|
+
* "id": 0,
|
|
115
|
+
* "title": "title",
|
|
116
|
+
* "scheduledDeliveryAt": "2000-01-23T04:56:07.000Z",
|
|
117
|
+
* "utmCampaign": "utmCampaign",
|
|
118
|
+
* "status": "draft",
|
|
119
|
+
* "target": ""
|
|
120
|
+
* }
|
|
121
|
+
* }
|
|
122
|
+
*/
|
|
123
|
+
GetCampaignsCampaignIdResponse: {
|
|
124
|
+
campaignDetail: components["schemas"]["CampaignDetail"];
|
|
125
|
+
};
|
|
126
|
+
CampaignDetail: components["schemas"]["PersonalizedMailMagazineCampaignDetail"] | components["schemas"]["CurationMailMagazineCampaignDetail"];
|
|
127
|
+
/**
|
|
128
|
+
* PersonalizedMailMagazineCampaignDetail
|
|
129
|
+
* @example {
|
|
130
|
+
* "__type": "PersonalizedMailMagazineCampaignDetail",
|
|
131
|
+
* "id": 0,
|
|
132
|
+
* "title": "title",
|
|
133
|
+
* "scheduledDeliveryAt": "2000-01-23T04:56:07.000Z",
|
|
134
|
+
* "utmCampaign": "utmCampaign",
|
|
135
|
+
* "status": "draft",
|
|
136
|
+
* "target": ""
|
|
137
|
+
* }
|
|
138
|
+
*/
|
|
139
|
+
PersonalizedMailMagazineCampaignDetail: {
|
|
140
|
+
/** @enum {string} */
|
|
141
|
+
__type: "PersonalizedMailMagazineCampaignDetail";
|
|
142
|
+
id: number;
|
|
143
|
+
status: components["schemas"]["CampaignStatus"];
|
|
144
|
+
title: string | null;
|
|
145
|
+
utmCampaign: string | null;
|
|
146
|
+
/** Format: date-time */
|
|
147
|
+
scheduledDeliveryAt: string | null;
|
|
148
|
+
target: components["schemas"]["PersonalizedMailMagazineCampaignDetailTarget"] | null;
|
|
149
|
+
};
|
|
150
|
+
/** PersonalizedMailMagazineCampaignDetailTarget */
|
|
151
|
+
PersonalizedMailMagazineCampaignDetailTarget: {
|
|
152
|
+
csvFileName: string;
|
|
153
|
+
targetUsersCount: number;
|
|
154
|
+
excludedUsersCount: number;
|
|
155
|
+
};
|
|
156
|
+
/** CurationMailMagazineCampaignDetail */
|
|
157
|
+
CurationMailMagazineCampaignDetail: {
|
|
158
|
+
/** @enum {string} */
|
|
159
|
+
__type: "CurationMailMagazineCampaignDetail";
|
|
160
|
+
id: number;
|
|
161
|
+
};
|
|
106
162
|
/**
|
|
107
163
|
* Pagination
|
|
108
164
|
* @description ページネーション
|
|
@@ -182,6 +238,22 @@ interface operations {
|
|
|
182
238
|
};
|
|
183
239
|
};
|
|
184
240
|
};
|
|
241
|
+
/** キャンペーン詳細を取得する */
|
|
242
|
+
GetCampaignsCampaignId: {
|
|
243
|
+
parameters: {
|
|
244
|
+
path: {
|
|
245
|
+
id: number;
|
|
246
|
+
};
|
|
247
|
+
};
|
|
248
|
+
responses: {
|
|
249
|
+
/** @description OK */
|
|
250
|
+
200: {
|
|
251
|
+
content: {
|
|
252
|
+
"application/json": components["schemas"]["GetCampaignsCampaignIdResponse"];
|
|
253
|
+
};
|
|
254
|
+
};
|
|
255
|
+
};
|
|
256
|
+
};
|
|
185
257
|
}
|
|
186
258
|
|
|
187
259
|
export type { $defs, components, external, operations, paths, webhooks };
|
package/dist/schemaType.d.ts
CHANGED
|
@@ -9,6 +9,10 @@ interface paths {
|
|
|
9
9
|
/** キャンペーンを作成する */
|
|
10
10
|
post: operations["PostCampaigns"];
|
|
11
11
|
};
|
|
12
|
+
"/api/campaigns/{id}": {
|
|
13
|
+
/** キャンペーン詳細を取得する */
|
|
14
|
+
get: operations["GetCampaignsCampaignId"];
|
|
15
|
+
};
|
|
12
16
|
}
|
|
13
17
|
type webhooks = Record<string, never>;
|
|
14
18
|
interface components {
|
|
@@ -103,6 +107,58 @@ interface components {
|
|
|
103
107
|
* @enum {string}
|
|
104
108
|
*/
|
|
105
109
|
CampaignKind: "curationMailMagazine" | "personalizedMailMagazine";
|
|
110
|
+
/**
|
|
111
|
+
* @example {
|
|
112
|
+
* "campaignDetail": {
|
|
113
|
+
* "__type": "PersonalizedMailMagazineCampaignDetail",
|
|
114
|
+
* "id": 0,
|
|
115
|
+
* "title": "title",
|
|
116
|
+
* "scheduledDeliveryAt": "2000-01-23T04:56:07.000Z",
|
|
117
|
+
* "utmCampaign": "utmCampaign",
|
|
118
|
+
* "status": "draft",
|
|
119
|
+
* "target": ""
|
|
120
|
+
* }
|
|
121
|
+
* }
|
|
122
|
+
*/
|
|
123
|
+
GetCampaignsCampaignIdResponse: {
|
|
124
|
+
campaignDetail: components["schemas"]["CampaignDetail"];
|
|
125
|
+
};
|
|
126
|
+
CampaignDetail: components["schemas"]["PersonalizedMailMagazineCampaignDetail"] | components["schemas"]["CurationMailMagazineCampaignDetail"];
|
|
127
|
+
/**
|
|
128
|
+
* PersonalizedMailMagazineCampaignDetail
|
|
129
|
+
* @example {
|
|
130
|
+
* "__type": "PersonalizedMailMagazineCampaignDetail",
|
|
131
|
+
* "id": 0,
|
|
132
|
+
* "title": "title",
|
|
133
|
+
* "scheduledDeliveryAt": "2000-01-23T04:56:07.000Z",
|
|
134
|
+
* "utmCampaign": "utmCampaign",
|
|
135
|
+
* "status": "draft",
|
|
136
|
+
* "target": ""
|
|
137
|
+
* }
|
|
138
|
+
*/
|
|
139
|
+
PersonalizedMailMagazineCampaignDetail: {
|
|
140
|
+
/** @enum {string} */
|
|
141
|
+
__type: "PersonalizedMailMagazineCampaignDetail";
|
|
142
|
+
id: number;
|
|
143
|
+
status: components["schemas"]["CampaignStatus"];
|
|
144
|
+
title: string | null;
|
|
145
|
+
utmCampaign: string | null;
|
|
146
|
+
/** Format: date-time */
|
|
147
|
+
scheduledDeliveryAt: string | null;
|
|
148
|
+
target: components["schemas"]["PersonalizedMailMagazineCampaignDetailTarget"] | null;
|
|
149
|
+
};
|
|
150
|
+
/** PersonalizedMailMagazineCampaignDetailTarget */
|
|
151
|
+
PersonalizedMailMagazineCampaignDetailTarget: {
|
|
152
|
+
csvFileName: string;
|
|
153
|
+
targetUsersCount: number;
|
|
154
|
+
excludedUsersCount: number;
|
|
155
|
+
};
|
|
156
|
+
/** CurationMailMagazineCampaignDetail */
|
|
157
|
+
CurationMailMagazineCampaignDetail: {
|
|
158
|
+
/** @enum {string} */
|
|
159
|
+
__type: "CurationMailMagazineCampaignDetail";
|
|
160
|
+
id: number;
|
|
161
|
+
};
|
|
106
162
|
/**
|
|
107
163
|
* Pagination
|
|
108
164
|
* @description ページネーション
|
|
@@ -182,6 +238,22 @@ interface operations {
|
|
|
182
238
|
};
|
|
183
239
|
};
|
|
184
240
|
};
|
|
241
|
+
/** キャンペーン詳細を取得する */
|
|
242
|
+
GetCampaignsCampaignId: {
|
|
243
|
+
parameters: {
|
|
244
|
+
path: {
|
|
245
|
+
id: number;
|
|
246
|
+
};
|
|
247
|
+
};
|
|
248
|
+
responses: {
|
|
249
|
+
/** @description OK */
|
|
250
|
+
200: {
|
|
251
|
+
content: {
|
|
252
|
+
"application/json": components["schemas"]["GetCampaignsCampaignIdResponse"];
|
|
253
|
+
};
|
|
254
|
+
};
|
|
255
|
+
};
|
|
256
|
+
};
|
|
185
257
|
}
|
|
186
258
|
|
|
187
259
|
export type { $defs, components, external, operations, paths, webhooks };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@readyfor/api-client-pigeon",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.170.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"build": "tsup"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@readyfor/api-client-base": "0.
|
|
27
|
+
"@readyfor/api-client-base": "0.170.0",
|
|
28
28
|
"@types/qs": "6.9.17",
|
|
29
29
|
"@types/react": "^18.3.12",
|
|
30
30
|
"@types/use-sync-external-store": "0.0.6",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"src"
|
|
66
66
|
]
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "aab00b75ac1a4258a65ab13a67e7b903c48698ae"
|
|
69
69
|
}
|
|
File without changes
|