createState
createState(
session,definition,options?):Promise<StateCreationOutcome>
Defined in: packages/simply-settings-core/src/address/createStates.ts:122
Adds one state through Setup’s “Configure New State” form: loads the form for the state’s country, fills it in, and posts it back.
Never throws for a per-state problem — that’s reported as a failed outcome, so one bad state
doesn’t stop a run of thousands. Transport failures are retried first; re-posting is safe
because a retry of a POST that did land comes back as a duplicate (exists).
Parameters
Section titled “Parameters”session
Section titled “session”An open Setup session.
definition
Section titled “definition”The state to add.
options?
Section titled “options?”CreateStateOptions = {}
Retry tuning.
Returns
Section titled “Returns”Promise<StateCreationOutcome>
The outcome.