Skip to content

Commit

Permalink
feat(domain): deprecate contact questions (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
scaleway-bot authored Aug 3, 2022
1 parent 1523c4d commit 11cdb4b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
12 changes: 8 additions & 4 deletions packages/clients/src/api/domain/v2beta1/marshalling.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,11 @@ export const unmarshalContact = (data: unknown) => {
lastname: data.lastname,
legalForm: data.legal_form,
phoneNumber: data.phone_number,
questions: unmarshalArrayOfObject(data.questions, unmarshalContactQuestion),
questions: unmarshalArrayOfObject(
data.questions,
unmarshalContactQuestion,
false,
),
resale: data.resale,
state: data.state,
vatIdentificationCode: data.vat_identification_code,
Expand Down Expand Up @@ -1517,9 +1521,9 @@ const marshalNewContact = (
lastname: request.lastname,
legal_form: request.legalForm,
phone_number: request.phoneNumber,
questions: request.questions.map(elt =>
marshalContactQuestion(elt, defaults),
),
questions: request.questions
? request.questions.map(elt => marshalContactQuestion(elt, defaults))
: undefined,
resale: request.resale,
state: request.state,
vat_identification_code: request.vatIdentificationCode,
Expand Down
7 changes: 5 additions & 2 deletions packages/clients/src/api/domain/v2beta1/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ export interface Contact {
companyIdentificationCode: string
lang: LanguageCode
resale: boolean
questions: Array<ContactQuestion>
/** @deprecated */
questions?: Array<ContactQuestion>
extensionFr?: ContactExtensionFR
extensionEu?: ContactExtensionEU
whoisOptIn: boolean
Expand Down Expand Up @@ -616,7 +617,8 @@ export interface NewContact {
companyIdentificationCode?: string
lang: LanguageCode
resale: boolean
questions: Array<ContactQuestion>
/** @deprecated */
questions?: Array<ContactQuestion>
extensionFr?: ContactExtensionFR
extensionEu?: ContactExtensionEU
whoisOptIn: boolean
Expand Down Expand Up @@ -1099,6 +1101,7 @@ export type RegistrarApiUpdateContactRequest = {
companyIdentificationCode?: string
lang: LanguageCode
resale?: boolean
/** @deprecated */
questions?: Array<UpdateContactRequestQuestion>
extensionFr?: ContactExtensionFR
extensionEu?: ContactExtensionEU
Expand Down

0 comments on commit 11cdb4b

Please sign in to comment.