1
0

Merge pull request #1035 from bigcapitalhq/feat/abouolia/credit-note-resource-sdk-dtos

feat: add response DTOs for CreditNoteRefunds and Resource modules
This commit is contained in:
Ahmed Bouhuolia
2026-03-10 23:35:44 +02:00
committed by GitHub
4 changed files with 2102 additions and 103 deletions
@@ -1,21 +1,41 @@
import { Controller, Get, Param } from '@nestjs/common'; import { Controller, Get, Param } from '@nestjs/common';
import { GetResourceViewsService } from '../Views/GetResourceViews.service';
import { ResourceService } from './ResourceService'; import { ResourceService } from './ResourceService';
import { ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger'; import {
ApiExtraModels,
ApiOperation,
ApiParam,
ApiResponse,
ApiTags,
getSchemaPath,
} from '@nestjs/swagger';
import { ResourceMetaResponseDto } from './dtos/ResourceMetaResponse.dto';
@Controller('resources') @Controller('resources')
@ApiTags('resources') @ApiTags('resources')
@ApiExtraModels(ResourceMetaResponseDto)
export class ResourceController { export class ResourceController {
constructor(private readonly resourcesService: ResourceService) {} constructor(private readonly resourcesService: ResourceService) {}
@Get('/:resourceModel/meta') @Get('/:resourceModel/meta')
@ApiResponse({ status: 200, description: 'Retrieves the resource meta' })
@ApiOperation({ summary: 'Retrieves the resource meta' }) @ApiOperation({ summary: 'Retrieves the resource meta' })
getResourceMeta(@Param('resourceModel') resourceModel: string) { @ApiParam({
name: 'resourceModel',
description: 'The resource model name (e.g., SaleInvoice, Customer, Item)',
example: 'SaleInvoice',
required: true,
})
@ApiResponse({
status: 200,
description: 'Retrieves the resource meta',
schema: {
$ref: getSchemaPath(ResourceMetaResponseDto),
},
})
getResourceMeta(
@Param('resourceModel') resourceModel: string,
): ResourceMetaResponseDto {
const resourceMeta = this.resourcesService.getResourceMeta(resourceModel); const resourceMeta = this.resourcesService.getResourceMeta(resourceModel);
return { return resourceMeta as ResourceMetaResponseDto;
resourceMeta,
};
} }
} }
@@ -0,0 +1,386 @@
import { ApiProperty, getSchemaPath } from '@nestjs/swagger';
import { IModelMetaDefaultSort } from '@/interfaces/Model';
export class ModelMetaDefaultSortDto implements IModelMetaDefaultSort {
@ApiProperty({
description: 'The sort order',
example: 'DESC',
enum: ['DESC', 'ASC'],
})
sortOrder: 'DESC' | 'ASC';
@ApiProperty({
description: 'The sort field',
example: 'createdAt',
})
sortField: string;
}
export class ModelMetaEnumerationOptionDto {
@ApiProperty({
description: 'The option key',
example: 'active',
})
key: string;
@ApiProperty({
description: 'The option label',
example: 'Active',
})
label: string;
}
export class ModelMetaFieldCommonDto {
@ApiProperty({
description: 'The field name',
example: 'Customer Name',
})
name: string;
@ApiProperty({
description: 'The database column name',
example: 'customerName',
})
column: string;
@ApiProperty({
description: 'Whether the field is columnable',
example: true,
required: false,
})
columnable?: boolean;
@ApiProperty({
description: 'Whether the field is required',
example: true,
required: false,
})
required?: boolean;
@ApiProperty({
description: 'The import hint for the field',
example: 'Enter the customer display name',
required: false,
})
importHint?: string;
@ApiProperty({
description: 'The importable relation label',
example: 'displayName',
required: false,
})
importableRelationLabel?: string;
@ApiProperty({
description: 'The field order',
example: 1,
required: false,
})
order?: number;
@ApiProperty({
description: 'Whether the field is unique',
example: 1,
required: false,
})
unique?: number;
@ApiProperty({
description: 'The data transfer object key',
example: 'customerDisplayName',
required: false,
})
dataTransferObjectKey?: string;
}
export class ModelMetaFieldTextDto extends ModelMetaFieldCommonDto {
@ApiProperty({
description: 'The field type',
example: 'text',
})
fieldType: 'text';
@ApiProperty({
description: 'The minimum length',
example: 1,
required: false,
})
minLength?: number;
@ApiProperty({
description: 'The maximum length',
example: 255,
required: false,
})
maxLength?: number;
}
export class ModelMetaFieldNumberDto extends ModelMetaFieldCommonDto {
@ApiProperty({
description: 'The field type',
example: 'number',
})
fieldType: 'number';
@ApiProperty({
description: 'The minimum value',
example: 0,
required: false,
})
min?: number;
@ApiProperty({
description: 'The maximum value',
example: 999999,
required: false,
})
max?: number;
}
export class ModelMetaFieldBooleanDto extends ModelMetaFieldCommonDto {
@ApiProperty({
description: 'The field type',
example: 'boolean',
})
fieldType: 'boolean';
}
export class ModelMetaFieldDateDto extends ModelMetaFieldCommonDto {
@ApiProperty({
description: 'The field type',
example: 'date',
})
fieldType: 'date';
}
export class ModelMetaFieldUrlDto extends ModelMetaFieldCommonDto {
@ApiProperty({
description: 'The field type',
example: 'url',
})
fieldType: 'url';
}
export class ModelMetaFieldEnumerationDto extends ModelMetaFieldCommonDto {
@ApiProperty({
description: 'The field type',
example: 'enumeration',
})
fieldType: 'enumeration';
@ApiProperty({
description: 'The enumeration options',
type: 'array',
items: { $ref: getSchemaPath(ModelMetaEnumerationOptionDto) },
})
options: ModelMetaEnumerationOptionDto[];
}
export class ModelMetaFieldRelationDto extends ModelMetaFieldCommonDto {
@ApiProperty({
description: 'The field type',
example: 'relation',
})
fieldType: 'relation';
@ApiProperty({
description: 'The relation type',
example: 'enumeration',
})
relationType: 'enumeration';
@ApiProperty({
description: 'The relation key',
example: 'customerId',
})
relationKey: string;
@ApiProperty({
description: 'The relation entity label',
example: 'displayName',
})
relationEntityLabel: string;
@ApiProperty({
description: 'The relation entity key',
example: 'id',
})
relationEntityKey: string;
}
export class ModelMetaFieldCollectionDto extends ModelMetaFieldCommonDto {
@ApiProperty({
description: 'The field type',
example: 'collection',
})
fieldType: 'collection';
@ApiProperty({
description: 'The collection type',
example: 'object',
})
collectionOf: 'object';
@ApiProperty({
description: 'The minimum collection length',
example: 1,
required: false,
})
collectionMinLength?: number;
@ApiProperty({
description: 'The maximum collection length',
example: 100,
required: false,
})
collectionMaxLength?: number;
@ApiProperty({
description: 'The nested fields',
required: false,
})
fields?: Record<string, any>;
}
export class ModelMetaColumnMetaDto {
@ApiProperty({
description: 'The column name',
example: 'Customer Name',
})
name: string;
@ApiProperty({
description: 'The column accessor',
example: 'customer.displayName',
required: false,
})
accessor?: string;
@ApiProperty({
description: 'Whether the column is exportable',
example: true,
required: false,
})
exportable?: boolean;
}
export class ModelMetaColumnTextDto extends ModelMetaColumnMetaDto {
@ApiProperty({
description: 'The column type',
example: 'text',
})
type: 'text';
}
export class ModelMetaColumnCollectionDto extends ModelMetaColumnMetaDto {
@ApiProperty({
description: 'The column type',
example: 'collection',
})
type: 'collection';
@ApiProperty({
description: 'The collection type',
example: 'object',
})
collectionOf: 'object';
@ApiProperty({
description: 'The nested columns',
type: 'object',
additionalProperties: { $ref: getSchemaPath(ModelMetaColumnTextDto) },
})
columns: Record<string, ModelMetaColumnTextDto>;
}
export class ModelPrintMetaDto {
@ApiProperty({
description: 'The page title for print',
example: 'Invoice INV-0001',
})
pageTitle: string;
}
export class ResourceMetaResponseDto {
@ApiProperty({
description: 'The default filter field',
example: 'query',
})
defaultFilterField: string;
@ApiProperty({
description: 'The default sort configuration',
type: () => ModelMetaDefaultSortDto,
})
defaultSort: ModelMetaDefaultSortDto;
@ApiProperty({
description: 'Whether the resource is exportable',
example: true,
required: false,
})
exportable?: boolean;
@ApiProperty({
description: 'The field to flatten on during export',
example: 'entries',
required: false,
})
exportFlattenOn?: string;
@ApiProperty({
description: 'Whether the resource is importable',
example: true,
required: false,
})
importable?: boolean;
@ApiProperty({
description: 'The import aggregator field',
example: 'entries',
required: false,
})
importAggregator?: string;
@ApiProperty({
description: 'The field to aggregate on during import',
example: 'referenceNo',
required: false,
})
importAggregateOn?: string;
@ApiProperty({
description: 'The field to aggregate by during import',
example: 'id',
required: false,
})
importAggregateBy?: string;
@ApiProperty({
description: 'The print metadata',
type: () => ModelPrintMetaDto,
required: false,
})
print?: ModelPrintMetaDto;
@ApiProperty({
description: 'The resource fields (legacy format)',
type: 'object',
additionalProperties: true,
})
fields: Record<string, any>;
@ApiProperty({
description: 'The resource fields (new format)',
type: 'object',
additionalProperties: true,
})
fields2: Record<string, any>;
@ApiProperty({
description: 'The resource columns',
type: 'object',
additionalProperties: true,
})
columns: Record<string, any>;
}
+1154 -34
View File
File diff suppressed because it is too large Load Diff
+535 -62
View File
@@ -1539,6 +1539,10 @@ export interface paths {
path?: never; path?: never;
cookie?: never; cookie?: never;
}; };
/**
* Get Stripe Connect link
* @description Retrieves the Stripe OAuth2 Connect authorization URL
*/
get: operations["StripeIntegrationController_getStripeConnectLink"]; get: operations["StripeIntegrationController_getStripeConnectLink"];
put?: never; put?: never;
post?: never; post?: never;
@@ -1557,6 +1561,10 @@ export interface paths {
}; };
get?: never; get?: never;
put?: never; put?: never;
/**
* Exchange Stripe OAuth code
* @description Exchanges the Stripe authorization code for user id and access token
*/
post: operations["StripeIntegrationController_exchangeOAuth"]; post: operations["StripeIntegrationController_exchangeOAuth"];
delete?: never; delete?: never;
options?: never; options?: never;
@@ -1564,22 +1572,6 @@ export interface paths {
patch?: never; patch?: never;
trace?: never; trace?: never;
}; };
"/api/stripe/account_link": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
post: operations["StripeIntegrationController_createAccountLink"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/stripe/account": { "/api/stripe/account": {
parameters: { parameters: {
query?: never; query?: never;
@@ -1589,6 +1581,10 @@ export interface paths {
}; };
get?: never; get?: never;
put?: never; put?: never;
/**
* Create Stripe account
* @description Creates a new Stripe Connect account
*/
post: operations["StripeIntegrationController_createAccount"]; post: operations["StripeIntegrationController_createAccount"];
delete?: never; delete?: never;
options?: never; options?: never;
@@ -1605,6 +1601,10 @@ export interface paths {
}; };
get?: never; get?: never;
put?: never; put?: never;
/**
* Create Stripe account session
* @description Creates an account session for the Stripe Connect embedded component
*/
post: operations["StripeIntegrationController_createAccountSession"]; post: operations["StripeIntegrationController_createAccountSession"];
delete?: never; delete?: never;
options?: never; options?: never;
@@ -1612,6 +1612,26 @@ export interface paths {
patch?: never; patch?: never;
trace?: never; trace?: never;
}; };
"/api/stripe/account_link": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Create Stripe account link
* @description Creates a Stripe Connect account link for onboarding
*/
post: operations["StripeIntegrationController_createAccountLink"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/webhooks/stripe": { "/api/webhooks/stripe": {
parameters: { parameters: {
query?: never; query?: never;
@@ -2723,7 +2743,8 @@ export interface paths {
path?: never; path?: never;
cookie?: never; cookie?: never;
}; };
get?: never; /** Retrieve a refund transaction for the given credit note. */
get: operations["CreditNoteRefundsController_getRefundCreditNoteTransaction"];
put?: never; put?: never;
post?: never; post?: never;
/** Delete a refund for the given credit note. */ /** Delete a refund for the given credit note. */
@@ -5544,6 +5565,18 @@ export interface components {
/** @description The entries associated with this adjustment */ /** @description The entries associated with this adjustment */
entries: unknown[][]; entries: unknown[][];
}; };
InventoryAdjustmentsPaginationDto: {
/** @example 1 */
page: number;
/** @example 12 */
pageSize: number;
/** @example 42 */
total: number;
};
InventoryAdjustmentsListResponseDto: {
data: components["schemas"]["InventoryAdjustmentResponseDto"][];
pagination: components["schemas"]["InventoryAdjustmentsPaginationDto"];
};
CreateQuickInventoryAdjustmentDto: { CreateQuickInventoryAdjustmentDto: {
/** /**
* Format: date-time * Format: date-time
@@ -6179,6 +6212,20 @@ export interface components {
*/ */
parentAccountId: number; parentAccountId: number;
}; };
InventoryItemCostDto: {
/** @description Item ID */
itemId: number;
/** @description Valuation */
valuation: number;
/** @description Quantity */
quantity: number;
/** @description Average cost */
average: number;
};
GetInventoryItemsCostResponseDto: {
/** @description List of item costs */
costs: components["schemas"]["InventoryItemCostDto"][];
};
GenerateSaleInvoiceSharableLinkResponseDto: { GenerateSaleInvoiceSharableLinkResponseDto: {
/** /**
* @description Sharable payment link for the sale invoice * @description Sharable payment link for the sale invoice
@@ -7157,6 +7204,266 @@ export interface components {
*/ */
attachments: string[]; attachments: string[];
}; };
ModelMetaDefaultSortDto: {
/**
* @description The sort order
* @example DESC
* @enum {string}
*/
sortOrder: "DESC" | "ASC";
/**
* @description The sort field
* @example createdAt
*/
sortField: string;
};
ModelPrintMetaDto: {
/**
* @description The page title for print
* @example Invoice INV-0001
*/
pageTitle: string;
};
ResourceMetaResponseDto: {
/**
* @description The default filter field
* @example query
*/
defaultFilterField: string;
/** @description The default sort configuration */
defaultSort: components["schemas"]["ModelMetaDefaultSortDto"];
/**
* @description Whether the resource is exportable
* @example true
*/
exportable?: boolean;
/**
* @description The field to flatten on during export
* @example entries
*/
exportFlattenOn?: string;
/**
* @description Whether the resource is importable
* @example true
*/
importable?: boolean;
/**
* @description The import aggregator field
* @example entries
*/
importAggregator?: string;
/**
* @description The field to aggregate on during import
* @example referenceNo
*/
importAggregateOn?: string;
/**
* @description The field to aggregate by during import
* @example id
*/
importAggregateBy?: string;
/** @description The print metadata */
print?: components["schemas"]["ModelPrintMetaDto"];
/** @description The resource fields (legacy format) */
fields: {
[key: string]: unknown;
};
/** @description The resource fields (new format) */
fields2: {
[key: string]: unknown;
};
/** @description The resource columns */
columns: {
[key: string]: unknown;
};
};
PaymentLinkEntryDto: {
/** @description Line item description */
description: string;
/** @description Item name */
itemName: string;
/** @description Quantity */
quantity: number;
/** @description Formatted quantity */
quantityFormatted: string;
/** @description Unit rate */
rate: number;
/** @description Formatted rate */
rateFormatted: string;
/** @description Line total */
total: number;
/** @description Formatted total */
totalFormatted: string;
};
PaymentLinkTaxEntryDto: {
/** @description Tax name */
name: string;
/** @description Tax rate amount */
taxRateAmount: number;
/** @description Formatted tax rate amount */
taxRateAmountFormatted: string;
/** @description Tax rate code */
taxRateCode: string;
};
PaymentLinkBrandingTemplateDto: {
/** @description Company logo URI */
companyLogoUri: string;
/** @description Primary color */
primaryColor: string;
/** @description Secondary color */
secondaryColor?: string;
};
PaymentLinkOrganizationDto: {
/** @description Organization address */
address: Record<string, never>;
/** @description Organization name */
name: string;
/** @description Primary brand color */
primaryColor: string;
/** @description Logo URI */
logoUri: string;
/** @description Formatted address text */
addressTextFormatted: string;
};
GetInvoicePaymentLinkResponseDto: {
/** @description Amount due */
dueAmount: number;
/** @description Formatted amount due */
dueAmountFormatted: string;
/** @description Due date */
dueDate: string;
/** @description Formatted due date */
dueDateFormatted: string;
/** @description Formatted invoice date */
invoiceDateFormatted: string;
/** @description Invoice number */
invoiceNo: string;
/** @description Payment amount */
paymentAmount: number;
/** @description Formatted payment amount */
paymentAmountFormatted: string;
/** @description Subtotal */
subtotal: number;
/** @description Formatted subtotal */
subtotalFormatted: string;
/** @description Formatted subtotal in local currency */
subtotalLocalFormatted: string;
/** @description Total amount */
total: number;
/** @description Formatted total */
totalFormatted: string;
/** @description Formatted total in local currency */
totalLocalFormatted: string;
/** @description Customer name */
customerName: string;
/** @description Invoice message */
invoiceMessage: string;
/** @description Terms and conditions */
termsConditions: string;
/** @description Invoice line entries */
entries: components["schemas"]["PaymentLinkEntryDto"][];
/** @description Tax entries */
taxes: components["schemas"]["PaymentLinkTaxEntryDto"][];
/** @description Branding template */
brandingTemplate: components["schemas"]["PaymentLinkBrandingTemplateDto"];
/** @description Organization metadata */
organization: components["schemas"]["PaymentLinkOrganizationDto"];
/** @description Whether Stripe is available as payment method */
hasStripePaymentMethod: boolean;
/** @description Whether invoice has receivable balance */
isReceivable: boolean;
/** @description Formatted customer address */
formattedCustomerAddress: string;
};
GetInvoicePaymentLinkResponseWrapperDto: {
/** @description Payment link invoice metadata */
data: components["schemas"]["GetInvoicePaymentLinkResponseDto"];
};
CreateStripeCheckoutSessionResponseDto: {
/**
* @description Stripe checkout session ID
* @example cs_test_xxx
*/
sessionId: string;
/**
* @description Stripe publishable key for the client
* @example pk_test_xxx
*/
publishableKey: string;
/**
* @description URL to redirect the customer to complete checkout
* @example https://checkout.stripe.com/c/pay/cs_test_xxx
*/
redirectTo: string;
};
GetStripeConnectLinkResponseDto: {
/**
* @description Stripe OAuth2 Connect authorization URL
* @example https://connect.stripe.com/oauth/authorize?response_type=code&client_id=...
*/
url: string;
};
ExchangeStripeOAuthBodyDto: {
/**
* @description Authorization code returned by Stripe OAuth
* @example ac_xxx
*/
code: string;
};
CreateStripeAccountResponseDto: {
/**
* @description The Stripe Connect account ID
* @example acct_1234567890
*/
account_id: string;
};
CreateStripeAccountSessionBodyDto: {
/**
* @description Stripe Connect account ID to create a session for
* @example acct_1234567890
*/
account?: string;
};
CreateStripeAccountSessionResponseDto: {
/**
* @description Stripe Account Session client secret for the Connect embedded component
* @example acs_xxx_secret_xxx
*/
client_secret: string;
};
CreateStripeAccountLinkBodyDto: {
/**
* @description Stripe Connect account ID
* @example acct_xxx
*/
stripeAccountId: string;
};
StripeAccountLinkResponseDto: {
/**
* @description URL for the account onboarding flow
* @example https://connect.stripe.com/setup/xxx
*/
url: string;
/**
* @description Unix timestamp when the link was created
* @example 1234567890
*/
created: number;
/**
* @description Unix timestamp when the link expires
* @example 1234567890
*/
expires_at: number;
/**
* @description Stripe object type
* @example account_link
*/
object: string;
};
CreateStripeAccountLinkResponseDto: {
/** @description Stripe AccountLink object for onboarding */
clientSecret: components["schemas"]["StripeAccountLinkResponseDto"];
};
ItemCategoryResponseDto: { ItemCategoryResponseDto: {
/** /**
* @description The unique identifier of the item category * @description The unique identifier of the item category
@@ -10021,6 +10328,13 @@ export interface components {
*/ */
discountType: "percentage" | "amount"; discountType: "percentage" | "amount";
}; };
CreditNoteStateResponseDto: {
/**
* @description Default PDF template ID for credit notes
* @example 1
*/
defaultTemplateId: number;
};
EditCreditNoteDto: { EditCreditNoteDto: {
/** /**
* @description The customer ID * @description The customer ID
@@ -10102,6 +10416,36 @@ export interface components {
*/ */
discountType: "percentage" | "amount"; discountType: "percentage" | "amount";
}; };
RefundCreditAccountDto: {
/** @example 10 */
id: number;
/** @example Cash on Hand */
name: string;
};
RefundCreditNoteSummaryDto: {
/** @example 1 */
id: number;
/** @example CN-0001 */
creditNoteNumber: string;
};
RefundCreditNoteResponseDto: {
/** @example 100 */
id: number;
/** @example 2024-01-15 */
date: string;
/** @example 2024-01-15 */
formattedDate: string;
/** @example 250 */
amount: number;
/** @example $250.00 */
formttedAmount: string;
/** @example REF-001 */
referenceNo?: string | null;
/** @example Refund issued to customer */
description?: string | null;
fromAccount: components["schemas"]["RefundCreditAccountDto"];
creditNote: components["schemas"]["RefundCreditNoteSummaryDto"];
};
CreditNoteRefundDto: { CreditNoteRefundDto: {
/** /**
* @description The id of the from account * @description The id of the from account
@@ -10140,6 +10484,54 @@ export interface components {
*/ */
branchId: number; branchId: number;
}; };
AppliedCreditNoteInvoiceResponseDto: {
/** @example 1 */
id: number;
/** @example 200 */
amount: number;
/** @example $200.00 */
formttedAmount: string;
/** @example CN-0001 */
creditNoteNumber: string;
/** @example 2024-01-10 */
creditNoteDate: string;
/** @example 2024-01-10 */
formattedCreditNoteDate: string;
/** @example INV-0001 */
invoiceNumber: string;
/** @example REF-001 */
invoiceReferenceNo?: string | null;
};
CreditNoteInvoiceToApplyResponseDto: {
/** @example 1 */
id: number;
/** @example INV-0001 */
invoiceNo: string;
/** @example REF-001 */
referenceNo?: string | null;
/** @example 2024-01-10 */
invoiceDate: string;
/** @example 2024-01-20 */
dueDate: string;
/** @example USD */
currencyCode?: string | null;
/** @example 500 */
balance: number;
/** @example 500 */
dueAmount: number;
/** @example 0 */
paymentAmount: number;
/** @example 2024-01-10 */
formattedInvoiceDate: string;
/** @example 2024-01-20 */
formattedDueDate: string;
/** @example $500.00 */
formatted_amount: string;
/** @example $500.00 */
formattedDueAmount: string;
/** @example $0.00 */
formattedPaymentAmount: string;
};
ApplyCreditNoteInvoiceEntryDto: { ApplyCreditNoteInvoiceEntryDto: {
/** /**
* @description Invoice ID to apply credit to * @description Invoice ID to apply credit to
@@ -13344,6 +13736,22 @@ export interface components {
/** @description The permissions of the role */ /** @description The permissions of the role */
permissions: components["schemas"]["EditRolePermissionDto"][]; permissions: components["schemas"]["EditRolePermissionDto"][];
}; };
OrganizationBuildJobResponseDto: {
/** @example 123 */
id: string;
/** @example active */
state: string;
/** @example 50 */
progress: Record<string, never>;
/** @example false */
isCompleted: boolean;
/** @example true */
isRunning: boolean;
/** @example false */
isWaiting: boolean;
/** @example false */
isFailed: boolean;
};
OrganizationMetadataResponseDto: { OrganizationMetadataResponseDto: {
/** /**
* @description Internal numeric ID of the metadata * @description Internal numeric ID of the metadata
@@ -13690,6 +14098,12 @@ export interface components {
*/ */
currencySign: string; currencySign: string;
}; };
DateFormatResponseDto: {
/** @example 03/09/2026 [MM/DD/YYYY] */
label: string;
/** @example MM/DD/YYYY */
key: string;
};
EditUserDto: { EditUserDto: {
/** /**
* @description First name of the user * @description First name of the user
@@ -14577,7 +14991,10 @@ export interface operations {
}; };
InventoryAdjustmentsController_getInventoryAdjustments: { InventoryAdjustmentsController_getInventoryAdjustments: {
parameters: { parameters: {
query?: never; query?: {
page?: number;
pageSize?: number;
};
header: { header: {
/** @description Value must be 'Bearer <token>' where <token> is an API key prefixed with 'bc_' or a JWT token. */ /** @description Value must be 'Bearer <token>' where <token> is an API key prefixed with 'bc_' or a JWT token. */
Authorization: string; Authorization: string;
@@ -14595,7 +15012,7 @@ export interface operations {
[name: string]: unknown; [name: string]: unknown;
}; };
content: { content: {
"application/json": components["schemas"]["InventoryAdjustmentResponseDto"][]; "application/json": components["schemas"]["InventoryAdjustmentsListResponseDto"];
}; };
}; };
}; };
@@ -15432,11 +15849,14 @@ export interface operations {
}; };
requestBody?: never; requestBody?: never;
responses: { responses: {
/** @description Items inventory cost list */
200: { 200: {
headers: { headers: {
[name: string]: unknown; [name: string]: unknown;
}; };
content?: never; content: {
"application/json": components["schemas"]["GetInventoryItemsCostResponseDto"];
};
}; };
}; };
}; };
@@ -17001,6 +17421,7 @@ export interface operations {
query?: never; query?: never;
header?: never; header?: never;
path: { path: {
/** @description The resource model name (e.g., SaleInvoice, Customer, Item) */
resourceModel: string; resourceModel: string;
}; };
cookie?: never; cookie?: never;
@@ -17012,7 +17433,9 @@ export interface operations {
headers: { headers: {
[name: string]: unknown; [name: string]: unknown;
}; };
content?: never; content: {
"application/json": components["schemas"]["ResourceMetaResponseDto"];
};
}; };
}; };
}; };
@@ -17039,10 +17462,7 @@ export interface operations {
[name: string]: unknown; [name: string]: unknown;
}; };
content: { content: {
"application/json": { "application/json": components["schemas"]["GetInvoicePaymentLinkResponseWrapperDto"];
/** @description Payment link metadata */
data?: Record<string, never>;
};
}; };
}; };
/** @description Payment link not found */ /** @description Payment link not found */
@@ -17077,12 +17497,7 @@ export interface operations {
[name: string]: unknown; [name: string]: unknown;
}; };
content: { content: {
"application/json": { "application/json": components["schemas"]["CreateStripeCheckoutSessionResponseDto"];
/** @description Stripe checkout session ID */
id?: string;
/** @description Stripe checkout session URL */
url?: string;
};
}; };
}; };
/** @description Payment link not found */ /** @description Payment link not found */
@@ -17138,11 +17553,14 @@ export interface operations {
}; };
requestBody?: never; requestBody?: never;
responses: { responses: {
/** @description Successfully retrieved Stripe Connect link */
200: { 200: {
headers: { headers: {
[name: string]: unknown; [name: string]: unknown;
}; };
content?: never; content: {
"application/json": components["schemas"]["GetStripeConnectLinkResponseDto"];
};
}; };
}; };
}; };
@@ -17153,25 +17571,13 @@ export interface operations {
path?: never; path?: never;
cookie?: never; cookie?: never;
}; };
requestBody?: never; requestBody: {
responses: { content: {
201: { "application/json": components["schemas"]["ExchangeStripeOAuthBodyDto"];
headers: {
[name: string]: unknown;
};
content?: never;
}; };
}; };
};
StripeIntegrationController_createAccountLink: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: { responses: {
/** @description Successfully exchanged OAuth code */
201: { 201: {
headers: { headers: {
[name: string]: unknown; [name: string]: unknown;
@@ -17189,12 +17595,13 @@ export interface operations {
}; };
requestBody?: never; requestBody?: never;
responses: { responses: {
/** @description Successfully created Stripe account */
201: { 201: {
headers: { headers: {
[name: string]: unknown; [name: string]: unknown;
}; };
content: { content: {
"application/json": { account_id: string }; "application/json": components["schemas"]["CreateStripeAccountResponseDto"];
}; };
}; };
}; };
@@ -17208,16 +17615,41 @@ export interface operations {
}; };
requestBody: { requestBody: {
content: { content: {
"application/json": { account?: string }; "application/json": components["schemas"]["CreateStripeAccountSessionBodyDto"];
}; };
}; };
responses: { responses: {
/** @description Successfully created account session */
201: { 201: {
headers: { headers: {
[name: string]: unknown; [name: string]: unknown;
}; };
content: { content: {
"application/json": { client_secret: string }; "application/json": components["schemas"]["CreateStripeAccountSessionResponseDto"];
};
};
};
};
StripeIntegrationController_createAccountLink: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody: {
content: {
"application/json": components["schemas"]["CreateStripeAccountLinkBodyDto"];
};
};
responses: {
/** @description Successfully created account link */
201: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["CreateStripeAccountLinkResponseDto"];
}; };
}; };
}; };
@@ -19619,7 +20051,9 @@ export interface operations {
headers: { headers: {
[name: string]: unknown; [name: string]: unknown;
}; };
content?: never; content: {
"application/json": components["schemas"]["CreditNoteStateResponseDto"];
};
}; };
}; };
}; };
@@ -19841,11 +20275,14 @@ export interface operations {
}; };
requestBody?: never; requestBody?: never;
responses: { responses: {
/** @description Credit note refunds retrieved successfully. */
200: { 200: {
headers: { headers: {
[name: string]: unknown; [name: string]: unknown;
}; };
content?: never; content: {
"application/json": components["schemas"]["RefundCreditNoteResponseDto"][];
};
}; };
}; };
}; };
@@ -19877,6 +20314,33 @@ export interface operations {
}; };
}; };
}; };
CreditNoteRefundsController_getRefundCreditNoteTransaction: {
parameters: {
query?: never;
header: {
/** @description Value must be 'Bearer <token>' where <token> is an API key prefixed with 'bc_' or a JWT token. */
Authorization: string;
/** @description Required if Authorization is a JWT token. The organization ID to operate within. */
"organization-id": string;
};
path: {
refundCreditId: number;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Refund credit note transaction retrieved successfully. */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["RefundCreditNoteResponseDto"];
};
};
};
};
CreditNoteRefundsController_deleteRefundCreditNote: { CreditNoteRefundsController_deleteRefundCreditNote: {
parameters: { parameters: {
query?: never; query?: never;
@@ -19922,7 +20386,9 @@ export interface operations {
headers: { headers: {
[name: string]: unknown; [name: string]: unknown;
}; };
content?: never; content: {
"application/json": components["schemas"]["AppliedCreditNoteInvoiceResponseDto"][];
};
}; };
/** @description Invalid input data */ /** @description Invalid input data */
400: { 400: {
@@ -19961,7 +20427,9 @@ export interface operations {
headers: { headers: {
[name: string]: unknown; [name: string]: unknown;
}; };
content?: never; content: {
"application/json": components["schemas"]["CreditNoteInvoiceToApplyResponseDto"][];
};
}; };
/** @description Invalid input data */ /** @description Invalid input data */
400: { 400: {
@@ -20495,17 +20963,17 @@ export interface operations {
}; };
BillPaymentsController_getBillPaymentNewPageEntries: { BillPaymentsController_getBillPaymentNewPageEntries: {
parameters: { parameters: {
query?: never; query: {
/** @description The vendor id */
vendorId: number;
};
header: { header: {
/** @description Value must be 'Bearer <token>' where <token> is an API key prefixed with 'bc_' or a JWT token. */ /** @description Value must be 'Bearer <token>' where <token> is an API key prefixed with 'bc_' or a JWT token. */
Authorization: string; Authorization: string;
/** @description Required if Authorization is a JWT token. The organization ID to operate within. */ /** @description Required if Authorization is a JWT token. The organization ID to operate within. */
"organization-id": string; "organization-id": string;
}; };
path: { path?: never;
/** @description The vendor id */
vendorId: number;
};
cookie?: never; cookie?: never;
}; };
requestBody?: never; requestBody?: never;
@@ -27564,11 +28032,14 @@ export interface operations {
}; };
requestBody?: never; requestBody?: never;
responses: { responses: {
/** @description Returns the organization build job details */
200: { 200: {
headers: { headers: {
[name: string]: unknown; [name: string]: unknown;
}; };
content?: never; content: {
"application/json": components["schemas"]["OrganizationBuildJobResponseDto"];
};
}; };
}; };
}; };
@@ -27971,7 +28442,9 @@ export interface operations {
headers: { headers: {
[name: string]: unknown; [name: string]: unknown;
}; };
content?: never; content: {
"application/json": components["schemas"]["DateFormatResponseDto"][];
};
}; };
}; };
}; };