@readyfor/api-client-pigeon 0.166.0 → 0.167.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-5ABKVLAJ.mjs +29 -0
- package/dist/{chunk-NPGTR3T2.mjs → chunk-6ZPXNB6H.mjs} +4 -0
- package/dist/{chunk-W3XGHP3T.mjs → chunk-HJV37TZY.mjs} +1 -1
- package/dist/components.d.mts +15 -1
- package/dist/components.d.ts +15 -1
- package/dist/components.js +8 -2
- package/dist/components.mjs +7 -3
- package/dist/fetch/campaigns.d.mts +14 -1
- package/dist/fetch/campaigns.d.ts +14 -1
- package/dist/fetch/campaigns.js +15 -2
- package/dist/fetch/campaigns.mjs +8 -4
- package/dist/hooks/index.js +2 -0
- package/dist/hooks/index.mjs +3 -3
- package/dist/hooks/useCampaigns.js +2 -0
- package/dist/hooks/useCampaigns.mjs +3 -3
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +19 -2
- package/dist/index.mjs +13 -5
- package/dist/schemaType.d.mts +36 -0
- package/dist/schemaType.d.ts +36 -0
- package/package.json +3 -3
- package/dist/chunk-IP4VOBPR.mjs +0 -19
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
GetCampaigns,
|
|
3
|
+
PostCampaignsResponse
|
|
4
|
+
} from "./chunk-6ZPXNB6H.mjs";
|
|
5
|
+
|
|
6
|
+
// src/fetch/campaigns.ts
|
|
7
|
+
import {
|
|
8
|
+
createJsonFetcher,
|
|
9
|
+
__internal__requestUrl
|
|
10
|
+
} from "@readyfor/api-client-base";
|
|
11
|
+
var buildCampaignsGetFetcher = (requestInit) => createJsonFetcher(GetCampaigns, { ...requestInit });
|
|
12
|
+
var getCampaigns = (query, requestInit) => buildCampaignsGetFetcher()(
|
|
13
|
+
__internal__requestUrl("/api/campaigns", {}, query),
|
|
14
|
+
{ ...requestInit, method: "GET" }
|
|
15
|
+
);
|
|
16
|
+
var buildCampaignsPostFetcher = (requestInit) => createJsonFetcher(PostCampaignsResponse, { ...requestInit });
|
|
17
|
+
var postCampaigns = (requestBody, requestInit) => buildCampaignsPostFetcher()(__internal__requestUrl("/api/campaigns"), {
|
|
18
|
+
...requestInit,
|
|
19
|
+
method: "POST",
|
|
20
|
+
headers: { ...requestInit?.headers, "Content-Type": "application/json" },
|
|
21
|
+
body: JSON.stringify(requestBody)
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export {
|
|
25
|
+
buildCampaignsGetFetcher,
|
|
26
|
+
getCampaigns,
|
|
27
|
+
buildCampaignsPostFetcher,
|
|
28
|
+
postCampaigns
|
|
29
|
+
};
|
|
@@ -30,6 +30,8 @@ var Campaign = z.object({
|
|
|
30
30
|
lastEditorName: z.string(),
|
|
31
31
|
lastEditedAt: z.string()
|
|
32
32
|
});
|
|
33
|
+
var PostCampaignsRequestBody = z.object({ kind: CampaignKind });
|
|
34
|
+
var PostCampaignsResponse = z.object({ id: z.number() });
|
|
33
35
|
var GetCampaigns = z.object({
|
|
34
36
|
campaigns: z.array(Campaign),
|
|
35
37
|
pagination: Pagination
|
|
@@ -40,5 +42,7 @@ export {
|
|
|
40
42
|
CampaignStatus,
|
|
41
43
|
Pagination,
|
|
42
44
|
Campaign,
|
|
45
|
+
PostCampaignsRequestBody,
|
|
46
|
+
PostCampaignsResponse,
|
|
43
47
|
GetCampaigns
|
|
44
48
|
};
|
package/dist/components.d.mts
CHANGED
|
@@ -55,6 +55,20 @@ declare const Campaign: z.ZodObject<{
|
|
|
55
55
|
lastEditedAt: string;
|
|
56
56
|
title?: string | null | undefined;
|
|
57
57
|
}>;
|
|
58
|
+
declare const PostCampaignsRequestBody: z.ZodObject<{
|
|
59
|
+
kind: z.ZodUnion<[z.ZodLiteral<"curationMailMagazine">, z.ZodLiteral<"personalizedMailMagazine">]>;
|
|
60
|
+
}, "strip", z.ZodTypeAny, {
|
|
61
|
+
kind: "curationMailMagazine" | "personalizedMailMagazine";
|
|
62
|
+
}, {
|
|
63
|
+
kind: "curationMailMagazine" | "personalizedMailMagazine";
|
|
64
|
+
}>;
|
|
65
|
+
declare const PostCampaignsResponse: z.ZodObject<{
|
|
66
|
+
id: z.ZodNumber;
|
|
67
|
+
}, "strip", z.ZodTypeAny, {
|
|
68
|
+
id: number;
|
|
69
|
+
}, {
|
|
70
|
+
id: number;
|
|
71
|
+
}>;
|
|
58
72
|
declare const GetCampaigns: z.ZodObject<{
|
|
59
73
|
campaigns: z.ZodArray<z.ZodObject<{
|
|
60
74
|
id: z.ZodNumber;
|
|
@@ -151,4 +165,4 @@ declare const GetCampaigns: z.ZodObject<{
|
|
|
151
165
|
};
|
|
152
166
|
}>;
|
|
153
167
|
|
|
154
|
-
export { Campaign, CampaignKind, CampaignStatus, GetCampaigns, Pagination };
|
|
168
|
+
export { Campaign, CampaignKind, CampaignStatus, GetCampaigns, Pagination, PostCampaignsRequestBody, PostCampaignsResponse };
|
package/dist/components.d.ts
CHANGED
|
@@ -55,6 +55,20 @@ declare const Campaign: z.ZodObject<{
|
|
|
55
55
|
lastEditedAt: string;
|
|
56
56
|
title?: string | null | undefined;
|
|
57
57
|
}>;
|
|
58
|
+
declare const PostCampaignsRequestBody: z.ZodObject<{
|
|
59
|
+
kind: z.ZodUnion<[z.ZodLiteral<"curationMailMagazine">, z.ZodLiteral<"personalizedMailMagazine">]>;
|
|
60
|
+
}, "strip", z.ZodTypeAny, {
|
|
61
|
+
kind: "curationMailMagazine" | "personalizedMailMagazine";
|
|
62
|
+
}, {
|
|
63
|
+
kind: "curationMailMagazine" | "personalizedMailMagazine";
|
|
64
|
+
}>;
|
|
65
|
+
declare const PostCampaignsResponse: z.ZodObject<{
|
|
66
|
+
id: z.ZodNumber;
|
|
67
|
+
}, "strip", z.ZodTypeAny, {
|
|
68
|
+
id: number;
|
|
69
|
+
}, {
|
|
70
|
+
id: number;
|
|
71
|
+
}>;
|
|
58
72
|
declare const GetCampaigns: z.ZodObject<{
|
|
59
73
|
campaigns: z.ZodArray<z.ZodObject<{
|
|
60
74
|
id: z.ZodNumber;
|
|
@@ -151,4 +165,4 @@ declare const GetCampaigns: z.ZodObject<{
|
|
|
151
165
|
};
|
|
152
166
|
}>;
|
|
153
167
|
|
|
154
|
-
export { Campaign, CampaignKind, CampaignStatus, GetCampaigns, Pagination };
|
|
168
|
+
export { Campaign, CampaignKind, CampaignStatus, GetCampaigns, Pagination, PostCampaignsRequestBody, PostCampaignsResponse };
|
package/dist/components.js
CHANGED
|
@@ -24,7 +24,9 @@ __export(components_exports, {
|
|
|
24
24
|
CampaignKind: () => CampaignKind,
|
|
25
25
|
CampaignStatus: () => CampaignStatus,
|
|
26
26
|
GetCampaigns: () => GetCampaigns,
|
|
27
|
-
Pagination: () => Pagination
|
|
27
|
+
Pagination: () => Pagination,
|
|
28
|
+
PostCampaignsRequestBody: () => PostCampaignsRequestBody,
|
|
29
|
+
PostCampaignsResponse: () => PostCampaignsResponse
|
|
28
30
|
});
|
|
29
31
|
module.exports = __toCommonJS(components_exports);
|
|
30
32
|
var import_zod = require("zod");
|
|
@@ -58,6 +60,8 @@ var Campaign = import_zod.z.object({
|
|
|
58
60
|
lastEditorName: import_zod.z.string(),
|
|
59
61
|
lastEditedAt: import_zod.z.string()
|
|
60
62
|
});
|
|
63
|
+
var PostCampaignsRequestBody = import_zod.z.object({ kind: CampaignKind });
|
|
64
|
+
var PostCampaignsResponse = import_zod.z.object({ id: import_zod.z.number() });
|
|
61
65
|
var GetCampaigns = import_zod.z.object({
|
|
62
66
|
campaigns: import_zod.z.array(Campaign),
|
|
63
67
|
pagination: Pagination
|
|
@@ -68,5 +72,7 @@ var GetCampaigns = import_zod.z.object({
|
|
|
68
72
|
CampaignKind,
|
|
69
73
|
CampaignStatus,
|
|
70
74
|
GetCampaigns,
|
|
71
|
-
Pagination
|
|
75
|
+
Pagination,
|
|
76
|
+
PostCampaignsRequestBody,
|
|
77
|
+
PostCampaignsResponse
|
|
72
78
|
});
|
package/dist/components.mjs
CHANGED
|
@@ -3,12 +3,16 @@ import {
|
|
|
3
3
|
CampaignKind,
|
|
4
4
|
CampaignStatus,
|
|
5
5
|
GetCampaigns,
|
|
6
|
-
Pagination
|
|
7
|
-
|
|
6
|
+
Pagination,
|
|
7
|
+
PostCampaignsRequestBody,
|
|
8
|
+
PostCampaignsResponse
|
|
9
|
+
} from "./chunk-6ZPXNB6H.mjs";
|
|
8
10
|
export {
|
|
9
11
|
Campaign,
|
|
10
12
|
CampaignKind,
|
|
11
13
|
CampaignStatus,
|
|
12
14
|
GetCampaigns,
|
|
13
|
-
Pagination
|
|
15
|
+
Pagination,
|
|
16
|
+
PostCampaignsRequestBody,
|
|
17
|
+
PostCampaignsResponse
|
|
14
18
|
};
|
|
@@ -49,5 +49,18 @@ declare const getCampaigns: (query: CampaignsGetQuery, requestInit?: RequestInit
|
|
|
49
49
|
isLastPage: boolean;
|
|
50
50
|
};
|
|
51
51
|
}>;
|
|
52
|
+
type CampaignsPostOperation = paths["/api/campaigns"]["post"];
|
|
53
|
+
type CampaignsPostResponse = CampaignsPostOperation["responses"]["201"]["content"]["application/json"];
|
|
54
|
+
declare const buildCampaignsPostFetcher: (requestInit?: RequestInit) => (input: RequestInfo, requestInit?: RequestInit) => Promise<{
|
|
55
|
+
id: number;
|
|
56
|
+
}>;
|
|
57
|
+
type CampaignsPostRequestBody = ForceDig<CampaignsPostOperation, [
|
|
58
|
+
"requestBody",
|
|
59
|
+
"content",
|
|
60
|
+
"application/json"
|
|
61
|
+
]>;
|
|
62
|
+
declare const postCampaigns: (requestBody: CampaignsPostRequestBody, requestInit?: RequestInit) => Promise<{
|
|
63
|
+
id: number;
|
|
64
|
+
}>;
|
|
52
65
|
|
|
53
|
-
export { type CampaignsGetQuery, type CampaignsGetResponse, buildCampaignsGetFetcher, getCampaigns };
|
|
66
|
+
export { type CampaignsGetQuery, type CampaignsGetResponse, type CampaignsPostRequestBody, type CampaignsPostResponse, buildCampaignsGetFetcher, buildCampaignsPostFetcher, getCampaigns, postCampaigns };
|
|
@@ -49,5 +49,18 @@ declare const getCampaigns: (query: CampaignsGetQuery, requestInit?: RequestInit
|
|
|
49
49
|
isLastPage: boolean;
|
|
50
50
|
};
|
|
51
51
|
}>;
|
|
52
|
+
type CampaignsPostOperation = paths["/api/campaigns"]["post"];
|
|
53
|
+
type CampaignsPostResponse = CampaignsPostOperation["responses"]["201"]["content"]["application/json"];
|
|
54
|
+
declare const buildCampaignsPostFetcher: (requestInit?: RequestInit) => (input: RequestInfo, requestInit?: RequestInit) => Promise<{
|
|
55
|
+
id: number;
|
|
56
|
+
}>;
|
|
57
|
+
type CampaignsPostRequestBody = ForceDig<CampaignsPostOperation, [
|
|
58
|
+
"requestBody",
|
|
59
|
+
"content",
|
|
60
|
+
"application/json"
|
|
61
|
+
]>;
|
|
62
|
+
declare const postCampaigns: (requestBody: CampaignsPostRequestBody, requestInit?: RequestInit) => Promise<{
|
|
63
|
+
id: number;
|
|
64
|
+
}>;
|
|
52
65
|
|
|
53
|
-
export { type CampaignsGetQuery, type CampaignsGetResponse, buildCampaignsGetFetcher, getCampaigns };
|
|
66
|
+
export { type CampaignsGetQuery, type CampaignsGetResponse, type CampaignsPostRequestBody, type CampaignsPostResponse, buildCampaignsGetFetcher, buildCampaignsPostFetcher, getCampaigns, postCampaigns };
|
package/dist/fetch/campaigns.js
CHANGED
|
@@ -21,7 +21,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var campaigns_exports = {};
|
|
22
22
|
__export(campaigns_exports, {
|
|
23
23
|
buildCampaignsGetFetcher: () => buildCampaignsGetFetcher,
|
|
24
|
-
|
|
24
|
+
buildCampaignsPostFetcher: () => buildCampaignsPostFetcher,
|
|
25
|
+
getCampaigns: () => getCampaigns,
|
|
26
|
+
postCampaigns: () => postCampaigns
|
|
25
27
|
});
|
|
26
28
|
module.exports = __toCommonJS(campaigns_exports);
|
|
27
29
|
var import_api_client_base = require("@readyfor/api-client-base");
|
|
@@ -58,6 +60,8 @@ var Campaign = import_zod.z.object({
|
|
|
58
60
|
lastEditorName: import_zod.z.string(),
|
|
59
61
|
lastEditedAt: import_zod.z.string()
|
|
60
62
|
});
|
|
63
|
+
var PostCampaignsRequestBody = import_zod.z.object({ kind: CampaignKind });
|
|
64
|
+
var PostCampaignsResponse = import_zod.z.object({ id: import_zod.z.number() });
|
|
61
65
|
var GetCampaigns = import_zod.z.object({
|
|
62
66
|
campaigns: import_zod.z.array(Campaign),
|
|
63
67
|
pagination: Pagination
|
|
@@ -69,8 +73,17 @@ var getCampaigns = (query, requestInit) => buildCampaignsGetFetcher()(
|
|
|
69
73
|
(0, import_api_client_base.__internal__requestUrl)("/api/campaigns", {}, query),
|
|
70
74
|
{ ...requestInit, method: "GET" }
|
|
71
75
|
);
|
|
76
|
+
var buildCampaignsPostFetcher = (requestInit) => (0, import_api_client_base.createJsonFetcher)(PostCampaignsResponse, { ...requestInit });
|
|
77
|
+
var postCampaigns = (requestBody, requestInit) => buildCampaignsPostFetcher()((0, import_api_client_base.__internal__requestUrl)("/api/campaigns"), {
|
|
78
|
+
...requestInit,
|
|
79
|
+
method: "POST",
|
|
80
|
+
headers: { ...requestInit?.headers, "Content-Type": "application/json" },
|
|
81
|
+
body: JSON.stringify(requestBody)
|
|
82
|
+
});
|
|
72
83
|
// Annotate the CommonJS export names for ESM import in node:
|
|
73
84
|
0 && (module.exports = {
|
|
74
85
|
buildCampaignsGetFetcher,
|
|
75
|
-
|
|
86
|
+
buildCampaignsPostFetcher,
|
|
87
|
+
getCampaigns,
|
|
88
|
+
postCampaigns
|
|
76
89
|
});
|
package/dist/fetch/campaigns.mjs
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildCampaignsGetFetcher,
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
buildCampaignsPostFetcher,
|
|
4
|
+
getCampaigns,
|
|
5
|
+
postCampaigns
|
|
6
|
+
} from "../chunk-5ABKVLAJ.mjs";
|
|
7
|
+
import "../chunk-6ZPXNB6H.mjs";
|
|
6
8
|
export {
|
|
7
9
|
buildCampaignsGetFetcher,
|
|
8
|
-
|
|
10
|
+
buildCampaignsPostFetcher,
|
|
11
|
+
getCampaigns,
|
|
12
|
+
postCampaigns
|
|
9
13
|
};
|
package/dist/hooks/index.js
CHANGED
|
@@ -75,6 +75,8 @@ var Campaign = import_zod.z.object({
|
|
|
75
75
|
lastEditorName: import_zod.z.string(),
|
|
76
76
|
lastEditedAt: import_zod.z.string()
|
|
77
77
|
});
|
|
78
|
+
var PostCampaignsRequestBody = import_zod.z.object({ kind: CampaignKind });
|
|
79
|
+
var PostCampaignsResponse = import_zod.z.object({ id: import_zod.z.number() });
|
|
78
80
|
var GetCampaigns = import_zod.z.object({
|
|
79
81
|
campaigns: import_zod.z.array(Campaign),
|
|
80
82
|
pagination: Pagination
|
package/dist/hooks/index.mjs
CHANGED
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
useCampaigns,
|
|
3
3
|
useCampaignsImmutable,
|
|
4
4
|
useCampaignsInfinite
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-HJV37TZY.mjs";
|
|
6
6
|
import "../chunk-WY7GF7TX.mjs";
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-5ABKVLAJ.mjs";
|
|
8
|
+
import "../chunk-6ZPXNB6H.mjs";
|
|
9
9
|
export {
|
|
10
10
|
useCampaigns,
|
|
11
11
|
useCampaignsImmutable,
|
|
@@ -73,6 +73,8 @@ var Campaign = import_zod.z.object({
|
|
|
73
73
|
lastEditorName: import_zod.z.string(),
|
|
74
74
|
lastEditedAt: import_zod.z.string()
|
|
75
75
|
});
|
|
76
|
+
var PostCampaignsRequestBody = import_zod.z.object({ kind: CampaignKind });
|
|
77
|
+
var PostCampaignsResponse = import_zod.z.object({ id: import_zod.z.number() });
|
|
76
78
|
var GetCampaigns = import_zod.z.object({
|
|
77
79
|
campaigns: import_zod.z.array(Campaign),
|
|
78
80
|
pagination: Pagination
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
useCampaigns,
|
|
3
3
|
useCampaignsImmutable,
|
|
4
4
|
useCampaignsInfinite
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-HJV37TZY.mjs";
|
|
6
6
|
import "../chunk-WY7GF7TX.mjs";
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-5ABKVLAJ.mjs";
|
|
8
|
+
import "../chunk-6ZPXNB6H.mjs";
|
|
9
9
|
export {
|
|
10
10
|
useCampaigns,
|
|
11
11
|
useCampaignsImmutable,
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { $defs, components, external, operations, paths, webhooks } from './schemaType.mjs';
|
|
2
|
-
export { Campaign, CampaignKind, CampaignStatus, GetCampaigns, Pagination } from './components.mjs';
|
|
3
|
-
export { CampaignsGetQuery, CampaignsGetResponse, buildCampaignsGetFetcher, getCampaigns } from './fetch/campaigns.mjs';
|
|
2
|
+
export { Campaign, CampaignKind, CampaignStatus, GetCampaigns, Pagination, PostCampaignsRequestBody, PostCampaignsResponse } from './components.mjs';
|
|
3
|
+
export { CampaignsGetQuery, CampaignsGetResponse, CampaignsPostRequestBody, CampaignsPostResponse, buildCampaignsGetFetcher, buildCampaignsPostFetcher, getCampaigns, postCampaigns } from './fetch/campaigns.mjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '@readyfor/api-client-base';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { $defs, components, external, operations, paths, webhooks } from './schemaType.js';
|
|
2
|
-
export { Campaign, CampaignKind, CampaignStatus, GetCampaigns, Pagination } from './components.js';
|
|
3
|
-
export { CampaignsGetQuery, CampaignsGetResponse, buildCampaignsGetFetcher, getCampaigns } from './fetch/campaigns.js';
|
|
2
|
+
export { Campaign, CampaignKind, CampaignStatus, GetCampaigns, Pagination, PostCampaignsRequestBody, PostCampaignsResponse } from './components.js';
|
|
3
|
+
export { CampaignsGetQuery, CampaignsGetResponse, CampaignsPostRequestBody, CampaignsPostResponse, buildCampaignsGetFetcher, buildCampaignsPostFetcher, getCampaigns, postCampaigns } from './fetch/campaigns.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '@readyfor/api-client-base';
|
package/dist/index.js
CHANGED
|
@@ -25,8 +25,12 @@ __export(src_exports, {
|
|
|
25
25
|
CampaignStatus: () => CampaignStatus,
|
|
26
26
|
GetCampaigns: () => GetCampaigns,
|
|
27
27
|
Pagination: () => Pagination,
|
|
28
|
+
PostCampaignsRequestBody: () => PostCampaignsRequestBody,
|
|
29
|
+
PostCampaignsResponse: () => PostCampaignsResponse,
|
|
28
30
|
buildCampaignsGetFetcher: () => buildCampaignsGetFetcher,
|
|
29
|
-
|
|
31
|
+
buildCampaignsPostFetcher: () => buildCampaignsPostFetcher,
|
|
32
|
+
getCampaigns: () => getCampaigns,
|
|
33
|
+
postCampaigns: () => postCampaigns
|
|
30
34
|
});
|
|
31
35
|
module.exports = __toCommonJS(src_exports);
|
|
32
36
|
|
|
@@ -62,6 +66,8 @@ var Campaign = import_zod.z.object({
|
|
|
62
66
|
lastEditorName: import_zod.z.string(),
|
|
63
67
|
lastEditedAt: import_zod.z.string()
|
|
64
68
|
});
|
|
69
|
+
var PostCampaignsRequestBody = import_zod.z.object({ kind: CampaignKind });
|
|
70
|
+
var PostCampaignsResponse = import_zod.z.object({ id: import_zod.z.number() });
|
|
65
71
|
var GetCampaigns = import_zod.z.object({
|
|
66
72
|
campaigns: import_zod.z.array(Campaign),
|
|
67
73
|
pagination: Pagination
|
|
@@ -74,6 +80,13 @@ var getCampaigns = (query, requestInit) => buildCampaignsGetFetcher()(
|
|
|
74
80
|
(0, import_api_client_base.__internal__requestUrl)("/api/campaigns", {}, query),
|
|
75
81
|
{ ...requestInit, method: "GET" }
|
|
76
82
|
);
|
|
83
|
+
var buildCampaignsPostFetcher = (requestInit) => (0, import_api_client_base.createJsonFetcher)(PostCampaignsResponse, { ...requestInit });
|
|
84
|
+
var postCampaigns = (requestBody, requestInit) => buildCampaignsPostFetcher()((0, import_api_client_base.__internal__requestUrl)("/api/campaigns"), {
|
|
85
|
+
...requestInit,
|
|
86
|
+
method: "POST",
|
|
87
|
+
headers: { ...requestInit?.headers, "Content-Type": "application/json" },
|
|
88
|
+
body: JSON.stringify(requestBody)
|
|
89
|
+
});
|
|
77
90
|
// Annotate the CommonJS export names for ESM import in node:
|
|
78
91
|
0 && (module.exports = {
|
|
79
92
|
Campaign,
|
|
@@ -81,6 +94,10 @@ var getCampaigns = (query, requestInit) => buildCampaignsGetFetcher()(
|
|
|
81
94
|
CampaignStatus,
|
|
82
95
|
GetCampaigns,
|
|
83
96
|
Pagination,
|
|
97
|
+
PostCampaignsRequestBody,
|
|
98
|
+
PostCampaignsResponse,
|
|
84
99
|
buildCampaignsGetFetcher,
|
|
85
|
-
|
|
100
|
+
buildCampaignsPostFetcher,
|
|
101
|
+
getCampaigns,
|
|
102
|
+
postCampaigns
|
|
86
103
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -1,21 +1,29 @@
|
|
|
1
1
|
import "./chunk-WY7GF7TX.mjs";
|
|
2
2
|
import {
|
|
3
3
|
buildCampaignsGetFetcher,
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
buildCampaignsPostFetcher,
|
|
5
|
+
getCampaigns,
|
|
6
|
+
postCampaigns
|
|
7
|
+
} from "./chunk-5ABKVLAJ.mjs";
|
|
6
8
|
import {
|
|
7
9
|
Campaign,
|
|
8
10
|
CampaignKind,
|
|
9
11
|
CampaignStatus,
|
|
10
12
|
GetCampaigns,
|
|
11
|
-
Pagination
|
|
12
|
-
|
|
13
|
+
Pagination,
|
|
14
|
+
PostCampaignsRequestBody,
|
|
15
|
+
PostCampaignsResponse
|
|
16
|
+
} from "./chunk-6ZPXNB6H.mjs";
|
|
13
17
|
export {
|
|
14
18
|
Campaign,
|
|
15
19
|
CampaignKind,
|
|
16
20
|
CampaignStatus,
|
|
17
21
|
GetCampaigns,
|
|
18
22
|
Pagination,
|
|
23
|
+
PostCampaignsRequestBody,
|
|
24
|
+
PostCampaignsResponse,
|
|
19
25
|
buildCampaignsGetFetcher,
|
|
20
|
-
|
|
26
|
+
buildCampaignsPostFetcher,
|
|
27
|
+
getCampaigns,
|
|
28
|
+
postCampaigns
|
|
21
29
|
};
|
package/dist/schemaType.d.mts
CHANGED
|
@@ -6,6 +6,8 @@ interface paths {
|
|
|
6
6
|
"/api/campaigns": {
|
|
7
7
|
/** キャンペーン一覧を取得する */
|
|
8
8
|
get: operations["GetCampaigns"];
|
|
9
|
+
/** キャンペーンを作成する */
|
|
10
|
+
post: operations["PostCampaigns"];
|
|
9
11
|
};
|
|
10
12
|
}
|
|
11
13
|
type webhooks = Record<string, never>;
|
|
@@ -73,6 +75,24 @@ interface components {
|
|
|
73
75
|
/** Format: date-time */
|
|
74
76
|
lastEditedAt: string;
|
|
75
77
|
};
|
|
78
|
+
/**
|
|
79
|
+
* PostCampaignsResponse
|
|
80
|
+
* @example {
|
|
81
|
+
* "id": 0
|
|
82
|
+
* }
|
|
83
|
+
*/
|
|
84
|
+
PostCampaignsResponse: {
|
|
85
|
+
id: number;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* PostCampaignsRequestBody
|
|
89
|
+
* @example {
|
|
90
|
+
* "kind": "curationMailMagazine"
|
|
91
|
+
* }
|
|
92
|
+
*/
|
|
93
|
+
PostCampaignsRequestBody: {
|
|
94
|
+
kind: components["schemas"]["CampaignKind"];
|
|
95
|
+
};
|
|
76
96
|
/**
|
|
77
97
|
* CampaignStatus
|
|
78
98
|
* @enum {string}
|
|
@@ -146,6 +166,22 @@ interface operations {
|
|
|
146
166
|
};
|
|
147
167
|
};
|
|
148
168
|
};
|
|
169
|
+
/** キャンペーンを作成する */
|
|
170
|
+
PostCampaigns: {
|
|
171
|
+
requestBody: {
|
|
172
|
+
content: {
|
|
173
|
+
"application/json": components["schemas"]["PostCampaignsRequestBody"];
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
responses: {
|
|
177
|
+
/** @description Created */
|
|
178
|
+
201: {
|
|
179
|
+
content: {
|
|
180
|
+
"application/json": components["schemas"]["PostCampaignsResponse"];
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
};
|
|
149
185
|
}
|
|
150
186
|
|
|
151
187
|
export type { $defs, components, external, operations, paths, webhooks };
|
package/dist/schemaType.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ interface paths {
|
|
|
6
6
|
"/api/campaigns": {
|
|
7
7
|
/** キャンペーン一覧を取得する */
|
|
8
8
|
get: operations["GetCampaigns"];
|
|
9
|
+
/** キャンペーンを作成する */
|
|
10
|
+
post: operations["PostCampaigns"];
|
|
9
11
|
};
|
|
10
12
|
}
|
|
11
13
|
type webhooks = Record<string, never>;
|
|
@@ -73,6 +75,24 @@ interface components {
|
|
|
73
75
|
/** Format: date-time */
|
|
74
76
|
lastEditedAt: string;
|
|
75
77
|
};
|
|
78
|
+
/**
|
|
79
|
+
* PostCampaignsResponse
|
|
80
|
+
* @example {
|
|
81
|
+
* "id": 0
|
|
82
|
+
* }
|
|
83
|
+
*/
|
|
84
|
+
PostCampaignsResponse: {
|
|
85
|
+
id: number;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* PostCampaignsRequestBody
|
|
89
|
+
* @example {
|
|
90
|
+
* "kind": "curationMailMagazine"
|
|
91
|
+
* }
|
|
92
|
+
*/
|
|
93
|
+
PostCampaignsRequestBody: {
|
|
94
|
+
kind: components["schemas"]["CampaignKind"];
|
|
95
|
+
};
|
|
76
96
|
/**
|
|
77
97
|
* CampaignStatus
|
|
78
98
|
* @enum {string}
|
|
@@ -146,6 +166,22 @@ interface operations {
|
|
|
146
166
|
};
|
|
147
167
|
};
|
|
148
168
|
};
|
|
169
|
+
/** キャンペーンを作成する */
|
|
170
|
+
PostCampaigns: {
|
|
171
|
+
requestBody: {
|
|
172
|
+
content: {
|
|
173
|
+
"application/json": components["schemas"]["PostCampaignsRequestBody"];
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
responses: {
|
|
177
|
+
/** @description Created */
|
|
178
|
+
201: {
|
|
179
|
+
content: {
|
|
180
|
+
"application/json": components["schemas"]["PostCampaignsResponse"];
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
};
|
|
149
185
|
}
|
|
150
186
|
|
|
151
187
|
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.167.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.167.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": "fc4d856ccad042d447df24653fa65eef27772cd3"
|
|
69
69
|
}
|
package/dist/chunk-IP4VOBPR.mjs
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
GetCampaigns
|
|
3
|
-
} from "./chunk-NPGTR3T2.mjs";
|
|
4
|
-
|
|
5
|
-
// src/fetch/campaigns.ts
|
|
6
|
-
import {
|
|
7
|
-
createJsonFetcher,
|
|
8
|
-
__internal__requestUrl
|
|
9
|
-
} from "@readyfor/api-client-base";
|
|
10
|
-
var buildCampaignsGetFetcher = (requestInit) => createJsonFetcher(GetCampaigns, { ...requestInit });
|
|
11
|
-
var getCampaigns = (query, requestInit) => buildCampaignsGetFetcher()(
|
|
12
|
-
__internal__requestUrl("/api/campaigns", {}, query),
|
|
13
|
-
{ ...requestInit, method: "GET" }
|
|
14
|
-
);
|
|
15
|
-
|
|
16
|
-
export {
|
|
17
|
-
buildCampaignsGetFetcher,
|
|
18
|
-
getCampaigns
|
|
19
|
-
};
|