Skip to content

Commit

Permalink
Merge pull request #250 from Scalingo/feat/hds-contact-fields
Browse files Browse the repository at this point in the history
  • Loading branch information
ksol authored Jul 22, 2022
2 parents 253cd77 + 6c24e77 commit 52c985f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/HDSContacts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default class HDSContacts {
* @see https://developers.scalingo.com/hds_contacts
* @param appId
*/
update(appId: string, params: UpdateParams): Promise<HDSContact> {
update(appId: string, params?: UpdateParams): Promise<HDSContact> {
return unpackData(
this._client.apiClient().put(`/apps/${appId}/hds_contact`, {
hds_contact: params,
Expand Down
3 changes: 3 additions & 0 deletions src/models/regional/hds_contact.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
export type OrgType = "company" | "non-profit" | "administration";

export interface HDSContact {
id: string;
org_type: OrgType;
name: string;
email: string;
phone_number: string;
Expand Down
17 changes: 5 additions & 12 deletions src/params/regional/hds_contacts.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
export interface UpdateParams {
name: string;
email: string;
phoneNumber: string;
company: string;
addressLine1: string;
addressLine2: string;
addressCity: string;
addressZip: string;
addressCountry: string;
notes: string;
}
import { HDSContact } from "src/models/regional";

export type UpdateParams = Partial<
Omit<HDSContact, "id" | "updated_at" | "up_to_date">
>;

0 comments on commit 52c985f

Please sign in to comment.