@researchdatabox/raido-openapi-generated-node 0.0.3 → 5.0.0-RC1
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/dist/api.d.ts +1679 -0
- package/dist/api.js +701 -16
- package/dist/base.d.ts +55 -0
- package/dist/base.js +69 -0
- package/dist/common.d.ts +65 -0
- package/dist/common.js +144 -0
- package/dist/configuration.d.ts +83 -0
- package/dist/configuration.js +92 -0
- package/dist/{model/alternateUrl.js → index.d.ts} +2 -18
- package/dist/index.js +32 -0
- package/package.json +11 -6
- package/dist/api/apis.js +0 -35
- package/dist/api/raidApi.js +0 -452
- package/dist/api/servicePointApi.js +0 -350
- package/dist/model/access.js +0 -44
- package/dist/model/accessStatement.js +0 -35
- package/dist/model/accessType.js +0 -35
- package/dist/model/alternateIdentifier.js +0 -35
- package/dist/model/closedRaid.js +0 -35
- package/dist/model/contributor.js +0 -59
- package/dist/model/contributorPosition.js +0 -47
- package/dist/model/contributorRole.js +0 -35
- package/dist/model/description.js +0 -41
- package/dist/model/descriptionType.js +0 -35
- package/dist/model/failureResponse.js +0 -53
- package/dist/model/id.js +0 -80
- package/dist/model/language.js +0 -35
- package/dist/model/modelDate.js +0 -38
- package/dist/model/models.js +0 -334
- package/dist/model/organisation.js +0 -41
- package/dist/model/organisationRole.js +0 -47
- package/dist/model/owner.js +0 -47
- package/dist/model/raidChange.js +0 -53
- package/dist/model/raidCreateRequest.js +0 -107
- package/dist/model/raidDto.js +0 -107
- package/dist/model/raidUpdateRequest.js +0 -107
- package/dist/model/registrationAgency.js +0 -38
- package/dist/model/relatedObject.js +0 -47
- package/dist/model/relatedObjectCategory.js +0 -35
- package/dist/model/relatedObjectType.js +0 -35
- package/dist/model/relatedRaid.js +0 -35
- package/dist/model/relatedRaidType.js +0 -35
- package/dist/model/servicePoint.js +0 -92
- package/dist/model/servicePointCreateRequest.js +0 -104
- package/dist/model/servicePointUpdateRequest.js +0 -113
- package/dist/model/spatialCoverage.js +0 -41
- package/dist/model/spatialCoveragePlace.js +0 -35
- package/dist/model/subject.js +0 -41
- package/dist/model/subjectKeyword.js +0 -35
- package/dist/model/title.js +0 -53
- package/dist/model/titleType.js +0 -35
- package/dist/model/traditionalKnowledgeLabel.js +0 -35
- package/dist/model/validationFailure.js +0 -41
- package/dist/model/validationFailureResponse.js +0 -59
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* RAID v2 API
|
|
4
|
-
* This file is where all the endpoint paths are defined, it\'s the \"top level\' of the OpenAPI definition that links all the different files together. The `3.0` in the filename refers to this file being based on OpenAPI 3.0 as opposed to OpenAPI 3.1, which the tooling doesn\'t support yet. The `2.0.0` in the version field refers to the fact that there\'s already a `1.0.0` used for the legacy RAiD application. Note that swagger ui doesn\'t currently work with our spec, see https://github.com/swagger-api/swagger-ui/issues/7724 But the spec works fine with openapi-generator tooling.
|
|
5
|
-
*
|
|
6
|
-
* The version of the OpenAPI document: 2.0.0
|
|
7
|
-
* Contact: contact@raid.org
|
|
8
|
-
*
|
|
9
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
10
|
-
* https://openapi-generator.tech
|
|
11
|
-
* Do not edit the class manually.
|
|
12
|
-
*/
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.ContributorRole = void 0;
|
|
15
|
-
class ContributorRole {
|
|
16
|
-
'schemaUri';
|
|
17
|
-
'id';
|
|
18
|
-
static discriminator = undefined;
|
|
19
|
-
static attributeTypeMap = [
|
|
20
|
-
{
|
|
21
|
-
"name": "schemaUri",
|
|
22
|
-
"baseName": "schemaUri",
|
|
23
|
-
"type": "string"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"name": "id",
|
|
27
|
-
"baseName": "id",
|
|
28
|
-
"type": "string"
|
|
29
|
-
}
|
|
30
|
-
];
|
|
31
|
-
static getAttributeTypeMap() {
|
|
32
|
-
return ContributorRole.attributeTypeMap;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
exports.ContributorRole = ContributorRole;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* RAID v2 API
|
|
4
|
-
* This file is where all the endpoint paths are defined, it\'s the \"top level\' of the OpenAPI definition that links all the different files together. The `3.0` in the filename refers to this file being based on OpenAPI 3.0 as opposed to OpenAPI 3.1, which the tooling doesn\'t support yet. The `2.0.0` in the version field refers to the fact that there\'s already a `1.0.0` used for the legacy RAiD application. Note that swagger ui doesn\'t currently work with our spec, see https://github.com/swagger-api/swagger-ui/issues/7724 But the spec works fine with openapi-generator tooling.
|
|
5
|
-
*
|
|
6
|
-
* The version of the OpenAPI document: 2.0.0
|
|
7
|
-
* Contact: contact@raid.org
|
|
8
|
-
*
|
|
9
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
10
|
-
* https://openapi-generator.tech
|
|
11
|
-
* Do not edit the class manually.
|
|
12
|
-
*/
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.Description = void 0;
|
|
15
|
-
class Description {
|
|
16
|
-
'text';
|
|
17
|
-
'type';
|
|
18
|
-
'language';
|
|
19
|
-
static discriminator = undefined;
|
|
20
|
-
static attributeTypeMap = [
|
|
21
|
-
{
|
|
22
|
-
"name": "text",
|
|
23
|
-
"baseName": "text",
|
|
24
|
-
"type": "string"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"name": "type",
|
|
28
|
-
"baseName": "type",
|
|
29
|
-
"type": "DescriptionType"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"name": "language",
|
|
33
|
-
"baseName": "language",
|
|
34
|
-
"type": "Language"
|
|
35
|
-
}
|
|
36
|
-
];
|
|
37
|
-
static getAttributeTypeMap() {
|
|
38
|
-
return Description.attributeTypeMap;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
exports.Description = Description;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* RAID v2 API
|
|
4
|
-
* This file is where all the endpoint paths are defined, it\'s the \"top level\' of the OpenAPI definition that links all the different files together. The `3.0` in the filename refers to this file being based on OpenAPI 3.0 as opposed to OpenAPI 3.1, which the tooling doesn\'t support yet. The `2.0.0` in the version field refers to the fact that there\'s already a `1.0.0` used for the legacy RAiD application. Note that swagger ui doesn\'t currently work with our spec, see https://github.com/swagger-api/swagger-ui/issues/7724 But the spec works fine with openapi-generator tooling.
|
|
5
|
-
*
|
|
6
|
-
* The version of the OpenAPI document: 2.0.0
|
|
7
|
-
* Contact: contact@raid.org
|
|
8
|
-
*
|
|
9
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
10
|
-
* https://openapi-generator.tech
|
|
11
|
-
* Do not edit the class manually.
|
|
12
|
-
*/
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.DescriptionType = void 0;
|
|
15
|
-
class DescriptionType {
|
|
16
|
-
'id';
|
|
17
|
-
'schemaUri';
|
|
18
|
-
static discriminator = undefined;
|
|
19
|
-
static attributeTypeMap = [
|
|
20
|
-
{
|
|
21
|
-
"name": "id",
|
|
22
|
-
"baseName": "id",
|
|
23
|
-
"type": "string"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"name": "schemaUri",
|
|
27
|
-
"baseName": "schemaUri",
|
|
28
|
-
"type": "string"
|
|
29
|
-
}
|
|
30
|
-
];
|
|
31
|
-
static getAttributeTypeMap() {
|
|
32
|
-
return DescriptionType.attributeTypeMap;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
exports.DescriptionType = DescriptionType;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* RAID v2 API
|
|
4
|
-
* This file is where all the endpoint paths are defined, it\'s the \"top level\' of the OpenAPI definition that links all the different files together. The `3.0` in the filename refers to this file being based on OpenAPI 3.0 as opposed to OpenAPI 3.1, which the tooling doesn\'t support yet. The `2.0.0` in the version field refers to the fact that there\'s already a `1.0.0` used for the legacy RAiD application. Note that swagger ui doesn\'t currently work with our spec, see https://github.com/swagger-api/swagger-ui/issues/7724 But the spec works fine with openapi-generator tooling.
|
|
5
|
-
*
|
|
6
|
-
* The version of the OpenAPI document: 2.0.0
|
|
7
|
-
* Contact: contact@raid.org
|
|
8
|
-
*
|
|
9
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
10
|
-
* https://openapi-generator.tech
|
|
11
|
-
* Do not edit the class manually.
|
|
12
|
-
*/
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.FailureResponse = void 0;
|
|
15
|
-
class FailureResponse {
|
|
16
|
-
'type';
|
|
17
|
-
'title';
|
|
18
|
-
'status';
|
|
19
|
-
'detail';
|
|
20
|
-
'instance';
|
|
21
|
-
static discriminator = undefined;
|
|
22
|
-
static attributeTypeMap = [
|
|
23
|
-
{
|
|
24
|
-
"name": "type",
|
|
25
|
-
"baseName": "type",
|
|
26
|
-
"type": "string"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"name": "title",
|
|
30
|
-
"baseName": "title",
|
|
31
|
-
"type": "string"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"name": "status",
|
|
35
|
-
"baseName": "status",
|
|
36
|
-
"type": "number"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"name": "detail",
|
|
40
|
-
"baseName": "detail",
|
|
41
|
-
"type": "string"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"name": "instance",
|
|
45
|
-
"baseName": "instance",
|
|
46
|
-
"type": "string"
|
|
47
|
-
}
|
|
48
|
-
];
|
|
49
|
-
static getAttributeTypeMap() {
|
|
50
|
-
return FailureResponse.attributeTypeMap;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
exports.FailureResponse = FailureResponse;
|
package/dist/model/id.js
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* RAID v2 API
|
|
4
|
-
* This file is where all the endpoint paths are defined, it\'s the \"top level\' of the OpenAPI definition that links all the different files together. The `3.0` in the filename refers to this file being based on OpenAPI 3.0 as opposed to OpenAPI 3.1, which the tooling doesn\'t support yet. The `2.0.0` in the version field refers to the fact that there\'s already a `1.0.0` used for the legacy RAiD application. Note that swagger ui doesn\'t currently work with our spec, see https://github.com/swagger-api/swagger-ui/issues/7724 But the spec works fine with openapi-generator tooling.
|
|
5
|
-
*
|
|
6
|
-
* The version of the OpenAPI document: 2.0.0
|
|
7
|
-
* Contact: contact@raid.org
|
|
8
|
-
*
|
|
9
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
10
|
-
* https://openapi-generator.tech
|
|
11
|
-
* Do not edit the class manually.
|
|
12
|
-
*/
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.Id = void 0;
|
|
15
|
-
class Id {
|
|
16
|
-
/**
|
|
17
|
-
* The identifier of the raid, e.g. https://raid.org.au/102.100.100/zzz
|
|
18
|
-
*/
|
|
19
|
-
'id';
|
|
20
|
-
/**
|
|
21
|
-
* The URI of the Identifier scheme. For example, https://raid.org
|
|
22
|
-
*/
|
|
23
|
-
'schemaUri';
|
|
24
|
-
'registrationAgency';
|
|
25
|
-
'owner';
|
|
26
|
-
/**
|
|
27
|
-
* The URL for the raid via the minting raid agency system, e.g https://raid.org.au/10378.1/1695863
|
|
28
|
-
*/
|
|
29
|
-
'raidAgencyUrl';
|
|
30
|
-
/**
|
|
31
|
-
* The license under which the RAiD Metadata Record associated with this Identifier has been issued.
|
|
32
|
-
*/
|
|
33
|
-
'license';
|
|
34
|
-
/**
|
|
35
|
-
* The version of the resource. Read-only. Increments automatically on update.
|
|
36
|
-
*/
|
|
37
|
-
'version';
|
|
38
|
-
static discriminator = undefined;
|
|
39
|
-
static attributeTypeMap = [
|
|
40
|
-
{
|
|
41
|
-
"name": "id",
|
|
42
|
-
"baseName": "id",
|
|
43
|
-
"type": "string"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"name": "schemaUri",
|
|
47
|
-
"baseName": "schemaUri",
|
|
48
|
-
"type": "string"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"name": "registrationAgency",
|
|
52
|
-
"baseName": "registrationAgency",
|
|
53
|
-
"type": "RegistrationAgency"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"name": "owner",
|
|
57
|
-
"baseName": "owner",
|
|
58
|
-
"type": "Owner"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
"name": "raidAgencyUrl",
|
|
62
|
-
"baseName": "raidAgencyUrl",
|
|
63
|
-
"type": "string"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"name": "license",
|
|
67
|
-
"baseName": "license",
|
|
68
|
-
"type": "string"
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"name": "version",
|
|
72
|
-
"baseName": "version",
|
|
73
|
-
"type": "number"
|
|
74
|
-
}
|
|
75
|
-
];
|
|
76
|
-
static getAttributeTypeMap() {
|
|
77
|
-
return Id.attributeTypeMap;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
exports.Id = Id;
|
package/dist/model/language.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* RAID v2 API
|
|
4
|
-
* This file is where all the endpoint paths are defined, it\'s the \"top level\' of the OpenAPI definition that links all the different files together. The `3.0` in the filename refers to this file being based on OpenAPI 3.0 as opposed to OpenAPI 3.1, which the tooling doesn\'t support yet. The `2.0.0` in the version field refers to the fact that there\'s already a `1.0.0` used for the legacy RAiD application. Note that swagger ui doesn\'t currently work with our spec, see https://github.com/swagger-api/swagger-ui/issues/7724 But the spec works fine with openapi-generator tooling.
|
|
5
|
-
*
|
|
6
|
-
* The version of the OpenAPI document: 2.0.0
|
|
7
|
-
* Contact: contact@raid.org
|
|
8
|
-
*
|
|
9
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
10
|
-
* https://openapi-generator.tech
|
|
11
|
-
* Do not edit the class manually.
|
|
12
|
-
*/
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.Language = void 0;
|
|
15
|
-
class Language {
|
|
16
|
-
'id';
|
|
17
|
-
'schemaUri';
|
|
18
|
-
static discriminator = undefined;
|
|
19
|
-
static attributeTypeMap = [
|
|
20
|
-
{
|
|
21
|
-
"name": "id",
|
|
22
|
-
"baseName": "id",
|
|
23
|
-
"type": "string"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"name": "schemaUri",
|
|
27
|
-
"baseName": "schemaUri",
|
|
28
|
-
"type": "string"
|
|
29
|
-
}
|
|
30
|
-
];
|
|
31
|
-
static getAttributeTypeMap() {
|
|
32
|
-
return Language.attributeTypeMap;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
exports.Language = Language;
|
package/dist/model/modelDate.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* RAID v2 API
|
|
4
|
-
* This file is where all the endpoint paths are defined, it\'s the \"top level\' of the OpenAPI definition that links all the different files together. The `3.0` in the filename refers to this file being based on OpenAPI 3.0 as opposed to OpenAPI 3.1, which the tooling doesn\'t support yet. The `2.0.0` in the version field refers to the fact that there\'s already a `1.0.0` used for the legacy RAiD application. Note that swagger ui doesn\'t currently work with our spec, see https://github.com/swagger-api/swagger-ui/issues/7724 But the spec works fine with openapi-generator tooling.
|
|
5
|
-
*
|
|
6
|
-
* The version of the OpenAPI document: 2.0.0
|
|
7
|
-
* Contact: contact@raid.org
|
|
8
|
-
*
|
|
9
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
10
|
-
* https://openapi-generator.tech
|
|
11
|
-
* Do not edit the class manually.
|
|
12
|
-
*/
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.ModelDate = void 0;
|
|
15
|
-
/**
|
|
16
|
-
* Metadata schema block containing the start and end date of the RAiD.
|
|
17
|
-
*/
|
|
18
|
-
class ModelDate {
|
|
19
|
-
'startDate';
|
|
20
|
-
'endDate';
|
|
21
|
-
static discriminator = undefined;
|
|
22
|
-
static attributeTypeMap = [
|
|
23
|
-
{
|
|
24
|
-
"name": "startDate",
|
|
25
|
-
"baseName": "startDate",
|
|
26
|
-
"type": "string"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"name": "endDate",
|
|
30
|
-
"baseName": "endDate",
|
|
31
|
-
"type": "string"
|
|
32
|
-
}
|
|
33
|
-
];
|
|
34
|
-
static getAttributeTypeMap() {
|
|
35
|
-
return ModelDate.attributeTypeMap;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
exports.ModelDate = ModelDate;
|
package/dist/model/models.js
DELETED
|
@@ -1,334 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.VoidAuth = exports.OAuth = exports.ApiKeyAuth = exports.HttpBearerAuth = exports.HttpBasicAuth = exports.ObjectSerializer = void 0;
|
|
18
|
-
__exportStar(require("./access"), exports);
|
|
19
|
-
__exportStar(require("./accessStatement"), exports);
|
|
20
|
-
__exportStar(require("./accessType"), exports);
|
|
21
|
-
__exportStar(require("./alternateIdentifier"), exports);
|
|
22
|
-
__exportStar(require("./alternateUrl"), exports);
|
|
23
|
-
__exportStar(require("./closedRaid"), exports);
|
|
24
|
-
__exportStar(require("./contributor"), exports);
|
|
25
|
-
__exportStar(require("./contributorPosition"), exports);
|
|
26
|
-
__exportStar(require("./contributorRole"), exports);
|
|
27
|
-
__exportStar(require("./description"), exports);
|
|
28
|
-
__exportStar(require("./descriptionType"), exports);
|
|
29
|
-
__exportStar(require("./failureResponse"), exports);
|
|
30
|
-
__exportStar(require("./id"), exports);
|
|
31
|
-
__exportStar(require("./language"), exports);
|
|
32
|
-
__exportStar(require("./modelDate"), exports);
|
|
33
|
-
__exportStar(require("./organisation"), exports);
|
|
34
|
-
__exportStar(require("./organisationRole"), exports);
|
|
35
|
-
__exportStar(require("./owner"), exports);
|
|
36
|
-
__exportStar(require("./raidChange"), exports);
|
|
37
|
-
__exportStar(require("./raidCreateRequest"), exports);
|
|
38
|
-
__exportStar(require("./raidDto"), exports);
|
|
39
|
-
__exportStar(require("./raidUpdateRequest"), exports);
|
|
40
|
-
__exportStar(require("./registrationAgency"), exports);
|
|
41
|
-
__exportStar(require("./relatedObject"), exports);
|
|
42
|
-
__exportStar(require("./relatedObjectCategory"), exports);
|
|
43
|
-
__exportStar(require("./relatedObjectType"), exports);
|
|
44
|
-
__exportStar(require("./relatedRaid"), exports);
|
|
45
|
-
__exportStar(require("./relatedRaidType"), exports);
|
|
46
|
-
__exportStar(require("./servicePoint"), exports);
|
|
47
|
-
__exportStar(require("./servicePointCreateRequest"), exports);
|
|
48
|
-
__exportStar(require("./servicePointUpdateRequest"), exports);
|
|
49
|
-
__exportStar(require("./spatialCoverage"), exports);
|
|
50
|
-
__exportStar(require("./spatialCoveragePlace"), exports);
|
|
51
|
-
__exportStar(require("./subject"), exports);
|
|
52
|
-
__exportStar(require("./subjectKeyword"), exports);
|
|
53
|
-
__exportStar(require("./title"), exports);
|
|
54
|
-
__exportStar(require("./titleType"), exports);
|
|
55
|
-
__exportStar(require("./traditionalKnowledgeLabel"), exports);
|
|
56
|
-
__exportStar(require("./validationFailure"), exports);
|
|
57
|
-
__exportStar(require("./validationFailureResponse"), exports);
|
|
58
|
-
const access_1 = require("./access");
|
|
59
|
-
const accessStatement_1 = require("./accessStatement");
|
|
60
|
-
const accessType_1 = require("./accessType");
|
|
61
|
-
const alternateIdentifier_1 = require("./alternateIdentifier");
|
|
62
|
-
const alternateUrl_1 = require("./alternateUrl");
|
|
63
|
-
const closedRaid_1 = require("./closedRaid");
|
|
64
|
-
const contributor_1 = require("./contributor");
|
|
65
|
-
const contributorPosition_1 = require("./contributorPosition");
|
|
66
|
-
const contributorRole_1 = require("./contributorRole");
|
|
67
|
-
const description_1 = require("./description");
|
|
68
|
-
const descriptionType_1 = require("./descriptionType");
|
|
69
|
-
const failureResponse_1 = require("./failureResponse");
|
|
70
|
-
const id_1 = require("./id");
|
|
71
|
-
const language_1 = require("./language");
|
|
72
|
-
const modelDate_1 = require("./modelDate");
|
|
73
|
-
const organisation_1 = require("./organisation");
|
|
74
|
-
const organisationRole_1 = require("./organisationRole");
|
|
75
|
-
const owner_1 = require("./owner");
|
|
76
|
-
const raidChange_1 = require("./raidChange");
|
|
77
|
-
const raidCreateRequest_1 = require("./raidCreateRequest");
|
|
78
|
-
const raidDto_1 = require("./raidDto");
|
|
79
|
-
const raidUpdateRequest_1 = require("./raidUpdateRequest");
|
|
80
|
-
const registrationAgency_1 = require("./registrationAgency");
|
|
81
|
-
const relatedObject_1 = require("./relatedObject");
|
|
82
|
-
const relatedObjectCategory_1 = require("./relatedObjectCategory");
|
|
83
|
-
const relatedObjectType_1 = require("./relatedObjectType");
|
|
84
|
-
const relatedRaid_1 = require("./relatedRaid");
|
|
85
|
-
const relatedRaidType_1 = require("./relatedRaidType");
|
|
86
|
-
const servicePoint_1 = require("./servicePoint");
|
|
87
|
-
const servicePointCreateRequest_1 = require("./servicePointCreateRequest");
|
|
88
|
-
const servicePointUpdateRequest_1 = require("./servicePointUpdateRequest");
|
|
89
|
-
const spatialCoverage_1 = require("./spatialCoverage");
|
|
90
|
-
const spatialCoveragePlace_1 = require("./spatialCoveragePlace");
|
|
91
|
-
const subject_1 = require("./subject");
|
|
92
|
-
const subjectKeyword_1 = require("./subjectKeyword");
|
|
93
|
-
const title_1 = require("./title");
|
|
94
|
-
const titleType_1 = require("./titleType");
|
|
95
|
-
const traditionalKnowledgeLabel_1 = require("./traditionalKnowledgeLabel");
|
|
96
|
-
const validationFailure_1 = require("./validationFailure");
|
|
97
|
-
const validationFailureResponse_1 = require("./validationFailureResponse");
|
|
98
|
-
/* tslint:disable:no-unused-variable */
|
|
99
|
-
let primitives = [
|
|
100
|
-
"string",
|
|
101
|
-
"boolean",
|
|
102
|
-
"double",
|
|
103
|
-
"integer",
|
|
104
|
-
"long",
|
|
105
|
-
"float",
|
|
106
|
-
"number",
|
|
107
|
-
"any"
|
|
108
|
-
];
|
|
109
|
-
let enumsMap = {};
|
|
110
|
-
let typeMap = {
|
|
111
|
-
"Access": access_1.Access,
|
|
112
|
-
"AccessStatement": accessStatement_1.AccessStatement,
|
|
113
|
-
"AccessType": accessType_1.AccessType,
|
|
114
|
-
"AlternateIdentifier": alternateIdentifier_1.AlternateIdentifier,
|
|
115
|
-
"AlternateUrl": alternateUrl_1.AlternateUrl,
|
|
116
|
-
"ClosedRaid": closedRaid_1.ClosedRaid,
|
|
117
|
-
"Contributor": contributor_1.Contributor,
|
|
118
|
-
"ContributorPosition": contributorPosition_1.ContributorPosition,
|
|
119
|
-
"ContributorRole": contributorRole_1.ContributorRole,
|
|
120
|
-
"Description": description_1.Description,
|
|
121
|
-
"DescriptionType": descriptionType_1.DescriptionType,
|
|
122
|
-
"FailureResponse": failureResponse_1.FailureResponse,
|
|
123
|
-
"Id": id_1.Id,
|
|
124
|
-
"Language": language_1.Language,
|
|
125
|
-
"ModelDate": modelDate_1.ModelDate,
|
|
126
|
-
"Organisation": organisation_1.Organisation,
|
|
127
|
-
"OrganisationRole": organisationRole_1.OrganisationRole,
|
|
128
|
-
"Owner": owner_1.Owner,
|
|
129
|
-
"RaidChange": raidChange_1.RaidChange,
|
|
130
|
-
"RaidCreateRequest": raidCreateRequest_1.RaidCreateRequest,
|
|
131
|
-
"RaidDto": raidDto_1.RaidDto,
|
|
132
|
-
"RaidUpdateRequest": raidUpdateRequest_1.RaidUpdateRequest,
|
|
133
|
-
"RegistrationAgency": registrationAgency_1.RegistrationAgency,
|
|
134
|
-
"RelatedObject": relatedObject_1.RelatedObject,
|
|
135
|
-
"RelatedObjectCategory": relatedObjectCategory_1.RelatedObjectCategory,
|
|
136
|
-
"RelatedObjectType": relatedObjectType_1.RelatedObjectType,
|
|
137
|
-
"RelatedRaid": relatedRaid_1.RelatedRaid,
|
|
138
|
-
"RelatedRaidType": relatedRaidType_1.RelatedRaidType,
|
|
139
|
-
"ServicePoint": servicePoint_1.ServicePoint,
|
|
140
|
-
"ServicePointCreateRequest": servicePointCreateRequest_1.ServicePointCreateRequest,
|
|
141
|
-
"ServicePointUpdateRequest": servicePointUpdateRequest_1.ServicePointUpdateRequest,
|
|
142
|
-
"SpatialCoverage": spatialCoverage_1.SpatialCoverage,
|
|
143
|
-
"SpatialCoveragePlace": spatialCoveragePlace_1.SpatialCoveragePlace,
|
|
144
|
-
"Subject": subject_1.Subject,
|
|
145
|
-
"SubjectKeyword": subjectKeyword_1.SubjectKeyword,
|
|
146
|
-
"Title": title_1.Title,
|
|
147
|
-
"TitleType": titleType_1.TitleType,
|
|
148
|
-
"TraditionalKnowledgeLabel": traditionalKnowledgeLabel_1.TraditionalKnowledgeLabel,
|
|
149
|
-
"ValidationFailure": validationFailure_1.ValidationFailure,
|
|
150
|
-
"ValidationFailureResponse": validationFailureResponse_1.ValidationFailureResponse,
|
|
151
|
-
};
|
|
152
|
-
class ObjectSerializer {
|
|
153
|
-
static findCorrectType(data, expectedType) {
|
|
154
|
-
if (data == undefined) {
|
|
155
|
-
return expectedType;
|
|
156
|
-
}
|
|
157
|
-
else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) {
|
|
158
|
-
return expectedType;
|
|
159
|
-
}
|
|
160
|
-
else if (expectedType === "Date") {
|
|
161
|
-
return expectedType;
|
|
162
|
-
}
|
|
163
|
-
else {
|
|
164
|
-
if (enumsMap[expectedType]) {
|
|
165
|
-
return expectedType;
|
|
166
|
-
}
|
|
167
|
-
if (!typeMap[expectedType]) {
|
|
168
|
-
return expectedType; // w/e we don't know the type
|
|
169
|
-
}
|
|
170
|
-
// Check the discriminator
|
|
171
|
-
let discriminatorProperty = typeMap[expectedType].discriminator;
|
|
172
|
-
if (discriminatorProperty == null) {
|
|
173
|
-
return expectedType; // the type does not have a discriminator. use it.
|
|
174
|
-
}
|
|
175
|
-
else {
|
|
176
|
-
if (data[discriminatorProperty]) {
|
|
177
|
-
var discriminatorType = data[discriminatorProperty];
|
|
178
|
-
if (typeMap[discriminatorType]) {
|
|
179
|
-
return discriminatorType; // use the type given in the discriminator
|
|
180
|
-
}
|
|
181
|
-
else {
|
|
182
|
-
return expectedType; // discriminator did not map to a type
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
else {
|
|
186
|
-
return expectedType; // discriminator was not present (or an empty string)
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
static serialize(data, type) {
|
|
192
|
-
if (data == undefined) {
|
|
193
|
-
return data;
|
|
194
|
-
}
|
|
195
|
-
else if (primitives.indexOf(type.toLowerCase()) !== -1) {
|
|
196
|
-
return data;
|
|
197
|
-
}
|
|
198
|
-
else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6
|
|
199
|
-
let subType = type.replace("Array<", ""); // Array<Type> => Type>
|
|
200
|
-
subType = subType.substring(0, subType.length - 1); // Type> => Type
|
|
201
|
-
let transformedData = [];
|
|
202
|
-
for (let index = 0; index < data.length; index++) {
|
|
203
|
-
let datum = data[index];
|
|
204
|
-
transformedData.push(ObjectSerializer.serialize(datum, subType));
|
|
205
|
-
}
|
|
206
|
-
return transformedData;
|
|
207
|
-
}
|
|
208
|
-
else if (type === "Date") {
|
|
209
|
-
return data.toISOString();
|
|
210
|
-
}
|
|
211
|
-
else {
|
|
212
|
-
if (enumsMap[type]) {
|
|
213
|
-
return data;
|
|
214
|
-
}
|
|
215
|
-
if (!typeMap[type]) { // in case we dont know the type
|
|
216
|
-
return data;
|
|
217
|
-
}
|
|
218
|
-
// Get the actual type of this object
|
|
219
|
-
type = this.findCorrectType(data, type);
|
|
220
|
-
// get the map for the correct type.
|
|
221
|
-
let attributeTypes = typeMap[type].getAttributeTypeMap();
|
|
222
|
-
let instance = {};
|
|
223
|
-
for (let index = 0; index < attributeTypes.length; index++) {
|
|
224
|
-
let attributeType = attributeTypes[index];
|
|
225
|
-
instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type);
|
|
226
|
-
}
|
|
227
|
-
return instance;
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
static deserialize(data, type) {
|
|
231
|
-
// polymorphism may change the actual type.
|
|
232
|
-
type = ObjectSerializer.findCorrectType(data, type);
|
|
233
|
-
if (data == undefined) {
|
|
234
|
-
return data;
|
|
235
|
-
}
|
|
236
|
-
else if (primitives.indexOf(type.toLowerCase()) !== -1) {
|
|
237
|
-
return data;
|
|
238
|
-
}
|
|
239
|
-
else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6
|
|
240
|
-
let subType = type.replace("Array<", ""); // Array<Type> => Type>
|
|
241
|
-
subType = subType.substring(0, subType.length - 1); // Type> => Type
|
|
242
|
-
let transformedData = [];
|
|
243
|
-
for (let index = 0; index < data.length; index++) {
|
|
244
|
-
let datum = data[index];
|
|
245
|
-
transformedData.push(ObjectSerializer.deserialize(datum, subType));
|
|
246
|
-
}
|
|
247
|
-
return transformedData;
|
|
248
|
-
}
|
|
249
|
-
else if (type === "Date") {
|
|
250
|
-
return new Date(data);
|
|
251
|
-
}
|
|
252
|
-
else {
|
|
253
|
-
if (enumsMap[type]) { // is Enum
|
|
254
|
-
return data;
|
|
255
|
-
}
|
|
256
|
-
if (!typeMap[type]) { // dont know the type
|
|
257
|
-
return data;
|
|
258
|
-
}
|
|
259
|
-
let instance = new typeMap[type]();
|
|
260
|
-
let attributeTypes = typeMap[type].getAttributeTypeMap();
|
|
261
|
-
for (let index = 0; index < attributeTypes.length; index++) {
|
|
262
|
-
let attributeType = attributeTypes[index];
|
|
263
|
-
instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type);
|
|
264
|
-
}
|
|
265
|
-
return instance;
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
exports.ObjectSerializer = ObjectSerializer;
|
|
270
|
-
class HttpBasicAuth {
|
|
271
|
-
username = '';
|
|
272
|
-
password = '';
|
|
273
|
-
applyToRequest(requestOptions) {
|
|
274
|
-
requestOptions.auth = {
|
|
275
|
-
username: this.username, password: this.password
|
|
276
|
-
};
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
exports.HttpBasicAuth = HttpBasicAuth;
|
|
280
|
-
class HttpBearerAuth {
|
|
281
|
-
accessToken = '';
|
|
282
|
-
applyToRequest(requestOptions) {
|
|
283
|
-
if (requestOptions && requestOptions.headers) {
|
|
284
|
-
const accessToken = typeof this.accessToken === 'function'
|
|
285
|
-
? this.accessToken()
|
|
286
|
-
: this.accessToken;
|
|
287
|
-
requestOptions.headers["Authorization"] = "Bearer " + accessToken;
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
exports.HttpBearerAuth = HttpBearerAuth;
|
|
292
|
-
class ApiKeyAuth {
|
|
293
|
-
location;
|
|
294
|
-
paramName;
|
|
295
|
-
apiKey = '';
|
|
296
|
-
constructor(location, paramName) {
|
|
297
|
-
this.location = location;
|
|
298
|
-
this.paramName = paramName;
|
|
299
|
-
}
|
|
300
|
-
applyToRequest(requestOptions) {
|
|
301
|
-
if (this.location == "query") {
|
|
302
|
-
requestOptions.qs[this.paramName] = this.apiKey;
|
|
303
|
-
}
|
|
304
|
-
else if (this.location == "header" && requestOptions && requestOptions.headers) {
|
|
305
|
-
requestOptions.headers[this.paramName] = this.apiKey;
|
|
306
|
-
}
|
|
307
|
-
else if (this.location == 'cookie' && requestOptions && requestOptions.headers) {
|
|
308
|
-
if (requestOptions.headers['Cookie']) {
|
|
309
|
-
requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey);
|
|
310
|
-
}
|
|
311
|
-
else {
|
|
312
|
-
requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey);
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
exports.ApiKeyAuth = ApiKeyAuth;
|
|
318
|
-
class OAuth {
|
|
319
|
-
accessToken = '';
|
|
320
|
-
applyToRequest(requestOptions) {
|
|
321
|
-
if (requestOptions && requestOptions.headers) {
|
|
322
|
-
requestOptions.headers["Authorization"] = "Bearer " + this.accessToken;
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
exports.OAuth = OAuth;
|
|
327
|
-
class VoidAuth {
|
|
328
|
-
username = '';
|
|
329
|
-
password = '';
|
|
330
|
-
applyToRequest(_) {
|
|
331
|
-
// Do nothing
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
exports.VoidAuth = VoidAuth;
|