Class: InvoiceViewsService
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/invoice-views.ts:18
Extends
BaseService
Constructors
Constructor
new InvoiceViewsService(
client):InvoiceViewsService
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/base.ts:12
Parameters
client
Returns
InvoiceViewsService
Inherited from
BaseService.constructor
Properties
client
protectedclient:TanqoryClient
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/base.ts:10
Inherited from
BaseService.client
Methods
buildQuery()
protectedbuildQuery(options?):Record<string,any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/base.ts:26
Build query parameters
Parameters
options?
Returns
Record<string, any>
Inherited from
BaseService.buildQuery
create()
create(
storeId,input):Promise<{columns:string[];createdAt:Date;filters: {advancedFilters:Record<string,unknown>;search:string;tabFilter:"all"|"paid"|"unpaid"; };id:string;isDefault:boolean;isPinned:boolean;name:string;position:number;scope:"recent"|"history";storeId:string;updatedAt:Date;userId:string; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/invoice-views.ts:33
Create a new invoice view.
Parameters
storeId
string
input
columns?
string[]
filters
{ advancedFilters: Record<string, unknown>; search: string; tabFilter: "all" | "paid" | "unpaid"; }
filters.advancedFilters
Record<string, unknown>
filters.search
string
filters.tabFilter
"all" | "paid" | "unpaid"
isPinned?
boolean
name
string
scope
"recent" | "history"
Returns
Promise<{ columns: string[]; createdAt: Date; filters: { advancedFilters: Record<string, unknown>; search: string; tabFilter: "all" | "paid" | "unpaid"; }; id: string; isDefault: boolean; isPinned: boolean; name: string; position: number; scope: "recent" | "history"; storeId: string; updatedAt: Date; userId: string; }>
delete()
delete(
storeId,id):Promise<{deleted:boolean; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/invoice-views.ts:47
Delete an invoice view.
Parameters
storeId
string
id
string
Returns
Promise<{ deleted: boolean; }>
duplicate()
duplicate(
storeId,id):Promise<{columns:string[];createdAt:Date;filters: {advancedFilters:Record<string,unknown>;search:string;tabFilter:"all"|"paid"|"unpaid"; };id:string;isDefault:boolean;isPinned:boolean;name:string;position:number;scope:"recent"|"history";storeId:string;updatedAt:Date;userId:string; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/invoice-views.ts:55
Duplicate an invoice view (creates a new view with "(copy)" suffix).
Parameters
storeId
string
id
string
Returns
Promise<{ columns: string[]; createdAt: Date; filters: { advancedFilters: Record<string, unknown>; search: string; tabFilter: "all" | "paid" | "unpaid"; }; id: string; isDefault: boolean; isPinned: boolean; name: string; position: number; scope: "recent" | "history"; storeId: string; updatedAt: Date; userId: string; }>
generateIdempotencyKey()
protectedgenerateIdempotencyKey(prefix):string
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/base.ts:19
Generate idempotency key
Parameters
prefix
string
Returns
string
Inherited from
BaseService.generateIdempotencyKey
getExportMimeType()
protectedgetExportMimeType(format):string
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/base.ts:45
Get MIME type for export format
Parameters
format
string
Returns
string
Inherited from
BaseService.getExportMimeType
list()
list(
storeId,scope):Promise<object[]>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/invoice-views.ts:20
List invoice views for the current user, filtered by scope.
Parameters
storeId
string
scope
"recent" | "history"
Returns
Promise<object[]>
reorder()
reorder(
storeId,input):Promise<object[]>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/invoice-views.ts:68
Reorder invoice views within a scope.
Parameters
storeId
string
input
scope
"recent" | "history"
viewIds
string[]
Returns
Promise<object[]>
retrieve()
retrieve(
storeId,id):Promise<{columns:string[];createdAt:Date;filters: {advancedFilters:Record<string,unknown>;search:string;tabFilter:"all"|"paid"|"unpaid"; };id:string;isDefault:boolean;isPinned:boolean;name:string;position:number;scope:"recent"|"history";storeId:string;updatedAt:Date;userId:string; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/invoice-views.ts:28
Get a single invoice view by ID.
Parameters
storeId
string
id
string
Returns
Promise<{ columns: string[]; createdAt: Date; filters: { advancedFilters: Record<string, unknown>; search: string; tabFilter: "all" | "paid" | "unpaid"; }; id: string; isDefault: boolean; isPinned: boolean; name: string; position: number; scope: "recent" | "history"; storeId: string; updatedAt: Date; userId: string; }>
togglePin()
togglePin(
storeId,id):Promise<{columns:string[];createdAt:Date;filters: {advancedFilters:Record<string,unknown>;search:string;tabFilter:"all"|"paid"|"unpaid"; };id:string;isDefault:boolean;isPinned:boolean;name:string;position:number;scope:"recent"|"history";storeId:string;updatedAt:Date;userId:string; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/invoice-views.ts:63
Toggle the pin state of an invoice view.
Parameters
storeId
string
id
string
Returns
Promise<{ columns: string[]; createdAt: Date; filters: { advancedFilters: Record<string, unknown>; search: string; tabFilter: "all" | "paid" | "unpaid"; }; id: string; isDefault: boolean; isPinned: boolean; name: string; position: number; scope: "recent" | "history"; storeId: string; updatedAt: Date; userId: string; }>
update()
update(
storeId,id,input):Promise<{columns:string[];createdAt:Date;filters: {advancedFilters:Record<string,unknown>;search:string;tabFilter:"all"|"paid"|"unpaid"; };id:string;isDefault:boolean;isPinned:boolean;name:string;position:number;scope:"recent"|"history";storeId:string;updatedAt:Date;userId:string; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/invoice-views.ts:38
Update an invoice view.
Parameters
storeId
string
id
string
input
columns?
string[]
filters?
{ advancedFilters: Record<string, unknown>; search: string; tabFilter: "all" | "paid" | "unpaid"; }
filters.advancedFilters
Record<string, unknown>
filters.search
string
filters.tabFilter
"all" | "paid" | "unpaid"
isPinned?
boolean
name?
string
position?
number
Returns
Promise<{ columns: string[]; createdAt: Date; filters: { advancedFilters: Record<string, unknown>; search: string; tabFilter: "all" | "paid" | "unpaid"; }; id: string; isDefault: boolean; isPinned: boolean; name: string; position: number; scope: "recent" | "history"; storeId: string; updatedAt: Date; userId: string; }>