@spaciv/sdk 0.1.13 → 0.1.15
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/.openapi-generator/FILES +4 -0
- package/README.md +2 -2
- package/dist/apis/AuthenticationApi.d.ts +4 -4
- package/dist/apis/AuthenticationApi.js +2 -2
- package/dist/esm/apis/AuthenticationApi.d.ts +4 -4
- package/dist/esm/apis/AuthenticationApi.js +2 -2
- package/dist/esm/models/ClientMessage.d.ts +67 -0
- package/dist/esm/models/ClientMessage.js +55 -0
- package/dist/esm/models/EntityChangeActor.d.ts +61 -0
- package/dist/esm/models/EntityChangeActor.js +52 -0
- package/dist/esm/models/EntityChangedEvent.d.ts +84 -0
- package/dist/esm/models/EntityChangedEvent.js +57 -0
- package/dist/esm/models/ServerMessage.d.ts +92 -0
- package/dist/esm/models/ServerMessage.js +67 -0
- package/dist/esm/models/index.d.ts +4 -0
- package/dist/esm/models/index.js +4 -0
- package/dist/models/ClientMessage.d.ts +67 -0
- package/dist/models/ClientMessage.js +63 -0
- package/dist/models/EntityChangeActor.d.ts +61 -0
- package/dist/models/EntityChangeActor.js +60 -0
- package/dist/models/EntityChangedEvent.d.ts +84 -0
- package/dist/models/EntityChangedEvent.js +65 -0
- package/dist/models/ServerMessage.d.ts +92 -0
- package/dist/models/ServerMessage.js +75 -0
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/package.json +1 -1
- package/src/apis/AuthenticationApi.ts +4 -4
- package/src/models/ClientMessage.ts +114 -0
- package/src/models/EntityChangeActor.ts +108 -0
- package/src/models/EntityChangedEvent.ts +149 -0
- package/src/models/ServerMessage.ts +151 -0
- package/src/models/index.ts +4 -0
|
@@ -0,0 +1,151 @@
|
|
|
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
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { EntityChangedEvent } from './EntityChangedEvent';
|
|
17
|
+
import {
|
|
18
|
+
EntityChangedEventFromJSON,
|
|
19
|
+
EntityChangedEventFromJSONTyped,
|
|
20
|
+
EntityChangedEventToJSON,
|
|
21
|
+
EntityChangedEventToJSONTyped,
|
|
22
|
+
} from './EntityChangedEvent';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface ServerMessage
|
|
28
|
+
*/
|
|
29
|
+
export interface ServerMessage {
|
|
30
|
+
[key: string]: any | any;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof ServerMessage
|
|
35
|
+
*/
|
|
36
|
+
code?: ServerMessageCodeEnum;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {Array<EntityChangedEvent>}
|
|
40
|
+
* @memberof ServerMessage
|
|
41
|
+
*/
|
|
42
|
+
events?: Array<EntityChangedEvent>;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof ServerMessage
|
|
47
|
+
*/
|
|
48
|
+
message?: string;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof ServerMessage
|
|
53
|
+
*/
|
|
54
|
+
topic?: string;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {string}
|
|
58
|
+
* @memberof ServerMessage
|
|
59
|
+
*/
|
|
60
|
+
type: ServerMessageTypeEnum;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @type {number}
|
|
64
|
+
* @memberof ServerMessage
|
|
65
|
+
*/
|
|
66
|
+
v: ServerMessageVEnum;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @export
|
|
72
|
+
*/
|
|
73
|
+
export const ServerMessageCodeEnum = {
|
|
74
|
+
InvalidTopic: 'invalid_topic',
|
|
75
|
+
Forbidden: 'forbidden',
|
|
76
|
+
NotFound: 'not_found',
|
|
77
|
+
TooManySubscriptions: 'too_many_subscriptions',
|
|
78
|
+
Unavailable: 'unavailable'
|
|
79
|
+
} as const;
|
|
80
|
+
export type ServerMessageCodeEnum = typeof ServerMessageCodeEnum[keyof typeof ServerMessageCodeEnum];
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @export
|
|
84
|
+
*/
|
|
85
|
+
export const ServerMessageTypeEnum = {
|
|
86
|
+
Changed: 'changed',
|
|
87
|
+
Subscribed: 'subscribed',
|
|
88
|
+
Resync: 'resync',
|
|
89
|
+
Error: 'error'
|
|
90
|
+
} as const;
|
|
91
|
+
export type ServerMessageTypeEnum = typeof ServerMessageTypeEnum[keyof typeof ServerMessageTypeEnum];
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* @export
|
|
95
|
+
*/
|
|
96
|
+
export const ServerMessageVEnum = {
|
|
97
|
+
NUMBER_1: 1
|
|
98
|
+
} as const;
|
|
99
|
+
export type ServerMessageVEnum = typeof ServerMessageVEnum[keyof typeof ServerMessageVEnum];
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Check if a given object implements the ServerMessage interface.
|
|
104
|
+
*/
|
|
105
|
+
export function instanceOfServerMessage(value: object): value is ServerMessage {
|
|
106
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
107
|
+
if (!('v' in value) || value['v'] === undefined) return false;
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function ServerMessageFromJSON(json: any): ServerMessage {
|
|
112
|
+
return ServerMessageFromJSONTyped(json, false);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function ServerMessageFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServerMessage {
|
|
116
|
+
if (json == null) {
|
|
117
|
+
return json;
|
|
118
|
+
}
|
|
119
|
+
return {
|
|
120
|
+
|
|
121
|
+
...json,
|
|
122
|
+
'code': json['code'] == null ? undefined : json['code'],
|
|
123
|
+
'events': json['events'] == null ? undefined : ((json['events'] as Array<any>).map(EntityChangedEventFromJSON)),
|
|
124
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
125
|
+
'topic': json['topic'] == null ? undefined : json['topic'],
|
|
126
|
+
'type': json['type'],
|
|
127
|
+
'v': json['v'],
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export function ServerMessageToJSON(json: any): ServerMessage {
|
|
132
|
+
return ServerMessageToJSONTyped(json, false);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export function ServerMessageToJSONTyped(value?: ServerMessage | null, ignoreDiscriminator: boolean = false): any {
|
|
136
|
+
if (value == null) {
|
|
137
|
+
return value;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
return {
|
|
141
|
+
|
|
142
|
+
...value,
|
|
143
|
+
'code': value['code'],
|
|
144
|
+
'events': value['events'] == null ? undefined : ((value['events'] as Array<any>).map(EntityChangedEventToJSON)),
|
|
145
|
+
'message': value['message'],
|
|
146
|
+
'topic': value['topic'],
|
|
147
|
+
'type': value['type'],
|
|
148
|
+
'v': value['v'],
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -83,6 +83,7 @@ export * from './CalcTreeValue';
|
|
|
83
83
|
export * from './CalcTypeSingleValue';
|
|
84
84
|
export * from './ChangelogOption';
|
|
85
85
|
export * from './ChangelogValueOption';
|
|
86
|
+
export * from './ClientMessage';
|
|
86
87
|
export * from './ConfidentialityData';
|
|
87
88
|
export * from './Contribution';
|
|
88
89
|
export * from './ContributionChangelogBody';
|
|
@@ -168,6 +169,8 @@ export * from './DatasetDataOneOf2';
|
|
|
168
169
|
export * from './DatasetModify';
|
|
169
170
|
export * from './DatasetRes';
|
|
170
171
|
export * from './DaysOffData';
|
|
172
|
+
export * from './EntityChangeActor';
|
|
173
|
+
export * from './EntityChangedEvent';
|
|
171
174
|
export * from './EntryPatch';
|
|
172
175
|
export * from './EntryPatchPropertiesValue';
|
|
173
176
|
export * from './ErrorDetail';
|
|
@@ -321,6 +324,7 @@ export * from './ScriptUsageResBody';
|
|
|
321
324
|
export * from './ScriptWebhookResBody';
|
|
322
325
|
export * from './SendPasswordPutReqBody';
|
|
323
326
|
export * from './SerializedEvent';
|
|
327
|
+
export * from './ServerMessage';
|
|
324
328
|
export * from './SingleSelectChangelogData';
|
|
325
329
|
export * from './SingleSelectContributionData';
|
|
326
330
|
export * from './SingleSelectData';
|