@onylab/common-api 2.0.0 → 2.0.1

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.
@@ -170,6 +170,7 @@ declare module "api/hubrise/mockup/HubriseApiMockup" {
170
170
  static setOrderStatus(times?: number): void;
171
171
  static getCatalog(times?: number): void;
172
172
  static getCatalogs(times?: number): void;
173
+ static createWebhook(times?: number): void;
173
174
  }
174
175
  }
175
176
  declare module "api/hubrise/model/menu/HubriseMenuCategoryContract" {
@@ -1026,6 +1027,24 @@ declare module "api/hubrise/model/account/HubriseAuthContract" {
1026
1027
  customer_list_name: string;
1027
1028
  }
1028
1029
  }
1030
+ declare module "api/hubrise/model/callback/HubriseResourceType" {
1031
+ export enum HubriseResourceType {
1032
+ CATALOG = "catalog",
1033
+ CUSTOMER = "customer",
1034
+ DELIVERY = "delivery",
1035
+ INVENTORY = "inventory",
1036
+ LOCATION = "location",
1037
+ ORDER = "order"
1038
+ }
1039
+ }
1040
+ declare module "api/hubrise/model/callback/HubriseEventType" {
1041
+ export enum HubriseEventType {
1042
+ CREATE = "create",
1043
+ DELETE = "delete",
1044
+ PATCH = "patch",
1045
+ UPDATE = "update"
1046
+ }
1047
+ }
1029
1048
  declare module "api/hubrise/service/HubriseApiContract" {
1030
1049
  import { HubriseOrderContract } from "api/hubrise/model/order/HubriseOrderContract";
1031
1050
  import { HubriseOrderStatus } from "api/hubrise/model/order/HubriseOrderStatus";
@@ -1035,6 +1054,8 @@ declare module "api/hubrise/service/HubriseApiContract" {
1035
1054
  import { HubriseLocationContract } from "api/hubrise/model/location/HubriseLocationContract";
1036
1055
  import { HubriseUserContract } from "api/hubrise/model/user/HubriseUserContract";
1037
1056
  import { HubriseAuthContract } from "api/hubrise/model/account/HubriseAuthContract";
1057
+ import { HubriseResourceType } from "api/hubrise/model/callback/HubriseResourceType";
1058
+ import { HubriseEventType } from "api/hubrise/model/callback/HubriseEventType";
1038
1059
  export interface HubriseApiContract {
1039
1060
  authorize(clientId: string, redirect: string): Promise<string>;
1040
1061
  getToken(clientId: string, clientSecret: string, code: string): Promise<HubriseAuthContract>;
@@ -1049,6 +1070,7 @@ declare module "api/hubrise/service/HubriseApiContract" {
1049
1070
  setOrderStatus(hubriseLocationId: string, hubriseOrderId: string, status: HubriseOrderStatus): Promise<void>;
1050
1071
  getCatalog(hubriseCatalogId: string): Promise<HubriseMenuCatalogContract>;
1051
1072
  getCatalogs(hubriseLocationId: string): Promise<HubriseMenuCatalogContract[]>;
1073
+ createWebhook(url: string, events: Record<HubriseResourceType, HubriseEventType[]>): Promise<void>;
1052
1074
  }
1053
1075
  }
1054
1076
  declare module "exception/ExceptionContract" {
@@ -1136,6 +1158,8 @@ declare module "api/hubrise/service/HubriseApi" {
1136
1158
  import { HubriseLocationContract } from "api/hubrise/model/location/HubriseLocationContract";
1137
1159
  import { HubriseUserContract } from "api/hubrise/model/user/HubriseUserContract";
1138
1160
  import { HubriseAuthContract } from "api/hubrise/model/account/HubriseAuthContract";
1161
+ import { HubriseResourceType } from "api/hubrise/model/callback/HubriseResourceType";
1162
+ import { HubriseEventType } from "api/hubrise/model/callback/HubriseEventType";
1139
1163
  export class HubriseApi implements HubriseApiContract {
1140
1164
  static readonly BASE_URL: string;
1141
1165
  static readonly BASE_AUTH_URL: string;
@@ -1155,6 +1179,7 @@ declare module "api/hubrise/service/HubriseApi" {
1155
1179
  setOrderStatus(hubriseLocationId: string, hubriseOrderId: string, status: HubriseOrderStatus): Promise<void>;
1156
1180
  getCatalog(hubriseCatalogId: string): Promise<HubriseMenuCatalogContract>;
1157
1181
  getCatalogs(hubriseLocationId: string): Promise<HubriseMenuCatalogContract[]>;
1182
+ createWebhook(url: string, events: Record<HubriseResourceType, HubriseEventType[]>): Promise<void>;
1158
1183
  }
1159
1184
  }
1160
1185
  declare module "api/hubrise/model/menu/HubriseMenuImageContract" {