blanche-client-sdk 0.2.0 → 0.3.0
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 +26 -0
- package/README.md +18 -2
- package/dist/apis/TemplatesApi.d.ts +63 -0
- package/dist/apis/TemplatesApi.js +265 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/models/ApiV1TemplatesGet200Response.d.ts +39 -0
- package/dist/models/ApiV1TemplatesGet200Response.js +56 -0
- package/dist/models/ApiV1TemplatesGet200ResponseTemplatesInner.d.ts +93 -0
- package/dist/models/ApiV1TemplatesGet200ResponseTemplatesInner.js +74 -0
- package/dist/models/ApiV1TemplatesGet200ResponseTemplatesInnerActiveSchema.d.ts +38 -0
- package/dist/models/ApiV1TemplatesGet200ResponseTemplatesInnerActiveSchema.js +51 -0
- package/dist/models/ApiV1TemplatesIdGet200Response.d.ts +69 -0
- package/dist/models/ApiV1TemplatesIdGet200Response.js +76 -0
- package/dist/models/ApiV1TemplatesIdGet200ResponseSchemasInner.d.ts +62 -0
- package/dist/models/ApiV1TemplatesIdGet200ResponseSchemasInner.js +69 -0
- package/dist/models/ApiV1TemplatesIdGet404Response.d.ts +32 -0
- package/dist/models/ApiV1TemplatesIdGet404Response.js +51 -0
- package/dist/models/ApiV1TemplatesIdPatchRequest.d.ts +33 -0
- package/dist/models/ApiV1TemplatesIdPatchRequest.js +52 -0
- package/dist/models/ApiV1TemplatesIdPatchRequestTemplate.d.ts +38 -0
- package/dist/models/ApiV1TemplatesIdPatchRequestTemplate.js +51 -0
- package/dist/models/ApiV1TemplatesPost201Response.d.ts +44 -0
- package/dist/models/ApiV1TemplatesPost201Response.js +59 -0
- package/dist/models/ApiV1TemplatesPost422Response.d.ts +32 -0
- package/dist/models/ApiV1TemplatesPost422Response.js +51 -0
- package/dist/models/ApiV1TemplatesPostRequest.d.ts +33 -0
- package/dist/models/ApiV1TemplatesPostRequest.js +52 -0
- package/dist/models/ApiV1TemplatesPostRequestTemplate.d.ts +38 -0
- package/dist/models/ApiV1TemplatesPostRequestTemplate.js +53 -0
- package/dist/models/index.d.ts +12 -0
- package/dist/models/index.js +12 -0
- package/docs/ApiV1TemplatesGet200Response.md +36 -0
- package/docs/ApiV1TemplatesGet200ResponseTemplatesInner.md +54 -0
- package/docs/ApiV1TemplatesGet200ResponseTemplatesInnerActiveSchema.md +36 -0
- package/docs/ApiV1TemplatesIdGet200Response.md +46 -0
- package/docs/ApiV1TemplatesIdGet200ResponseSchemasInner.md +44 -0
- package/docs/ApiV1TemplatesIdGet404Response.md +34 -0
- package/docs/ApiV1TemplatesIdPatchRequest.md +34 -0
- package/docs/ApiV1TemplatesIdPatchRequestTemplate.md +36 -0
- package/docs/ApiV1TemplatesPost201Response.md +38 -0
- package/docs/ApiV1TemplatesPost422Response.md +34 -0
- package/docs/ApiV1TemplatesPostRequest.md +34 -0
- package/docs/ApiV1TemplatesPostRequestTemplate.md +36 -0
- package/docs/TemplatesApi.md +279 -0
- package/package.json +1 -1
- package/src/apis/TemplatesApi.ts +207 -0
- package/src/apis/index.ts +1 -0
- package/src/models/ApiV1TemplatesGet200Response.ts +83 -0
- package/src/models/ApiV1TemplatesGet200ResponseTemplatesInner.ts +155 -0
- package/src/models/ApiV1TemplatesGet200ResponseTemplatesInnerActiveSchema.ts +73 -0
- package/src/models/ApiV1TemplatesIdGet200Response.ts +128 -0
- package/src/models/ApiV1TemplatesIdGet200ResponseSchemasInner.ts +110 -0
- package/src/models/ApiV1TemplatesIdGet404Response.ts +66 -0
- package/src/models/ApiV1TemplatesIdPatchRequest.ts +74 -0
- package/src/models/ApiV1TemplatesIdPatchRequestTemplate.ts +73 -0
- package/src/models/ApiV1TemplatesPost201Response.ts +84 -0
- package/src/models/ApiV1TemplatesPost422Response.ts +66 -0
- package/src/models/ApiV1TemplatesPostRequest.ts +74 -0
- package/src/models/ApiV1TemplatesPostRequestTemplate.ts +74 -0
- package/src/models/index.ts +12 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# ApiV1TemplatesIdGet404Response
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`error` | string
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { ApiV1TemplatesIdGet404Response } from 'blanche-client-sdk'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"error": null,
|
|
19
|
+
} satisfies ApiV1TemplatesIdGet404Response
|
|
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 ApiV1TemplatesIdGet404Response
|
|
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,34 @@
|
|
|
1
|
+
|
|
2
|
+
# ApiV1TemplatesIdPatchRequest
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`template` | [ApiV1TemplatesIdPatchRequestTemplate](ApiV1TemplatesIdPatchRequestTemplate.md)
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { ApiV1TemplatesIdPatchRequest } from 'blanche-client-sdk'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"template": null,
|
|
19
|
+
} satisfies ApiV1TemplatesIdPatchRequest
|
|
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 ApiV1TemplatesIdPatchRequest
|
|
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,36 @@
|
|
|
1
|
+
|
|
2
|
+
# ApiV1TemplatesIdPatchRequestTemplate
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`name` | string
|
|
10
|
+
`visible` | boolean
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { ApiV1TemplatesIdPatchRequestTemplate } from 'blanche-client-sdk'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"name": null,
|
|
20
|
+
"visible": null,
|
|
21
|
+
} satisfies ApiV1TemplatesIdPatchRequestTemplate
|
|
22
|
+
|
|
23
|
+
console.log(example)
|
|
24
|
+
|
|
25
|
+
// Convert the instance to a JSON string
|
|
26
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
+
console.log(exampleJSON)
|
|
28
|
+
|
|
29
|
+
// Parse the JSON string back to an object
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as ApiV1TemplatesIdPatchRequestTemplate
|
|
31
|
+
console.log(exampleParsed)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
|
+
|
|
36
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
# ApiV1TemplatesPost201Response
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`id` | string
|
|
10
|
+
`name` | string
|
|
11
|
+
`message` | string
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { ApiV1TemplatesPost201Response } from 'blanche-client-sdk'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"id": null,
|
|
21
|
+
"name": null,
|
|
22
|
+
"message": null,
|
|
23
|
+
} satisfies ApiV1TemplatesPost201Response
|
|
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 ApiV1TemplatesPost201Response
|
|
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,34 @@
|
|
|
1
|
+
|
|
2
|
+
# ApiV1TemplatesPost422Response
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`errors` | Array<string>
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { ApiV1TemplatesPost422Response } from 'blanche-client-sdk'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"errors": null,
|
|
19
|
+
} satisfies ApiV1TemplatesPost422Response
|
|
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 ApiV1TemplatesPost422Response
|
|
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,34 @@
|
|
|
1
|
+
|
|
2
|
+
# ApiV1TemplatesPostRequest
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`template` | [ApiV1TemplatesPostRequestTemplate](ApiV1TemplatesPostRequestTemplate.md)
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { ApiV1TemplatesPostRequest } from 'blanche-client-sdk'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"template": null,
|
|
19
|
+
} satisfies ApiV1TemplatesPostRequest
|
|
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 ApiV1TemplatesPostRequest
|
|
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,36 @@
|
|
|
1
|
+
|
|
2
|
+
# ApiV1TemplatesPostRequestTemplate
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`name` | string
|
|
10
|
+
`visible` | boolean
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { ApiV1TemplatesPostRequestTemplate } from 'blanche-client-sdk'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"name": null,
|
|
20
|
+
"visible": null,
|
|
21
|
+
} satisfies ApiV1TemplatesPostRequestTemplate
|
|
22
|
+
|
|
23
|
+
console.log(example)
|
|
24
|
+
|
|
25
|
+
// Convert the instance to a JSON string
|
|
26
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
+
console.log(exampleJSON)
|
|
28
|
+
|
|
29
|
+
// Parse the JSON string back to an object
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as ApiV1TemplatesPostRequestTemplate
|
|
31
|
+
console.log(exampleParsed)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
|
+
|
|
36
|
+
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
# TemplatesApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost:3000*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
| [**apiV1TemplatesGet**](TemplatesApi.md#apiv1templatesget) | **GET** /api/v1/templates | List templates |
|
|
8
|
+
| [**apiV1TemplatesIdGet**](TemplatesApi.md#apiv1templatesidget) | **GET** /api/v1/templates/{id} | Get template |
|
|
9
|
+
| [**apiV1TemplatesIdPatch**](TemplatesApi.md#apiv1templatesidpatchoperation) | **PATCH** /api/v1/templates/{id} | Update template |
|
|
10
|
+
| [**apiV1TemplatesPost**](TemplatesApi.md#apiv1templatespostoperation) | **POST** /api/v1/templates | Create template |
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## apiV1TemplatesGet
|
|
15
|
+
|
|
16
|
+
> ApiV1TemplatesGet200Response apiV1TemplatesGet(format)
|
|
17
|
+
|
|
18
|
+
List templates
|
|
19
|
+
|
|
20
|
+
### Example
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
import {
|
|
24
|
+
Configuration,
|
|
25
|
+
TemplatesApi,
|
|
26
|
+
} from 'blanche-client-sdk';
|
|
27
|
+
import type { ApiV1TemplatesGetRequest } from 'blanche-client-sdk';
|
|
28
|
+
|
|
29
|
+
async function example() {
|
|
30
|
+
console.log("🚀 Testing blanche-client-sdk SDK...");
|
|
31
|
+
const api = new TemplatesApi();
|
|
32
|
+
|
|
33
|
+
const body = {
|
|
34
|
+
// string | Use \'system_prompt\' to return prompt format (optional)
|
|
35
|
+
format: format_example,
|
|
36
|
+
} satisfies ApiV1TemplatesGetRequest;
|
|
37
|
+
|
|
38
|
+
try {
|
|
39
|
+
const data = await api.apiV1TemplatesGet(body);
|
|
40
|
+
console.log(data);
|
|
41
|
+
} catch (error) {
|
|
42
|
+
console.error(error);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Run the test
|
|
47
|
+
example().catch(console.error);
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Parameters
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
| Name | Type | Description | Notes |
|
|
54
|
+
|------------- | ------------- | ------------- | -------------|
|
|
55
|
+
| **format** | `string` | Use \'system_prompt\' to return prompt format | [Optional] [Defaults to `undefined`] |
|
|
56
|
+
|
|
57
|
+
### Return type
|
|
58
|
+
|
|
59
|
+
[**ApiV1TemplatesGet200Response**](ApiV1TemplatesGet200Response.md)
|
|
60
|
+
|
|
61
|
+
### Authorization
|
|
62
|
+
|
|
63
|
+
No authorization required
|
|
64
|
+
|
|
65
|
+
### HTTP request headers
|
|
66
|
+
|
|
67
|
+
- **Content-Type**: Not defined
|
|
68
|
+
- **Accept**: `application/json`
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
### HTTP response details
|
|
72
|
+
| Status code | Description | Response headers |
|
|
73
|
+
|-------------|-------------|------------------|
|
|
74
|
+
| **200** | system prompt returned | - |
|
|
75
|
+
|
|
76
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
## apiV1TemplatesIdGet
|
|
80
|
+
|
|
81
|
+
> ApiV1TemplatesIdGet200Response apiV1TemplatesIdGet(id)
|
|
82
|
+
|
|
83
|
+
Get template
|
|
84
|
+
|
|
85
|
+
### Example
|
|
86
|
+
|
|
87
|
+
```ts
|
|
88
|
+
import {
|
|
89
|
+
Configuration,
|
|
90
|
+
TemplatesApi,
|
|
91
|
+
} from 'blanche-client-sdk';
|
|
92
|
+
import type { ApiV1TemplatesIdGetRequest } from 'blanche-client-sdk';
|
|
93
|
+
|
|
94
|
+
async function example() {
|
|
95
|
+
console.log("🚀 Testing blanche-client-sdk SDK...");
|
|
96
|
+
const api = new TemplatesApi();
|
|
97
|
+
|
|
98
|
+
const body = {
|
|
99
|
+
// string | Template ID
|
|
100
|
+
id: id_example,
|
|
101
|
+
} satisfies ApiV1TemplatesIdGetRequest;
|
|
102
|
+
|
|
103
|
+
try {
|
|
104
|
+
const data = await api.apiV1TemplatesIdGet(body);
|
|
105
|
+
console.log(data);
|
|
106
|
+
} catch (error) {
|
|
107
|
+
console.error(error);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// Run the test
|
|
112
|
+
example().catch(console.error);
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Parameters
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
| Name | Type | Description | Notes |
|
|
119
|
+
|------------- | ------------- | ------------- | -------------|
|
|
120
|
+
| **id** | `string` | Template ID | [Defaults to `undefined`] |
|
|
121
|
+
|
|
122
|
+
### Return type
|
|
123
|
+
|
|
124
|
+
[**ApiV1TemplatesIdGet200Response**](ApiV1TemplatesIdGet200Response.md)
|
|
125
|
+
|
|
126
|
+
### Authorization
|
|
127
|
+
|
|
128
|
+
No authorization required
|
|
129
|
+
|
|
130
|
+
### HTTP request headers
|
|
131
|
+
|
|
132
|
+
- **Content-Type**: Not defined
|
|
133
|
+
- **Accept**: `application/json`
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
### HTTP response details
|
|
137
|
+
| Status code | Description | Response headers |
|
|
138
|
+
|-------------|-------------|------------------|
|
|
139
|
+
| **200** | template returned | - |
|
|
140
|
+
| **404** | not found | - |
|
|
141
|
+
|
|
142
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
## apiV1TemplatesIdPatch
|
|
146
|
+
|
|
147
|
+
> ApiV1TemplatesPost201Response apiV1TemplatesIdPatch(id, apiV1TemplatesIdPatchRequest)
|
|
148
|
+
|
|
149
|
+
Update template
|
|
150
|
+
|
|
151
|
+
### Example
|
|
152
|
+
|
|
153
|
+
```ts
|
|
154
|
+
import {
|
|
155
|
+
Configuration,
|
|
156
|
+
TemplatesApi,
|
|
157
|
+
} from 'blanche-client-sdk';
|
|
158
|
+
import type { ApiV1TemplatesIdPatchOperationRequest } from 'blanche-client-sdk';
|
|
159
|
+
|
|
160
|
+
async function example() {
|
|
161
|
+
console.log("🚀 Testing blanche-client-sdk SDK...");
|
|
162
|
+
const api = new TemplatesApi();
|
|
163
|
+
|
|
164
|
+
const body = {
|
|
165
|
+
// string | Template ID
|
|
166
|
+
id: id_example,
|
|
167
|
+
// ApiV1TemplatesIdPatchRequest (optional)
|
|
168
|
+
apiV1TemplatesIdPatchRequest: ...,
|
|
169
|
+
} satisfies ApiV1TemplatesIdPatchOperationRequest;
|
|
170
|
+
|
|
171
|
+
try {
|
|
172
|
+
const data = await api.apiV1TemplatesIdPatch(body);
|
|
173
|
+
console.log(data);
|
|
174
|
+
} catch (error) {
|
|
175
|
+
console.error(error);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// Run the test
|
|
180
|
+
example().catch(console.error);
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### Parameters
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
| Name | Type | Description | Notes |
|
|
187
|
+
|------------- | ------------- | ------------- | -------------|
|
|
188
|
+
| **id** | `string` | Template ID | [Defaults to `undefined`] |
|
|
189
|
+
| **apiV1TemplatesIdPatchRequest** | [ApiV1TemplatesIdPatchRequest](ApiV1TemplatesIdPatchRequest.md) | | [Optional] |
|
|
190
|
+
|
|
191
|
+
### Return type
|
|
192
|
+
|
|
193
|
+
[**ApiV1TemplatesPost201Response**](ApiV1TemplatesPost201Response.md)
|
|
194
|
+
|
|
195
|
+
### Authorization
|
|
196
|
+
|
|
197
|
+
No authorization required
|
|
198
|
+
|
|
199
|
+
### HTTP request headers
|
|
200
|
+
|
|
201
|
+
- **Content-Type**: `application/json`
|
|
202
|
+
- **Accept**: `application/json`
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
### HTTP response details
|
|
206
|
+
| Status code | Description | Response headers |
|
|
207
|
+
|-------------|-------------|------------------|
|
|
208
|
+
| **200** | template updated | - |
|
|
209
|
+
| **404** | not found | - |
|
|
210
|
+
| **422** | invalid request | - |
|
|
211
|
+
|
|
212
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
## apiV1TemplatesPost
|
|
216
|
+
|
|
217
|
+
> ApiV1TemplatesPost201Response apiV1TemplatesPost(apiV1TemplatesPostRequest)
|
|
218
|
+
|
|
219
|
+
Create template
|
|
220
|
+
|
|
221
|
+
### Example
|
|
222
|
+
|
|
223
|
+
```ts
|
|
224
|
+
import {
|
|
225
|
+
Configuration,
|
|
226
|
+
TemplatesApi,
|
|
227
|
+
} from 'blanche-client-sdk';
|
|
228
|
+
import type { ApiV1TemplatesPostOperationRequest } from 'blanche-client-sdk';
|
|
229
|
+
|
|
230
|
+
async function example() {
|
|
231
|
+
console.log("🚀 Testing blanche-client-sdk SDK...");
|
|
232
|
+
const api = new TemplatesApi();
|
|
233
|
+
|
|
234
|
+
const body = {
|
|
235
|
+
// ApiV1TemplatesPostRequest (optional)
|
|
236
|
+
apiV1TemplatesPostRequest: ...,
|
|
237
|
+
} satisfies ApiV1TemplatesPostOperationRequest;
|
|
238
|
+
|
|
239
|
+
try {
|
|
240
|
+
const data = await api.apiV1TemplatesPost(body);
|
|
241
|
+
console.log(data);
|
|
242
|
+
} catch (error) {
|
|
243
|
+
console.error(error);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
// Run the test
|
|
248
|
+
example().catch(console.error);
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### Parameters
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
| Name | Type | Description | Notes |
|
|
255
|
+
|------------- | ------------- | ------------- | -------------|
|
|
256
|
+
| **apiV1TemplatesPostRequest** | [ApiV1TemplatesPostRequest](ApiV1TemplatesPostRequest.md) | | [Optional] |
|
|
257
|
+
|
|
258
|
+
### Return type
|
|
259
|
+
|
|
260
|
+
[**ApiV1TemplatesPost201Response**](ApiV1TemplatesPost201Response.md)
|
|
261
|
+
|
|
262
|
+
### Authorization
|
|
263
|
+
|
|
264
|
+
No authorization required
|
|
265
|
+
|
|
266
|
+
### HTTP request headers
|
|
267
|
+
|
|
268
|
+
- **Content-Type**: `application/json`
|
|
269
|
+
- **Accept**: `application/json`
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
### HTTP response details
|
|
273
|
+
| Status code | Description | Response headers |
|
|
274
|
+
|-------------|-------------|------------------|
|
|
275
|
+
| **201** | template created | - |
|
|
276
|
+
| **422** | invalid request | - |
|
|
277
|
+
|
|
278
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
279
|
+
|