@spaceinvoices/js-sdk 18.26.0 → 18.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/generated/entities/entities.d.cts +1 -1
  2. package/dist/generated/entities/entities.d.ts +1 -1
  3. package/dist/generated/entity-invitations/entity-invitations.d.cts +1 -1
  4. package/dist/generated/entity-invitations/entity-invitations.d.ts +1 -1
  5. package/dist/generated/entity-users/entity-users.d.cts +1 -1
  6. package/dist/generated/entity-users/entity-users.d.ts +1 -1
  7. package/dist/generated/model/signupBody.d.cts +1 -1
  8. package/dist/generated/model/signupBody.d.ts +1 -1
  9. package/dist/generated/model/signupBodySignupAttribution.d.cts +1 -1
  10. package/dist/generated/model/signupBodySignupAttribution.d.ts +1 -1
  11. package/dist/generated/model/whiteLabelConfig.d.cts +6 -0
  12. package/dist/generated/model/whiteLabelConfig.d.ts +6 -0
  13. package/dist/generated/users/users.d.cts +6 -2
  14. package/dist/generated/users/users.d.ts +6 -2
  15. package/dist/generated-zod/entities/entities.d.cts +1 -1
  16. package/dist/generated-zod/entities/entities.d.ts +1 -1
  17. package/dist/generated-zod/entity-invitations/entity-invitations.d.cts +1 -1
  18. package/dist/generated-zod/entity-invitations/entity-invitations.d.ts +1 -1
  19. package/dist/generated-zod/entity-users/entity-users.d.cts +1 -1
  20. package/dist/generated-zod/entity-users/entity-users.d.ts +1 -1
  21. package/dist/generated-zod/users/users.d.cts +1 -1
  22. package/dist/generated-zod/users/users.d.ts +1 -1
  23. package/dist/generated-zod/white-labels/white-labels.d.cts +6 -0
  24. package/dist/generated-zod/white-labels/white-labels.d.ts +6 -0
  25. package/dist/index.cjs +1 -1
  26. package/dist/index.js +1 -1
  27. package/package.json +1 -1
@@ -420,7 +420,7 @@ export type removeEntityKsefCredentialResponse = (removeEntityKsefCredentialResp
420
420
  export declare const getRemoveEntityKsefCredentialUrl: (id: string) => string;
421
421
  export declare const removeEntityKsefCredential: (id: string, options?: RequestInit) => Promise<removeEntityKsefCredentialResponse>;
422
422
  /**
423
- * Create a new legal entity (business, organization, or sole proprietor). Entities are the core organizational unit that owns customers, invoices, and items. Each entity can have custom number formatting for invoices and other settings. The entity currency_code must be a fiat ISO 4217 code; a crypto asset code is rejected with 422 (crypto is only available as the currency_code of individual documents). For Czech entities (`country_code: CZ`) `company_number` (IČO, 8 digits with check digit) is required and `tax_number` must be a DIČ (`CZ` + 8–10 digits); invalid values respond 422 with `code` `CZ_COMPANY_NUMBER_REQUIRED`, `CZ_INVALID_COMPANY_NUMBER` or `CZ_INVALID_TAX_NUMBER`.
423
+ * Create a new legal entity (business, organization, or sole proprietor). Entities are the core organizational unit that owns customers, invoices, and items. Each entity can have custom number formatting for invoices and other settings. The entity currency_code must be a fiat ISO 4217 code; a crypto asset code is rejected with 422 (crypto is only available as the currency_code of individual documents). For Czech entities (`country_code: CZ`) `company_number` (IČO, 8 digits with check digit) is required and `tax_number` must be a DIČ (`CZ` + 8–10 digits); invalid values respond 422 with `code` `CZ_COMPANY_NUMBER_REQUIRED`, `CZ_INVALID_COMPANY_NUMBER` or `CZ_INVALID_TAX_NUMBER`. A white label can turn off company creation for its own end users (users without a role on the account): such a user gets 403 with `code` `entity_creation_disabled`; account members and account API keys are not affected.
424
424
  * @summary Create a new entity
425
425
  */
426
426
  export type createEntityResponse201 = {
@@ -420,7 +420,7 @@ export type removeEntityKsefCredentialResponse = (removeEntityKsefCredentialResp
420
420
  export declare const getRemoveEntityKsefCredentialUrl: (id: string) => string;
421
421
  export declare const removeEntityKsefCredential: (id: string, options?: RequestInit) => Promise<removeEntityKsefCredentialResponse>;
422
422
  /**
423
- * Create a new legal entity (business, organization, or sole proprietor). Entities are the core organizational unit that owns customers, invoices, and items. Each entity can have custom number formatting for invoices and other settings. The entity currency_code must be a fiat ISO 4217 code; a crypto asset code is rejected with 422 (crypto is only available as the currency_code of individual documents). For Czech entities (`country_code: CZ`) `company_number` (IČO, 8 digits with check digit) is required and `tax_number` must be a DIČ (`CZ` + 8–10 digits); invalid values respond 422 with `code` `CZ_COMPANY_NUMBER_REQUIRED`, `CZ_INVALID_COMPANY_NUMBER` or `CZ_INVALID_TAX_NUMBER`.
423
+ * Create a new legal entity (business, organization, or sole proprietor). Entities are the core organizational unit that owns customers, invoices, and items. Each entity can have custom number formatting for invoices and other settings. The entity currency_code must be a fiat ISO 4217 code; a crypto asset code is rejected with 422 (crypto is only available as the currency_code of individual documents). For Czech entities (`country_code: CZ`) `company_number` (IČO, 8 digits with check digit) is required and `tax_number` must be a DIČ (`CZ` + 8–10 digits); invalid values respond 422 with `code` `CZ_COMPANY_NUMBER_REQUIRED`, `CZ_INVALID_COMPANY_NUMBER` or `CZ_INVALID_TAX_NUMBER`. A white label can turn off company creation for its own end users (users without a role on the account): such a user gets 403 with `code` `entity_creation_disabled`; account members and account API keys are not affected.
424
424
  * @summary Create a new entity
425
425
  */
426
426
  export type createEntityResponse201 = {
@@ -122,7 +122,7 @@ export type cancelEntityInvitationResponse = (cancelEntityInvitationResponseSucc
122
122
  export declare const getCancelEntityInvitationUrl: (id: string) => string;
123
123
  export declare const cancelEntityInvitation: (id: string, options?: RequestInit) => Promise<cancelEntityInvitationResponse>;
124
124
  /**
125
- * Resend an invitation email with a new token and extended expiry. Resending an `accountant` invitation follows the rules for creating one: a user signed in directly (403 for an API key), the entity's country must support the accounting module (422), and on a regular account the user must have an account role (403).
125
+ * Resend an invitation email with a new token and extended expiry. Resending an `accountant` invitation follows the rules for creating one: a user signed in directly (403 for an API key), the entity's country must support the accounting module (422), and on a regular account the user must have an account role (403). A white label can turn off invitations for its own entity users: resending as one gets 403 with `code` `entity_invitations_disabled`.
126
126
  * @summary Resend invitation
127
127
  */
128
128
  export type resendEntityInvitationResponse200 = {
@@ -122,7 +122,7 @@ export type cancelEntityInvitationResponse = (cancelEntityInvitationResponseSucc
122
122
  export declare const getCancelEntityInvitationUrl: (id: string) => string;
123
123
  export declare const cancelEntityInvitation: (id: string, options?: RequestInit) => Promise<cancelEntityInvitationResponse>;
124
124
  /**
125
- * Resend an invitation email with a new token and extended expiry. Resending an `accountant` invitation follows the rules for creating one: a user signed in directly (403 for an API key), the entity's country must support the accounting module (422), and on a regular account the user must have an account role (403).
125
+ * Resend an invitation email with a new token and extended expiry. Resending an `accountant` invitation follows the rules for creating one: a user signed in directly (403 for an API key), the entity's country must support the accounting module (422), and on a regular account the user must have an account role (403). A white label can turn off invitations for its own entity users: resending as one gets 403 with `code` `entity_invitations_disabled`.
126
126
  * @summary Resend invitation
127
127
  */
128
128
  export type resendEntityInvitationResponse200 = {
@@ -44,7 +44,7 @@ export type getEntityUsersResponse = (getEntityUsersResponseSuccess | getEntityU
44
44
  export declare const getGetEntityUsersUrl: (params?: GetEntityUsersParams) => string;
45
45
  export declare const getEntityUsers: (params?: GetEntityUsersParams, options?: RequestInit) => Promise<getEntityUsersResponse>;
46
46
  /**
47
- * Add an existing white-label user for this account to the entity or send an invitation. The `accountant` role invites a company's accountant to this one entity only: on a regular account the invitation links the accountant's own Space Invoices user (created when they accept, if they have none), on a white label it creates the white label's own user as for every other role. An accountant works like an editor and also uses the accounting module, with no user or settings management. Only a user signed in directly can invite one: an API key, an impersonation or a delegated session gets 403, `silent` cannot be combined with the role (422), and the entity's country must support the accounting module (422 otherwise). On a regular account only a user of the account (an owner, admin or member with an account role) can invite an accountant (403 otherwise); on a white label the white label's entity users who manage users can too. Existing account users must accept the invitation so they receive separate entity-user access. With `silent: true` no email is sent (`send_invite` is ignored): a missing white-label user is created immediately (no password, optional `metadata`) and linked to the entity, and an existing white-label user is linked. Silent provisioning requires an account API key or an account owner/admin signed in directly (an interactive session); delegated (SSO) tokens are rejected. The new user's email counts as verified when the credential is an account API key or a user token whose email is verified; otherwise the user must verify their email before sending documents by email. Silent provisioning can be followed by `POST /entities/users/{user_id}/token` with `ttl` to embed the user.
47
+ * Add an existing white-label user for this account to the entity or send an invitation. The `accountant` role invites a company's accountant to this one entity only: on a regular account the invitation links the accountant's own Space Invoices user (created when they accept, if they have none), on a white label it creates the white label's own user as for every other role. An accountant works like an editor and also uses the accounting module, with no user or settings management. Only a user signed in directly can invite one: an API key, an impersonation or a delegated session gets 403, `silent` cannot be combined with the role (422), and the entity's country must support the accounting module (422 otherwise). On a regular account only a user of the account (an owner, admin or member with an account role) can invite an accountant (403 otherwise); on a white label the white label's entity users who manage users can too. Existing account users must accept the invitation so they receive separate entity-user access. With `silent: true` no email is sent (`send_invite` is ignored): a missing white-label user is created immediately (no password, optional `metadata`) and linked to the entity, and an existing white-label user is linked. Silent provisioning requires an account API key or an account owner/admin signed in directly (an interactive session); delegated (SSO) tokens are rejected. The new user's email counts as verified when the credential is an account API key or a user token whose email is verified; otherwise the user must verify their email before sending documents by email. Silent provisioning can be followed by `POST /entities/users/{user_id}/token` with `ttl` to embed the user. A white label can turn off invitations for its own entity users: a non-silent request from one gets 403 with `code` `entity_invitations_disabled` (silent provisioning by an account administrator is not affected).
48
48
  * @summary Add user to entity
49
49
  */
50
50
  export type addEntityUserResponse201 = {
@@ -44,7 +44,7 @@ export type getEntityUsersResponse = (getEntityUsersResponseSuccess | getEntityU
44
44
  export declare const getGetEntityUsersUrl: (params?: GetEntityUsersParams) => string;
45
45
  export declare const getEntityUsers: (params?: GetEntityUsersParams, options?: RequestInit) => Promise<getEntityUsersResponse>;
46
46
  /**
47
- * Add an existing white-label user for this account to the entity or send an invitation. The `accountant` role invites a company's accountant to this one entity only: on a regular account the invitation links the accountant's own Space Invoices user (created when they accept, if they have none), on a white label it creates the white label's own user as for every other role. An accountant works like an editor and also uses the accounting module, with no user or settings management. Only a user signed in directly can invite one: an API key, an impersonation or a delegated session gets 403, `silent` cannot be combined with the role (422), and the entity's country must support the accounting module (422 otherwise). On a regular account only a user of the account (an owner, admin or member with an account role) can invite an accountant (403 otherwise); on a white label the white label's entity users who manage users can too. Existing account users must accept the invitation so they receive separate entity-user access. With `silent: true` no email is sent (`send_invite` is ignored): a missing white-label user is created immediately (no password, optional `metadata`) and linked to the entity, and an existing white-label user is linked. Silent provisioning requires an account API key or an account owner/admin signed in directly (an interactive session); delegated (SSO) tokens are rejected. The new user's email counts as verified when the credential is an account API key or a user token whose email is verified; otherwise the user must verify their email before sending documents by email. Silent provisioning can be followed by `POST /entities/users/{user_id}/token` with `ttl` to embed the user.
47
+ * Add an existing white-label user for this account to the entity or send an invitation. The `accountant` role invites a company's accountant to this one entity only: on a regular account the invitation links the accountant's own Space Invoices user (created when they accept, if they have none), on a white label it creates the white label's own user as for every other role. An accountant works like an editor and also uses the accounting module, with no user or settings management. Only a user signed in directly can invite one: an API key, an impersonation or a delegated session gets 403, `silent` cannot be combined with the role (422), and the entity's country must support the accounting module (422 otherwise). On a regular account only a user of the account (an owner, admin or member with an account role) can invite an accountant (403 otherwise); on a white label the white label's entity users who manage users can too. Existing account users must accept the invitation so they receive separate entity-user access. With `silent: true` no email is sent (`send_invite` is ignored): a missing white-label user is created immediately (no password, optional `metadata`) and linked to the entity, and an existing white-label user is linked. Silent provisioning requires an account API key or an account owner/admin signed in directly (an interactive session); delegated (SSO) tokens are rejected. The new user's email counts as verified when the credential is an account API key or a user token whose email is verified; otherwise the user must verify their email before sending documents by email. Silent provisioning can be followed by `POST /entities/users/{user_id}/token` with `ttl` to embed the user. A white label can turn off invitations for its own entity users: a non-silent request from one gets 403 with `code` `entity_invitations_disabled` (silent provisioning by an account administrator is not affected).
48
48
  * @summary Add user to entity
49
49
  */
50
50
  export type addEntityUserResponse201 = {
@@ -31,7 +31,7 @@ export type SignupBody = {
31
31
  /** @minLength 1 */
32
32
  account_invitation_token?: string;
33
33
  /**
34
- * Optional campaign parameters (utm_source, utm_medium, utm_campaign) and ad click IDs (gclid, gbraid, wbraid, fbclid) from the link the user arrived through. Stored with the new user for first-party sign-up attribution and never returned. Each value is trimmed. A UTM value is kept only when it is 1–150 letters, digits, spaces or `_ . - + ~ ( )` and does not look like an email address, URL or secret; a click ID is kept only when it is 1–512 characters of `A-Z a-z 0-9 _ . -`. Invalid values and malformed objects are ignored rather than rejected.
34
+ * Optional campaign parameters (utm_source, utm_medium, utm_campaign) and ad click IDs (gclid, gbraid, wbraid, fbclid) from the link the user arrived through. Stored with the new user for first-party sign-up attribution and never returned. Each value is trimmed. A UTM value is kept only when it is 1–150 letters, digits, spaces or `_ . - + ~ ( ) / | : , & '` and does not look like an email address, URL or secret; a click ID is kept only when it is 1–512 characters of `A-Z a-z 0-9 _ . -`. Invalid values and malformed objects are ignored rather than rejected.
35
35
  * @nullable
36
36
  */
37
37
  signup_attribution?: SignupBodySignupAttribution;
@@ -31,7 +31,7 @@ export type SignupBody = {
31
31
  /** @minLength 1 */
32
32
  account_invitation_token?: string;
33
33
  /**
34
- * Optional campaign parameters (utm_source, utm_medium, utm_campaign) and ad click IDs (gclid, gbraid, wbraid, fbclid) from the link the user arrived through. Stored with the new user for first-party sign-up attribution and never returned. Each value is trimmed. A UTM value is kept only when it is 1–150 letters, digits, spaces or `_ . - + ~ ( )` and does not look like an email address, URL or secret; a click ID is kept only when it is 1–512 characters of `A-Z a-z 0-9 _ . -`. Invalid values and malformed objects are ignored rather than rejected.
34
+ * Optional campaign parameters (utm_source, utm_medium, utm_campaign) and ad click IDs (gclid, gbraid, wbraid, fbclid) from the link the user arrived through. Stored with the new user for first-party sign-up attribution and never returned. Each value is trimmed. A UTM value is kept only when it is 1–150 letters, digits, spaces or `_ . - + ~ ( ) / | : , & '` and does not look like an email address, URL or secret; a click ID is kept only when it is 1–512 characters of `A-Z a-z 0-9 _ . -`. Invalid values and malformed objects are ignored rather than rejected.
35
35
  * @nullable
36
36
  */
37
37
  signup_attribution?: SignupBodySignupAttribution;
@@ -6,7 +6,7 @@
6
6
  * OpenAPI spec version: 1.0.0
7
7
  */
8
8
  /**
9
- * Optional campaign parameters (utm_source, utm_medium, utm_campaign) and ad click IDs (gclid, gbraid, wbraid, fbclid) from the link the user arrived through. Stored with the new user for first-party sign-up attribution and never returned. Each value is trimmed. A UTM value is kept only when it is 1–150 letters, digits, spaces or `_ . - + ~ ( )` and does not look like an email address, URL or secret; a click ID is kept only when it is 1–512 characters of `A-Z a-z 0-9 _ . -`. Invalid values and malformed objects are ignored rather than rejected.
9
+ * Optional campaign parameters (utm_source, utm_medium, utm_campaign) and ad click IDs (gclid, gbraid, wbraid, fbclid) from the link the user arrived through. Stored with the new user for first-party sign-up attribution and never returned. Each value is trimmed. A UTM value is kept only when it is 1–150 letters, digits, spaces or `_ . - + ~ ( ) / | : , & '` and does not look like an email address, URL or secret; a click ID is kept only when it is 1–512 characters of `A-Z a-z 0-9 _ . -`. Invalid values and malformed objects are ignored rather than rejected.
10
10
  * @nullable
11
11
  */
12
12
  export type SignupBodySignupAttribution = {
@@ -6,7 +6,7 @@
6
6
  * OpenAPI spec version: 1.0.0
7
7
  */
8
8
  /**
9
- * Optional campaign parameters (utm_source, utm_medium, utm_campaign) and ad click IDs (gclid, gbraid, wbraid, fbclid) from the link the user arrived through. Stored with the new user for first-party sign-up attribution and never returned. Each value is trimmed. A UTM value is kept only when it is 1–150 letters, digits, spaces or `_ . - + ~ ( )` and does not look like an email address, URL or secret; a click ID is kept only when it is 1–512 characters of `A-Z a-z 0-9 _ . -`. Invalid values and malformed objects are ignored rather than rejected.
9
+ * Optional campaign parameters (utm_source, utm_medium, utm_campaign) and ad click IDs (gclid, gbraid, wbraid, fbclid) from the link the user arrived through. Stored with the new user for first-party sign-up attribution and never returned. Each value is trimmed. A UTM value is kept only when it is 1–150 letters, digits, spaces or `_ . - + ~ ( ) / | : , & '` and does not look like an email address, URL or secret; a click ID is kept only when it is 1–512 characters of `A-Z a-z 0-9 _ . -`. Invalid values and malformed objects are ignored rather than rejected.
10
10
  * @nullable
11
11
  */
12
12
  export type SignupBodySignupAttribution = {
@@ -28,6 +28,12 @@ export interface WhiteLabelConfig {
28
28
  hide_new_features_by_default: boolean;
29
29
  /** Whether the guided onboarding experience (setup wizard, first-steps dashboard, first-invoice guide) is enabled for this white label. Treat a missing value as false. */
30
30
  guided_onboarding_enabled?: boolean;
31
+ /** Whether self sign-up is allowed on this white label's domains. When false, sign-up and new-user OAuth sign-in are refused; invited users can still accept invitations. Owned by the production white-label record: the sandbox record reports the production value. Treat a missing value as true. */
32
+ signup_enabled?: boolean;
33
+ /** Whether white-label entity users can create entities (companies). Account members and account API keys are not affected. Owned by the production white-label record and applies to sandbox entities too. Treat a missing value as true. */
34
+ entity_creation_enabled?: boolean;
35
+ /** Whether white-label entity users can invite users to entities. Silent provisioning by account administrators is not affected. Owned by the production white-label record and applies to sandbox entities too. Treat a missing value as true. */
36
+ entity_invitations_enabled?: boolean;
31
37
  /** Catalog IDs reviewed during the last explicit capabilities save. */
32
38
  reviewed_feature_catalog_ids: string[];
33
39
  /**
@@ -28,6 +28,12 @@ export interface WhiteLabelConfig {
28
28
  hide_new_features_by_default: boolean;
29
29
  /** Whether the guided onboarding experience (setup wizard, first-steps dashboard, first-invoice guide) is enabled for this white label. Treat a missing value as false. */
30
30
  guided_onboarding_enabled?: boolean;
31
+ /** Whether self sign-up is allowed on this white label's domains. When false, sign-up and new-user OAuth sign-in are refused; invited users can still accept invitations. Owned by the production white-label record: the sandbox record reports the production value. Treat a missing value as true. */
32
+ signup_enabled?: boolean;
33
+ /** Whether white-label entity users can create entities (companies). Account members and account API keys are not affected. Owned by the production white-label record and applies to sandbox entities too. Treat a missing value as true. */
34
+ entity_creation_enabled?: boolean;
35
+ /** Whether white-label entity users can invite users to entities. Silent provisioning by account administrators is not affected. Owned by the production white-label record and applies to sandbox entities too. Treat a missing value as true. */
36
+ entity_invitations_enabled?: boolean;
31
37
  /** Catalog IDs reviewed during the last explicit capabilities save. */
32
38
  reviewed_feature_catalog_ids: string[];
33
39
  /**
@@ -454,7 +454,7 @@ export type loginResponse = (loginResponseSuccess | loginResponseError);
454
454
  export declare const getLoginUrl: () => string;
455
455
  export declare const login: (loginBody: LoginBody, options?: RequestInit) => Promise<loginResponse>;
456
456
  /**
457
- * Create a new user account. For regular main-app signups this provisions an initial account membership unless a valid account invitation token joins the user to an existing account. White-label signups remain entity-user signups and ignore account invitation tokens.
457
+ * Create a new user account. For regular main-app signups this provisions an initial account membership unless a valid account invitation token joins the user to an existing account. White-label signups remain entity-user signups and ignore account invitation tokens. A white label can turn off self sign-up: the request then fails with 403 and `code` `signup_disabled` before anything is created.
458
458
  * @summary Create user
459
459
  */
460
460
  export type signupResponse201 = {
@@ -465,6 +465,10 @@ export type signupResponse400 = {
465
465
  data: Error;
466
466
  status: 400;
467
467
  };
468
+ export type signupResponse403 = {
469
+ data: Error;
470
+ status: 403;
471
+ };
468
472
  export type signupResponse422 = {
469
473
  data: ValidationError;
470
474
  status: 422;
@@ -476,7 +480,7 @@ export type signupResponse500 = {
476
480
  export type signupResponseSuccess = (signupResponse201) & {
477
481
  headers: Headers;
478
482
  };
479
- export type signupResponseError = (signupResponse400 | signupResponse422 | signupResponse500) & {
483
+ export type signupResponseError = (signupResponse400 | signupResponse403 | signupResponse422 | signupResponse500) & {
480
484
  headers: Headers;
481
485
  };
482
486
  export type signupResponse = (signupResponseSuccess | signupResponseError);
@@ -454,7 +454,7 @@ export type loginResponse = (loginResponseSuccess | loginResponseError);
454
454
  export declare const getLoginUrl: () => string;
455
455
  export declare const login: (loginBody: LoginBody, options?: RequestInit) => Promise<loginResponse>;
456
456
  /**
457
- * Create a new user account. For regular main-app signups this provisions an initial account membership unless a valid account invitation token joins the user to an existing account. White-label signups remain entity-user signups and ignore account invitation tokens.
457
+ * Create a new user account. For regular main-app signups this provisions an initial account membership unless a valid account invitation token joins the user to an existing account. White-label signups remain entity-user signups and ignore account invitation tokens. A white label can turn off self sign-up: the request then fails with 403 and `code` `signup_disabled` before anything is created.
458
458
  * @summary Create user
459
459
  */
460
460
  export type signupResponse201 = {
@@ -465,6 +465,10 @@ export type signupResponse400 = {
465
465
  data: Error;
466
466
  status: 400;
467
467
  };
468
+ export type signupResponse403 = {
469
+ data: Error;
470
+ status: 403;
471
+ };
468
472
  export type signupResponse422 = {
469
473
  data: ValidationError;
470
474
  status: 422;
@@ -476,7 +480,7 @@ export type signupResponse500 = {
476
480
  export type signupResponseSuccess = (signupResponse201) & {
477
481
  headers: Headers;
478
482
  };
479
- export type signupResponseError = (signupResponse400 | signupResponse422 | signupResponse500) & {
483
+ export type signupResponseError = (signupResponse400 | signupResponse403 | signupResponse422 | signupResponse500) & {
480
484
  headers: Headers;
481
485
  };
482
486
  export type signupResponse = (signupResponseSuccess | signupResponseError);
@@ -336,7 +336,7 @@ export declare const RemoveEntityKsefCredentialResponse: zod.ZodObject<{
336
336
  exemption_reason: zod.ZodNullable<zod.ZodString>;
337
337
  }, zod.z.core.$strip>;
338
338
  /**
339
- * Create a new legal entity (business, organization, or sole proprietor). Entities are the core organizational unit that owns customers, invoices, and items. Each entity can have custom number formatting for invoices and other settings. The entity currency_code must be a fiat ISO 4217 code; a crypto asset code is rejected with 422 (crypto is only available as the currency_code of individual documents). For Czech entities (`country_code: CZ`) `company_number` (IČO, 8 digits with check digit) is required and `tax_number` must be a DIČ (`CZ` + 8–10 digits); invalid values respond 422 with `code` `CZ_COMPANY_NUMBER_REQUIRED`, `CZ_INVALID_COMPANY_NUMBER` or `CZ_INVALID_TAX_NUMBER`.
339
+ * Create a new legal entity (business, organization, or sole proprietor). Entities are the core organizational unit that owns customers, invoices, and items. Each entity can have custom number formatting for invoices and other settings. The entity currency_code must be a fiat ISO 4217 code; a crypto asset code is rejected with 422 (crypto is only available as the currency_code of individual documents). For Czech entities (`country_code: CZ`) `company_number` (IČO, 8 digits with check digit) is required and `tax_number` must be a DIČ (`CZ` + 8–10 digits); invalid values respond 422 with `code` `CZ_COMPANY_NUMBER_REQUIRED`, `CZ_INVALID_COMPANY_NUMBER` or `CZ_INVALID_TAX_NUMBER`. A white label can turn off company creation for its own end users (users without a role on the account): such a user gets 403 with `code` `entity_creation_disabled`; account members and account API keys are not affected.
340
340
  * @summary Create a new entity
341
341
  */
342
342
  export declare const createEntityHeaderXAccountIdRegExp: RegExp;
@@ -336,7 +336,7 @@ export declare const RemoveEntityKsefCredentialResponse: zod.ZodObject<{
336
336
  exemption_reason: zod.ZodNullable<zod.ZodString>;
337
337
  }, zod.z.core.$strip>;
338
338
  /**
339
- * Create a new legal entity (business, organization, or sole proprietor). Entities are the core organizational unit that owns customers, invoices, and items. Each entity can have custom number formatting for invoices and other settings. The entity currency_code must be a fiat ISO 4217 code; a crypto asset code is rejected with 422 (crypto is only available as the currency_code of individual documents). For Czech entities (`country_code: CZ`) `company_number` (IČO, 8 digits with check digit) is required and `tax_number` must be a DIČ (`CZ` + 8–10 digits); invalid values respond 422 with `code` `CZ_COMPANY_NUMBER_REQUIRED`, `CZ_INVALID_COMPANY_NUMBER` or `CZ_INVALID_TAX_NUMBER`.
339
+ * Create a new legal entity (business, organization, or sole proprietor). Entities are the core organizational unit that owns customers, invoices, and items. Each entity can have custom number formatting for invoices and other settings. The entity currency_code must be a fiat ISO 4217 code; a crypto asset code is rejected with 422 (crypto is only available as the currency_code of individual documents). For Czech entities (`country_code: CZ`) `company_number` (IČO, 8 digits with check digit) is required and `tax_number` must be a DIČ (`CZ` + 8–10 digits); invalid values respond 422 with `code` `CZ_COMPANY_NUMBER_REQUIRED`, `CZ_INVALID_COMPANY_NUMBER` or `CZ_INVALID_TAX_NUMBER`. A white label can turn off company creation for its own end users (users without a role on the account): such a user gets 403 with `code` `entity_creation_disabled`; account members and account API keys are not affected.
340
340
  * @summary Create a new entity
341
341
  */
342
342
  export declare const createEntityHeaderXAccountIdRegExp: RegExp;
@@ -83,7 +83,7 @@ export declare const CancelEntityInvitationResponse: zod.ZodObject<{
83
83
  message: zod.ZodString;
84
84
  }, zod.z.core.$strip>;
85
85
  /**
86
- * Resend an invitation email with a new token and extended expiry. Resending an `accountant` invitation follows the rules for creating one: a user signed in directly (403 for an API key), the entity's country must support the accounting module (422), and on a regular account the user must have an account role (403).
86
+ * Resend an invitation email with a new token and extended expiry. Resending an `accountant` invitation follows the rules for creating one: a user signed in directly (403 for an API key), the entity's country must support the accounting module (422), and on a regular account the user must have an account role (403). A white label can turn off invitations for its own entity users: resending as one gets 403 with `code` `entity_invitations_disabled`.
87
87
  * @summary Resend invitation
88
88
  */
89
89
  export declare const resendEntityInvitationPathIdRegExp: RegExp;
@@ -83,7 +83,7 @@ export declare const CancelEntityInvitationResponse: zod.ZodObject<{
83
83
  message: zod.ZodString;
84
84
  }, zod.z.core.$strip>;
85
85
  /**
86
- * Resend an invitation email with a new token and extended expiry. Resending an `accountant` invitation follows the rules for creating one: a user signed in directly (403 for an API key), the entity's country must support the accounting module (422), and on a regular account the user must have an account role (403).
86
+ * Resend an invitation email with a new token and extended expiry. Resending an `accountant` invitation follows the rules for creating one: a user signed in directly (403 for an API key), the entity's country must support the accounting module (422), and on a regular account the user must have an account role (403). A white label can turn off invitations for its own entity users: resending as one gets 403 with `code` `entity_invitations_disabled`.
87
87
  * @summary Resend invitation
88
88
  */
89
89
  export declare const resendEntityInvitationPathIdRegExp: RegExp;
@@ -35,7 +35,7 @@ export declare const GetEntityUsersResponse: zod.ZodObject<{
35
35
  }, zod.z.core.$strip>>;
36
36
  }, zod.z.core.$strip>;
37
37
  /**
38
- * Add an existing white-label user for this account to the entity or send an invitation. The `accountant` role invites a company's accountant to this one entity only: on a regular account the invitation links the accountant's own Space Invoices user (created when they accept, if they have none), on a white label it creates the white label's own user as for every other role. An accountant works like an editor and also uses the accounting module, with no user or settings management. Only a user signed in directly can invite one: an API key, an impersonation or a delegated session gets 403, `silent` cannot be combined with the role (422), and the entity's country must support the accounting module (422 otherwise). On a regular account only a user of the account (an owner, admin or member with an account role) can invite an accountant (403 otherwise); on a white label the white label's entity users who manage users can too. Existing account users must accept the invitation so they receive separate entity-user access. With `silent: true` no email is sent (`send_invite` is ignored): a missing white-label user is created immediately (no password, optional `metadata`) and linked to the entity, and an existing white-label user is linked. Silent provisioning requires an account API key or an account owner/admin signed in directly (an interactive session); delegated (SSO) tokens are rejected. The new user's email counts as verified when the credential is an account API key or a user token whose email is verified; otherwise the user must verify their email before sending documents by email. Silent provisioning can be followed by `POST /entities/users/{user_id}/token` with `ttl` to embed the user.
38
+ * Add an existing white-label user for this account to the entity or send an invitation. The `accountant` role invites a company's accountant to this one entity only: on a regular account the invitation links the accountant's own Space Invoices user (created when they accept, if they have none), on a white label it creates the white label's own user as for every other role. An accountant works like an editor and also uses the accounting module, with no user or settings management. Only a user signed in directly can invite one: an API key, an impersonation or a delegated session gets 403, `silent` cannot be combined with the role (422), and the entity's country must support the accounting module (422 otherwise). On a regular account only a user of the account (an owner, admin or member with an account role) can invite an accountant (403 otherwise); on a white label the white label's entity users who manage users can too. Existing account users must accept the invitation so they receive separate entity-user access. With `silent: true` no email is sent (`send_invite` is ignored): a missing white-label user is created immediately (no password, optional `metadata`) and linked to the entity, and an existing white-label user is linked. Silent provisioning requires an account API key or an account owner/admin signed in directly (an interactive session); delegated (SSO) tokens are rejected. The new user's email counts as verified when the credential is an account API key or a user token whose email is verified; otherwise the user must verify their email before sending documents by email. Silent provisioning can be followed by `POST /entities/users/{user_id}/token` with `ttl` to embed the user. A white label can turn off invitations for its own entity users: a non-silent request from one gets 403 with `code` `entity_invitations_disabled` (silent provisioning by an account administrator is not affected).
39
39
  * @summary Add user to entity
40
40
  */
41
41
  export declare const AddEntityUserHeader: zod.ZodObject<{
@@ -35,7 +35,7 @@ export declare const GetEntityUsersResponse: zod.ZodObject<{
35
35
  }, zod.z.core.$strip>>;
36
36
  }, zod.z.core.$strip>;
37
37
  /**
38
- * Add an existing white-label user for this account to the entity or send an invitation. The `accountant` role invites a company's accountant to this one entity only: on a regular account the invitation links the accountant's own Space Invoices user (created when they accept, if they have none), on a white label it creates the white label's own user as for every other role. An accountant works like an editor and also uses the accounting module, with no user or settings management. Only a user signed in directly can invite one: an API key, an impersonation or a delegated session gets 403, `silent` cannot be combined with the role (422), and the entity's country must support the accounting module (422 otherwise). On a regular account only a user of the account (an owner, admin or member with an account role) can invite an accountant (403 otherwise); on a white label the white label's entity users who manage users can too. Existing account users must accept the invitation so they receive separate entity-user access. With `silent: true` no email is sent (`send_invite` is ignored): a missing white-label user is created immediately (no password, optional `metadata`) and linked to the entity, and an existing white-label user is linked. Silent provisioning requires an account API key or an account owner/admin signed in directly (an interactive session); delegated (SSO) tokens are rejected. The new user's email counts as verified when the credential is an account API key or a user token whose email is verified; otherwise the user must verify their email before sending documents by email. Silent provisioning can be followed by `POST /entities/users/{user_id}/token` with `ttl` to embed the user.
38
+ * Add an existing white-label user for this account to the entity or send an invitation. The `accountant` role invites a company's accountant to this one entity only: on a regular account the invitation links the accountant's own Space Invoices user (created when they accept, if they have none), on a white label it creates the white label's own user as for every other role. An accountant works like an editor and also uses the accounting module, with no user or settings management. Only a user signed in directly can invite one: an API key, an impersonation or a delegated session gets 403, `silent` cannot be combined with the role (422), and the entity's country must support the accounting module (422 otherwise). On a regular account only a user of the account (an owner, admin or member with an account role) can invite an accountant (403 otherwise); on a white label the white label's entity users who manage users can too. Existing account users must accept the invitation so they receive separate entity-user access. With `silent: true` no email is sent (`send_invite` is ignored): a missing white-label user is created immediately (no password, optional `metadata`) and linked to the entity, and an existing white-label user is linked. Silent provisioning requires an account API key or an account owner/admin signed in directly (an interactive session); delegated (SSO) tokens are rejected. The new user's email counts as verified when the credential is an account API key or a user token whose email is verified; otherwise the user must verify their email before sending documents by email. Silent provisioning can be followed by `POST /entities/users/{user_id}/token` with `ttl` to embed the user. A white label can turn off invitations for its own entity users: a non-silent request from one gets 403 with `code` `entity_invitations_disabled` (silent provisioning by an account administrator is not affected).
39
39
  * @summary Add user to entity
40
40
  */
41
41
  export declare const AddEntityUserHeader: zod.ZodObject<{
@@ -264,7 +264,7 @@ export declare const LoginResponse: zod.ZodIntersection<zod.ZodObject<{
264
264
  redirect_origin: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
265
265
  }, zod.z.core.$strip>>;
266
266
  /**
267
- * Create a new user account. For regular main-app signups this provisions an initial account membership unless a valid account invitation token joins the user to an existing account. White-label signups remain entity-user signups and ignore account invitation tokens.
267
+ * Create a new user account. For regular main-app signups this provisions an initial account membership unless a valid account invitation token joins the user to an existing account. White-label signups remain entity-user signups and ignore account invitation tokens. A white label can turn off self sign-up: the request then fails with 403 and `code` `signup_disabled` before anything is created.
268
268
  * @summary Create user
269
269
  */
270
270
  export declare const signupBodyNameMin = 2;
@@ -264,7 +264,7 @@ export declare const LoginResponse: zod.ZodIntersection<zod.ZodObject<{
264
264
  redirect_origin: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
265
265
  }, zod.z.core.$strip>>;
266
266
  /**
267
- * Create a new user account. For regular main-app signups this provisions an initial account membership unless a valid account invitation token joins the user to an existing account. White-label signups remain entity-user signups and ignore account invitation tokens.
267
+ * Create a new user account. For regular main-app signups this provisions an initial account membership unless a valid account invitation token joins the user to an existing account. White-label signups remain entity-user signups and ignore account invitation tokens. A white label can turn off self sign-up: the request then fails with 403 and `code` `signup_disabled` before anything is created.
268
268
  * @summary Create user
269
269
  */
270
270
  export declare const signupBodyNameMin = 2;
@@ -22,6 +22,9 @@ export declare const GetCurrentWhiteLabelResponse: zod.ZodObject<{
22
22
  account_users_full_ui_enabled: zod.ZodBoolean;
23
23
  hide_new_features_by_default: zod.ZodBoolean;
24
24
  guided_onboarding_enabled: zod.ZodOptional<zod.ZodBoolean>;
25
+ signup_enabled: zod.ZodOptional<zod.ZodBoolean>;
26
+ entity_creation_enabled: zod.ZodOptional<zod.ZodBoolean>;
27
+ entity_invitations_enabled: zod.ZodOptional<zod.ZodBoolean>;
25
28
  reviewed_feature_catalog_ids: zod.ZodArray<zod.ZodString>;
26
29
  theme: zod.ZodOptional<zod.ZodNullable<zod.ZodObject<{
27
30
  primary: zod.ZodOptional<zod.ZodString>;
@@ -57,6 +60,9 @@ export declare const GetMyWhiteLabelResponse: zod.ZodObject<{
57
60
  account_users_full_ui_enabled: zod.ZodBoolean;
58
61
  hide_new_features_by_default: zod.ZodBoolean;
59
62
  guided_onboarding_enabled: zod.ZodOptional<zod.ZodBoolean>;
63
+ signup_enabled: zod.ZodOptional<zod.ZodBoolean>;
64
+ entity_creation_enabled: zod.ZodOptional<zod.ZodBoolean>;
65
+ entity_invitations_enabled: zod.ZodOptional<zod.ZodBoolean>;
60
66
  reviewed_feature_catalog_ids: zod.ZodArray<zod.ZodString>;
61
67
  theme: zod.ZodOptional<zod.ZodNullable<zod.ZodObject<{
62
68
  primary: zod.ZodOptional<zod.ZodString>;
@@ -22,6 +22,9 @@ export declare const GetCurrentWhiteLabelResponse: zod.ZodObject<{
22
22
  account_users_full_ui_enabled: zod.ZodBoolean;
23
23
  hide_new_features_by_default: zod.ZodBoolean;
24
24
  guided_onboarding_enabled: zod.ZodOptional<zod.ZodBoolean>;
25
+ signup_enabled: zod.ZodOptional<zod.ZodBoolean>;
26
+ entity_creation_enabled: zod.ZodOptional<zod.ZodBoolean>;
27
+ entity_invitations_enabled: zod.ZodOptional<zod.ZodBoolean>;
25
28
  reviewed_feature_catalog_ids: zod.ZodArray<zod.ZodString>;
26
29
  theme: zod.ZodOptional<zod.ZodNullable<zod.ZodObject<{
27
30
  primary: zod.ZodOptional<zod.ZodString>;
@@ -57,6 +60,9 @@ export declare const GetMyWhiteLabelResponse: zod.ZodObject<{
57
60
  account_users_full_ui_enabled: zod.ZodBoolean;
58
61
  hide_new_features_by_default: zod.ZodBoolean;
59
62
  guided_onboarding_enabled: zod.ZodOptional<zod.ZodBoolean>;
63
+ signup_enabled: zod.ZodOptional<zod.ZodBoolean>;
64
+ entity_creation_enabled: zod.ZodOptional<zod.ZodBoolean>;
65
+ entity_invitations_enabled: zod.ZodOptional<zod.ZodBoolean>;
60
66
  reviewed_feature_catalog_ids: zod.ZodArray<zod.ZodString>;
61
67
  theme: zod.ZodOptional<zod.ZodNullable<zod.ZodObject<{
62
68
  primary: zod.ZodOptional<zod.ZodString>;