TemplateVariablesApi

All URIs are relative to /api

MethodHTTP requestDescription
createPOST /template-variablesCreate a variable
destroyDELETE /template-variables/{lookup}Delete a variable
listGET /template-variablesList template variables
replacePUT /template-variables/{lookup}Replace a variable
retrieveGET /template-variables/{lookup}Get a variable
updatePATCH /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

NameTypeDescriptionNotes
createTemplateVariableDtoCreateTemplateVariableDto
limitnumber[Optional] [Defaults to undefined]
offsetnumber[Optional] [Defaults to undefined]
orderArray<string>[Optional]
filterArray<string>[Optional]
orArray<string>[Optional]
expandArray<string>[Optional]

Return type

TemplateVariable

Authorization

api-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
2XXCreate 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

NameTypeDescriptionNotes
lookupnumber[Defaults to undefined]

Return type

void (Empty response body)

Authorization

api-key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
2XXDelete 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

NameTypeDescriptionNotes
limitnumber[Optional] [Defaults to undefined]
offsetnumber[Optional] [Defaults to undefined]
orderArray<string>[Optional]
filterArray<string>[Optional]
orArray<string>[Optional]
expandArray<string>[Optional]

Return type

TemplateVariableListResponseDto

Authorization

api-key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
2XXReturns 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

NameTypeDescriptionNotes
lookupnumber[Defaults to undefined]
createTemplateVariableDtoCreateTemplateVariableDto
limitnumber[Optional] [Defaults to undefined]
offsetnumber[Optional] [Defaults to undefined]
orderArray<string>[Optional]
filterArray<string>[Optional]
orArray<string>[Optional]
expandArray<string>[Optional]

Return type

TemplateVariable

Authorization

api-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
2XXReplace 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

NameTypeDescriptionNotes
lookupnumber[Defaults to undefined]
limitnumber[Optional] [Defaults to undefined]
offsetnumber[Optional] [Defaults to undefined]
orderArray<string>[Optional]
filterArray<string>[Optional]
orArray<string>[Optional]
expandArray<string>[Optional]

Return type

TemplateVariable

Authorization

api-key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
2XXRetrieve 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

NameTypeDescriptionNotes
lookupnumber[Defaults to undefined]
updateTemplateVariableDtoUpdateTemplateVariableDto
limitnumber[Optional] [Defaults to undefined]
offsetnumber[Optional] [Defaults to undefined]
orderArray<string>[Optional]
filterArray<string>[Optional]
orArray<string>[Optional]
expandArray<string>[Optional]

Return type

TemplateVariable

Authorization

api-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
2XXUpdate/patch TemplateVariable by id-
4XX-
5XX-

[Back to top] [Back to API list] [Back to Model list] [Back to README]