@onylab/common-api 2.1.14 → 2.1.15
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/common-api.d.ts
CHANGED
|
@@ -1221,8 +1221,9 @@ declare module "api/hubrise/model/user/HubriseUserContract" {
|
|
|
1221
1221
|
locales: HubriseLocale[];
|
|
1222
1222
|
}
|
|
1223
1223
|
}
|
|
1224
|
-
declare module "api/hubrise/model/
|
|
1224
|
+
declare module "api/hubrise/model/auth/HubriseAuthContract" {
|
|
1225
1225
|
export interface HubriseAuthContract {
|
|
1226
|
+
app_instance_id?: string;
|
|
1226
1227
|
access_token: string;
|
|
1227
1228
|
token_type: 'Bearer';
|
|
1228
1229
|
account_id: string;
|
|
@@ -1254,7 +1255,7 @@ declare module "api/hubrise/model/callback/HubriseEventType" {
|
|
|
1254
1255
|
UPDATE = "update"
|
|
1255
1256
|
}
|
|
1256
1257
|
}
|
|
1257
|
-
declare module "api/hubrise/model/
|
|
1258
|
+
declare module "api/hubrise/model/auth/HubriseAuthResource" {
|
|
1258
1259
|
export enum HubriseAuthResource {
|
|
1259
1260
|
ORDERS = "orders",
|
|
1260
1261
|
CUSTOMER_LIST = "customer_list",
|
|
@@ -1264,12 +1265,19 @@ declare module "api/hubrise/model/account/HubriseAuthResource" {
|
|
|
1264
1265
|
ALL_CATALOG_LISTS = "all_catalogs"
|
|
1265
1266
|
}
|
|
1266
1267
|
}
|
|
1267
|
-
declare module "api/hubrise/model/
|
|
1268
|
+
declare module "api/hubrise/model/auth/HubriseRightAccess" {
|
|
1268
1269
|
export enum HubriseRightAccess {
|
|
1269
1270
|
READ = "read",
|
|
1270
1271
|
WRITE = "write"
|
|
1271
1272
|
}
|
|
1272
1273
|
}
|
|
1274
|
+
declare module "api/hubrise/model/auth/HubriseAccessLevel" {
|
|
1275
|
+
export enum HubriseAccessLevel {
|
|
1276
|
+
ACCOUNT = "account",
|
|
1277
|
+
LOCATION = "location",
|
|
1278
|
+
PROFILE = "profile"
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1273
1281
|
declare module "api/hubrise/service/HubriseApiContract" {
|
|
1274
1282
|
import { HubriseOrderContract } from "api/hubrise/model/order/HubriseOrderContract";
|
|
1275
1283
|
import { HubriseOrderStatus } from "api/hubrise/model/order/HubriseOrderStatus";
|
|
@@ -1278,19 +1286,20 @@ declare module "api/hubrise/service/HubriseApiContract" {
|
|
|
1278
1286
|
import { HubriseCustomerListContract } from "api/hubrise/model/customer/HubriseCustomerListContract";
|
|
1279
1287
|
import { HubriseLocationContract } from "api/hubrise/model/location/HubriseLocationContract";
|
|
1280
1288
|
import { HubriseUserContract } from "api/hubrise/model/user/HubriseUserContract";
|
|
1281
|
-
import { HubriseAuthContract } from "api/hubrise/model/
|
|
1289
|
+
import { HubriseAuthContract } from "api/hubrise/model/auth/HubriseAuthContract";
|
|
1282
1290
|
import { HubriseResourceType } from "api/hubrise/model/callback/HubriseResourceType";
|
|
1283
1291
|
import { HubriseEventType } from "api/hubrise/model/callback/HubriseEventType";
|
|
1284
|
-
import { HubriseAuthResource } from "api/hubrise/model/
|
|
1285
|
-
import { HubriseRightAccess } from "api/hubrise/model/
|
|
1292
|
+
import { HubriseAuthResource } from "api/hubrise/model/auth/HubriseAuthResource";
|
|
1293
|
+
import { HubriseRightAccess } from "api/hubrise/model/auth/HubriseRightAccess";
|
|
1286
1294
|
import { HubriseAccountContract } from "api/hubrise/model/account/HubriseAccountContract";
|
|
1295
|
+
import { HubriseAccessLevel } from "api/hubrise/model/auth/HubriseAccessLevel";
|
|
1287
1296
|
export interface HubriseApiContract {
|
|
1288
|
-
authorize(name: string, clientId: string,
|
|
1297
|
+
authorize(name: string, clientId: string, redirect: string, accessLevel: HubriseAccessLevel, rights?: Record<HubriseAuthResource, HubriseRightAccess>, profile?: boolean, appInstanceId?: string): Promise<string>;
|
|
1289
1298
|
getToken(clientId: string, clientSecret: string, code: string): Promise<HubriseAuthContract>;
|
|
1290
1299
|
getUser(): Promise<HubriseUserContract>;
|
|
1291
1300
|
getAccount(): Promise<HubriseAccountContract>;
|
|
1292
1301
|
getLocations(): Promise<HubriseLocationContract[]>;
|
|
1293
|
-
getLocation(hubriseLocationId
|
|
1302
|
+
getLocation(hubriseLocationId?: string): Promise<HubriseLocationContract>;
|
|
1294
1303
|
createCustomer(hubriseCustomerListId: string, hubriseCustomer: HubriseCustomerContract): Promise<HubriseCustomerContract>;
|
|
1295
1304
|
getCustomer(hubriseCustomerListId: string, hubriseCustomerId: string): Promise<HubriseCustomerContract>;
|
|
1296
1305
|
getCustomers(hubriseCustomerListId: string, reference?: string, email?: string, phone?: string): Promise<HubriseCustomerContract[]>;
|
|
@@ -1388,6 +1397,13 @@ declare module "util/ValidatorUtil" {
|
|
|
1388
1397
|
static isISODate(str: string): boolean;
|
|
1389
1398
|
}
|
|
1390
1399
|
}
|
|
1400
|
+
declare module "api/hubrise/model/auth/HubriseAccessTokenContract" {
|
|
1401
|
+
import { HubriseAccessLevel } from "api/hubrise/model/auth/HubriseAccessLevel";
|
|
1402
|
+
export interface HubriseAccessTokenContract {
|
|
1403
|
+
access: HubriseAccessLevel;
|
|
1404
|
+
token: string;
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
1391
1407
|
declare module "api/hubrise/service/HubriseApi" {
|
|
1392
1408
|
import { HubriseApiContract } from "api/hubrise/service/HubriseApiContract";
|
|
1393
1409
|
import { HubriseOrderContract } from "api/hubrise/model/order/HubriseOrderContract";
|
|
@@ -1397,24 +1413,26 @@ declare module "api/hubrise/service/HubriseApi" {
|
|
|
1397
1413
|
import { HubriseCustomerListContract } from "api/hubrise/model/customer/HubriseCustomerListContract";
|
|
1398
1414
|
import { HubriseLocationContract } from "api/hubrise/model/location/HubriseLocationContract";
|
|
1399
1415
|
import { HubriseUserContract } from "api/hubrise/model/user/HubriseUserContract";
|
|
1400
|
-
import { HubriseAuthContract } from "api/hubrise/model/
|
|
1416
|
+
import { HubriseAuthContract } from "api/hubrise/model/auth/HubriseAuthContract";
|
|
1401
1417
|
import { HubriseResourceType } from "api/hubrise/model/callback/HubriseResourceType";
|
|
1402
1418
|
import { HubriseEventType } from "api/hubrise/model/callback/HubriseEventType";
|
|
1403
|
-
import { HubriseAuthResource } from "api/hubrise/model/
|
|
1404
|
-
import { HubriseRightAccess } from "api/hubrise/model/
|
|
1419
|
+
import { HubriseAuthResource } from "api/hubrise/model/auth/HubriseAuthResource";
|
|
1420
|
+
import { HubriseRightAccess } from "api/hubrise/model/auth/HubriseRightAccess";
|
|
1405
1421
|
import { HubriseAccountContract } from "api/hubrise/model/account/HubriseAccountContract";
|
|
1422
|
+
import { HubriseAccessTokenContract } from "api/hubrise/model/auth/HubriseAccessTokenContract";
|
|
1423
|
+
import { HubriseAccessLevel } from "api/hubrise/model/auth/HubriseAccessLevel";
|
|
1406
1424
|
export class HubriseApi implements HubriseApiContract {
|
|
1407
1425
|
static readonly BASE_URL: string;
|
|
1408
1426
|
static readonly BASE_AUTH_URL: string;
|
|
1409
1427
|
private static readonly TIMEOUT;
|
|
1410
|
-
private readonly
|
|
1411
|
-
constructor(
|
|
1412
|
-
authorize(name: string, clientId: string,
|
|
1428
|
+
private readonly accessToken;
|
|
1429
|
+
constructor(accessToken?: HubriseAccessTokenContract);
|
|
1430
|
+
authorize(name: string, clientId: string, redirect: string, accessLevel: HubriseAccessLevel, rights?: Record<HubriseAuthResource, HubriseRightAccess>, profile?: boolean, appInstanceId?: string): Promise<string>;
|
|
1413
1431
|
getToken(clientId: string, clientSecret: string, code: string): Promise<HubriseAuthContract>;
|
|
1414
1432
|
getUser(): Promise<HubriseUserContract>;
|
|
1415
1433
|
getAccount(): Promise<HubriseAccountContract>;
|
|
1416
1434
|
getLocations(): Promise<HubriseLocationContract[]>;
|
|
1417
|
-
getLocation(hubriseLocationId
|
|
1435
|
+
getLocation(hubriseLocationId?: string): Promise<HubriseLocationContract>;
|
|
1418
1436
|
createCustomer(hubriseCustomerListId: string, hubriseCustomer: HubriseCustomerContract): Promise<HubriseCustomerContract>;
|
|
1419
1437
|
getCustomer(hubriseCustomerListId: string, hubriseCustomerId: string): Promise<HubriseCustomerContract>;
|
|
1420
1438
|
getCustomers(hubriseCustomerListId: string, reference?: string, email?: string, phone?: string): Promise<HubriseCustomerContract[]>;
|
|
@@ -1585,9 +1603,11 @@ declare module "api/hubrise/service/TotalHubriseCalculator" {
|
|
|
1585
1603
|
}
|
|
1586
1604
|
declare module "api/web" {
|
|
1587
1605
|
export * from "api/hubrise/model/account/HubriseAccountContract";
|
|
1588
|
-
export * from "api/hubrise/model/
|
|
1589
|
-
export * from "api/hubrise/model/
|
|
1590
|
-
export * from "api/hubrise/model/
|
|
1606
|
+
export * from "api/hubrise/model/auth/HubriseAccessLevel";
|
|
1607
|
+
export * from "api/hubrise/model/auth/HubriseAccessTokenContract";
|
|
1608
|
+
export * from "api/hubrise/model/auth/HubriseAuthContract";
|
|
1609
|
+
export * from "api/hubrise/model/auth/HubriseAuthResource";
|
|
1610
|
+
export * from "api/hubrise/model/auth/HubriseRightAccess";
|
|
1591
1611
|
export * from "api/hubrise/model/address/HubriseAddressContract";
|
|
1592
1612
|
export * from "api/hubrise/model/address/HubriseCountryCode";
|
|
1593
1613
|
export * from "api/hubrise/model/common/HubriseCurrencyCode";
|