@kokimoki/app 0.5.0 → 0.5.2
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/fields.d.ts +1 -1
- package/dist/fields.js +1 -1
- package/dist/kokimoki-client.d.ts +4 -0
- package/dist/kokimoki-client.js +7 -0
- package/package.json +1 -1
package/dist/fields.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ export declare class EnumField<T extends Record<string, string>> extends Field<k
|
|
|
43
43
|
value: keyof T;
|
|
44
44
|
constructor(enumValues: T, value: keyof T, options?: FieldOptions);
|
|
45
45
|
get schema(): {
|
|
46
|
-
enum:
|
|
46
|
+
enum: string[];
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
export declare class IntegerField extends Field<number> {
|
package/dist/fields.js
CHANGED
|
@@ -40,5 +40,9 @@ export declare class KokimokiClient<StatelessDataT = any> extends KokimokiClient
|
|
|
40
40
|
mimeTypes?: string[];
|
|
41
41
|
tags?: string[];
|
|
42
42
|
}, skip?: number, limit?: number): Promise<Paginated<Upload>>;
|
|
43
|
+
deleteUpload(id: string): Promise<{
|
|
44
|
+
acknowledged: boolean;
|
|
45
|
+
deletedCount: number;
|
|
46
|
+
}>;
|
|
43
47
|
}
|
|
44
48
|
export {};
|
package/dist/kokimoki-client.js
CHANGED
|
@@ -186,4 +186,11 @@ export class KokimokiClient extends EventEmitter {
|
|
|
186
186
|
});
|
|
187
187
|
return await res.json();
|
|
188
188
|
}
|
|
189
|
+
async deleteUpload(id) {
|
|
190
|
+
const res = await fetch(`${this._apiUrl}/uploads/${id}`, {
|
|
191
|
+
method: "DELETE",
|
|
192
|
+
headers: this.apiHeaders,
|
|
193
|
+
});
|
|
194
|
+
return await res.json();
|
|
195
|
+
}
|
|
189
196
|
}
|