-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVendorSDK.ts
69 lines (58 loc) · 2.59 KB
/
VendorSDK.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/*
* Copyright (c) 2023. Selldone® Business OS™
*
* Author: M.Pajuhaan
* Web: https://selldone.com
* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
*
* All rights reserved. In the weave of time, where traditions and innovations intermingle, this content was crafted.
* From the essence of thought, through the corridors of creativity, each word, and sentiment has been molded.
* Not just to exist, but to inspire. Like an artist's stroke or a sculptor's chisel, every nuance is deliberate.
* Our journey is not just about reaching a destination, but about creating a masterpiece.
* Tread carefully, for you're treading on dreams.
*/
import {VAPI} from "./apis/VAPI";
import {VapiPage} from "./page/VapiPage";
import {VendorAxiosSetup} from "./plugins/VendorAxiosSetup";
import {VapiProduct} from "./product/VapiProduct";
import {VapiArticle} from "./article/VapiArticle";
import {VapiLogistic} from "./logistic/VapiLogistic";
import {VapiCategory} from "@selldone/sdk-vendor/category/VapiCategory.ts";
const SDK_VERSION = "0.02";
// Extend the Window interface to recognize the properties you add to the global window object.
declare global {
interface Window {
// APIs
VAPI: VAPI;
// Global SDK Interface
$vendor: {
page: VapiPage;
product: VapiProduct;
category: VapiCategory;
// Article:
article: VapiArticle;
// Logistic:
logistic: VapiLogistic;
};
}
}
export class VendorSDK {
static Setup(): void {
console.log("┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓");
console.log(`┣━━━━━ Selldone® Vendor SDK | V${SDK_VERSION} ━━━━━┫`);
console.log("┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛");
//――――――――――――――――――――――――― Axios ―――――――――――――――――――――――――
VendorAxiosSetup();
//――――――――――――――――――――――――― Initialize Resources Origin ―――――――――――――――――――――――――
window.VAPI = new VAPI();
window.$vendor = {
page: new VapiPage(),
product: new VapiProduct(),
category: new VapiCategory(),
// Article:
article: new VapiArticle(),
// Logistic:
logistic: new VapiLogistic(),
};
}
}