bkper-js 1.23.0 → 1.24.0
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/lib/index.d.ts +26 -0
- package/lib/index.js +1 -1
- package/lib/model/App.js +8 -0
- package/lib/model/Enums.js +22 -0
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -366,6 +366,10 @@ export declare class App {
|
|
|
366
366
|
* @return The name of this App
|
|
367
367
|
*/
|
|
368
368
|
getName(): string | undefined;
|
|
369
|
+
/**
|
|
370
|
+
* @return The type of this App
|
|
371
|
+
*/
|
|
372
|
+
getType(): AppType | undefined;
|
|
369
373
|
/**
|
|
370
374
|
* @return The logo url of this App
|
|
371
375
|
*/
|
|
@@ -414,6 +418,28 @@ export declare class App {
|
|
|
414
418
|
update(): Promise<App>;
|
|
415
419
|
}
|
|
416
420
|
|
|
421
|
+
/**
|
|
422
|
+
* Enum that represents the type of an App.
|
|
423
|
+
*
|
|
424
|
+
* @public
|
|
425
|
+
*/
|
|
426
|
+
export declare enum AppType {
|
|
427
|
+
/**
|
|
428
|
+
* Interactive solutions that can run independently and integrate with third-party services.
|
|
429
|
+
* Apps can range from simple URL openers to complex add-ons with business logic.
|
|
430
|
+
*
|
|
431
|
+
* Learn more on [Bkper Apps](https://bkper.com/docs/#apps).
|
|
432
|
+
*/
|
|
433
|
+
APP = "APP",
|
|
434
|
+
/**
|
|
435
|
+
* Specialized type of App that react to events from Books.
|
|
436
|
+
* Bots can perform automated tasks like calculating taxes, converting currencies, or posting notifications when specific events occur.
|
|
437
|
+
*
|
|
438
|
+
* Learn more on [Bkper Bots](https://bkper.com/docs/#bots).
|
|
439
|
+
*/
|
|
440
|
+
BOT = "BOT"
|
|
441
|
+
}
|
|
442
|
+
|
|
417
443
|
/**
|
|
418
444
|
* The container of balances of an [[Account]] or [[Group]]
|
|
419
445
|
*
|
package/lib/index.js
CHANGED
|
@@ -23,5 +23,5 @@ export { TransactionList } from './model/TransactionList.js';
|
|
|
23
23
|
export { Event } from './model/Event.js';
|
|
24
24
|
export { EventList } from './model/EventList.js';
|
|
25
25
|
export { User } from './model/User.js';
|
|
26
|
-
export { Periodicity, DecimalSeparator, Permission, Visibility, AccountType, Period, Month, EventType } from './model/Enums.js';
|
|
26
|
+
export { Periodicity, DecimalSeparator, Permission, Visibility, AccountType, Period, Month, EventType, AppType } from './model/Enums.js';
|
|
27
27
|
//# sourceMappingURL=index.js.map
|
package/lib/model/App.js
CHANGED
|
@@ -8,6 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { createApp, patchApp, updateApp } from "../service/app-service.js";
|
|
11
|
+
import { AppType } from "./Enums.js";
|
|
11
12
|
/**
|
|
12
13
|
* Defines an App on Bkper.
|
|
13
14
|
*
|
|
@@ -53,6 +54,13 @@ export class App {
|
|
|
53
54
|
getName() {
|
|
54
55
|
return this.payload.name;
|
|
55
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* @return The type of this App
|
|
59
|
+
*/
|
|
60
|
+
getType() {
|
|
61
|
+
const events = this.payload.events;
|
|
62
|
+
return events && events.length > 0 ? AppType.BOT : AppType.APP;
|
|
63
|
+
}
|
|
56
64
|
/**
|
|
57
65
|
* @return The logo url of this App
|
|
58
66
|
*/
|
package/lib/model/Enums.js
CHANGED
|
@@ -148,6 +148,28 @@ export var Month;
|
|
|
148
148
|
Month["NOVEMBER"] = "NOVEMBER";
|
|
149
149
|
Month["DECEMBER"] = "DECEMBER";
|
|
150
150
|
})(Month || (Month = {}));
|
|
151
|
+
/**
|
|
152
|
+
* Enum that represents the type of an App.
|
|
153
|
+
*
|
|
154
|
+
* @public
|
|
155
|
+
*/
|
|
156
|
+
export var AppType;
|
|
157
|
+
(function (AppType) {
|
|
158
|
+
/**
|
|
159
|
+
* Interactive solutions that can run independently and integrate with third-party services.
|
|
160
|
+
* Apps can range from simple URL openers to complex add-ons with business logic.
|
|
161
|
+
*
|
|
162
|
+
* Learn more on [Bkper Apps](https://bkper.com/docs/#apps).
|
|
163
|
+
*/
|
|
164
|
+
AppType["APP"] = "APP";
|
|
165
|
+
/**
|
|
166
|
+
* Specialized type of App that react to events from Books.
|
|
167
|
+
* Bots can perform automated tasks like calculating taxes, converting currencies, or posting notifications when specific events occur.
|
|
168
|
+
*
|
|
169
|
+
* Learn more on [Bkper Bots](https://bkper.com/docs/#bots).
|
|
170
|
+
*/
|
|
171
|
+
AppType["BOT"] = "BOT";
|
|
172
|
+
})(AppType || (AppType = {}));
|
|
151
173
|
/**
|
|
152
174
|
* Enum that represents event types.
|
|
153
175
|
*
|