Skip to content

Commit

Permalink
- updated nameRequest type in all filing interfaces
Browse files Browse the repository at this point in the history
- deleted unused interface
- saved original NR + properties needed by Legal API
- restored original NR data
- updated unit test
  • Loading branch information
Severin Beauvais committed Apr 10, 2024
1 parent b2cec44 commit e8fdb7e
Show file tree
Hide file tree
Showing 10 changed files with 86 additions and 145 deletions.
9 changes: 3 additions & 6 deletions src/interfaces/alteration-interfaces/alteration-interface.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CourtOrderIF, NameTranslationIF, ShareStructureIF } from '@/interfaces/'
import { CoopTypes } from '@/enums'
import { ContactPointIF } from '@bcrs-shared-components/interfaces/'
import { ContactPointIF, NameRequestIF } from '@bcrs-shared-components/interfaces/'
import { CorpTypeCd } from '@bcrs-shared-components/corp-type-module/'

//
Expand All @@ -25,11 +25,8 @@ export interface AlterationIF extends CoopAlterationIF {
identifier: string
legalType: CorpTypeCd
}
nameRequest?: {
legalType: CorpTypeCd
nrNumber?: string // only set when there is an NR
legalName?: string // only set when there is an NR
}
// intersection type so we can save original NR + properties needed by Legal API:
nameRequest?: NameRequestIF & { legalName: string, nrNumber?: string }
nameTranslations?: NameTranslationIF[]
shareStructure?: ShareStructureIF
contactPoint: ContactPointIF
Expand Down
10 changes: 3 additions & 7 deletions src/interfaces/filing-interfaces/chg-registration-interfaces.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { AddressesIF, CourtOrderIF, BusinessInformationIF, FilingHeaderIF, OrgPersonIF } from '@/interfaces/'
import { ContactPointIF, NaicsIF } from '@bcrs-shared-components/interfaces/'
import { CorpTypeCd } from '@bcrs-shared-components/corp-type-module/'
import { ContactPointIF, NaicsIF, NameRequestIF } from '@bcrs-shared-components/interfaces/'

//
// Ref: https://github.com/bcgov/business-schemas/blob/main/src/registry_schemas/schemas/change_of_registration.json
Expand All @@ -12,11 +11,8 @@ export interface ChgRegistrationIF {
}
courtOrder?: CourtOrderIF
contactPoint: ContactPointIF
nameRequest?: {
legalType: CorpTypeCd
nrNumber?: string // only set when there is an NR
legalName?: string // only set when there is an NR
}
// intersection type so we can save original NR + properties needed by Legal API:
nameRequest?: NameRequestIF & { legalName: string, nrNumber?: string }
offices?: AddressesIF
parties: Array<OrgPersonIF>
startDate?: string // YYYY-MM-DD
Expand Down
10 changes: 3 additions & 7 deletions src/interfaces/filing-interfaces/conversion-interfaces.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { AddressesIF, BusinessInformationIF, FilingHeaderIF, OrgPersonIF } from '@/interfaces/'
import { NaicsIF } from '@bcrs-shared-components/interfaces/'
import { CorpTypeCd } from '@bcrs-shared-components/corp-type-module/'
import { NaicsIF, NameRequestIF } from '@bcrs-shared-components/interfaces/'

//
// Ref: https://github.com/bcgov/business-schemas/blob/main/src/registry_schemas/schemas/conversion.json
Expand All @@ -11,11 +10,8 @@ interface ConversionIF {
naics?: NaicsIF
}
courtOrder?: string
nameRequest?: {
legalType: CorpTypeCd
nrNumber?: string // only set when there is an NR
legalName?: string // only set when there is an NR
}
// intersection type so we can save original NR + properties needed by Legal API:
nameRequest?: NameRequestIF & { legalName: string, nrNumber?: string }
offices: AddressesIF
parties: Array<OrgPersonIF>
startDate?: string // YYYY-MM-DD
Expand Down
1 change: 0 additions & 1 deletion src/interfaces/filing-interfaces/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export * from './correction-filing-interface'
export * from './filing-data-interface'
export * from './filing-header-interface'
export * from './incorporation-interfaces'
export * from './registration-filing-interface'
export * from './restoration-filing-interface'
export * from './special-resolution-filing-interface'

Expand Down
20 changes: 0 additions & 20 deletions src/interfaces/filing-interfaces/registration-filing-interface.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
import { FilingHeaderIF, AlterationIF, BusinessInformationIF } from '@/interfaces/'
import { SpecialResolutionIF } from '@bcrs-shared-components/interfaces'
import { CorpTypeCd } from '@bcrs-shared-components/corp-type-module/'
import { NameRequestIF, SpecialResolutionIF } from '@bcrs-shared-components/interfaces'

/** Override what's in BCRS Shared Components, needs to be refactored in the future. */
export interface ChangeOfNameIF {
nameRequest: {
legalType: CorpTypeCd
nrNumber?: string // only set when there is an NR
legalName?: string // only set when there is an NR
}
// intersection type so we can save original NR + properties needed by Legal API:
nameRequest?: NameRequestIF & { legalName: string, nrNumber?: string }
legalName: string
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ApprovalTypes, RestorationTypes, RelationshipTypes } from '@/enums'
import { AddressesIF, CourtOrderIF, NameTranslationIF, OrgPersonIF } from '@/interfaces/'
import { CorpTypeCd } from '@bcrs-shared-components/corp-type-module/'
import { ContactPointIF } from '@bcrs-shared-components/interfaces/'
import { ContactPointIF, NameRequestIF } from '@bcrs-shared-components/interfaces/'

//
// Ref: https://github.com/bcgov/business-schemas/blob/main/src/registry_schemas/schemas/restoration.json
Expand All @@ -16,11 +16,8 @@ export interface RestorationIF {
contactPoint: ContactPointIF
courtOrder?: CourtOrderIF
expiry?: string // YYYY-MM-DD
nameRequest?: {
legalType: CorpTypeCd
nrNumber?: string // only set when there is an NR
legalName?: string // only set when there is an NR
}
// intersection type so we can save original NR + properties needed by Legal API:
nameRequest?: NameRequestIF & { legalName: string, nrNumber?: string }
nameTranslations?: NameTranslationIF[]
noticeDate?: string // YYYY-MM-DD
offices: AddressesIF
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { AddressesIF, CoopAlterationIF, CourtOrderIF, NameTranslationIF, OrgPersonIF,
ShareClassIF } from '@/interfaces/'
import { AddressesIF, CoopAlterationIF, CourtOrderIF, NameTranslationIF, OrgPersonIF, ShareClassIF }
from '@/interfaces/'
import { CorrectionErrorTypes, FilingTypes } from '@/enums/'
import { CorpTypeCd } from '@bcrs-shared-components/corp-type-module/'
import { ContactPointIF, NaicsIF, SpecialResolutionIF } from '@bcrs-shared-components/interfaces/'
import { ContactPointIF, NaicsIF, NameRequestIF, SpecialResolutionIF } from '@bcrs-shared-components/interfaces/'

//
// Ref: https://github.com/bcgov/business-schemas/blob/main/src/registry_schemas/schemas/correction.json
Expand All @@ -25,11 +25,8 @@ export interface CorrectionInformationIF extends CoopAlterationIF, SpecialResolu
}
contactPoint?: ContactPointIF
courtOrder?: CourtOrderIF // Required for Special Resolution Corrections.
nameRequest?: {
legalType: CorpTypeCd
nrNumber?: string // only set when there is an NR
legalName?: string // only set when there is an NR
}
// intersection type so we can save original NR + properties needed by Legal API:
nameRequest?: NameRequestIF & { legalName: string, nrNumber?: string }
nameTranslations?: NameTranslationIF[]
offices?: AddressesIF
parties?: OrgPersonIF[]
Expand Down
Loading

0 comments on commit e8fdb7e

Please sign in to comment.