Skip to content

Commit 82f7f20

Browse files
committed
fix typescript types
1 parent 0f6cda3 commit 82f7f20

File tree

4 files changed

+8
-14
lines changed

4 files changed

+8
-14
lines changed

core/static/bundled/utils/api.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ export const paginated = async <T>(
5656

5757
interface Request extends TDataShape {
5858
client?: Client;
59-
url: string;
6059
}
6160

6261
interface InterceptorOptions {

counter/static/bundled/counter/product-list-index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ document.addEventListener("alpine:init", () => {
108108
* Build the object containing the query parameters corresponding
109109
* to the current filters
110110
*/
111-
getQueryParams(): ProductSearchProductsDetailedData {
111+
getQueryParams(): Omit<ProductSearchProductsDetailedData, "url"> {
112112
const search = this.search.length > 0 ? this.search : null;
113113
// If active or archived products must be filtered, put the filter in the request
114114
// Else, don't include the filter

sas/static/bundled/sas/album-index.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,9 @@ document.addEventListener("alpine:init", () => {
5151
async fetchPictures() {
5252
this.loading = true;
5353
this.pictures = await paginated(picturesFetchPictures, {
54-
query: {
55-
// biome-ignore lint/style/useNamingConvention: API is in snake_case
56-
album_id: config.albumId,
57-
} as PicturesFetchPicturesData["query"],
58-
});
54+
// biome-ignore lint/style/useNamingConvention: API is in snake_case
55+
query: { album_id: config.albumId },
56+
} as PicturesFetchPicturesData);
5957
this.loading = false;
6058
},
6159

@@ -66,7 +64,6 @@ document.addEventListener("alpine:init", () => {
6664

6765
Alpine.data("albums", (config: SubAlbumsConfig) => ({
6866
albums: [] as AlbumSchema[],
69-
config: config,
7067
loading: false,
7168

7269
async init() {
@@ -77,7 +74,7 @@ document.addEventListener("alpine:init", () => {
7774
this.loading = true;
7875
this.albums = await paginated(albumFetchAlbum, {
7976
// biome-ignore lint/style/useNamingConvention: API is snake_case
80-
query: { parent_id: this.config.parentId },
77+
query: { parent_id: config.parentId },
8178
} as AlbumFetchAlbumData);
8279
this.loading = false;
8380
},

sas/static/bundled/sas/user/pictures-index.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@ document.addEventListener("alpine:init", () => {
1717

1818
async init() {
1919
this.pictures = await paginated(picturesFetchPictures, {
20-
query: {
21-
// biome-ignore lint/style/useNamingConvention: from python api
22-
users_identified: [config.userId],
23-
} as PicturesFetchPicturesData["query"],
24-
});
20+
// biome-ignore lint/style/useNamingConvention: from python api
21+
query: { users_identified: [config.userId] },
22+
} as PicturesFetchPicturesData);
2523

2624
this.albums = this.pictures.reduce(
2725
(acc: Record<string, PictureSchema[]>, picture: PictureSchema) => {

0 commit comments

Comments
 (0)