-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add getAccounts endpoint (#149)
- Loading branch information
Showing
4 changed files
with
29 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import {type GetAccountsParams, type MyParcelAccount} from './Account.types'; | ||
import {AbstractPrivateEndpoint, type CreateDefinition, type PaginatedResponse} from '@/model'; | ||
|
||
type GetAccountsDefinition = CreateDefinition<{ | ||
name: typeof GetAccounts.name; | ||
parameters: GetAccountsParams; | ||
response: PaginatedResponse<MyParcelAccount[]>; | ||
}>; | ||
|
||
export class GetAccounts extends AbstractPrivateEndpoint<GetAccountsDefinition> { | ||
public readonly name = 'getAccounts'; | ||
public readonly path = 'accounts'; | ||
public readonly property = 'accounts'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from './Account.types'; | ||
export * from './GetAccount'; | ||
export * from './GetAccounts'; | ||
export * from './PutAccount'; |