@spaciv/sdk 0.1.9 → 0.1.10
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 +1 -0
- package/README.md +2 -2
- package/dist/apis/ContributionsApi.d.ts +4 -4
- package/dist/apis/ContributionsApi.js +2 -2
- package/dist/apis/DataCollectionApi.d.ts +12 -12
- package/dist/apis/DataCollectionApi.js +6 -6
- package/dist/esm/apis/ContributionsApi.d.ts +4 -4
- package/dist/esm/apis/ContributionsApi.js +2 -2
- package/dist/esm/apis/DataCollectionApi.d.ts +12 -12
- package/dist/esm/apis/DataCollectionApi.js +6 -6
- package/dist/esm/models/DatacollectionBody.d.ts +13 -0
- package/dist/esm/models/DatacollectionBody.js +5 -0
- package/dist/esm/models/DatacollectionChangelogBody.d.ts +13 -0
- package/dist/esm/models/DatacollectionChangelogBody.js +9 -0
- package/dist/esm/models/DatacollectionContributor.d.ts +38 -0
- package/dist/esm/models/DatacollectionContributor.js +47 -0
- package/dist/esm/models/GetDatacollectionRes.d.ts +6 -0
- package/dist/esm/models/GetDatacollectionRes.js +2 -0
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.js +1 -0
- package/dist/models/DatacollectionBody.d.ts +13 -0
- package/dist/models/DatacollectionBody.js +5 -0
- package/dist/models/DatacollectionChangelogBody.d.ts +13 -0
- package/dist/models/DatacollectionChangelogBody.js +9 -0
- package/dist/models/DatacollectionContributor.d.ts +38 -0
- package/dist/models/DatacollectionContributor.js +54 -0
- package/dist/models/GetDatacollectionRes.d.ts +6 -0
- package/dist/models/GetDatacollectionRes.js +2 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/package.json +1 -1
- package/src/apis/ContributionsApi.ts +4 -4
- package/src/apis/DataCollectionApi.ts +12 -12
- package/src/models/DatacollectionBody.ts +23 -0
- package/src/models/DatacollectionChangelogBody.ts +25 -0
- package/src/models/DatacollectionContributor.ts +75 -0
- package/src/models/GetDatacollectionRes.ts +8 -0
- package/src/models/index.ts +1 -0
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
import { DatacollectionAuthenticationFromJSON, DatacollectionAuthenticationToJSON, } from './DatacollectionAuthentication';
|
|
15
|
+
import { DatacollectionContributorFromJSON, DatacollectionContributorToJSON, } from './DatacollectionContributor';
|
|
15
16
|
import { StepFromJSON, StepToJSON, } from './Step';
|
|
16
17
|
/**
|
|
17
18
|
* Check if a given object implements the DatacollectionChangelogBody interface.
|
|
@@ -23,6 +24,10 @@ export function instanceOfDatacollectionChangelogBody(value) {
|
|
|
23
24
|
return false;
|
|
24
25
|
if (!('completeMessage' in value) || value['completeMessage'] === undefined)
|
|
25
26
|
return false;
|
|
27
|
+
if (!('contributors' in value) || value['contributors'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('contributorsUploaded' in value) || value['contributorsUploaded'] === undefined)
|
|
30
|
+
return false;
|
|
26
31
|
if (!('description' in value) || value['description'] === undefined)
|
|
27
32
|
return false;
|
|
28
33
|
if (!('end' in value) || value['end'] === undefined)
|
|
@@ -56,6 +61,8 @@ export function DatacollectionChangelogBodyFromJSONTyped(json, ignoreDiscriminat
|
|
|
56
61
|
'anonymisationProperty': json['anonymisationProperty'],
|
|
57
62
|
'authenticationMode': DatacollectionAuthenticationFromJSON(json['authenticationMode']),
|
|
58
63
|
'completeMessage': json['completeMessage'],
|
|
64
|
+
'contributors': (json['contributors'].map(DatacollectionContributorFromJSON)),
|
|
65
|
+
'contributorsUploaded': json['contributorsUploaded'],
|
|
59
66
|
'description': json['description'],
|
|
60
67
|
'end': json['end'],
|
|
61
68
|
'inviteMessage': json['inviteMessage'],
|
|
@@ -79,6 +86,8 @@ export function DatacollectionChangelogBodyToJSONTyped(value, ignoreDiscriminato
|
|
|
79
86
|
'anonymisationProperty': value['anonymisationProperty'],
|
|
80
87
|
'authenticationMode': DatacollectionAuthenticationToJSON(value['authenticationMode']),
|
|
81
88
|
'completeMessage': value['completeMessage'],
|
|
89
|
+
'contributors': (value['contributors'].map(DatacollectionContributorToJSON)),
|
|
90
|
+
'contributorsUploaded': value['contributorsUploaded'],
|
|
82
91
|
'description': value['description'],
|
|
83
92
|
'end': value['end'],
|
|
84
93
|
'inviteMessage': value['inviteMessage'],
|
|
@@ -0,0 +1,38 @@
|
|
|
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 DatacollectionContributor
|
|
16
|
+
*/
|
|
17
|
+
export interface DatacollectionContributor {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {Array<string>}
|
|
21
|
+
* @memberof DatacollectionContributor
|
|
22
|
+
*/
|
|
23
|
+
nodes: Array<string>;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof DatacollectionContributor
|
|
28
|
+
*/
|
|
29
|
+
user: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the DatacollectionContributor interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfDatacollectionContributor(value: object): value is DatacollectionContributor;
|
|
35
|
+
export declare function DatacollectionContributorFromJSON(json: any): DatacollectionContributor;
|
|
36
|
+
export declare function DatacollectionContributorFromJSONTyped(json: any, ignoreDiscriminator: boolean): DatacollectionContributor;
|
|
37
|
+
export declare function DatacollectionContributorToJSON(json: any): DatacollectionContributor;
|
|
38
|
+
export declare function DatacollectionContributorToJSONTyped(value?: DatacollectionContributor | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
* Check if a given object implements the DatacollectionContributor interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfDatacollectionContributor(value) {
|
|
18
|
+
if (!('nodes' in value) || value['nodes'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
if (!('user' in value) || value['user'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
export function DatacollectionContributorFromJSON(json) {
|
|
25
|
+
return DatacollectionContributorFromJSONTyped(json, false);
|
|
26
|
+
}
|
|
27
|
+
export function DatacollectionContributorFromJSONTyped(json, ignoreDiscriminator) {
|
|
28
|
+
if (json == null) {
|
|
29
|
+
return json;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
'nodes': json['nodes'],
|
|
33
|
+
'user': json['user'],
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export function DatacollectionContributorToJSON(json) {
|
|
37
|
+
return DatacollectionContributorToJSONTyped(json, false);
|
|
38
|
+
}
|
|
39
|
+
export function DatacollectionContributorToJSONTyped(value, ignoreDiscriminator = false) {
|
|
40
|
+
if (value == null) {
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
'nodes': value['nodes'],
|
|
45
|
+
'user': value['user'],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
@@ -39,6 +39,7 @@ export function GetDatacollectionResFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
39
39
|
'completed': json['completed'],
|
|
40
40
|
'datacollection': DatacollectionChangelogBodyFromJSON(json['datacollection']),
|
|
41
41
|
'id': json['id'],
|
|
42
|
+
'legacyContributors': json['legacyContributors'] == null ? undefined : json['legacyContributors'],
|
|
42
43
|
'started': json['started'],
|
|
43
44
|
'total': json['total'],
|
|
44
45
|
};
|
|
@@ -54,6 +55,7 @@ export function GetDatacollectionResToJSONTyped(value, ignoreDiscriminator = fal
|
|
|
54
55
|
'completed': value['completed'],
|
|
55
56
|
'datacollection': DatacollectionChangelogBodyToJSON(value['datacollection']),
|
|
56
57
|
'id': value['id'],
|
|
58
|
+
'legacyContributors': value['legacyContributors'],
|
|
57
59
|
'started': value['started'],
|
|
58
60
|
'total': value['total'],
|
|
59
61
|
};
|
|
@@ -146,6 +146,7 @@ export * from './DatacollectionAuthenticationOneOf2';
|
|
|
146
146
|
export * from './DatacollectionAuthenticationOneOf3';
|
|
147
147
|
export * from './DatacollectionBody';
|
|
148
148
|
export * from './DatacollectionChangelogBody';
|
|
149
|
+
export * from './DatacollectionContributor';
|
|
149
150
|
export * from './DatasetAddResponseBody';
|
|
150
151
|
export * from './DatasetChangelogBody';
|
|
151
152
|
export * from './DatasetChangelogData';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -148,6 +148,7 @@ export * from './DatacollectionAuthenticationOneOf2';
|
|
|
148
148
|
export * from './DatacollectionAuthenticationOneOf3';
|
|
149
149
|
export * from './DatacollectionBody';
|
|
150
150
|
export * from './DatacollectionChangelogBody';
|
|
151
|
+
export * from './DatacollectionContributor';
|
|
151
152
|
export * from './DatasetAddResponseBody';
|
|
152
153
|
export * from './DatasetChangelogBody';
|
|
153
154
|
export * from './DatasetChangelogData';
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { DatacollectionAuthentication } from './DatacollectionAuthentication';
|
|
13
|
+
import type { DatacollectionContributor } from './DatacollectionContributor';
|
|
13
14
|
import type { Step } from './Step';
|
|
14
15
|
/**
|
|
15
16
|
*
|
|
@@ -29,6 +30,12 @@ export interface DatacollectionBody {
|
|
|
29
30
|
* @memberof DatacollectionBody
|
|
30
31
|
*/
|
|
31
32
|
authenticationMode?: DatacollectionAuthentication;
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @type {boolean}
|
|
36
|
+
* @memberof DatacollectionBody
|
|
37
|
+
*/
|
|
38
|
+
clearContributors?: boolean;
|
|
32
39
|
/**
|
|
33
40
|
*
|
|
34
41
|
* @type {boolean}
|
|
@@ -41,6 +48,12 @@ export interface DatacollectionBody {
|
|
|
41
48
|
* @memberof DatacollectionBody
|
|
42
49
|
*/
|
|
43
50
|
completeMessage?: string;
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @type {Array<DatacollectionContributor>}
|
|
54
|
+
* @memberof DatacollectionBody
|
|
55
|
+
*/
|
|
56
|
+
contributors?: Array<DatacollectionContributor>;
|
|
44
57
|
/**
|
|
45
58
|
*
|
|
46
59
|
* @type {boolean}
|
|
@@ -19,6 +19,7 @@ exports.DatacollectionBodyFromJSONTyped = DatacollectionBodyFromJSONTyped;
|
|
|
19
19
|
exports.DatacollectionBodyToJSON = DatacollectionBodyToJSON;
|
|
20
20
|
exports.DatacollectionBodyToJSONTyped = DatacollectionBodyToJSONTyped;
|
|
21
21
|
const DatacollectionAuthentication_1 = require("./DatacollectionAuthentication");
|
|
22
|
+
const DatacollectionContributor_1 = require("./DatacollectionContributor");
|
|
22
23
|
const Step_1 = require("./Step");
|
|
23
24
|
/**
|
|
24
25
|
* Check if a given object implements the DatacollectionBody interface.
|
|
@@ -44,8 +45,10 @@ function DatacollectionBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
44
45
|
return {
|
|
45
46
|
'anonymisationProperty': json['anonymisationProperty'] == null ? undefined : json['anonymisationProperty'],
|
|
46
47
|
'authenticationMode': json['authenticationMode'] == null ? undefined : (0, DatacollectionAuthentication_1.DatacollectionAuthenticationFromJSON)(json['authenticationMode']),
|
|
48
|
+
'clearContributors': json['clearContributors'] == null ? undefined : json['clearContributors'],
|
|
47
49
|
'clearSteps': json['clearSteps'],
|
|
48
50
|
'completeMessage': json['completeMessage'] == null ? undefined : json['completeMessage'],
|
|
51
|
+
'contributors': json['contributors'] == null ? undefined : (json['contributors'].map(DatacollectionContributor_1.DatacollectionContributorFromJSON)),
|
|
49
52
|
'delete': json['delete'],
|
|
50
53
|
'description': json['description'] == null ? undefined : json['description'],
|
|
51
54
|
'end': json['end'] == null ? undefined : json['end'],
|
|
@@ -70,8 +73,10 @@ function DatacollectionBodyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
70
73
|
return {
|
|
71
74
|
'anonymisationProperty': value['anonymisationProperty'],
|
|
72
75
|
'authenticationMode': (0, DatacollectionAuthentication_1.DatacollectionAuthenticationToJSON)(value['authenticationMode']),
|
|
76
|
+
'clearContributors': value['clearContributors'],
|
|
73
77
|
'clearSteps': value['clearSteps'],
|
|
74
78
|
'completeMessage': value['completeMessage'],
|
|
79
|
+
'contributors': value['contributors'] == null ? undefined : (value['contributors'].map(DatacollectionContributor_1.DatacollectionContributorToJSON)),
|
|
75
80
|
'delete': value['delete'],
|
|
76
81
|
'description': value['description'],
|
|
77
82
|
'end': value['end'],
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { DatacollectionAuthentication } from './DatacollectionAuthentication';
|
|
13
|
+
import type { DatacollectionContributor } from './DatacollectionContributor';
|
|
13
14
|
import type { Step } from './Step';
|
|
14
15
|
/**
|
|
15
16
|
*
|
|
@@ -35,6 +36,18 @@ export interface DatacollectionChangelogBody {
|
|
|
35
36
|
* @memberof DatacollectionChangelogBody
|
|
36
37
|
*/
|
|
37
38
|
completeMessage: string;
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
* @type {Array<DatacollectionContributor>}
|
|
42
|
+
* @memberof DatacollectionChangelogBody
|
|
43
|
+
*/
|
|
44
|
+
contributors: Array<DatacollectionContributor>;
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @type {boolean}
|
|
48
|
+
* @memberof DatacollectionChangelogBody
|
|
49
|
+
*/
|
|
50
|
+
contributorsUploaded: boolean;
|
|
38
51
|
/**
|
|
39
52
|
*
|
|
40
53
|
* @type {string}
|
|
@@ -19,6 +19,7 @@ exports.DatacollectionChangelogBodyFromJSONTyped = DatacollectionChangelogBodyFr
|
|
|
19
19
|
exports.DatacollectionChangelogBodyToJSON = DatacollectionChangelogBodyToJSON;
|
|
20
20
|
exports.DatacollectionChangelogBodyToJSONTyped = DatacollectionChangelogBodyToJSONTyped;
|
|
21
21
|
const DatacollectionAuthentication_1 = require("./DatacollectionAuthentication");
|
|
22
|
+
const DatacollectionContributor_1 = require("./DatacollectionContributor");
|
|
22
23
|
const Step_1 = require("./Step");
|
|
23
24
|
/**
|
|
24
25
|
* Check if a given object implements the DatacollectionChangelogBody interface.
|
|
@@ -30,6 +31,10 @@ function instanceOfDatacollectionChangelogBody(value) {
|
|
|
30
31
|
return false;
|
|
31
32
|
if (!('completeMessage' in value) || value['completeMessage'] === undefined)
|
|
32
33
|
return false;
|
|
34
|
+
if (!('contributors' in value) || value['contributors'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if (!('contributorsUploaded' in value) || value['contributorsUploaded'] === undefined)
|
|
37
|
+
return false;
|
|
33
38
|
if (!('description' in value) || value['description'] === undefined)
|
|
34
39
|
return false;
|
|
35
40
|
if (!('end' in value) || value['end'] === undefined)
|
|
@@ -63,6 +68,8 @@ function DatacollectionChangelogBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
63
68
|
'anonymisationProperty': json['anonymisationProperty'],
|
|
64
69
|
'authenticationMode': (0, DatacollectionAuthentication_1.DatacollectionAuthenticationFromJSON)(json['authenticationMode']),
|
|
65
70
|
'completeMessage': json['completeMessage'],
|
|
71
|
+
'contributors': (json['contributors'].map(DatacollectionContributor_1.DatacollectionContributorFromJSON)),
|
|
72
|
+
'contributorsUploaded': json['contributorsUploaded'],
|
|
66
73
|
'description': json['description'],
|
|
67
74
|
'end': json['end'],
|
|
68
75
|
'inviteMessage': json['inviteMessage'],
|
|
@@ -86,6 +93,8 @@ function DatacollectionChangelogBodyToJSONTyped(value, ignoreDiscriminator = fal
|
|
|
86
93
|
'anonymisationProperty': value['anonymisationProperty'],
|
|
87
94
|
'authenticationMode': (0, DatacollectionAuthentication_1.DatacollectionAuthenticationToJSON)(value['authenticationMode']),
|
|
88
95
|
'completeMessage': value['completeMessage'],
|
|
96
|
+
'contributors': (value['contributors'].map(DatacollectionContributor_1.DatacollectionContributorToJSON)),
|
|
97
|
+
'contributorsUploaded': value['contributorsUploaded'],
|
|
89
98
|
'description': value['description'],
|
|
90
99
|
'end': value['end'],
|
|
91
100
|
'inviteMessage': value['inviteMessage'],
|
|
@@ -0,0 +1,38 @@
|
|
|
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 DatacollectionContributor
|
|
16
|
+
*/
|
|
17
|
+
export interface DatacollectionContributor {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {Array<string>}
|
|
21
|
+
* @memberof DatacollectionContributor
|
|
22
|
+
*/
|
|
23
|
+
nodes: Array<string>;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof DatacollectionContributor
|
|
28
|
+
*/
|
|
29
|
+
user: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the DatacollectionContributor interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfDatacollectionContributor(value: object): value is DatacollectionContributor;
|
|
35
|
+
export declare function DatacollectionContributorFromJSON(json: any): DatacollectionContributor;
|
|
36
|
+
export declare function DatacollectionContributorFromJSONTyped(json: any, ignoreDiscriminator: boolean): DatacollectionContributor;
|
|
37
|
+
export declare function DatacollectionContributorToJSON(json: any): DatacollectionContributor;
|
|
38
|
+
export declare function DatacollectionContributorToJSONTyped(value?: DatacollectionContributor | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,54 @@
|
|
|
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.instanceOfDatacollectionContributor = instanceOfDatacollectionContributor;
|
|
17
|
+
exports.DatacollectionContributorFromJSON = DatacollectionContributorFromJSON;
|
|
18
|
+
exports.DatacollectionContributorFromJSONTyped = DatacollectionContributorFromJSONTyped;
|
|
19
|
+
exports.DatacollectionContributorToJSON = DatacollectionContributorToJSON;
|
|
20
|
+
exports.DatacollectionContributorToJSONTyped = DatacollectionContributorToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the DatacollectionContributor interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfDatacollectionContributor(value) {
|
|
25
|
+
if (!('nodes' in value) || value['nodes'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('user' in value) || value['user'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
function DatacollectionContributorFromJSON(json) {
|
|
32
|
+
return DatacollectionContributorFromJSONTyped(json, false);
|
|
33
|
+
}
|
|
34
|
+
function DatacollectionContributorFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
if (json == null) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
'nodes': json['nodes'],
|
|
40
|
+
'user': json['user'],
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function DatacollectionContributorToJSON(json) {
|
|
44
|
+
return DatacollectionContributorToJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
function DatacollectionContributorToJSONTyped(value, ignoreDiscriminator = false) {
|
|
47
|
+
if (value == null) {
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
'nodes': value['nodes'],
|
|
52
|
+
'user': value['user'],
|
|
53
|
+
};
|
|
54
|
+
}
|
|
@@ -46,6 +46,7 @@ function GetDatacollectionResFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
46
46
|
'completed': json['completed'],
|
|
47
47
|
'datacollection': (0, DatacollectionChangelogBody_1.DatacollectionChangelogBodyFromJSON)(json['datacollection']),
|
|
48
48
|
'id': json['id'],
|
|
49
|
+
'legacyContributors': json['legacyContributors'] == null ? undefined : json['legacyContributors'],
|
|
49
50
|
'started': json['started'],
|
|
50
51
|
'total': json['total'],
|
|
51
52
|
};
|
|
@@ -61,6 +62,7 @@ function GetDatacollectionResToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
61
62
|
'completed': value['completed'],
|
|
62
63
|
'datacollection': (0, DatacollectionChangelogBody_1.DatacollectionChangelogBodyToJSON)(value['datacollection']),
|
|
63
64
|
'id': value['id'],
|
|
65
|
+
'legacyContributors': value['legacyContributors'],
|
|
64
66
|
'started': value['started'],
|
|
65
67
|
'total': value['total'],
|
|
66
68
|
};
|
package/dist/models/index.d.ts
CHANGED
|
@@ -146,6 +146,7 @@ export * from './DatacollectionAuthenticationOneOf2';
|
|
|
146
146
|
export * from './DatacollectionAuthenticationOneOf3';
|
|
147
147
|
export * from './DatacollectionBody';
|
|
148
148
|
export * from './DatacollectionChangelogBody';
|
|
149
|
+
export * from './DatacollectionContributor';
|
|
149
150
|
export * from './DatasetAddResponseBody';
|
|
150
151
|
export * from './DatasetChangelogBody';
|
|
151
152
|
export * from './DatasetChangelogData';
|
package/dist/models/index.js
CHANGED
|
@@ -164,6 +164,7 @@ __exportStar(require("./DatacollectionAuthenticationOneOf2"), exports);
|
|
|
164
164
|
__exportStar(require("./DatacollectionAuthenticationOneOf3"), exports);
|
|
165
165
|
__exportStar(require("./DatacollectionBody"), exports);
|
|
166
166
|
__exportStar(require("./DatacollectionChangelogBody"), exports);
|
|
167
|
+
__exportStar(require("./DatacollectionContributor"), exports);
|
|
167
168
|
__exportStar(require("./DatasetAddResponseBody"), exports);
|
|
168
169
|
__exportStar(require("./DatasetChangelogBody"), exports);
|
|
169
170
|
__exportStar(require("./DatasetChangelogData"), exports);
|
package/package.json
CHANGED
|
@@ -51,7 +51,7 @@ export interface ContributionsApiGetDataCollectionsContributionRequest {
|
|
|
51
51
|
*/
|
|
52
52
|
export interface ContributionsApiInterface {
|
|
53
53
|
/**
|
|
54
|
-
* Saves the contributor\'s answers and state for a survey contribution. The body carries the current node, answer data, and completion status; for identified surveys, the server records the contributor\'s anonymisation
|
|
54
|
+
* Saves the contributor\'s answers and state for a survey contribution. The body carries the current node, answer data, and completion status; for identified surveys, the server records the contributor\'s anonymisation nodes when the contribution is completed, from the survey\'s contributor list or, if none was ever uploaded, from the object group named by its authentication mode, and returns `404` if the contribution ID is unknown. Requires the *Edit contribution* permission.
|
|
55
55
|
* @summary Save a contribution
|
|
56
56
|
* @param {string} id
|
|
57
57
|
* @param {string} [datacollectionId] The survey the contribution belongs to. Required when submitting on behalf of an anonymous or public contributor whose contribution ID differs from the survey ID.
|
|
@@ -63,7 +63,7 @@ export interface ContributionsApiInterface {
|
|
|
63
63
|
createDataCollectionsContributionRaw(requestParameters: ContributionsApiCreateDataCollectionsContributionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>>;
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
|
-
* Saves the contributor\'s answers and state for a survey contribution. The body carries the current node, answer data, and completion status; for identified surveys, the server records the contributor\'s anonymisation
|
|
66
|
+
* Saves the contributor\'s answers and state for a survey contribution. The body carries the current node, answer data, and completion status; for identified surveys, the server records the contributor\'s anonymisation nodes when the contribution is completed, from the survey\'s contributor list or, if none was ever uploaded, from the object group named by its authentication mode, and returns `404` if the contribution ID is unknown. Requires the *Edit contribution* permission.
|
|
67
67
|
* Save a contribution
|
|
68
68
|
*/
|
|
69
69
|
createDataCollectionsContribution(requestParameters: ContributionsApiCreateDataCollectionsContributionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
|
|
@@ -109,7 +109,7 @@ export interface ContributionsApiInterface {
|
|
|
109
109
|
export class ContributionsApi extends runtime.BaseAPI implements ContributionsApiInterface {
|
|
110
110
|
|
|
111
111
|
/**
|
|
112
|
-
* Saves the contributor\'s answers and state for a survey contribution. The body carries the current node, answer data, and completion status; for identified surveys, the server records the contributor\'s anonymisation
|
|
112
|
+
* Saves the contributor\'s answers and state for a survey contribution. The body carries the current node, answer data, and completion status; for identified surveys, the server records the contributor\'s anonymisation nodes when the contribution is completed, from the survey\'s contributor list or, if none was ever uploaded, from the object group named by its authentication mode, and returns `404` if the contribution ID is unknown. Requires the *Edit contribution* permission.
|
|
113
113
|
* Save a contribution
|
|
114
114
|
*/
|
|
115
115
|
async createDataCollectionsContributionRaw(requestParameters: ContributionsApiCreateDataCollectionsContributionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>> {
|
|
@@ -154,7 +154,7 @@ export class ContributionsApi extends runtime.BaseAPI implements ContributionsAp
|
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
/**
|
|
157
|
-
* Saves the contributor\'s answers and state for a survey contribution. The body carries the current node, answer data, and completion status; for identified surveys, the server records the contributor\'s anonymisation
|
|
157
|
+
* Saves the contributor\'s answers and state for a survey contribution. The body carries the current node, answer data, and completion status; for identified surveys, the server records the contributor\'s anonymisation nodes when the contribution is completed, from the survey\'s contributor list or, if none was ever uploaded, from the object group named by its authentication mode, and returns `404` if the contribution ID is unknown. Requires the *Edit contribution* permission.
|
|
158
158
|
* Save a contribution
|
|
159
159
|
*/
|
|
160
160
|
async createDataCollectionsContribution(requestParameters: ContributionsApiCreateDataCollectionsContributionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object> {
|
|
@@ -101,7 +101,7 @@ export interface DataCollectionApiInterface {
|
|
|
101
101
|
delete(requestParameters: DataCollectionApiDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
|
|
102
102
|
|
|
103
103
|
/**
|
|
104
|
-
* Returns the survey and a summary of contribution progress: how many contributors have started, completed, and the total invited. Requires the *View crowd modelling* permission.
|
|
104
|
+
* Returns the survey and a summary of contribution progress: how many contributors have started, completed, and the total invited. Requires the *View crowd modelling*, *View data collection preview* or *View public data collection* permission; drafts need one of the first two. Callers without *View crowd modelling* receive the survey without its `contributors` list or progress counts. For an email or preferred-channel survey whose contributors were never uploaded, `legacyContributors` counts the contributors it takes from the object group named by its authentication mode.
|
|
105
105
|
* @summary Get a data collection survey
|
|
106
106
|
* @param {string} id
|
|
107
107
|
* @param {*} [options] Override http request option.
|
|
@@ -111,7 +111,7 @@ export interface DataCollectionApiInterface {
|
|
|
111
111
|
getRaw(requestParameters: DataCollectionApiGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetDatacollectionRes>>;
|
|
112
112
|
|
|
113
113
|
/**
|
|
114
|
-
* Returns the survey and a summary of contribution progress: how many contributors have started, completed, and the total invited. Requires the *View crowd modelling* permission.
|
|
114
|
+
* Returns the survey and a summary of contribution progress: how many contributors have started, completed, and the total invited. Requires the *View crowd modelling*, *View data collection preview* or *View public data collection* permission; drafts need one of the first two. Callers without *View crowd modelling* receive the survey without its `contributors` list or progress counts. For an email or preferred-channel survey whose contributors were never uploaded, `legacyContributors` counts the contributors it takes from the object group named by its authentication mode.
|
|
115
115
|
* Get a data collection survey
|
|
116
116
|
*/
|
|
117
117
|
get(requestParameters: DataCollectionApiGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetDatacollectionRes>;
|
|
@@ -164,7 +164,7 @@ export interface DataCollectionApiInterface {
|
|
|
164
164
|
list(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetDatacollectionListRes>;
|
|
165
165
|
|
|
166
166
|
/**
|
|
167
|
-
* Returns every
|
|
167
|
+
* Returns every contributor of an email or preferred-channel survey, each with their current contribution state and contact details: the survey\'s uploaded contributors or, if none were ever uploaded, the users in the object group named by its authentication mode. Anonymous and public surveys have no contributor list and return an empty list. Requires the *View crowd modelling* permission.
|
|
168
168
|
* @summary List contributors for a survey
|
|
169
169
|
* @param {string} id
|
|
170
170
|
* @param {*} [options] Override http request option.
|
|
@@ -174,13 +174,13 @@ export interface DataCollectionApiInterface {
|
|
|
174
174
|
listContributorsRaw(requestParameters: DataCollectionApiListContributorsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetContributionListRes>>;
|
|
175
175
|
|
|
176
176
|
/**
|
|
177
|
-
* Returns every
|
|
177
|
+
* Returns every contributor of an email or preferred-channel survey, each with their current contribution state and contact details: the survey\'s uploaded contributors or, if none were ever uploaded, the users in the object group named by its authentication mode. Anonymous and public surveys have no contributor list and return an empty list. Requires the *View crowd modelling* permission.
|
|
178
178
|
* List contributors for a survey
|
|
179
179
|
*/
|
|
180
180
|
listContributors(requestParameters: DataCollectionApiListContributorsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetContributionListRes>;
|
|
181
181
|
|
|
182
182
|
/**
|
|
183
|
-
* Partially updates the survey\'s name, steps, authentication mode, status, and other configurable fields. Only fields present in the request body are changed. Requires the *Configure crowd modelling* permission. Returns 400 if `anonymisationProperty` names a property that does not exist, or that is not a tree property for email or preferred-channel authentication. Also returns 400 if an already-set anonymisation property or authentication mode is changed, or status is moved back to draft, once the survey has left draft; an empty property or mode may still be set.
|
|
183
|
+
* Partially updates the survey\'s name, steps, authentication mode, status, and other configurable fields. Only fields present in the request body are changed. Requires the *Configure crowd modelling* permission. Returns 400 if `anonymisationProperty` names a property that does not exist, or that is not a tree property for email or preferred-channel authentication. Also returns 400 if an already-set anonymisation property or authentication mode is changed, or status is moved back to draft, once the survey has left draft; an empty property or mode may still be set. The object group ID in an email or preferred-channel authentication mode is only locked until contributors have been uploaded. For email or preferred-channel authentication, `contributors` lists each contributor\'s user ID and their nodes on the anonymisation property; a non-empty list replaces the stored one and `clearContributors` empties it. Sending either requires the *Upload data collection contributors* permission as well, and sending both returns 400. Switching a draft to anonymous or public authentication clears its contributors. Returns 400 if contributors are uploaded for anonymous or public authentication, if a contributor is listed twice, is not a user of the account, or names a node that is not on the anonymisation property, if the contributors change or are cleared once the survey has left draft, or if the survey leaves draft without contributors. Also returns 400 if the stored survey, contributors included, would exceed 300 KiB; at one node ID per contributor that is roughly 5,000 contributors. A survey that leaves draft without ever having had contributors uploaded takes them from the object group named by its authentication mode, if any.
|
|
184
184
|
* @summary Update a data collection survey
|
|
185
185
|
* @param {string} id
|
|
186
186
|
* @param {DatacollectionBody} [datacollectionBody]
|
|
@@ -191,7 +191,7 @@ export interface DataCollectionApiInterface {
|
|
|
191
191
|
updateRaw(requestParameters: DataCollectionApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>>;
|
|
192
192
|
|
|
193
193
|
/**
|
|
194
|
-
* Partially updates the survey\'s name, steps, authentication mode, status, and other configurable fields. Only fields present in the request body are changed. Requires the *Configure crowd modelling* permission. Returns 400 if `anonymisationProperty` names a property that does not exist, or that is not a tree property for email or preferred-channel authentication. Also returns 400 if an already-set anonymisation property or authentication mode is changed, or status is moved back to draft, once the survey has left draft; an empty property or mode may still be set.
|
|
194
|
+
* Partially updates the survey\'s name, steps, authentication mode, status, and other configurable fields. Only fields present in the request body are changed. Requires the *Configure crowd modelling* permission. Returns 400 if `anonymisationProperty` names a property that does not exist, or that is not a tree property for email or preferred-channel authentication. Also returns 400 if an already-set anonymisation property or authentication mode is changed, or status is moved back to draft, once the survey has left draft; an empty property or mode may still be set. The object group ID in an email or preferred-channel authentication mode is only locked until contributors have been uploaded. For email or preferred-channel authentication, `contributors` lists each contributor\'s user ID and their nodes on the anonymisation property; a non-empty list replaces the stored one and `clearContributors` empties it. Sending either requires the *Upload data collection contributors* permission as well, and sending both returns 400. Switching a draft to anonymous or public authentication clears its contributors. Returns 400 if contributors are uploaded for anonymous or public authentication, if a contributor is listed twice, is not a user of the account, or names a node that is not on the anonymisation property, if the contributors change or are cleared once the survey has left draft, or if the survey leaves draft without contributors. Also returns 400 if the stored survey, contributors included, would exceed 300 KiB; at one node ID per contributor that is roughly 5,000 contributors. A survey that leaves draft without ever having had contributors uploaded takes them from the object group named by its authentication mode, if any.
|
|
195
195
|
* Update a data collection survey
|
|
196
196
|
*/
|
|
197
197
|
update(requestParameters: DataCollectionApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
|
|
@@ -290,7 +290,7 @@ export class DataCollectionApi extends runtime.BaseAPI implements DataCollection
|
|
|
290
290
|
}
|
|
291
291
|
|
|
292
292
|
/**
|
|
293
|
-
* Returns the survey and a summary of contribution progress: how many contributors have started, completed, and the total invited. Requires the *View crowd modelling* permission.
|
|
293
|
+
* Returns the survey and a summary of contribution progress: how many contributors have started, completed, and the total invited. Requires the *View crowd modelling*, *View data collection preview* or *View public data collection* permission; drafts need one of the first two. Callers without *View crowd modelling* receive the survey without its `contributors` list or progress counts. For an email or preferred-channel survey whose contributors were never uploaded, `legacyContributors` counts the contributors it takes from the object group named by its authentication mode.
|
|
294
294
|
* Get a data collection survey
|
|
295
295
|
*/
|
|
296
296
|
async getRaw(requestParameters: DataCollectionApiGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetDatacollectionRes>> {
|
|
@@ -328,7 +328,7 @@ export class DataCollectionApi extends runtime.BaseAPI implements DataCollection
|
|
|
328
328
|
}
|
|
329
329
|
|
|
330
330
|
/**
|
|
331
|
-
* Returns the survey and a summary of contribution progress: how many contributors have started, completed, and the total invited. Requires the *View crowd modelling* permission.
|
|
331
|
+
* Returns the survey and a summary of contribution progress: how many contributors have started, completed, and the total invited. Requires the *View crowd modelling*, *View data collection preview* or *View public data collection* permission; drafts need one of the first two. Callers without *View crowd modelling* receive the survey without its `contributors` list or progress counts. For an email or preferred-channel survey whose contributors were never uploaded, `legacyContributors` counts the contributors it takes from the object group named by its authentication mode.
|
|
332
332
|
* Get a data collection survey
|
|
333
333
|
*/
|
|
334
334
|
async get(requestParameters: DataCollectionApiGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetDatacollectionRes> {
|
|
@@ -478,7 +478,7 @@ export class DataCollectionApi extends runtime.BaseAPI implements DataCollection
|
|
|
478
478
|
}
|
|
479
479
|
|
|
480
480
|
/**
|
|
481
|
-
* Returns every
|
|
481
|
+
* Returns every contributor of an email or preferred-channel survey, each with their current contribution state and contact details: the survey\'s uploaded contributors or, if none were ever uploaded, the users in the object group named by its authentication mode. Anonymous and public surveys have no contributor list and return an empty list. Requires the *View crowd modelling* permission.
|
|
482
482
|
* List contributors for a survey
|
|
483
483
|
*/
|
|
484
484
|
async listContributorsRaw(requestParameters: DataCollectionApiListContributorsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetContributionListRes>> {
|
|
@@ -516,7 +516,7 @@ export class DataCollectionApi extends runtime.BaseAPI implements DataCollection
|
|
|
516
516
|
}
|
|
517
517
|
|
|
518
518
|
/**
|
|
519
|
-
* Returns every
|
|
519
|
+
* Returns every contributor of an email or preferred-channel survey, each with their current contribution state and contact details: the survey\'s uploaded contributors or, if none were ever uploaded, the users in the object group named by its authentication mode. Anonymous and public surveys have no contributor list and return an empty list. Requires the *View crowd modelling* permission.
|
|
520
520
|
* List contributors for a survey
|
|
521
521
|
*/
|
|
522
522
|
async listContributors(requestParameters: DataCollectionApiListContributorsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetContributionListRes> {
|
|
@@ -525,7 +525,7 @@ export class DataCollectionApi extends runtime.BaseAPI implements DataCollection
|
|
|
525
525
|
}
|
|
526
526
|
|
|
527
527
|
/**
|
|
528
|
-
* Partially updates the survey\'s name, steps, authentication mode, status, and other configurable fields. Only fields present in the request body are changed. Requires the *Configure crowd modelling* permission. Returns 400 if `anonymisationProperty` names a property that does not exist, or that is not a tree property for email or preferred-channel authentication. Also returns 400 if an already-set anonymisation property or authentication mode is changed, or status is moved back to draft, once the survey has left draft; an empty property or mode may still be set.
|
|
528
|
+
* Partially updates the survey\'s name, steps, authentication mode, status, and other configurable fields. Only fields present in the request body are changed. Requires the *Configure crowd modelling* permission. Returns 400 if `anonymisationProperty` names a property that does not exist, or that is not a tree property for email or preferred-channel authentication. Also returns 400 if an already-set anonymisation property or authentication mode is changed, or status is moved back to draft, once the survey has left draft; an empty property or mode may still be set. The object group ID in an email or preferred-channel authentication mode is only locked until contributors have been uploaded. For email or preferred-channel authentication, `contributors` lists each contributor\'s user ID and their nodes on the anonymisation property; a non-empty list replaces the stored one and `clearContributors` empties it. Sending either requires the *Upload data collection contributors* permission as well, and sending both returns 400. Switching a draft to anonymous or public authentication clears its contributors. Returns 400 if contributors are uploaded for anonymous or public authentication, if a contributor is listed twice, is not a user of the account, or names a node that is not on the anonymisation property, if the contributors change or are cleared once the survey has left draft, or if the survey leaves draft without contributors. Also returns 400 if the stored survey, contributors included, would exceed 300 KiB; at one node ID per contributor that is roughly 5,000 contributors. A survey that leaves draft without ever having had contributors uploaded takes them from the object group named by its authentication mode, if any.
|
|
529
529
|
* Update a data collection survey
|
|
530
530
|
*/
|
|
531
531
|
async updateRaw(requestParameters: DataCollectionApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>> {
|
|
@@ -566,7 +566,7 @@ export class DataCollectionApi extends runtime.BaseAPI implements DataCollection
|
|
|
566
566
|
}
|
|
567
567
|
|
|
568
568
|
/**
|
|
569
|
-
* Partially updates the survey\'s name, steps, authentication mode, status, and other configurable fields. Only fields present in the request body are changed. Requires the *Configure crowd modelling* permission. Returns 400 if `anonymisationProperty` names a property that does not exist, or that is not a tree property for email or preferred-channel authentication. Also returns 400 if an already-set anonymisation property or authentication mode is changed, or status is moved back to draft, once the survey has left draft; an empty property or mode may still be set.
|
|
569
|
+
* Partially updates the survey\'s name, steps, authentication mode, status, and other configurable fields. Only fields present in the request body are changed. Requires the *Configure crowd modelling* permission. Returns 400 if `anonymisationProperty` names a property that does not exist, or that is not a tree property for email or preferred-channel authentication. Also returns 400 if an already-set anonymisation property or authentication mode is changed, or status is moved back to draft, once the survey has left draft; an empty property or mode may still be set. The object group ID in an email or preferred-channel authentication mode is only locked until contributors have been uploaded. For email or preferred-channel authentication, `contributors` lists each contributor\'s user ID and their nodes on the anonymisation property; a non-empty list replaces the stored one and `clearContributors` empties it. Sending either requires the *Upload data collection contributors* permission as well, and sending both returns 400. Switching a draft to anonymous or public authentication clears its contributors. Returns 400 if contributors are uploaded for anonymous or public authentication, if a contributor is listed twice, is not a user of the account, or names a node that is not on the anonymisation property, if the contributors change or are cleared once the survey has left draft, or if the survey leaves draft without contributors. Also returns 400 if the stored survey, contributors included, would exceed 300 KiB; at one node ID per contributor that is roughly 5,000 contributors. A survey that leaves draft without ever having had contributors uploaded takes them from the object group named by its authentication mode, if any.
|
|
570
570
|
* Update a data collection survey
|
|
571
571
|
*/
|
|
572
572
|
async update(requestParameters: DataCollectionApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object> {
|