@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,35 @@
|
|
|
1
|
+
|
|
2
|
+
# ContractorData
|
|
3
|
+
|
|
4
|
+
Model representing a contractor response.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`contractor` | [ContractorResponse](ContractorResponse.md)
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { ContractorData } from '@vaultgig/vaultgig-api-client'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"contractor": null,
|
|
20
|
+
} satisfies ContractorData
|
|
21
|
+
|
|
22
|
+
console.log(example)
|
|
23
|
+
|
|
24
|
+
// Convert the instance to a JSON string
|
|
25
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
26
|
+
console.log(exampleJSON)
|
|
27
|
+
|
|
28
|
+
// Parse the JSON string back to an object
|
|
29
|
+
const exampleParsed = JSON.parse(exampleJSON) as ContractorData
|
|
30
|
+
console.log(exampleParsed)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
34
|
+
|
|
35
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
|
|
2
|
+
# ContractorResponse
|
|
3
|
+
|
|
4
|
+
Response model representing a contractor.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`id` | string
|
|
11
|
+
`clerkUserId` | string
|
|
12
|
+
`fullName` | string
|
|
13
|
+
`businessName` | string
|
|
14
|
+
`email` | string
|
|
15
|
+
`phoneNumber` | string
|
|
16
|
+
`status` | [ContractorStatus](ContractorStatus.md)
|
|
17
|
+
`contractorType` | [ContractorType](ContractorType.md)
|
|
18
|
+
`lastPayment` | Date
|
|
19
|
+
`organizationId` | string
|
|
20
|
+
|
|
21
|
+
## Example
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
import type { ContractorResponse } from '@vaultgig/vaultgig-api-client'
|
|
25
|
+
|
|
26
|
+
// TODO: Update the object below with actual values
|
|
27
|
+
const example = {
|
|
28
|
+
"id": null,
|
|
29
|
+
"clerkUserId": null,
|
|
30
|
+
"fullName": null,
|
|
31
|
+
"businessName": null,
|
|
32
|
+
"email": null,
|
|
33
|
+
"phoneNumber": null,
|
|
34
|
+
"status": null,
|
|
35
|
+
"contractorType": null,
|
|
36
|
+
"lastPayment": null,
|
|
37
|
+
"organizationId": null,
|
|
38
|
+
} satisfies ContractorResponse
|
|
39
|
+
|
|
40
|
+
console.log(example)
|
|
41
|
+
|
|
42
|
+
// Convert the instance to a JSON string
|
|
43
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
44
|
+
console.log(exampleJSON)
|
|
45
|
+
|
|
46
|
+
// Parse the JSON string back to an object
|
|
47
|
+
const exampleParsed = JSON.parse(exampleJSON) as ContractorResponse
|
|
48
|
+
console.log(exampleParsed)
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
52
|
+
|
|
53
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
|
|
2
|
+
# ContractorStatus
|
|
3
|
+
|
|
4
|
+
Status of contractor.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { ContractorStatus } from '@vaultgig/vaultgig-api-client'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
} satisfies ContractorStatus
|
|
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 ContractorStatus
|
|
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,33 @@
|
|
|
1
|
+
|
|
2
|
+
# ContractorType
|
|
3
|
+
|
|
4
|
+
Type of contractor.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { ContractorType } from '@vaultgig/vaultgig-api-client'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
} satisfies ContractorType
|
|
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 ContractorType
|
|
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,59 @@
|
|
|
1
|
+
|
|
2
|
+
# ContractorUpdatePayload
|
|
3
|
+
|
|
4
|
+
Model representing contractor data received from the client to update.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`userId` | string
|
|
11
|
+
`name` | string
|
|
12
|
+
`email` | string
|
|
13
|
+
`country` | string
|
|
14
|
+
`phoneNumber` | string
|
|
15
|
+
`taxId` | string
|
|
16
|
+
`tinType` | [TinType](TinType.md)
|
|
17
|
+
`address` | string
|
|
18
|
+
`state` | string
|
|
19
|
+
`zipCode` | string
|
|
20
|
+
`city` | string
|
|
21
|
+
`classificationType` | [BusinessClassification](BusinessClassification.md)
|
|
22
|
+
`businessName` | string
|
|
23
|
+
|
|
24
|
+
## Example
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
import type { ContractorUpdatePayload } from '@vaultgig/vaultgig-api-client'
|
|
28
|
+
|
|
29
|
+
// TODO: Update the object below with actual values
|
|
30
|
+
const example = {
|
|
31
|
+
"userId": null,
|
|
32
|
+
"name": null,
|
|
33
|
+
"email": null,
|
|
34
|
+
"country": null,
|
|
35
|
+
"phoneNumber": null,
|
|
36
|
+
"taxId": null,
|
|
37
|
+
"tinType": null,
|
|
38
|
+
"address": null,
|
|
39
|
+
"state": null,
|
|
40
|
+
"zipCode": null,
|
|
41
|
+
"city": null,
|
|
42
|
+
"classificationType": null,
|
|
43
|
+
"businessName": null,
|
|
44
|
+
} satisfies ContractorUpdatePayload
|
|
45
|
+
|
|
46
|
+
console.log(example)
|
|
47
|
+
|
|
48
|
+
// Convert the instance to a JSON string
|
|
49
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
50
|
+
console.log(exampleJSON)
|
|
51
|
+
|
|
52
|
+
// Parse the JSON string back to an object
|
|
53
|
+
const exampleParsed = JSON.parse(exampleJSON) as ContractorUpdatePayload
|
|
54
|
+
console.log(exampleParsed)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
58
|
+
|
|
59
|
+
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
# ContractorsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
| [**createContractor**](ContractorsApi.md#createcontractor) | **POST** /organization/{organization_id}/contractors | Create Contractor |
|
|
8
|
+
| [**getContractor**](ContractorsApi.md#getcontractor) | **GET** /organization/{organization_id}/contractors/{contractor_id} | Get Contractor |
|
|
9
|
+
| [**getContractors**](ContractorsApi.md#getcontractors) | **GET** /organization/{organization_id}/contractors | Get Contractors |
|
|
10
|
+
| [**updateContractor**](ContractorsApi.md#updatecontractor) | **PUT** /organization/{organization_id}/contractors/{contractor_id} | Update Contractor |
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## createContractor
|
|
15
|
+
|
|
16
|
+
> ResponseContractorCreateData createContractor(organizationId, contractorCreatePayload)
|
|
17
|
+
|
|
18
|
+
Create Contractor
|
|
19
|
+
|
|
20
|
+
Create a contractor. Args: organization: The organization to update contractor: The contractor data to update
|
|
21
|
+
|
|
22
|
+
### Example
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
import {
|
|
26
|
+
Configuration,
|
|
27
|
+
ContractorsApi,
|
|
28
|
+
} from '@vaultgig/vaultgig-api-client';
|
|
29
|
+
import type { CreateContractorRequest } from '@vaultgig/vaultgig-api-client';
|
|
30
|
+
|
|
31
|
+
async function example() {
|
|
32
|
+
console.log("🚀 Testing @vaultgig/vaultgig-api-client SDK...");
|
|
33
|
+
const api = new ContractorsApi();
|
|
34
|
+
|
|
35
|
+
const body = {
|
|
36
|
+
// string
|
|
37
|
+
organizationId: organizationId_example,
|
|
38
|
+
// ContractorCreatePayload
|
|
39
|
+
contractorCreatePayload: ...,
|
|
40
|
+
} satisfies CreateContractorRequest;
|
|
41
|
+
|
|
42
|
+
try {
|
|
43
|
+
const data = await api.createContractor(body);
|
|
44
|
+
console.log(data);
|
|
45
|
+
} catch (error) {
|
|
46
|
+
console.error(error);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Run the test
|
|
51
|
+
example().catch(console.error);
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Parameters
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
| Name | Type | Description | Notes |
|
|
58
|
+
|------------- | ------------- | ------------- | -------------|
|
|
59
|
+
| **organizationId** | `string` | | [Defaults to `undefined`] |
|
|
60
|
+
| **contractorCreatePayload** | [ContractorCreatePayload](ContractorCreatePayload.md) | | |
|
|
61
|
+
|
|
62
|
+
### Return type
|
|
63
|
+
|
|
64
|
+
[**ResponseContractorCreateData**](ResponseContractorCreateData.md)
|
|
65
|
+
|
|
66
|
+
### Authorization
|
|
67
|
+
|
|
68
|
+
No authorization required
|
|
69
|
+
|
|
70
|
+
### HTTP request headers
|
|
71
|
+
|
|
72
|
+
- **Content-Type**: `application/json`
|
|
73
|
+
- **Accept**: `application/json`
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
### HTTP response details
|
|
77
|
+
| Status code | Description | Response headers |
|
|
78
|
+
|-------------|-------------|------------------|
|
|
79
|
+
| **200** | Successful Response | - |
|
|
80
|
+
| **422** | Validation Error | - |
|
|
81
|
+
|
|
82
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
## getContractor
|
|
86
|
+
|
|
87
|
+
> ResponseContractorData getContractor(contractorId, organizationId)
|
|
88
|
+
|
|
89
|
+
Get Contractor
|
|
90
|
+
|
|
91
|
+
Get a contractor by ID.
|
|
92
|
+
|
|
93
|
+
### Example
|
|
94
|
+
|
|
95
|
+
```ts
|
|
96
|
+
import {
|
|
97
|
+
Configuration,
|
|
98
|
+
ContractorsApi,
|
|
99
|
+
} from '@vaultgig/vaultgig-api-client';
|
|
100
|
+
import type { GetContractorRequest } from '@vaultgig/vaultgig-api-client';
|
|
101
|
+
|
|
102
|
+
async function example() {
|
|
103
|
+
console.log("🚀 Testing @vaultgig/vaultgig-api-client SDK...");
|
|
104
|
+
const api = new ContractorsApi();
|
|
105
|
+
|
|
106
|
+
const body = {
|
|
107
|
+
// string
|
|
108
|
+
contractorId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
109
|
+
// string
|
|
110
|
+
organizationId: organizationId_example,
|
|
111
|
+
} satisfies GetContractorRequest;
|
|
112
|
+
|
|
113
|
+
try {
|
|
114
|
+
const data = await api.getContractor(body);
|
|
115
|
+
console.log(data);
|
|
116
|
+
} catch (error) {
|
|
117
|
+
console.error(error);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// Run the test
|
|
122
|
+
example().catch(console.error);
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Parameters
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
| Name | Type | Description | Notes |
|
|
129
|
+
|------------- | ------------- | ------------- | -------------|
|
|
130
|
+
| **contractorId** | `string` | | [Defaults to `undefined`] |
|
|
131
|
+
| **organizationId** | `string` | | [Defaults to `undefined`] |
|
|
132
|
+
|
|
133
|
+
### Return type
|
|
134
|
+
|
|
135
|
+
[**ResponseContractorData**](ResponseContractorData.md)
|
|
136
|
+
|
|
137
|
+
### Authorization
|
|
138
|
+
|
|
139
|
+
No authorization required
|
|
140
|
+
|
|
141
|
+
### HTTP request headers
|
|
142
|
+
|
|
143
|
+
- **Content-Type**: Not defined
|
|
144
|
+
- **Accept**: `application/json`
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
### HTTP response details
|
|
148
|
+
| Status code | Description | Response headers |
|
|
149
|
+
|-------------|-------------|------------------|
|
|
150
|
+
| **200** | Successful Response | - |
|
|
151
|
+
| **422** | Validation Error | - |
|
|
152
|
+
|
|
153
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
## getContractors
|
|
157
|
+
|
|
158
|
+
> ResponsePaginatedResponseContractorResponse getContractors(organizationId, limit, offset, tag, search)
|
|
159
|
+
|
|
160
|
+
Get Contractors
|
|
161
|
+
|
|
162
|
+
Get all contractors for an organization. Args: organization: The organization to get contractors for session: The database session
|
|
163
|
+
|
|
164
|
+
### Example
|
|
165
|
+
|
|
166
|
+
```ts
|
|
167
|
+
import {
|
|
168
|
+
Configuration,
|
|
169
|
+
ContractorsApi,
|
|
170
|
+
} from '@vaultgig/vaultgig-api-client';
|
|
171
|
+
import type { GetContractorsRequest } from '@vaultgig/vaultgig-api-client';
|
|
172
|
+
|
|
173
|
+
async function example() {
|
|
174
|
+
console.log("🚀 Testing @vaultgig/vaultgig-api-client SDK...");
|
|
175
|
+
const api = new ContractorsApi();
|
|
176
|
+
|
|
177
|
+
const body = {
|
|
178
|
+
// string
|
|
179
|
+
organizationId: organizationId_example,
|
|
180
|
+
// number (optional)
|
|
181
|
+
limit: 56,
|
|
182
|
+
// number (optional)
|
|
183
|
+
offset: 56,
|
|
184
|
+
// string | Filter contractors by tag (optional)
|
|
185
|
+
tag: tag_example,
|
|
186
|
+
// string | Search contractors by full name (optional)
|
|
187
|
+
search: search_example,
|
|
188
|
+
} satisfies GetContractorsRequest;
|
|
189
|
+
|
|
190
|
+
try {
|
|
191
|
+
const data = await api.getContractors(body);
|
|
192
|
+
console.log(data);
|
|
193
|
+
} catch (error) {
|
|
194
|
+
console.error(error);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// Run the test
|
|
199
|
+
example().catch(console.error);
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Parameters
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
| Name | Type | Description | Notes |
|
|
206
|
+
|------------- | ------------- | ------------- | -------------|
|
|
207
|
+
| **organizationId** | `string` | | [Defaults to `undefined`] |
|
|
208
|
+
| **limit** | `number` | | [Optional] [Defaults to `20`] |
|
|
209
|
+
| **offset** | `number` | | [Optional] [Defaults to `0`] |
|
|
210
|
+
| **tag** | `string` | Filter contractors by tag | [Optional] [Defaults to `undefined`] |
|
|
211
|
+
| **search** | `string` | Search contractors by full name | [Optional] [Defaults to `undefined`] |
|
|
212
|
+
|
|
213
|
+
### Return type
|
|
214
|
+
|
|
215
|
+
[**ResponsePaginatedResponseContractorResponse**](ResponsePaginatedResponseContractorResponse.md)
|
|
216
|
+
|
|
217
|
+
### Authorization
|
|
218
|
+
|
|
219
|
+
No authorization required
|
|
220
|
+
|
|
221
|
+
### HTTP request headers
|
|
222
|
+
|
|
223
|
+
- **Content-Type**: Not defined
|
|
224
|
+
- **Accept**: `application/json`
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
### HTTP response details
|
|
228
|
+
| Status code | Description | Response headers |
|
|
229
|
+
|-------------|-------------|------------------|
|
|
230
|
+
| **200** | Successful Response | - |
|
|
231
|
+
| **422** | Validation Error | - |
|
|
232
|
+
|
|
233
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
## updateContractor
|
|
237
|
+
|
|
238
|
+
> SuccessResponse updateContractor(contractorId, organizationId, contractorUpdatePayload)
|
|
239
|
+
|
|
240
|
+
Update Contractor
|
|
241
|
+
|
|
242
|
+
Update a contractor. Args: organization: The organization to update contractor_id: The ID of the contractor to update contractor: The contractor data to update
|
|
243
|
+
|
|
244
|
+
### Example
|
|
245
|
+
|
|
246
|
+
```ts
|
|
247
|
+
import {
|
|
248
|
+
Configuration,
|
|
249
|
+
ContractorsApi,
|
|
250
|
+
} from '@vaultgig/vaultgig-api-client';
|
|
251
|
+
import type { UpdateContractorRequest } from '@vaultgig/vaultgig-api-client';
|
|
252
|
+
|
|
253
|
+
async function example() {
|
|
254
|
+
console.log("🚀 Testing @vaultgig/vaultgig-api-client SDK...");
|
|
255
|
+
const api = new ContractorsApi();
|
|
256
|
+
|
|
257
|
+
const body = {
|
|
258
|
+
// string
|
|
259
|
+
contractorId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
260
|
+
// string
|
|
261
|
+
organizationId: organizationId_example,
|
|
262
|
+
// ContractorUpdatePayload
|
|
263
|
+
contractorUpdatePayload: ...,
|
|
264
|
+
} satisfies UpdateContractorRequest;
|
|
265
|
+
|
|
266
|
+
try {
|
|
267
|
+
const data = await api.updateContractor(body);
|
|
268
|
+
console.log(data);
|
|
269
|
+
} catch (error) {
|
|
270
|
+
console.error(error);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
// Run the test
|
|
275
|
+
example().catch(console.error);
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
### Parameters
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
| Name | Type | Description | Notes |
|
|
282
|
+
|------------- | ------------- | ------------- | -------------|
|
|
283
|
+
| **contractorId** | `string` | | [Defaults to `undefined`] |
|
|
284
|
+
| **organizationId** | `string` | | [Defaults to `undefined`] |
|
|
285
|
+
| **contractorUpdatePayload** | [ContractorUpdatePayload](ContractorUpdatePayload.md) | | |
|
|
286
|
+
|
|
287
|
+
### Return type
|
|
288
|
+
|
|
289
|
+
[**SuccessResponse**](SuccessResponse.md)
|
|
290
|
+
|
|
291
|
+
### Authorization
|
|
292
|
+
|
|
293
|
+
No authorization required
|
|
294
|
+
|
|
295
|
+
### HTTP request headers
|
|
296
|
+
|
|
297
|
+
- **Content-Type**: `application/json`
|
|
298
|
+
- **Accept**: `application/json`
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
### HTTP response details
|
|
302
|
+
| Status code | Description | Response headers |
|
|
303
|
+
|-------------|-------------|------------------|
|
|
304
|
+
| **200** | Successful Response | - |
|
|
305
|
+
| **422** | Validation Error | - |
|
|
306
|
+
|
|
307
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
308
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# HTTPValidationError
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`detail` | [Array<ValidationError>](ValidationError.md)
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { HTTPValidationError } from '@vaultgig/vaultgig-api-client'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"detail": null,
|
|
19
|
+
} satisfies HTTPValidationError
|
|
20
|
+
|
|
21
|
+
console.log(example)
|
|
22
|
+
|
|
23
|
+
// Convert the instance to a JSON string
|
|
24
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
25
|
+
console.log(exampleJSON)
|
|
26
|
+
|
|
27
|
+
// Parse the JSON string back to an object
|
|
28
|
+
const exampleParsed = JSON.parse(exampleJSON) as HTTPValidationError
|
|
29
|
+
console.log(exampleParsed)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
33
|
+
|
|
34
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
|
|
2
|
+
# PaginatedResponseContractorResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`success` | boolean
|
|
10
|
+
`data` | [Array<ContractorResponse>](ContractorResponse.md)
|
|
11
|
+
`error` | string
|
|
12
|
+
`meta` | [PaginationMeta](PaginationMeta.md)
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { PaginatedResponseContractorResponse } from '@vaultgig/vaultgig-api-client'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"success": null,
|
|
22
|
+
"data": null,
|
|
23
|
+
"error": null,
|
|
24
|
+
"meta": null,
|
|
25
|
+
} satisfies PaginatedResponseContractorResponse
|
|
26
|
+
|
|
27
|
+
console.log(example)
|
|
28
|
+
|
|
29
|
+
// Convert the instance to a JSON string
|
|
30
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
31
|
+
console.log(exampleJSON)
|
|
32
|
+
|
|
33
|
+
// Parse the JSON string back to an object
|
|
34
|
+
const exampleParsed = JSON.parse(exampleJSON) as PaginatedResponseContractorResponse
|
|
35
|
+
console.log(exampleParsed)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
39
|
+
|
|
40
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
|
|
2
|
+
# PaginationMeta
|
|
3
|
+
|
|
4
|
+
Pagination metadata model.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`offset` | number
|
|
11
|
+
`limit` | number
|
|
12
|
+
`total` | number
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { PaginationMeta } from '@vaultgig/vaultgig-api-client'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"offset": null,
|
|
22
|
+
"limit": null,
|
|
23
|
+
"total": null,
|
|
24
|
+
} satisfies PaginationMeta
|
|
25
|
+
|
|
26
|
+
console.log(example)
|
|
27
|
+
|
|
28
|
+
// Convert the instance to a JSON string
|
|
29
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
30
|
+
console.log(exampleJSON)
|
|
31
|
+
|
|
32
|
+
// Parse the JSON string back to an object
|
|
33
|
+
const exampleParsed = JSON.parse(exampleJSON) as PaginationMeta
|
|
34
|
+
console.log(exampleParsed)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
38
|
+
|
|
39
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
# ResponseContractorCreateData
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`success` | boolean
|
|
10
|
+
`data` | [ContractorCreateData](ContractorCreateData.md)
|
|
11
|
+
`error` | string
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { ResponseContractorCreateData } 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 ResponseContractorCreateData
|
|
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 ResponseContractorCreateData
|
|
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
|
+
|