@spaciv/sdk 0.1.13 → 0.1.14

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.
@@ -0,0 +1,114 @@
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
+ /**
17
+ *
18
+ * @export
19
+ * @interface ClientMessage
20
+ */
21
+ export interface ClientMessage {
22
+ [key: string]: any | any;
23
+ /**
24
+ *
25
+ * @type {string}
26
+ * @memberof ClientMessage
27
+ */
28
+ token?: string;
29
+ /**
30
+ * Between 1 and 100 topics for subscribe and unsubscribe. A message must fit within 128 KiB as sent, so topics whose JSON encoding is long go in several messages.
31
+ * @type {Array<string>}
32
+ * @memberof ClientMessage
33
+ */
34
+ topics?: Array<string>;
35
+ /**
36
+ *
37
+ * @type {string}
38
+ * @memberof ClientMessage
39
+ */
40
+ type: ClientMessageTypeEnum;
41
+ /**
42
+ *
43
+ * @type {number}
44
+ * @memberof ClientMessage
45
+ */
46
+ v: ClientMessageVEnum;
47
+ }
48
+
49
+
50
+ /**
51
+ * @export
52
+ */
53
+ export const ClientMessageTypeEnum = {
54
+ Auth: 'auth',
55
+ Subscribe: 'subscribe',
56
+ Unsubscribe: 'unsubscribe'
57
+ } as const;
58
+ export type ClientMessageTypeEnum = typeof ClientMessageTypeEnum[keyof typeof ClientMessageTypeEnum];
59
+
60
+ /**
61
+ * @export
62
+ */
63
+ export const ClientMessageVEnum = {
64
+ NUMBER_1: 1
65
+ } as const;
66
+ export type ClientMessageVEnum = typeof ClientMessageVEnum[keyof typeof ClientMessageVEnum];
67
+
68
+
69
+ /**
70
+ * Check if a given object implements the ClientMessage interface.
71
+ */
72
+ export function instanceOfClientMessage(value: object): value is ClientMessage {
73
+ if (!('type' in value) || value['type'] === undefined) return false;
74
+ if (!('v' in value) || value['v'] === undefined) return false;
75
+ return true;
76
+ }
77
+
78
+ export function ClientMessageFromJSON(json: any): ClientMessage {
79
+ return ClientMessageFromJSONTyped(json, false);
80
+ }
81
+
82
+ export function ClientMessageFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClientMessage {
83
+ if (json == null) {
84
+ return json;
85
+ }
86
+ return {
87
+
88
+ ...json,
89
+ 'token': json['token'] == null ? undefined : json['token'],
90
+ 'topics': json['topics'] == null ? undefined : json['topics'],
91
+ 'type': json['type'],
92
+ 'v': json['v'],
93
+ };
94
+ }
95
+
96
+ export function ClientMessageToJSON(json: any): ClientMessage {
97
+ return ClientMessageToJSONTyped(json, false);
98
+ }
99
+
100
+ export function ClientMessageToJSONTyped(value?: ClientMessage | null, ignoreDiscriminator: boolean = false): any {
101
+ if (value == null) {
102
+ return value;
103
+ }
104
+
105
+ return {
106
+
107
+ ...value,
108
+ 'token': value['token'],
109
+ 'topics': value['topics'],
110
+ 'type': value['type'],
111
+ 'v': value['v'],
112
+ };
113
+ }
114
+
@@ -0,0 +1,108 @@
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
+ /**
17
+ *
18
+ * @export
19
+ * @interface EntityChangeActor
20
+ */
21
+ export interface EntityChangeActor {
22
+ [key: string]: any | any;
23
+ /**
24
+ *
25
+ * @type {string}
26
+ * @memberof EntityChangeActor
27
+ */
28
+ clientId?: string;
29
+ /**
30
+ *
31
+ * @type {string}
32
+ * @memberof EntityChangeActor
33
+ */
34
+ session: string;
35
+ /**
36
+ *
37
+ * @type {string}
38
+ * @memberof EntityChangeActor
39
+ */
40
+ type: EntityChangeActorTypeEnum;
41
+ /**
42
+ *
43
+ * @type {number}
44
+ * @memberof EntityChangeActor
45
+ */
46
+ user: number;
47
+ }
48
+
49
+
50
+ /**
51
+ * @export
52
+ */
53
+ export const EntityChangeActorTypeEnum = {
54
+ User: 'user',
55
+ System: 'system',
56
+ Anonymous: 'anonymous',
57
+ Unknown: 'unknown'
58
+ } as const;
59
+ export type EntityChangeActorTypeEnum = typeof EntityChangeActorTypeEnum[keyof typeof EntityChangeActorTypeEnum];
60
+
61
+
62
+ /**
63
+ * Check if a given object implements the EntityChangeActor interface.
64
+ */
65
+ export function instanceOfEntityChangeActor(value: object): value is EntityChangeActor {
66
+ if (!('session' in value) || value['session'] === undefined) return false;
67
+ if (!('type' in value) || value['type'] === undefined) return false;
68
+ if (!('user' in value) || value['user'] === undefined) return false;
69
+ return true;
70
+ }
71
+
72
+ export function EntityChangeActorFromJSON(json: any): EntityChangeActor {
73
+ return EntityChangeActorFromJSONTyped(json, false);
74
+ }
75
+
76
+ export function EntityChangeActorFromJSONTyped(json: any, ignoreDiscriminator: boolean): EntityChangeActor {
77
+ if (json == null) {
78
+ return json;
79
+ }
80
+ return {
81
+
82
+ ...json,
83
+ 'clientId': json['clientId'] == null ? undefined : json['clientId'],
84
+ 'session': json['session'],
85
+ 'type': json['type'],
86
+ 'user': json['user'],
87
+ };
88
+ }
89
+
90
+ export function EntityChangeActorToJSON(json: any): EntityChangeActor {
91
+ return EntityChangeActorToJSONTyped(json, false);
92
+ }
93
+
94
+ export function EntityChangeActorToJSONTyped(value?: EntityChangeActor | null, ignoreDiscriminator: boolean = false): any {
95
+ if (value == null) {
96
+ return value;
97
+ }
98
+
99
+ return {
100
+
101
+ ...value,
102
+ 'clientId': value['clientId'],
103
+ 'session': value['session'],
104
+ 'type': value['type'],
105
+ 'user': value['user'],
106
+ };
107
+ }
108
+
@@ -0,0 +1,149 @@
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 { EntityChangeActor } from './EntityChangeActor';
17
+ import {
18
+ EntityChangeActorFromJSON,
19
+ EntityChangeActorFromJSONTyped,
20
+ EntityChangeActorToJSON,
21
+ EntityChangeActorToJSONTyped,
22
+ } from './EntityChangeActor';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface EntityChangedEvent
28
+ */
29
+ export interface EntityChangedEvent {
30
+ [key: string]: any | any;
31
+ /**
32
+ *
33
+ * @type {number}
34
+ * @memberof EntityChangedEvent
35
+ */
36
+ account: number;
37
+ /**
38
+ *
39
+ * @type {EntityChangeActor}
40
+ * @memberof EntityChangedEvent
41
+ */
42
+ actor: EntityChangeActor;
43
+ /**
44
+ *
45
+ * @type {string}
46
+ * @memberof EntityChangedEvent
47
+ */
48
+ at: string;
49
+ /**
50
+ *
51
+ * @type {string}
52
+ * @memberof EntityChangedEvent
53
+ */
54
+ id: string;
55
+ /**
56
+ *
57
+ * @type {string}
58
+ * @memberof EntityChangedEvent
59
+ */
60
+ op: EntityChangedEventOpEnum;
61
+ /**
62
+ *
63
+ * @type {number}
64
+ * @memberof EntityChangedEvent
65
+ */
66
+ project?: number;
67
+ /**
68
+ *
69
+ * @type {string}
70
+ * @memberof EntityChangedEvent
71
+ */
72
+ type: string;
73
+ /**
74
+ *
75
+ * @type {string}
76
+ * @memberof EntityChangedEvent
77
+ */
78
+ version?: string;
79
+ }
80
+
81
+
82
+ /**
83
+ * @export
84
+ */
85
+ export const EntityChangedEventOpEnum = {
86
+ Upsert: 'upsert',
87
+ Delete: 'delete'
88
+ } as const;
89
+ export type EntityChangedEventOpEnum = typeof EntityChangedEventOpEnum[keyof typeof EntityChangedEventOpEnum];
90
+
91
+
92
+ /**
93
+ * Check if a given object implements the EntityChangedEvent interface.
94
+ */
95
+ export function instanceOfEntityChangedEvent(value: object): value is EntityChangedEvent {
96
+ if (!('account' in value) || value['account'] === undefined) return false;
97
+ if (!('actor' in value) || value['actor'] === undefined) return false;
98
+ if (!('at' in value) || value['at'] === undefined) return false;
99
+ if (!('id' in value) || value['id'] === undefined) return false;
100
+ if (!('op' in value) || value['op'] === undefined) return false;
101
+ if (!('type' in value) || value['type'] === undefined) return false;
102
+ return true;
103
+ }
104
+
105
+ export function EntityChangedEventFromJSON(json: any): EntityChangedEvent {
106
+ return EntityChangedEventFromJSONTyped(json, false);
107
+ }
108
+
109
+ export function EntityChangedEventFromJSONTyped(json: any, ignoreDiscriminator: boolean): EntityChangedEvent {
110
+ if (json == null) {
111
+ return json;
112
+ }
113
+ return {
114
+
115
+ ...json,
116
+ 'account': json['account'],
117
+ 'actor': EntityChangeActorFromJSON(json['actor']),
118
+ 'at': json['at'],
119
+ 'id': json['id'],
120
+ 'op': json['op'],
121
+ 'project': json['project'] == null ? undefined : json['project'],
122
+ 'type': json['type'],
123
+ 'version': json['version'] == null ? undefined : json['version'],
124
+ };
125
+ }
126
+
127
+ export function EntityChangedEventToJSON(json: any): EntityChangedEvent {
128
+ return EntityChangedEventToJSONTyped(json, false);
129
+ }
130
+
131
+ export function EntityChangedEventToJSONTyped(value?: EntityChangedEvent | null, ignoreDiscriminator: boolean = false): any {
132
+ if (value == null) {
133
+ return value;
134
+ }
135
+
136
+ return {
137
+
138
+ ...value,
139
+ 'account': value['account'],
140
+ 'actor': EntityChangeActorToJSON(value['actor']),
141
+ 'at': value['at'],
142
+ 'id': value['id'],
143
+ 'op': value['op'],
144
+ 'project': value['project'],
145
+ 'type': value['type'],
146
+ 'version': value['version'],
147
+ };
148
+ }
149
+
@@ -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
+
@@ -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';