@natyapp/meta 1.6.1 → 1.6.2

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.
@@ -1,14 +1,15 @@
1
1
  export declare class ConnectionEntity {
2
+ _id: string;
2
3
  id: string;
3
4
  companyId: string;
4
5
  appId: string;
5
6
  appSecret: string;
6
7
  accessToken: string;
8
+ accountId: string;
7
9
  businessId: string;
8
10
  phoneNumberId: string;
9
11
  phoneNumber: number;
10
12
  isActive: boolean;
11
- _id: string;
12
13
  updatedAt: string;
13
14
  createdAt: string;
14
15
  constructor(props: Omit<ConnectionEntity, "_id" | "updatedAt" | "createdAt" | "id" | "isActive">, id?: string);
@@ -27,7 +27,7 @@ class WhatsappResponse {
27
27
  const connection = getConnections.isSuccess.find(item => item.phoneNumberId === this.phone_number_id);
28
28
  if (!connection)
29
29
  throw new Error("Não foi possível encontrar a instância");
30
- const longLivedToken = await this.update_long_lived_token(process.env.META_CLIENT_ID, process.env.META_CLIENT_SECRET, connection.accessToken);
30
+ const longLivedToken = await this.update_long_lived_token(connection.appId, connection.appSecret, connection.accessToken);
31
31
  if (longLivedToken) {
32
32
  connection.accessToken = longLivedToken;
33
33
  await services_1.connectionMutations.update(connection._id, connection);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natyapp/meta",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",