Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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