@livechat/developer-studio-api 3.0.32 → 3.0.34

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/index.d.mts CHANGED
@@ -1615,6 +1615,7 @@ declare function updatePlatformAdapterClientInstance(tokens?: {
1615
1615
  }): void;
1616
1616
 
1617
1617
  interface ApplicationPaymentDto {
1618
+ creditCardRequired: boolean;
1618
1619
  frequency: "monthly" | "once";
1619
1620
  perAccount: boolean;
1620
1621
  price: number;
@@ -2667,7 +2668,9 @@ declare const api: {
2667
2668
  deleteOnboarding(appId: string, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<void>;
2668
2669
  };
2669
2670
  payment: {
2670
- updatePaymentBlock(appId: string, payment: ApplicationPaymentDto, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<void>;
2671
+ updatePaymentBlock(appId: string, payment: Omit<ApplicationPaymentDto, "creditCardRequired"> & {
2672
+ creditCardRequired?: boolean | undefined;
2673
+ }, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<void>;
2671
2674
  deletePaymentBlock(appId: string, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<void>;
2672
2675
  };
2673
2676
  product: {
@@ -2751,6 +2754,7 @@ declare const api: {
2751
2754
  getApps({ filter }?: {
2752
2755
  filter?: string | undefined;
2753
2756
  }): Promise<ApplicationDto[] | null>;
2757
+ getAppsInstallations(): Promise<ApplicationDto[] | null>;
2754
2758
  };
2755
2759
  user: {
2756
2760
  getUser(authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<UserDto>;
package/dist/index.d.ts CHANGED
@@ -1615,6 +1615,7 @@ declare function updatePlatformAdapterClientInstance(tokens?: {
1615
1615
  }): void;
1616
1616
 
1617
1617
  interface ApplicationPaymentDto {
1618
+ creditCardRequired: boolean;
1618
1619
  frequency: "monthly" | "once";
1619
1620
  perAccount: boolean;
1620
1621
  price: number;
@@ -2667,7 +2668,9 @@ declare const api: {
2667
2668
  deleteOnboarding(appId: string, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<void>;
2668
2669
  };
2669
2670
  payment: {
2670
- updatePaymentBlock(appId: string, payment: ApplicationPaymentDto, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<void>;
2671
+ updatePaymentBlock(appId: string, payment: Omit<ApplicationPaymentDto, "creditCardRequired"> & {
2672
+ creditCardRequired?: boolean | undefined;
2673
+ }, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<void>;
2671
2674
  deletePaymentBlock(appId: string, authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<void>;
2672
2675
  };
2673
2676
  product: {
@@ -2751,6 +2754,7 @@ declare const api: {
2751
2754
  getApps({ filter }?: {
2752
2755
  filter?: string | undefined;
2753
2756
  }): Promise<ApplicationDto[] | null>;
2757
+ getAppsInstallations(): Promise<ApplicationDto[] | null>;
2754
2758
  };
2755
2759
  user: {
2756
2760
  getUser(authorization?: PlatformDpsClientInstanceAuthorization | undefined): Promise<UserDto>;
package/dist/index.js CHANGED
@@ -3981,10 +3981,11 @@ var platformDpsApplicationOnboardingApi = {
3981
3981
  var platformDpsApplicationPaymentApi = {
3982
3982
  updatePaymentBlock(appId, payment, authorization) {
3983
3983
  return __async(this, null, function* () {
3984
+ var _a;
3984
3985
  yield platformDpsClientInstance.put(
3985
3986
  `/v2/applications/${appId}/payment`,
3986
3987
  __spreadProps(__spreadValues({}, payment), {
3987
- creditCardRequired: true
3988
+ creditCardRequired: (_a = payment.creditCardRequired) != null ? _a : true
3988
3989
  }),
3989
3990
  getPlatformDpsClientConfig(authorization)
3990
3991
  ).catch((error) => {
@@ -4497,6 +4498,17 @@ var platformDpsApplicationsApi = {
4497
4498
  );
4498
4499
  });
4499
4500
  });
4501
+ },
4502
+ getAppsInstallations() {
4503
+ return __async(this, null, function* () {
4504
+ return platformDpsClientInstance.get(
4505
+ `/v2/applications/installations/counters/my`
4506
+ ).then(({ data }) => data).catch((error) => {
4507
+ throw error.withCustomMessage(
4508
+ `Apps installations couldn't be fetched. [${error.message}]`
4509
+ );
4510
+ });
4511
+ });
4500
4512
  }
4501
4513
  };
4502
4514
 
package/dist/index.mjs CHANGED
@@ -3879,10 +3879,11 @@ var platformDpsApplicationOnboardingApi = {
3879
3879
  var platformDpsApplicationPaymentApi = {
3880
3880
  updatePaymentBlock(appId, payment, authorization) {
3881
3881
  return __async(this, null, function* () {
3882
+ var _a;
3882
3883
  yield platformDpsClientInstance.put(
3883
3884
  `/v2/applications/${appId}/payment`,
3884
3885
  __spreadProps(__spreadValues({}, payment), {
3885
- creditCardRequired: true
3886
+ creditCardRequired: (_a = payment.creditCardRequired) != null ? _a : true
3886
3887
  }),
3887
3888
  getPlatformDpsClientConfig(authorization)
3888
3889
  ).catch((error) => {
@@ -4395,6 +4396,17 @@ var platformDpsApplicationsApi = {
4395
4396
  );
4396
4397
  });
4397
4398
  });
4399
+ },
4400
+ getAppsInstallations() {
4401
+ return __async(this, null, function* () {
4402
+ return platformDpsClientInstance.get(
4403
+ `/v2/applications/installations/counters/my`
4404
+ ).then(({ data }) => data).catch((error) => {
4405
+ throw error.withCustomMessage(
4406
+ `Apps installations couldn't be fetched. [${error.message}]`
4407
+ );
4408
+ });
4409
+ });
4398
4410
  }
4399
4411
  };
4400
4412
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livechat/developer-studio-api",
3
- "version": "3.0.32",
3
+ "version": "3.0.34",
4
4
  "description": "This project is API for LiveChat Developer Studio.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",