@fireberry/sdk 0.0.2 → 0.0.4
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/package.json +1 -5
- package/dist/jest.config.d.ts +0 -6
- package/dist/jest.config.js +0 -11
- package/dist/src/context/context.d.ts +0 -13
- package/dist/src/context/context.js +0 -21
- package/dist/src/context/context.record.test.d.ts +0 -1
- package/dist/src/context/context.record.test.js +0 -36
- package/dist/src/context/index.d.ts +0 -5
- package/dist/src/context/index.js +0 -17
- package/dist/src/context/record.d.ts +0 -9
- package/dist/src/context/record.js +0 -32
- package/dist/src/context/user.d.ts +0 -8
- package/dist/src/context/user.js +0 -31
- package/dist/src/fireberry.sdk.d.ts +0 -9
- package/dist/src/fireberry.sdk.js +0 -14
- package/dist/src/fireberryAPI/fireberryV2Api.d.ts +0 -14
- package/dist/src/fireberryAPI/fireberryV2Api.js +0 -41
- package/dist/src/fireberryAPI/index.d.ts +0 -2
- package/dist/src/fireberryAPI/index.js +0 -20
- package/dist/src/fireberryAPI/types.d.ts +0 -10
- package/dist/src/fireberryAPI/types.js +0 -2
- package/dist/src/index.d.ts +0 -9
- package/dist/src/index.js +0 -6
- package/dist/src/utils/axios.util.d.ts +0 -6
- package/dist/src/utils/axios.util.js +0 -24
- package/dist/src/utils/index.d.ts +0 -2
- package/dist/src/utils/index.js +0 -18
- package/dist/src/utils/queryParam.util.d.ts +0 -1
- package/dist/src/utils/queryParam.util.js +0 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fireberry/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -17,10 +17,6 @@
|
|
|
17
17
|
"axios",
|
|
18
18
|
"dotenv"
|
|
19
19
|
],
|
|
20
|
-
"repository": {
|
|
21
|
-
"type": "git",
|
|
22
|
-
"url": "https://powerlinksoftware.visualstudio.com/AppPlatform/_git/FireberrySDK"
|
|
23
|
-
},
|
|
24
20
|
"author": "Itay Zemah @Fireberry",
|
|
25
21
|
"license": "ISC",
|
|
26
22
|
"devDependencies": {
|
package/dist/jest.config.d.ts
DELETED
package/dist/jest.config.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* For a detailed explanation regarding each configuration property and type check, visit:
|
|
4
|
-
* https://jestjs.io/docs/configuration
|
|
5
|
-
*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.default = {
|
|
8
|
-
moduleDirectories: ['node_modules', 'src'],
|
|
9
|
-
preset: 'ts-jest',
|
|
10
|
-
modulePathIgnorePatterns: ['<rootDir>/dist/'],
|
|
11
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { FireberryV2Api } from '../fireberryAPI';
|
|
2
|
-
import { RecordContext } from './record';
|
|
3
|
-
import { UserContext } from './user';
|
|
4
|
-
export declare class Context {
|
|
5
|
-
recordId?: string;
|
|
6
|
-
recordType?: number;
|
|
7
|
-
user: UserContext;
|
|
8
|
-
record: RecordContext;
|
|
9
|
-
constructor(fireberryApi: FireberryV2Api, recordDetails?: {
|
|
10
|
-
recordId: string;
|
|
11
|
-
recordType: number;
|
|
12
|
-
});
|
|
13
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Context = void 0;
|
|
4
|
-
const utils_1 = require("../utils");
|
|
5
|
-
const record_1 = require("./record");
|
|
6
|
-
const user_1 = require("./user");
|
|
7
|
-
class Context {
|
|
8
|
-
constructor(fireberryApi, recordDetails) {
|
|
9
|
-
const recordId = (0, utils_1.getParam)('recordId');
|
|
10
|
-
const recordTypeParam = (0, utils_1.getParam)('recordType');
|
|
11
|
-
const recordType = recordTypeParam ? parseInt(recordTypeParam) : undefined;
|
|
12
|
-
this.recordId = recordId;
|
|
13
|
-
this.recordType = recordType;
|
|
14
|
-
this.user = new user_1.UserContext(fireberryApi);
|
|
15
|
-
this.record = new record_1.RecordContext(fireberryApi, {
|
|
16
|
-
recordId: recordId || (recordDetails === null || recordDetails === void 0 ? void 0 : recordDetails.recordId),
|
|
17
|
-
recordType: recordType || (recordDetails === null || recordDetails === void 0 ? void 0 : recordDetails.recordType),
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
exports.Context = Context;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const __1 = require("..");
|
|
13
|
-
describe('SDK context', () => {
|
|
14
|
-
it('throw an error when trying to reach record functions', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
-
const fireberry = new __1.FireberrySDK({ tokenId: '9796da37-d499-432d-b698-e8daf41bf7ed' });
|
|
16
|
-
yield expect(fireberry.context.record.get('name')).rejects.toThrow('Record context is not set. Please set the recordId and recordType before calling this method.');
|
|
17
|
-
yield expect(fireberry.context.record.all()).rejects.toThrow('Record context is not set. Please set the recordId and recordType before calling this method.');
|
|
18
|
-
}));
|
|
19
|
-
it('retrieved a record', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
20
|
-
const customFieldName = 'pcfSystemField123';
|
|
21
|
-
const extendCustomObject = { [customFieldName]: 'test' };
|
|
22
|
-
const fireberry = new __1.FireberrySDK({
|
|
23
|
-
tokenId: '9796da37-d499-432d-b698-e8daf41bf7ed',
|
|
24
|
-
currentRecordDetails: { recordId: 'test', recordType: 1 },
|
|
25
|
-
});
|
|
26
|
-
const record = Object.assign({ createdBy: 'test', createdByName: 'test', createdOn: new Date(), modifiedBy: 'test', modifiedByName: 'test', modifiedOn: new Date(), ownerId: 'test', ownerName: 'test' }, extendCustomObject);
|
|
27
|
-
const mockAddListener = jest.spyOn(fireberry.api, 'get');
|
|
28
|
-
mockAddListener.mockImplementation((_recordType, _recordId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
29
|
-
return record;
|
|
30
|
-
}));
|
|
31
|
-
const specificFieldValue = yield fireberry.context.record.get(customFieldName);
|
|
32
|
-
expect(specificFieldValue).toBe(extendCustomObject[customFieldName]);
|
|
33
|
-
const recordResult = yield fireberry.context.record.all();
|
|
34
|
-
expect(recordResult).toBe(record);
|
|
35
|
-
}));
|
|
36
|
-
});
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./context"), exports);
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { CurrentRecordDetails } from '.';
|
|
2
|
-
import { BusinessObject, FireberryV2Api } from '../fireberryAPI';
|
|
3
|
-
export declare class RecordContext {
|
|
4
|
-
private fireberryApi;
|
|
5
|
-
private currentRecord;
|
|
6
|
-
constructor(fireberryApi: FireberryV2Api, currentRecord: CurrentRecordDetails);
|
|
7
|
-
get(fieldName: string): Promise<any>;
|
|
8
|
-
all(): Promise<BusinessObject & any>;
|
|
9
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.RecordContext = void 0;
|
|
13
|
-
class RecordContext {
|
|
14
|
-
constructor(fireberryApi, currentRecord) {
|
|
15
|
-
this.fireberryApi = fireberryApi;
|
|
16
|
-
this.currentRecord = currentRecord;
|
|
17
|
-
}
|
|
18
|
-
get(fieldName) {
|
|
19
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
20
|
-
return (yield this.all())[fieldName];
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
all() {
|
|
24
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
-
if (!this.currentRecord.recordId || !this.currentRecord.recordType) {
|
|
26
|
-
throw new Error('Record context is not set. Please set the recordId and recordType before calling this method.');
|
|
27
|
-
}
|
|
28
|
-
return yield this.fireberryApi.get(this.currentRecord.recordType, this.currentRecord.recordId);
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
exports.RecordContext = RecordContext;
|
package/dist/src/context/user.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.UserContext = void 0;
|
|
13
|
-
class UserContext {
|
|
14
|
-
constructor(fireberryApi) {
|
|
15
|
-
this.fireberryApi = fireberryApi;
|
|
16
|
-
this.recordType = CRM_USER;
|
|
17
|
-
}
|
|
18
|
-
// api/v3/record/9/me/:fieldname?
|
|
19
|
-
get(fieldName) {
|
|
20
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
throw new Error('Not implemented');
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
all() {
|
|
25
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
-
throw new Error('Not implemented');
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
exports.UserContext = UserContext;
|
|
31
|
-
const CRM_USER = 9;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Config } from '.';
|
|
2
|
-
import { Context } from './context';
|
|
3
|
-
import { FireberryV2Api } from './fireberryAPI';
|
|
4
|
-
export declare class FireberrySDK {
|
|
5
|
-
private config?;
|
|
6
|
-
context: Context;
|
|
7
|
-
api: FireberryV2Api;
|
|
8
|
-
constructor(config?: Config | undefined);
|
|
9
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FireberrySDK = void 0;
|
|
4
|
-
const context_1 = require("./context");
|
|
5
|
-
const fireberryAPI_1 = require("./fireberryAPI");
|
|
6
|
-
class FireberrySDK {
|
|
7
|
-
constructor(config) {
|
|
8
|
-
var _a;
|
|
9
|
-
this.config = config;
|
|
10
|
-
this.api = new fireberryAPI_1.FireberryV2Api(this.config);
|
|
11
|
-
this.context = new context_1.Context(this.api, (_a = this.config) === null || _a === void 0 ? void 0 : _a.currentRecordDetails);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
exports.FireberrySDK = FireberrySDK;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Config } from '..';
|
|
2
|
-
import { AxiosFireberryAPI } from '../utils';
|
|
3
|
-
import { BusinessObject } from './types';
|
|
4
|
-
export declare class FireberryV2Api extends AxiosFireberryAPI {
|
|
5
|
-
constructor(config?: Config);
|
|
6
|
-
/**
|
|
7
|
-
* Retrieves a record by its type and ID.
|
|
8
|
-
* @param recordType - The type of the record.
|
|
9
|
-
* @param recordId - The ID of the record.
|
|
10
|
-
* @returns A Promise that resolves to the retrieved record
|
|
11
|
-
*/
|
|
12
|
-
get<T extends BusinessObject>(recordType: number, recordId: string): Promise<T>;
|
|
13
|
-
query(fields: string[], recordType: number, query: string, shouldShowRealValues?: boolean): Promise<import("axios").AxiosResponse<any, any>>;
|
|
14
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.FireberryV2Api = void 0;
|
|
13
|
-
const utils_1 = require("../utils");
|
|
14
|
-
class FireberryV2Api extends utils_1.AxiosFireberryAPI {
|
|
15
|
-
constructor(config) {
|
|
16
|
-
super(config);
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Retrieves a record by its type and ID.
|
|
20
|
-
* @param recordType - The type of the record.
|
|
21
|
-
* @param recordId - The ID of the record.
|
|
22
|
-
* @returns A Promise that resolves to the retrieved record
|
|
23
|
-
*/
|
|
24
|
-
get(recordType, recordId) {
|
|
25
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
-
return (yield this.api.get(`/api/v2/record/${recordType}/${recordId}/getrecord`)).data;
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
query(fields_1, recordType_1, query_1) {
|
|
30
|
-
return __awaiter(this, arguments, void 0, function* (fields, recordType, query, shouldShowRealValues = false) {
|
|
31
|
-
const payload = {
|
|
32
|
-
recordType: recordType,
|
|
33
|
-
fields,
|
|
34
|
-
query,
|
|
35
|
-
show_real_value: shouldShowRealValues ? 1 : 0,
|
|
36
|
-
};
|
|
37
|
-
return yield this.api.post('/api/query', payload);
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
exports.FireberryV2Api = FireberryV2Api;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.FireberryV2Api = void 0;
|
|
18
|
-
var fireberryV2Api_1 = require("./fireberryV2Api");
|
|
19
|
-
Object.defineProperty(exports, "FireberryV2Api", { enumerable: true, get: function () { return fireberryV2Api_1.FireberryV2Api; } });
|
|
20
|
-
__exportStar(require("./types"), exports);
|
package/dist/src/index.d.ts
DELETED
package/dist/src/index.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FireberrySDK = exports.IS_DEVELOPMENT = void 0;
|
|
4
|
-
exports.IS_DEVELOPMENT = ['development', 'test'].includes(process.env.NODE_ENV);
|
|
5
|
-
var fireberry_sdk_1 = require("./fireberry.sdk");
|
|
6
|
-
Object.defineProperty(exports, "FireberrySDK", { enumerable: true, get: function () { return fireberry_sdk_1.FireberrySDK; } });
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.AxiosFireberryAPI = void 0;
|
|
7
|
-
const axios_1 = __importDefault(require("axios"));
|
|
8
|
-
const __1 = require("..");
|
|
9
|
-
class AxiosFireberryAPI {
|
|
10
|
-
constructor(config) {
|
|
11
|
-
const baseURL = 'http://win-local';
|
|
12
|
-
console.log('🚀 ~ AxiosFireberryAPI ~ constructor ~ baseURL:', baseURL);
|
|
13
|
-
const tokenid = __1.IS_DEVELOPMENT ? config === null || config === void 0 ? void 0 : config.tokenId : undefined;
|
|
14
|
-
this.api = axios_1.default.create({
|
|
15
|
-
baseURL,
|
|
16
|
-
headers: {
|
|
17
|
-
'Content-Type': 'application/json',
|
|
18
|
-
tokenid,
|
|
19
|
-
},
|
|
20
|
-
withCredentials: true,
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
exports.AxiosFireberryAPI = AxiosFireberryAPI;
|
package/dist/src/utils/index.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./axios.util"), exports);
|
|
18
|
-
__exportStar(require("./queryParam.util"), exports);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getParam(param: string): string | undefined;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getParam = void 0;
|
|
4
|
-
function getParam(param) {
|
|
5
|
-
if (typeof window !== 'undefined') {
|
|
6
|
-
const searchParams = new URLSearchParams(window.location.search);
|
|
7
|
-
return searchParams.get(param) || undefined;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
exports.getParam = getParam;
|