ggez-banking-sdk 0.1.126 → 0.1.128

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.
@@ -239,7 +239,9 @@ class UserClient {
239
239
  CreateUser = async (data) => {
240
240
  try {
241
241
  const userData = FillCreateUserData(data);
242
- const { data: tokenData } = await this.authService.generateLimitedToken();
242
+ const { data: tokenData } = await this.authService.generateLimitedToken({
243
+ installationId: data.installationID,
244
+ });
243
245
  const config = {
244
246
  headers: { Authorization: `Bearer ${tokenData?.access_token}` },
245
247
  };
@@ -255,7 +257,9 @@ class UserClient {
255
257
  CreateUserWithGoogle = async (data) => {
256
258
  try {
257
259
  const userData = FillCreateUserWithGoogleData(data);
258
- const { data: tokenData } = await this.authService.generateLimitedToken();
260
+ const { data: tokenData } = await this.authService.generateLimitedToken({
261
+ installationId: data.installationID,
262
+ });
259
263
  const config = {
260
264
  headers: { Authorization: `Bearer ${tokenData?.access_token}` },
261
265
  };
@@ -7,6 +7,6 @@ declare class AuthService extends BaseService {
7
7
  endpoint: string;
8
8
  constructor(config: AxiosRequestConfig, nodeUrl: string);
9
9
  login(data: string): Promise<import("axios").AxiosResponse<TokenData, any, {}>>;
10
- generateLimitedToken(data?: IGenerateLimitedTokenData): Promise<import("axios").AxiosResponse<TokenData, any, {}>>;
10
+ generateLimitedToken(data: IGenerateLimitedTokenData): Promise<import("axios").AxiosResponse<TokenData, any, {}>>;
11
11
  }
12
12
  export { AuthService };
@@ -3,10 +3,10 @@ declare abstract class BaseService {
3
3
  protected axiosInstance: AxiosInstance;
4
4
  protected abstract endpoint: string;
5
5
  constructor(config: AxiosRequestConfig);
6
- protected resolveURL(path?: any): string;
7
6
  protected GET<T>(url: string, params?: any, config?: AxiosRequestConfig): Promise<AxiosResponse<T, any, {}>>;
8
7
  protected POST<T>(url: string, data: any, config?: AxiosRequestConfig): Promise<AxiosResponse<T, any, {}>>;
9
8
  protected PUT<T>(url: string, data: any, config?: AxiosRequestConfig): Promise<AxiosResponse<T, any, {}>>;
10
9
  protected DELETE<T>(url: string, data?: any, config?: AxiosRequestConfig): Promise<AxiosResponse<T, any, {}>>;
10
+ protected resolveURL(path?: any): string;
11
11
  }
12
12
  export { BaseService };
@@ -10,13 +10,6 @@ class BaseService {
10
10
  return req;
11
11
  });
12
12
  }
13
- resolveURL(path = "") {
14
- const p = path.toString().trim();
15
- if (p && !p.startsWith("/")) {
16
- path = `/${p}`;
17
- }
18
- return `${this.endpoint}${path}`;
19
- }
20
13
  async GET(url, params, config) {
21
14
  try {
22
15
  return this.axiosInstance.get(url, {
@@ -59,5 +52,12 @@ class BaseService {
59
52
  // onErrorHandler(ex);
60
53
  }
61
54
  }
55
+ resolveURL(path = "") {
56
+ const p = path.toString().trim();
57
+ if (p && !p.startsWith("/")) {
58
+ path = `/${p}`;
59
+ }
60
+ return `${this.endpoint}${path}`;
61
+ }
62
62
  }
63
63
  export { BaseService };
@@ -11,7 +11,9 @@ class LimitedService extends BaseService {
11
11
  this.axiosInstance.interceptors.request.use(async (req) => {
12
12
  const config = AxiosHelper.GetAuthAxiosConfig(this.nodeUrl, "", "");
13
13
  const authService = new AuthService(config, this.nodeUrl);
14
- const { data } = await authService.generateLimitedToken();
14
+ const { data } = await authService.generateLimitedToken({
15
+ installationId: "",
16
+ });
15
17
  const token = data?.access_token;
16
18
  if (token) {
17
19
  req.headers.setAuthorization(`Bearer ${token}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ggez-banking-sdk",
3
- "version": "0.1.126",
3
+ "version": "0.1.128",
4
4
  "description": "A Node.js package to handle GGEZ Banking API endpoints, Simplify the process of managing CRUD operations with this efficient and easy-to-use package.",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",