@spaciv/sdk 0.1.4 → 0.1.6

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 (68) hide show
  1. package/.openapi-generator/FILES +6 -0
  2. package/README.md +2 -2
  3. package/dist/apis/AccountsApi.d.ts +4 -4
  4. package/dist/apis/AccountsApi.js +2 -2
  5. package/dist/apis/InternalApi.d.ts +57 -1
  6. package/dist/apis/InternalApi.js +83 -0
  7. package/dist/apis/ScriptsApi.d.ts +32 -9
  8. package/dist/apis/ScriptsApi.js +39 -4
  9. package/dist/esm/apis/AccountsApi.d.ts +4 -4
  10. package/dist/esm/apis/AccountsApi.js +2 -2
  11. package/dist/esm/apis/InternalApi.d.ts +57 -1
  12. package/dist/esm/apis/InternalApi.js +84 -1
  13. package/dist/esm/apis/ScriptsApi.d.ts +32 -9
  14. package/dist/esm/apis/ScriptsApi.js +40 -5
  15. package/dist/esm/models/AccountCalculationUsageDay.d.ts +6 -0
  16. package/dist/esm/models/AccountCalculationUsageDay.js +4 -0
  17. package/dist/esm/models/AssistantChatPollBody.d.ts +6 -0
  18. package/dist/esm/models/AssistantChatPollBody.js +4 -0
  19. package/dist/esm/models/AssistantChatPollMessage.d.ts +6 -0
  20. package/dist/esm/models/AssistantChatPollMessage.js +4 -0
  21. package/dist/esm/models/ScriptLimitOverrides.d.ts +62 -0
  22. package/dist/esm/models/ScriptLimitOverrides.js +51 -0
  23. package/dist/esm/models/ScriptLimitValues.d.ts +62 -0
  24. package/dist/esm/models/ScriptLimitValues.js +63 -0
  25. package/dist/esm/models/ScriptLimits.d.ts +62 -0
  26. package/dist/esm/models/ScriptLimits.js +63 -0
  27. package/dist/esm/models/ScriptLimitsResBody.d.ts +46 -0
  28. package/dist/esm/models/ScriptLimitsResBody.js +53 -0
  29. package/dist/esm/models/ScriptUsage.d.ts +50 -0
  30. package/dist/esm/models/ScriptUsage.js +55 -0
  31. package/dist/esm/models/ScriptUsageResBody.d.ts +103 -0
  32. package/dist/esm/models/ScriptUsageResBody.js +93 -0
  33. package/dist/esm/models/index.d.ts +6 -0
  34. package/dist/esm/models/index.js +6 -0
  35. package/dist/models/AccountCalculationUsageDay.d.ts +6 -0
  36. package/dist/models/AccountCalculationUsageDay.js +4 -0
  37. package/dist/models/AssistantChatPollBody.d.ts +6 -0
  38. package/dist/models/AssistantChatPollBody.js +4 -0
  39. package/dist/models/AssistantChatPollMessage.d.ts +6 -0
  40. package/dist/models/AssistantChatPollMessage.js +4 -0
  41. package/dist/models/ScriptLimitOverrides.d.ts +62 -0
  42. package/dist/models/ScriptLimitOverrides.js +58 -0
  43. package/dist/models/ScriptLimitValues.d.ts +62 -0
  44. package/dist/models/ScriptLimitValues.js +70 -0
  45. package/dist/models/ScriptLimits.d.ts +62 -0
  46. package/dist/models/ScriptLimits.js +70 -0
  47. package/dist/models/ScriptLimitsResBody.d.ts +46 -0
  48. package/dist/models/ScriptLimitsResBody.js +60 -0
  49. package/dist/models/ScriptUsage.d.ts +50 -0
  50. package/dist/models/ScriptUsage.js +62 -0
  51. package/dist/models/ScriptUsageResBody.d.ts +103 -0
  52. package/dist/models/ScriptUsageResBody.js +101 -0
  53. package/dist/models/index.d.ts +6 -0
  54. package/dist/models/index.js +6 -0
  55. package/package.json +1 -1
  56. package/src/apis/AccountsApi.ts +4 -4
  57. package/src/apis/InternalApi.ts +152 -0
  58. package/src/apis/ScriptsApi.ts +65 -8
  59. package/src/models/AccountCalculationUsageDay.ts +9 -0
  60. package/src/models/AssistantChatPollBody.ts +9 -0
  61. package/src/models/AssistantChatPollMessage.ts +9 -0
  62. package/src/models/ScriptLimitOverrides.ts +105 -0
  63. package/src/models/ScriptLimitValues.ts +111 -0
  64. package/src/models/ScriptLimits.ts +111 -0
  65. package/src/models/ScriptLimitsResBody.ts +99 -0
  66. package/src/models/ScriptUsage.ts +93 -0
  67. package/src/models/ScriptUsageResBody.ts +183 -0
  68. package/src/models/index.ts +6 -0
@@ -0,0 +1,93 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * spaciv API
5
+ * The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@spaciv.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import { ScriptLimitsFromJSON, ScriptLimitsToJSON, } from './ScriptLimits';
15
+ import { ScriptUsageFromJSON, ScriptUsageToJSON, } from './ScriptUsage';
16
+ /**
17
+ * @export
18
+ */
19
+ export const ScriptUsageResBodyCreditStateEnum = {
20
+ Ok: 'ok',
21
+ Near: 'near',
22
+ Reached: 'reached'
23
+ };
24
+ /**
25
+ * Check if a given object implements the ScriptUsageResBody interface.
26
+ */
27
+ export function instanceOfScriptUsageResBody(value) {
28
+ if (!('creditState' in value) || value['creditState'] === undefined)
29
+ return false;
30
+ if (!('creditsUsed' in value) || value['creditsUsed'] === undefined)
31
+ return false;
32
+ if (!('enabledScripts' in value) || value['enabledScripts'] === undefined)
33
+ return false;
34
+ if (!('failedRuns' in value) || value['failedRuns'] === undefined)
35
+ return false;
36
+ if (!('limits' in value) || value['limits'] === undefined)
37
+ return false;
38
+ if (!('period' in value) || value['period'] === undefined)
39
+ return false;
40
+ if (!('periodEnd' in value) || value['periodEnd'] === undefined)
41
+ return false;
42
+ if (!('periodStart' in value) || value['periodStart'] === undefined)
43
+ return false;
44
+ if (!('quotaExceededRuns' in value) || value['quotaExceededRuns'] === undefined)
45
+ return false;
46
+ if (!('runs' in value) || value['runs'] === undefined)
47
+ return false;
48
+ if (!('scripts' in value) || value['scripts'] === undefined)
49
+ return false;
50
+ return true;
51
+ }
52
+ export function ScriptUsageResBodyFromJSON(json) {
53
+ return ScriptUsageResBodyFromJSONTyped(json, false);
54
+ }
55
+ export function ScriptUsageResBodyFromJSONTyped(json, ignoreDiscriminator) {
56
+ if (json == null) {
57
+ return json;
58
+ }
59
+ return {
60
+ 'creditState': json['creditState'],
61
+ 'creditsUsed': json['creditsUsed'],
62
+ 'enabledScripts': json['enabledScripts'],
63
+ 'failedRuns': json['failedRuns'],
64
+ 'limits': ScriptLimitsFromJSON(json['limits']),
65
+ 'period': json['period'],
66
+ 'periodEnd': (new Date(json['periodEnd'])),
67
+ 'periodStart': (new Date(json['periodStart'])),
68
+ 'quotaExceededRuns': json['quotaExceededRuns'],
69
+ 'runs': json['runs'],
70
+ 'scripts': (json['scripts'].map(ScriptUsageFromJSON)),
71
+ };
72
+ }
73
+ export function ScriptUsageResBodyToJSON(json) {
74
+ return ScriptUsageResBodyToJSONTyped(json, false);
75
+ }
76
+ export function ScriptUsageResBodyToJSONTyped(value, ignoreDiscriminator = false) {
77
+ if (value == null) {
78
+ return value;
79
+ }
80
+ return {
81
+ 'creditState': value['creditState'],
82
+ 'creditsUsed': value['creditsUsed'],
83
+ 'enabledScripts': value['enabledScripts'],
84
+ 'failedRuns': value['failedRuns'],
85
+ 'limits': ScriptLimitsToJSON(value['limits']),
86
+ 'period': value['period'],
87
+ 'periodEnd': ((value['periodEnd']).toISOString()),
88
+ 'periodStart': ((value['periodStart']).toISOString()),
89
+ 'quotaExceededRuns': value['quotaExceededRuns'],
90
+ 'runs': value['runs'],
91
+ 'scripts': (value['scripts'].map(ScriptUsageToJSON)),
92
+ };
93
+ }
@@ -299,6 +299,10 @@ export * from './ScriptExport';
299
299
  export * from './ScriptExportResBody';
300
300
  export * from './ScriptExportRun';
301
301
  export * from './ScriptKey';
302
+ export * from './ScriptLimitOverrides';
303
+ export * from './ScriptLimitValues';
304
+ export * from './ScriptLimits';
305
+ export * from './ScriptLimitsResBody';
302
306
  export * from './ScriptListResBody';
303
307
  export * from './ScriptLogLine';
304
308
  export * from './ScriptPatchReqBody';
@@ -313,6 +317,8 @@ export * from './ScriptSchedulePreviewResBody';
313
317
  export * from './ScriptSecretsReqBody';
314
318
  export * from './ScriptSecretsResBody';
315
319
  export * from './ScriptSummary';
320
+ export * from './ScriptUsage';
321
+ export * from './ScriptUsageResBody';
316
322
  export * from './ScriptWebhookResBody';
317
323
  export * from './SendPasswordPutReqBody';
318
324
  export * from './SerializedEvent';
@@ -301,6 +301,10 @@ export * from './ScriptExport';
301
301
  export * from './ScriptExportResBody';
302
302
  export * from './ScriptExportRun';
303
303
  export * from './ScriptKey';
304
+ export * from './ScriptLimitOverrides';
305
+ export * from './ScriptLimitValues';
306
+ export * from './ScriptLimits';
307
+ export * from './ScriptLimitsResBody';
304
308
  export * from './ScriptListResBody';
305
309
  export * from './ScriptLogLine';
306
310
  export * from './ScriptPatchReqBody';
@@ -315,6 +319,8 @@ export * from './ScriptSchedulePreviewResBody';
315
319
  export * from './ScriptSecretsReqBody';
316
320
  export * from './ScriptSecretsResBody';
317
321
  export * from './ScriptSummary';
322
+ export * from './ScriptUsage';
323
+ export * from './ScriptUsageResBody';
318
324
  export * from './ScriptWebhookResBody';
319
325
  export * from './SendPasswordPutReqBody';
320
326
  export * from './SerializedEvent';
@@ -39,6 +39,12 @@ export interface AccountCalculationUsageDay {
39
39
  * @memberof AccountCalculationUsageDay
40
40
  */
41
41
  date: Date;
42
+ /**
43
+ * Credits used running scripts: one per started minute of each run.
44
+ * @type {number}
45
+ * @memberof AccountCalculationUsageDay
46
+ */
47
+ scripts: number;
42
48
  }
43
49
  /**
44
50
  * Check if a given object implements the AccountCalculationUsageDay interface.
@@ -30,6 +30,8 @@ function instanceOfAccountCalculationUsageDay(value) {
30
30
  return false;
31
31
  if (!('date' in value) || value['date'] === undefined)
32
32
  return false;
33
+ if (!('scripts' in value) || value['scripts'] === undefined)
34
+ return false;
33
35
  return true;
34
36
  }
35
37
  function AccountCalculationUsageDayFromJSON(json) {
@@ -44,6 +46,7 @@ function AccountCalculationUsageDayFromJSONTyped(json, ignoreDiscriminator) {
44
46
  'ai': json['ai'],
45
47
  'build': json['build'],
46
48
  'date': (new Date(json['date'])),
49
+ 'scripts': json['scripts'],
47
50
  };
48
51
  }
49
52
  function AccountCalculationUsageDayToJSON(json) {
@@ -58,5 +61,6 @@ function AccountCalculationUsageDayToJSONTyped(value, ignoreDiscriminator = fals
58
61
  'ai': value['ai'],
59
62
  'build': value['build'],
60
63
  'date': ((value['date']).toISOString().substring(0, 10)),
64
+ 'scripts': value['scripts'],
61
65
  };
62
66
  }
@@ -30,6 +30,12 @@ export interface AssistantChatPollBody {
30
30
  * @memberof AssistantChatPollBody
31
31
  */
32
32
  failure?: AssistantConversationFailureBody;
33
+ /**
34
+ * Tool calls whose results, failed or not, were recorded after the since cursor, by the toolCallId of their action message. A call that succeeded has no message of its own, so this is how a client tells a finished action from one still running. A later poll can list a call again.
35
+ * @type {Array<string>}
36
+ * @memberof AssistantChatPollBody
37
+ */
38
+ finishedToolCallIds: Array<string>;
33
39
  /**
34
40
  *
35
41
  * @type {Array<AssistantChatPollMessage>}
@@ -27,6 +27,8 @@ const AssistantChatPollMessage_1 = require("./AssistantChatPollMessage");
27
27
  function instanceOfAssistantChatPollBody(value) {
28
28
  if (!('actions' in value) || value['actions'] === undefined)
29
29
  return false;
30
+ if (!('finishedToolCallIds' in value) || value['finishedToolCallIds'] === undefined)
31
+ return false;
30
32
  if (!('messages' in value) || value['messages'] === undefined)
31
33
  return false;
32
34
  if (!('status' in value) || value['status'] === undefined)
@@ -43,6 +45,7 @@ function AssistantChatPollBodyFromJSONTyped(json, ignoreDiscriminator) {
43
45
  return {
44
46
  'actions': (json['actions'].map(AssistantChatPollAction_1.AssistantChatPollActionFromJSON)),
45
47
  'failure': json['failure'] == null ? undefined : (0, AssistantConversationFailureBody_1.AssistantConversationFailureBodyFromJSON)(json['failure']),
48
+ 'finishedToolCallIds': json['finishedToolCallIds'],
46
49
  'messages': (json['messages'].map(AssistantChatPollMessage_1.AssistantChatPollMessageFromJSON)),
47
50
  'status': json['status'],
48
51
  };
@@ -57,6 +60,7 @@ function AssistantChatPollBodyToJSONTyped(value, ignoreDiscriminator = false) {
57
60
  return {
58
61
  'actions': (value['actions'].map(AssistantChatPollAction_1.AssistantChatPollActionToJSON)),
59
62
  'failure': (0, AssistantConversationFailureBody_1.AssistantConversationFailureBodyToJSON)(value['failure']),
63
+ 'finishedToolCallIds': value['finishedToolCallIds'],
60
64
  'messages': (value['messages'].map(AssistantChatPollMessage_1.AssistantChatPollMessageToJSON)),
61
65
  'status': value['status'],
62
66
  };
@@ -64,6 +64,12 @@ export interface AssistantChatPollMessage {
64
64
  * @memberof AssistantChatPollMessage
65
65
  */
66
66
  text: string;
67
+ /**
68
+ * Id of the tool call an action message (kind 2) stands for. Empty on every other message.
69
+ * @type {string}
70
+ * @memberof AssistantChatPollMessage
71
+ */
72
+ toolCallId: string;
67
73
  }
68
74
  /**
69
75
  * Check if a given object implements the AssistantChatPollMessage interface.
@@ -39,6 +39,8 @@ function instanceOfAssistantChatPollMessage(value) {
39
39
  return false;
40
40
  if (!('text' in value) || value['text'] === undefined)
41
41
  return false;
42
+ if (!('toolCallId' in value) || value['toolCallId'] === undefined)
43
+ return false;
42
44
  return true;
43
45
  }
44
46
  function AssistantChatPollMessageFromJSON(json) {
@@ -57,6 +59,7 @@ function AssistantChatPollMessageFromJSONTyped(json, ignoreDiscriminator) {
57
59
  'requestId': json['requestId'],
58
60
  'role': json['role'],
59
61
  'text': json['text'],
62
+ 'toolCallId': json['toolCallId'],
60
63
  };
61
64
  }
62
65
  function AssistantChatPollMessageToJSON(json) {
@@ -75,5 +78,6 @@ function AssistantChatPollMessageToJSONTyped(value, ignoreDiscriminator = false)
75
78
  'requestId': value['requestId'],
76
79
  'role': value['role'],
77
80
  'text': value['text'],
81
+ 'toolCallId': value['toolCallId'],
78
82
  };
79
83
  }
@@ -0,0 +1,62 @@
1
+ /**
2
+ * spaciv API
3
+ * The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: support@spaciv.com
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface ScriptLimitOverrides
16
+ */
17
+ export interface ScriptLimitOverrides {
18
+ /**
19
+ *
20
+ * @type {number}
21
+ * @memberof ScriptLimitOverrides
22
+ */
23
+ maxConcurrentRuns?: number;
24
+ /**
25
+ *
26
+ * @type {number}
27
+ * @memberof ScriptLimitOverrides
28
+ */
29
+ maxCreditsPerMonth?: number;
30
+ /**
31
+ *
32
+ * @type {number}
33
+ * @memberof ScriptLimitOverrides
34
+ */
35
+ maxEnabledScripts?: number;
36
+ /**
37
+ *
38
+ * @type {number}
39
+ * @memberof ScriptLimitOverrides
40
+ */
41
+ maxRunSeconds?: number;
42
+ /**
43
+ *
44
+ * @type {number}
45
+ * @memberof ScriptLimitOverrides
46
+ */
47
+ minCronIntervalSeconds?: number;
48
+ /**
49
+ *
50
+ * @type {number}
51
+ * @memberof ScriptLimitOverrides
52
+ */
53
+ webhookRequestsPerMinute?: number;
54
+ }
55
+ /**
56
+ * Check if a given object implements the ScriptLimitOverrides interface.
57
+ */
58
+ export declare function instanceOfScriptLimitOverrides(value: object): value is ScriptLimitOverrides;
59
+ export declare function ScriptLimitOverridesFromJSON(json: any): ScriptLimitOverrides;
60
+ export declare function ScriptLimitOverridesFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptLimitOverrides;
61
+ export declare function ScriptLimitOverridesToJSON(json: any): ScriptLimitOverrides;
62
+ export declare function ScriptLimitOverridesToJSONTyped(value?: ScriptLimitOverrides | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * spaciv API
6
+ * The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: support@spaciv.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfScriptLimitOverrides = instanceOfScriptLimitOverrides;
17
+ exports.ScriptLimitOverridesFromJSON = ScriptLimitOverridesFromJSON;
18
+ exports.ScriptLimitOverridesFromJSONTyped = ScriptLimitOverridesFromJSONTyped;
19
+ exports.ScriptLimitOverridesToJSON = ScriptLimitOverridesToJSON;
20
+ exports.ScriptLimitOverridesToJSONTyped = ScriptLimitOverridesToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the ScriptLimitOverrides interface.
23
+ */
24
+ function instanceOfScriptLimitOverrides(value) {
25
+ return true;
26
+ }
27
+ function ScriptLimitOverridesFromJSON(json) {
28
+ return ScriptLimitOverridesFromJSONTyped(json, false);
29
+ }
30
+ function ScriptLimitOverridesFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'maxConcurrentRuns': json['maxConcurrentRuns'] == null ? undefined : json['maxConcurrentRuns'],
36
+ 'maxCreditsPerMonth': json['maxCreditsPerMonth'] == null ? undefined : json['maxCreditsPerMonth'],
37
+ 'maxEnabledScripts': json['maxEnabledScripts'] == null ? undefined : json['maxEnabledScripts'],
38
+ 'maxRunSeconds': json['maxRunSeconds'] == null ? undefined : json['maxRunSeconds'],
39
+ 'minCronIntervalSeconds': json['minCronIntervalSeconds'] == null ? undefined : json['minCronIntervalSeconds'],
40
+ 'webhookRequestsPerMinute': json['webhookRequestsPerMinute'] == null ? undefined : json['webhookRequestsPerMinute'],
41
+ };
42
+ }
43
+ function ScriptLimitOverridesToJSON(json) {
44
+ return ScriptLimitOverridesToJSONTyped(json, false);
45
+ }
46
+ function ScriptLimitOverridesToJSONTyped(value, ignoreDiscriminator = false) {
47
+ if (value == null) {
48
+ return value;
49
+ }
50
+ return {
51
+ 'maxConcurrentRuns': value['maxConcurrentRuns'],
52
+ 'maxCreditsPerMonth': value['maxCreditsPerMonth'],
53
+ 'maxEnabledScripts': value['maxEnabledScripts'],
54
+ 'maxRunSeconds': value['maxRunSeconds'],
55
+ 'minCronIntervalSeconds': value['minCronIntervalSeconds'],
56
+ 'webhookRequestsPerMinute': value['webhookRequestsPerMinute'],
57
+ };
58
+ }
@@ -0,0 +1,62 @@
1
+ /**
2
+ * spaciv API
3
+ * The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: support@spaciv.com
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface ScriptLimitValues
16
+ */
17
+ export interface ScriptLimitValues {
18
+ /**
19
+ *
20
+ * @type {number}
21
+ * @memberof ScriptLimitValues
22
+ */
23
+ maxConcurrentRuns: number;
24
+ /**
25
+ *
26
+ * @type {number}
27
+ * @memberof ScriptLimitValues
28
+ */
29
+ maxCreditsPerMonth: number;
30
+ /**
31
+ *
32
+ * @type {number}
33
+ * @memberof ScriptLimitValues
34
+ */
35
+ maxEnabledScripts: number;
36
+ /**
37
+ *
38
+ * @type {number}
39
+ * @memberof ScriptLimitValues
40
+ */
41
+ maxRunSeconds: number;
42
+ /**
43
+ *
44
+ * @type {number}
45
+ * @memberof ScriptLimitValues
46
+ */
47
+ minCronIntervalSeconds: number;
48
+ /**
49
+ *
50
+ * @type {number}
51
+ * @memberof ScriptLimitValues
52
+ */
53
+ webhookRequestsPerMinute: number;
54
+ }
55
+ /**
56
+ * Check if a given object implements the ScriptLimitValues interface.
57
+ */
58
+ export declare function instanceOfScriptLimitValues(value: object): value is ScriptLimitValues;
59
+ export declare function ScriptLimitValuesFromJSON(json: any): ScriptLimitValues;
60
+ export declare function ScriptLimitValuesFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptLimitValues;
61
+ export declare function ScriptLimitValuesToJSON(json: any): ScriptLimitValues;
62
+ export declare function ScriptLimitValuesToJSONTyped(value?: ScriptLimitValues | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * spaciv API
6
+ * The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: support@spaciv.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfScriptLimitValues = instanceOfScriptLimitValues;
17
+ exports.ScriptLimitValuesFromJSON = ScriptLimitValuesFromJSON;
18
+ exports.ScriptLimitValuesFromJSONTyped = ScriptLimitValuesFromJSONTyped;
19
+ exports.ScriptLimitValuesToJSON = ScriptLimitValuesToJSON;
20
+ exports.ScriptLimitValuesToJSONTyped = ScriptLimitValuesToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the ScriptLimitValues interface.
23
+ */
24
+ function instanceOfScriptLimitValues(value) {
25
+ if (!('maxConcurrentRuns' in value) || value['maxConcurrentRuns'] === undefined)
26
+ return false;
27
+ if (!('maxCreditsPerMonth' in value) || value['maxCreditsPerMonth'] === undefined)
28
+ return false;
29
+ if (!('maxEnabledScripts' in value) || value['maxEnabledScripts'] === undefined)
30
+ return false;
31
+ if (!('maxRunSeconds' in value) || value['maxRunSeconds'] === undefined)
32
+ return false;
33
+ if (!('minCronIntervalSeconds' in value) || value['minCronIntervalSeconds'] === undefined)
34
+ return false;
35
+ if (!('webhookRequestsPerMinute' in value) || value['webhookRequestsPerMinute'] === undefined)
36
+ return false;
37
+ return true;
38
+ }
39
+ function ScriptLimitValuesFromJSON(json) {
40
+ return ScriptLimitValuesFromJSONTyped(json, false);
41
+ }
42
+ function ScriptLimitValuesFromJSONTyped(json, ignoreDiscriminator) {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+ 'maxConcurrentRuns': json['maxConcurrentRuns'],
48
+ 'maxCreditsPerMonth': json['maxCreditsPerMonth'],
49
+ 'maxEnabledScripts': json['maxEnabledScripts'],
50
+ 'maxRunSeconds': json['maxRunSeconds'],
51
+ 'minCronIntervalSeconds': json['minCronIntervalSeconds'],
52
+ 'webhookRequestsPerMinute': json['webhookRequestsPerMinute'],
53
+ };
54
+ }
55
+ function ScriptLimitValuesToJSON(json) {
56
+ return ScriptLimitValuesToJSONTyped(json, false);
57
+ }
58
+ function ScriptLimitValuesToJSONTyped(value, ignoreDiscriminator = false) {
59
+ if (value == null) {
60
+ return value;
61
+ }
62
+ return {
63
+ 'maxConcurrentRuns': value['maxConcurrentRuns'],
64
+ 'maxCreditsPerMonth': value['maxCreditsPerMonth'],
65
+ 'maxEnabledScripts': value['maxEnabledScripts'],
66
+ 'maxRunSeconds': value['maxRunSeconds'],
67
+ 'minCronIntervalSeconds': value['minCronIntervalSeconds'],
68
+ 'webhookRequestsPerMinute': value['webhookRequestsPerMinute'],
69
+ };
70
+ }
@@ -0,0 +1,62 @@
1
+ /**
2
+ * spaciv API
3
+ * The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: support@spaciv.com
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface ScriptLimits
16
+ */
17
+ export interface ScriptLimits {
18
+ /**
19
+ * Runs the account may have in progress at once.
20
+ * @type {number}
21
+ * @memberof ScriptLimits
22
+ */
23
+ maxConcurrentRuns: number;
24
+ /**
25
+ * Credits the account's script runs may be charged in a calendar month (UTC). Once they are used, further runs are recorded as quota_exceeded and do not start.
26
+ * @type {number}
27
+ * @memberof ScriptLimits
28
+ */
29
+ maxCreditsPerMonth: number;
30
+ /**
31
+ * Scripts the account may have enabled at once.
32
+ * @type {number}
33
+ * @memberof ScriptLimits
34
+ */
35
+ maxEnabledScripts: number;
36
+ /**
37
+ * Longest a single run may take; a script's own timeout is capped to it.
38
+ * @type {number}
39
+ * @memberof ScriptLimits
40
+ */
41
+ maxRunSeconds: number;
42
+ /**
43
+ * Shortest time allowed between two scheduled runs of a script.
44
+ * @type {number}
45
+ * @memberof ScriptLimits
46
+ */
47
+ minCronIntervalSeconds: number;
48
+ /**
49
+ * Webhook calls each script accepts per minute, and at most in a burst.
50
+ * @type {number}
51
+ * @memberof ScriptLimits
52
+ */
53
+ webhookRequestsPerMinute: number;
54
+ }
55
+ /**
56
+ * Check if a given object implements the ScriptLimits interface.
57
+ */
58
+ export declare function instanceOfScriptLimits(value: object): value is ScriptLimits;
59
+ export declare function ScriptLimitsFromJSON(json: any): ScriptLimits;
60
+ export declare function ScriptLimitsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptLimits;
61
+ export declare function ScriptLimitsToJSON(json: any): ScriptLimits;
62
+ export declare function ScriptLimitsToJSONTyped(value?: ScriptLimits | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * spaciv API
6
+ * The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: support@spaciv.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfScriptLimits = instanceOfScriptLimits;
17
+ exports.ScriptLimitsFromJSON = ScriptLimitsFromJSON;
18
+ exports.ScriptLimitsFromJSONTyped = ScriptLimitsFromJSONTyped;
19
+ exports.ScriptLimitsToJSON = ScriptLimitsToJSON;
20
+ exports.ScriptLimitsToJSONTyped = ScriptLimitsToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the ScriptLimits interface.
23
+ */
24
+ function instanceOfScriptLimits(value) {
25
+ if (!('maxConcurrentRuns' in value) || value['maxConcurrentRuns'] === undefined)
26
+ return false;
27
+ if (!('maxCreditsPerMonth' in value) || value['maxCreditsPerMonth'] === undefined)
28
+ return false;
29
+ if (!('maxEnabledScripts' in value) || value['maxEnabledScripts'] === undefined)
30
+ return false;
31
+ if (!('maxRunSeconds' in value) || value['maxRunSeconds'] === undefined)
32
+ return false;
33
+ if (!('minCronIntervalSeconds' in value) || value['minCronIntervalSeconds'] === undefined)
34
+ return false;
35
+ if (!('webhookRequestsPerMinute' in value) || value['webhookRequestsPerMinute'] === undefined)
36
+ return false;
37
+ return true;
38
+ }
39
+ function ScriptLimitsFromJSON(json) {
40
+ return ScriptLimitsFromJSONTyped(json, false);
41
+ }
42
+ function ScriptLimitsFromJSONTyped(json, ignoreDiscriminator) {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+ 'maxConcurrentRuns': json['maxConcurrentRuns'],
48
+ 'maxCreditsPerMonth': json['maxCreditsPerMonth'],
49
+ 'maxEnabledScripts': json['maxEnabledScripts'],
50
+ 'maxRunSeconds': json['maxRunSeconds'],
51
+ 'minCronIntervalSeconds': json['minCronIntervalSeconds'],
52
+ 'webhookRequestsPerMinute': json['webhookRequestsPerMinute'],
53
+ };
54
+ }
55
+ function ScriptLimitsToJSON(json) {
56
+ return ScriptLimitsToJSONTyped(json, false);
57
+ }
58
+ function ScriptLimitsToJSONTyped(value, ignoreDiscriminator = false) {
59
+ if (value == null) {
60
+ return value;
61
+ }
62
+ return {
63
+ 'maxConcurrentRuns': value['maxConcurrentRuns'],
64
+ 'maxCreditsPerMonth': value['maxCreditsPerMonth'],
65
+ 'maxEnabledScripts': value['maxEnabledScripts'],
66
+ 'maxRunSeconds': value['maxRunSeconds'],
67
+ 'minCronIntervalSeconds': value['minCronIntervalSeconds'],
68
+ 'webhookRequestsPerMinute': value['webhookRequestsPerMinute'],
69
+ };
70
+ }