conductor-node 0.0.5 → 0.0.6
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/README.md +7 -7
- package/dist/Client.d.ts +5 -4
- package/dist/Client.js +9 -14
- package/dist/qb/ClientQBD.d.ts +38 -0
- package/dist/qb/ClientQBD.js +103 -0
- package/dist/qb/qbXMLTypes/Account.d.ts +260 -0
- package/dist/{qbXMLTypes → qb/qbXMLTypes}/Account.js +0 -0
- package/dist/qb/qbXMLTypes/Employee.d.ts +396 -0
- package/dist/{qbXMLTypes/index.js → qb/qbXMLTypes/Employee.js} +0 -0
- package/dist/qb/qbXMLTypes/shared.d.ts +35 -0
- package/dist/qb/qbXMLTypes/shared.js +2 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -2
- package/src/Client.ts +9 -20
- package/src/qb/ClientQBD.ts +152 -0
- package/src/qb/qbXMLTypes/Account.ts +325 -0
- package/src/qb/qbXMLTypes/Employee.ts +471 -0
- package/src/qb/qbXMLTypes/shared.ts +48 -0
- package/dist/qbXMLTypes/Account.d.ts +0 -98
- package/dist/qbXMLTypes/index.d.ts +0 -15
- package/src/qbXMLTypes/Account.ts +0 -169
- package/src/qbXMLTypes/index.ts +0 -18
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
// https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/accountadd
|
|
2
|
-
export interface AccountAddRq {
|
|
3
|
-
AccountAdd: AccountAdd;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export interface AccountAddRs {
|
|
7
|
-
AccountRet?: AccountRet;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
interface AccountAdd {
|
|
11
|
-
Name: string;
|
|
12
|
-
IsActive?: boolean;
|
|
13
|
-
ParentRef?: ParentRef;
|
|
14
|
-
AccountType: AccountType;
|
|
15
|
-
AccountNumber?: string;
|
|
16
|
-
BankNumber?: string;
|
|
17
|
-
Desc?: string;
|
|
18
|
-
OpenBalance?: string;
|
|
19
|
-
OpenBalanceDate?: Date;
|
|
20
|
-
SalesTaxCodeRef?: SalesTaxCodeRef;
|
|
21
|
-
TaxLineID?: number;
|
|
22
|
-
CurrencyRef?: CurrencyRef;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/accountquery
|
|
26
|
-
// FIXME: This does not account for the use of "OR" and "may repeat" in the
|
|
27
|
-
// XMLOps, which might indicate using an array.
|
|
28
|
-
export interface AccountQueryRq {
|
|
29
|
-
ListID?: string;
|
|
30
|
-
FullName?: string;
|
|
31
|
-
MaxReturned?: number;
|
|
32
|
-
ActiveStatus?: ActiveStatus;
|
|
33
|
-
FromModifiedDate?: Date;
|
|
34
|
-
ToModifiedDate?: Date;
|
|
35
|
-
NameFilter?: NameFilter;
|
|
36
|
-
NameRangeFilter?: NameRangeFilter;
|
|
37
|
-
AccountType?: AccountType;
|
|
38
|
-
CurrencyFilter?: CurrencyFilter;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface AccountQueryRs {
|
|
42
|
-
AccountRet?: AccountRet;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
interface AccountRet {
|
|
46
|
-
ListID: string;
|
|
47
|
-
TimeCreated: string;
|
|
48
|
-
TimeModified: string;
|
|
49
|
-
EditSequence: string;
|
|
50
|
-
Name: string;
|
|
51
|
-
FullName: string;
|
|
52
|
-
IsActive?: boolean;
|
|
53
|
-
ParentRef?: ParentRef;
|
|
54
|
-
Sublevel: number;
|
|
55
|
-
AccountType: AccountType;
|
|
56
|
-
SpecialAccountType?: SpecialAccountType;
|
|
57
|
-
IsTaxAccount?: boolean;
|
|
58
|
-
AccountNumber?: string;
|
|
59
|
-
BankNumber?: string;
|
|
60
|
-
Desc?: string;
|
|
61
|
-
Balance?: string;
|
|
62
|
-
TotalBalance?: string;
|
|
63
|
-
SalesTaxCodeRef?: SalesTaxCodeRef;
|
|
64
|
-
TaxLineInfoRet?: {
|
|
65
|
-
TaxLineID: number;
|
|
66
|
-
TaxLineName?: string;
|
|
67
|
-
};
|
|
68
|
-
CashFlowClassification?: CashFlowClassification;
|
|
69
|
-
CurrencyRef?: CurrencyRef;
|
|
70
|
-
DataExtRet?: {
|
|
71
|
-
OwnerID?: string;
|
|
72
|
-
DataExtName: string;
|
|
73
|
-
DataExtType: DataExtType;
|
|
74
|
-
DataExtValue: string;
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
interface NameFilter {
|
|
79
|
-
MatchCriterion: MatchCriterion;
|
|
80
|
-
Name: string;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
interface NameRangeFilter {
|
|
84
|
-
FromName?: string;
|
|
85
|
-
ToName?: string;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
interface CurrencyFilter {
|
|
89
|
-
ListID?: string;
|
|
90
|
-
FullName?: string;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
type MatchCriterion = "Contains" | "EndsWith" | "StartsWith";
|
|
94
|
-
|
|
95
|
-
// Default is `ActiveOnly`
|
|
96
|
-
type ActiveStatus = "ActiveOnly" | "All" | "InactiveOnly";
|
|
97
|
-
|
|
98
|
-
interface ParentRef {
|
|
99
|
-
ListID?: string;
|
|
100
|
-
FullName?: string;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
interface SalesTaxCodeRef {
|
|
104
|
-
ListID?: string;
|
|
105
|
-
FullName?: string;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
interface CurrencyRef {
|
|
109
|
-
ListID?: string;
|
|
110
|
-
FullName?: string;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
type AccountType =
|
|
114
|
-
| "AccountsPayable"
|
|
115
|
-
| "AccountsReceivable"
|
|
116
|
-
| "Bank"
|
|
117
|
-
| "CostOfGoodsSold"
|
|
118
|
-
| "CreditCard"
|
|
119
|
-
| "Equity"
|
|
120
|
-
| "Expense"
|
|
121
|
-
| "FixedAsset"
|
|
122
|
-
| "Income"
|
|
123
|
-
| "LongTermLiability"
|
|
124
|
-
| "NonPosting"
|
|
125
|
-
| "OtherAsset"
|
|
126
|
-
| "OtherCurrentAsset"
|
|
127
|
-
| "OtherCurrentLiability"
|
|
128
|
-
| "OtherExpense"
|
|
129
|
-
| "OtherIncome";
|
|
130
|
-
|
|
131
|
-
type SpecialAccountType =
|
|
132
|
-
| "AccountsPayable"
|
|
133
|
-
| "AccountsReceivable"
|
|
134
|
-
| "CondenseItemAdjustmentExpenses"
|
|
135
|
-
| "CostOfGoodsSold"
|
|
136
|
-
| "DirectDepositLiabilities"
|
|
137
|
-
| "Estimates"
|
|
138
|
-
| "ExchangeGainLoss"
|
|
139
|
-
| "InventoryAssets"
|
|
140
|
-
| "ItemReceiptAccount"
|
|
141
|
-
| "OpeningBalanceEquity"
|
|
142
|
-
| "PayrollExpenses"
|
|
143
|
-
| "PayrollLiabilities"
|
|
144
|
-
| "PettyCash"
|
|
145
|
-
| "PurchaseOrders"
|
|
146
|
-
| "ReconciliationDifferences"
|
|
147
|
-
| "RetainedEarnings"
|
|
148
|
-
| "SalesOrders"
|
|
149
|
-
| "SalesTaxPayable"
|
|
150
|
-
| "UncategorizedExpenses"
|
|
151
|
-
| "UncategorizedIncome"
|
|
152
|
-
| "UndepositedFunds";
|
|
153
|
-
|
|
154
|
-
type CashFlowClassification =
|
|
155
|
-
| "Financing"
|
|
156
|
-
| "Investing"
|
|
157
|
-
| "None"
|
|
158
|
-
| "NotApplicable"
|
|
159
|
-
| "Operating";
|
|
160
|
-
|
|
161
|
-
type DataExtType =
|
|
162
|
-
| "AMTTYPE"
|
|
163
|
-
| "Date"
|
|
164
|
-
| "number"
|
|
165
|
-
| "PERCENTTYPE"
|
|
166
|
-
| "PRICETYPE"
|
|
167
|
-
| "QUANTYPE"
|
|
168
|
-
| "STR255TYPE"
|
|
169
|
-
| "STR1024TYPE";
|
package/src/qbXMLTypes/index.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
AccountAddRq,
|
|
3
|
-
AccountAddRs,
|
|
4
|
-
AccountQueryRq,
|
|
5
|
-
AccountQueryRs,
|
|
6
|
-
} from "@conductor/client/qbXMLTypes/Account";
|
|
7
|
-
|
|
8
|
-
export type QBXMLRequest =
|
|
9
|
-
| { AccountAddRq: AccountAddRq }
|
|
10
|
-
| { AccountQueryRq: AccountQueryRq };
|
|
11
|
-
|
|
12
|
-
type GetSubtype<T> = T extends { [key: string]: infer U } ? U : never;
|
|
13
|
-
|
|
14
|
-
// prettier-ignore
|
|
15
|
-
export type QBXMLResponse<T extends QBXMLRequest>
|
|
16
|
-
= GetSubtype<T> extends AccountAddRq ? { AccountAddRs: AccountAddRs }
|
|
17
|
-
: GetSubtype<T> extends AccountQueryRq ? { AccountQueryRs: AccountQueryRs }
|
|
18
|
-
: unknown;
|