Commit 33785b7 1 parent 8bbb51d commit 33785b7 Copy full SHA for 33785b7
File tree 3 files changed +26
-0
lines changed
src/endpoints/private/shops
3 files changed +26
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { AbstractPrivateEndpoint } from '@/model/endpoint/AbstractPrivateEndpoint' ;
2
+ import { type CreateDefinition } from '@/model/endpoint/AbstractEndpoint.types' ;
3
+ import { type HttpMethod } from '@/types/request.types' ;
4
+ import { type DuplicateShop } from './Shop.types' ;
5
+
6
+ type PostShopDuplicateDefinition = CreateDefinition < {
7
+ name : typeof PostShopDuplicate . name ;
8
+ body : DuplicateShop [ ] ;
9
+ response : { ids : [ { id : number } ] } ;
10
+ } > ;
11
+
12
+ /**
13
+ * The PostShopDuplicate endpoint is used to add a new shop.
14
+ */
15
+ export class PostShopDuplicate extends AbstractPrivateEndpoint < PostShopDuplicateDefinition > {
16
+ public readonly method : HttpMethod = 'POST' ;
17
+ public readonly name = 'postShopDuplicate' ;
18
+ public readonly path = 'shops/duplicate' ;
19
+ public readonly property = 'ids' ;
20
+ }
Original file line number Diff line number Diff line change @@ -83,3 +83,8 @@ export interface MyParcelShop {
83
83
return : ShopReturn ;
84
84
tracktrace : ShopTrackTrace ;
85
85
}
86
+
87
+ export interface DuplicateShop {
88
+ name : string ;
89
+ account_id : number ;
90
+ }
Original file line number Diff line number Diff line change @@ -2,3 +2,4 @@ export * from './GetShop';
2
2
export * from './PostShop' ;
3
3
export * from './PutShop' ;
4
4
export * from './Shop.types' ;
5
+ export * from './PostShopDuplicate' ;
You can’t perform that action at this time.
0 commit comments