Skip to content

Commit 6116f60

Browse files
committed
v1.5.1
- added types and fixed removeItemImage
1 parent 722f06d commit 6116f60

File tree

8 files changed

+64
-72
lines changed

8 files changed

+64
-72
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ More important methods are `getItems(listUUID)`, `getItemsDetails(listUUID)`, `s
4646
`moveToRecentList(listUuid, itemName)` and `getAllUsersFromList(listUuid)`.
4747

4848
## Changelog
49+
### 1.5.1 (2022-10-31)
50+
* (foxriver76) updated types
51+
* (foxriver76) fixed `removeItemImage` as headers were missing
52+
4953
### 1.5.0 (2022-10-31)
5054
* (Aliyss) added methods to link an image to an item (PR #221)
5155

build/bring.d.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ interface LoadCatalogResponse {
7474
interface GetPendingInvitationsResponse {
7575
invitations: any[];
7676
}
77+
interface Image {
78+
/** the image itself */
79+
imageData: string;
80+
}
7781
declare class Bring {
7882
private readonly mail;
7983
private readonly password;
@@ -113,27 +117,25 @@ declare class Bring {
113117
/**
114118
* Save an image to an item
115119
*
116-
* @param formData The formdata you want to send.
117-
* @param itemUuid The itemUUID you want to update.
120+
* @param itemUuid The itemUUID which will be updated
121+
* @param image The image you want to link to the item
118122
* returns an imageUrl and answerHttpStatus should contain 204. If not -> error
119123
*/
120-
saveItemImage(itemUuid: string, formData: {
121-
[key: string]: any;
122-
} | undefined): Promise<{
124+
saveItemImage(itemUuid: string, image: Image): Promise<{
123125
imageUrl: string;
124126
}>;
125127
/**
126128
* remove an item from your current shopping list
127129
*
130+
* @param listUuid The listUUID you want to remove a item from
128131
* @param itemName Name of the item you want to delete from you shopping list
129-
* @param listUuid The lisUUID you want to receive a list of users from.
130132
* should return an empty string and $answerHttpStatus should contain 204. If not -> error
131133
*/
132134
removeItem(listUuid: string, itemName: string): Promise<string>;
133135
/**
134136
* Remove the image from your item
135137
*
136-
* @param itemUuid The itemUUID you want to remove the image from.
138+
* @param itemUuid The itemUUID you want to remove the image from
137139
* returns an empty string and answerHttpStatus should contain 204. If not -> error
138140
*/
139141
removeItemImage(itemUuid: string): Promise<string>;

build/bring.js

Lines changed: 9 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/bring.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)