TemplateVariablesApi
All URIs are relative to /api
| Method | HTTP request | Description |
|---|---|---|
| create | POST /template-variables | Create a variable |
| destroy | DELETE /template-variables/{lookup} | Delete a variable |
| list | GET /template-variables | List template variables |
| replace | PUT /template-variables/{lookup} | Replace a variable |
| retrieve | GET /template-variables/{lookup} | Get a variable |
| update | PATCH /template-variables/{lookup} | Update a variable |
create
TemplateVariable create(createTemplateVariableDto, limit, offset, order, filter, or, expand)
Create a variable
Create a new template variable (Admin only)
Example
import {
Configuration,
TemplateVariablesApi,
} from '@pdf-generator/client';
import type { CreateRequest } from '@pdf-generator/client';
async function example() {
console.log("🚀 Testing @pdf-generator/client SDK...");
const config = new Configuration({
// To configure API key authorization: api-key
apiKey: "YOUR API KEY",
});
const api = new TemplateVariablesApi(config);
const body = {
// CreateTemplateVariableDto
createTemplateVariableDto: ...,
// number (optional)
limit: 8.14,
// number (optional)
offset: 8.14,
// Array<string> (optional)
order: ...,
// Array<string> (optional)
filter: ...,
// Array<string> (optional)
or: ...,
// Array<string> (optional)
expand: ...,
} satisfies CreateRequest;
try {
const data = await api.create(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| createTemplateVariableDto | CreateTemplateVariableDto | ||
| limit | number | [Optional] [Defaults to undefined] | |
| offset | number | [Optional] [Defaults to undefined] | |
| order | Array<string> | [Optional] | |
| filter | Array<string> | [Optional] | |
| or | Array<string> | [Optional] | |
| expand | Array<string> | [Optional] |
Return type
Authorization
HTTP request headers
- Content-Type:
application/json - Accept:
application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 2XX | Create new TemplateVariable | - |
| 4XX | - | |
| 5XX | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
destroy
destroy(lookup)
Delete a variable
Delete a template variable (Admin only)
Example
import {
Configuration,
TemplateVariablesApi,
} from '@pdf-generator/client';
import type { DestroyRequest } from '@pdf-generator/client';
async function example() {
console.log("🚀 Testing @pdf-generator/client SDK...");
const config = new Configuration({
// To configure API key authorization: api-key
apiKey: "YOUR API KEY",
});
const api = new TemplateVariablesApi(config);
const body = {
// number
lookup: 8.14,
} satisfies DestroyRequest;
try {
const data = await api.destroy(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| lookup | number | [Defaults to undefined] |
Return type
void (Empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept:
application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 2XX | Delete TemplateVariable by id | - |
| 4XX | - | |
| 5XX | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list
TemplateVariableListResponseDto list(limit, offset, order, filter, or, expand)
List template variables
List variables, optionally filter by template
Example
import {
Configuration,
TemplateVariablesApi,
} from '@pdf-generator/client';
import type { ListRequest } from '@pdf-generator/client';
async function example() {
console.log("🚀 Testing @pdf-generator/client SDK...");
const config = new Configuration({
// To configure API key authorization: api-key
apiKey: "YOUR API KEY",
});
const api = new TemplateVariablesApi(config);
const body = {
// number (optional)
limit: 8.14,
// number (optional)
offset: 8.14,
// Array<string> (optional)
order: ...,
// Array<string> (optional)
filter: ...,
// Array<string> (optional)
or: ...,
// Array<string> (optional)
expand: ...,
} satisfies ListRequest;
try {
const data = await api.list(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| limit | number | [Optional] [Defaults to undefined] | |
| offset | number | [Optional] [Defaults to undefined] | |
| order | Array<string> | [Optional] | |
| filter | Array<string> | [Optional] | |
| or | Array<string> | [Optional] | |
| expand | Array<string> | [Optional] |
Return type
TemplateVariableListResponseDto
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept:
application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 2XX | Returns a list of TemplateVariable | - |
| 4XX | - | |
| 5XX | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
replace
TemplateVariable replace(lookup, createTemplateVariableDto, limit, offset, order, filter, or, expand)
Replace a variable
Full replace of a template variable (Admin only)
Example
import {
Configuration,
TemplateVariablesApi,
} from '@pdf-generator/client';
import type { ReplaceRequest } from '@pdf-generator/client';
async function example() {
console.log("🚀 Testing @pdf-generator/client SDK...");
const config = new Configuration({
// To configure API key authorization: api-key
apiKey: "YOUR API KEY",
});
const api = new TemplateVariablesApi(config);
const body = {
// number
lookup: 8.14,
// CreateTemplateVariableDto
createTemplateVariableDto: ...,
// number (optional)
limit: 8.14,
// number (optional)
offset: 8.14,
// Array<string> (optional)
order: ...,
// Array<string> (optional)
filter: ...,
// Array<string> (optional)
or: ...,
// Array<string> (optional)
expand: ...,
} satisfies ReplaceRequest;
try {
const data = await api.replace(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| lookup | number | [Defaults to undefined] | |
| createTemplateVariableDto | CreateTemplateVariableDto | ||
| limit | number | [Optional] [Defaults to undefined] | |
| offset | number | [Optional] [Defaults to undefined] | |
| order | Array<string> | [Optional] | |
| filter | Array<string> | [Optional] | |
| or | Array<string> | [Optional] | |
| expand | Array<string> | [Optional] |
Return type
Authorization
HTTP request headers
- Content-Type:
application/json - Accept:
application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 2XX | Replace TemplateVariable by id | - |
| 4XX | - | |
| 5XX | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
retrieve
TemplateVariable retrieve(lookup, limit, offset, order, filter, or, expand)
Get a variable
Get a single template variable by ID
Example
import {
Configuration,
TemplateVariablesApi,
} from '@pdf-generator/client';
import type { RetrieveRequest } from '@pdf-generator/client';
async function example() {
console.log("🚀 Testing @pdf-generator/client SDK...");
const config = new Configuration({
// To configure API key authorization: api-key
apiKey: "YOUR API KEY",
});
const api = new TemplateVariablesApi(config);
const body = {
// number
lookup: 8.14,
// number (optional)
limit: 8.14,
// number (optional)
offset: 8.14,
// Array<string> (optional)
order: ...,
// Array<string> (optional)
filter: ...,
// Array<string> (optional)
or: ...,
// Array<string> (optional)
expand: ...,
} satisfies RetrieveRequest;
try {
const data = await api.retrieve(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| lookup | number | [Defaults to undefined] | |
| limit | number | [Optional] [Defaults to undefined] | |
| offset | number | [Optional] [Defaults to undefined] | |
| order | Array<string> | [Optional] | |
| filter | Array<string> | [Optional] | |
| or | Array<string> | [Optional] | |
| expand | Array<string> | [Optional] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept:
application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 2XX | Retrieve TemplateVariable by id | - |
| 4XX | - | |
| 5XX | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
update
TemplateVariable update(lookup, updateTemplateVariableDto, limit, offset, order, filter, or, expand)
Update a variable
Update a template variable (Admin only)
Example
import {
Configuration,
TemplateVariablesApi,
} from '@pdf-generator/client';
import type { UpdateRequest } from '@pdf-generator/client';
async function example() {
console.log("🚀 Testing @pdf-generator/client SDK...");
const config = new Configuration({
// To configure API key authorization: api-key
apiKey: "YOUR API KEY",
});
const api = new TemplateVariablesApi(config);
const body = {
// number
lookup: 8.14,
// UpdateTemplateVariableDto
updateTemplateVariableDto: ...,
// number (optional)
limit: 8.14,
// number (optional)
offset: 8.14,
// Array<string> (optional)
order: ...,
// Array<string> (optional)
filter: ...,
// Array<string> (optional)
or: ...,
// Array<string> (optional)
expand: ...,
} satisfies UpdateRequest;
try {
const data = await api.update(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| lookup | number | [Defaults to undefined] | |
| updateTemplateVariableDto | UpdateTemplateVariableDto | ||
| limit | number | [Optional] [Defaults to undefined] | |
| offset | number | [Optional] [Defaults to undefined] | |
| order | Array<string> | [Optional] | |
| filter | Array<string> | [Optional] | |
| or | Array<string> | [Optional] | |
| expand | Array<string> | [Optional] |
Return type
Authorization
HTTP request headers
- Content-Type:
application/json - Accept:
application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 2XX | Update/patch TemplateVariable by id | - |
| 4XX | - | |
| 5XX | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]