@smartbills/sdk 0.0.2-alpha.45 → 0.0.2-alpha.46
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/dist/@types/client/SBClient.d.ts +2 -0
- package/dist/@types/entities/businesses/brands/SBBusinessBrand.d.ts +11 -0
- package/dist/@types/entities/businesses/brands/SBBusinessBrand.d.ts.map +1 -0
- package/dist/@types/index.d.ts +2 -0
- package/dist/@types/services/businesses/brands/BrandCreateRequest.d.ts +16 -0
- package/dist/@types/services/businesses/brands/BrandCreateRequest.d.ts.map +1 -0
- package/dist/@types/services/businesses/brands/BrandService.d.ts +31 -0
- package/dist/@types/services/businesses/brands/BrandService.d.ts.map +1 -0
- package/dist/@types/services/vendors/VendorConnectRequest.d.ts +11 -0
- package/dist/@types/services/vendors/VendorConnectResponse.d.ts +1 -1
- package/dist/@types/services/vendors/VendorService.d.ts +2 -0
- package/dist/cjs/client/SBClient.cjs +3 -1
- package/dist/cjs/client/SBClient.cjs.map +1 -1
- package/dist/cjs/index.cjs +2 -0
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/packages/sdk/package.json.cjs +1 -1
- package/dist/cjs/services/businesses/BusinessService.cjs.map +1 -1
- package/dist/cjs/services/businesses/brands/BrandService.cjs +33 -0
- package/dist/cjs/services/businesses/brands/BrandService.cjs.map +1 -0
- package/dist/cjs/services/vendors/VendorService.cjs +6 -0
- package/dist/cjs/services/vendors/VendorService.cjs.map +1 -1
- package/dist/esm/client/SBClient.mjs +3 -1
- package/dist/esm/client/SBClient.mjs.map +1 -1
- package/dist/esm/index.mjs +1 -0
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/packages/sdk/package.json.mjs +1 -1
- package/dist/esm/services/businesses/BusinessService.mjs.map +1 -1
- package/dist/esm/services/businesses/brands/BrandService.mjs +31 -0
- package/dist/esm/services/businesses/brands/BrandService.mjs.map +1 -0
- package/dist/esm/services/vendors/VendorService.mjs +6 -0
- package/dist/esm/services/vendors/VendorService.mjs.map +1 -1
- package/dist/umd/index.js +36 -2
- package/dist/umd/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -29,6 +29,7 @@ import { ExpenseService } from '../services/expenses/ExpenseService.js';
|
|
|
29
29
|
import { VendorService } from '../services/vendors/VendorService.js';
|
|
30
30
|
import { NotificationService } from '../services/notifications/NotificationService.js';
|
|
31
31
|
import { LoyaltyProgramService } from '../services/loyalty/LoyaltyProgramService.js';
|
|
32
|
+
import { BrandService } from '../services/businesses/brands/BrandService.js';
|
|
32
33
|
|
|
33
34
|
declare class SBClient {
|
|
34
35
|
logger: SBLogger;
|
|
@@ -46,6 +47,7 @@ declare class SBClient {
|
|
|
46
47
|
explore: ExploreService;
|
|
47
48
|
invoices: InvoiceService;
|
|
48
49
|
businesses: BusinessService;
|
|
50
|
+
brands: BrandService;
|
|
49
51
|
notifications: NotificationService;
|
|
50
52
|
oauth: OAuthService;
|
|
51
53
|
loyaltyPrograms: LoyaltyProgramService;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ITimestamp } from '../../../interfaces/ITimestamp.js';
|
|
2
|
+
import { SBEntity } from '../../base.js';
|
|
3
|
+
|
|
4
|
+
interface SBBusinessBrand extends SBEntity, ITimestamp {
|
|
5
|
+
active: boolean;
|
|
6
|
+
name: string;
|
|
7
|
+
phoneNumber: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export type { SBBusinessBrand };
|
|
11
|
+
//# sourceMappingURL=SBBusinessBrand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SBBusinessBrand.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/@types/index.d.ts
CHANGED
|
@@ -199,6 +199,8 @@ export { CustomerPaymentMethodCreateRequest } from './services/businesses/custom
|
|
|
199
199
|
export { CustomerPaymentMethodListRequest } from './services/businesses/customers/payment-methods/CustomerPaymentMethodListRequest.js';
|
|
200
200
|
export { CustomerPaymentMethodUpdateRequest } from './services/businesses/customers/payment-methods/CustomerPaymentMethodUpdateRequest.js';
|
|
201
201
|
export { CustomerPaymentMethodService } from './services/businesses/customers/payment-methods/CustomerPaymentMethodService.js';
|
|
202
|
+
export { BrandService } from './services/businesses/brands/BrandService.js';
|
|
203
|
+
export { BrandCreateRequest } from './services/businesses/brands/BrandCreateRequest.js';
|
|
202
204
|
export { LocationBatchUpsertRequest } from './services/businesses/locations/LocationBatchUpsertRequest.js';
|
|
203
205
|
export { LocationCreateRequest } from './services/businesses/locations/LocationCreateRequest.js';
|
|
204
206
|
export { LocationService } from './services/businesses/locations/LocationService.js';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface BrandCreateRequest {
|
|
2
|
+
businessId: number;
|
|
3
|
+
logo: File;
|
|
4
|
+
icon: File;
|
|
5
|
+
primaryColor: string;
|
|
6
|
+
secondaryColor: string;
|
|
7
|
+
facebook?: string;
|
|
8
|
+
instagram?: string;
|
|
9
|
+
linkedIn?: string;
|
|
10
|
+
twitter?: string;
|
|
11
|
+
youtube?: string;
|
|
12
|
+
tiktok?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type { BrandCreateRequest };
|
|
16
|
+
//# sourceMappingURL=BrandCreateRequest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BrandCreateRequest.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { SBRequestOptions } from '../../../client/SBRequestOption.js';
|
|
2
|
+
import { SBServiceOptions } from '../../../client/SBServiceOptions.js';
|
|
3
|
+
import { AxiosRequestConfig } from 'axios';
|
|
4
|
+
import { SBService } from '../../SBService.js';
|
|
5
|
+
import { INestedCreatable } from '../../../interfaces/ICreatable.js';
|
|
6
|
+
import { SBBusinessBrand } from '../../../entities/businesses/brands/SBBusinessBrand.js';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Service for managing vendors in the Smartbills system
|
|
10
|
+
* Provides functionality for CRUD operations on vendors
|
|
11
|
+
* @implements INestedCreatable<VendorCreateRequest, SBBusinessBrand> - Allows creating new vendors
|
|
12
|
+
*/
|
|
13
|
+
declare class BrandService extends SBService implements INestedCreatable<FormData, SBBusinessBrand> {
|
|
14
|
+
/**
|
|
15
|
+
* Creates a new instance of the brand service
|
|
16
|
+
* @param options - Service configuration options
|
|
17
|
+
*/
|
|
18
|
+
constructor(options?: SBServiceOptions);
|
|
19
|
+
/**
|
|
20
|
+
* Creates a new vendor
|
|
21
|
+
* @param businessId - The business ID
|
|
22
|
+
* @param request - Vendor creation request data
|
|
23
|
+
* @param options - Request options
|
|
24
|
+
* @param config - Axios request configuration
|
|
25
|
+
* @returns Promise that resolves with the created vendor
|
|
26
|
+
*/
|
|
27
|
+
createAsync(businessId: number, request: FormData, options?: SBRequestOptions, config?: AxiosRequestConfig<FormData>): Promise<SBBusinessBrand>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { BrandService };
|
|
31
|
+
//# sourceMappingURL=BrandService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BrandService.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
interface VendorConnectRequest {
|
|
2
|
+
/**
|
|
3
|
+
* Public token received from Deck
|
|
4
|
+
*/
|
|
2
5
|
publicToken: string;
|
|
6
|
+
/**
|
|
7
|
+
* Link token received from Deck
|
|
8
|
+
*/
|
|
9
|
+
linkToken: string;
|
|
10
|
+
/**
|
|
11
|
+
* ID of the business associated with the Deck connection
|
|
12
|
+
*/
|
|
13
|
+
businessId?: number;
|
|
3
14
|
}
|
|
4
15
|
|
|
5
16
|
export type { VendorConnectRequest };
|
|
@@ -25,6 +25,8 @@ declare class VendorService extends SBService implements IRetrievableById<SBVend
|
|
|
25
25
|
deleteAsync(id: number, options?: SBRequestOptions, config?: AxiosRequestConfig): Promise<SBVendor>;
|
|
26
26
|
getLinkToken(options?: SBRequestOptions, config?: AxiosRequestConfig): Promise<VendorConnectResponse>;
|
|
27
27
|
connectAsync(request: VendorConnectRequest, options?: SBRequestOptions, config?: AxiosRequestConfig<VendorConnectRequest>): Promise<SBVendor>;
|
|
28
|
+
disconnectAsync(vendorId: number, options?: SBRequestOptions, config?: AxiosRequestConfig): Promise<SBVendor>;
|
|
29
|
+
getConnectionByIdAsync(id: number, options?: SBRequestOptions, config?: AxiosRequestConfig): Promise<SBVendor>;
|
|
28
30
|
manualRefresh(id: number, options?: SBRequestOptions, config?: AxiosRequestConfig): Promise<void>;
|
|
29
31
|
}
|
|
30
32
|
|
|
@@ -16,6 +16,7 @@ var BusinessService = require('../services/businesses/BusinessService.cjs');
|
|
|
16
16
|
var SBServiceOptions = require('./SBServiceOptions.cjs');
|
|
17
17
|
require('query-string');
|
|
18
18
|
require('axios');
|
|
19
|
+
var BrandService = require('../services/businesses/brands/BrandService.cjs');
|
|
19
20
|
var TableService = require('../services/businesses/tables/TableService.cjs');
|
|
20
21
|
var PaymentMethodService = require('../services/payment-methods/PaymentMethodService.cjs');
|
|
21
22
|
var ReceiptService = require('../services/receipts/ReceiptService.cjs');
|
|
@@ -70,6 +71,7 @@ class SBClient {
|
|
|
70
71
|
defineProperty.default(this, "explore", void 0);
|
|
71
72
|
defineProperty.default(this, "invoices", void 0);
|
|
72
73
|
defineProperty.default(this, "businesses", void 0);
|
|
74
|
+
defineProperty.default(this, "brands", void 0);
|
|
73
75
|
defineProperty.default(this, "notifications", void 0);
|
|
74
76
|
defineProperty.default(this, "oauth", void 0);
|
|
75
77
|
defineProperty.default(this, "loyaltyPrograms", void 0);
|
|
@@ -177,7 +179,7 @@ class SBClient {
|
|
|
177
179
|
logger: this.logger,
|
|
178
180
|
url: this.options?.endpoints?.api
|
|
179
181
|
});
|
|
180
|
-
this.
|
|
182
|
+
this.brands = new BrandService.BrandService({
|
|
181
183
|
...this.options,
|
|
182
184
|
logger: this.logger,
|
|
183
185
|
url: this.options?.endpoints?.api
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SBClient.cjs","sources":["../../../src/client/SBClient.ts"],"sourcesContent":["import { ApiLogService } from \"@/services/api-logs\";\nimport { BankAccountService } from \"@/services/banks/accounts\";\nimport { BankTransactionService } from \"@/services/banks/transactions\";\nimport { BankService } from \"@/services/banks\";\nimport { CardService } from \"@/services/cards/CardService\";\nimport { DocumentService } from \"@/services/documents\";\nimport { DomainService } from \"@/services/businesses/domains\";\nimport { DepartmentService } from \"@/services/businesses/departments\";\nimport { FriendService } from \"@/services/friends/FriendService\";\nimport { OAuthService } from \"@/services/oauth\";\nimport { BusinessService } from \"@/services/businesses\";\nimport { PaymentMethodService } from \"@/services/payment-methods\";\nimport { ReceiptService } from \"@/services/receipts\";\nimport { SettlementService } from \"@/services/settlements\";\nimport { TransactionService } from \"@/services/transactions\";\nimport { CurrentUserService } from \"@/services/user\";\nimport { UserService } from \"@/services/users\";\nimport { v4 } from \"uuid\";\nimport { SBClientOptions } from \"./SBClientOptions\";\nimport { SBCredentialProvider } from \"./SBCredentials\";\nimport { SBLogger } from \"./SBLogger\";\nimport { defaultAPIServiceOptions } from \"./SBServiceOptions\";\nimport { API_URL } from \"./constants\";\nimport { ExploreService } from \"../services/explore\";\nimport {\n\tBankInstitutionService,\n\tInvoiceService,\n\tLoyaltyProgramService,\n\tNotificationService,\n} from \"@/services\";\nimport { AttachmentService } from \"@/services/attachments\";\nimport { SubscriptionService } from \"@/services/billing/subscriptions/SubscriptionService\";\nimport { IntegrationService } from \"@/services/integrations\";\nimport { TableService } from \"@/services/businesses/tables\";\nimport { ExpenseService } from \"@/services/expenses\";\nimport { VendorService } from \"@/services/vendors\";\n\n/**\n * Client for the Smartbills API.\n */\nconst defaultOptions: SBClientOptions = {\n\tendpoints: {\n\t\tapi: API_URL,\n\t\tauth: API_URL,\n\t},\n\tdebug: false,\n\tlogger: new SBLogger(false),\n\tsessionId: v4(),\n\tlocale: \"en\",\n};\n\nexport class SBClient {\n\tpublic logger: SBLogger;\n\tpublic options: SBClientOptions;\n\tpublic user: CurrentUserService;\n\tpublic logs: ApiLogService;\n\tpublic banks: BankService;\n\tpublic bankAccounts: BankAccountService;\n\tpublic bankInstitutions: BankInstitutionService;\n\tpublic bankTransactions: BankTransactionService;\n\tpublic cards: CardService;\n\tpublic documents: DocumentService;\n\tpublic domains: DomainService;\n\tpublic departments: DepartmentService;\n\tpublic explore: ExploreService;\n\tpublic invoices: InvoiceService;\n\tpublic businesses: BusinessService;\n\tpublic notifications: NotificationService;\n\n\tpublic oauth: OAuthService;\n\n\tpublic loyaltyPrograms: LoyaltyProgramService;\n\n\tpublic receipts: ReceiptService;\n\tpublic transactions: TransactionService;\n\tpublic paymentMethods: PaymentMethodService;\n\tpublic settlements: SettlementService;\n\tpublic friends: FriendService;\n\tpublic users: UserService;\n\tpublic attachments: AttachmentService;\n\n\tpublic subscriptions: SubscriptionService;\n\tpublic integrations: IntegrationService;\n\tpublic tables: TableService;\n\tpublic expenses: ExpenseService;\n\tpublic vendors: VendorService;\n\n\t/**\n\t * @constructor\n\t * Creates an instance of the Smartbills API client.\n\t */\n\tpublic constructor(options: SBClientOptions = defaultAPIServiceOptions) {\n\t\tthis.options = { ...defaultOptions, ...options };\n\t\tthis.logger = options.logger ?? new SBLogger(options.debug);\n\t\tthis.configureServices();\n\t\tthis.logger.log(options);\n\t}\n\n\tpublic async initialize() {\n\t\tif (this.options.credentials) {\n\t\t\tawait this.options.credentials?.getAccessToken(this.oauth);\n\t\t}\n\t}\n\n\tpublic get accessToken(): string {\n\t\treturn this.options?.credentials?.accessToken;\n\t}\n\n\tpublic get refreshToken(): string {\n\t\treturn this.options?.credentials?.refreshToken;\n\t}\n\n\tpublic setCredentials(credentials: SBCredentialProvider) {\n\t\tthis.options.credentials = credentials;\n\t\tthis.configureServices();\n\t}\n\n\tpublic setLocale(locale: string) {\n\t\tthis.options.locale = locale;\n\t}\n\n\tprotected configureServices() {\n\t\tthis.oauth = new OAuthService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.auth,\n\t\t});\n\t\tthis.cards = new CardService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\n\t\tthis.notifications = new NotificationService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.user = new CurrentUserService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.invoices = new InvoiceService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.logs = new ApiLogService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.banks = new BankService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.bankAccounts = new BankAccountService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.bankInstitutions = new BankInstitutionService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.bankTransactions = new BankTransactionService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\n\t\tthis.documents = new DocumentService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\n\t\tthis.friends = new FriendService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\n\t\tthis.businesses = new BusinessService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.businesses = new BusinessService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.departments = new DepartmentService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\n\t\tthis.explore = new ExploreService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\n\t\tthis.receipts = new ReceiptService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.transactions = new TransactionService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.paymentMethods = new PaymentMethodService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.settlements = new SettlementService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\n\t\tthis.users = new UserService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.attachments = new AttachmentService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.subscriptions = new SubscriptionService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.loyaltyPrograms = new LoyaltyProgramService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.integrations = new IntegrationService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.tables = new TableService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.expenses = new ExpenseService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.vendors = new VendorService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t}\n}\n"],"names":["defaultOptions","endpoints","api","API_URL","auth","debug","logger","SBLogger","sessionId","v4","locale","SBClient","constructor","options","defaultAPIServiceOptions","_defineProperty","configureServices","log","initialize","credentials","getAccessToken","oauth","accessToken","refreshToken","setCredentials","setLocale","OAuthService","url","cards","CardService","notifications","NotificationService","user","CurrentUserService","invoices","InvoiceService","logs","ApiLogService","banks","BankService","bankAccounts","BankAccountService","bankInstitutions","BankInstitutionService","bankTransactions","BankTransactionService","documents","DocumentService","friends","FriendService","businesses","BusinessService","departments","DepartmentService","explore","ExploreService","receipts","ReceiptService","transactions","TransactionService","paymentMethods","PaymentMethodService","settlements","SettlementService","users","UserService","attachments","AttachmentService","subscriptions","SubscriptionService","loyaltyPrograms","LoyaltyProgramService","integrations","IntegrationService","tables","TableService","expenses","ExpenseService","vendors","VendorService"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA;;AAEG;AACH,MAAMA,cAAc,GAAoB;AACvCC,EAAAA,SAAS,EAAE;AACVC,IAAAA,GAAG,EAAEC,iBAAO;AACZC,IAAAA,IAAI,EAAED;GACN;AACDE,EAAAA,KAAK,EAAE,KAAK;AACZC,EAAAA,MAAM,EAAE,IAAIC,iBAAQ,CAAC,KAAK,CAAC;EAC3BC,SAAS,EAAEC,OAAE,EAAE;AACfC,EAAAA,MAAM,EAAE;CACR;MAEYC,QAAQ,CAAA;AAoCpB;;;AAGG;AACHC,EAAAA,WAAAA,CAAmBC,UAA2BC,yCAAwB,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CAAClE,OAAO;MACfP,MAAM,EAAE,IAAI,CAACA,MAAM;AACnBqB,MAAAA,GAAG,EAAE,IAAI,CAACd,OAAO,EAAEZ,SAAS,EAAEC;AAC9B,KAAA,CAAC;AACH;AACA;;;;"}
|
|
1
|
+
{"version":3,"file":"SBClient.cjs","sources":["../../../src/client/SBClient.ts"],"sourcesContent":["import { ApiLogService } from \"@/services/api-logs\";\nimport { BankAccountService } from \"@/services/banks/accounts\";\nimport { BankTransactionService } from \"@/services/banks/transactions\";\nimport { BankService } from \"@/services/banks\";\nimport { CardService } from \"@/services/cards/CardService\";\nimport { DocumentService } from \"@/services/documents\";\nimport { DomainService } from \"@/services/businesses/domains\";\nimport { DepartmentService } from \"@/services/businesses/departments\";\nimport { FriendService } from \"@/services/friends/FriendService\";\nimport { OAuthService } from \"@/services/oauth\";\nimport { BrandService, BusinessService } from \"@/services/businesses\";\nimport { PaymentMethodService } from \"@/services/payment-methods\";\nimport { ReceiptService } from \"@/services/receipts\";\nimport { SettlementService } from \"@/services/settlements\";\nimport { TransactionService } from \"@/services/transactions\";\nimport { CurrentUserService } from \"@/services/user\";\nimport { UserService } from \"@/services/users\";\nimport { v4 } from \"uuid\";\nimport { SBClientOptions } from \"./SBClientOptions\";\nimport { SBCredentialProvider } from \"./SBCredentials\";\nimport { SBLogger } from \"./SBLogger\";\nimport { defaultAPIServiceOptions } from \"./SBServiceOptions\";\nimport { API_URL } from \"./constants\";\nimport { ExploreService } from \"../services/explore\";\nimport {\n\tBankInstitutionService,\n\tInvoiceService,\n\tLoyaltyProgramService,\n\tNotificationService,\n} from \"@/services\";\nimport { AttachmentService } from \"@/services/attachments\";\nimport { SubscriptionService } from \"@/services/billing/subscriptions/SubscriptionService\";\nimport { IntegrationService } from \"@/services/integrations\";\nimport { TableService } from \"@/services/businesses/tables\";\nimport { ExpenseService } from \"@/services/expenses\";\nimport { VendorService } from \"@/services/vendors\";\n\n/**\n * Client for the Smartbills API.\n */\nconst defaultOptions: SBClientOptions = {\n\tendpoints: {\n\t\tapi: API_URL,\n\t\tauth: API_URL,\n\t},\n\tdebug: false,\n\tlogger: new SBLogger(false),\n\tsessionId: v4(),\n\tlocale: \"en\",\n};\n\nexport class SBClient {\n\tpublic logger: SBLogger;\n\tpublic options: SBClientOptions;\n\tpublic user: CurrentUserService;\n\tpublic logs: ApiLogService;\n\tpublic banks: BankService;\n\tpublic bankAccounts: BankAccountService;\n\tpublic bankInstitutions: BankInstitutionService;\n\tpublic bankTransactions: BankTransactionService;\n\tpublic cards: CardService;\n\tpublic documents: DocumentService;\n\tpublic domains: DomainService;\n\tpublic departments: DepartmentService;\n\tpublic explore: ExploreService;\n\tpublic invoices: InvoiceService;\n\tpublic businesses: BusinessService;\n\tpublic brands: BrandService;\n\tpublic notifications: NotificationService;\n\n\tpublic oauth: OAuthService;\n\n\tpublic loyaltyPrograms: LoyaltyProgramService;\n\n\tpublic receipts: ReceiptService;\n\tpublic transactions: TransactionService;\n\tpublic paymentMethods: PaymentMethodService;\n\tpublic settlements: SettlementService;\n\tpublic friends: FriendService;\n\tpublic users: UserService;\n\tpublic attachments: AttachmentService;\n\n\tpublic subscriptions: SubscriptionService;\n\tpublic integrations: IntegrationService;\n\tpublic tables: TableService;\n\tpublic expenses: ExpenseService;\n\tpublic vendors: VendorService;\n\n\t/**\n\t * @constructor\n\t * Creates an instance of the Smartbills API client.\n\t */\n\tpublic constructor(options: SBClientOptions = defaultAPIServiceOptions) {\n\t\tthis.options = { ...defaultOptions, ...options };\n\t\tthis.logger = options.logger ?? new SBLogger(options.debug);\n\t\tthis.configureServices();\n\t\tthis.logger.log(options);\n\t}\n\n\tpublic async initialize() {\n\t\tif (this.options.credentials) {\n\t\t\tawait this.options.credentials?.getAccessToken(this.oauth);\n\t\t}\n\t}\n\n\tpublic get accessToken(): string {\n\t\treturn this.options?.credentials?.accessToken;\n\t}\n\n\tpublic get refreshToken(): string {\n\t\treturn this.options?.credentials?.refreshToken;\n\t}\n\n\tpublic setCredentials(credentials: SBCredentialProvider) {\n\t\tthis.options.credentials = credentials;\n\t\tthis.configureServices();\n\t}\n\n\tpublic setLocale(locale: string) {\n\t\tthis.options.locale = locale;\n\t}\n\n\tprotected configureServices() {\n\t\tthis.oauth = new OAuthService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.auth,\n\t\t});\n\t\tthis.cards = new CardService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\n\t\tthis.notifications = new NotificationService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.user = new CurrentUserService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.invoices = new InvoiceService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.logs = new ApiLogService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.banks = new BankService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.bankAccounts = new BankAccountService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.bankInstitutions = new BankInstitutionService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.bankTransactions = new BankTransactionService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\n\t\tthis.documents = new DocumentService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\n\t\tthis.friends = new FriendService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\n\t\tthis.businesses = new BusinessService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.brands = new BrandService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.departments = new DepartmentService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\n\t\tthis.explore = new ExploreService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\n\t\tthis.receipts = new ReceiptService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.transactions = new TransactionService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.paymentMethods = new PaymentMethodService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.settlements = new SettlementService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\n\t\tthis.users = new UserService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.attachments = new AttachmentService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.subscriptions = new SubscriptionService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.loyaltyPrograms = new LoyaltyProgramService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.integrations = new IntegrationService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.tables = new TableService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.expenses = new ExpenseService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.vendors = new VendorService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t}\n}\n"],"names":["defaultOptions","endpoints","api","API_URL","auth","debug","logger","SBLogger","sessionId","v4","locale","SBClient","constructor","options","defaultAPIServiceOptions","_defineProperty","configureServices","log","initialize","credentials","getAccessToken","oauth","accessToken","refreshToken","setCredentials","setLocale","OAuthService","url","cards","CardService","notifications","NotificationService","user","CurrentUserService","invoices","InvoiceService","logs","ApiLogService","banks","BankService","bankAccounts","BankAccountService","bankInstitutions","BankInstitutionService","bankTransactions","BankTransactionService","documents","DocumentService","friends","FriendService","businesses","BusinessService","brands","BrandService","departments","DepartmentService","explore","ExploreService","receipts","ReceiptService","transactions","TransactionService","paymentMethods","PaymentMethodService","settlements","SettlementService","users","UserService","attachments","AttachmentService","subscriptions","SubscriptionService","loyaltyPrograms","LoyaltyProgramService","integrations","IntegrationService","tables","TableService","expenses","ExpenseService","vendors","VendorService"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA;;AAEG;AACH,MAAMA,cAAc,GAAoB;AACvCC,EAAAA,SAAS,EAAE;AACVC,IAAAA,GAAG,EAAEC,iBAAO;AACZC,IAAAA,IAAI,EAAED;GACN;AACDE,EAAAA,KAAK,EAAE,KAAK;AACZC,EAAAA,MAAM,EAAE,IAAIC,iBAAQ,CAAC,KAAK,CAAC;EAC3BC,SAAS,EAAEC,OAAE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AAE,IAAI,CAACA,MAAM;AACnBqB,MAAAA,GAAG,EAAE,IAAI,CAACd,OAAO,EAAEZ,SAAS,EAAEC;AAC9B,KAAA,CAAC;AACF,IAAA,IAAI,CAAC8E,OAAO,GAAG,IAAIC,2BAAa,CAAC;MAChC,GAAG,IAAI,CAACpE,OAAO;MACfP,MAAM,EAAE,IAAI,CAACA,MAAM;AACnBqB,MAAAA,GAAG,EAAE,IAAI,CAACd,OAAO,EAAEZ,SAAS,EAAEC;AAC9B,KAAA,CAAC;AACH;AACA;;;;"}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -40,6 +40,7 @@ var CardService = require('./services/cards/CardService.cjs');
|
|
|
40
40
|
var BusinessService = require('./services/businesses/BusinessService.cjs');
|
|
41
41
|
var CustomerService = require('./services/businesses/customers/CustomerService.cjs');
|
|
42
42
|
var CustomerPaymentMethodService = require('./services/businesses/customers/payment-methods/CustomerPaymentMethodService.cjs');
|
|
43
|
+
var BrandService = require('./services/businesses/brands/BrandService.cjs');
|
|
43
44
|
var LocationService = require('./services/businesses/locations/LocationService.cjs');
|
|
44
45
|
var PriceService = require('./services/businesses/prices/PriceService.cjs');
|
|
45
46
|
var ProductService = require('./services/businesses/products/ProductService.cjs');
|
|
@@ -184,6 +185,7 @@ exports.CardService = CardService.CardService;
|
|
|
184
185
|
exports.BusinessService = BusinessService.BusinessService;
|
|
185
186
|
exports.CustomerService = CustomerService.CustomerService;
|
|
186
187
|
exports.CustomerPaymentMethodService = CustomerPaymentMethodService.CustomerPaymentMethodService;
|
|
188
|
+
exports.BrandService = BrandService.BrandService;
|
|
187
189
|
exports.LocationService = LocationService.LocationService;
|
|
188
190
|
exports.PriceService = PriceService.PriceService;
|
|
189
191
|
exports.ProductService = ProductService.ProductService;
|
package/dist/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BusinessService.cjs","sources":["../../../../src/services/businesses/BusinessService.ts"],"sourcesContent":["import { SBRequestOptions } from \"@/client/SBRequestOption\";\nimport {\n\tSBServiceOptions,\n\tdefaultAPIServiceOptions,\n} from \"@/client/SBServiceOptions\";\nimport { AxiosRequestConfig } from \"axios\";\nimport { SBService } from \"@/services/SBService\";\nimport { SBBusiness } from \"@/entities/businesses/SBBusiness\";\nimport { ICreatable } from \"@/interfaces/ICreatable\";\nimport { IDeletable } from \"@/interfaces/IDeletable\";\nimport { IUpdatable } from \"@/interfaces/IUpdatable\";\nimport { BusinessCreateRequest } from \"./BusinessCreateRequest\";\nimport { BusinessListRequest } from \"./BusinessListRequest\";\nimport { BusinessUpdateRequest } from \"./BusinessUpdateRequest\";\nimport { IRetrievableById } from \"@/interfaces\";\nimport { SBList } from \"@/entities/base\";\nimport { CustomerPaymentMethodService, CustomerService } from \"./customers\";\nimport { FeeService } from \"./fees\";\nimport { LocationService } from \"./locations\";\nimport {\n\tProductImageService,\n\tProductModifierService,\n\tProductOptionService,\n\tProductService,\n\tProductVariantService,\n} from \"./products\";\nimport { PromoCodeService } from \"./promo-codes\";\nimport { BusinessReviewService } from \"./reviews\";\nimport { TaxService } from \"./taxes\";\nimport { BusinessVendorService } from \"./vendors\";\nimport { CustomerBalanceTransactionService } from \"./customers/balance-transactions/CustomerBalanceTransactionService\";\nimport { SBTeamMember } from \"@/entities\";\nimport {\n\tTeamMemberInvitationService,\n\tTeamMemberListRequest,\n\tTeamMemberService,\n} from \"./team\";\nimport { DepartmentService } from \"./departments\";\nimport { BusinessInvitationRequest } from \"./BusinessInvitationRequest\";\n\nexport class BusinessService\n\textends SBService\n\timplements\n\t\tIRetrievableById<SBBusiness>,\n\t\tICreatable<BusinessCreateRequest, SBBusiness>,\n\t\tIUpdatable<BusinessUpdateRequest, SBBusiness>,\n\t\tIDeletable<SBBusiness>\n{\n\tpublic readonly departments: DepartmentService;\n\tpublic readonly teamMembers: TeamMemberService;\n\tpublic readonly locations: LocationService;\n\tpublic readonly customers: CustomerService;\n\tpublic readonly customerPaymentMethods: CustomerPaymentMethodService;\n\tpublic readonly customerBalanceTransactions: CustomerBalanceTransactionService;\n\tpublic readonly fees: FeeService;\n\tpublic readonly taxes: TaxService;\n\tpublic readonly reviews: BusinessReviewService;\n\tpublic readonly products: ProductService;\n\tpublic readonly productVariants: ProductVariantService;\n\tpublic readonly productOptions: ProductOptionService;\n\tpublic readonly productModifiers: ProductModifierService;\n\tpublic readonly productImages: ProductImageService;\n\tpublic readonly promoCodes: PromoCodeService;\n\tpublic readonly vendors: BusinessVendorService;\n\n\tpublic constructor(options: SBServiceOptions = defaultAPIServiceOptions) {\n\t\tsuper(options);\n\t\tthis.teamMembers = new TeamMemberService(options);\n\t\tthis.locations = new LocationService(options);\n\t\tthis.customers = new CustomerService(options);\n\t\tthis.customerPaymentMethods = new CustomerPaymentMethodService(options);\n\t\tthis.customerBalanceTransactions =\n\t\t\tnew CustomerBalanceTransactionService(options);\n\t\tthis.fees = new FeeService(options);\n\t\tthis.taxes = new TaxService(options);\n\t\tthis.vendors = new BusinessVendorService(options);\n\t\tthis.reviews = new BusinessReviewService(options);\n\t\tthis.products = new ProductService(options);\n\t\tthis.productVariants = new ProductVariantService(options);\n\t\tthis.productOptions = new ProductOptionService(options);\n\t\tthis.productModifiers = new ProductModifierService(options);\n\t\tthis.productImages = new ProductImageService(options);\n\t\tthis.promoCodes = new PromoCodeService(options);\n\t\tthis.departments = new DepartmentService(options);\n\t}\n\n\tpublic async getByIdAsync(\n\t\tid: number,\n\t\toptions?: SBRequestOptions,\n\t\tconfig?: AxiosRequestConfig,\n\t): Promise<SBBusiness> {\n\t\treturn this.getEntityById(`/v1/businesses/${id}`, options, config);\n\t}\n\n\tpublic async listAsync(\n\t\trequest?: BusinessListRequest,\n\t\toptions?: SBRequestOptions,\n\t\tconfig?: AxiosRequestConfig,\n\t): Promise<SBList<SBBusiness>> {\n\t\treturn this.listEntities(\n\t\t\t\"/v1/businesses\",\n\t\t\trequest || { page: 1, pageSize: 25 },\n\t\t\toptions,\n\t\t\tconfig,\n\t\t);\n\t}\n\n\tpublic async search(\n\t\trequest: BusinessListRequest,\n\t\toptions?: SBRequestOptions,\n\t\tconfig?: AxiosRequestConfig,\n\t): Promise<SBList<SBBusiness>> {\n\t\treturn this.listEntities(\n\t\t\t\"/v1/businesses/search\",\n\t\t\trequest,\n\t\t\toptions,\n\t\t\tconfig,\n\t\t);\n\t}\n\n\tpublic async createAsync(\n\t\trequest: BusinessCreateRequest,\n\t\toptions?: SBRequestOptions,\n\t\tconfig?: AxiosRequestConfig,\n\t): Promise<SBBusiness> {\n\t\treturn this.createEntity(\"/v1/businesses\", request, options, config);\n\t}\n\n\tpublic async updateAsync(\n\t\tid: number,\n\t\trequest: BusinessUpdateRequest,\n\t\toptions?: SBRequestOptions,\n\t\tconfig?: AxiosRequestConfig,\n\t): Promise<SBBusiness> {\n\t\treturn this.updateEntity(\n\t\t\t`/v1/businesses/${id}`,\n\t\t\trequest,\n\t\t\toptions,\n\t\t\tconfig,\n\t\t);\n\t}\n\n\tpublic async deleteAsync(\n\t\tid: number,\n\t\toptions?: SBRequestOptions,\n\t\tconfig?: AxiosRequestConfig,\n\t): Promise<SBBusiness> {\n\t\treturn this.deleteEntity(`/v1/businesses/${id}`, options, config);\n\t}\n\n\tpublic async count(\n\t\toptions?: SBRequestOptions,\n\t\tconfig?: AxiosRequestConfig,\n\t): Promise<number> {\n\t\treturn this.getEntityById(\"/v1/businesses/count\", options, config);\n\t}\n\n\tpublic async getMemberById(\n\t\tbusinessId: number,\n\t\tid: number,\n\t\toptions?: SBRequestOptions,\n\t\tconfig: AxiosRequestConfig = {},\n\t): Promise<SBTeamMember> {\n\t\treturn await this.teamMembers.getByIdAsync(\n\t\t\tbusinessId,\n\t\t\tid,\n\t\t\toptions,\n\t\t\tconfig,\n\t\t);\n\t}\n\n\tpublic async listMembers(\n\t\tbusinessId: number,\n\t\trequest: TeamMemberListRequest,\n\t\toptions?: SBRequestOptions,\n\t\tconfig: AxiosRequestConfig = {},\n\t): Promise<SBList<SBTeamMember>> {\n\t\treturn await this.teamMembers.listAsync(\n\t\t\tbusinessId,\n\t\t\trequest,\n\t\t\toptions,\n\t\t\tconfig,\n\t\t);\n\t}\n\n\tpublic async deleteMember(\n\t\tbusinessId: number,\n\t\tid: number,\n\t\toptions?: SBRequestOptions,\n\t\tconfig: AxiosRequestConfig = {},\n\t): Promise<SBTeamMember> {\n\t\treturn await this.teamMembers.deleteAsync(\n\t\t\tbusinessId,\n\t\t\tid,\n\t\t\toptions,\n\t\t\tconfig,\n\t\t);\n\t}\n\n\tpublic async batchInviteMemberAsync(\n\t\tbusinessId: number,\n\t\trequest: BusinessInvitationRequest[],\n\t\toptions?: SBRequestOptions,\n\t\tconfig?: AxiosRequestConfig,\n\t): Promise<any> {\n\t\treturn await this.createEntity(\n\t\t\t`/v1/business/${businessId}/invitations/batch`,\n\t\t\trequest,\n\t\t\toptions,\n\t\t\tconfig,\n\t\t);\n\t}\n}\n"],"names":["BusinessService","SBService","constructor","options","defaultAPIServiceOptions","_defineProperty","teamMembers","TeamMemberService","locations","LocationService","customers","CustomerService","customerPaymentMethods","CustomerPaymentMethodService","customerBalanceTransactions","CustomerBalanceTransactionService","fees","FeeService","taxes","TaxService","vendors","BusinessVendorService","reviews","BusinessReviewService","products","ProductService","productVariants","ProductVariantService","productOptions","ProductOptionService","productModifiers","ProductModifierService","productImages","ProductImageService","promoCodes","PromoCodeService","departments","DepartmentService","getByIdAsync","id","config","getEntityById","listAsync","request","listEntities","page","pageSize","search","createAsync","createEntity","updateAsync","updateEntity","deleteAsync","deleteEntity","count","getMemberById","businessId","listMembers","deleteMember","batchInviteMemberAsync"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAwCM,MAAOA,eACZ,SAAQC,mBAAS,CAAA;AAwBjBC,EAAAA,WAAAA,CAAmBC,UAA4BC,yCAAwB,EAAA;IACtE,KAAK,CAACD,OAAO,CAAC;IAACE,sBAAA,CAAA,IAAA,EAAA,aAAA,EAAA,KAAA,CAAA,CAAA;IAAAA,sBAAA,CAAA,IAAA,EAAA,aAAA,EAAA,KAAA,CAAA,CAAA;IAAAA,sBAAA,CAAA,IAAA,EAAA,WAAA,EAAA,KAAA,CAAA,CAAA;IAAAA,sBAAA,CAAA,IAAA,EAAA,WAAA,EAAA,KAAA,CAAA,CAAA;IAAAA,sBAAA,CAAA,IAAA,EAAA,wBAAA,EAAA,KAAA,CAAA,CAAA;IAAAA,sBAAA,CAAA,IAAA,EAAA,6BAAA,EAAA,KAAA,CAAA,CAAA;IAAAA,sBAAA,CAAA,IAAA,EAAA,MAAA,EAAA,KAAA,CAAA,CAAA;IAAAA,sBAAA,CAAA,IAAA,EAAA,OAAA,EAAA,KAAA,CAAA,CAAA;IAAAA,sBAAA,CAAA,IAAA,EAAA,SAAA,EAAA,KAAA,CAAA,CAAA;IAAAA,sBAAA,CAAA,IAAA,EAAA,UAAA,EAAA,KAAA,CAAA,CAAA;IAAAA,sBAAA,CAAA,IAAA,EAAA,iBAAA,EAAA,KAAA,CAAA,CAAA;IAAAA,sBAAA,CAAA,IAAA,EAAA,gBAAA,EAAA,KAAA,CAAA,CAAA;IAAAA,sBAAA,CAAA,IAAA,EAAA,kBAAA,EAAA,KAAA,CAAA,CAAA;IAAAA,sBAAA,CAAA,IAAA,EAAA,eAAA,EAAA,KAAA,CAAA,CAAA;IAAAA,sBAAA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AEpC,OAAO,EAAEqC,MAAM,CAAC;AAClE;AAEO,EAAA,MAAMc,KAAKA,CACjBnD,OAA0B,EAC1BqC,MAA2B,EAAA;IAE3B,OAAO,IAAI,CAACC,aAAa,CAAC,sBAAsB,EAAEtC,OAAO,EAAEqC,MAAM,CAAC;AACnE;AAEO,EAAA,MAAMe,aAAaA,CACzBC,UAAkB,EAClBjB,EAAU,EACVpC,OAA0B,EAC1BqC,MAAA,GAA6B,EAAE,EAAA;AAE/B,IAAA,OAAO,MAAM,IAAI,CAAClC,WAAW,CAACgC,YAAY,CACzCkB,UAAU,EACVjB,EAAE,EACFpC,OAAO,EACPqC,MAAM,CACN;AACF;AAEO,EAAA,MAAMiB,WAAWA,CACvBD,UAAkB,EAClBb,OAA8B,EAC9BxC,OAA0B,EAC1BqC,MAAA,GAA6B,EAAE,EAAA;AAE/B,IAAA,OAAO,MAAM,IAAI,CAAClC,WAAW,CAACoC,SAAS,CACtCc,UAAU,EACVb,OAAO,EACPxC,OAAO,EACPqC,MAAM,CACN;AACF;AAEO,EAAA,MAAMkB,YAAYA,CACxBF,UAAkB,EAClBjB,EAAU,EACVpC,OAA0B,EAC1BqC,MAAA,GAA6B,EAAE,EAAA;AAE/B,IAAA,OAAO,MAAM,IAAI,CAAClC,WAAW,CAAC8C,WAAW,CACxCI,UAAU,EACVjB,EAAE,EACFpC,OAAO,EACPqC,MAAM,CACN;AACF;EAEO,MAAMmB,sBAAsBA,CAClCH,UAAkB,EAClBb,OAAoC,EACpCxC,OAA0B,EAC1BqC,MAA2B,EAAA;AAE3B,IAAA,OAAO,MAAM,IAAI,CAACS,YAAY,CAC7B,CAAgBO,aAAAA,EAAAA,UAAU,CAAoB,kBAAA,CAAA,EAC9Cb,OAAO,EACPxC,OAAO,EACPqC,MAAM,CACN;AACF;AACA;;;;"}
|
|
1
|
+
{"version":3,"file":"BusinessService.cjs","sources":["../../../../src/services/businesses/BusinessService.ts"],"sourcesContent":["import { SBRequestOptions } from \"@/client/SBRequestOption\";\nimport {\n\tSBServiceOptions,\n\tdefaultAPIServiceOptions,\n} from \"@/client/SBServiceOptions\";\nimport { AxiosRequestConfig } from \"axios\";\nimport { SBService } from \"@/services/SBService\";\nimport { SBBusiness } from \"@/entities/businesses/SBBusiness\";\nimport { ICreatable } from \"@/interfaces/ICreatable\";\nimport { IDeletable } from \"@/interfaces/IDeletable\";\nimport { IUpdatable } from \"@/interfaces/IUpdatable\";\nimport { BusinessCreateRequest } from \"./BusinessCreateRequest\";\nimport { BusinessListRequest } from \"./BusinessListRequest\";\nimport { BusinessUpdateRequest } from \"./BusinessUpdateRequest\";\nimport { IRetrievableById } from \"@/interfaces\";\nimport { SBList } from \"@/entities/base\";\nimport { CustomerPaymentMethodService, CustomerService } from \"./customers\";\nimport { FeeService } from \"./fees\";\nimport { LocationService } from \"./locations\";\nimport {\n\tProductImageService,\n\tProductModifierService,\n\tProductOptionService,\n\tProductService,\n\tProductVariantService,\n} from \"./products\";\nimport { PromoCodeService } from \"./promo-codes\";\nimport { BusinessReviewService } from \"./reviews\";\nimport { TaxService } from \"./taxes\";\nimport { BusinessVendorService } from \"./vendors\";\nimport { CustomerBalanceTransactionService } from \"./customers/balance-transactions/CustomerBalanceTransactionService\";\nimport { SBTeamMember } from \"@/entities\";\nimport {\n\tTeamMemberInvitationService,\n\tTeamMemberListRequest,\n\tTeamMemberService,\n} from \"./team\";\nimport { DepartmentService } from \"./departments\";\nimport { BusinessInvitationRequest } from \"./BusinessInvitationRequest\";\nimport { BrandService } from \"./brands\";\n\nexport class BusinessService\n\textends SBService\n\timplements\n\t\tIRetrievableById<SBBusiness>,\n\t\tICreatable<BusinessCreateRequest, SBBusiness>,\n\t\tIUpdatable<BusinessUpdateRequest, SBBusiness>,\n\t\tIDeletable<SBBusiness>\n{\n\tpublic readonly departments: DepartmentService;\n\tpublic readonly teamMembers: TeamMemberService;\n\tpublic readonly locations: LocationService;\n\tpublic readonly customers: CustomerService;\n\tpublic readonly customerPaymentMethods: CustomerPaymentMethodService;\n\tpublic readonly customerBalanceTransactions: CustomerBalanceTransactionService;\n\tpublic readonly fees: FeeService;\n\tpublic readonly taxes: TaxService;\n\tpublic readonly reviews: BusinessReviewService;\n\tpublic readonly products: ProductService;\n\tpublic readonly productVariants: ProductVariantService;\n\tpublic readonly productOptions: ProductOptionService;\n\tpublic readonly productModifiers: ProductModifierService;\n\tpublic readonly productImages: ProductImageService;\n\tpublic readonly promoCodes: PromoCodeService;\n\tpublic readonly vendors: BusinessVendorService;\n\n\tpublic constructor(options: SBServiceOptions = defaultAPIServiceOptions) {\n\t\tsuper(options);\n\t\tthis.teamMembers = new TeamMemberService(options);\n\t\tthis.locations = new LocationService(options);\n\t\tthis.customers = new CustomerService(options);\n\t\tthis.customerPaymentMethods = new CustomerPaymentMethodService(options);\n\t\tthis.customerBalanceTransactions =\n\t\t\tnew CustomerBalanceTransactionService(options);\n\t\tthis.fees = new FeeService(options);\n\t\tthis.taxes = new TaxService(options);\n\t\tthis.vendors = new BusinessVendorService(options);\n\t\tthis.reviews = new BusinessReviewService(options);\n\t\tthis.products = new ProductService(options);\n\t\tthis.productVariants = new ProductVariantService(options);\n\t\tthis.productOptions = new ProductOptionService(options);\n\t\tthis.productModifiers = new ProductModifierService(options);\n\t\tthis.productImages = new ProductImageService(options);\n\t\tthis.promoCodes = new PromoCodeService(options);\n\t\tthis.departments = new DepartmentService(options);\n\t}\n\n\tpublic async getByIdAsync(\n\t\tid: number,\n\t\toptions?: SBRequestOptions,\n\t\tconfig?: AxiosRequestConfig,\n\t): Promise<SBBusiness> {\n\t\treturn this.getEntityById(`/v1/businesses/${id}`, options, config);\n\t}\n\n\tpublic async listAsync(\n\t\trequest?: BusinessListRequest,\n\t\toptions?: SBRequestOptions,\n\t\tconfig?: AxiosRequestConfig,\n\t): Promise<SBList<SBBusiness>> {\n\t\treturn this.listEntities(\n\t\t\t\"/v1/businesses\",\n\t\t\trequest || { page: 1, pageSize: 25 },\n\t\t\toptions,\n\t\t\tconfig,\n\t\t);\n\t}\n\n\tpublic async search(\n\t\trequest: BusinessListRequest,\n\t\toptions?: SBRequestOptions,\n\t\tconfig?: AxiosRequestConfig,\n\t): Promise<SBList<SBBusiness>> {\n\t\treturn this.listEntities(\n\t\t\t\"/v1/businesses/search\",\n\t\t\trequest,\n\t\t\toptions,\n\t\t\tconfig,\n\t\t);\n\t}\n\n\tpublic async createAsync(\n\t\trequest: BusinessCreateRequest,\n\t\toptions?: SBRequestOptions,\n\t\tconfig?: AxiosRequestConfig,\n\t): Promise<SBBusiness> {\n\t\treturn this.createEntity(\"/v1/businesses\", request, options, config);\n\t}\n\n\tpublic async updateAsync(\n\t\tid: number,\n\t\trequest: BusinessUpdateRequest,\n\t\toptions?: SBRequestOptions,\n\t\tconfig?: AxiosRequestConfig,\n\t): Promise<SBBusiness> {\n\t\treturn this.updateEntity(\n\t\t\t`/v1/businesses/${id}`,\n\t\t\trequest,\n\t\t\toptions,\n\t\t\tconfig,\n\t\t);\n\t}\n\n\tpublic async deleteAsync(\n\t\tid: number,\n\t\toptions?: SBRequestOptions,\n\t\tconfig?: AxiosRequestConfig,\n\t): Promise<SBBusiness> {\n\t\treturn this.deleteEntity(`/v1/businesses/${id}`, options, config);\n\t}\n\n\tpublic async count(\n\t\toptions?: SBRequestOptions,\n\t\tconfig?: AxiosRequestConfig,\n\t): Promise<number> {\n\t\treturn this.getEntityById(\"/v1/businesses/count\", options, config);\n\t}\n\n\tpublic async getMemberById(\n\t\tbusinessId: number,\n\t\tid: number,\n\t\toptions?: SBRequestOptions,\n\t\tconfig: AxiosRequestConfig = {},\n\t): Promise<SBTeamMember> {\n\t\treturn await this.teamMembers.getByIdAsync(\n\t\t\tbusinessId,\n\t\t\tid,\n\t\t\toptions,\n\t\t\tconfig,\n\t\t);\n\t}\n\n\tpublic async listMembers(\n\t\tbusinessId: number,\n\t\trequest: TeamMemberListRequest,\n\t\toptions?: SBRequestOptions,\n\t\tconfig: AxiosRequestConfig = {},\n\t): Promise<SBList<SBTeamMember>> {\n\t\treturn await this.teamMembers.listAsync(\n\t\t\tbusinessId,\n\t\t\trequest,\n\t\t\toptions,\n\t\t\tconfig,\n\t\t);\n\t}\n\n\tpublic async deleteMember(\n\t\tbusinessId: number,\n\t\tid: number,\n\t\toptions?: SBRequestOptions,\n\t\tconfig: AxiosRequestConfig = {},\n\t): Promise<SBTeamMember> {\n\t\treturn await this.teamMembers.deleteAsync(\n\t\t\tbusinessId,\n\t\t\tid,\n\t\t\toptions,\n\t\t\tconfig,\n\t\t);\n\t}\n\n\tpublic async batchInviteMemberAsync(\n\t\tbusinessId: number,\n\t\trequest: BusinessInvitationRequest[],\n\t\toptions?: SBRequestOptions,\n\t\tconfig?: AxiosRequestConfig,\n\t): Promise<any> {\n\t\treturn await this.createEntity(\n\t\t\t`/v1/business/${businessId}/invitations/batch`,\n\t\t\trequest,\n\t\t\toptions,\n\t\t\tconfig,\n\t\t);\n\t}\n}\n"],"names":["BusinessService","SBService","constructor","options","defaultAPIServiceOptions","_defineProperty","teamMembers","TeamMemberService","locations","LocationService","customers","CustomerService","customerPaymentMethods","CustomerPaymentMethodService","customerBalanceTransactions","CustomerBalanceTransactionService","fees","FeeService","taxes","TaxService","vendors","BusinessVendorService","reviews","BusinessReviewService","products","ProductService","productVariants","ProductVariantService","productOptions","ProductOptionService","productModifiers","ProductModifierService","productImages","ProductImageService","promoCodes","PromoCodeService","departments","DepartmentService","getByIdAsync","id","config","getEntityById","listAsync","request","listEntities","page","pageSize","search","createAsync","createEntity","updateAsync","updateEntity","deleteAsync","deleteEntity","count","getMemberById","businessId","listMembers","deleteMember","batchInviteMemberAsync"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAyCM,MAAOA,eACZ,SAAQC,mBAAS,CAAA;AAwBjBC,EAAAA,WAAAA,CAAmBC,UAA4BC,yCAAwB,EAAA;IACtE,KAAK,CAACD,OAAO,CAAC;IAACE,sBAAA,CAAA,IAAA,EAAA,aAAA,EAAA,KAAA,CAAA,CAAA;IAAAA,s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ACN;AACF;AAEO,EAAA,MAAMiB,WAAWA,CACvBD,UAAkB,EAClBb,OAA8B,EAC9BxC,OAA0B,EAC1BqC,MAAA,GAA6B,EAAE,EAAA;AAE/B,IAAA,OAAO,MAAM,IAAI,CAAClC,WAAW,CAACoC,SAAS,CACtCc,UAAU,EACVb,OAAO,EACPxC,OAAO,EACPqC,MAAM,CACN;AACF;AAEO,EAAA,MAAMkB,YAAYA,CACxBF,UAAkB,EAClBjB,EAAU,EACVpC,OAA0B,EAC1BqC,MAAA,GAA6B,EAAE,EAAA;AAE/B,IAAA,OAAO,MAAM,IAAI,CAAClC,WAAW,CAAC8C,WAAW,CACxCI,UAAU,EACVjB,EAAE,EACFpC,OAAO,EACPqC,MAAM,CACN;AACF;EAEO,MAAMmB,sBAAsBA,CAClCH,UAAkB,EAClBb,OAAoC,EACpCxC,OAA0B,EAC1BqC,MAA2B,EAAA;AAE3B,IAAA,OAAO,MAAM,IAAI,CAACS,YAAY,CAC7B,CAAgBO,aAAAA,EAAAA,UAAU,CAAoB,kBAAA,CAAA,EAC9Cb,OAAO,EACPxC,OAAO,EACPqC,MAAM,CACN;AACF;AACA;;;;"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var SBServiceOptions = require('../../../client/SBServiceOptions.cjs');
|
|
4
|
+
var SBService = require('../../SBService.cjs');
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Service for managing vendors in the Smartbills system
|
|
8
|
+
* Provides functionality for CRUD operations on vendors
|
|
9
|
+
* @implements INestedCreatable<VendorCreateRequest, SBBusinessBrand> - Allows creating new vendors
|
|
10
|
+
*/
|
|
11
|
+
class BrandService extends SBService.SBService {
|
|
12
|
+
/**
|
|
13
|
+
* Creates a new instance of the brand service
|
|
14
|
+
* @param options - Service configuration options
|
|
15
|
+
*/
|
|
16
|
+
constructor(options = SBServiceOptions.defaultAPIServiceOptions) {
|
|
17
|
+
super(options);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Creates a new vendor
|
|
21
|
+
* @param businessId - The business ID
|
|
22
|
+
* @param request - Vendor creation request data
|
|
23
|
+
* @param options - Request options
|
|
24
|
+
* @param config - Axios request configuration
|
|
25
|
+
* @returns Promise that resolves with the created vendor
|
|
26
|
+
*/
|
|
27
|
+
async createAsync(businessId, request, options, config) {
|
|
28
|
+
return await super.createEntity(`/v1/businesses/${businessId}/brand`, request, options, config);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
exports.BrandService = BrandService;
|
|
33
|
+
//# sourceMappingURL=BrandService.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BrandService.cjs","sources":["../../../../../src/services/businesses/brands/BrandService.ts"],"sourcesContent":["import { SBRequestOptions } from \"@/client/SBRequestOption\";\nimport {\n\tSBServiceOptions,\n\tdefaultAPIServiceOptions,\n} from \"@/client/SBServiceOptions\";\nimport { AxiosRequestConfig } from \"axios\";\nimport { INestedCreatable } from \"@/interfaces\";\nimport { SBService } from \"@/services/SBService\";\nimport { SBBusinessBrand } from \"@/entities/businesses/brands\";\n/**\n * Service for managing vendors in the Smartbills system\n * Provides functionality for CRUD operations on vendors\n * @implements INestedCreatable<VendorCreateRequest, SBBusinessBrand> - Allows creating new vendors\n */\nexport class BrandService\n\textends SBService\n\timplements INestedCreatable<FormData, SBBusinessBrand>\n{\n\t/**\n\t * Creates a new instance of the brand service\n\t * @param options - Service configuration options\n\t */\n\tpublic constructor(options: SBServiceOptions = defaultAPIServiceOptions) {\n\t\tsuper(options);\n\t}\n\n\t/**\n\t * Creates a new vendor\n\t * @param businessId - The business ID\n\t * @param request - Vendor creation request data\n\t * @param options - Request options\n\t * @param config - Axios request configuration\n\t * @returns Promise that resolves with the created vendor\n\t */\n\tpublic async createAsync(\n\t\tbusinessId: number,\n\t\trequest: FormData,\n\t\toptions?: SBRequestOptions,\n\t\tconfig?: AxiosRequestConfig<FormData>,\n\t): Promise<SBBusinessBrand> {\n\t\treturn await super.createEntity(\n\t\t\t`/v1/businesses/${businessId}/brand`,\n\t\t\trequest,\n\t\t\toptions,\n\t\t\tconfig,\n\t\t);\n\t}\n}\n"],"names":["BrandService","SBService","constructor","options","defaultAPIServiceOptions","createAsync","businessId","request","config","createEntity"],"mappings":";;;;;AASA;;;;AAIG;AACG,MAAOA,YACZ,SAAQC,mBAAS,CAAA;AAGjB;;;AAGG;AACHC,EAAAA,WAAAA,CAAmBC,UAA4BC,yCAAwB,EAAA;IACtE,KAAK,CAACD,OAAO,CAAC;AACf;AAEA;;;;;;;AAOG;EACI,MAAME,WAAWA,CACvBC,UAAkB,EAClBC,OAAiB,EACjBJ,OAA0B,EAC1BK,MAAqC,EAAA;AAErC,IAAA,OAAO,MAAM,KAAK,CAACC,YAAY,CAC9B,CAAkBH,eAAAA,EAAAA,UAAU,CAAQ,MAAA,CAAA,EACpCC,OAAO,EACPJ,OAAO,EACPK,MAAM,CACN;AACF;AACA;;;;"}
|
|
@@ -31,6 +31,12 @@ class VendorService extends SBService.SBService {
|
|
|
31
31
|
async connectAsync(request, options, config) {
|
|
32
32
|
return await this.createEntity(`/v1/me/vendors/connect`, request, options, config);
|
|
33
33
|
}
|
|
34
|
+
async disconnectAsync(vendorId, options, config) {
|
|
35
|
+
return await super.deleteEntity(`/v1/me/vendors/${vendorId}/disconnect`, options, config);
|
|
36
|
+
}
|
|
37
|
+
async getConnectionByIdAsync(id, options, config) {
|
|
38
|
+
return await super.getEntityById(`/v1/me/vendors/${id}`, options, config);
|
|
39
|
+
}
|
|
34
40
|
async manualRefresh(id, options, config) {
|
|
35
41
|
return await this.getEntityById(`/v1/me/vendors/${id}/refresh`, options, config);
|
|
36
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VendorService.cjs","sources":["../../../../src/services/vendors/VendorService.ts"],"sourcesContent":["import { SBRequestOptions } from \"@/client/SBRequestOption\";\nimport {\n\tSBServiceOptions,\n\tdefaultAPIServiceOptions,\n} from \"@/client/SBServiceOptions\";\nimport { AxiosRequestConfig } from \"axios\";\nimport { SBService } from \"../SBService\";\nimport { SBVendor } from \"@/entities/vendors/SBVendor\";\nimport {\n\tICreatable,\n\tIDeletable,\n\tIRetrievableById,\n\tIListable,\n\tIUpdatable,\n} from \"@/interfaces\";\nimport { SBList } from \"@/entities/base\";\n\nimport { ListRequest } from \"@/services/ListRequest\";\nimport { VendorUpdateRequest } from \"./VendorUpdateRequest\";\nimport { VendorCreateRequest } from \"./VendorCreateRequest\";\nimport { VendorConnectRequest } from \"./VendorConnectRequest\";\nimport { VendorConnectResponse } from \"./VendorConnectResponse\";\nimport { VendorListRequest } from \"./VendorListRequest\";\n\nexport class VendorService\n\textends SBService\n\timplements\n\t\tIRetrievableById<SBVendor>,\n\t\tICreatable<VendorCreateRequest, SBVendor>,\n\t\tIDeletable<SBVendor>,\n\t\tIListable<ListRequest, SBVendor>,\n\t\tIUpdatable<VendorUpdateRequest, SBVendor>\n{\n\tconstructor(options: SBServiceOptions = defaultAPIServiceOptions) {\n\t\tsuper(options);\n\t}\n\n\tpublic async getByIdAsync(\n\t\tid: number,\n\t\toptions?: SBRequestOptions,\n\t\tconfig?: AxiosRequestConfig,\n\t): Promise<SBVendor> {\n\t\treturn await this.getEntityById(\n\t\t\t`/v1/me/vendors/${id}`,\n\t\t\toptions,\n\t\t\tconfig,\n\t\t);\n\t}\n\n\tpublic async listAsync(\n\t\trequest?: VendorListRequest,\n\t\toptions?: SBRequestOptions,\n\t\tconfig?: AxiosRequestConfig,\n\t): Promise<SBList<SBVendor>> {\n\t\treturn await this.listEntities(\n\t\t\t`/v1/me/vendors`,\n\t\t\trequest || { page: 1, pageSize: 25 },\n\t\t\toptions,\n\t\t\tconfig,\n\t\t);\n\t}\n\n\tpublic async createAsync(\n\t\trequest: VendorCreateRequest,\n\t\toptions?: SBRequestOptions,\n\t\tconfig?: AxiosRequestConfig<VendorCreateRequest>,\n\t): Promise<SBVendor> {\n\t\treturn await this.createEntity(\n\t\t\t`/v1/me/vendors`,\n\t\t\trequest,\n\t\t\toptions,\n\t\t\tconfig,\n\t\t);\n\t}\n\n\tpublic async updateAsync(\n\t\tid: number,\n\t\trequest: VendorUpdateRequest,\n\t\toptions?: SBRequestOptions,\n\t\tconfig?: AxiosRequestConfig<VendorUpdateRequest>,\n\t): Promise<SBVendor> {\n\t\treturn await this.updateEntity(\n\t\t\t`/v1/me/vendors/${id}`,\n\t\t\trequest,\n\t\t\toptions,\n\t\t\tconfig,\n\t\t);\n\t}\n\n\tpublic async deleteAsync(\n\t\tid: number,\n\t\toptions?: SBRequestOptions,\n\t\tconfig?: AxiosRequestConfig,\n\t): Promise<SBVendor> {\n\t\treturn await this.deleteEntity(`/v1/me/vendors/${id}`, options, config);\n\t}\n\n\tpublic async getLinkToken(\n\t\toptions?: SBRequestOptions,\n\t\tconfig?: AxiosRequestConfig,\n\t): Promise<VendorConnectResponse> {\n\t\treturn await this.getEntityById(\n\t\t\t`/v1/me/vendors/connect`,\n\t\t\toptions,\n\t\t\tconfig,\n\t\t);\n\t}\n\n\tpublic async connectAsync(\n\t\trequest: VendorConnectRequest,\n\t\toptions?: SBRequestOptions,\n\t\tconfig?: AxiosRequestConfig<VendorConnectRequest>,\n\t): Promise<SBVendor> {\n\t\treturn await this.createEntity(\n\t\t\t`/v1/me/vendors/connect`,\n\t\t\trequest,\n\t\t\toptions,\n\t\t\tconfig,\n\t\t);\n\t}\n\n\tpublic async manualRefresh(\n\t\tid: number,\n\t\toptions?: SBRequestOptions,\n\t\tconfig?: AxiosRequestConfig,\n\t): Promise<void> {\n\t\treturn await this.getEntityById(\n\t\t\t`/v1/me/vendors/${id}/refresh`,\n\t\t\toptions,\n\t\t\tconfig,\n\t\t);\n\t}\n}\n"],"names":["VendorService","SBService","constructor","options","defaultAPIServiceOptions","getByIdAsync","id","config","getEntityById","listAsync","request","listEntities","page","pageSize","createAsync","createEntity","updateAsync","updateEntity","deleteAsync","deleteEnt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AEI,MAAM,CAAC;AACxE;AAEO,EAAA,MAAMa,YAAYA,CACxBjB,OAA0B,EAC1BI,MAA2B,EAAA;IAE3B,OAAO,MAAM,IAAI,CAACC,aAAa,CAC9B,wBAAwB,EACxBL,OAAO,EACPI,MAAM,CACN;AACF;AAEO,EAAA,MAAMc,YAAYA,CACxBX,OAA6B,EAC7BP,OAA0B,EAC1BI,MAAiD,EAAA;AAEjD,IAAA,OAAO,MAAM,IAAI,CAACQ,YAAY,CAC7B,CAAA,sBAAA,CAAwB,EACxBL,OAAO,EACPP,OAAO,EACPI,MAAM,CACN;AACF;AAEO,EAAA,MAAMe,aAAaA,
|
|
1
|
+
{"version":3,"file":"VendorService.cjs","sources":["../../../../src/services/vendors/VendorService.ts"],"sourcesContent":["import { SBRequestOptions } from \"@/client/SBRequestOption\";\nimport {\n\tSBServiceOptions,\n\tdefaultAPIServiceOptions,\n} from \"@/client/SBServiceOptions\";\nimport { AxiosRequestConfig } from \"axios\";\nimport { SBService } from \"../SBService\";\nimport { SBVendor } from \"@/entities/vendors/SBVendor\";\nimport {\n\tICreatable,\n\tIDeletable,\n\tIRetrievableById,\n\tIListable,\n\tIUpdatable,\n} from \"@/interfaces\";\nimport { SBList } from \"@/entities/base\";\n\nimport { ListRequest } from \"@/services/ListRequest\";\nimport { VendorUpdateRequest } from \"./VendorUpdateRequest\";\nimport { VendorCreateRequest } from \"./VendorCreateRequest\";\nimport { VendorConnectRequest } from \"./VendorConnectRequest\";\nimport { VendorConnectResponse } from \"./VendorConnectResponse\";\nimport { VendorListRequest } from \"./VendorListRequest\";\n\nexport class VendorService\n\textends SBService\n\timplements\n\t\tIRetrievableById<SBVendor>,\n\t\tICreatable<VendorCreateRequest, SBVendor>,\n\t\tIDeletable<SBVendor>,\n\t\tIListable<ListRequest, SBVendor>,\n\t\tIUpdatable<VendorUpdateRequest, SBVendor>\n{\n\tconstructor(options: SBServiceOptions = defaultAPIServiceOptions) {\n\t\tsuper(options);\n\t}\n\n\tpublic async getByIdAsync(\n\t\tid: number,\n\t\toptions?: SBRequestOptions,\n\t\tconfig?: AxiosRequestConfig,\n\t): Promise<SBVendor> {\n\t\treturn await this.getEntityById(\n\t\t\t`/v1/me/vendors/${id}`,\n\t\t\toptions,\n\t\t\tconfig,\n\t\t);\n\t}\n\n\tpublic async listAsync(\n\t\trequest?: VendorListRequest,\n\t\toptions?: SBRequestOptions,\n\t\tconfig?: AxiosRequestConfig,\n\t): Promise<SBList<SBVendor>> {\n\t\treturn await this.listEntities(\n\t\t\t`/v1/me/vendors`,\n\t\t\trequest || { page: 1, pageSize: 25 },\n\t\t\toptions,\n\t\t\tconfig,\n\t\t);\n\t}\n\n\tpublic async createAsync(\n\t\trequest: VendorCreateRequest,\n\t\toptions?: SBRequestOptions,\n\t\tconfig?: AxiosRequestConfig<VendorCreateRequest>,\n\t): Promise<SBVendor> {\n\t\treturn await this.createEntity(\n\t\t\t`/v1/me/vendors`,\n\t\t\trequest,\n\t\t\toptions,\n\t\t\tconfig,\n\t\t);\n\t}\n\n\tpublic async updateAsync(\n\t\tid: number,\n\t\trequest: VendorUpdateRequest,\n\t\toptions?: SBRequestOptions,\n\t\tconfig?: AxiosRequestConfig<VendorUpdateRequest>,\n\t): Promise<SBVendor> {\n\t\treturn await this.updateEntity(\n\t\t\t`/v1/me/vendors/${id}`,\n\t\t\trequest,\n\t\t\toptions,\n\t\t\tconfig,\n\t\t);\n\t}\n\n\tpublic async deleteAsync(\n\t\tid: number,\n\t\toptions?: SBRequestOptions,\n\t\tconfig?: AxiosRequestConfig,\n\t): Promise<SBVendor> {\n\t\treturn await this.deleteEntity(`/v1/me/vendors/${id}`, options, config);\n\t}\n\n\tpublic async getLinkToken(\n\t\toptions?: SBRequestOptions,\n\t\tconfig?: AxiosRequestConfig,\n\t): Promise<VendorConnectResponse> {\n\t\treturn await this.getEntityById(\n\t\t\t`/v1/me/vendors/connect`,\n\t\t\toptions,\n\t\t\tconfig,\n\t\t);\n\t}\n\n\tpublic async connectAsync(\n\t\trequest: VendorConnectRequest,\n\t\toptions?: SBRequestOptions,\n\t\tconfig?: AxiosRequestConfig<VendorConnectRequest>,\n\t): Promise<SBVendor> {\n\t\treturn await this.createEntity(\n\t\t\t`/v1/me/vendors/connect`,\n\t\t\trequest,\n\t\t\toptions,\n\t\t\tconfig,\n\t\t);\n\t}\n\n\tpublic async disconnectAsync(\n\t\tvendorId: number,\n\t\toptions?: SBRequestOptions,\n\t\tconfig?: AxiosRequestConfig,\n\t): Promise<SBVendor> {\n\t\treturn await super.deleteEntity(\n\t\t\t`/v1/me/vendors/${vendorId}/disconnect`,\n\t\t\toptions,\n\t\t\tconfig,\n\t\t);\n\t}\n\n\tpublic async getConnectionByIdAsync(\n\t\tid: number,\n\t\toptions?: SBRequestOptions,\n\t\tconfig?: AxiosRequestConfig,\n\t): Promise<SBVendor> {\n\t\treturn await super.getEntityById(\n\t\t\t`/v1/me/vendors/${id}`,\n\t\t\toptions,\n\t\t\tconfig,\n\t\t);\n\t}\n\n\tpublic async manualRefresh(\n\t\tid: number,\n\t\toptions?: SBRequestOptions,\n\t\tconfig?: AxiosRequestConfig,\n\t): Promise<void> {\n\t\treturn await this.getEntityById(\n\t\t\t`/v1/me/vendors/${id}/refresh`,\n\t\t\toptions,\n\t\t\tconfig,\n\t\t);\n\t}\n}\n"],"names":["VendorService","SBService","constructor","options","defaultAPIServiceOptions","getByIdAsync","id","config","getEntityById","listAsync","request","listEntities","page","pageSize","createAsync","createEntity","updateAsync","updateEntity","deleteAsync","deleteEntity","getLinkToken","connectAsync","disconnectAsync","vendorId","getConnectionByIdAsync","manualRefresh"],"mappings":";;;;;AAwBM,MAAOA,aACZ,SAAQC,mBAAS,CAAA;AAQjBC,EAAAA,WAAAA,CAAYC,UAA4BC,yCAAwB,EAAA;IAC/D,KAAK,CAACD,OAAO,CAAC;AACf;AAEO,EAAA,MAAME,YAAYA,CACxBC,EAAU,EACVH,OAA0B,EAC1BI,MAA2B,EAAA;AAE3B,IAAA,OAAO,M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A,OAAO,MAAM,IAAI,CAACQ,YAAY,CAC7B,CAAA,sBAAA,CAAwB,EACxBL,OAAO,EACPP,OAAO,EACPI,MAAM,CACN;AACF;AAEO,EAAA,MAAMe,eAAeA,CAC3BC,QAAgB,EAChBpB,OAA0B,EAC1BI,MAA2B,EAAA;AAE3B,IAAA,OAAO,MAAM,KAAK,CAACY,YAAY,CAC9B,CAAA,eAAA,EAAkBI,QAAQ,CAAA,WAAA,CAAa,EACvCpB,OAAO,EACPI,MAAM,CACN;AACF;AAEO,EAAA,MAAMiB,sBAAsBA,CAClClB,EAAU,EACVH,OAA0B,EAC1BI,MAA2B,EAAA;AAE3B,IAAA,OAAO,MAAM,KAAK,CAACC,aAAa,CAC/B,CAAA,eAAA,EAAkBF,EAAE,CAAA,CAAE,EACtBH,OAAO,EACPI,MAAM,CACN;AACF;AAEO,EAAA,MAAMkB,aAAaA,CACzBnB,EAAU,EACVH,OAA0B,EAC1BI,MAA2B,EAAA;AAE3B,IAAA,OAAO,MAAM,IAAI,CAACC,aAAa,CAC9B,CAAA,eAAA,EAAkBF,EAAE,CAAA,QAAA,CAAU,EAC9BH,OAAO,EACPI,MAAM,CACN;AACF;AACA;;;;"}
|
|
@@ -14,6 +14,7 @@ import { BusinessService } from '../services/businesses/BusinessService.mjs';
|
|
|
14
14
|
import { defaultAPIServiceOptions } from './SBServiceOptions.mjs';
|
|
15
15
|
import 'query-string';
|
|
16
16
|
import 'axios';
|
|
17
|
+
import { BrandService } from '../services/businesses/brands/BrandService.mjs';
|
|
17
18
|
import { TableService } from '../services/businesses/tables/TableService.mjs';
|
|
18
19
|
import { PaymentMethodService } from '../services/payment-methods/PaymentMethodService.mjs';
|
|
19
20
|
import { ReceiptService } from '../services/receipts/ReceiptService.mjs';
|
|
@@ -68,6 +69,7 @@ class SBClient {
|
|
|
68
69
|
_defineProperty(this, "explore", void 0);
|
|
69
70
|
_defineProperty(this, "invoices", void 0);
|
|
70
71
|
_defineProperty(this, "businesses", void 0);
|
|
72
|
+
_defineProperty(this, "brands", void 0);
|
|
71
73
|
_defineProperty(this, "notifications", void 0);
|
|
72
74
|
_defineProperty(this, "oauth", void 0);
|
|
73
75
|
_defineProperty(this, "loyaltyPrograms", void 0);
|
|
@@ -175,7 +177,7 @@ class SBClient {
|
|
|
175
177
|
logger: this.logger,
|
|
176
178
|
url: this.options?.endpoints?.api
|
|
177
179
|
});
|
|
178
|
-
this.
|
|
180
|
+
this.brands = new BrandService({
|
|
179
181
|
...this.options,
|
|
180
182
|
logger: this.logger,
|
|
181
183
|
url: this.options?.endpoints?.api
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SBClient.mjs","sources":["../../../src/client/SBClient.ts"],"sourcesContent":["import { ApiLogService } from \"@/services/api-logs\";\nimport { BankAccountService } from \"@/services/banks/accounts\";\nimport { BankTransactionService } from \"@/services/banks/transactions\";\nimport { BankService } from \"@/services/banks\";\nimport { CardService } from \"@/services/cards/CardService\";\nimport { DocumentService } from \"@/services/documents\";\nimport { DomainService } from \"@/services/businesses/domains\";\nimport { DepartmentService } from \"@/services/businesses/departments\";\nimport { FriendService } from \"@/services/friends/FriendService\";\nimport { OAuthService } from \"@/services/oauth\";\nimport { BusinessService } from \"@/services/businesses\";\nimport { PaymentMethodService } from \"@/services/payment-methods\";\nimport { ReceiptService } from \"@/services/receipts\";\nimport { SettlementService } from \"@/services/settlements\";\nimport { TransactionService } from \"@/services/transactions\";\nimport { CurrentUserService } from \"@/services/user\";\nimport { UserService } from \"@/services/users\";\nimport { v4 } from \"uuid\";\nimport { SBClientOptions } from \"./SBClientOptions\";\nimport { SBCredentialProvider } from \"./SBCredentials\";\nimport { SBLogger } from \"./SBLogger\";\nimport { defaultAPIServiceOptions } from \"./SBServiceOptions\";\nimport { API_URL } from \"./constants\";\nimport { ExploreService } from \"../services/explore\";\nimport {\n\tBankInstitutionService,\n\tInvoiceService,\n\tLoyaltyProgramService,\n\tNotificationService,\n} from \"@/services\";\nimport { AttachmentService } from \"@/services/attachments\";\nimport { SubscriptionService } from \"@/services/billing/subscriptions/SubscriptionService\";\nimport { IntegrationService } from \"@/services/integrations\";\nimport { TableService } from \"@/services/businesses/tables\";\nimport { ExpenseService } from \"@/services/expenses\";\nimport { VendorService } from \"@/services/vendors\";\n\n/**\n * Client for the Smartbills API.\n */\nconst defaultOptions: SBClientOptions = {\n\tendpoints: {\n\t\tapi: API_URL,\n\t\tauth: API_URL,\n\t},\n\tdebug: false,\n\tlogger: new SBLogger(false),\n\tsessionId: v4(),\n\tlocale: \"en\",\n};\n\nexport class SBClient {\n\tpublic logger: SBLogger;\n\tpublic options: SBClientOptions;\n\tpublic user: CurrentUserService;\n\tpublic logs: ApiLogService;\n\tpublic banks: BankService;\n\tpublic bankAccounts: BankAccountService;\n\tpublic bankInstitutions: BankInstitutionService;\n\tpublic bankTransactions: BankTransactionService;\n\tpublic cards: CardService;\n\tpublic documents: DocumentService;\n\tpublic domains: DomainService;\n\tpublic departments: DepartmentService;\n\tpublic explore: ExploreService;\n\tpublic invoices: InvoiceService;\n\tpublic businesses: BusinessService;\n\tpublic notifications: NotificationService;\n\n\tpublic oauth: OAuthService;\n\n\tpublic loyaltyPrograms: LoyaltyProgramService;\n\n\tpublic receipts: ReceiptService;\n\tpublic transactions: TransactionService;\n\tpublic paymentMethods: PaymentMethodService;\n\tpublic settlements: SettlementService;\n\tpublic friends: FriendService;\n\tpublic users: UserService;\n\tpublic attachments: AttachmentService;\n\n\tpublic subscriptions: SubscriptionService;\n\tpublic integrations: IntegrationService;\n\tpublic tables: TableService;\n\tpublic expenses: ExpenseService;\n\tpublic vendors: VendorService;\n\n\t/**\n\t * @constructor\n\t * Creates an instance of the Smartbills API client.\n\t */\n\tpublic constructor(options: SBClientOptions = defaultAPIServiceOptions) {\n\t\tthis.options = { ...defaultOptions, ...options };\n\t\tthis.logger = options.logger ?? new SBLogger(options.debug);\n\t\tthis.configureServices();\n\t\tthis.logger.log(options);\n\t}\n\n\tpublic async initialize() {\n\t\tif (this.options.credentials) {\n\t\t\tawait this.options.credentials?.getAccessToken(this.oauth);\n\t\t}\n\t}\n\n\tpublic get accessToken(): string {\n\t\treturn this.options?.credentials?.accessToken;\n\t}\n\n\tpublic get refreshToken(): string {\n\t\treturn this.options?.credentials?.refreshToken;\n\t}\n\n\tpublic setCredentials(credentials: SBCredentialProvider) {\n\t\tthis.options.credentials = credentials;\n\t\tthis.configureServices();\n\t}\n\n\tpublic setLocale(locale: string) {\n\t\tthis.options.locale = locale;\n\t}\n\n\tprotected configureServices() {\n\t\tthis.oauth = new OAuthService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.auth,\n\t\t});\n\t\tthis.cards = new CardService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\n\t\tthis.notifications = new NotificationService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.user = new CurrentUserService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.invoices = new InvoiceService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.logs = new ApiLogService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.banks = new BankService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.bankAccounts = new BankAccountService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.bankInstitutions = new BankInstitutionService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.bankTransactions = new BankTransactionService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\n\t\tthis.documents = new DocumentService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\n\t\tthis.friends = new FriendService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\n\t\tthis.businesses = new BusinessService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.businesses = new BusinessService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.departments = new DepartmentService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\n\t\tthis.explore = new ExploreService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\n\t\tthis.receipts = new ReceiptService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.transactions = new TransactionService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.paymentMethods = new PaymentMethodService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.settlements = new SettlementService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\n\t\tthis.users = new UserService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.attachments = new AttachmentService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.subscriptions = new SubscriptionService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.loyaltyPrograms = new LoyaltyProgramService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.integrations = new IntegrationService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.tables = new TableService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.expenses = new ExpenseService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.vendors = new VendorService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t}\n}\n"],"names":["defaultOptions","endpoints","api","API_URL","auth","debug","logger","SBLogger","sessionId","v4","locale","SBClient","constructor","options","defaultAPIServiceOptions","_defineProperty","configureServices","log","initialize","credentials","getAccessToken","oauth","accessToken","refreshToken","setCredentials","setLocale","OAuthService","url","cards","CardService","notifications","NotificationService","user","CurrentUserService","invoices","InvoiceService","logs","ApiLogService","banks","BankService","bankAccounts","BankAccountService","bankInstitutions","BankInstitutionService","bankTransactions","BankTransactionService","documents","DocumentService","friends","FriendService","businesses","BusinessService","departments","DepartmentService","explore","ExploreService","receipts","ReceiptService","transactions","TransactionService","paymentMethods","PaymentMethodService","settlements","SettlementService","users","UserService","attachments","AttachmentService","subscriptions","SubscriptionService","loyaltyPrograms","LoyaltyProgramService","integrations","IntegrationService","tables","TableService","expenses","ExpenseService","vendors","VendorService"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA;;AAEG;AACH,MAAMA,cAAc,GAAoB;AACvCC,EAAAA,S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GAAG,IAAIC,cAAc,CAAC;MAClC,GAAG,IAAI,CAAChE,OAAO;MACfP,MAAM,EAAE,IAAI,CAACA,MAAM;AACnBqB,MAAAA,GAAG,EAAE,IAAI,CAACd,OAAO,EAAEZ,SAAS,EAAEC;AAC9B,KAAA,CAAC;AACF,IAAA,IAAI,CAAC4E,OAAO,GAAG,IAAIC,aAAa,CAAC;MAChC,GAAG,IAAI,CAAClE,OAAO;MACfP,MAAM,EAAE,IAAI,CAACA,MAAM;AACnBqB,MAAAA,GAAG,EAAE,IAAI,CAACd,OAAO,EAAEZ,SAAS,EAAEC;AAC9B,KAAA,CAAC;AACH;AACA;;;;"}
|
|
1
|
+
{"version":3,"file":"SBClient.mjs","sources":["../../../src/client/SBClient.ts"],"sourcesContent":["import { ApiLogService } from \"@/services/api-logs\";\nimport { BankAccountService } from \"@/services/banks/accounts\";\nimport { BankTransactionService } from \"@/services/banks/transactions\";\nimport { BankService } from \"@/services/banks\";\nimport { CardService } from \"@/services/cards/CardService\";\nimport { DocumentService } from \"@/services/documents\";\nimport { DomainService } from \"@/services/businesses/domains\";\nimport { DepartmentService } from \"@/services/businesses/departments\";\nimport { FriendService } from \"@/services/friends/FriendService\";\nimport { OAuthService } from \"@/services/oauth\";\nimport { BrandService, BusinessService } from \"@/services/businesses\";\nimport { PaymentMethodService } from \"@/services/payment-methods\";\nimport { ReceiptService } from \"@/services/receipts\";\nimport { SettlementService } from \"@/services/settlements\";\nimport { TransactionService } from \"@/services/transactions\";\nimport { CurrentUserService } from \"@/services/user\";\nimport { UserService } from \"@/services/users\";\nimport { v4 } from \"uuid\";\nimport { SBClientOptions } from \"./SBClientOptions\";\nimport { SBCredentialProvider } from \"./SBCredentials\";\nimport { SBLogger } from \"./SBLogger\";\nimport { defaultAPIServiceOptions } from \"./SBServiceOptions\";\nimport { API_URL } from \"./constants\";\nimport { ExploreService } from \"../services/explore\";\nimport {\n\tBankInstitutionService,\n\tInvoiceService,\n\tLoyaltyProgramService,\n\tNotificationService,\n} from \"@/services\";\nimport { AttachmentService } from \"@/services/attachments\";\nimport { SubscriptionService } from \"@/services/billing/subscriptions/SubscriptionService\";\nimport { IntegrationService } from \"@/services/integrations\";\nimport { TableService } from \"@/services/businesses/tables\";\nimport { ExpenseService } from \"@/services/expenses\";\nimport { VendorService } from \"@/services/vendors\";\n\n/**\n * Client for the Smartbills API.\n */\nconst defaultOptions: SBClientOptions = {\n\tendpoints: {\n\t\tapi: API_URL,\n\t\tauth: API_URL,\n\t},\n\tdebug: false,\n\tlogger: new SBLogger(false),\n\tsessionId: v4(),\n\tlocale: \"en\",\n};\n\nexport class SBClient {\n\tpublic logger: SBLogger;\n\tpublic options: SBClientOptions;\n\tpublic user: CurrentUserService;\n\tpublic logs: ApiLogService;\n\tpublic banks: BankService;\n\tpublic bankAccounts: BankAccountService;\n\tpublic bankInstitutions: BankInstitutionService;\n\tpublic bankTransactions: BankTransactionService;\n\tpublic cards: CardService;\n\tpublic documents: DocumentService;\n\tpublic domains: DomainService;\n\tpublic departments: DepartmentService;\n\tpublic explore: ExploreService;\n\tpublic invoices: InvoiceService;\n\tpublic businesses: BusinessService;\n\tpublic brands: BrandService;\n\tpublic notifications: NotificationService;\n\n\tpublic oauth: OAuthService;\n\n\tpublic loyaltyPrograms: LoyaltyProgramService;\n\n\tpublic receipts: ReceiptService;\n\tpublic transactions: TransactionService;\n\tpublic paymentMethods: PaymentMethodService;\n\tpublic settlements: SettlementService;\n\tpublic friends: FriendService;\n\tpublic users: UserService;\n\tpublic attachments: AttachmentService;\n\n\tpublic subscriptions: SubscriptionService;\n\tpublic integrations: IntegrationService;\n\tpublic tables: TableService;\n\tpublic expenses: ExpenseService;\n\tpublic vendors: VendorService;\n\n\t/**\n\t * @constructor\n\t * Creates an instance of the Smartbills API client.\n\t */\n\tpublic constructor(options: SBClientOptions = defaultAPIServiceOptions) {\n\t\tthis.options = { ...defaultOptions, ...options };\n\t\tthis.logger = options.logger ?? new SBLogger(options.debug);\n\t\tthis.configureServices();\n\t\tthis.logger.log(options);\n\t}\n\n\tpublic async initialize() {\n\t\tif (this.options.credentials) {\n\t\t\tawait this.options.credentials?.getAccessToken(this.oauth);\n\t\t}\n\t}\n\n\tpublic get accessToken(): string {\n\t\treturn this.options?.credentials?.accessToken;\n\t}\n\n\tpublic get refreshToken(): string {\n\t\treturn this.options?.credentials?.refreshToken;\n\t}\n\n\tpublic setCredentials(credentials: SBCredentialProvider) {\n\t\tthis.options.credentials = credentials;\n\t\tthis.configureServices();\n\t}\n\n\tpublic setLocale(locale: string) {\n\t\tthis.options.locale = locale;\n\t}\n\n\tprotected configureServices() {\n\t\tthis.oauth = new OAuthService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.auth,\n\t\t});\n\t\tthis.cards = new CardService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\n\t\tthis.notifications = new NotificationService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.user = new CurrentUserService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.invoices = new InvoiceService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.logs = new ApiLogService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.banks = new BankService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.bankAccounts = new BankAccountService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.bankInstitutions = new BankInstitutionService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.bankTransactions = new BankTransactionService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\n\t\tthis.documents = new DocumentService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\n\t\tthis.friends = new FriendService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\n\t\tthis.businesses = new BusinessService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.brands = new BrandService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.departments = new DepartmentService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\n\t\tthis.explore = new ExploreService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\n\t\tthis.receipts = new ReceiptService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.transactions = new TransactionService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.paymentMethods = new PaymentMethodService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.settlements = new SettlementService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\n\t\tthis.users = new UserService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.attachments = new AttachmentService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.subscriptions = new SubscriptionService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.loyaltyPrograms = new LoyaltyProgramService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.integrations = new IntegrationService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.tables = new TableService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.expenses = new ExpenseService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t\tthis.vendors = new VendorService({\n\t\t\t...this.options,\n\t\t\tlogger: this.logger,\n\t\t\turl: this.options?.endpoints?.api,\n\t\t});\n\t}\n}\n"],"names":["defaultOptions","endpoints","api","API_URL","auth","debug","logger","SBLogger","sessionId","v4","locale","SBClient","constructor","options","defaultAPIServiceOptions","_defineProperty","configureServices","log","initialize","credentials","getAccessToken","oauth","accessToken","refreshToken","setCredentials","setLocale","OAuthService","url","cards","CardService","notifications","NotificationService","user","CurrentUserService","invoices","InvoiceService","logs","ApiLogService","banks","BankService","bankAccounts","BankAccountService","bankInstitutions","BankInstitutionService","bankTransactions","BankTransactionService","documents","DocumentService","friends","FriendService","businesses","BusinessService","brands","BrandService","departments","DepartmentService","explore","ExploreService","receipts","ReceiptService","transactions","TransactionService","paymentMethods","PaymentMethodService","settlements","SettlementService","users","UserService","attachments","AttachmentService","subscriptions","SubscriptionService","loyaltyPrograms","LoyaltyProgramService","integrations","IntegrationService","tables","TableService","expenses","ExpenseService","vendors","VendorService"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAM;AACnBqB,MAAAA,GAAG,EAAE,IAAI,CAACd,OAAO,EAAEZ,SAAS,EAAEC;AAC9B,KAAA,CAAC;AACF,IAAA,IAAI,CAAC4E,QAAQ,GAAG,IAAIC,cAAc,CAAC;MAClC,GAAG,IAAI,CAAClE,OAAO;MACfP,MAAM,EAAE,IAAI,CAACA,MAAM;AACnBqB,MAAAA,GAAG,EAAE,IAAI,CAACd,OAAO,EAAEZ,SAAS,EAAEC;AAC9B,KAAA,CAAC;AACF,IAAA,IAAI,CAAC8E,OAAO,GAAG,IAAIC,aAAa,CAAC;MAChC,GAAG,IAAI,CAACpE,OAAO;MACfP,MAAM,EAAE,IAAI,CAACA,MAAM;AACnBqB,MAAAA,GAAG,EAAE,IAAI,CAACd,OAAO,EAAEZ,SAAS,EAAEC;AAC9B,KAAA,CAAC;AACH;AACA;;;;"}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -38,6 +38,7 @@ export { CardService } from './services/cards/CardService.mjs';
|
|
|
38
38
|
export { BusinessService } from './services/businesses/BusinessService.mjs';
|
|
39
39
|
export { CustomerService } from './services/businesses/customers/CustomerService.mjs';
|
|
40
40
|
export { CustomerPaymentMethodService } from './services/businesses/customers/payment-methods/CustomerPaymentMethodService.mjs';
|
|
41
|
+
export { BrandService } from './services/businesses/brands/BrandService.mjs';
|
|
41
42
|
export { LocationService } from './services/businesses/locations/LocationService.mjs';
|
|
42
43
|
export { PriceService } from './services/businesses/prices/PriceService.mjs';
|
|
43
44
|
export { ProductService } from './services/businesses/products/ProductService.mjs';
|
package/dist/esm/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|