@story-protocol/ipkit 0.4.0-beta.10

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.
Files changed (196) hide show
  1. package/README.md +183 -0
  2. package/dist/components/Accordion/Accordion.d.ts +8 -0
  3. package/dist/components/Accordion/Accordion.d.ts.map +1 -0
  4. package/dist/components/Accordion/__docs__/Accordion.stories.d.ts +18 -0
  5. package/dist/components/Accordion/__docs__/Accordion.stories.d.ts.map +1 -0
  6. package/dist/components/Accordion/index.d.ts +2 -0
  7. package/dist/components/Accordion/index.d.ts.map +1 -0
  8. package/dist/components/Button/Button.d.ts +13 -0
  9. package/dist/components/Button/Button.d.ts.map +1 -0
  10. package/dist/components/Button/__docs__/Button.stories.d.ts +23 -0
  11. package/dist/components/Button/__docs__/Button.stories.d.ts.map +1 -0
  12. package/dist/components/Button/index.d.ts +2 -0
  13. package/dist/components/Button/index.d.ts.map +1 -0
  14. package/dist/components/Calendar/Calendar.d.ts +9 -0
  15. package/dist/components/Calendar/Calendar.d.ts.map +1 -0
  16. package/dist/components/Calendar/index.d.ts +1 -0
  17. package/dist/components/Calendar/index.d.ts.map +1 -0
  18. package/dist/components/Checkbox/Checkbox.d.ts +9 -0
  19. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -0
  20. package/dist/components/Checkbox/__docs__/Checkbox.stories.d.ts +17 -0
  21. package/dist/components/Checkbox/__docs__/Checkbox.stories.d.ts.map +1 -0
  22. package/dist/components/Checkbox/index.d.ts +2 -0
  23. package/dist/components/Checkbox/index.d.ts.map +1 -0
  24. package/dist/components/DateInputPicker/DateInputPicker.d.ts +23 -0
  25. package/dist/components/DateInputPicker/DateInputPicker.d.ts.map +1 -0
  26. package/dist/components/DateInputPicker/__docs__/DateInputPicker.stories.d.ts +31 -0
  27. package/dist/components/DateInputPicker/__docs__/DateInputPicker.stories.d.ts.map +1 -0
  28. package/dist/components/DateInputPicker/dateUtils.d.ts +18 -0
  29. package/dist/components/DateInputPicker/dateUtils.d.ts.map +1 -0
  30. package/dist/components/DateInputPicker/index.d.ts +2 -0
  31. package/dist/components/DateInputPicker/index.d.ts.map +1 -0
  32. package/dist/components/Input/Input.d.ts +13 -0
  33. package/dist/components/Input/Input.d.ts.map +1 -0
  34. package/dist/components/Input/__docs__/Input.stories.d.ts +26 -0
  35. package/dist/components/Input/__docs__/Input.stories.d.ts.map +1 -0
  36. package/dist/components/Input/index.d.ts +2 -0
  37. package/dist/components/Input/index.d.ts.map +1 -0
  38. package/dist/components/Popover/Popover.d.ts +7 -0
  39. package/dist/components/Popover/Popover.d.ts.map +1 -0
  40. package/dist/components/Popover/__docs__/Popover.stories.d.ts +17 -0
  41. package/dist/components/Popover/__docs__/Popover.stories.d.ts.map +1 -0
  42. package/dist/components/Popover/index.d.ts +2 -0
  43. package/dist/components/Popover/index.d.ts.map +1 -0
  44. package/dist/components/RadioGroup/RadioGroup.d.ts +14 -0
  45. package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -0
  46. package/dist/components/RadioGroup/__docs__/RadioGroup.stories.d.ts +31 -0
  47. package/dist/components/RadioGroup/__docs__/RadioGroup.stories.d.ts.map +1 -0
  48. package/dist/components/RadioGroup/index.d.ts +2 -0
  49. package/dist/components/RadioGroup/index.d.ts.map +1 -0
  50. package/dist/components/index.d.ts +2 -0
  51. package/dist/components/index.d.ts.map +1 -0
  52. package/dist/components/utility/If.d.ts +9 -0
  53. package/dist/components/utility/If.d.ts.map +1 -0
  54. package/dist/components/utility/context.d.ts +12 -0
  55. package/dist/components/utility/context.d.ts.map +1 -0
  56. package/dist/constants/api.d.ts +5 -0
  57. package/dist/constants/api.d.ts.map +1 -0
  58. package/dist/constants/chains.d.ts +10 -0
  59. package/dist/constants/chains.d.ts.map +1 -0
  60. package/dist/constants/index.d.ts +3 -0
  61. package/dist/constants/index.d.ts.map +1 -0
  62. package/dist/constants/pil-flavors.d.ts +7 -0
  63. package/dist/constants/pil-flavors.d.ts.map +1 -0
  64. package/dist/hooks/index.d.ts +16 -0
  65. package/dist/hooks/index.d.ts.map +1 -0
  66. package/dist/hooks/stories/(components)/CopyText.d.ts +8 -0
  67. package/dist/hooks/stories/(components)/CopyText.d.ts.map +1 -0
  68. package/dist/hooks/stories/(components)/DataTable.d.ts +8 -0
  69. package/dist/hooks/stories/(components)/DataTable.d.ts.map +1 -0
  70. package/dist/hooks/stories/useCollection.stories.d.ts +20 -0
  71. package/dist/hooks/stories/useCollection.stories.d.ts.map +1 -0
  72. package/dist/hooks/stories/useCollections.stories.d.ts +28 -0
  73. package/dist/hooks/stories/useCollections.stories.d.ts.map +1 -0
  74. package/dist/hooks/stories/useDispute.stories.d.ts +20 -0
  75. package/dist/hooks/stories/useDispute.stories.d.ts.map +1 -0
  76. package/dist/hooks/stories/useDisputes.stories.d.ts +37 -0
  77. package/dist/hooks/stories/useDisputes.stories.d.ts.map +1 -0
  78. package/dist/hooks/stories/useIpAsset.stories.d.ts +21 -0
  79. package/dist/hooks/stories/useIpAsset.stories.d.ts.map +1 -0
  80. package/dist/hooks/stories/useIpAssetChildren.stories.d.ts +28 -0
  81. package/dist/hooks/stories/useIpAssetChildren.stories.d.ts.map +1 -0
  82. package/dist/hooks/stories/useIpAssetEdges.stories.d.ts +27 -0
  83. package/dist/hooks/stories/useIpAssetEdges.stories.d.ts.map +1 -0
  84. package/dist/hooks/stories/useIpAssetLicenses.stories.d.ts +20 -0
  85. package/dist/hooks/stories/useIpAssetLicenses.stories.d.ts.map +1 -0
  86. package/dist/hooks/stories/useIpAssetParents.stories.d.ts +28 -0
  87. package/dist/hooks/stories/useIpAssetParents.stories.d.ts.map +1 -0
  88. package/dist/hooks/stories/useIpAssets.stories.d.ts +38 -0
  89. package/dist/hooks/stories/useIpAssets.stories.d.ts.map +1 -0
  90. package/dist/hooks/stories/useIpAssetsByOwner.stories.d.ts +30 -0
  91. package/dist/hooks/stories/useIpAssetsByOwner.stories.d.ts.map +1 -0
  92. package/dist/hooks/stories/useLicenseTokens.stories.d.ts +38 -0
  93. package/dist/hooks/stories/useLicenseTokens.stories.d.ts.map +1 -0
  94. package/dist/hooks/stories/useSearch.stories.d.ts +19 -0
  95. package/dist/hooks/stories/useSearch.stories.d.ts.map +1 -0
  96. package/dist/hooks/stories/useTransaction.stories.d.ts +20 -0
  97. package/dist/hooks/stories/useTransaction.stories.d.ts.map +1 -0
  98. package/dist/hooks/stories/useTransactions.stories.d.ts +30 -0
  99. package/dist/hooks/stories/useTransactions.stories.d.ts.map +1 -0
  100. package/dist/hooks/useCollection.d.ts +10 -0
  101. package/dist/hooks/useCollection.d.ts.map +1 -0
  102. package/dist/hooks/useCollections.d.ts +11 -0
  103. package/dist/hooks/useCollections.d.ts.map +1 -0
  104. package/dist/hooks/useDispute.d.ts +8 -0
  105. package/dist/hooks/useDispute.d.ts.map +1 -0
  106. package/dist/hooks/useDisputes.d.ts +12 -0
  107. package/dist/hooks/useDisputes.d.ts.map +1 -0
  108. package/dist/hooks/useIpAsset.d.ts +11 -0
  109. package/dist/hooks/useIpAsset.d.ts.map +1 -0
  110. package/dist/hooks/useIpAssetChildren.d.ts +11 -0
  111. package/dist/hooks/useIpAssetChildren.d.ts.map +1 -0
  112. package/dist/hooks/useIpAssetEdges.d.ts +12 -0
  113. package/dist/hooks/useIpAssetEdges.d.ts.map +1 -0
  114. package/dist/hooks/useIpAssetLicenses.d.ts +10 -0
  115. package/dist/hooks/useIpAssetLicenses.d.ts.map +1 -0
  116. package/dist/hooks/useIpAssetParents.d.ts +11 -0
  117. package/dist/hooks/useIpAssetParents.d.ts.map +1 -0
  118. package/dist/hooks/useIpAssets.d.ts +14 -0
  119. package/dist/hooks/useIpAssets.d.ts.map +1 -0
  120. package/dist/hooks/useIpAssetsByOwner.d.ts +13 -0
  121. package/dist/hooks/useIpAssetsByOwner.d.ts.map +1 -0
  122. package/dist/hooks/useLicenseTokens.d.ts +12 -0
  123. package/dist/hooks/useLicenseTokens.d.ts.map +1 -0
  124. package/dist/hooks/useSearch.d.ts +10 -0
  125. package/dist/hooks/useSearch.d.ts.map +1 -0
  126. package/dist/hooks/useTransaction.d.ts +9 -0
  127. package/dist/hooks/useTransaction.d.ts.map +1 -0
  128. package/dist/hooks/useTransactions.d.ts +14 -0
  129. package/dist/hooks/useTransactions.d.ts.map +1 -0
  130. package/dist/index.d.ts +7 -0
  131. package/dist/index.d.ts.map +1 -0
  132. package/dist/lib/api/apiClient.d.ts +7 -0
  133. package/dist/lib/api/apiClient.d.ts.map +1 -0
  134. package/dist/lib/api/getCollections.d.ts +346 -0
  135. package/dist/lib/api/getCollections.d.ts.map +1 -0
  136. package/dist/lib/api/getDispute.d.ts +134 -0
  137. package/dist/lib/api/getDispute.d.ts.map +1 -0
  138. package/dist/lib/api/getDisputes.d.ts +320 -0
  139. package/dist/lib/api/getDisputes.d.ts.map +1 -0
  140. package/dist/lib/api/getIpAssetEdges.d.ts +292 -0
  141. package/dist/lib/api/getIpAssetEdges.d.ts.map +1 -0
  142. package/dist/lib/api/getIpAssets.d.ts +675 -0
  143. package/dist/lib/api/getIpAssets.d.ts.map +1 -0
  144. package/dist/lib/api/getLicenseTokens.d.ts +273 -0
  145. package/dist/lib/api/getLicenseTokens.d.ts.map +1 -0
  146. package/dist/lib/api/getQuery.d.ts +18 -0
  147. package/dist/lib/api/getQuery.d.ts.map +1 -0
  148. package/dist/lib/api/getSearch.d.ts +246 -0
  149. package/dist/lib/api/getSearch.d.ts.map +1 -0
  150. package/dist/lib/api/getTransactions.d.ts +292 -0
  151. package/dist/lib/api/getTransactions.d.ts.map +1 -0
  152. package/dist/lib/api/index.d.ts +10 -0
  153. package/dist/lib/api/index.d.ts.map +1 -0
  154. package/dist/lib/api/listQuery.d.ts +16 -0
  155. package/dist/lib/api/listQuery.d.ts.map +1 -0
  156. package/dist/lib/functions/convertLicenseTermObject.d.ts +6 -0
  157. package/dist/lib/functions/convertLicenseTermObject.d.ts.map +1 -0
  158. package/dist/lib/index.d.ts +4 -0
  159. package/dist/lib/index.d.ts.map +1 -0
  160. package/dist/lib/utils.d.ts +12 -0
  161. package/dist/lib/utils.d.ts.map +1 -0
  162. package/dist/providers/IpKitProvider/IpKitProvider.d.ts +25 -0
  163. package/dist/providers/IpKitProvider/IpKitProvider.d.ts.map +1 -0
  164. package/dist/providers/IpKitProvider/__docs__/Example.d.ts +11 -0
  165. package/dist/providers/IpKitProvider/__docs__/Example.d.ts.map +1 -0
  166. package/dist/providers/IpKitProvider/__docs__/IpKitProvider.stories.d.ts +37 -0
  167. package/dist/providers/IpKitProvider/__docs__/IpKitProvider.stories.d.ts.map +1 -0
  168. package/dist/providers/IpKitProvider/index.d.ts +2 -0
  169. package/dist/providers/IpKitProvider/index.d.ts.map +1 -0
  170. package/dist/providers/index.d.ts +2 -0
  171. package/dist/providers/index.d.ts.map +1 -0
  172. package/dist/server-types.d.ts +3868 -0
  173. package/dist/server.cjs.js +2 -0
  174. package/dist/server.cjs.js.map +1 -0
  175. package/dist/server.d.ts +4 -0
  176. package/dist/server.d.ts.map +1 -0
  177. package/dist/server.esm.js +2 -0
  178. package/dist/server.esm.js.map +1 -0
  179. package/dist/stories/data/index.d.ts +9 -0
  180. package/dist/stories/data/index.d.ts.map +1 -0
  181. package/dist/storyprotocol-storykit.cjs.js +2 -0
  182. package/dist/storyprotocol-storykit.cjs.js.map +1 -0
  183. package/dist/storyprotocol-storykit.esm.js +2 -0
  184. package/dist/storyprotocol-storykit.esm.js.map +1 -0
  185. package/dist/types/assets.d.ts +58 -0
  186. package/dist/types/assets.d.ts.map +1 -0
  187. package/dist/types/chains.d.ts +25 -0
  188. package/dist/types/chains.d.ts.map +1 -0
  189. package/dist/types/index.d.ts +4 -0
  190. package/dist/types/index.d.ts.map +1 -0
  191. package/dist/types/openapi.d.ts +31 -0
  192. package/dist/types/openapi.d.ts.map +1 -0
  193. package/dist/types/schema.d.ts +1168 -0
  194. package/dist/types/schema.d.ts.map +1 -0
  195. package/dist/types.d.ts +4004 -0
  196. package/package.json +132 -0
@@ -0,0 +1,273 @@
1
+ import { paths } from "@/types/schema";
2
+ import { Address } from "viem";
3
+ import { ApiClient } from "./apiClient";
4
+ export type LicenseTokensResponse = paths["/licenses/tokens"]["post"]["responses"][200]["content"]["application/json"];
5
+ export type LicenseTokensOptions = Partial<paths["/licenses/tokens"]["post"]["requestBody"]["content"]["application/json"]>;
6
+ export type GetLicenseTokensOptions = {
7
+ apiClient: ApiClient;
8
+ ownerAddress: Address;
9
+ licensorIpId?: Address;
10
+ options?: LicenseTokensOptions;
11
+ apiKey: string;
12
+ };
13
+ export declare function getLicenseTokens({ apiClient, ownerAddress, licensorIpId, options, apiKey }: GetLicenseTokensOptions): Promise<import("openapi-fetch").FetchResponse<{
14
+ parameters: {
15
+ query?: undefined;
16
+ header?: undefined;
17
+ path?: undefined;
18
+ cookie?: undefined;
19
+ };
20
+ requestBody: {
21
+ content: {
22
+ "application/json": {
23
+ readonly $schema?: string | undefined;
24
+ orderBy: "blockNumber";
25
+ orderDirection: "asc" | "desc";
26
+ pagination?: {
27
+ limit: number;
28
+ offset: number;
29
+ } | undefined;
30
+ where?: {
31
+ licensorIpId?: string | undefined;
32
+ ownerAddress?: string | undefined;
33
+ } | undefined;
34
+ };
35
+ };
36
+ };
37
+ responses: {
38
+ 200: {
39
+ headers: {
40
+ [name: string]: unknown;
41
+ };
42
+ content: {
43
+ "application/json": {
44
+ readonly $schema?: string | undefined;
45
+ data: {
46
+ blockNumber: string;
47
+ blockTime: string;
48
+ burntAt: string;
49
+ id: string;
50
+ licenseTemplate: string;
51
+ licenseTermsId: string;
52
+ licensorIpId: string;
53
+ owner: string;
54
+ transferable: string;
55
+ }[] | null;
56
+ pagination?: {
57
+ hasMore: boolean;
58
+ limit: number;
59
+ offset: number;
60
+ total: number;
61
+ } | undefined;
62
+ };
63
+ };
64
+ };
65
+ default: {
66
+ headers: {
67
+ [name: string]: unknown;
68
+ };
69
+ content: {
70
+ "application/problem+json": {
71
+ readonly $schema?: string | undefined;
72
+ detail?: string | undefined;
73
+ errors?: {
74
+ location?: string | undefined;
75
+ message?: string | undefined;
76
+ value?: unknown;
77
+ }[] | null | undefined;
78
+ instance?: string | undefined;
79
+ status?: number | undefined;
80
+ title?: string | undefined;
81
+ type: string;
82
+ };
83
+ };
84
+ };
85
+ };
86
+ }, {
87
+ params?: {
88
+ query?: undefined;
89
+ header?: undefined;
90
+ path?: undefined;
91
+ cookie?: undefined;
92
+ } | undefined;
93
+ } & {
94
+ body: {
95
+ readonly $schema?: string | undefined;
96
+ orderBy: "blockNumber";
97
+ orderDirection: "asc" | "desc";
98
+ pagination?: {
99
+ limit: number;
100
+ offset: number;
101
+ } | undefined;
102
+ where?: {
103
+ licensorIpId?: string | undefined;
104
+ ownerAddress?: string | undefined;
105
+ } | undefined;
106
+ };
107
+ } & {
108
+ baseUrl?: string | undefined;
109
+ querySerializer?: import("openapi-fetch").QuerySerializerOptions | import("openapi-fetch").QuerySerializer<{
110
+ parameters: {
111
+ query?: undefined;
112
+ header?: undefined;
113
+ path?: undefined;
114
+ cookie?: undefined;
115
+ };
116
+ requestBody: {
117
+ content: {
118
+ "application/json": {
119
+ readonly $schema?: string | undefined;
120
+ orderBy: "blockNumber";
121
+ orderDirection: "asc" | "desc";
122
+ pagination?: {
123
+ limit: number;
124
+ offset: number;
125
+ } | undefined;
126
+ where?: {
127
+ licensorIpId?: string | undefined;
128
+ ownerAddress?: string | undefined;
129
+ } | undefined;
130
+ };
131
+ };
132
+ };
133
+ responses: {
134
+ 200: {
135
+ headers: {
136
+ [name: string]: unknown;
137
+ };
138
+ content: {
139
+ "application/json": {
140
+ readonly $schema?: string | undefined;
141
+ data: {
142
+ blockNumber: string;
143
+ blockTime: string;
144
+ burntAt: string;
145
+ id: string;
146
+ licenseTemplate: string;
147
+ licenseTermsId: string;
148
+ licensorIpId: string;
149
+ owner: string;
150
+ transferable: string;
151
+ }[] | null;
152
+ pagination?: {
153
+ hasMore: boolean;
154
+ limit: number;
155
+ offset: number;
156
+ total: number;
157
+ } | undefined;
158
+ };
159
+ };
160
+ };
161
+ default: {
162
+ headers: {
163
+ [name: string]: unknown;
164
+ };
165
+ content: {
166
+ "application/problem+json": {
167
+ readonly $schema?: string | undefined;
168
+ detail?: string | undefined;
169
+ errors?: {
170
+ location?: string | undefined;
171
+ message?: string | undefined;
172
+ value?: unknown;
173
+ }[] | null | undefined;
174
+ instance?: string | undefined;
175
+ status?: number | undefined;
176
+ title?: string | undefined;
177
+ type: string;
178
+ };
179
+ };
180
+ };
181
+ };
182
+ }> | undefined;
183
+ bodySerializer?: import("openapi-fetch").BodySerializer<{
184
+ parameters: {
185
+ query?: undefined;
186
+ header?: undefined;
187
+ path?: undefined;
188
+ cookie?: undefined;
189
+ };
190
+ requestBody: {
191
+ content: {
192
+ "application/json": {
193
+ readonly $schema?: string | undefined;
194
+ orderBy: "blockNumber";
195
+ orderDirection: "asc" | "desc";
196
+ pagination?: {
197
+ limit: number;
198
+ offset: number;
199
+ } | undefined;
200
+ where?: {
201
+ licensorIpId?: string | undefined;
202
+ ownerAddress?: string | undefined;
203
+ } | undefined;
204
+ };
205
+ };
206
+ };
207
+ responses: {
208
+ 200: {
209
+ headers: {
210
+ [name: string]: unknown;
211
+ };
212
+ content: {
213
+ "application/json": {
214
+ readonly $schema?: string | undefined;
215
+ data: {
216
+ blockNumber: string;
217
+ blockTime: string;
218
+ burntAt: string;
219
+ id: string;
220
+ licenseTemplate: string;
221
+ licenseTermsId: string;
222
+ licensorIpId: string;
223
+ owner: string;
224
+ transferable: string;
225
+ }[] | null;
226
+ pagination?: {
227
+ hasMore: boolean;
228
+ limit: number;
229
+ offset: number;
230
+ total: number;
231
+ } | undefined;
232
+ };
233
+ };
234
+ };
235
+ default: {
236
+ headers: {
237
+ [name: string]: unknown;
238
+ };
239
+ content: {
240
+ "application/problem+json": {
241
+ readonly $schema?: string | undefined;
242
+ detail?: string | undefined;
243
+ errors?: {
244
+ location?: string | undefined;
245
+ message?: string | undefined;
246
+ value?: unknown;
247
+ }[] | null | undefined;
248
+ instance?: string | undefined;
249
+ status?: number | undefined;
250
+ title?: string | undefined;
251
+ type: string;
252
+ };
253
+ };
254
+ };
255
+ };
256
+ }> | undefined;
257
+ parseAs?: keyof import("openapi-fetch").BodyType<unknown> | undefined;
258
+ fetch?: ((input: Request) => Promise<Response>) | undefined;
259
+ headers?: import("openapi-fetch").HeadersOptions | undefined;
260
+ } & Omit<RequestInit, "headers" | "body"> & {
261
+ readonly $schema?: string | undefined;
262
+ orderBy: "blockNumber";
263
+ orderDirection: "asc" | "desc";
264
+ pagination?: {
265
+ limit: number;
266
+ offset: number;
267
+ } | undefined;
268
+ where?: {
269
+ licensorIpId?: string | undefined;
270
+ ownerAddress?: string | undefined;
271
+ } | undefined;
272
+ }, `${string}/${string}`>>;
273
+ //# sourceMappingURL=getLicenseTokens.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getLicenseTokens.d.ts","sourceRoot":"","sources":["../../../src/lib/api/getLicenseTokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAE9B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAGvC,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAA;AACtH,MAAM,MAAM,oBAAoB,GAAG,OAAO,CACxC,KAAK,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAChF,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG;IACpC,SAAS,EAAE,SAAS,CAAA;IACpB,YAAY,EAAE,OAAO,CAAA;IACrB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,OAAO,CAAC,EAAE,oBAAoB,CAAA;IAC9B,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,wBAAgB,gBAAgB,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAgBnH"}
@@ -0,0 +1,18 @@
1
+ import type { paths } from "@/types/schema";
2
+ import { FetchOptions } from "openapi-fetch";
3
+ import { HttpMethod, PathsWithMethod } from "openapi-typescript-helpers";
4
+ import { ApiClient } from "./apiClient";
5
+ type Paths<M extends HttpMethod> = PathsWithMethod<paths, M>;
6
+ type Params<M extends HttpMethod, P extends Paths<M>> = M extends keyof paths[P] ? FetchOptions<paths[P][M]> : never;
7
+ export type GetQueryParams<P extends Paths<"get">> = {
8
+ apiClient: ApiClient;
9
+ path: P;
10
+ apiKey: string;
11
+ pathParams?: Params<"get", P>["params"] extends {
12
+ path: any;
13
+ } ? Params<"get", P>["params"]["path"] : never;
14
+ additionalHeaders?: Record<string, string>;
15
+ };
16
+ export declare function getQuery<P extends Paths<"get">>({ apiClient, path, apiKey, pathParams, additionalHeaders, }: GetQueryParams<P>): Promise<import("openapi-fetch").FetchResponse<paths[P]["get"], Params<"get", P>, `${string}/${string}`>>;
17
+ export {};
18
+ //# sourceMappingURL=getQuery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getQuery.d.ts","sourceRoot":"","sources":["../../../src/lib/api/getQuery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAExE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC,KAAK,KAAK,CAAC,CAAC,SAAS,UAAU,IAAI,eAAe,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;AAC5D,KAAK,MAAM,CAAC,CAAC,SAAS,UAAU,EAAE,CAAC,SAAS,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,KAAK,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAA;AAEpH,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,KAAK,CAAC,KAAK,CAAC,IAAI;IACnD,SAAS,EAAE,SAAS,CAAA;IACpB,IAAI,EAAE,CAAC,CAAA;IACP,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS;QAAE,IAAI,EAAE,GAAG,CAAA;KAAE,GAAG,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,GAAG,KAAK,CAAA;IAC1G,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC3C,CAAA;AAED,wBAAgB,QAAQ,CAAC,CAAC,SAAS,KAAK,CAAC,KAAK,CAAC,EAAE,EAC/C,SAAS,EACT,IAAI,EACJ,MAAM,EACN,UAAU,EACV,iBAAiB,GAClB,EAAE,cAAc,CAAC,CAAC,CAAC,4GAYnB"}
@@ -0,0 +1,246 @@
1
+ import { paths } from "@/types/schema";
2
+ import { ApiClient } from "./apiClient";
3
+ export type SearchResponse = paths["/search"]["post"]["responses"][200]["content"]["application/json"];
4
+ export type SearchOptions = Partial<paths["/search"]["post"]["requestBody"]["content"]["application/json"]>;
5
+ export type GetSearchOptions = {
6
+ apiClient: ApiClient;
7
+ query: string;
8
+ mediaType?: "audio" | "video" | "image";
9
+ options?: SearchOptions;
10
+ apiKey: string;
11
+ };
12
+ export declare function getSearch({ apiClient, query, mediaType, options, apiKey }: GetSearchOptions): Promise<import("openapi-fetch").FetchResponse<{
13
+ parameters: {
14
+ query?: undefined;
15
+ header?: undefined;
16
+ path?: undefined;
17
+ cookie?: undefined;
18
+ };
19
+ requestBody: {
20
+ content: {
21
+ "application/json": {
22
+ readonly $schema?: string | undefined;
23
+ mediaType?: "audio" | "video" | "image" | undefined;
24
+ pagination?: {
25
+ limit: number;
26
+ offset: number;
27
+ } | undefined;
28
+ query: string;
29
+ };
30
+ };
31
+ };
32
+ responses: {
33
+ 200: {
34
+ headers: {
35
+ [name: string]: unknown;
36
+ };
37
+ content: {
38
+ "application/json": {
39
+ readonly $schema?: string | undefined;
40
+ data: {
41
+ description: string;
42
+ ipId: string;
43
+ mediaType: string;
44
+ score: number;
45
+ similarity: number;
46
+ title: string;
47
+ }[] | null;
48
+ pagination?: {
49
+ hasMore: boolean;
50
+ limit: number;
51
+ offset: number;
52
+ total: number;
53
+ } | undefined;
54
+ total: number;
55
+ };
56
+ };
57
+ };
58
+ default: {
59
+ headers: {
60
+ [name: string]: unknown;
61
+ };
62
+ content: {
63
+ "application/problem+json": {
64
+ readonly $schema?: string | undefined;
65
+ detail?: string | undefined;
66
+ errors?: {
67
+ location?: string | undefined;
68
+ message?: string | undefined;
69
+ value?: unknown;
70
+ }[] | null | undefined;
71
+ instance?: string | undefined;
72
+ status?: number | undefined;
73
+ title?: string | undefined;
74
+ type: string;
75
+ };
76
+ };
77
+ };
78
+ };
79
+ }, {
80
+ params?: {
81
+ query?: undefined;
82
+ header?: undefined;
83
+ path?: undefined;
84
+ cookie?: undefined;
85
+ } | undefined;
86
+ } & {
87
+ body: {
88
+ readonly $schema?: string | undefined;
89
+ mediaType?: "audio" | "video" | "image" | undefined;
90
+ pagination?: {
91
+ limit: number;
92
+ offset: number;
93
+ } | undefined;
94
+ query: string;
95
+ };
96
+ } & {
97
+ baseUrl?: string | undefined;
98
+ querySerializer?: import("openapi-fetch").QuerySerializerOptions | import("openapi-fetch").QuerySerializer<{
99
+ parameters: {
100
+ query?: undefined;
101
+ header?: undefined;
102
+ path?: undefined;
103
+ cookie?: undefined;
104
+ };
105
+ requestBody: {
106
+ content: {
107
+ "application/json": {
108
+ readonly $schema?: string | undefined;
109
+ mediaType?: "audio" | "video" | "image" | undefined;
110
+ pagination?: {
111
+ limit: number;
112
+ offset: number;
113
+ } | undefined;
114
+ query: string;
115
+ };
116
+ };
117
+ };
118
+ responses: {
119
+ 200: {
120
+ headers: {
121
+ [name: string]: unknown;
122
+ };
123
+ content: {
124
+ "application/json": {
125
+ readonly $schema?: string | undefined;
126
+ data: {
127
+ description: string;
128
+ ipId: string;
129
+ mediaType: string;
130
+ score: number;
131
+ similarity: number;
132
+ title: string;
133
+ }[] | null;
134
+ pagination?: {
135
+ hasMore: boolean;
136
+ limit: number;
137
+ offset: number;
138
+ total: number;
139
+ } | undefined;
140
+ total: number;
141
+ };
142
+ };
143
+ };
144
+ default: {
145
+ headers: {
146
+ [name: string]: unknown;
147
+ };
148
+ content: {
149
+ "application/problem+json": {
150
+ readonly $schema?: string | undefined;
151
+ detail?: string | undefined;
152
+ errors?: {
153
+ location?: string | undefined;
154
+ message?: string | undefined;
155
+ value?: unknown;
156
+ }[] | null | undefined;
157
+ instance?: string | undefined;
158
+ status?: number | undefined;
159
+ title?: string | undefined;
160
+ type: string;
161
+ };
162
+ };
163
+ };
164
+ };
165
+ }> | undefined;
166
+ bodySerializer?: import("openapi-fetch").BodySerializer<{
167
+ parameters: {
168
+ query?: undefined;
169
+ header?: undefined;
170
+ path?: undefined;
171
+ cookie?: undefined;
172
+ };
173
+ requestBody: {
174
+ content: {
175
+ "application/json": {
176
+ readonly $schema?: string | undefined;
177
+ mediaType?: "audio" | "video" | "image" | undefined;
178
+ pagination?: {
179
+ limit: number;
180
+ offset: number;
181
+ } | undefined;
182
+ query: string;
183
+ };
184
+ };
185
+ };
186
+ responses: {
187
+ 200: {
188
+ headers: {
189
+ [name: string]: unknown;
190
+ };
191
+ content: {
192
+ "application/json": {
193
+ readonly $schema?: string | undefined;
194
+ data: {
195
+ description: string;
196
+ ipId: string;
197
+ mediaType: string;
198
+ score: number;
199
+ similarity: number;
200
+ title: string;
201
+ }[] | null;
202
+ pagination?: {
203
+ hasMore: boolean;
204
+ limit: number;
205
+ offset: number;
206
+ total: number;
207
+ } | undefined;
208
+ total: number;
209
+ };
210
+ };
211
+ };
212
+ default: {
213
+ headers: {
214
+ [name: string]: unknown;
215
+ };
216
+ content: {
217
+ "application/problem+json": {
218
+ readonly $schema?: string | undefined;
219
+ detail?: string | undefined;
220
+ errors?: {
221
+ location?: string | undefined;
222
+ message?: string | undefined;
223
+ value?: unknown;
224
+ }[] | null | undefined;
225
+ instance?: string | undefined;
226
+ status?: number | undefined;
227
+ title?: string | undefined;
228
+ type: string;
229
+ };
230
+ };
231
+ };
232
+ };
233
+ }> | undefined;
234
+ parseAs?: keyof import("openapi-fetch").BodyType<unknown> | undefined;
235
+ fetch?: ((input: Request) => Promise<Response>) | undefined;
236
+ headers?: import("openapi-fetch").HeadersOptions | undefined;
237
+ } & Omit<RequestInit, "headers" | "body"> & {
238
+ readonly $schema?: string | undefined;
239
+ mediaType?: "audio" | "video" | "image" | undefined;
240
+ pagination?: {
241
+ limit: number;
242
+ offset: number;
243
+ } | undefined;
244
+ query: string;
245
+ }, `${string}/${string}`>>;
246
+ //# sourceMappingURL=getSearch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSearch.d.ts","sourceRoot":"","sources":["../../../src/lib/api/getSearch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAEtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAGvC,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAA;AAEtG,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAA;AAE3G,MAAM,MAAM,gBAAgB,GAAG;IAC7B,SAAS,EAAE,SAAS,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,CAAA;IACvC,OAAO,CAAC,EAAE,aAAa,CAAA;IACvB,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,wBAAgB,SAAS,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAW3F"}