@readyfor/api-client-pigeon 0.163.0 → 0.164.0-pr923.5bcb86f

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.
@@ -3,22 +3,117 @@
3
3
  * Do not make direct changes to the file.
4
4
  */
5
5
  interface paths {
6
- "/api/v1/example": {
7
- /** example */
8
- get: operations["V1Example"];
6
+ "/api/campaigns": {
7
+ /** キャンペーン一覧を取得する */
8
+ get: operations["GetCampaigns"];
9
9
  };
10
10
  }
11
11
  type webhooks = Record<string, never>;
12
12
  interface components {
13
13
  schemas: {
14
14
  /**
15
- * Example
15
+ * GetCampaigns
16
16
  * @example {
17
- * "value": "value"
17
+ * "pagination": {
18
+ * "nextPage": 7,
19
+ * "isLastPage": true,
20
+ * "totalPages": 6,
21
+ * "prevPage": 2,
22
+ * "totalCount": 1,
23
+ * "currentPage": 5,
24
+ * "isFirstPage": true,
25
+ * "currentPerPage": 5
26
+ * },
27
+ * "campaigns": [
28
+ * {
29
+ * "lastEditorName": "lastEditorName",
30
+ * "deliveryAt": "2000-01-23T04:56:07.000Z",
31
+ * "lastEditedAt": "2000-01-23T04:56:07.000Z",
32
+ * "id": 0,
33
+ * "title": "title",
34
+ * "type": "curationMailMagazine",
35
+ * "status": "draft"
36
+ * },
37
+ * {
38
+ * "lastEditorName": "lastEditorName",
39
+ * "deliveryAt": "2000-01-23T04:56:07.000Z",
40
+ * "lastEditedAt": "2000-01-23T04:56:07.000Z",
41
+ * "id": 0,
42
+ * "title": "title",
43
+ * "type": "curationMailMagazine",
44
+ * "status": "draft"
45
+ * }
46
+ * ]
18
47
  * }
19
48
  */
20
- ExampleModel: {
21
- value: string;
49
+ GetCampaigns: {
50
+ campaigns: components["schemas"]["Campaign"][];
51
+ pagination: components["schemas"]["Pagination"];
52
+ };
53
+ /**
54
+ * Campaign
55
+ * @example {
56
+ * "lastEditorName": "lastEditorName",
57
+ * "deliveryAt": "2000-01-23T04:56:07.000Z",
58
+ * "lastEditedAt": "2000-01-23T04:56:07.000Z",
59
+ * "id": 0,
60
+ * "title": "title",
61
+ * "type": "curationMailMagazine",
62
+ * "status": "draft"
63
+ * }
64
+ */
65
+ Campaign: {
66
+ id: number;
67
+ title?: string | null;
68
+ status: components["schemas"]["CampaignStatus"];
69
+ type: components["schemas"]["CampaignType"];
70
+ /** Format: date-time */
71
+ deliveryAt: string | null;
72
+ lastEditorName: string;
73
+ /** Format: date-time */
74
+ lastEditedAt: string;
75
+ };
76
+ /**
77
+ * CampaignStatus
78
+ * @enum {string}
79
+ */
80
+ CampaignStatus: "draft" | "scheduled" | "delivering" | "delivered" | "deliveryFailed";
81
+ /**
82
+ * CampaignType
83
+ * @enum {string}
84
+ */
85
+ CampaignType: "curationMailMagazine" | "personalizedMailMagazine";
86
+ /**
87
+ * Pagination
88
+ * @description ページネーション
89
+ * @example {
90
+ * "nextPage": 7,
91
+ * "isLastPage": true,
92
+ * "totalPages": 6,
93
+ * "prevPage": 2,
94
+ * "totalCount": 1,
95
+ * "currentPage": 5,
96
+ * "isFirstPage": true,
97
+ * "currentPerPage": 5
98
+ * }
99
+ */
100
+ Pagination: {
101
+ /** @description 合計ページ */
102
+ totalPages: number;
103
+ /** @description 合計件数 */
104
+ totalCount: number;
105
+ /** @description 1ページあたりのレコード数 */
106
+ currentPerPage: number;
107
+ /** @description 現在のページ */
108
+ currentPage: number;
109
+ /** @description 前のページ */
110
+ prevPage: number | null;
111
+ /** @description 次のページ */
112
+ nextPage: number | null;
113
+ /** @description 最初のページかどうか */
114
+ isFirstPage: boolean;
115
+ /** @description 最後のページかどうか */
116
+ isLastPage: boolean;
22
117
  };
23
118
  };
24
119
  responses: never;
@@ -30,13 +125,23 @@ interface components {
30
125
  type $defs = Record<string, never>;
31
126
  type external = Record<string, never>;
32
127
  interface operations {
33
- /** example */
34
- V1Example: {
128
+ /** キャンペーン一覧を取得する */
129
+ GetCampaigns: {
130
+ parameters: {
131
+ query?: {
132
+ title?: string;
133
+ status?: components["schemas"]["CampaignStatus"];
134
+ type?: components["schemas"]["CampaignType"];
135
+ deliveryAtFrom?: string;
136
+ deliveryAtTo?: string;
137
+ page?: number;
138
+ };
139
+ };
35
140
  responses: {
36
141
  /** @description OK */
37
142
  200: {
38
143
  content: {
39
- "application/json": components["schemas"]["ExampleModel"];
144
+ "application/json": components["schemas"]["GetCampaigns"];
40
145
  };
41
146
  };
42
147
  };
@@ -3,22 +3,117 @@
3
3
  * Do not make direct changes to the file.
4
4
  */
5
5
  interface paths {
6
- "/api/v1/example": {
7
- /** example */
8
- get: operations["V1Example"];
6
+ "/api/campaigns": {
7
+ /** キャンペーン一覧を取得する */
8
+ get: operations["GetCampaigns"];
9
9
  };
10
10
  }
11
11
  type webhooks = Record<string, never>;
12
12
  interface components {
13
13
  schemas: {
14
14
  /**
15
- * Example
15
+ * GetCampaigns
16
16
  * @example {
17
- * "value": "value"
17
+ * "pagination": {
18
+ * "nextPage": 7,
19
+ * "isLastPage": true,
20
+ * "totalPages": 6,
21
+ * "prevPage": 2,
22
+ * "totalCount": 1,
23
+ * "currentPage": 5,
24
+ * "isFirstPage": true,
25
+ * "currentPerPage": 5
26
+ * },
27
+ * "campaigns": [
28
+ * {
29
+ * "lastEditorName": "lastEditorName",
30
+ * "deliveryAt": "2000-01-23T04:56:07.000Z",
31
+ * "lastEditedAt": "2000-01-23T04:56:07.000Z",
32
+ * "id": 0,
33
+ * "title": "title",
34
+ * "type": "curationMailMagazine",
35
+ * "status": "draft"
36
+ * },
37
+ * {
38
+ * "lastEditorName": "lastEditorName",
39
+ * "deliveryAt": "2000-01-23T04:56:07.000Z",
40
+ * "lastEditedAt": "2000-01-23T04:56:07.000Z",
41
+ * "id": 0,
42
+ * "title": "title",
43
+ * "type": "curationMailMagazine",
44
+ * "status": "draft"
45
+ * }
46
+ * ]
18
47
  * }
19
48
  */
20
- ExampleModel: {
21
- value: string;
49
+ GetCampaigns: {
50
+ campaigns: components["schemas"]["Campaign"][];
51
+ pagination: components["schemas"]["Pagination"];
52
+ };
53
+ /**
54
+ * Campaign
55
+ * @example {
56
+ * "lastEditorName": "lastEditorName",
57
+ * "deliveryAt": "2000-01-23T04:56:07.000Z",
58
+ * "lastEditedAt": "2000-01-23T04:56:07.000Z",
59
+ * "id": 0,
60
+ * "title": "title",
61
+ * "type": "curationMailMagazine",
62
+ * "status": "draft"
63
+ * }
64
+ */
65
+ Campaign: {
66
+ id: number;
67
+ title?: string | null;
68
+ status: components["schemas"]["CampaignStatus"];
69
+ type: components["schemas"]["CampaignType"];
70
+ /** Format: date-time */
71
+ deliveryAt: string | null;
72
+ lastEditorName: string;
73
+ /** Format: date-time */
74
+ lastEditedAt: string;
75
+ };
76
+ /**
77
+ * CampaignStatus
78
+ * @enum {string}
79
+ */
80
+ CampaignStatus: "draft" | "scheduled" | "delivering" | "delivered" | "deliveryFailed";
81
+ /**
82
+ * CampaignType
83
+ * @enum {string}
84
+ */
85
+ CampaignType: "curationMailMagazine" | "personalizedMailMagazine";
86
+ /**
87
+ * Pagination
88
+ * @description ページネーション
89
+ * @example {
90
+ * "nextPage": 7,
91
+ * "isLastPage": true,
92
+ * "totalPages": 6,
93
+ * "prevPage": 2,
94
+ * "totalCount": 1,
95
+ * "currentPage": 5,
96
+ * "isFirstPage": true,
97
+ * "currentPerPage": 5
98
+ * }
99
+ */
100
+ Pagination: {
101
+ /** @description 合計ページ */
102
+ totalPages: number;
103
+ /** @description 合計件数 */
104
+ totalCount: number;
105
+ /** @description 1ページあたりのレコード数 */
106
+ currentPerPage: number;
107
+ /** @description 現在のページ */
108
+ currentPage: number;
109
+ /** @description 前のページ */
110
+ prevPage: number | null;
111
+ /** @description 次のページ */
112
+ nextPage: number | null;
113
+ /** @description 最初のページかどうか */
114
+ isFirstPage: boolean;
115
+ /** @description 最後のページかどうか */
116
+ isLastPage: boolean;
22
117
  };
23
118
  };
24
119
  responses: never;
@@ -30,13 +125,23 @@ interface components {
30
125
  type $defs = Record<string, never>;
31
126
  type external = Record<string, never>;
32
127
  interface operations {
33
- /** example */
34
- V1Example: {
128
+ /** キャンペーン一覧を取得する */
129
+ GetCampaigns: {
130
+ parameters: {
131
+ query?: {
132
+ title?: string;
133
+ status?: components["schemas"]["CampaignStatus"];
134
+ type?: components["schemas"]["CampaignType"];
135
+ deliveryAtFrom?: string;
136
+ deliveryAtTo?: string;
137
+ page?: number;
138
+ };
139
+ };
35
140
  responses: {
36
141
  /** @description OK */
37
142
  200: {
38
143
  content: {
39
- "application/json": components["schemas"]["ExampleModel"];
144
+ "application/json": components["schemas"]["GetCampaigns"];
40
145
  };
41
146
  };
42
147
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@readyfor/api-client-pigeon",
3
- "version": "0.163.0",
3
+ "version": "0.164.0-pr923.5bcb86f",
4
4
  "license": "SEE LICENSE IN LICENSE.md",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -20,11 +20,7 @@
20
20
  "require": "./dist/hooks/index.js"
21
21
  }
22
22
  },
23
- "scripts": {
24
- "build": "tsup"
25
- },
26
23
  "devDependencies": {
27
- "@readyfor/api-client-base": "0.163.0",
28
24
  "@types/qs": "6.9.17",
29
25
  "@types/react": "^18.3.12",
30
26
  "@types/use-sync-external-store": "0.0.6",
@@ -32,15 +28,16 @@
32
28
  "react": "^18.3.1",
33
29
  "swr": "^2.2.5",
34
30
  "use-sync-external-store": "^1.2.2",
35
- "zod": "^3.24.1"
31
+ "zod": "^3.24.1",
32
+ "@readyfor/api-client-base": "0.164.0-pr923.5bcb86f"
36
33
  },
37
34
  "peerDependencies": {
38
- "@readyfor/api-client-base": "*",
39
35
  "qs": "^6",
40
36
  "react": "^18",
41
37
  "swr": "^2",
42
38
  "use-sync-external-store": "1.2.2",
43
- "zod": "^3"
39
+ "zod": "^3",
40
+ "@readyfor/api-client-base": "0.164.0-pr923.5bcb86f"
44
41
  },
45
42
  "peerDependenciesMeta": {
46
43
  "react": {
@@ -65,5 +62,7 @@
65
62
  "src"
66
63
  ]
67
64
  },
68
- "gitHead": "43b05563c339eb1ad167636d1a51c544652742fa"
69
- }
65
+ "scripts": {
66
+ "build": "tsup"
67
+ }
68
+ }
@@ -1,7 +0,0 @@
1
- // src/components.ts
2
- import { z } from "zod";
3
- var ExampleModel = z.object({ value: z.string() });
4
-
5
- export {
6
- ExampleModel
7
- };
@@ -1,42 +0,0 @@
1
- import {
2
- buildV1ExampleGetFetcher
3
- } from "./chunk-R5STKOXL.mjs";
4
-
5
- // src/hooks/useV1Example.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 v1ExampleGetFetcher = buildV1ExampleGetFetcher();
12
- var useV1Example = (swrConfig) => {
13
- const key = __internal__requestUrl("/api/v1/example");
14
- const requestInit = useRequestInit();
15
- const result = useSWR(
16
- swrConfig?.shouldNotFetch ? null : key,
17
- buildV1ExampleGetFetcher(requestInit),
18
- swrConfig
19
- );
20
- return { key, ...result };
21
- };
22
- var useV1ExampleImmutable = (swrConfig) => {
23
- const key = __internal__requestUrl("/api/v1/example");
24
- const requestInit = useRequestInit();
25
- const result = useSWRImmutable(
26
- swrConfig?.shouldNotFetch ? null : key,
27
- buildV1ExampleGetFetcher(requestInit),
28
- swrConfig
29
- );
30
- return { key, ...result };
31
- };
32
- var useV1ExampleInfinite = (getKey, swrConfig) => useSWRInfinite(
33
- getKey(() => __internal__requestUrl()),
34
- v1ExampleGetFetcher,
35
- swrConfig
36
- );
37
-
38
- export {
39
- useV1Example,
40
- useV1ExampleImmutable,
41
- useV1ExampleInfinite
42
- };
@@ -1,19 +0,0 @@
1
- import {
2
- ExampleModel
3
- } from "./chunk-77MRBHHK.mjs";
4
-
5
- // src/fetch/v1Example.ts
6
- import {
7
- createJsonFetcher,
8
- __internal__requestUrl
9
- } from "@readyfor/api-client-base";
10
- var buildV1ExampleGetFetcher = (requestInit) => createJsonFetcher(ExampleModel, { ...requestInit });
11
- var getV1Example = (requestInit) => buildV1ExampleGetFetcher()(__internal__requestUrl("/api/v1/example"), {
12
- ...requestInit,
13
- method: "GET"
14
- });
15
-
16
- export {
17
- buildV1ExampleGetFetcher,
18
- getV1Example
19
- };
@@ -1,12 +0,0 @@
1
- import { paths } from '../schemaType.mjs';
2
-
3
- type V1ExampleGetOperation = paths["/api/v1/example"]["get"];
4
- type V1ExampleGetResponse = V1ExampleGetOperation["responses"]["200"]["content"]["application/json"];
5
- declare const buildV1ExampleGetFetcher: (requestInit?: RequestInit) => (input: RequestInfo, requestInit?: RequestInit) => Promise<{
6
- value: string;
7
- }>;
8
- declare const getV1Example: (requestInit?: RequestInit) => Promise<{
9
- value: string;
10
- }>;
11
-
12
- export { type V1ExampleGetResponse, buildV1ExampleGetFetcher, getV1Example };
@@ -1,12 +0,0 @@
1
- import { paths } from '../schemaType.js';
2
-
3
- type V1ExampleGetOperation = paths["/api/v1/example"]["get"];
4
- type V1ExampleGetResponse = V1ExampleGetOperation["responses"]["200"]["content"]["application/json"];
5
- declare const buildV1ExampleGetFetcher: (requestInit?: RequestInit) => (input: RequestInfo, requestInit?: RequestInit) => Promise<{
6
- value: string;
7
- }>;
8
- declare const getV1Example: (requestInit?: RequestInit) => Promise<{
9
- value: string;
10
- }>;
11
-
12
- export { type V1ExampleGetResponse, buildV1ExampleGetFetcher, getV1Example };
@@ -1,43 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/fetch/v1Example.ts
21
- var v1Example_exports = {};
22
- __export(v1Example_exports, {
23
- buildV1ExampleGetFetcher: () => buildV1ExampleGetFetcher,
24
- getV1Example: () => getV1Example
25
- });
26
- module.exports = __toCommonJS(v1Example_exports);
27
- var import_api_client_base = require("@readyfor/api-client-base");
28
-
29
- // src/components.ts
30
- var import_zod = require("zod");
31
- var ExampleModel = import_zod.z.object({ value: import_zod.z.string() });
32
-
33
- // src/fetch/v1Example.ts
34
- var buildV1ExampleGetFetcher = (requestInit) => (0, import_api_client_base.createJsonFetcher)(ExampleModel, { ...requestInit });
35
- var getV1Example = (requestInit) => buildV1ExampleGetFetcher()((0, import_api_client_base.__internal__requestUrl)("/api/v1/example"), {
36
- ...requestInit,
37
- method: "GET"
38
- });
39
- // Annotate the CommonJS export names for ESM import in node:
40
- 0 && (module.exports = {
41
- buildV1ExampleGetFetcher,
42
- getV1Example
43
- });
@@ -1,9 +0,0 @@
1
- import {
2
- buildV1ExampleGetFetcher,
3
- getV1Example
4
- } from "../chunk-R5STKOXL.mjs";
5
- import "../chunk-77MRBHHK.mjs";
6
- export {
7
- buildV1ExampleGetFetcher,
8
- getV1Example
9
- };
@@ -1,37 +0,0 @@
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 { Configuration } from '@readyfor/api-client-base/react';
6
- import { V1ExampleGetResponse } from '../fetch/v1Example.mjs';
7
- import '../schemaType.mjs';
8
-
9
- declare const useV1Example: (swrConfig?: Configuration<V1ExampleGetResponse>) => {
10
- data: {
11
- value: string;
12
- } | undefined;
13
- error: any;
14
- mutate: swr.KeyedMutator<{
15
- value: string;
16
- }>;
17
- isValidating: boolean;
18
- isLoading: boolean;
19
- key: string;
20
- };
21
- declare const useV1ExampleImmutable: (swrConfig?: Configuration<V1ExampleGetResponse>) => {
22
- data: {
23
- value: string;
24
- } | undefined;
25
- error: any;
26
- mutate: swr.KeyedMutator<{
27
- value: string;
28
- }>;
29
- isValidating: boolean;
30
- isLoading: boolean;
31
- key: string;
32
- };
33
- declare const useV1ExampleInfinite: <Args extends Arguments>(getKey: (keyBuilder: () => string) => SWRInfiniteKeyLoader<V1ExampleGetResponse, Args>, swrConfig?: SWRInfiniteConfiguration<V1ExampleGetResponse>) => swr_infinite.SWRInfiniteResponse<{
34
- value: string;
35
- }, any>;
36
-
37
- export { useV1Example, useV1ExampleImmutable, useV1ExampleInfinite };
@@ -1,37 +0,0 @@
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 { Configuration } from '@readyfor/api-client-base/react';
6
- import { V1ExampleGetResponse } from '../fetch/v1Example.js';
7
- import '../schemaType.js';
8
-
9
- declare const useV1Example: (swrConfig?: Configuration<V1ExampleGetResponse>) => {
10
- data: {
11
- value: string;
12
- } | undefined;
13
- error: any;
14
- mutate: swr.KeyedMutator<{
15
- value: string;
16
- }>;
17
- isValidating: boolean;
18
- isLoading: boolean;
19
- key: string;
20
- };
21
- declare const useV1ExampleImmutable: (swrConfig?: Configuration<V1ExampleGetResponse>) => {
22
- data: {
23
- value: string;
24
- } | undefined;
25
- error: any;
26
- mutate: swr.KeyedMutator<{
27
- value: string;
28
- }>;
29
- isValidating: boolean;
30
- isLoading: boolean;
31
- key: string;
32
- };
33
- declare const useV1ExampleInfinite: <Args extends Arguments>(getKey: (keyBuilder: () => string) => SWRInfiniteKeyLoader<V1ExampleGetResponse, Args>, swrConfig?: SWRInfiniteConfiguration<V1ExampleGetResponse>) => swr_infinite.SWRInfiniteResponse<{
34
- value: string;
35
- }, any>;
36
-
37
- export { useV1Example, useV1ExampleImmutable, useV1ExampleInfinite };
@@ -1,13 +0,0 @@
1
- import {
2
- useV1Example,
3
- useV1ExampleImmutable,
4
- useV1ExampleInfinite
5
- } from "../chunk-HJ4QTN4K.mjs";
6
- import "../chunk-WY7GF7TX.mjs";
7
- import "../chunk-R5STKOXL.mjs";
8
- import "../chunk-77MRBHHK.mjs";
9
- export {
10
- useV1Example,
11
- useV1ExampleImmutable,
12
- useV1ExampleInfinite
13
- };