@iblai/data-layer 1.16.0 → 1.18.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/index.d.ts +423 -2
- package/dist/index.esm.js +66 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +70 -1
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/src/features/analytics/types.d.ts +11 -0
- package/dist/src/features/search/__tests__/api-slice.test.d.ts +1 -0
- package/dist/src/features/search/__tests__/url.test.d.ts +1 -0
- package/dist/src/features/search/api-slice.d.ts +304 -0
- package/dist/src/features/search/constants.d.ts +15 -0
- package/dist/src/features/search/types.d.ts +81 -0
- package/dist/src/features/search/url.d.ts +10 -0
- package/dist/src/features/utils.d.ts +9 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/package.json
CHANGED
|
@@ -331,6 +331,8 @@ export interface UserDetailsStatsArgs {
|
|
|
331
331
|
}
|
|
332
332
|
export interface UserDetailsStatsResponse {
|
|
333
333
|
results: Array<{
|
|
334
|
+
/** Null for users the backend could not attribute to an account. */
|
|
335
|
+
username?: string | null;
|
|
334
336
|
email: string;
|
|
335
337
|
full_name: string;
|
|
336
338
|
messages: number;
|
|
@@ -522,6 +524,10 @@ export interface ContentAnalyticsArgs {
|
|
|
522
524
|
page?: number;
|
|
523
525
|
platform_key?: string;
|
|
524
526
|
mentor_unique_id?: string;
|
|
527
|
+
/** Free-text filter over the content list. */
|
|
528
|
+
search?: string;
|
|
529
|
+
/** Column the content list is ordered by, e.g. `active_enrollments`. */
|
|
530
|
+
sort_by?: string;
|
|
525
531
|
}
|
|
526
532
|
export interface ContentAnalyticsTotals {
|
|
527
533
|
total_learners: number;
|
|
@@ -572,6 +578,11 @@ export interface ContentAnalyticsPagination {
|
|
|
572
578
|
}
|
|
573
579
|
export interface ContentAnalyticsItem {
|
|
574
580
|
id: string;
|
|
581
|
+
/**
|
|
582
|
+
* The id the program's own page is keyed by, which is not the `id` this
|
|
583
|
+
* list reports on. Programs only — course rows carry no such field.
|
|
584
|
+
*/
|
|
585
|
+
program_id?: string;
|
|
575
586
|
name: string;
|
|
576
587
|
slug: string;
|
|
577
588
|
platform: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { GlobalSearchArgs, GlobalSearchResponse } from './types';
|
|
2
|
+
export { buildGlobalSearchUrl } from './url';
|
|
1
3
|
export declare const searchApiSlice: import("@reduxjs/toolkit/query").Api<import("@reduxjs/toolkit/query").BaseQueryFn<void, unknown, unknown, {
|
|
2
4
|
attempt?: number;
|
|
3
5
|
} & import("@reduxjs/toolkit/query").RetryOptions, {}>, {
|
|
@@ -71,6 +73,9 @@ export declare const searchApiSlice: import("@reduxjs/toolkit/query").Api<import
|
|
|
71
73
|
}], import("@reduxjs/toolkit/query").BaseQueryFn<void, unknown, unknown, {
|
|
72
74
|
attempt?: number;
|
|
73
75
|
} & import("@reduxjs/toolkit/query").RetryOptions, {}>, never, import("@iblai/iblai-api").GlobalCatalogSearchResponse, "searchApiSlice", any>;
|
|
76
|
+
getSearchGlobal: import("@reduxjs/toolkit/query").QueryDefinition<[(GlobalSearchArgs | undefined)?], import("@reduxjs/toolkit/query").BaseQueryFn<void, unknown, unknown, {
|
|
77
|
+
attempt?: number;
|
|
78
|
+
} & import("@reduxjs/toolkit/query").RetryOptions, {}>, never, GlobalSearchResponse, "searchApiSlice", any>;
|
|
74
79
|
}, "searchApiSlice", never, typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/dist/query/react").reactHooksModuleName>;
|
|
75
80
|
export declare const useGetPersonnalizedSearchQuery: <R extends Record<string, any> = import("@reduxjs/toolkit/query").TSHelpersId<(Omit<{
|
|
76
81
|
status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
|
|
@@ -2014,4 +2019,303 @@ export declare const useGetPersonnalizedSearchQuery: <R extends Record<string, a
|
|
|
2014
2019
|
topics?: Array<string>;
|
|
2015
2020
|
updateFacet?: string;
|
|
2016
2021
|
}];
|
|
2022
|
+
}], useGetSearchGlobalQuery: <R extends Record<string, any> = import("@reduxjs/toolkit/query").TSHelpersId<(Omit<{
|
|
2023
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
|
|
2024
|
+
originalArgs?: undefined | undefined;
|
|
2025
|
+
data?: undefined | undefined;
|
|
2026
|
+
error?: undefined | undefined;
|
|
2027
|
+
requestId?: undefined | undefined;
|
|
2028
|
+
endpointName?: string | undefined;
|
|
2029
|
+
startedTimeStamp?: undefined | undefined;
|
|
2030
|
+
fulfilledTimeStamp?: undefined | undefined;
|
|
2031
|
+
} & {
|
|
2032
|
+
currentData?: GlobalSearchResponse | undefined;
|
|
2033
|
+
isUninitialized: false;
|
|
2034
|
+
isLoading: false;
|
|
2035
|
+
isFetching: false;
|
|
2036
|
+
isSuccess: false;
|
|
2037
|
+
isError: false;
|
|
2038
|
+
}, "isUninitialized"> & {
|
|
2039
|
+
isUninitialized: true;
|
|
2040
|
+
}) | import("@reduxjs/toolkit/query").TSHelpersOverride<import("@reduxjs/toolkit/query").QuerySubState<import("@reduxjs/toolkit/query").QueryDefinition<[(GlobalSearchArgs | undefined)?], import("@reduxjs/toolkit/query").BaseQueryFn<void, unknown, unknown, {
|
|
2041
|
+
attempt?: number;
|
|
2042
|
+
} & import("@reduxjs/toolkit/query").RetryOptions, {}>, never, GlobalSearchResponse, "searchApiSlice", any>> & {
|
|
2043
|
+
currentData?: GlobalSearchResponse | undefined;
|
|
2044
|
+
isUninitialized: false;
|
|
2045
|
+
isLoading: false;
|
|
2046
|
+
isFetching: false;
|
|
2047
|
+
isSuccess: false;
|
|
2048
|
+
isError: false;
|
|
2049
|
+
}, {
|
|
2050
|
+
isLoading: true;
|
|
2051
|
+
isFetching: boolean;
|
|
2052
|
+
data: undefined;
|
|
2053
|
+
} | ({
|
|
2054
|
+
isSuccess: true;
|
|
2055
|
+
isFetching: true;
|
|
2056
|
+
error: undefined;
|
|
2057
|
+
} & Required<Pick<import("@reduxjs/toolkit/query").QuerySubState<import("@reduxjs/toolkit/query").QueryDefinition<[(GlobalSearchArgs | undefined)?], import("@reduxjs/toolkit/query").BaseQueryFn<void, unknown, unknown, {
|
|
2058
|
+
attempt?: number;
|
|
2059
|
+
} & import("@reduxjs/toolkit/query").RetryOptions, {}>, never, GlobalSearchResponse, "searchApiSlice", any>> & {
|
|
2060
|
+
currentData?: GlobalSearchResponse | undefined;
|
|
2061
|
+
isUninitialized: false;
|
|
2062
|
+
isLoading: false;
|
|
2063
|
+
isFetching: false;
|
|
2064
|
+
isSuccess: false;
|
|
2065
|
+
isError: false;
|
|
2066
|
+
}, "data" | "fulfilledTimeStamp">>) | ({
|
|
2067
|
+
isSuccess: true;
|
|
2068
|
+
isFetching: false;
|
|
2069
|
+
error: undefined;
|
|
2070
|
+
} & Required<Pick<import("@reduxjs/toolkit/query").QuerySubState<import("@reduxjs/toolkit/query").QueryDefinition<[(GlobalSearchArgs | undefined)?], import("@reduxjs/toolkit/query").BaseQueryFn<void, unknown, unknown, {
|
|
2071
|
+
attempt?: number;
|
|
2072
|
+
} & import("@reduxjs/toolkit/query").RetryOptions, {}>, never, GlobalSearchResponse, "searchApiSlice", any>> & {
|
|
2073
|
+
currentData?: GlobalSearchResponse | undefined;
|
|
2074
|
+
isUninitialized: false;
|
|
2075
|
+
isLoading: false;
|
|
2076
|
+
isFetching: false;
|
|
2077
|
+
isSuccess: false;
|
|
2078
|
+
isError: false;
|
|
2079
|
+
}, "data" | "fulfilledTimeStamp" | "currentData">>) | ({
|
|
2080
|
+
isError: true;
|
|
2081
|
+
} & Required<Pick<import("@reduxjs/toolkit/query").QuerySubState<import("@reduxjs/toolkit/query").QueryDefinition<[(GlobalSearchArgs | undefined)?], import("@reduxjs/toolkit/query").BaseQueryFn<void, unknown, unknown, {
|
|
2082
|
+
attempt?: number;
|
|
2083
|
+
} & import("@reduxjs/toolkit/query").RetryOptions, {}>, never, GlobalSearchResponse, "searchApiSlice", any>> & {
|
|
2084
|
+
currentData?: GlobalSearchResponse | undefined;
|
|
2085
|
+
isUninitialized: false;
|
|
2086
|
+
isLoading: false;
|
|
2087
|
+
isFetching: false;
|
|
2088
|
+
isSuccess: false;
|
|
2089
|
+
isError: false;
|
|
2090
|
+
}, "error">>)>> & {
|
|
2091
|
+
status: import("@reduxjs/toolkit/query").QueryStatus;
|
|
2092
|
+
}>(arg: [(GlobalSearchArgs | undefined)?] | typeof import("@reduxjs/toolkit/query").skipToken, options?: (import("@reduxjs/toolkit/query").SubscriptionOptions & {
|
|
2093
|
+
skip?: boolean;
|
|
2094
|
+
refetchOnMountOrArgChange?: boolean | number;
|
|
2095
|
+
} & {
|
|
2096
|
+
skip?: boolean;
|
|
2097
|
+
selectFromResult?: ((state: import("@reduxjs/toolkit/query").TSHelpersId<(Omit<{
|
|
2098
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
|
|
2099
|
+
originalArgs?: undefined | undefined;
|
|
2100
|
+
data?: undefined | undefined;
|
|
2101
|
+
error?: undefined | undefined;
|
|
2102
|
+
requestId?: undefined | undefined;
|
|
2103
|
+
endpointName?: string | undefined;
|
|
2104
|
+
startedTimeStamp?: undefined | undefined;
|
|
2105
|
+
fulfilledTimeStamp?: undefined | undefined;
|
|
2106
|
+
} & {
|
|
2107
|
+
currentData?: GlobalSearchResponse | undefined;
|
|
2108
|
+
isUninitialized: false;
|
|
2109
|
+
isLoading: false;
|
|
2110
|
+
isFetching: false;
|
|
2111
|
+
isSuccess: false;
|
|
2112
|
+
isError: false;
|
|
2113
|
+
}, "isUninitialized"> & {
|
|
2114
|
+
isUninitialized: true;
|
|
2115
|
+
}) | import("@reduxjs/toolkit/query").TSHelpersOverride<import("@reduxjs/toolkit/query").QuerySubState<import("@reduxjs/toolkit/query").QueryDefinition<[(GlobalSearchArgs | undefined)?], import("@reduxjs/toolkit/query").BaseQueryFn<void, unknown, unknown, {
|
|
2116
|
+
attempt?: number;
|
|
2117
|
+
} & import("@reduxjs/toolkit/query").RetryOptions, {}>, never, GlobalSearchResponse, "searchApiSlice", any>> & {
|
|
2118
|
+
currentData?: GlobalSearchResponse | undefined;
|
|
2119
|
+
isUninitialized: false;
|
|
2120
|
+
isLoading: false;
|
|
2121
|
+
isFetching: false;
|
|
2122
|
+
isSuccess: false;
|
|
2123
|
+
isError: false;
|
|
2124
|
+
}, {
|
|
2125
|
+
isLoading: true;
|
|
2126
|
+
isFetching: boolean;
|
|
2127
|
+
data: undefined;
|
|
2128
|
+
} | ({
|
|
2129
|
+
isSuccess: true;
|
|
2130
|
+
isFetching: true;
|
|
2131
|
+
error: undefined;
|
|
2132
|
+
} & Required<Pick<import("@reduxjs/toolkit/query").QuerySubState<import("@reduxjs/toolkit/query").QueryDefinition<[(GlobalSearchArgs | undefined)?], import("@reduxjs/toolkit/query").BaseQueryFn<void, unknown, unknown, {
|
|
2133
|
+
attempt?: number;
|
|
2134
|
+
} & import("@reduxjs/toolkit/query").RetryOptions, {}>, never, GlobalSearchResponse, "searchApiSlice", any>> & {
|
|
2135
|
+
currentData?: GlobalSearchResponse | undefined;
|
|
2136
|
+
isUninitialized: false;
|
|
2137
|
+
isLoading: false;
|
|
2138
|
+
isFetching: false;
|
|
2139
|
+
isSuccess: false;
|
|
2140
|
+
isError: false;
|
|
2141
|
+
}, "data" | "fulfilledTimeStamp">>) | ({
|
|
2142
|
+
isSuccess: true;
|
|
2143
|
+
isFetching: false;
|
|
2144
|
+
error: undefined;
|
|
2145
|
+
} & Required<Pick<import("@reduxjs/toolkit/query").QuerySubState<import("@reduxjs/toolkit/query").QueryDefinition<[(GlobalSearchArgs | undefined)?], import("@reduxjs/toolkit/query").BaseQueryFn<void, unknown, unknown, {
|
|
2146
|
+
attempt?: number;
|
|
2147
|
+
} & import("@reduxjs/toolkit/query").RetryOptions, {}>, never, GlobalSearchResponse, "searchApiSlice", any>> & {
|
|
2148
|
+
currentData?: GlobalSearchResponse | undefined;
|
|
2149
|
+
isUninitialized: false;
|
|
2150
|
+
isLoading: false;
|
|
2151
|
+
isFetching: false;
|
|
2152
|
+
isSuccess: false;
|
|
2153
|
+
isError: false;
|
|
2154
|
+
}, "data" | "fulfilledTimeStamp" | "currentData">>) | ({
|
|
2155
|
+
isError: true;
|
|
2156
|
+
} & Required<Pick<import("@reduxjs/toolkit/query").QuerySubState<import("@reduxjs/toolkit/query").QueryDefinition<[(GlobalSearchArgs | undefined)?], import("@reduxjs/toolkit/query").BaseQueryFn<void, unknown, unknown, {
|
|
2157
|
+
attempt?: number;
|
|
2158
|
+
} & import("@reduxjs/toolkit/query").RetryOptions, {}>, never, GlobalSearchResponse, "searchApiSlice", any>> & {
|
|
2159
|
+
currentData?: GlobalSearchResponse | undefined;
|
|
2160
|
+
isUninitialized: false;
|
|
2161
|
+
isLoading: false;
|
|
2162
|
+
isFetching: false;
|
|
2163
|
+
isSuccess: false;
|
|
2164
|
+
isError: false;
|
|
2165
|
+
}, "error">>)>> & {
|
|
2166
|
+
status: import("@reduxjs/toolkit/query").QueryStatus;
|
|
2167
|
+
}) => R) | undefined;
|
|
2168
|
+
}) | undefined) => [R][R extends any ? 0 : never] & {
|
|
2169
|
+
refetch: () => import("@reduxjs/toolkit/query").QueryActionCreatorResult<import("@reduxjs/toolkit/query").QueryDefinition<[(GlobalSearchArgs | undefined)?], import("@reduxjs/toolkit/query").BaseQueryFn<void, unknown, unknown, {
|
|
2170
|
+
attempt?: number;
|
|
2171
|
+
} & import("@reduxjs/toolkit/query").RetryOptions, {}>, never, GlobalSearchResponse, "searchApiSlice", any>>;
|
|
2172
|
+
}, useLazyGetSearchGlobalQuery: <R extends Record<string, any> = import("@reduxjs/toolkit/query").TSHelpersId<(Omit<{
|
|
2173
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
|
|
2174
|
+
originalArgs?: undefined | undefined;
|
|
2175
|
+
data?: undefined | undefined;
|
|
2176
|
+
error?: undefined | undefined;
|
|
2177
|
+
requestId?: undefined | undefined;
|
|
2178
|
+
endpointName?: string | undefined;
|
|
2179
|
+
startedTimeStamp?: undefined | undefined;
|
|
2180
|
+
fulfilledTimeStamp?: undefined | undefined;
|
|
2181
|
+
} & {
|
|
2182
|
+
currentData?: GlobalSearchResponse | undefined;
|
|
2183
|
+
isUninitialized: false;
|
|
2184
|
+
isLoading: false;
|
|
2185
|
+
isFetching: false;
|
|
2186
|
+
isSuccess: false;
|
|
2187
|
+
isError: false;
|
|
2188
|
+
}, "isUninitialized"> & {
|
|
2189
|
+
isUninitialized: true;
|
|
2190
|
+
}) | import("@reduxjs/toolkit/query").TSHelpersOverride<import("@reduxjs/toolkit/query").QuerySubState<import("@reduxjs/toolkit/query").QueryDefinition<[(GlobalSearchArgs | undefined)?], import("@reduxjs/toolkit/query").BaseQueryFn<void, unknown, unknown, {
|
|
2191
|
+
attempt?: number;
|
|
2192
|
+
} & import("@reduxjs/toolkit/query").RetryOptions, {}>, never, GlobalSearchResponse, "searchApiSlice", any>> & {
|
|
2193
|
+
currentData?: GlobalSearchResponse | undefined;
|
|
2194
|
+
isUninitialized: false;
|
|
2195
|
+
isLoading: false;
|
|
2196
|
+
isFetching: false;
|
|
2197
|
+
isSuccess: false;
|
|
2198
|
+
isError: false;
|
|
2199
|
+
}, {
|
|
2200
|
+
isLoading: true;
|
|
2201
|
+
isFetching: boolean;
|
|
2202
|
+
data: undefined;
|
|
2203
|
+
} | ({
|
|
2204
|
+
isSuccess: true;
|
|
2205
|
+
isFetching: true;
|
|
2206
|
+
error: undefined;
|
|
2207
|
+
} & Required<Pick<import("@reduxjs/toolkit/query").QuerySubState<import("@reduxjs/toolkit/query").QueryDefinition<[(GlobalSearchArgs | undefined)?], import("@reduxjs/toolkit/query").BaseQueryFn<void, unknown, unknown, {
|
|
2208
|
+
attempt?: number;
|
|
2209
|
+
} & import("@reduxjs/toolkit/query").RetryOptions, {}>, never, GlobalSearchResponse, "searchApiSlice", any>> & {
|
|
2210
|
+
currentData?: GlobalSearchResponse | undefined;
|
|
2211
|
+
isUninitialized: false;
|
|
2212
|
+
isLoading: false;
|
|
2213
|
+
isFetching: false;
|
|
2214
|
+
isSuccess: false;
|
|
2215
|
+
isError: false;
|
|
2216
|
+
}, "data" | "fulfilledTimeStamp">>) | ({
|
|
2217
|
+
isSuccess: true;
|
|
2218
|
+
isFetching: false;
|
|
2219
|
+
error: undefined;
|
|
2220
|
+
} & Required<Pick<import("@reduxjs/toolkit/query").QuerySubState<import("@reduxjs/toolkit/query").QueryDefinition<[(GlobalSearchArgs | undefined)?], import("@reduxjs/toolkit/query").BaseQueryFn<void, unknown, unknown, {
|
|
2221
|
+
attempt?: number;
|
|
2222
|
+
} & import("@reduxjs/toolkit/query").RetryOptions, {}>, never, GlobalSearchResponse, "searchApiSlice", any>> & {
|
|
2223
|
+
currentData?: GlobalSearchResponse | undefined;
|
|
2224
|
+
isUninitialized: false;
|
|
2225
|
+
isLoading: false;
|
|
2226
|
+
isFetching: false;
|
|
2227
|
+
isSuccess: false;
|
|
2228
|
+
isError: false;
|
|
2229
|
+
}, "data" | "fulfilledTimeStamp" | "currentData">>) | ({
|
|
2230
|
+
isError: true;
|
|
2231
|
+
} & Required<Pick<import("@reduxjs/toolkit/query").QuerySubState<import("@reduxjs/toolkit/query").QueryDefinition<[(GlobalSearchArgs | undefined)?], import("@reduxjs/toolkit/query").BaseQueryFn<void, unknown, unknown, {
|
|
2232
|
+
attempt?: number;
|
|
2233
|
+
} & import("@reduxjs/toolkit/query").RetryOptions, {}>, never, GlobalSearchResponse, "searchApiSlice", any>> & {
|
|
2234
|
+
currentData?: GlobalSearchResponse | undefined;
|
|
2235
|
+
isUninitialized: false;
|
|
2236
|
+
isLoading: false;
|
|
2237
|
+
isFetching: false;
|
|
2238
|
+
isSuccess: false;
|
|
2239
|
+
isError: false;
|
|
2240
|
+
}, "error">>)>> & {
|
|
2241
|
+
status: import("@reduxjs/toolkit/query").QueryStatus;
|
|
2242
|
+
}>(options?: (import("@reduxjs/toolkit/query").SubscriptionOptions & Omit<{
|
|
2243
|
+
skip?: boolean;
|
|
2244
|
+
selectFromResult?: ((state: import("@reduxjs/toolkit/query").TSHelpersId<(Omit<{
|
|
2245
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
|
|
2246
|
+
originalArgs?: undefined | undefined;
|
|
2247
|
+
data?: undefined | undefined;
|
|
2248
|
+
error?: undefined | undefined;
|
|
2249
|
+
requestId?: undefined | undefined;
|
|
2250
|
+
endpointName?: string | undefined;
|
|
2251
|
+
startedTimeStamp?: undefined | undefined;
|
|
2252
|
+
fulfilledTimeStamp?: undefined | undefined;
|
|
2253
|
+
} & {
|
|
2254
|
+
currentData?: GlobalSearchResponse | undefined;
|
|
2255
|
+
isUninitialized: false;
|
|
2256
|
+
isLoading: false;
|
|
2257
|
+
isFetching: false;
|
|
2258
|
+
isSuccess: false;
|
|
2259
|
+
isError: false;
|
|
2260
|
+
}, "isUninitialized"> & {
|
|
2261
|
+
isUninitialized: true;
|
|
2262
|
+
}) | import("@reduxjs/toolkit/query").TSHelpersOverride<import("@reduxjs/toolkit/query").QuerySubState<import("@reduxjs/toolkit/query").QueryDefinition<[(GlobalSearchArgs | undefined)?], import("@reduxjs/toolkit/query").BaseQueryFn<void, unknown, unknown, {
|
|
2263
|
+
attempt?: number;
|
|
2264
|
+
} & import("@reduxjs/toolkit/query").RetryOptions, {}>, never, GlobalSearchResponse, "searchApiSlice", any>> & {
|
|
2265
|
+
currentData?: GlobalSearchResponse | undefined;
|
|
2266
|
+
isUninitialized: false;
|
|
2267
|
+
isLoading: false;
|
|
2268
|
+
isFetching: false;
|
|
2269
|
+
isSuccess: false;
|
|
2270
|
+
isError: false;
|
|
2271
|
+
}, {
|
|
2272
|
+
isLoading: true;
|
|
2273
|
+
isFetching: boolean;
|
|
2274
|
+
data: undefined;
|
|
2275
|
+
} | ({
|
|
2276
|
+
isSuccess: true;
|
|
2277
|
+
isFetching: true;
|
|
2278
|
+
error: undefined;
|
|
2279
|
+
} & Required<Pick<import("@reduxjs/toolkit/query").QuerySubState<import("@reduxjs/toolkit/query").QueryDefinition<[(GlobalSearchArgs | undefined)?], import("@reduxjs/toolkit/query").BaseQueryFn<void, unknown, unknown, {
|
|
2280
|
+
attempt?: number;
|
|
2281
|
+
} & import("@reduxjs/toolkit/query").RetryOptions, {}>, never, GlobalSearchResponse, "searchApiSlice", any>> & {
|
|
2282
|
+
currentData?: GlobalSearchResponse | undefined;
|
|
2283
|
+
isUninitialized: false;
|
|
2284
|
+
isLoading: false;
|
|
2285
|
+
isFetching: false;
|
|
2286
|
+
isSuccess: false;
|
|
2287
|
+
isError: false;
|
|
2288
|
+
}, "data" | "fulfilledTimeStamp">>) | ({
|
|
2289
|
+
isSuccess: true;
|
|
2290
|
+
isFetching: false;
|
|
2291
|
+
error: undefined;
|
|
2292
|
+
} & Required<Pick<import("@reduxjs/toolkit/query").QuerySubState<import("@reduxjs/toolkit/query").QueryDefinition<[(GlobalSearchArgs | undefined)?], import("@reduxjs/toolkit/query").BaseQueryFn<void, unknown, unknown, {
|
|
2293
|
+
attempt?: number;
|
|
2294
|
+
} & import("@reduxjs/toolkit/query").RetryOptions, {}>, never, GlobalSearchResponse, "searchApiSlice", any>> & {
|
|
2295
|
+
currentData?: GlobalSearchResponse | undefined;
|
|
2296
|
+
isUninitialized: false;
|
|
2297
|
+
isLoading: false;
|
|
2298
|
+
isFetching: false;
|
|
2299
|
+
isSuccess: false;
|
|
2300
|
+
isError: false;
|
|
2301
|
+
}, "data" | "fulfilledTimeStamp" | "currentData">>) | ({
|
|
2302
|
+
isError: true;
|
|
2303
|
+
} & Required<Pick<import("@reduxjs/toolkit/query").QuerySubState<import("@reduxjs/toolkit/query").QueryDefinition<[(GlobalSearchArgs | undefined)?], import("@reduxjs/toolkit/query").BaseQueryFn<void, unknown, unknown, {
|
|
2304
|
+
attempt?: number;
|
|
2305
|
+
} & import("@reduxjs/toolkit/query").RetryOptions, {}>, never, GlobalSearchResponse, "searchApiSlice", any>> & {
|
|
2306
|
+
currentData?: GlobalSearchResponse | undefined;
|
|
2307
|
+
isUninitialized: false;
|
|
2308
|
+
isLoading: false;
|
|
2309
|
+
isFetching: false;
|
|
2310
|
+
isSuccess: false;
|
|
2311
|
+
isError: false;
|
|
2312
|
+
}, "error">>)>> & {
|
|
2313
|
+
status: import("@reduxjs/toolkit/query").QueryStatus;
|
|
2314
|
+
}) => R) | undefined;
|
|
2315
|
+
}, "skip">) | undefined) => [(arg: [(GlobalSearchArgs | undefined)?], preferCacheValue?: boolean) => import("@reduxjs/toolkit/query").QueryActionCreatorResult<import("@reduxjs/toolkit/query").QueryDefinition<[(GlobalSearchArgs | undefined)?], import("@reduxjs/toolkit/query").BaseQueryFn<void, unknown, unknown, {
|
|
2316
|
+
attempt?: number;
|
|
2317
|
+
} & import("@reduxjs/toolkit/query").RetryOptions, {}>, never, GlobalSearchResponse, "searchApiSlice", any>>, [R][R extends any ? 0 : never] & {
|
|
2318
|
+
reset: () => void;
|
|
2319
|
+
}, {
|
|
2320
|
+
lastArg: [(GlobalSearchArgs | undefined)?];
|
|
2017
2321
|
}];
|
|
@@ -39,3 +39,18 @@ export declare const CUSTOM_AI_SEARCH_QUERY_KEYS: {
|
|
|
39
39
|
GET_MENTORS: () => string[];
|
|
40
40
|
GET_PERSONNALIZED_MENTORS: () => string[];
|
|
41
41
|
};
|
|
42
|
+
/** Path of the global (non-personalized) catalog search endpoint. */
|
|
43
|
+
export declare const GLOBAL_SEARCH_PATH = "/api/search/global/";
|
|
44
|
+
/**
|
|
45
|
+
* Defaults the generated `SearchService.searchGlobalRetrieve` applies to its
|
|
46
|
+
* own parameters. Kept here so the hand-built URL sends the same query the
|
|
47
|
+
* generated client would, and so swapping to it later is a no-op for callers.
|
|
48
|
+
*/
|
|
49
|
+
export declare const GLOBAL_SEARCH_DEFAULTS: {
|
|
50
|
+
allowSkillSearch: boolean;
|
|
51
|
+
alphabetical: boolean;
|
|
52
|
+
limit: number;
|
|
53
|
+
orderAscending: boolean;
|
|
54
|
+
returnFacet: boolean;
|
|
55
|
+
returnItems: boolean;
|
|
56
|
+
};
|
|
@@ -159,3 +159,84 @@ export interface GetAiSearchMentorsArgs {
|
|
|
159
159
|
starred?: boolean;
|
|
160
160
|
featured?: boolean;
|
|
161
161
|
}
|
|
162
|
+
/**
|
|
163
|
+
* Query parameters accepted by `GET /api/search/global/`.
|
|
164
|
+
*
|
|
165
|
+
* Camel-cased to match the generated `SearchService` signature; the URL
|
|
166
|
+
* builder converts each key to its snake_case query param.
|
|
167
|
+
*/
|
|
168
|
+
export interface GlobalSearchArgs {
|
|
169
|
+
/** Enable skill-based search. */
|
|
170
|
+
allowSkillSearch?: boolean;
|
|
171
|
+
/** Sort alphabetically by name. */
|
|
172
|
+
alphabetical?: boolean;
|
|
173
|
+
/** Filter by certificate type. */
|
|
174
|
+
certificate?: string[];
|
|
175
|
+
/** Content types to include, e.g. `['courses', 'programs', 'resources']`. */
|
|
176
|
+
content?: string[];
|
|
177
|
+
/** Filter by a specific course ID. */
|
|
178
|
+
courseId?: string;
|
|
179
|
+
/** Filter by course duration range. */
|
|
180
|
+
duration?: string[];
|
|
181
|
+
/** Filter by content language. */
|
|
182
|
+
language?: string[];
|
|
183
|
+
/** Filter by difficulty level. */
|
|
184
|
+
level?: string[];
|
|
185
|
+
/** Number of results per page. */
|
|
186
|
+
limit?: number;
|
|
187
|
+
/** Starting position for pagination. */
|
|
188
|
+
offset?: number;
|
|
189
|
+
/** Sort direction. */
|
|
190
|
+
orderAscending?: boolean;
|
|
191
|
+
/** Field to sort results by. */
|
|
192
|
+
orderBy?: string;
|
|
193
|
+
/** Filter by a specific pathway ID. */
|
|
194
|
+
pathwayId?: string;
|
|
195
|
+
/** Filter by price/audit status. */
|
|
196
|
+
price?: string;
|
|
197
|
+
/** Filter by a specific program ID. */
|
|
198
|
+
programId?: string;
|
|
199
|
+
/** Filter by program type. */
|
|
200
|
+
programType?: string[];
|
|
201
|
+
/** Filter by promotion status. */
|
|
202
|
+
promotion?: string[];
|
|
203
|
+
/** Search term matched against name and description. */
|
|
204
|
+
query?: string;
|
|
205
|
+
/** Filter by resource type. */
|
|
206
|
+
resourceType?: string[];
|
|
207
|
+
/** Include facet data in the response. */
|
|
208
|
+
returnFacet?: boolean;
|
|
209
|
+
/** Include the items nested in programs/pathways. */
|
|
210
|
+
returnItems?: boolean;
|
|
211
|
+
/** Filter by course format. */
|
|
212
|
+
selfPaced?: string[];
|
|
213
|
+
/** Filter by a specific skill ID. */
|
|
214
|
+
skillId?: string;
|
|
215
|
+
/** Filter by skills. */
|
|
216
|
+
skills?: string[];
|
|
217
|
+
/** Filter by subject areas. */
|
|
218
|
+
subject?: string[];
|
|
219
|
+
/** Filter by tags. */
|
|
220
|
+
tags?: string[];
|
|
221
|
+
/** Filter by tenant/organization. */
|
|
222
|
+
tenant?: string;
|
|
223
|
+
/** Filter by topic areas. */
|
|
224
|
+
topics?: string[];
|
|
225
|
+
/** Force a facet update. */
|
|
226
|
+
updateFacet?: string;
|
|
227
|
+
}
|
|
228
|
+
/** Response shape of `GET /api/search/global/`. */
|
|
229
|
+
export interface GlobalSearchResponse {
|
|
230
|
+
/** Content items matching the search criteria. */
|
|
231
|
+
results: Record<string, unknown>[];
|
|
232
|
+
/** Total number of items matching the search criteria. */
|
|
233
|
+
count: number;
|
|
234
|
+
/** URL for the next page of results. */
|
|
235
|
+
next: string | null;
|
|
236
|
+
/** URL for the previous page of results. */
|
|
237
|
+
previous: string | null;
|
|
238
|
+
current_page: number;
|
|
239
|
+
total_pages: number;
|
|
240
|
+
/** Facet information for filtering, omitted when `returnFacet` is false. */
|
|
241
|
+
facets?: Record<string, unknown>;
|
|
242
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { GlobalSearchArgs } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Build the URL for `GET /api/search/global/`.
|
|
4
|
+
*
|
|
5
|
+
* Hand-assembled rather than delegating to `SearchService.searchGlobalRetrieve`
|
|
6
|
+
* because the workspace pins `@iblai/iblai-api` to a release that predates that
|
|
7
|
+
* method (see `overrides` in pnpm-workspace.yaml). Params and defaults mirror
|
|
8
|
+
* the generated signature so the two stay interchangeable.
|
|
9
|
+
*/
|
|
10
|
+
export declare const buildGlobalSearchUrl: (args?: GlobalSearchArgs) => string;
|
|
@@ -62,6 +62,15 @@ export declare const buildEndpointFromAxdService: <Args extends Record<string, u
|
|
|
62
62
|
export declare const buildEndpointFromDmUrl: <Args extends Record<string, unknown>, Result>(buildUrl: (args: Args) => string, service?: SERVICES) => {
|
|
63
63
|
queryFn: BaseQueryFn<Args, Result, FetchBaseQueryError | CustomError>;
|
|
64
64
|
};
|
|
65
|
+
/**
|
|
66
|
+
* Build an endpoint from a hand-assembled URL, taking its arguments in the
|
|
67
|
+
* spread-array form the `*Legacy` builders use. Lets a URL-backed endpoint sit
|
|
68
|
+
* in the same slice as generated-service ones without callers having to switch
|
|
69
|
+
* between `hook(args)` and `hook([args])`.
|
|
70
|
+
*/
|
|
71
|
+
export declare const buildEndpointFromDmUrlLegacy: <Args extends any[], Result>(buildUrl: (...args: Args) => string, service?: SERVICES) => {
|
|
72
|
+
queryFn: BaseQueryFn<Args, Result, FetchBaseQueryError | CustomError>;
|
|
73
|
+
};
|
|
65
74
|
export interface CustomQueryArgs extends Omit<FetchArgs, 'url'> {
|
|
66
75
|
url: string;
|
|
67
76
|
service: SERVICES;
|