@vaultgig/vaultgig-api-client 0.0.1
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/README.md +135 -0
- package/dist/apis/ContractorsApi.d.ts +78 -0
- package/dist/apis/ContractorsApi.js +302 -0
- package/dist/apis/SchemaApi.d.ts +27 -0
- package/dist/apis/SchemaApi.js +129 -0
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +20 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +21 -0
- package/dist/models/BusinessClassification.d.ts +32 -0
- package/dist/models/BusinessClassification.js +58 -0
- package/dist/models/ContractorCreateData.d.ts +32 -0
- package/dist/models/ContractorCreateData.js +51 -0
- package/dist/models/ContractorCreatePayload.d.ts +51 -0
- package/dist/models/ContractorCreatePayload.js +64 -0
- package/dist/models/ContractorData.d.ts +33 -0
- package/dist/models/ContractorData.js +52 -0
- package/dist/models/ContractorResponse.d.ts +88 -0
- package/dist/models/ContractorResponse.js +75 -0
- package/dist/models/ContractorStatus.d.ts +28 -0
- package/dist/models/ContractorStatus.js +54 -0
- package/dist/models/ContractorType.d.ts +25 -0
- package/dist/models/ContractorType.js +51 -0
- package/dist/models/ContractorUpdatePayload.d.ts +106 -0
- package/dist/models/ContractorUpdatePayload.js +77 -0
- package/dist/models/HTTPValidationError.d.ts +33 -0
- package/dist/models/HTTPValidationError.js +50 -0
- package/dist/models/PaginatedResponseContractorResponse.d.ts +52 -0
- package/dist/models/PaginatedResponseContractorResponse.js +61 -0
- package/dist/models/PaginationMeta.d.ts +44 -0
- package/dist/models/PaginationMeta.js +59 -0
- package/dist/models/ResponseContractorCreateData.d.ts +45 -0
- package/dist/models/ResponseContractorCreateData.js +56 -0
- package/dist/models/ResponseContractorData.d.ts +45 -0
- package/dist/models/ResponseContractorData.js +56 -0
- package/dist/models/ResponsePaginatedResponseContractorResponse.d.ts +45 -0
- package/dist/models/ResponsePaginatedResponseContractorResponse.js +56 -0
- package/dist/models/SuccessResponse.d.ts +38 -0
- package/dist/models/SuccessResponse.js +53 -0
- package/dist/models/TinType.d.ts +25 -0
- package/dist/models/TinType.js +51 -0
- package/dist/models/ValidationError.d.ts +45 -0
- package/dist/models/ValidationError.js +60 -0
- package/dist/models/ValidationErrorLocInner.d.ts +26 -0
- package/dist/models/ValidationErrorLocInner.js +39 -0
- package/dist/models/index.d.ts +18 -0
- package/dist/models/index.js +36 -0
- package/dist/runtime.d.ts +184 -0
- package/dist/runtime.js +564 -0
- package/docs/BusinessClassification.md +33 -0
- package/docs/ContractorCreateData.md +35 -0
- package/docs/ContractorCreatePayload.md +41 -0
- package/docs/ContractorData.md +35 -0
- package/docs/ContractorResponse.md +53 -0
- package/docs/ContractorStatus.md +33 -0
- package/docs/ContractorType.md +33 -0
- package/docs/ContractorUpdatePayload.md +59 -0
- package/docs/ContractorsApi.md +308 -0
- package/docs/HTTPValidationError.md +34 -0
- package/docs/PaginatedResponseContractorResponse.md +40 -0
- package/docs/PaginationMeta.md +39 -0
- package/docs/ResponseContractorCreateData.md +38 -0
- package/docs/ResponseContractorData.md +38 -0
- package/docs/ResponsePaginatedResponseContractorResponse.md +38 -0
- package/docs/SchemaApi.md +68 -0
- package/docs/SuccessResponse.md +37 -0
- package/docs/TinType.md +33 -0
- package/docs/ValidationError.md +38 -0
- package/docs/ValidationErrorLocInner.md +32 -0
- package/package.json +19 -0
- package/src/apis/ContractorsApi.ts +280 -0
- package/src/apis/SchemaApi.ts +58 -0
- package/src/apis/index.ts +4 -0
- package/src/index.ts +5 -0
- package/src/models/BusinessClassification.ts +60 -0
- package/src/models/ContractorCreateData.ts +66 -0
- package/src/models/ContractorCreatePayload.ts +103 -0
- package/src/models/ContractorData.ts +74 -0
- package/src/models/ContractorResponse.ts +157 -0
- package/src/models/ContractorStatus.ts +56 -0
- package/src/models/ContractorType.ts +53 -0
- package/src/models/ContractorUpdatePayload.ts +179 -0
- package/src/models/HTTPValidationError.ts +73 -0
- package/src/models/PaginatedResponseContractorResponse.ts +106 -0
- package/src/models/PaginationMeta.ts +84 -0
- package/src/models/ResponseContractorCreateData.ts +90 -0
- package/src/models/ResponseContractorData.ts +90 -0
- package/src/models/ResponsePaginatedResponseContractorResponse.ts +90 -0
- package/src/models/SuccessResponse.ts +74 -0
- package/src/models/TinType.ts +53 -0
- package/src/models/ValidationError.ts +92 -0
- package/src/models/ValidationErrorLocInner.ts +46 -0
- package/src/models/index.ts +20 -0
- package/src/runtime.ts +432 -0
- package/tsconfig.json +20 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
# ResponseContractorData
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`success` | boolean
|
|
10
|
+
`data` | [ContractorData](ContractorData.md)
|
|
11
|
+
`error` | string
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { ResponseContractorData } from '@vaultgig/vaultgig-api-client'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"success": null,
|
|
21
|
+
"data": null,
|
|
22
|
+
"error": null,
|
|
23
|
+
} satisfies ResponseContractorData
|
|
24
|
+
|
|
25
|
+
console.log(example)
|
|
26
|
+
|
|
27
|
+
// Convert the instance to a JSON string
|
|
28
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
29
|
+
console.log(exampleJSON)
|
|
30
|
+
|
|
31
|
+
// Parse the JSON string back to an object
|
|
32
|
+
const exampleParsed = JSON.parse(exampleJSON) as ResponseContractorData
|
|
33
|
+
console.log(exampleParsed)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
37
|
+
|
|
38
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
# ResponsePaginatedResponseContractorResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`success` | boolean
|
|
10
|
+
`data` | [PaginatedResponseContractorResponse](PaginatedResponseContractorResponse.md)
|
|
11
|
+
`error` | string
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { ResponsePaginatedResponseContractorResponse } from '@vaultgig/vaultgig-api-client'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"success": null,
|
|
21
|
+
"data": null,
|
|
22
|
+
"error": null,
|
|
23
|
+
} satisfies ResponsePaginatedResponseContractorResponse
|
|
24
|
+
|
|
25
|
+
console.log(example)
|
|
26
|
+
|
|
27
|
+
// Convert the instance to a JSON string
|
|
28
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
29
|
+
console.log(exampleJSON)
|
|
30
|
+
|
|
31
|
+
// Parse the JSON string back to an object
|
|
32
|
+
const exampleParsed = JSON.parse(exampleJSON) as ResponsePaginatedResponseContractorResponse
|
|
33
|
+
console.log(exampleParsed)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
37
|
+
|
|
38
|
+
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# SchemaApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
| [**getYamlSchema**](SchemaApi.md#getyamlschema) | **GET** /openapi.yaml | Get Yaml Schema |
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## getYamlSchema
|
|
12
|
+
|
|
13
|
+
> any getYamlSchema()
|
|
14
|
+
|
|
15
|
+
Get Yaml Schema
|
|
16
|
+
|
|
17
|
+
Get the YAML representation of the OpenAPI schema. Used by the client SDK builder.
|
|
18
|
+
|
|
19
|
+
### Example
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import {
|
|
23
|
+
Configuration,
|
|
24
|
+
SchemaApi,
|
|
25
|
+
} from '@vaultgig/vaultgig-api-client';
|
|
26
|
+
import type { GetYamlSchemaRequest } from '@vaultgig/vaultgig-api-client';
|
|
27
|
+
|
|
28
|
+
async function example() {
|
|
29
|
+
console.log("🚀 Testing @vaultgig/vaultgig-api-client SDK...");
|
|
30
|
+
const api = new SchemaApi();
|
|
31
|
+
|
|
32
|
+
try {
|
|
33
|
+
const data = await api.getYamlSchema();
|
|
34
|
+
console.log(data);
|
|
35
|
+
} catch (error) {
|
|
36
|
+
console.error(error);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Run the test
|
|
41
|
+
example().catch(console.error);
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Parameters
|
|
45
|
+
|
|
46
|
+
This endpoint does not need any parameter.
|
|
47
|
+
|
|
48
|
+
### Return type
|
|
49
|
+
|
|
50
|
+
**any**
|
|
51
|
+
|
|
52
|
+
### Authorization
|
|
53
|
+
|
|
54
|
+
No authorization required
|
|
55
|
+
|
|
56
|
+
### HTTP request headers
|
|
57
|
+
|
|
58
|
+
- **Content-Type**: Not defined
|
|
59
|
+
- **Accept**: `application/json`
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
### HTTP response details
|
|
63
|
+
| Status code | Description | Response headers |
|
|
64
|
+
|-------------|-------------|------------------|
|
|
65
|
+
| **200** | Successful Response | - |
|
|
66
|
+
|
|
67
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
68
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
# SuccessResponse
|
|
3
|
+
|
|
4
|
+
Success response without data.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`success` | boolean
|
|
11
|
+
`error` | string
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { SuccessResponse } from '@vaultgig/vaultgig-api-client'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"success": null,
|
|
21
|
+
"error": null,
|
|
22
|
+
} satisfies SuccessResponse
|
|
23
|
+
|
|
24
|
+
console.log(example)
|
|
25
|
+
|
|
26
|
+
// Convert the instance to a JSON string
|
|
27
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
28
|
+
console.log(exampleJSON)
|
|
29
|
+
|
|
30
|
+
// Parse the JSON string back to an object
|
|
31
|
+
const exampleParsed = JSON.parse(exampleJSON) as SuccessResponse
|
|
32
|
+
console.log(exampleParsed)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
36
|
+
|
|
37
|
+
|
package/docs/TinType.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
|
|
2
|
+
# TinType
|
|
3
|
+
|
|
4
|
+
TIN type.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { TinType } from '@vaultgig/vaultgig-api-client'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
} satisfies TinType
|
|
19
|
+
|
|
20
|
+
console.log(example)
|
|
21
|
+
|
|
22
|
+
// Convert the instance to a JSON string
|
|
23
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
24
|
+
console.log(exampleJSON)
|
|
25
|
+
|
|
26
|
+
// Parse the JSON string back to an object
|
|
27
|
+
const exampleParsed = JSON.parse(exampleJSON) as TinType
|
|
28
|
+
console.log(exampleParsed)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
32
|
+
|
|
33
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
# ValidationError
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`loc` | [Array<ValidationErrorLocInner>](ValidationErrorLocInner.md)
|
|
10
|
+
`msg` | string
|
|
11
|
+
`type` | string
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { ValidationError } from '@vaultgig/vaultgig-api-client'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"loc": null,
|
|
21
|
+
"msg": null,
|
|
22
|
+
"type": null,
|
|
23
|
+
} satisfies ValidationError
|
|
24
|
+
|
|
25
|
+
console.log(example)
|
|
26
|
+
|
|
27
|
+
// Convert the instance to a JSON string
|
|
28
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
29
|
+
console.log(exampleJSON)
|
|
30
|
+
|
|
31
|
+
// Parse the JSON string back to an object
|
|
32
|
+
const exampleParsed = JSON.parse(exampleJSON) as ValidationError
|
|
33
|
+
console.log(exampleParsed)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
37
|
+
|
|
38
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
|
|
2
|
+
# ValidationErrorLocInner
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import type { ValidationErrorLocInner } from '@vaultgig/vaultgig-api-client'
|
|
14
|
+
|
|
15
|
+
// TODO: Update the object below with actual values
|
|
16
|
+
const example = {
|
|
17
|
+
} satisfies ValidationErrorLocInner
|
|
18
|
+
|
|
19
|
+
console.log(example)
|
|
20
|
+
|
|
21
|
+
// Convert the instance to a JSON string
|
|
22
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
23
|
+
console.log(exampleJSON)
|
|
24
|
+
|
|
25
|
+
// Parse the JSON string back to an object
|
|
26
|
+
const exampleParsed = JSON.parse(exampleJSON) as ValidationErrorLocInner
|
|
27
|
+
console.log(exampleParsed)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
31
|
+
|
|
32
|
+
|
package/package.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vaultgig/vaultgig-api-client",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "OpenAPI client for @vaultgig/vaultgig-api-client",
|
|
5
|
+
"author": "OpenAPI-Generator",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
|
|
9
|
+
},
|
|
10
|
+
"main": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "tsc",
|
|
14
|
+
"prepare": "npm run build"
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"typescript": "^4.0 || ^5.0"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* VaultGig API
|
|
5
|
+
* API for VaultGig contractor management system
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
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
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
ContractorCreatePayload,
|
|
19
|
+
ContractorUpdatePayload,
|
|
20
|
+
HTTPValidationError,
|
|
21
|
+
ResponseContractorCreateData,
|
|
22
|
+
ResponseContractorData,
|
|
23
|
+
ResponsePaginatedResponseContractorResponse,
|
|
24
|
+
SuccessResponse,
|
|
25
|
+
} from '../models/index';
|
|
26
|
+
import {
|
|
27
|
+
ContractorCreatePayloadFromJSON,
|
|
28
|
+
ContractorCreatePayloadToJSON,
|
|
29
|
+
ContractorUpdatePayloadFromJSON,
|
|
30
|
+
ContractorUpdatePayloadToJSON,
|
|
31
|
+
HTTPValidationErrorFromJSON,
|
|
32
|
+
HTTPValidationErrorToJSON,
|
|
33
|
+
ResponseContractorCreateDataFromJSON,
|
|
34
|
+
ResponseContractorCreateDataToJSON,
|
|
35
|
+
ResponseContractorDataFromJSON,
|
|
36
|
+
ResponseContractorDataToJSON,
|
|
37
|
+
ResponsePaginatedResponseContractorResponseFromJSON,
|
|
38
|
+
ResponsePaginatedResponseContractorResponseToJSON,
|
|
39
|
+
SuccessResponseFromJSON,
|
|
40
|
+
SuccessResponseToJSON,
|
|
41
|
+
} from '../models/index';
|
|
42
|
+
|
|
43
|
+
export interface CreateContractorRequest {
|
|
44
|
+
organizationId: string;
|
|
45
|
+
contractorCreatePayload: ContractorCreatePayload;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface GetContractorRequest {
|
|
49
|
+
contractorId: string;
|
|
50
|
+
organizationId: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface GetContractorsRequest {
|
|
54
|
+
organizationId: string;
|
|
55
|
+
limit?: number;
|
|
56
|
+
offset?: number;
|
|
57
|
+
tag?: string | null;
|
|
58
|
+
search?: string | null;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface UpdateContractorRequest {
|
|
62
|
+
contractorId: string;
|
|
63
|
+
organizationId: string;
|
|
64
|
+
contractorUpdatePayload: ContractorUpdatePayload;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
*/
|
|
70
|
+
export class ContractorsApi extends runtime.BaseAPI {
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Create a contractor. Args: organization: The organization to update contractor: The contractor data to update
|
|
74
|
+
* Create Contractor
|
|
75
|
+
*/
|
|
76
|
+
async createContractorRaw(requestParameters: CreateContractorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResponseContractorCreateData>> {
|
|
77
|
+
if (requestParameters['organizationId'] == null) {
|
|
78
|
+
throw new runtime.RequiredError(
|
|
79
|
+
'organizationId',
|
|
80
|
+
'Required parameter "organizationId" was null or undefined when calling createContractor().'
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (requestParameters['contractorCreatePayload'] == null) {
|
|
85
|
+
throw new runtime.RequiredError(
|
|
86
|
+
'contractorCreatePayload',
|
|
87
|
+
'Required parameter "contractorCreatePayload" was null or undefined when calling createContractor().'
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const queryParameters: any = {};
|
|
92
|
+
|
|
93
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
94
|
+
|
|
95
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
let urlPath = `/organization/{organization_id}/contractors`;
|
|
99
|
+
urlPath = urlPath.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
100
|
+
|
|
101
|
+
const response = await this.request({
|
|
102
|
+
path: urlPath,
|
|
103
|
+
method: 'POST',
|
|
104
|
+
headers: headerParameters,
|
|
105
|
+
query: queryParameters,
|
|
106
|
+
body: ContractorCreatePayloadToJSON(requestParameters['contractorCreatePayload']),
|
|
107
|
+
}, initOverrides);
|
|
108
|
+
|
|
109
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ResponseContractorCreateDataFromJSON(jsonValue));
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Create a contractor. Args: organization: The organization to update contractor: The contractor data to update
|
|
114
|
+
* Create Contractor
|
|
115
|
+
*/
|
|
116
|
+
async createContractor(requestParameters: CreateContractorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResponseContractorCreateData> {
|
|
117
|
+
const response = await this.createContractorRaw(requestParameters, initOverrides);
|
|
118
|
+
return await response.value();
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Get a contractor by ID.
|
|
123
|
+
* Get Contractor
|
|
124
|
+
*/
|
|
125
|
+
async getContractorRaw(requestParameters: GetContractorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResponseContractorData>> {
|
|
126
|
+
if (requestParameters['contractorId'] == null) {
|
|
127
|
+
throw new runtime.RequiredError(
|
|
128
|
+
'contractorId',
|
|
129
|
+
'Required parameter "contractorId" was null or undefined when calling getContractor().'
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
if (requestParameters['organizationId'] == null) {
|
|
134
|
+
throw new runtime.RequiredError(
|
|
135
|
+
'organizationId',
|
|
136
|
+
'Required parameter "organizationId" was null or undefined when calling getContractor().'
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
const queryParameters: any = {};
|
|
141
|
+
|
|
142
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
let urlPath = `/organization/{organization_id}/contractors/{contractor_id}`;
|
|
146
|
+
urlPath = urlPath.replace(`{${"contractor_id"}}`, encodeURIComponent(String(requestParameters['contractorId'])));
|
|
147
|
+
urlPath = urlPath.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
148
|
+
|
|
149
|
+
const response = await this.request({
|
|
150
|
+
path: urlPath,
|
|
151
|
+
method: 'GET',
|
|
152
|
+
headers: headerParameters,
|
|
153
|
+
query: queryParameters,
|
|
154
|
+
}, initOverrides);
|
|
155
|
+
|
|
156
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ResponseContractorDataFromJSON(jsonValue));
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Get a contractor by ID.
|
|
161
|
+
* Get Contractor
|
|
162
|
+
*/
|
|
163
|
+
async getContractor(requestParameters: GetContractorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResponseContractorData> {
|
|
164
|
+
const response = await this.getContractorRaw(requestParameters, initOverrides);
|
|
165
|
+
return await response.value();
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Get all contractors for an organization. Args: organization: The organization to get contractors for session: The database session
|
|
170
|
+
* Get Contractors
|
|
171
|
+
*/
|
|
172
|
+
async getContractorsRaw(requestParameters: GetContractorsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResponsePaginatedResponseContractorResponse>> {
|
|
173
|
+
if (requestParameters['organizationId'] == null) {
|
|
174
|
+
throw new runtime.RequiredError(
|
|
175
|
+
'organizationId',
|
|
176
|
+
'Required parameter "organizationId" was null or undefined when calling getContractors().'
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
const queryParameters: any = {};
|
|
181
|
+
|
|
182
|
+
if (requestParameters['limit'] != null) {
|
|
183
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
if (requestParameters['offset'] != null) {
|
|
187
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
if (requestParameters['tag'] != null) {
|
|
191
|
+
queryParameters['tag'] = requestParameters['tag'];
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
if (requestParameters['search'] != null) {
|
|
195
|
+
queryParameters['search'] = requestParameters['search'];
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
let urlPath = `/organization/{organization_id}/contractors`;
|
|
202
|
+
urlPath = urlPath.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
203
|
+
|
|
204
|
+
const response = await this.request({
|
|
205
|
+
path: urlPath,
|
|
206
|
+
method: 'GET',
|
|
207
|
+
headers: headerParameters,
|
|
208
|
+
query: queryParameters,
|
|
209
|
+
}, initOverrides);
|
|
210
|
+
|
|
211
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ResponsePaginatedResponseContractorResponseFromJSON(jsonValue));
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Get all contractors for an organization. Args: organization: The organization to get contractors for session: The database session
|
|
216
|
+
* Get Contractors
|
|
217
|
+
*/
|
|
218
|
+
async getContractors(requestParameters: GetContractorsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResponsePaginatedResponseContractorResponse> {
|
|
219
|
+
const response = await this.getContractorsRaw(requestParameters, initOverrides);
|
|
220
|
+
return await response.value();
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Update a contractor. Args: organization: The organization to update contractor_id: The ID of the contractor to update contractor: The contractor data to update
|
|
225
|
+
* Update Contractor
|
|
226
|
+
*/
|
|
227
|
+
async updateContractorRaw(requestParameters: UpdateContractorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SuccessResponse>> {
|
|
228
|
+
if (requestParameters['contractorId'] == null) {
|
|
229
|
+
throw new runtime.RequiredError(
|
|
230
|
+
'contractorId',
|
|
231
|
+
'Required parameter "contractorId" was null or undefined when calling updateContractor().'
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
if (requestParameters['organizationId'] == null) {
|
|
236
|
+
throw new runtime.RequiredError(
|
|
237
|
+
'organizationId',
|
|
238
|
+
'Required parameter "organizationId" was null or undefined when calling updateContractor().'
|
|
239
|
+
);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
if (requestParameters['contractorUpdatePayload'] == null) {
|
|
243
|
+
throw new runtime.RequiredError(
|
|
244
|
+
'contractorUpdatePayload',
|
|
245
|
+
'Required parameter "contractorUpdatePayload" was null or undefined when calling updateContractor().'
|
|
246
|
+
);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
const queryParameters: any = {};
|
|
250
|
+
|
|
251
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
252
|
+
|
|
253
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
let urlPath = `/organization/{organization_id}/contractors/{contractor_id}`;
|
|
257
|
+
urlPath = urlPath.replace(`{${"contractor_id"}}`, encodeURIComponent(String(requestParameters['contractorId'])));
|
|
258
|
+
urlPath = urlPath.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
259
|
+
|
|
260
|
+
const response = await this.request({
|
|
261
|
+
path: urlPath,
|
|
262
|
+
method: 'PUT',
|
|
263
|
+
headers: headerParameters,
|
|
264
|
+
query: queryParameters,
|
|
265
|
+
body: ContractorUpdatePayloadToJSON(requestParameters['contractorUpdatePayload']),
|
|
266
|
+
}, initOverrides);
|
|
267
|
+
|
|
268
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SuccessResponseFromJSON(jsonValue));
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Update a contractor. Args: organization: The organization to update contractor_id: The ID of the contractor to update contractor: The contractor data to update
|
|
273
|
+
* Update Contractor
|
|
274
|
+
*/
|
|
275
|
+
async updateContractor(requestParameters: UpdateContractorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SuccessResponse> {
|
|
276
|
+
const response = await this.updateContractorRaw(requestParameters, initOverrides);
|
|
277
|
+
return await response.value();
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* VaultGig API
|
|
5
|
+
* API for VaultGig contractor management system
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
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
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
export class SchemaApi extends runtime.BaseAPI {
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Get the YAML representation of the OpenAPI schema. Used by the client SDK builder.
|
|
25
|
+
* Get Yaml Schema
|
|
26
|
+
*/
|
|
27
|
+
async getYamlSchemaRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<any>> {
|
|
28
|
+
const queryParameters: any = {};
|
|
29
|
+
|
|
30
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
let urlPath = `/openapi.yaml`;
|
|
34
|
+
|
|
35
|
+
const response = await this.request({
|
|
36
|
+
path: urlPath,
|
|
37
|
+
method: 'GET',
|
|
38
|
+
headers: headerParameters,
|
|
39
|
+
query: queryParameters,
|
|
40
|
+
}, initOverrides);
|
|
41
|
+
|
|
42
|
+
if (this.isJsonMime(response.headers.get('content-type'))) {
|
|
43
|
+
return new runtime.JSONApiResponse<any>(response);
|
|
44
|
+
} else {
|
|
45
|
+
return new runtime.TextApiResponse(response) as any;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Get the YAML representation of the OpenAPI schema. Used by the client SDK builder.
|
|
51
|
+
* Get Yaml Schema
|
|
52
|
+
*/
|
|
53
|
+
async getYamlSchema(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any> {
|
|
54
|
+
const response = await this.getYamlSchemaRaw(initOverrides);
|
|
55
|
+
return await response.value();
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
}
|