@spaceinvoices/js-sdk 11.1.2 → 12.0.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.
@@ -5,7 +5,7 @@
5
5
  * REST API for invoice management, customer management, and accounting operations. Features include cursor-based pagination for efficient data navigation, flexible JSON querying with MongoDB-style operators, full-text search across multiple fields, and comprehensive metadata support for custom tracking.
6
6
  * OpenAPI spec version: 1.0.0
7
7
  */
8
- import type { CreateEntityApiKeyBody, DeleteEntityApiKey200, EntityApiKey, EntityApiKeysList, Error, ValidationError } from '../model/index.cjs';
8
+ import type { CreateEntityApiKeyBody, CreateEntityApiKeyResponse, DeleteEntityApiKey200, EntityApiKeysList, Error, ValidationError } from '../model/index.cjs';
9
9
  /**
10
10
  * Retrieve all API keys for the current entity. Keys are masked for security.
11
11
  * @summary List entity API keys
@@ -48,7 +48,7 @@ export declare const listEntityApiKeys: (options?: RequestInit) => Promise<listE
48
48
  * @summary Create entity API key
49
49
  */
50
50
  export type createEntityApiKeyResponse201 = {
51
- data: EntityApiKey;
51
+ data: CreateEntityApiKeyResponse;
52
52
  status: 201;
53
53
  };
54
54
  export type createEntityApiKeyResponse400 = {
@@ -5,7 +5,7 @@
5
5
  * REST API for invoice management, customer management, and accounting operations. Features include cursor-based pagination for efficient data navigation, flexible JSON querying with MongoDB-style operators, full-text search across multiple fields, and comprehensive metadata support for custom tracking.
6
6
  * OpenAPI spec version: 1.0.0
7
7
  */
8
- import type { CreateEntityApiKeyBody, DeleteEntityApiKey200, EntityApiKey, EntityApiKeysList, Error, ValidationError } from '../model/index.js';
8
+ import type { CreateEntityApiKeyBody, CreateEntityApiKeyResponse, DeleteEntityApiKey200, EntityApiKeysList, Error, ValidationError } from '../model/index.js';
9
9
  /**
10
10
  * Retrieve all API keys for the current entity. Keys are masked for security.
11
11
  * @summary List entity API keys
@@ -48,7 +48,7 @@ export declare const listEntityApiKeys: (options?: RequestInit) => Promise<listE
48
48
  * @summary Create entity API key
49
49
  */
50
50
  export type createEntityApiKeyResponse201 = {
51
- data: EntityApiKey;
51
+ data: CreateEntityApiKeyResponse;
52
52
  status: 201;
53
53
  };
54
54
  export type createEntityApiKeyResponse400 = {
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Generated by orval v8.5.3 🍺
3
+ * Do not edit manually.
4
+ * Space Invoices API
5
+ * REST API for invoice management, customer management, and accounting operations. Features include cursor-based pagination for efficient data navigation, flexible JSON querying with MongoDB-style operators, full-text search across multiple fields, and comprehensive metadata support for custom tracking.
6
+ * OpenAPI spec version: 1.0.0
7
+ */
8
+ import type { EntityApiKey } from './entityApiKey.cjs';
9
+ export type CreateEntityApiKeyResponse = EntityApiKey & {
10
+ /** The full bearer secret (ek_* prefix). Returned ONLY here, once, at creation time. It is never shown again - store it now. Use `id` (the handle) for all later GET/DELETE calls. */
11
+ key: string;
12
+ };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Generated by orval v8.5.3 🍺
3
+ * Do not edit manually.
4
+ * Space Invoices API
5
+ * REST API for invoice management, customer management, and accounting operations. Features include cursor-based pagination for efficient data navigation, flexible JSON querying with MongoDB-style operators, full-text search across multiple fields, and comprehensive metadata support for custom tracking.
6
+ * OpenAPI spec version: 1.0.0
7
+ */
8
+ import type { EntityApiKey } from './entityApiKey.js';
9
+ export type CreateEntityApiKeyResponse = EntityApiKey & {
10
+ /** The full bearer secret (ek_* prefix). Returned ONLY here, once, at creation time. It is never shown again - store it now. Use `id` (the handle) for all later GET/DELETE calls. */
11
+ key: string;
12
+ };
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import type { EntityApiKeyEnvironment } from './entityApiKeyEnvironment.cjs';
9
9
  export interface EntityApiKey {
10
- /** API key (ek_* prefix for entity-scoped keys) */
10
+ /** Stable, non-secret handle for this key (akh_* prefix). Use this to address the key in GET/DELETE calls. It is NOT the bearer credential and cannot be used to authenticate. */
11
11
  id: string;
12
12
  /** Entity ID this key is scoped to */
13
13
  entity_id: string;
@@ -18,6 +18,8 @@ export interface EntityApiKey {
18
18
  name: string | null;
19
19
  /** Environment the key is valid for */
20
20
  environment: EntityApiKeyEnvironment;
21
+ /** Masked version of the key for display */
22
+ prefix_hint: string;
21
23
  /** When the key was created */
22
24
  created_at: string;
23
25
  /**
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import type { EntityApiKeyEnvironment } from './entityApiKeyEnvironment.js';
9
9
  export interface EntityApiKey {
10
- /** API key (ek_* prefix for entity-scoped keys) */
10
+ /** Stable, non-secret handle for this key (akh_* prefix). Use this to address the key in GET/DELETE calls. It is NOT the bearer credential and cannot be used to authenticate. */
11
11
  id: string;
12
12
  /** Entity ID this key is scoped to */
13
13
  entity_id: string;
@@ -18,6 +18,8 @@ export interface EntityApiKey {
18
18
  name: string | null;
19
19
  /** Environment the key is valid for */
20
20
  environment: EntityApiKeyEnvironment;
21
+ /** Masked version of the key for display */
22
+ prefix_hint: string;
21
23
  /** When the key was created */
22
24
  created_at: string;
23
25
  /**
@@ -5,8 +5,26 @@
5
5
  * REST API for invoice management, customer management, and accounting operations. Features include cursor-based pagination for efficient data navigation, flexible JSON querying with MongoDB-style operators, full-text search across multiple fields, and comprehensive metadata support for custom tracking.
6
6
  * OpenAPI spec version: 1.0.0
7
7
  */
8
- import type { EntityApiKey } from './entityApiKey.cjs';
9
- export type EntityApiKeyListItem = EntityApiKey & {
8
+ import type { EntityApiKeyListItemEnvironment } from './entityApiKeyListItemEnvironment.cjs';
9
+ export interface EntityApiKeyListItem {
10
+ /** Stable, non-secret handle for this key (akh_* prefix). Use this to address the key in GET/DELETE calls. It is NOT the bearer credential and cannot be used to authenticate. */
11
+ id: string;
12
+ /** Entity ID this key is scoped to */
13
+ entity_id: string;
14
+ /**
15
+ * Friendly name for the API key
16
+ * @nullable
17
+ */
18
+ name: string | null;
19
+ /** Environment the key is valid for */
20
+ environment: EntityApiKeyListItemEnvironment;
10
21
  /** Masked version of the key for display */
11
22
  prefix_hint: string;
12
- };
23
+ /** When the key was created */
24
+ created_at: string;
25
+ /**
26
+ * When the key expires, or null if it never expires
27
+ * @nullable
28
+ */
29
+ expires_at: string | null;
30
+ }
@@ -5,8 +5,26 @@
5
5
  * REST API for invoice management, customer management, and accounting operations. Features include cursor-based pagination for efficient data navigation, flexible JSON querying with MongoDB-style operators, full-text search across multiple fields, and comprehensive metadata support for custom tracking.
6
6
  * OpenAPI spec version: 1.0.0
7
7
  */
8
- import type { EntityApiKey } from './entityApiKey.js';
9
- export type EntityApiKeyListItem = EntityApiKey & {
8
+ import type { EntityApiKeyListItemEnvironment } from './entityApiKeyListItemEnvironment.js';
9
+ export interface EntityApiKeyListItem {
10
+ /** Stable, non-secret handle for this key (akh_* prefix). Use this to address the key in GET/DELETE calls. It is NOT the bearer credential and cannot be used to authenticate. */
11
+ id: string;
12
+ /** Entity ID this key is scoped to */
13
+ entity_id: string;
14
+ /**
15
+ * Friendly name for the API key
16
+ * @nullable
17
+ */
18
+ name: string | null;
19
+ /** Environment the key is valid for */
20
+ environment: EntityApiKeyListItemEnvironment;
10
21
  /** Masked version of the key for display */
11
22
  prefix_hint: string;
12
- };
23
+ /** When the key was created */
24
+ created_at: string;
25
+ /**
26
+ * When the key expires, or null if it never expires
27
+ * @nullable
28
+ */
29
+ expires_at: string | null;
30
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Generated by orval v8.5.3 🍺
3
+ * Do not edit manually.
4
+ * Space Invoices API
5
+ * REST API for invoice management, customer management, and accounting operations. Features include cursor-based pagination for efficient data navigation, flexible JSON querying with MongoDB-style operators, full-text search across multiple fields, and comprehensive metadata support for custom tracking.
6
+ * OpenAPI spec version: 1.0.0
7
+ */
8
+ /**
9
+ * Environment the key is valid for
10
+ */
11
+ export type EntityApiKeyListItemEnvironment = typeof EntityApiKeyListItemEnvironment[keyof typeof EntityApiKeyListItemEnvironment];
12
+ export declare const EntityApiKeyListItemEnvironment: {
13
+ readonly live: "live";
14
+ readonly sandbox: "sandbox";
15
+ };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Generated by orval v8.5.3 🍺
3
+ * Do not edit manually.
4
+ * Space Invoices API
5
+ * REST API for invoice management, customer management, and accounting operations. Features include cursor-based pagination for efficient data navigation, flexible JSON querying with MongoDB-style operators, full-text search across multiple fields, and comprehensive metadata support for custom tracking.
6
+ * OpenAPI spec version: 1.0.0
7
+ */
8
+ /**
9
+ * Environment the key is valid for
10
+ */
11
+ export type EntityApiKeyListItemEnvironment = typeof EntityApiKeyListItemEnvironment[keyof typeof EntityApiKeyListItemEnvironment];
12
+ export declare const EntityApiKeyListItemEnvironment: {
13
+ readonly live: "live";
14
+ readonly sandbox: "sandbox";
15
+ };
@@ -147,6 +147,7 @@ export * from './createdUserMetadata.cjs';
147
147
  export * from './createdUserSettings.cjs';
148
148
  export * from './createEInvoicingEnrollmentAuthorizationRequest.cjs';
149
149
  export * from './createEntityApiKeyBody.cjs';
150
+ export * from './createEntityApiKeyResponse.cjs';
150
151
  export * from './createEntityBody.cjs';
151
152
  export * from './createEntityBodyEnvironment.cjs';
152
153
  export * from './createEntityBodyMetadata.cjs';
@@ -421,6 +422,7 @@ export * from './entity.cjs';
421
422
  export * from './entityApiKey.cjs';
422
423
  export * from './entityApiKeyEnvironment.cjs';
423
424
  export * from './entityApiKeyListItem.cjs';
425
+ export * from './entityApiKeyListItemEnvironment.cjs';
424
426
  export * from './entityApiKeysList.cjs';
425
427
  export * from './entityBankAccount.cjs';
426
428
  export * from './entityBankAccountType.cjs';
@@ -147,6 +147,7 @@ export * from './createdUserMetadata.js';
147
147
  export * from './createdUserSettings.js';
148
148
  export * from './createEInvoicingEnrollmentAuthorizationRequest.js';
149
149
  export * from './createEntityApiKeyBody.js';
150
+ export * from './createEntityApiKeyResponse.js';
150
151
  export * from './createEntityBody.js';
151
152
  export * from './createEntityBodyEnvironment.js';
152
153
  export * from './createEntityBodyMetadata.js';
@@ -421,6 +422,7 @@ export * from './entity.js';
421
422
  export * from './entityApiKey.js';
422
423
  export * from './entityApiKeyEnvironment.js';
423
424
  export * from './entityApiKeyListItem.js';
425
+ export * from './entityApiKeyListItemEnvironment.js';
424
426
  export * from './entityApiKeysList.js';
425
427
  export * from './entityBankAccount.js';
426
428
  export * from './entityBankAccountType.js';
@@ -14,7 +14,7 @@ export declare const ListEntityApiKeysHeader: zod.ZodObject<{
14
14
  "x-entity-id": zod.ZodOptional<zod.ZodString>;
15
15
  }, zod.z.core.$strip>;
16
16
  export declare const ListEntityApiKeysResponse: zod.ZodObject<{
17
- data: zod.ZodArray<zod.ZodIntersection<zod.ZodObject<{
17
+ data: zod.ZodArray<zod.ZodObject<{
18
18
  id: zod.ZodString;
19
19
  entity_id: zod.ZodString;
20
20
  name: zod.ZodNullable<zod.ZodString>;
@@ -22,11 +22,10 @@ export declare const ListEntityApiKeysResponse: zod.ZodObject<{
22
22
  live: "live";
23
23
  sandbox: "sandbox";
24
24
  }>;
25
+ prefix_hint: zod.ZodString;
25
26
  created_at: zod.z.ZodISODateTime;
26
27
  expires_at: zod.ZodNullable<zod.z.ZodISODateTime>;
27
- }, zod.z.core.$strip>, zod.ZodObject<{
28
- prefix_hint: zod.ZodString;
29
- }, zod.z.core.$strip>>>;
28
+ }, zod.z.core.$strip>>;
30
29
  }, zod.z.core.$strip>;
31
30
  /**
32
31
  * Create a new entity-scoped API key (ek_* prefix). This key can only access this specific entity.
@@ -14,7 +14,7 @@ export declare const ListEntityApiKeysHeader: zod.ZodObject<{
14
14
  "x-entity-id": zod.ZodOptional<zod.ZodString>;
15
15
  }, zod.z.core.$strip>;
16
16
  export declare const ListEntityApiKeysResponse: zod.ZodObject<{
17
- data: zod.ZodArray<zod.ZodIntersection<zod.ZodObject<{
17
+ data: zod.ZodArray<zod.ZodObject<{
18
18
  id: zod.ZodString;
19
19
  entity_id: zod.ZodString;
20
20
  name: zod.ZodNullable<zod.ZodString>;
@@ -22,11 +22,10 @@ export declare const ListEntityApiKeysResponse: zod.ZodObject<{
22
22
  live: "live";
23
23
  sandbox: "sandbox";
24
24
  }>;
25
+ prefix_hint: zod.ZodString;
25
26
  created_at: zod.z.ZodISODateTime;
26
27
  expires_at: zod.ZodNullable<zod.z.ZodISODateTime>;
27
- }, zod.z.core.$strip>, zod.ZodObject<{
28
- prefix_hint: zod.ZodString;
29
- }, zod.z.core.$strip>>>;
28
+ }, zod.z.core.$strip>>;
30
29
  }, zod.z.core.$strip>;
31
30
  /**
32
31
  * Create a new entity-scoped API key (ek_* prefix). This key can only access this specific entity.