@spaceinvoices/js-sdk 14.6.0 → 14.7.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 (41) hide show
  1. package/dist/generated/entity-users/entity-users.d.cts +2 -2
  2. package/dist/generated/entity-users/entity-users.d.ts +2 -2
  3. package/dist/generated/model/accountingSettings.d.cts +1 -1
  4. package/dist/generated/model/accountingSettings.d.ts +1 -1
  5. package/dist/generated/model/createdUser.d.cts +2 -0
  6. package/dist/generated/model/createdUser.d.ts +2 -0
  7. package/dist/generated/model/entityInvitation.d.cts +1 -1
  8. package/dist/generated/model/entityInvitation.d.ts +1 -1
  9. package/dist/generated/model/entityInvitationPreview.d.cts +1 -1
  10. package/dist/generated/model/entityInvitationPreview.d.ts +1 -1
  11. package/dist/generated/model/entityInvitationPreviewRole.d.cts +2 -1
  12. package/dist/generated/model/entityInvitationPreviewRole.d.ts +2 -1
  13. package/dist/generated/model/entityInvitationRole.d.cts +2 -1
  14. package/dist/generated/model/entityInvitationRole.d.ts +2 -1
  15. package/dist/generated/model/entityUser.d.cts +1 -1
  16. package/dist/generated/model/entityUser.d.ts +1 -1
  17. package/dist/generated/model/entityUserRole.d.cts +2 -1
  18. package/dist/generated/model/entityUserRole.d.ts +2 -1
  19. package/dist/generated/model/entityUsersAccess.d.cts +2 -0
  20. package/dist/generated/model/entityUsersAccess.d.ts +2 -0
  21. package/dist/generated/model/entityUsersAccessEntityRole.d.cts +1 -0
  22. package/dist/generated/model/entityUsersAccessEntityRole.d.ts +1 -0
  23. package/dist/generated/model/updateEntityUserRoleBody.d.cts +1 -1
  24. package/dist/generated/model/updateEntityUserRoleBody.d.ts +1 -1
  25. package/dist/generated/model/updateEntityUserRoleBodyRole.d.cts +1 -1
  26. package/dist/generated/model/updateEntityUserRoleBodyRole.d.ts +1 -1
  27. package/dist/generated/model/user.d.cts +2 -0
  28. package/dist/generated/model/user.d.ts +2 -0
  29. package/dist/generated/tax-reports/tax-reports.d.cts +5 -5
  30. package/dist/generated/tax-reports/tax-reports.d.ts +5 -5
  31. package/dist/generated-zod/entity-invitations/entity-invitations.d.cts +3 -0
  32. package/dist/generated-zod/entity-invitations/entity-invitations.d.ts +3 -0
  33. package/dist/generated-zod/entity-users/entity-users.d.cts +6 -3
  34. package/dist/generated-zod/entity-users/entity-users.d.ts +6 -3
  35. package/dist/generated-zod/tax-reports/tax-reports.d.cts +5 -5
  36. package/dist/generated-zod/tax-reports/tax-reports.d.ts +5 -5
  37. package/dist/generated-zod/users/users.d.cts +7 -0
  38. package/dist/generated-zod/users/users.d.ts +7 -0
  39. package/dist/index.cjs +4 -4
  40. package/dist/index.js +4 -4
  41. package/package.json +1 -1
@@ -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. 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 cannot be assigned this way (422). 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.
48
48
  * @summary Add user to entity
49
49
  */
50
50
  export type addEntityUserResponse201 = {
@@ -122,7 +122,7 @@ export type getEntityUsersAccessResponse = (getEntityUsersAccessResponseSuccess
122
122
  export declare const getGetEntityUsersAccessUrl: () => string;
123
123
  export declare const getEntityUsersAccess: (options?: RequestInit) => Promise<getEntityUsersAccessResponse>;
124
124
  /**
125
- * Update a user's role, metadata, or both. Send at least one of `role` and `metadata`. Roles: viewer (read-only), editor (read+write), admin (full access), staff (issues invoices and sees only their own). `metadata` replaces the stored object as a whole (string key-value data, up to 50 keys; `null` clears it) and is only available for the entity account's own white-label users (400 otherwise). Omitted fields are left unchanged.
125
+ * Update a user's role, metadata, or both. Send at least one of `role` and `metadata`. Roles you can assign: viewer (read-only), editor (read+write), admin (full access), staff (issues invoices and sees only their own). The `accountant` role (works like editor and also uses the accounting module) cannot be assigned here: a request naming it is refused with 422, and so is changing the role of a user who already is an accountant (remove them with `DELETE /entities/users/{user_id}` instead). `metadata` replaces the stored object as a whole (string key-value data, up to 50 keys; `null` clears it) and is only available for the entity account's own white-label users (400 otherwise). Omitted fields are left unchanged.
126
126
  * @summary Update user role or metadata
127
127
  */
128
128
  export type updateEntityUserRoleResponse200 = {
@@ -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. 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 cannot be assigned this way (422). 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.
48
48
  * @summary Add user to entity
49
49
  */
50
50
  export type addEntityUserResponse201 = {
@@ -122,7 +122,7 @@ export type getEntityUsersAccessResponse = (getEntityUsersAccessResponseSuccess
122
122
  export declare const getGetEntityUsersAccessUrl: () => string;
123
123
  export declare const getEntityUsersAccess: (options?: RequestInit) => Promise<getEntityUsersAccessResponse>;
124
124
  /**
125
- * Update a user's role, metadata, or both. Send at least one of `role` and `metadata`. Roles: viewer (read-only), editor (read+write), admin (full access), staff (issues invoices and sees only their own). `metadata` replaces the stored object as a whole (string key-value data, up to 50 keys; `null` clears it) and is only available for the entity account's own white-label users (400 otherwise). Omitted fields are left unchanged.
125
+ * Update a user's role, metadata, or both. Send at least one of `role` and `metadata`. Roles you can assign: viewer (read-only), editor (read+write), admin (full access), staff (issues invoices and sees only their own). The `accountant` role (works like editor and also uses the accounting module) cannot be assigned here: a request naming it is refused with 422, and so is changing the role of a user who already is an accountant (remove them with `DELETE /entities/users/{user_id}` instead). `metadata` replaces the stored object as a whole (string key-value data, up to 50 keys; `null` clears it) and is only available for the entity account's own white-label users (400 otherwise). Omitted fields are left unchanged.
126
126
  * @summary Update user role or metadata
127
127
  */
128
128
  export type updateEntityUserRoleResponse200 = {
@@ -18,7 +18,7 @@ export interface AccountingSettings {
18
18
  */
19
19
  files_recapitulative_statement?: boolean | null;
20
20
  /**
21
- * Email addresses notified about accounting module filing reminders. Each must belong to a user with a verified email and non-staff access to the entity: an entity user whose role is not staff, or any member of the entity's account (owner, admin or member); other addresses are rejected with 422. Reminders are sent only to recipients who are still eligible when they are sent: someone who lost access, was made a staff user or is a white-label user is skipped.
21
+ * Email addresses notified about accounting module filing reminders. Each must belong to a user with a verified email and non-staff access to the entity: an entity user whose role is not staff, or any member of the entity's account (owner, admin or member); other addresses are rejected with 422. Reminders are sent only to recipients who are still eligible when they are sent: someone who lost access, was made a staff user or is a white-label user who is not an accountant is skipped.
22
22
  * @maxItems 10
23
23
  * @nullable
24
24
  */
@@ -18,7 +18,7 @@ export interface AccountingSettings {
18
18
  */
19
19
  files_recapitulative_statement?: boolean | null;
20
20
  /**
21
- * Email addresses notified about accounting module filing reminders. Each must belong to a user with a verified email and non-staff access to the entity: an entity user whose role is not staff, or any member of the entity's account (owner, admin or member); other addresses are rejected with 422. Reminders are sent only to recipients who are still eligible when they are sent: someone who lost access, was made a staff user or is a white-label user is skipped.
21
+ * Email addresses notified about accounting module filing reminders. Each must belong to a user with a verified email and non-staff access to the entity: an entity user whose role is not staff, or any member of the entity's account (owner, admin or member); other addresses are rejected with 422. Reminders are sent only to recipients who are still eligible when they are sent: someone who lost access, was made a staff user or is a white-label user who is not an accountant is skipped.
22
22
  * @maxItems 10
23
23
  * @nullable
24
24
  */
@@ -29,6 +29,8 @@ export interface CreatedUser {
29
29
  * @nullable
30
30
  */
31
31
  metadata?: CreatedUserMetadata;
32
+ /** Whether the user signed up as an accountant. Read-only. Clients must treat an absent value as false. */
33
+ is_accountant?: boolean;
32
34
  created_at: string;
33
35
  updated_at: string;
34
36
  }
@@ -29,6 +29,8 @@ export interface CreatedUser {
29
29
  * @nullable
30
30
  */
31
31
  metadata?: CreatedUserMetadata;
32
+ /** Whether the user signed up as an accountant. Read-only. Clients must treat an absent value as false. */
33
+ is_accountant?: boolean;
32
34
  created_at: string;
33
35
  updated_at: string;
34
36
  }
@@ -14,7 +14,7 @@ export interface EntityInvitation {
14
14
  entity_id: string;
15
15
  /** Invitee email */
16
16
  email: string;
17
- /** User role on the entity. `viewer` reads, `editor` also writes, `admin` also manages users and settings, and `staff` issues invoices and works only with the invoices they created. */
17
+ /** User role on the entity. `viewer` reads, `editor` also writes, `admin` also manages users and settings, `staff` issues invoices and works only with the invoices they created, and `accountant` works like `editor` and also uses the accounting module. */
18
18
  role: EntityInvitationRole;
19
19
  /** ID of user who sent the invitation */
20
20
  invited_by_user_id: string;
@@ -14,7 +14,7 @@ export interface EntityInvitation {
14
14
  entity_id: string;
15
15
  /** Invitee email */
16
16
  email: string;
17
- /** User role on the entity. `viewer` reads, `editor` also writes, `admin` also manages users and settings, and `staff` issues invoices and works only with the invoices they created. */
17
+ /** User role on the entity. `viewer` reads, `editor` also writes, `admin` also manages users and settings, `staff` issues invoices and works only with the invoices they created, and `accountant` works like `editor` and also uses the accounting module. */
18
18
  role: EntityInvitationRole;
19
19
  /** ID of user who sent the invitation */
20
20
  invited_by_user_id: string;
@@ -11,7 +11,7 @@ export interface EntityInvitationPreview {
11
11
  email: string;
12
12
  entity_name: string;
13
13
  existing_user: boolean;
14
- /** User role on the entity. `viewer` reads, `editor` also writes, `admin` also manages users and settings, and `staff` issues invoices and works only with the invoices they created. */
14
+ /** User role on the entity. `viewer` reads, `editor` also writes, `admin` also manages users and settings, `staff` issues invoices and works only with the invoices they created, and `accountant` works like `editor` and also uses the accounting module. */
15
15
  role: EntityInvitationPreviewRole;
16
16
  status: EntityInvitationPreviewStatus;
17
17
  expires_at: string;
@@ -11,7 +11,7 @@ export interface EntityInvitationPreview {
11
11
  email: string;
12
12
  entity_name: string;
13
13
  existing_user: boolean;
14
- /** User role on the entity. `viewer` reads, `editor` also writes, `admin` also manages users and settings, and `staff` issues invoices and works only with the invoices they created. */
14
+ /** User role on the entity. `viewer` reads, `editor` also writes, `admin` also manages users and settings, `staff` issues invoices and works only with the invoices they created, and `accountant` works like `editor` and also uses the accounting module. */
15
15
  role: EntityInvitationPreviewRole;
16
16
  status: EntityInvitationPreviewStatus;
17
17
  expires_at: string;
@@ -6,7 +6,7 @@
6
6
  * OpenAPI spec version: 1.0.0
7
7
  */
8
8
  /**
9
- * User role on the entity. `viewer` reads, `editor` also writes, `admin` also manages users and settings, and `staff` issues invoices and works only with the invoices they created.
9
+ * User role on the entity. `viewer` reads, `editor` also writes, `admin` also manages users and settings, `staff` issues invoices and works only with the invoices they created, and `accountant` works like `editor` and also uses the accounting module.
10
10
  */
11
11
  export type EntityInvitationPreviewRole = typeof EntityInvitationPreviewRole[keyof typeof EntityInvitationPreviewRole];
12
12
  export declare const EntityInvitationPreviewRole: {
@@ -14,4 +14,5 @@ export declare const EntityInvitationPreviewRole: {
14
14
  readonly editor: "editor";
15
15
  readonly admin: "admin";
16
16
  readonly staff: "staff";
17
+ readonly accountant: "accountant";
17
18
  };
@@ -6,7 +6,7 @@
6
6
  * OpenAPI spec version: 1.0.0
7
7
  */
8
8
  /**
9
- * User role on the entity. `viewer` reads, `editor` also writes, `admin` also manages users and settings, and `staff` issues invoices and works only with the invoices they created.
9
+ * User role on the entity. `viewer` reads, `editor` also writes, `admin` also manages users and settings, `staff` issues invoices and works only with the invoices they created, and `accountant` works like `editor` and also uses the accounting module.
10
10
  */
11
11
  export type EntityInvitationPreviewRole = typeof EntityInvitationPreviewRole[keyof typeof EntityInvitationPreviewRole];
12
12
  export declare const EntityInvitationPreviewRole: {
@@ -14,4 +14,5 @@ export declare const EntityInvitationPreviewRole: {
14
14
  readonly editor: "editor";
15
15
  readonly admin: "admin";
16
16
  readonly staff: "staff";
17
+ readonly accountant: "accountant";
17
18
  };
@@ -6,7 +6,7 @@
6
6
  * OpenAPI spec version: 1.0.0
7
7
  */
8
8
  /**
9
- * User role on the entity. `viewer` reads, `editor` also writes, `admin` also manages users and settings, and `staff` issues invoices and works only with the invoices they created.
9
+ * User role on the entity. `viewer` reads, `editor` also writes, `admin` also manages users and settings, `staff` issues invoices and works only with the invoices they created, and `accountant` works like `editor` and also uses the accounting module.
10
10
  */
11
11
  export type EntityInvitationRole = typeof EntityInvitationRole[keyof typeof EntityInvitationRole];
12
12
  export declare const EntityInvitationRole: {
@@ -14,4 +14,5 @@ export declare const EntityInvitationRole: {
14
14
  readonly editor: "editor";
15
15
  readonly admin: "admin";
16
16
  readonly staff: "staff";
17
+ readonly accountant: "accountant";
17
18
  };
@@ -6,7 +6,7 @@
6
6
  * OpenAPI spec version: 1.0.0
7
7
  */
8
8
  /**
9
- * User role on the entity. `viewer` reads, `editor` also writes, `admin` also manages users and settings, and `staff` issues invoices and works only with the invoices they created.
9
+ * User role on the entity. `viewer` reads, `editor` also writes, `admin` also manages users and settings, `staff` issues invoices and works only with the invoices they created, and `accountant` works like `editor` and also uses the accounting module.
10
10
  */
11
11
  export type EntityInvitationRole = typeof EntityInvitationRole[keyof typeof EntityInvitationRole];
12
12
  export declare const EntityInvitationRole: {
@@ -14,4 +14,5 @@ export declare const EntityInvitationRole: {
14
14
  readonly editor: "editor";
15
15
  readonly admin: "admin";
16
16
  readonly staff: "staff";
17
+ readonly accountant: "accountant";
17
18
  };
@@ -12,7 +12,7 @@ export interface EntityUser {
12
12
  user_id: string;
13
13
  /** Entity ID */
14
14
  entity_id: string;
15
- /** User role on the entity. `viewer` reads, `editor` also writes, `admin` also manages users and settings, and `staff` issues invoices and works only with the invoices they created. */
15
+ /** User role on the entity. `viewer` reads, `editor` also writes, `admin` also manages users and settings, `staff` issues invoices and works only with the invoices they created, and `accountant` works like `editor` and also uses the accounting module. */
16
16
  role: EntityUserRole;
17
17
  /** User email */
18
18
  email: string;
@@ -12,7 +12,7 @@ export interface EntityUser {
12
12
  user_id: string;
13
13
  /** Entity ID */
14
14
  entity_id: string;
15
- /** User role on the entity. `viewer` reads, `editor` also writes, `admin` also manages users and settings, and `staff` issues invoices and works only with the invoices they created. */
15
+ /** User role on the entity. `viewer` reads, `editor` also writes, `admin` also manages users and settings, `staff` issues invoices and works only with the invoices they created, and `accountant` works like `editor` and also uses the accounting module. */
16
16
  role: EntityUserRole;
17
17
  /** User email */
18
18
  email: string;
@@ -6,7 +6,7 @@
6
6
  * OpenAPI spec version: 1.0.0
7
7
  */
8
8
  /**
9
- * User role on the entity. `viewer` reads, `editor` also writes, `admin` also manages users and settings, and `staff` issues invoices and works only with the invoices they created.
9
+ * User role on the entity. `viewer` reads, `editor` also writes, `admin` also manages users and settings, `staff` issues invoices and works only with the invoices they created, and `accountant` works like `editor` and also uses the accounting module.
10
10
  */
11
11
  export type EntityUserRole = typeof EntityUserRole[keyof typeof EntityUserRole];
12
12
  export declare const EntityUserRole: {
@@ -14,4 +14,5 @@ export declare const EntityUserRole: {
14
14
  readonly editor: "editor";
15
15
  readonly admin: "admin";
16
16
  readonly staff: "staff";
17
+ readonly accountant: "accountant";
17
18
  };
@@ -6,7 +6,7 @@
6
6
  * OpenAPI spec version: 1.0.0
7
7
  */
8
8
  /**
9
- * User role on the entity. `viewer` reads, `editor` also writes, `admin` also manages users and settings, and `staff` issues invoices and works only with the invoices they created.
9
+ * User role on the entity. `viewer` reads, `editor` also writes, `admin` also manages users and settings, `staff` issues invoices and works only with the invoices they created, and `accountant` works like `editor` and also uses the accounting module.
10
10
  */
11
11
  export type EntityUserRole = typeof EntityUserRole[keyof typeof EntityUserRole];
12
12
  export declare const EntityUserRole: {
@@ -14,4 +14,5 @@ export declare const EntityUserRole: {
14
14
  readonly editor: "editor";
15
15
  readonly admin: "admin";
16
16
  readonly staff: "staff";
17
+ readonly accountant: "accountant";
17
18
  };
@@ -35,6 +35,8 @@ export interface EntityUsersAccess {
35
35
  can_manage_entity_settings?: boolean;
36
36
  /** Whether the actor can issue invoices and work with the ones they created. When `can_read_entity` is false, the actor sees only those invoices. */
37
37
  can_use_own_documents?: boolean;
38
+ /** Whether the actor can use the accounting module for this entity. Only the `accountant` role can. Clients must treat an absent value as false. */
39
+ can_use_accounting?: boolean;
38
40
  /** Whether final entity admin demotion/removal must be blocked for this actor */
39
41
  enforce_entity_admin_preservation: boolean;
40
42
  }
@@ -35,6 +35,8 @@ export interface EntityUsersAccess {
35
35
  can_manage_entity_settings?: boolean;
36
36
  /** Whether the actor can issue invoices and work with the ones they created. When `can_read_entity` is false, the actor sees only those invoices. */
37
37
  can_use_own_documents?: boolean;
38
+ /** Whether the actor can use the accounting module for this entity. Only the `accountant` role can. Clients must treat an absent value as false. */
39
+ can_use_accounting?: boolean;
38
40
  /** Whether final entity admin demotion/removal must be blocked for this actor */
39
41
  enforce_entity_admin_preservation: boolean;
40
42
  }
@@ -15,4 +15,5 @@ export declare const EntityUsersAccessEntityRole: {
15
15
  readonly editor: "editor";
16
16
  readonly admin: "admin";
17
17
  readonly staff: "staff";
18
+ readonly accountant: "accountant";
18
19
  };
@@ -15,4 +15,5 @@ export declare const EntityUsersAccessEntityRole: {
15
15
  readonly editor: "editor";
16
16
  readonly admin: "admin";
17
17
  readonly staff: "staff";
18
+ readonly accountant: "accountant";
18
19
  };
@@ -8,7 +8,7 @@
8
8
  import type { UpdateEntityUserRoleBodyMetadata } from './updateEntityUserRoleBodyMetadata.cjs';
9
9
  import type { UpdateEntityUserRoleBodyRole } from './updateEntityUserRoleBodyRole.cjs';
10
10
  export type UpdateEntityUserRoleBody = {
11
- /** New role to assign to the user. Omit to leave the role unchanged. */
11
+ /** New role to assign to the user. Omit to leave the role unchanged. The role of an existing accountant cannot be changed (422); remove the accountant from the entity instead. */
12
12
  role?: UpdateEntityUserRoleBodyRole;
13
13
  /**
14
14
  * Replaces the white-label user's metadata. Send `null` to clear it. Omit to leave it unchanged. Only available for white-label users of the entity's account.
@@ -8,7 +8,7 @@
8
8
  import type { UpdateEntityUserRoleBodyMetadata } from './updateEntityUserRoleBodyMetadata.js';
9
9
  import type { UpdateEntityUserRoleBodyRole } from './updateEntityUserRoleBodyRole.js';
10
10
  export type UpdateEntityUserRoleBody = {
11
- /** New role to assign to the user. Omit to leave the role unchanged. */
11
+ /** New role to assign to the user. Omit to leave the role unchanged. The role of an existing accountant cannot be changed (422); remove the accountant from the entity instead. */
12
12
  role?: UpdateEntityUserRoleBodyRole;
13
13
  /**
14
14
  * Replaces the white-label user's metadata. Send `null` to clear it. Omit to leave it unchanged. Only available for white-label users of the entity's account.
@@ -6,7 +6,7 @@
6
6
  * OpenAPI spec version: 1.0.0
7
7
  */
8
8
  /**
9
- * New role to assign to the user. Omit to leave the role unchanged.
9
+ * New role to assign to the user. Omit to leave the role unchanged. The role of an existing accountant cannot be changed (422); remove the accountant from the entity instead.
10
10
  */
11
11
  export type UpdateEntityUserRoleBodyRole = typeof UpdateEntityUserRoleBodyRole[keyof typeof UpdateEntityUserRoleBodyRole];
12
12
  export declare const UpdateEntityUserRoleBodyRole: {
@@ -6,7 +6,7 @@
6
6
  * OpenAPI spec version: 1.0.0
7
7
  */
8
8
  /**
9
- * New role to assign to the user. Omit to leave the role unchanged.
9
+ * New role to assign to the user. Omit to leave the role unchanged. The role of an existing accountant cannot be changed (422); remove the accountant from the entity instead.
10
10
  */
11
11
  export type UpdateEntityUserRoleBodyRole = typeof UpdateEntityUserRoleBodyRole[keyof typeof UpdateEntityUserRoleBodyRole];
12
12
  export declare const UpdateEntityUserRoleBodyRole: {
@@ -25,6 +25,8 @@ export interface User {
25
25
  account_id?: string | null;
26
26
  settings: UserSettings;
27
27
  metadata: UserMetadata;
28
+ /** Whether the user signed up as an accountant. Read-only. Clients must treat an absent value as false. */
29
+ is_accountant?: boolean;
28
30
  created_at: string;
29
31
  updated_at: string;
30
32
  }
@@ -25,6 +25,8 @@ export interface User {
25
25
  account_id?: string | null;
26
26
  settings: UserSettings;
27
27
  metadata: UserMetadata;
28
+ /** Whether the user signed up as an accountant. Read-only. Clients must treat an absent value as false. */
29
+ is_accountant?: boolean;
28
30
  created_at: string;
29
31
  updated_at: string;
30
32
  }
@@ -375,7 +375,7 @@ export type getPayrollParameterHistoryResponse = (getPayrollParameterHistoryResp
375
375
  export declare const getGetPayrollParameterHistoryUrl: (params: GetPayrollParameterHistoryParams) => string;
376
376
  export declare const getPayrollParameterHistory: (params: GetPayrollParameterHistoryParams, options?: RequestInit) => Promise<getPayrollParameterHistoryResponse>;
377
377
  /**
378
- * Admin only. Creates an effective-dated override row for the current entity.
378
+ * Accountant only. Creates an effective-dated override row for the current entity.
379
379
  * @summary Set an entity-specific override for a payroll parameter
380
380
  */
381
381
  export type setPayrollParameterOverrideResponse200 = {
@@ -1240,7 +1240,7 @@ export type recomputeVatReturnResponse = (recomputeVatReturnResponseSuccess | re
1240
1240
  export declare const getRecomputeVatReturnUrl: (id: string) => string;
1241
1241
  export declare const recomputeVatReturn: (id: string, options?: RequestInit) => Promise<recomputeVatReturnResponse>;
1242
1242
  /**
1243
- * @summary Approve a draft VAT return (entity admin only)
1243
+ * @summary Approve a draft VAT return (accountant only)
1244
1244
  */
1245
1245
  export type approveVatReturnResponse200 = {
1246
1246
  data: VatReturn;
@@ -1284,7 +1284,7 @@ export type approveVatReturnResponse = (approveVatReturnResponseSuccess | approv
1284
1284
  export declare const getApproveVatReturnUrl: (id: string) => string;
1285
1285
  export declare const approveVatReturn: (id: string, options?: RequestInit) => Promise<approveVatReturnResponse>;
1286
1286
  /**
1287
- * @summary Record a VAT return as submitted to eDavki (entity admin only)
1287
+ * @summary Record a VAT return as submitted to eDavki (accountant only)
1288
1288
  */
1289
1289
  export type submitVatReturnResponse200 = {
1290
1290
  data: VatReturn;
@@ -1328,7 +1328,7 @@ export type submitVatReturnResponse = (submitVatReturnResponseSuccess | submitVa
1328
1328
  export declare const getSubmitVatReturnUrl: (id: string) => string;
1329
1329
  export declare const submitVatReturn: (id: string, submitVatReturnRequest?: SubmitVatReturnRequest, options?: RequestInit) => Promise<submitVatReturnResponse>;
1330
1330
  /**
1331
- * @summary Reopen an approved VAT return back to draft (entity admin only)
1331
+ * @summary Reopen an approved VAT return back to draft (accountant only)
1332
1332
  */
1333
1333
  export type reopenVatReturnResponse200 = {
1334
1334
  data: VatReturn;
@@ -1590,7 +1590,7 @@ export type dismissFilingResponse = (dismissFilingResponseSuccess | dismissFilin
1590
1590
  export declare const getDismissFilingUrl: (id: string) => string;
1591
1591
  export declare const dismissFiling: (id: string, dismissFilingRequest?: DismissFilingRequest, options?: RequestInit) => Promise<dismissFilingResponse>;
1592
1592
  /**
1593
- * Account-level view for accountants managing more than one entity: returns the filing obligations of the account's entities that can use the accounting module, each tagged with its entity id and name; other entities are left out. Scoped to one environment (`environment` query param, defaults to "live"), so live and sandbox entities are not mixed in one response.
1593
+ * Account-level view for accountants managing more than one entity: returns the filing obligations of the account's entities where the caller is the company's accountant and the accounting module is available, each tagged with its entity id and name; other entities are left out. Scoped to one environment (`environment` query param, defaults to "live"), so live and sandbox entities are not mixed in one response.
1594
1594
  * @summary List filing-calendar obligations across the account's entities
1595
1595
  */
1596
1596
  export type listAccountFilingsCalendarResponse200 = {
@@ -375,7 +375,7 @@ export type getPayrollParameterHistoryResponse = (getPayrollParameterHistoryResp
375
375
  export declare const getGetPayrollParameterHistoryUrl: (params: GetPayrollParameterHistoryParams) => string;
376
376
  export declare const getPayrollParameterHistory: (params: GetPayrollParameterHistoryParams, options?: RequestInit) => Promise<getPayrollParameterHistoryResponse>;
377
377
  /**
378
- * Admin only. Creates an effective-dated override row for the current entity.
378
+ * Accountant only. Creates an effective-dated override row for the current entity.
379
379
  * @summary Set an entity-specific override for a payroll parameter
380
380
  */
381
381
  export type setPayrollParameterOverrideResponse200 = {
@@ -1240,7 +1240,7 @@ export type recomputeVatReturnResponse = (recomputeVatReturnResponseSuccess | re
1240
1240
  export declare const getRecomputeVatReturnUrl: (id: string) => string;
1241
1241
  export declare const recomputeVatReturn: (id: string, options?: RequestInit) => Promise<recomputeVatReturnResponse>;
1242
1242
  /**
1243
- * @summary Approve a draft VAT return (entity admin only)
1243
+ * @summary Approve a draft VAT return (accountant only)
1244
1244
  */
1245
1245
  export type approveVatReturnResponse200 = {
1246
1246
  data: VatReturn;
@@ -1284,7 +1284,7 @@ export type approveVatReturnResponse = (approveVatReturnResponseSuccess | approv
1284
1284
  export declare const getApproveVatReturnUrl: (id: string) => string;
1285
1285
  export declare const approveVatReturn: (id: string, options?: RequestInit) => Promise<approveVatReturnResponse>;
1286
1286
  /**
1287
- * @summary Record a VAT return as submitted to eDavki (entity admin only)
1287
+ * @summary Record a VAT return as submitted to eDavki (accountant only)
1288
1288
  */
1289
1289
  export type submitVatReturnResponse200 = {
1290
1290
  data: VatReturn;
@@ -1328,7 +1328,7 @@ export type submitVatReturnResponse = (submitVatReturnResponseSuccess | submitVa
1328
1328
  export declare const getSubmitVatReturnUrl: (id: string) => string;
1329
1329
  export declare const submitVatReturn: (id: string, submitVatReturnRequest?: SubmitVatReturnRequest, options?: RequestInit) => Promise<submitVatReturnResponse>;
1330
1330
  /**
1331
- * @summary Reopen an approved VAT return back to draft (entity admin only)
1331
+ * @summary Reopen an approved VAT return back to draft (accountant only)
1332
1332
  */
1333
1333
  export type reopenVatReturnResponse200 = {
1334
1334
  data: VatReturn;
@@ -1590,7 +1590,7 @@ export type dismissFilingResponse = (dismissFilingResponseSuccess | dismissFilin
1590
1590
  export declare const getDismissFilingUrl: (id: string) => string;
1591
1591
  export declare const dismissFiling: (id: string, dismissFilingRequest?: DismissFilingRequest, options?: RequestInit) => Promise<dismissFilingResponse>;
1592
1592
  /**
1593
- * Account-level view for accountants managing more than one entity: returns the filing obligations of the account's entities that can use the accounting module, each tagged with its entity id and name; other entities are left out. Scoped to one environment (`environment` query param, defaults to "live"), so live and sandbox entities are not mixed in one response.
1593
+ * Account-level view for accountants managing more than one entity: returns the filing obligations of the account's entities where the caller is the company's accountant and the accounting module is available, each tagged with its entity id and name; other entities are left out. Scoped to one environment (`environment` query param, defaults to "live"), so live and sandbox entities are not mixed in one response.
1594
1594
  * @summary List filing-calendar obligations across the account's entities
1595
1595
  */
1596
1596
  export type listAccountFilingsCalendarResponse200 = {
@@ -23,6 +23,7 @@ export declare const ListEntityInvitationsResponse: zod.ZodObject<{
23
23
  viewer: "viewer";
24
24
  editor: "editor";
25
25
  staff: "staff";
26
+ accountant: "accountant";
26
27
  }>;
27
28
  invited_by_user_id: zod.ZodString;
28
29
  expires_at: zod.z.ZodISODateTime;
@@ -55,6 +56,7 @@ export declare const GetEntityInvitationResponse: zod.ZodObject<{
55
56
  viewer: "viewer";
56
57
  editor: "editor";
57
58
  staff: "staff";
59
+ accountant: "accountant";
58
60
  }>;
59
61
  invited_by_user_id: zod.ZodString;
60
62
  expires_at: zod.z.ZodISODateTime;
@@ -111,6 +113,7 @@ export declare const PreviewEntityInvitationResponse: zod.ZodObject<{
111
113
  viewer: "viewer";
112
114
  editor: "editor";
113
115
  staff: "staff";
116
+ accountant: "accountant";
114
117
  }>;
115
118
  status: zod.ZodEnum<{
116
119
  pending: "pending";
@@ -23,6 +23,7 @@ export declare const ListEntityInvitationsResponse: zod.ZodObject<{
23
23
  viewer: "viewer";
24
24
  editor: "editor";
25
25
  staff: "staff";
26
+ accountant: "accountant";
26
27
  }>;
27
28
  invited_by_user_id: zod.ZodString;
28
29
  expires_at: zod.z.ZodISODateTime;
@@ -55,6 +56,7 @@ export declare const GetEntityInvitationResponse: zod.ZodObject<{
55
56
  viewer: "viewer";
56
57
  editor: "editor";
57
58
  staff: "staff";
59
+ accountant: "accountant";
58
60
  }>;
59
61
  invited_by_user_id: zod.ZodString;
60
62
  expires_at: zod.z.ZodISODateTime;
@@ -111,6 +113,7 @@ export declare const PreviewEntityInvitationResponse: zod.ZodObject<{
111
113
  viewer: "viewer";
112
114
  editor: "editor";
113
115
  staff: "staff";
116
+ accountant: "accountant";
114
117
  }>;
115
118
  status: zod.ZodEnum<{
116
119
  pending: "pending";
@@ -25,6 +25,7 @@ export declare const GetEntityUsersResponse: zod.ZodObject<{
25
25
  viewer: "viewer";
26
26
  editor: "editor";
27
27
  staff: "staff";
28
+ accountant: "accountant";
28
29
  }>;
29
30
  email: zod.ZodString;
30
31
  name: zod.ZodNullable<zod.ZodString>;
@@ -34,7 +35,7 @@ export declare const GetEntityUsersResponse: zod.ZodObject<{
34
35
  }, zod.z.core.$strip>>;
35
36
  }, zod.z.core.$strip>;
36
37
  /**
37
- * Add an existing white-label user for this account to the entity or send an invitation. 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 cannot be assigned this way (422). 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
39
  * @summary Add user to entity
39
40
  */
40
41
  export declare const AddEntityUserHeader: zod.ZodObject<{
@@ -66,7 +67,7 @@ export declare const GetEntityUsersAccessResponse: zod.ZodObject<{
66
67
  account_id: zod.ZodString;
67
68
  account_role: zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodLiteral<"owner">, zod.ZodLiteral<"admin">, zod.ZodLiteral<"member">, zod.ZodLiteral<null>]>>;
68
69
  entity_id: zod.ZodString;
69
- entity_role: zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodLiteral<"viewer">, zod.ZodLiteral<"editor">, zod.ZodLiteral<"admin">, zod.ZodLiteral<"staff">, zod.ZodLiteral<null>]>>;
70
+ entity_role: zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodLiteral<"viewer">, zod.ZodLiteral<"editor">, zod.ZodLiteral<"admin">, zod.ZodLiteral<"staff">, zod.ZodLiteral<"accountant">, zod.ZodLiteral<null>]>>;
70
71
  is_account_admin: zod.ZodBoolean;
71
72
  is_entity_admin: zod.ZodBoolean;
72
73
  account_admin_override: zod.ZodBoolean;
@@ -75,10 +76,11 @@ export declare const GetEntityUsersAccessResponse: zod.ZodObject<{
75
76
  can_read_entity: zod.ZodOptional<zod.ZodBoolean>;
76
77
  can_manage_entity_settings: zod.ZodOptional<zod.ZodBoolean>;
77
78
  can_use_own_documents: zod.ZodOptional<zod.ZodBoolean>;
79
+ can_use_accounting: zod.ZodOptional<zod.ZodBoolean>;
78
80
  enforce_entity_admin_preservation: zod.ZodBoolean;
79
81
  }, zod.z.core.$strip>;
80
82
  /**
81
- * Update a user's role, metadata, or both. Send at least one of `role` and `metadata`. Roles: viewer (read-only), editor (read+write), admin (full access), staff (issues invoices and sees only their own). `metadata` replaces the stored object as a whole (string key-value data, up to 50 keys; `null` clears it) and is only available for the entity account's own white-label users (400 otherwise). Omitted fields are left unchanged.
83
+ * Update a user's role, metadata, or both. Send at least one of `role` and `metadata`. Roles you can assign: viewer (read-only), editor (read+write), admin (full access), staff (issues invoices and sees only their own). The `accountant` role (works like editor and also uses the accounting module) cannot be assigned here: a request naming it is refused with 422, and so is changing the role of a user who already is an accountant (remove them with `DELETE /entities/users/{user_id}` instead). `metadata` replaces the stored object as a whole (string key-value data, up to 50 keys; `null` clears it) and is only available for the entity account's own white-label users (400 otherwise). Omitted fields are left unchanged.
82
84
  * @summary Update user role or metadata
83
85
  */
84
86
  export declare const updateEntityUserRolePathUserIdRegExp: RegExp;
@@ -105,6 +107,7 @@ export declare const UpdateEntityUserRoleResponse: zod.ZodObject<{
105
107
  viewer: "viewer";
106
108
  editor: "editor";
107
109
  staff: "staff";
110
+ accountant: "accountant";
108
111
  }>;
109
112
  email: zod.ZodString;
110
113
  name: zod.ZodNullable<zod.ZodString>;
@@ -25,6 +25,7 @@ export declare const GetEntityUsersResponse: zod.ZodObject<{
25
25
  viewer: "viewer";
26
26
  editor: "editor";
27
27
  staff: "staff";
28
+ accountant: "accountant";
28
29
  }>;
29
30
  email: zod.ZodString;
30
31
  name: zod.ZodNullable<zod.ZodString>;
@@ -34,7 +35,7 @@ export declare const GetEntityUsersResponse: zod.ZodObject<{
34
35
  }, zod.z.core.$strip>>;
35
36
  }, zod.z.core.$strip>;
36
37
  /**
37
- * Add an existing white-label user for this account to the entity or send an invitation. 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 cannot be assigned this way (422). 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
39
  * @summary Add user to entity
39
40
  */
40
41
  export declare const AddEntityUserHeader: zod.ZodObject<{
@@ -66,7 +67,7 @@ export declare const GetEntityUsersAccessResponse: zod.ZodObject<{
66
67
  account_id: zod.ZodString;
67
68
  account_role: zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodLiteral<"owner">, zod.ZodLiteral<"admin">, zod.ZodLiteral<"member">, zod.ZodLiteral<null>]>>;
68
69
  entity_id: zod.ZodString;
69
- entity_role: zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodLiteral<"viewer">, zod.ZodLiteral<"editor">, zod.ZodLiteral<"admin">, zod.ZodLiteral<"staff">, zod.ZodLiteral<null>]>>;
70
+ entity_role: zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodLiteral<"viewer">, zod.ZodLiteral<"editor">, zod.ZodLiteral<"admin">, zod.ZodLiteral<"staff">, zod.ZodLiteral<"accountant">, zod.ZodLiteral<null>]>>;
70
71
  is_account_admin: zod.ZodBoolean;
71
72
  is_entity_admin: zod.ZodBoolean;
72
73
  account_admin_override: zod.ZodBoolean;
@@ -75,10 +76,11 @@ export declare const GetEntityUsersAccessResponse: zod.ZodObject<{
75
76
  can_read_entity: zod.ZodOptional<zod.ZodBoolean>;
76
77
  can_manage_entity_settings: zod.ZodOptional<zod.ZodBoolean>;
77
78
  can_use_own_documents: zod.ZodOptional<zod.ZodBoolean>;
79
+ can_use_accounting: zod.ZodOptional<zod.ZodBoolean>;
78
80
  enforce_entity_admin_preservation: zod.ZodBoolean;
79
81
  }, zod.z.core.$strip>;
80
82
  /**
81
- * Update a user's role, metadata, or both. Send at least one of `role` and `metadata`. Roles: viewer (read-only), editor (read+write), admin (full access), staff (issues invoices and sees only their own). `metadata` replaces the stored object as a whole (string key-value data, up to 50 keys; `null` clears it) and is only available for the entity account's own white-label users (400 otherwise). Omitted fields are left unchanged.
83
+ * Update a user's role, metadata, or both. Send at least one of `role` and `metadata`. Roles you can assign: viewer (read-only), editor (read+write), admin (full access), staff (issues invoices and sees only their own). The `accountant` role (works like editor and also uses the accounting module) cannot be assigned here: a request naming it is refused with 422, and so is changing the role of a user who already is an accountant (remove them with `DELETE /entities/users/{user_id}` instead). `metadata` replaces the stored object as a whole (string key-value data, up to 50 keys; `null` clears it) and is only available for the entity account's own white-label users (400 otherwise). Omitted fields are left unchanged.
82
84
  * @summary Update user role or metadata
83
85
  */
84
86
  export declare const updateEntityUserRolePathUserIdRegExp: RegExp;
@@ -105,6 +107,7 @@ export declare const UpdateEntityUserRoleResponse: zod.ZodObject<{
105
107
  viewer: "viewer";
106
108
  editor: "editor";
107
109
  staff: "staff";
110
+ accountant: "accountant";
108
111
  }>;
109
112
  email: zod.ZodString;
110
113
  name: zod.ZodNullable<zod.ZodString>;