@spaceinvoices/js-sdk 17.4.0 → 17.5.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.
- package/dist/generated/entity-invitations/entity-invitations.d.cts +6 -2
- package/dist/generated/entity-invitations/entity-invitations.d.ts +6 -2
- package/dist/generated/entity-users/entity-users.d.cts +2 -2
- package/dist/generated/entity-users/entity-users.d.ts +2 -2
- package/dist/generated/model/acceptEntityInvitationBody.d.cts +3 -2
- package/dist/generated/model/acceptEntityInvitationBody.d.ts +3 -2
- package/dist/generated/model/addEntityUserBody.d.cts +1 -1
- package/dist/generated/model/addEntityUserBody.d.ts +1 -1
- package/dist/generated/model/addEntityUserBodyRole.d.cts +2 -1
- package/dist/generated/model/addEntityUserBodyRole.d.ts +2 -1
- package/dist/generated-zod/entity-invitations/entity-invitations.d.cts +2 -2
- package/dist/generated-zod/entity-invitations/entity-invitations.d.ts +2 -2
- package/dist/generated-zod/entity-users/entity-users.d.cts +3 -2
- package/dist/generated-zod/entity-users/entity-users.d.ts +3 -2
- package/dist/index.cjs +2 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
|
@@ -200,7 +200,7 @@ export type previewEntityInvitationResponse = (previewEntityInvitationResponseSu
|
|
|
200
200
|
export declare const getPreviewEntityInvitationUrl: (params: PreviewEntityInvitationParams) => string;
|
|
201
201
|
export declare const previewEntityInvitation: (params: PreviewEntityInvitationParams, options?: RequestInit) => Promise<previewEntityInvitationResponse>;
|
|
202
202
|
/**
|
|
203
|
-
* Accept an entity invitation by providing user details. Creates or links a white-label user for the invited entity account and grants entity access. Returns an interactive access token, or a restricted two-factor challenge when the user is enrolled or a direct membership policy requires setup. A session_2fa_setup_ token must complete required enrollment; any other session_2fa_ token must complete verification before authenticated requests.
|
|
203
|
+
* Accept an entity invitation by providing user details. Creates or links a white-label user for the invited entity account and grants entity access. An accountant invitation to a regular (non-white-label) account instead links the invitee's own Space Invoices user: an existing one is attached after its current password is verified (or, when the request carries the bearer token of that user's interactive sign-in, without a password, and that session is returned), and a new one is created with this password (without an account of its own) and gets only the invited entity. Returns an interactive access token, or a restricted two-factor challenge when the user is enrolled or a direct membership policy requires setup. A session_2fa_setup_ token must complete required enrollment; any other session_2fa_ token must complete verification before authenticated requests.
|
|
204
204
|
* @summary Accept invitation
|
|
205
205
|
*/
|
|
206
206
|
export type acceptEntityInvitationResponse200 = {
|
|
@@ -223,6 +223,10 @@ export type acceptEntityInvitationResponse404 = {
|
|
|
223
223
|
data: Error;
|
|
224
224
|
status: 404;
|
|
225
225
|
};
|
|
226
|
+
export type acceptEntityInvitationResponse409 = {
|
|
227
|
+
data: Error;
|
|
228
|
+
status: 409;
|
|
229
|
+
};
|
|
226
230
|
export type acceptEntityInvitationResponse422 = {
|
|
227
231
|
data: ValidationError;
|
|
228
232
|
status: 422;
|
|
@@ -234,7 +238,7 @@ export type acceptEntityInvitationResponse500 = {
|
|
|
234
238
|
export type acceptEntityInvitationResponseSuccess = (acceptEntityInvitationResponse200) & {
|
|
235
239
|
headers: Headers;
|
|
236
240
|
};
|
|
237
|
-
export type acceptEntityInvitationResponseError = (acceptEntityInvitationResponse400 | acceptEntityInvitationResponse401 | acceptEntityInvitationResponse403 | acceptEntityInvitationResponse404 | acceptEntityInvitationResponse422 | acceptEntityInvitationResponse500) & {
|
|
241
|
+
export type acceptEntityInvitationResponseError = (acceptEntityInvitationResponse400 | acceptEntityInvitationResponse401 | acceptEntityInvitationResponse403 | acceptEntityInvitationResponse404 | acceptEntityInvitationResponse409 | acceptEntityInvitationResponse422 | acceptEntityInvitationResponse500) & {
|
|
238
242
|
headers: Headers;
|
|
239
243
|
};
|
|
240
244
|
export type acceptEntityInvitationResponse = (acceptEntityInvitationResponseSuccess | acceptEntityInvitationResponseError);
|
|
@@ -200,7 +200,7 @@ export type previewEntityInvitationResponse = (previewEntityInvitationResponseSu
|
|
|
200
200
|
export declare const getPreviewEntityInvitationUrl: (params: PreviewEntityInvitationParams) => string;
|
|
201
201
|
export declare const previewEntityInvitation: (params: PreviewEntityInvitationParams, options?: RequestInit) => Promise<previewEntityInvitationResponse>;
|
|
202
202
|
/**
|
|
203
|
-
* Accept an entity invitation by providing user details. Creates or links a white-label user for the invited entity account and grants entity access. Returns an interactive access token, or a restricted two-factor challenge when the user is enrolled or a direct membership policy requires setup. A session_2fa_setup_ token must complete required enrollment; any other session_2fa_ token must complete verification before authenticated requests.
|
|
203
|
+
* Accept an entity invitation by providing user details. Creates or links a white-label user for the invited entity account and grants entity access. An accountant invitation to a regular (non-white-label) account instead links the invitee's own Space Invoices user: an existing one is attached after its current password is verified (or, when the request carries the bearer token of that user's interactive sign-in, without a password, and that session is returned), and a new one is created with this password (without an account of its own) and gets only the invited entity. Returns an interactive access token, or a restricted two-factor challenge when the user is enrolled or a direct membership policy requires setup. A session_2fa_setup_ token must complete required enrollment; any other session_2fa_ token must complete verification before authenticated requests.
|
|
204
204
|
* @summary Accept invitation
|
|
205
205
|
*/
|
|
206
206
|
export type acceptEntityInvitationResponse200 = {
|
|
@@ -223,6 +223,10 @@ export type acceptEntityInvitationResponse404 = {
|
|
|
223
223
|
data: Error;
|
|
224
224
|
status: 404;
|
|
225
225
|
};
|
|
226
|
+
export type acceptEntityInvitationResponse409 = {
|
|
227
|
+
data: Error;
|
|
228
|
+
status: 409;
|
|
229
|
+
};
|
|
226
230
|
export type acceptEntityInvitationResponse422 = {
|
|
227
231
|
data: ValidationError;
|
|
228
232
|
status: 422;
|
|
@@ -234,7 +238,7 @@ export type acceptEntityInvitationResponse500 = {
|
|
|
234
238
|
export type acceptEntityInvitationResponseSuccess = (acceptEntityInvitationResponse200) & {
|
|
235
239
|
headers: Headers;
|
|
236
240
|
};
|
|
237
|
-
export type acceptEntityInvitationResponseError = (acceptEntityInvitationResponse400 | acceptEntityInvitationResponse401 | acceptEntityInvitationResponse403 | acceptEntityInvitationResponse404 | acceptEntityInvitationResponse422 | acceptEntityInvitationResponse500) & {
|
|
241
|
+
export type acceptEntityInvitationResponseError = (acceptEntityInvitationResponse400 | acceptEntityInvitationResponse401 | acceptEntityInvitationResponse403 | acceptEntityInvitationResponse404 | acceptEntityInvitationResponse409 | acceptEntityInvitationResponse422 | acceptEntityInvitationResponse500) & {
|
|
238
242
|
headers: Headers;
|
|
239
243
|
};
|
|
240
244
|
export type acceptEntityInvitationResponse = (acceptEntityInvitationResponseSuccess | acceptEntityInvitationResponseError);
|
|
@@ -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 cannot be
|
|
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). 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 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
|
|
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 set here: a request naming it is refused with 422 (invite the accountant with `POST /entities/users`), 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. The `accountant` role cannot be
|
|
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). 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 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
|
|
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 set here: a request naming it is refused with 422 (invite the accountant with `POST /entities/users`), 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 = {
|
|
@@ -12,8 +12,9 @@ export type AcceptEntityInvitationBody = {
|
|
|
12
12
|
*/
|
|
13
13
|
name?: string;
|
|
14
14
|
/**
|
|
15
|
-
* Password for the new user account, or current password for an existing invited user
|
|
15
|
+
* Password for the new user account, or current password for an existing invited user. Omit it only when the request carries the bearer token of an interactive sign-in of the invited person's own Space Invoices user (an accountant invitation to a regular account); that session is then returned as `access_token`.
|
|
16
16
|
* @minLength 1
|
|
17
|
+
* @nullable
|
|
17
18
|
*/
|
|
18
|
-
password
|
|
19
|
+
password?: string | null;
|
|
19
20
|
};
|
|
@@ -12,8 +12,9 @@ export type AcceptEntityInvitationBody = {
|
|
|
12
12
|
*/
|
|
13
13
|
name?: string;
|
|
14
14
|
/**
|
|
15
|
-
* Password for the new user account, or current password for an existing invited user
|
|
15
|
+
* Password for the new user account, or current password for an existing invited user. Omit it only when the request carries the bearer token of an interactive sign-in of the invited person's own Space Invoices user (an accountant invitation to a regular account); that session is then returned as `access_token`.
|
|
16
16
|
* @minLength 1
|
|
17
|
+
* @nullable
|
|
17
18
|
*/
|
|
18
|
-
password
|
|
19
|
+
password?: string | null;
|
|
19
20
|
};
|
|
@@ -10,7 +10,7 @@ import type { AddEntityUserBodyRole } from './addEntityUserBodyRole.cjs';
|
|
|
10
10
|
export type AddEntityUserBody = {
|
|
11
11
|
/** Email address of the user to add or invite */
|
|
12
12
|
email: string;
|
|
13
|
-
/** Role to assign to the user */
|
|
13
|
+
/** Role to assign to the user. `accountant` invites a company accountant (see the role list above): it cannot be combined with `silent` and is refused for API keys. */
|
|
14
14
|
role?: AddEntityUserBodyRole;
|
|
15
15
|
/** Whether to send an invitation email (only applies to new users). Defaults to true. Ignored when `silent` is true: no email is sent. */
|
|
16
16
|
send_invite?: boolean;
|
|
@@ -10,7 +10,7 @@ import type { AddEntityUserBodyRole } from './addEntityUserBodyRole.js';
|
|
|
10
10
|
export type AddEntityUserBody = {
|
|
11
11
|
/** Email address of the user to add or invite */
|
|
12
12
|
email: string;
|
|
13
|
-
/** Role to assign to the user */
|
|
13
|
+
/** Role to assign to the user. `accountant` invites a company accountant (see the role list above): it cannot be combined with `silent` and is refused for API keys. */
|
|
14
14
|
role?: AddEntityUserBodyRole;
|
|
15
15
|
/** Whether to send an invitation email (only applies to new users). Defaults to true. Ignored when `silent` is true: no email is sent. */
|
|
16
16
|
send_invite?: boolean;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* OpenAPI spec version: 1.0.0
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
9
|
-
* Role to assign to the user
|
|
9
|
+
* Role to assign to the user. `accountant` invites a company accountant (see the role list above): it cannot be combined with `silent` and is refused for API keys.
|
|
10
10
|
*/
|
|
11
11
|
export type AddEntityUserBodyRole = typeof AddEntityUserBodyRole[keyof typeof AddEntityUserBodyRole];
|
|
12
12
|
export declare const AddEntityUserBodyRole: {
|
|
@@ -14,4 +14,5 @@ export declare const AddEntityUserBodyRole: {
|
|
|
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
|
-
* Role to assign to the user
|
|
9
|
+
* Role to assign to the user. `accountant` invites a company accountant (see the role list above): it cannot be combined with `silent` and is refused for API keys.
|
|
10
10
|
*/
|
|
11
11
|
export type AddEntityUserBodyRole = typeof AddEntityUserBodyRole[keyof typeof AddEntityUserBodyRole];
|
|
12
12
|
export declare const AddEntityUserBodyRole: {
|
|
@@ -14,4 +14,5 @@ export declare const AddEntityUserBodyRole: {
|
|
|
14
14
|
readonly editor: "editor";
|
|
15
15
|
readonly admin: "admin";
|
|
16
16
|
readonly staff: "staff";
|
|
17
|
+
readonly accountant: "accountant";
|
|
17
18
|
};
|
|
@@ -123,7 +123,7 @@ export declare const PreviewEntityInvitationResponse: zod.ZodObject<{
|
|
|
123
123
|
expires_at: zod.z.ZodISODateTime;
|
|
124
124
|
}, zod.z.core.$strip>;
|
|
125
125
|
/**
|
|
126
|
-
* Accept an entity invitation by providing user details. Creates or links a white-label user for the invited entity account and grants entity access. Returns an interactive access token, or a restricted two-factor challenge when the user is enrolled or a direct membership policy requires setup. A session_2fa_setup_ token must complete required enrollment; any other session_2fa_ token must complete verification before authenticated requests.
|
|
126
|
+
* Accept an entity invitation by providing user details. Creates or links a white-label user for the invited entity account and grants entity access. An accountant invitation to a regular (non-white-label) account instead links the invitee's own Space Invoices user: an existing one is attached after its current password is verified (or, when the request carries the bearer token of that user's interactive sign-in, without a password, and that session is returned), and a new one is created with this password (without an account of its own) and gets only the invited entity. Returns an interactive access token, or a restricted two-factor challenge when the user is enrolled or a direct membership policy requires setup. A session_2fa_setup_ token must complete required enrollment; any other session_2fa_ token must complete verification before authenticated requests.
|
|
127
127
|
* @summary Accept invitation
|
|
128
128
|
*/
|
|
129
129
|
export declare const AcceptEntityInvitationQueryParams: zod.ZodObject<{
|
|
@@ -132,7 +132,7 @@ export declare const AcceptEntityInvitationQueryParams: zod.ZodObject<{
|
|
|
132
132
|
export declare const acceptEntityInvitationBodyNameMax = 255;
|
|
133
133
|
export declare const AcceptEntityInvitationBody: zod.ZodObject<{
|
|
134
134
|
name: zod.ZodOptional<zod.ZodString>;
|
|
135
|
-
password: zod.ZodString
|
|
135
|
+
password: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
136
136
|
}, zod.z.core.$strip>;
|
|
137
137
|
export declare const AcceptEntityInvitationResponse: zod.ZodObject<{
|
|
138
138
|
message: zod.ZodString;
|
|
@@ -123,7 +123,7 @@ export declare const PreviewEntityInvitationResponse: zod.ZodObject<{
|
|
|
123
123
|
expires_at: zod.z.ZodISODateTime;
|
|
124
124
|
}, zod.z.core.$strip>;
|
|
125
125
|
/**
|
|
126
|
-
* Accept an entity invitation by providing user details. Creates or links a white-label user for the invited entity account and grants entity access. Returns an interactive access token, or a restricted two-factor challenge when the user is enrolled or a direct membership policy requires setup. A session_2fa_setup_ token must complete required enrollment; any other session_2fa_ token must complete verification before authenticated requests.
|
|
126
|
+
* Accept an entity invitation by providing user details. Creates or links a white-label user for the invited entity account and grants entity access. An accountant invitation to a regular (non-white-label) account instead links the invitee's own Space Invoices user: an existing one is attached after its current password is verified (or, when the request carries the bearer token of that user's interactive sign-in, without a password, and that session is returned), and a new one is created with this password (without an account of its own) and gets only the invited entity. Returns an interactive access token, or a restricted two-factor challenge when the user is enrolled or a direct membership policy requires setup. A session_2fa_setup_ token must complete required enrollment; any other session_2fa_ token must complete verification before authenticated requests.
|
|
127
127
|
* @summary Accept invitation
|
|
128
128
|
*/
|
|
129
129
|
export declare const AcceptEntityInvitationQueryParams: zod.ZodObject<{
|
|
@@ -132,7 +132,7 @@ export declare const AcceptEntityInvitationQueryParams: zod.ZodObject<{
|
|
|
132
132
|
export declare const acceptEntityInvitationBodyNameMax = 255;
|
|
133
133
|
export declare const AcceptEntityInvitationBody: zod.ZodObject<{
|
|
134
134
|
name: zod.ZodOptional<zod.ZodString>;
|
|
135
|
-
password: zod.ZodString
|
|
135
|
+
password: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
136
136
|
}, zod.z.core.$strip>;
|
|
137
137
|
export declare const AcceptEntityInvitationResponse: zod.ZodObject<{
|
|
138
138
|
message: zod.ZodString;
|
|
@@ -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 cannot be
|
|
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). 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.
|
|
39
39
|
* @summary Add user to entity
|
|
40
40
|
*/
|
|
41
41
|
export declare const AddEntityUserHeader: zod.ZodObject<{
|
|
@@ -51,6 +51,7 @@ export declare const AddEntityUserBody: zod.ZodObject<{
|
|
|
51
51
|
viewer: "viewer";
|
|
52
52
|
editor: "editor";
|
|
53
53
|
staff: "staff";
|
|
54
|
+
accountant: "accountant";
|
|
54
55
|
}>>;
|
|
55
56
|
send_invite: zod.ZodDefault<zod.ZodBoolean>;
|
|
56
57
|
silent: zod.ZodDefault<zod.ZodOptional<zod.ZodNullable<zod.ZodBoolean>>>;
|
|
@@ -80,7 +81,7 @@ export declare const GetEntityUsersAccessResponse: zod.ZodObject<{
|
|
|
80
81
|
enforce_entity_admin_preservation: zod.ZodBoolean;
|
|
81
82
|
}, zod.z.core.$strip>;
|
|
82
83
|
/**
|
|
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
|
|
84
|
+
* 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 set here: a request naming it is refused with 422 (invite the accountant with `POST /entities/users`), 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.
|
|
84
85
|
* @summary Update user role or metadata
|
|
85
86
|
*/
|
|
86
87
|
export declare const updateEntityUserRolePathUserIdRegExp: 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 cannot be
|
|
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). 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.
|
|
39
39
|
* @summary Add user to entity
|
|
40
40
|
*/
|
|
41
41
|
export declare const AddEntityUserHeader: zod.ZodObject<{
|
|
@@ -51,6 +51,7 @@ export declare const AddEntityUserBody: zod.ZodObject<{
|
|
|
51
51
|
viewer: "viewer";
|
|
52
52
|
editor: "editor";
|
|
53
53
|
staff: "staff";
|
|
54
|
+
accountant: "accountant";
|
|
54
55
|
}>>;
|
|
55
56
|
send_invite: zod.ZodDefault<zod.ZodBoolean>;
|
|
56
57
|
silent: zod.ZodDefault<zod.ZodOptional<zod.ZodNullable<zod.ZodBoolean>>>;
|
|
@@ -80,7 +81,7 @@ export declare const GetEntityUsersAccessResponse: zod.ZodObject<{
|
|
|
80
81
|
enforce_entity_admin_preservation: zod.ZodBoolean;
|
|
81
82
|
}, zod.z.core.$strip>;
|
|
82
83
|
/**
|
|
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
|
|
84
|
+
* 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 set here: a request naming it is refused with 422 (invite the accountant with `POST /entities/users`), 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.
|
|
84
85
|
* @summary Update user role or metadata
|
|
85
86
|
*/
|
|
86
87
|
export declare const updateEntityUserRolePathUserIdRegExp: RegExp;
|