@livechat/developer-studio-api 2.3.50 → 2.3.52

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.js CHANGED
@@ -91,7 +91,7 @@ __export(src_exports, {
91
91
  getPlatformDpsAdminClientAuthorization: () => getPlatformDpsAdminClientAuthorization,
92
92
  getPlatformDpsClientAuthorization: () => getPlatformDpsClientAuthorization,
93
93
  getPlatformDpsClientConfig: () => getPlatformDpsClientConfig,
94
- getRegion: () => getRegion,
94
+ getRegion: () => getRegion2,
95
95
  getSentryClientAuthorization: () => getSentryClientAuthorization,
96
96
  getSentryClientConfig: () => getSentryClientConfig,
97
97
  getTextClientAuthorization: () => getTextClientAuthorization,
@@ -2464,7 +2464,7 @@ var vercelApi = {
2464
2464
  };
2465
2465
 
2466
2466
  // src/apis/integrations/neon/api.ts
2467
- var import_axios11 = __toESM(require("axios"));
2467
+ var import_axios16 = __toESM(require("axios"));
2468
2468
 
2469
2469
  // src/apis/integrations/neon/instance.ts
2470
2470
  var import_axios10 = __toESM(require("axios"));
@@ -2515,22 +2515,482 @@ function updateNeonClientInstance(token) {
2515
2515
  }
2516
2516
  }
2517
2517
 
2518
+ // src/apis/platform/accounts/instance.ts
2519
+ var import_axios11 = __toESM(require("axios"));
2520
+ var platformAccountsClientInstance = import_axios11.default.create({
2521
+ baseURL: "https://accounts.labs.livechatinc.com"
2522
+ });
2523
+ function getPlatformAccountsClientAuthorization(req) {
2524
+ return {
2525
+ token: req.headers["platform-accounts-token"]
2526
+ };
2527
+ }
2528
+ function getPlatformAccountsClientConfig(options = {}) {
2529
+ const defaultAuthorization = platformAccountsClientInstance.defaults.headers["Authorization"];
2530
+ const headers = {
2531
+ authorization: defaultAuthorization != null ? defaultAuthorization : options.token ? `Bearer ${options.token}` : void 0
2532
+ };
2533
+ return {
2534
+ headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
2535
+ };
2536
+ }
2537
+ function initPlatformAccountsClientInstance(baseUrl, token) {
2538
+ if (baseUrl) {
2539
+ platformAccountsClientInstance.interceptors.request.use(
2540
+ (config) => __async(this, null, function* () {
2541
+ config.baseURL = baseUrl;
2542
+ return config;
2543
+ }),
2544
+ (error) => Promise.reject(error)
2545
+ );
2546
+ }
2547
+ if (token) {
2548
+ platformAccountsClientInstance.defaults.headers["Authorization"] = `Bearer ${token}`;
2549
+ } else {
2550
+ delete platformAccountsClientInstance.defaults.headers["Authorization"];
2551
+ }
2552
+ }
2553
+
2554
+ // src/apis/platform/billing/instance.ts
2555
+ var import_axios12 = __toESM(require("axios"));
2556
+ var platformBillingClientInstance = import_axios12.default.create({
2557
+ baseURL: "https://billing.labs.livechatinc.com"
2558
+ });
2559
+ function getPlatformBillingClientAuthorization(req) {
2560
+ return {
2561
+ token: req.headers["platform-token"]
2562
+ };
2563
+ }
2564
+ function getPlatformBillingClientConfig(options = {}) {
2565
+ const defaultAuthorization = platformBillingClientInstance.defaults.headers.Authorization;
2566
+ const headers = {
2567
+ authorization: defaultAuthorization != null ? defaultAuthorization : options.token ? `Bearer ${options.token}` : void 0
2568
+ };
2569
+ return {
2570
+ headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
2571
+ };
2572
+ }
2573
+ function initPlatformBillingClientInstance(baseUrl, token) {
2574
+ if (baseUrl) {
2575
+ platformBillingClientInstance.interceptors.request.use(
2576
+ (config) => __async(this, null, function* () {
2577
+ config.baseURL = baseUrl;
2578
+ return config;
2579
+ }),
2580
+ (error) => Promise.reject(error)
2581
+ );
2582
+ }
2583
+ if (token) {
2584
+ platformBillingClientInstance.defaults.headers.Authorization = `Bearer ${token}`;
2585
+ } else {
2586
+ delete platformBillingClientInstance.defaults.headers.Authorization;
2587
+ }
2588
+ }
2589
+
2590
+ // src/apis/platform/adapter/instance.ts
2591
+ var import_axios13 = __toESM(require("axios"));
2592
+ var REGION = {
2593
+ FRA: "fra",
2594
+ DAL: "dal",
2595
+ FRA_A: "fra-a",
2596
+ FRA_B: "fra-b"
2597
+ };
2598
+ var supportedRegions = Object.values(REGION);
2599
+ var getRegion = (token) => {
2600
+ const region = token.split(":")[0];
2601
+ if (supportedRegions.includes(region)) {
2602
+ return region;
2603
+ }
2604
+ };
2605
+ function getPlatformAdapterClientAuthorization(req) {
2606
+ return {
2607
+ platform: {
2608
+ dps: req.headers["platform-dps-token"]
2609
+ },
2610
+ github: {
2611
+ app: req.headers["github-app-token"],
2612
+ oauth: req.headers["github-oauth-token"]
2613
+ },
2614
+ netlify: req.headers["netlify-token"],
2615
+ vercel: req.headers["vercel-token"],
2616
+ planetscale: req.headers["planetscale-token"],
2617
+ neon: req.headers["neon-token"],
2618
+ sentry: req.headers["sentry-token"],
2619
+ openai: req.headers["openai-token"]
2620
+ };
2621
+ }
2622
+ var platformAdapterClientInstance = import_axios13.default.create({
2623
+ baseURL: "https://platform.labs.text.com/console-adapter/api",
2624
+ headers: {
2625
+ "Content-Type": "application/json"
2626
+ }
2627
+ });
2628
+ platformAdapterClientInstance.interceptors.response.use(
2629
+ (r) => r,
2630
+ (error) => {
2631
+ var _a;
2632
+ if (import_axios13.default.isAxiosError(error)) {
2633
+ if (((_a = error.response) == null ? void 0 : _a.status) === 401) {
2634
+ const source = error.response.data.error.source;
2635
+ if (source) {
2636
+ throw new UnauthorizeApiError(source);
2637
+ }
2638
+ }
2639
+ }
2640
+ throw error;
2641
+ }
2642
+ );
2643
+ function getPlatformAdapterClientConfig(options = {}) {
2644
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
2645
+ const currentHeaders = platformAdapterClientInstance.defaults.headers;
2646
+ const headers = {
2647
+ platform: {
2648
+ dps: (_b = currentHeaders["platform-dps-token"]) != null ? _b : (_a = options.platform) == null ? void 0 : _a.dps
2649
+ },
2650
+ integrations: {
2651
+ github: {
2652
+ app: (_d = currentHeaders["github-app-token"]) != null ? _d : (_c = options.github) == null ? void 0 : _c.app,
2653
+ oauth: (_f = currentHeaders["github-oauth-token"]) != null ? _f : (_e = options.github) == null ? void 0 : _e.oauth
2654
+ },
2655
+ netlify: (_g = currentHeaders["netlify-token"]) != null ? _g : options.netlify,
2656
+ vercel: (_h = currentHeaders["vercel-token"]) != null ? _h : options.vercel,
2657
+ planetscale: (_i = currentHeaders["planetscale-token"]) != null ? _i : options.planetscale,
2658
+ neon: (_j = currentHeaders["neon-token"]) != null ? _j : options.neon,
2659
+ sentry: (_k = currentHeaders["sentry-token"]) != null ? _k : options.sentry,
2660
+ openai: (_l = currentHeaders["openai-token"]) != null ? _l : options.openai
2661
+ }
2662
+ };
2663
+ if (currentHeaders["platform-dps-token"]) {
2664
+ currentHeaders["X-Region"] = (_m = getRegion(currentHeaders["platform-dps-token"])) != null ? _m : void 0;
2665
+ }
2666
+ if (((_o = (_n = options.ensureAuthorizationToken) == null ? void 0 : _n.platform) == null ? void 0 : _o.dps) && !headers.platform.dps) {
2667
+ throw new UnauthorizeApiError("dps");
2668
+ }
2669
+ if (((_p = options.ensureAuthorizationToken) == null ? void 0 : _p.github) && (!headers.integrations.github.app || !headers.integrations.github.oauth)) {
2670
+ throw new UnauthorizeApiError("github");
2671
+ }
2672
+ if (((_q = options.ensureAuthorizationToken) == null ? void 0 : _q.vercel) && !headers.integrations.vercel) {
2673
+ throw new UnauthorizeApiError("vercel");
2674
+ }
2675
+ if (((_r = options.ensureAuthorizationToken) == null ? void 0 : _r.netlify) && !headers.integrations.netlify) {
2676
+ throw new UnauthorizeApiError("netlify");
2677
+ }
2678
+ if (((_s = options.ensureAuthorizationToken) == null ? void 0 : _s.planetscale) && !headers.integrations.planetscale) {
2679
+ throw new UnauthorizeApiError("planetscale");
2680
+ }
2681
+ if (((_t = options.ensureAuthorizationToken) == null ? void 0 : _t.neon) && !headers.integrations.neon) {
2682
+ throw new UnauthorizeApiError("neon");
2683
+ }
2684
+ if (((_u = options.ensureAuthorizationToken) == null ? void 0 : _u.sentry) && !headers.integrations.sentry) {
2685
+ throw new UnauthorizeApiError("sentry");
2686
+ }
2687
+ if (((_v = options.ensureAuthorizationToken) == null ? void 0 : _v.openai) && !headers.integrations.openai) {
2688
+ throw new UnauthorizeApiError("openai");
2689
+ }
2690
+ return {
2691
+ headers: __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, headers.platform.dps ? { "platform-dps-token": headers.platform.dps } : {}), headers.integrations.github.app ? { "github-app-token": headers.integrations.github.app } : {}), headers.integrations.github.oauth ? { "github-oauth-token": headers.integrations.github.oauth } : {}), headers.integrations.netlify ? { "netlify-token": headers.integrations.netlify } : {}), headers.integrations.vercel ? { "vercel-token": headers.integrations.vercel } : {}), headers.integrations.planetscale ? { "planetscale-token": headers.integrations.planetscale } : {}), headers.integrations.sentry ? { "sentry-token": headers.integrations.sentry } : {}), headers.integrations.openai ? { "openai-token": headers.integrations.openai } : {})
2692
+ };
2693
+ }
2694
+ function initPlatformAdapterClientInstance(baseUrl, tokens) {
2695
+ if (baseUrl) {
2696
+ platformAdapterClientInstance.interceptors.request.use(
2697
+ (config) => {
2698
+ config.baseURL = baseUrl;
2699
+ return config;
2700
+ },
2701
+ (error) => Promise.reject(error)
2702
+ );
2703
+ }
2704
+ if (tokens) {
2705
+ updatePlatformAdapterClientInstance(tokens);
2706
+ }
2707
+ }
2708
+ function updatePlatformAdapterClientInstance(tokens) {
2709
+ var _a, _b, _c;
2710
+ const headers = platformAdapterClientInstance.defaults.headers;
2711
+ if ((_a = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _a.dps) {
2712
+ headers["platform-dps-token"] = tokens.platform.dps;
2713
+ }
2714
+ if ((_b = tokens == null ? void 0 : tokens.github) == null ? void 0 : _b.app) {
2715
+ headers["github-app-token"] = tokens.github.app;
2716
+ }
2717
+ if ((_c = tokens == null ? void 0 : tokens.github) == null ? void 0 : _c.oauth) {
2718
+ headers["github-oauth-token"] = tokens.github.oauth;
2719
+ }
2720
+ if (tokens == null ? void 0 : tokens.netlify) {
2721
+ headers["netlify-token"] = tokens.netlify;
2722
+ }
2723
+ if (tokens == null ? void 0 : tokens.vercel) {
2724
+ headers["vercel-token"] = tokens.vercel;
2725
+ }
2726
+ if (tokens == null ? void 0 : tokens.planetscale) {
2727
+ headers["planetscale-token"] = tokens.planetscale;
2728
+ }
2729
+ if (tokens == null ? void 0 : tokens.neon) {
2730
+ headers["neon-token"] = tokens.neon;
2731
+ }
2732
+ if (tokens == null ? void 0 : tokens.sentry) {
2733
+ headers["sentry-token"] = tokens.sentry;
2734
+ }
2735
+ if (tokens == null ? void 0 : tokens.openai) {
2736
+ headers["openai-token"] = tokens.openai;
2737
+ }
2738
+ }
2739
+
2740
+ // src/apis/platform/dps/applications/application/autoReview/_contracts/dtos/autoReview.ts
2741
+ var getEmptyAppAutoReview = () => ({
2742
+ isReviewed: false,
2743
+ recommendations: {
2744
+ listingDetails: {
2745
+ appName: "",
2746
+ shortDescription: "",
2747
+ longDescription: "",
2748
+ features: "",
2749
+ benefits: ""
2750
+ },
2751
+ auth: {
2752
+ hasZeroScopes: false
2753
+ }
2754
+ },
2755
+ errors: {
2756
+ listingDetails: {
2757
+ appName: "",
2758
+ shortDescription: "",
2759
+ longDescription: "",
2760
+ features: "",
2761
+ benefits: ""
2762
+ },
2763
+ auth: {
2764
+ hasAllScopes: false,
2765
+ isRedirectUriSafe: false
2766
+ },
2767
+ links: {
2768
+ tutorial: {
2769
+ returns200: false,
2770
+ isValid: false
2771
+ },
2772
+ privacyPolicy: {
2773
+ returns200: false,
2774
+ isValid: false
2775
+ }
2776
+ },
2777
+ images: {
2778
+ icon: {
2779
+ isNsfw: false,
2780
+ isRatioValid: false
2781
+ },
2782
+ screenshots: {
2783
+ areNsfw: false,
2784
+ areRatiosValid: false
2785
+ }
2786
+ }
2787
+ }
2788
+ });
2789
+
2790
+ // src/apis/platform/dps/applications/application/autoReview/_contracts/payloads/autoReview.ts
2791
+ var getAppAutoReviewPayload = (value) => {
2792
+ return {
2793
+ appName: value,
2794
+ shortDescription: value,
2795
+ longDescription: value,
2796
+ features: value,
2797
+ benefits: value,
2798
+ scopes: value,
2799
+ redirect: value,
2800
+ tutorial: value,
2801
+ privacyPolicy: value,
2802
+ icons: value,
2803
+ screenshots: value
2804
+ };
2805
+ };
2806
+
2807
+ // src/apis/platform/dps/instance.ts
2808
+ var import_axios14 = __toESM(require("axios"));
2809
+ var platformDpsClientInstance = import_axios14.default.create({
2810
+ baseURL: "https://dev-platform.labs.livechatinc.com"
2811
+ });
2812
+ function getPlatformDpsClientAuthorization(req) {
2813
+ var _a;
2814
+ return {
2815
+ token: (_a = req.headers["platform-dps-token"]) != null ? _a : req.headers["platform-token"],
2816
+ tokenType: "Bearer"
2817
+ };
2818
+ }
2819
+ function getPlatformDpsAdminClientAuthorization() {
2820
+ var _a, _b;
2821
+ const token = process.env.NEXT_PUBLIC_PLATFORM_ENV === "prod" ? (_a = process.env.PLATFORM_DPS_TOKEN_FOR_GITHUB) != null ? _a : "" : (_b = process.env.PLATFORM_DPS_TOKEN_FOR_GITHUB_LABS) != null ? _b : "";
2822
+ return {
2823
+ token: btoa(`apps@livechatinc.com:${token}`),
2824
+ tokenType: "Basic"
2825
+ };
2826
+ }
2827
+ function getPlatformDpsClientConfig(options = {}) {
2828
+ const currentHeaders = platformDpsClientInstance.defaults.headers;
2829
+ const defaultAuthorization = currentHeaders.Authorization;
2830
+ const headers = {
2831
+ authorization: defaultAuthorization != null ? defaultAuthorization : options.token ? `Bearer ${options.token}` : void 0
2832
+ };
2833
+ return {
2834
+ headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
2835
+ };
2836
+ }
2837
+ function initPlatformDpsClientInstance(baseUrl, token) {
2838
+ const headers = platformDpsClientInstance.defaults.headers;
2839
+ if (baseUrl) {
2840
+ platformDpsClientInstance.interceptors.request.use(
2841
+ (config) => {
2842
+ config.baseURL = baseUrl;
2843
+ return config;
2844
+ },
2845
+ (error) => Promise.reject(error)
2846
+ );
2847
+ }
2848
+ if (token) {
2849
+ headers.Authorization = `Bearer ${token}`;
2850
+ } else {
2851
+ delete headers.Authorization;
2852
+ }
2853
+ }
2854
+
2855
+ // src/apis/products/livechat/instance.ts
2856
+ var import_axios15 = __toESM(require("axios"));
2857
+ var REGION2 = {
2858
+ FRA: "fra",
2859
+ DAL: "dal",
2860
+ FRA_A: "fra-a",
2861
+ FRA_B: "fra-b"
2862
+ };
2863
+ var supportedRegions2 = Object.values(REGION2);
2864
+ var getRegion2 = (token) => {
2865
+ const region = token.split(":")[0];
2866
+ if (supportedRegions2.includes(region)) {
2867
+ return region;
2868
+ }
2869
+ };
2870
+ var livechatClientInstance = import_axios15.default.create({
2871
+ baseURL: "https://api.labs.livechatinc.com"
2872
+ });
2873
+ function getLiveChatClientAuthorization(req) {
2874
+ return {
2875
+ token: req.headers["livechat-token"]
2876
+ };
2877
+ }
2878
+ function getLiveChatClientConfig(options = {}) {
2879
+ const currentHeaders = livechatClientInstance.defaults.headers;
2880
+ const defaultAuthorization = currentHeaders.Authorization;
2881
+ const headers = {
2882
+ authorization: defaultAuthorization != null ? defaultAuthorization : options.token ? `Bearer ${options.token}` : void 0
2883
+ };
2884
+ return {
2885
+ headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
2886
+ };
2887
+ }
2888
+ function initLiveChatClientInstance(baseUrl, token) {
2889
+ const region = token ? getRegion2(token) : void 0;
2890
+ const headers = livechatClientInstance.defaults.headers;
2891
+ if (baseUrl) {
2892
+ livechatClientInstance.interceptors.request.use(
2893
+ (config) => {
2894
+ config.baseURL = baseUrl;
2895
+ return config;
2896
+ },
2897
+ (error) => Promise.reject(error)
2898
+ );
2899
+ }
2900
+ if (region) {
2901
+ headers["X-Region"] = region;
2902
+ }
2903
+ if (token) {
2904
+ headers.Authorization = `Bearer ${token}`;
2905
+ } else {
2906
+ delete headers.Authorization;
2907
+ }
2908
+ }
2909
+
2518
2910
  // src/apis/integrations/neon/project/branch/api.ts
2519
2911
  var neonProjectBranchApi = {
2520
- getBranch(projectId, branchId, authorization) {
2912
+ getBranches(projectId, authorization) {
2913
+ return __async(this, null, function* () {
2914
+ const response = yield neonClientInstance.get(
2915
+ `projects/${projectId}/branches`,
2916
+ getNeonClientConfig(__spreadProps(__spreadValues({}, authorization), {
2917
+ ensureAuthorizationToken: true
2918
+ }))
2919
+ );
2920
+ return response.data;
2921
+ });
2922
+ },
2923
+ createDatabase(projectId, branchId, databaseName, ownerName, authorization) {
2924
+ return __async(this, null, function* () {
2925
+ const response = yield neonClientInstance.post(
2926
+ `projects/${projectId}/branches/${branchId}/databases`,
2927
+ {
2928
+ database: {
2929
+ name: databaseName,
2930
+ owner_name: ownerName
2931
+ }
2932
+ },
2933
+ getNeonClientConfig(__spreadProps(__spreadValues({}, authorization), {
2934
+ ensureAuthorizationToken: true
2935
+ }))
2936
+ );
2937
+ return response.data;
2938
+ });
2939
+ },
2940
+ deleteDatabase(projectId, branchId, databaseName, authorization) {
2941
+ return __async(this, null, function* () {
2942
+ const response = yield neonClientInstance.delete(
2943
+ `projects/${projectId}/branches/${branchId}/databases/${databaseName}`,
2944
+ getNeonClientConfig(__spreadProps(__spreadValues({}, authorization), {
2945
+ ensureAuthorizationToken: true
2946
+ }))
2947
+ );
2948
+ return response.data;
2949
+ });
2950
+ },
2951
+ getDatabases(projectId, branchId, authorization) {
2952
+ return __async(this, null, function* () {
2953
+ const response = yield neonClientInstance.get(
2954
+ `projects/${projectId}/branches/${branchId}/databases`,
2955
+ getNeonClientConfig(__spreadProps(__spreadValues({}, authorization), {
2956
+ ensureAuthorizationToken: true
2957
+ }))
2958
+ );
2959
+ return response.data;
2960
+ });
2961
+ },
2962
+ getNeonDatabases(projectId, authorization) {
2963
+ return __async(this, null, function* () {
2964
+ const response = yield platformAdapterClientInstance.post(
2965
+ `integrations/neon/databases`,
2966
+ {
2967
+ projectId
2968
+ },
2969
+ getNeonClientConfig(__spreadProps(__spreadValues({}, authorization), {
2970
+ ensureAuthorizationToken: true
2971
+ }))
2972
+ );
2973
+ return response.data;
2974
+ });
2975
+ },
2976
+ getRolePassword(projectId, branchId, roleName, authorization) {
2521
2977
  return __async(this, null, function* () {
2522
2978
  const response = yield neonClientInstance.get(
2523
- `projects/${projectId}/branches/${branchId}`,
2524
- getNeonClientConfig(__spreadValues({}, authorization))
2979
+ `projects/${projectId}/branches/${branchId}/roles/${roleName}/reveal_password`,
2980
+ getNeonClientConfig(__spreadProps(__spreadValues({}, authorization), {
2981
+ ensureAuthorizationToken: true
2982
+ }))
2525
2983
  );
2526
2984
  return response.data;
2527
2985
  });
2528
2986
  },
2529
- getBranches(projectId, authorization) {
2987
+ getBranchEndpoints(projectId, branchId, authorization) {
2530
2988
  return __async(this, null, function* () {
2531
2989
  const response = yield neonClientInstance.get(
2532
- `projects/${projectId}/branches`,
2533
- getNeonClientConfig(__spreadValues({}, authorization))
2990
+ `projects/${projectId}/branches/${branchId}/endpoints`,
2991
+ getNeonClientConfig(__spreadProps(__spreadValues({}, authorization), {
2992
+ ensureAuthorizationToken: true
2993
+ }))
2534
2994
  );
2535
2995
  return response.data;
2536
2996
  });
@@ -2540,13 +3000,16 @@ var neonProjectBranchApi = {
2540
3000
  // src/apis/integrations/neon/project/api.ts
2541
3001
  var neonProjectApi = {
2542
3002
  branch: neonProjectBranchApi,
2543
- createProject(projectName, authorization) {
3003
+ createProject(projectName, databaseName, authorization) {
2544
3004
  return __async(this, null, function* () {
2545
3005
  const response = yield neonClientInstance.post(
2546
3006
  `/projects`,
2547
3007
  {
2548
3008
  project: {
2549
- name: projectName
3009
+ name: projectName,
3010
+ branch: {
3011
+ database_name: databaseName
3012
+ }
2550
3013
  }
2551
3014
  },
2552
3015
  getNeonClientConfig(__spreadProps(__spreadValues({}, authorization), {
@@ -2588,6 +3051,17 @@ var neonProjectApi = {
2588
3051
  );
2589
3052
  return response.data;
2590
3053
  });
3054
+ },
3055
+ getNeonProjects(authorization) {
3056
+ return __async(this, null, function* () {
3057
+ const response = yield platformAdapterClientInstance.get(
3058
+ "/integrations/neon/projects",
3059
+ getNeonClientConfig(__spreadProps(__spreadValues({}, authorization), {
3060
+ ensureAuthorizationToken: true
3061
+ }))
3062
+ );
3063
+ return response.data;
3064
+ });
2591
3065
  }
2592
3066
  };
2593
3067
 
@@ -2603,6 +3077,17 @@ var neonUserApi = {
2603
3077
  );
2604
3078
  return response.data;
2605
3079
  });
3080
+ },
3081
+ getNeonUser(authorization) {
3082
+ return __async(this, null, function* () {
3083
+ const response = yield platformAdapterClientInstance.get(
3084
+ "/integrations/neon/user",
3085
+ getNeonClientConfig(__spreadProps(__spreadValues({}, authorization), {
3086
+ ensureAuthorizationToken: true
3087
+ }))
3088
+ );
3089
+ return response.data;
3090
+ });
2606
3091
  }
2607
3092
  };
2608
3093
 
@@ -2612,7 +3097,7 @@ var neonApi = {
2612
3097
  user: neonUserApi,
2613
3098
  getToken(code, clientId, clientSecret, redirectUri) {
2614
3099
  return __async(this, null, function* () {
2615
- var _a;
3100
+ var _a, _b;
2616
3101
  const data = new URLSearchParams({
2617
3102
  code,
2618
3103
  client_id: clientId,
@@ -2620,7 +3105,7 @@ var neonApi = {
2620
3105
  redirect_uri: redirectUri,
2621
3106
  grant_type: "authorization_code"
2622
3107
  });
2623
- const response = yield import_axios11.default.post(
3108
+ const response = yield import_axios16.default.post(
2624
3109
  "https://oauth2.neon.tech/oauth2/token",
2625
3110
  data,
2626
3111
  {
@@ -2630,7 +3115,10 @@ var neonApi = {
2630
3115
  }
2631
3116
  );
2632
3117
  const params = new URLSearchParams(response.data);
2633
- return (_a = params.get("access_token")) != null ? _a : "";
3118
+ return {
3119
+ token: (_a = params.get("access_token")) != null ? _a : "",
3120
+ refreshToken: (_b = params.get("refresh_token")) != null ? _b : ""
3121
+ };
2634
3122
  });
2635
3123
  }
2636
3124
  };
@@ -2646,61 +3134,6 @@ var integrationsApi = {
2646
3134
  text: textApi
2647
3135
  };
2648
3136
 
2649
- // src/apis/products/livechat/instance.ts
2650
- var import_axios12 = __toESM(require("axios"));
2651
- var REGION = {
2652
- FRA: "fra",
2653
- DAL: "dal",
2654
- FRA_A: "fra-a",
2655
- FRA_B: "fra-b"
2656
- };
2657
- var supportedRegions = Object.values(REGION);
2658
- var getRegion = (token) => {
2659
- const region = token.split(":")[0];
2660
- if (supportedRegions.includes(region)) {
2661
- return region;
2662
- }
2663
- };
2664
- var livechatClientInstance = import_axios12.default.create({
2665
- baseURL: "https://api.labs.livechatinc.com"
2666
- });
2667
- function getLiveChatClientAuthorization(req) {
2668
- return {
2669
- token: req.headers["livechat-token"]
2670
- };
2671
- }
2672
- function getLiveChatClientConfig(options = {}) {
2673
- const currentHeaders = livechatClientInstance.defaults.headers;
2674
- const defaultAuthorization = currentHeaders.Authorization;
2675
- const headers = {
2676
- authorization: defaultAuthorization != null ? defaultAuthorization : options.token ? `Bearer ${options.token}` : void 0
2677
- };
2678
- return {
2679
- headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
2680
- };
2681
- }
2682
- function initLiveChatClientInstance(baseUrl, token) {
2683
- const region = token ? getRegion(token) : void 0;
2684
- const headers = livechatClientInstance.defaults.headers;
2685
- if (baseUrl) {
2686
- livechatClientInstance.interceptors.request.use(
2687
- (config) => {
2688
- config.baseURL = baseUrl;
2689
- return config;
2690
- },
2691
- (error) => Promise.reject(error)
2692
- );
2693
- }
2694
- if (region) {
2695
- headers["X-Region"] = region;
2696
- }
2697
- if (token) {
2698
- headers.Authorization = `Bearer ${token}`;
2699
- } else {
2700
- delete headers.Authorization;
2701
- }
2702
- }
2703
-
2704
3137
  // src/apis/products/livechat/agents/api.ts
2705
3138
  var livechatAgentApi = {
2706
3139
  getUser() {
@@ -3143,42 +3576,6 @@ var productsApi = {
3143
3576
  livechat: livechatApi
3144
3577
  };
3145
3578
 
3146
- // src/apis/platform/accounts/instance.ts
3147
- var import_axios13 = __toESM(require("axios"));
3148
- var platformAccountsClientInstance = import_axios13.default.create({
3149
- baseURL: "https://accounts.labs.livechatinc.com"
3150
- });
3151
- function getPlatformAccountsClientAuthorization(req) {
3152
- return {
3153
- token: req.headers["platform-accounts-token"]
3154
- };
3155
- }
3156
- function getPlatformAccountsClientConfig(options = {}) {
3157
- const defaultAuthorization = platformAccountsClientInstance.defaults.headers["Authorization"];
3158
- const headers = {
3159
- authorization: defaultAuthorization != null ? defaultAuthorization : options.token ? `Bearer ${options.token}` : void 0
3160
- };
3161
- return {
3162
- headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
3163
- };
3164
- }
3165
- function initPlatformAccountsClientInstance(baseUrl, token) {
3166
- if (baseUrl) {
3167
- platformAccountsClientInstance.interceptors.request.use(
3168
- (config) => __async(this, null, function* () {
3169
- config.baseURL = baseUrl;
3170
- return config;
3171
- }),
3172
- (error) => Promise.reject(error)
3173
- );
3174
- }
3175
- if (token) {
3176
- platformAccountsClientInstance.defaults.headers["Authorization"] = `Bearer ${token}`;
3177
- } else {
3178
- delete platformAccountsClientInstance.defaults.headers["Authorization"];
3179
- }
3180
- }
3181
-
3182
3579
  // src/apis/platform/accounts/accounts/api.ts
3183
3580
  var platformAccountsAccountApi = {
3184
3581
  getAccounts(authorization) {
@@ -3589,150 +3986,35 @@ var platformAccountsTokenApi = {
3589
3986
  // src/apis/platform/accounts/api.ts
3590
3987
  var platformAccountsApi = {
3591
3988
  account: platformAccountsAccountApi,
3592
- client: platformAccountsClientApi,
3593
- pat: platformAccountsPersonalAccessTokenApi,
3594
- organization: platformAccountsOrganizationApi,
3595
- products: platformAccountsProductsApi,
3596
- scopes: platformAccountsScopesApi,
3597
- sessions: platformAccountsSessionsApi,
3598
- token: platformAccountsTokenApi
3599
- };
3600
-
3601
- // src/apis/platform/dps/instance.ts
3602
- var import_axios14 = __toESM(require("axios"));
3603
- var platformDpsClientInstance = import_axios14.default.create({
3604
- baseURL: "https://dev-platform.labs.livechatinc.com"
3605
- });
3606
- function getPlatformDpsClientAuthorization(req) {
3607
- var _a;
3608
- return {
3609
- token: (_a = req.headers["platform-dps-token"]) != null ? _a : req.headers["platform-token"],
3610
- tokenType: "Bearer"
3611
- };
3612
- }
3613
- function getPlatformDpsAdminClientAuthorization() {
3614
- var _a, _b;
3615
- const token = process.env.NEXT_PUBLIC_PLATFORM_ENV === "prod" ? (_a = process.env.PLATFORM_DPS_TOKEN_FOR_GITHUB) != null ? _a : "" : (_b = process.env.PLATFORM_DPS_TOKEN_FOR_GITHUB_LABS) != null ? _b : "";
3616
- return {
3617
- token: btoa(`apps@livechatinc.com:${token}`),
3618
- tokenType: "Basic"
3619
- };
3620
- }
3621
- function getPlatformDpsClientConfig(options = {}) {
3622
- const currentHeaders = platformDpsClientInstance.defaults.headers;
3623
- const defaultAuthorization = currentHeaders.Authorization;
3624
- const headers = {
3625
- authorization: defaultAuthorization != null ? defaultAuthorization : options.token ? `Bearer ${options.token}` : void 0
3626
- };
3627
- return {
3628
- headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
3629
- };
3630
- }
3631
- function initPlatformDpsClientInstance(baseUrl, token) {
3632
- const headers = platformDpsClientInstance.defaults.headers;
3633
- if (baseUrl) {
3634
- platformDpsClientInstance.interceptors.request.use(
3635
- (config) => {
3636
- config.baseURL = baseUrl;
3637
- return config;
3638
- },
3639
- (error) => Promise.reject(error)
3640
- );
3641
- }
3642
- if (token) {
3643
- headers.Authorization = `Bearer ${token}`;
3644
- } else {
3645
- delete headers.Authorization;
3646
- }
3647
- }
3648
-
3649
- // src/apis/platform/dps/applications/application/authorization/api.ts
3650
- var platformDpsApplicationAuthorizationApi = {
3651
- createAuth(appId, payload, authorization) {
3652
- return __async(this, null, function* () {
3653
- try {
3654
- yield platformDpsClientInstance.post(
3655
- `/v2/applications/${appId}/authorization`,
3656
- payload,
3657
- getPlatformDpsClientConfig(authorization)
3658
- );
3659
- } catch (error) {
3660
- if (error instanceof Error) {
3661
- throw new Error(
3662
- `Authorization couldn't be created. [${error.message}]`
3663
- );
3664
- }
3665
- throw error;
3666
- }
3667
- });
3668
- }
3669
- };
3670
-
3671
- // src/apis/platform/dps/applications/application/autoReview/_contracts/dtos/autoReview.ts
3672
- var getEmptyAppAutoReview = () => ({
3673
- isReviewed: false,
3674
- recommendations: {
3675
- listingDetails: {
3676
- appName: "",
3677
- shortDescription: "",
3678
- longDescription: "",
3679
- features: "",
3680
- benefits: ""
3681
- },
3682
- auth: {
3683
- hasZeroScopes: false
3684
- }
3685
- },
3686
- errors: {
3687
- listingDetails: {
3688
- appName: "",
3689
- shortDescription: "",
3690
- longDescription: "",
3691
- features: "",
3692
- benefits: ""
3693
- },
3694
- auth: {
3695
- hasAllScopes: false,
3696
- isRedirectUriSafe: false
3697
- },
3698
- links: {
3699
- tutorial: {
3700
- returns200: false,
3701
- isValid: false
3702
- },
3703
- privacyPolicy: {
3704
- returns200: false,
3705
- isValid: false
3706
- }
3707
- },
3708
- images: {
3709
- icon: {
3710
- isNsfw: false,
3711
- isRatioValid: false
3712
- },
3713
- screenshots: {
3714
- areNsfw: false,
3715
- areRatiosValid: false
3989
+ client: platformAccountsClientApi,
3990
+ pat: platformAccountsPersonalAccessTokenApi,
3991
+ organization: platformAccountsOrganizationApi,
3992
+ products: platformAccountsProductsApi,
3993
+ scopes: platformAccountsScopesApi,
3994
+ sessions: platformAccountsSessionsApi,
3995
+ token: platformAccountsTokenApi
3996
+ };
3997
+
3998
+ // src/apis/platform/dps/applications/application/authorization/api.ts
3999
+ var platformDpsApplicationAuthorizationApi = {
4000
+ createAuth(appId, payload, authorization) {
4001
+ return __async(this, null, function* () {
4002
+ try {
4003
+ yield platformDpsClientInstance.post(
4004
+ `/v2/applications/${appId}/authorization`,
4005
+ payload,
4006
+ getPlatformDpsClientConfig(authorization)
4007
+ );
4008
+ } catch (error) {
4009
+ if (error instanceof Error) {
4010
+ throw new Error(
4011
+ `Authorization couldn't be created. [${error.message}]`
4012
+ );
4013
+ }
4014
+ throw error;
3716
4015
  }
3717
- }
4016
+ });
3718
4017
  }
3719
- });
3720
-
3721
- // src/apis/platform/dps/applications/application/autoReview/_contracts/payloads/autoReview.ts
3722
- var getAppAutoReviewPayload = (value) => {
3723
- return {
3724
- appName: value,
3725
- shortDescription: value,
3726
- longDescription: value,
3727
- features: value,
3728
- benefits: value,
3729
- scopes: value,
3730
- redirect: value,
3731
- tutorial: value,
3732
- privacyPolicy: value,
3733
- icons: value,
3734
- screenshots: value
3735
- };
3736
4018
  };
3737
4019
 
3738
4020
  // src/apis/platform/dps/applications/application/autoReview/api.ts
@@ -4137,6 +4419,41 @@ var platformDpsApplicationInfrastructureApi = {
4137
4419
 
4138
4420
  // src/apis/platform/dps/applications/application/install/api.ts
4139
4421
  var platformDpsApplicationInstallApi = {
4422
+ install(appId, authorization) {
4423
+ return __async(this, null, function* () {
4424
+ try {
4425
+ yield platformDpsClientInstance.put(
4426
+ `/v2/applications/${appId}/install`,
4427
+ {},
4428
+ getPlatformDpsClientConfig(authorization)
4429
+ );
4430
+ } catch (error) {
4431
+ if (error instanceof Error) {
4432
+ throw new Error(
4433
+ `App couldn't be installed. [${error.message}]`
4434
+ );
4435
+ }
4436
+ throw error;
4437
+ }
4438
+ });
4439
+ },
4440
+ uninstall(appId, authorization) {
4441
+ return __async(this, null, function* () {
4442
+ try {
4443
+ yield platformDpsClientInstance.delete(
4444
+ `/v2/applications/${appId}/install`,
4445
+ getPlatformDpsClientConfig(authorization)
4446
+ );
4447
+ } catch (error) {
4448
+ if (error instanceof Error) {
4449
+ throw new Error(
4450
+ `App couldn't be uninstalled. [${error.message}]`
4451
+ );
4452
+ }
4453
+ throw error;
4454
+ }
4455
+ });
4456
+ },
4140
4457
  updateDirectInstallationUrl(appId, payload, authorization) {
4141
4458
  return __async(this, null, function* () {
4142
4459
  try {
@@ -5180,156 +5497,6 @@ var platformDpsApi = {
5180
5497
  research: platformDpsResearchApi
5181
5498
  };
5182
5499
 
5183
- // src/apis/platform/adapter/instance.ts
5184
- var import_axios15 = __toESM(require("axios"));
5185
- var REGION2 = {
5186
- FRA: "fra",
5187
- DAL: "dal",
5188
- FRA_A: "fra-a",
5189
- FRA_B: "fra-b"
5190
- };
5191
- var supportedRegions2 = Object.values(REGION2);
5192
- var getRegion2 = (token) => {
5193
- const region = token.split(":")[0];
5194
- if (supportedRegions2.includes(region)) {
5195
- return region;
5196
- }
5197
- };
5198
- function getPlatformAdapterClientAuthorization(req) {
5199
- return {
5200
- platform: {
5201
- dps: req.headers["platform-dps-token"]
5202
- },
5203
- github: {
5204
- app: req.headers["github-app-token"],
5205
- oauth: req.headers["github-oauth-token"]
5206
- },
5207
- netlify: req.headers["netlify-token"],
5208
- vercel: req.headers["vercel-token"],
5209
- planetscale: req.headers["planetscale-token"],
5210
- neon: req.headers["neon-token"],
5211
- sentry: req.headers["sentry-token"],
5212
- openai: req.headers["openai-token"]
5213
- };
5214
- }
5215
- var platformAdapterClientInstance = import_axios15.default.create({
5216
- baseURL: "https://platform.labs.text.com/console-adapter/api",
5217
- headers: {
5218
- "Content-Type": "application/json"
5219
- }
5220
- });
5221
- platformAdapterClientInstance.interceptors.response.use(
5222
- (r) => r,
5223
- (error) => {
5224
- var _a;
5225
- if (import_axios15.default.isAxiosError(error)) {
5226
- if (((_a = error.response) == null ? void 0 : _a.status) === 401) {
5227
- const source = error.response.data.error.source;
5228
- if (source) {
5229
- throw new UnauthorizeApiError(source);
5230
- }
5231
- }
5232
- }
5233
- throw error;
5234
- }
5235
- );
5236
- function getPlatformAdapterClientConfig(options = {}) {
5237
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
5238
- const currentHeaders = platformAdapterClientInstance.defaults.headers;
5239
- const headers = {
5240
- platform: {
5241
- dps: (_b = currentHeaders["platform-dps-token"]) != null ? _b : (_a = options.platform) == null ? void 0 : _a.dps
5242
- },
5243
- integrations: {
5244
- github: {
5245
- app: (_d = currentHeaders["github-app-token"]) != null ? _d : (_c = options.github) == null ? void 0 : _c.app,
5246
- oauth: (_f = currentHeaders["github-oauth-token"]) != null ? _f : (_e = options.github) == null ? void 0 : _e.oauth
5247
- },
5248
- netlify: (_g = currentHeaders["netlify-token"]) != null ? _g : options.netlify,
5249
- vercel: (_h = currentHeaders["vercel-token"]) != null ? _h : options.vercel,
5250
- planetscale: (_i = currentHeaders["planetscale-token"]) != null ? _i : options.planetscale,
5251
- neon: (_j = currentHeaders["neon-token"]) != null ? _j : options.neon,
5252
- sentry: (_k = currentHeaders["sentry-token"]) != null ? _k : options.sentry,
5253
- openai: (_l = currentHeaders["openai-token"]) != null ? _l : options.openai
5254
- }
5255
- };
5256
- if (currentHeaders["platform-dps-token"]) {
5257
- currentHeaders["X-Region"] = (_m = getRegion2(currentHeaders["platform-dps-token"])) != null ? _m : void 0;
5258
- }
5259
- if (((_o = (_n = options.ensureAuthorizationToken) == null ? void 0 : _n.platform) == null ? void 0 : _o.dps) && !headers.platform.dps) {
5260
- throw new UnauthorizeApiError("dps");
5261
- }
5262
- if (((_p = options.ensureAuthorizationToken) == null ? void 0 : _p.github) && (!headers.integrations.github.app || !headers.integrations.github.oauth)) {
5263
- throw new UnauthorizeApiError("github");
5264
- }
5265
- if (((_q = options.ensureAuthorizationToken) == null ? void 0 : _q.vercel) && !headers.integrations.vercel) {
5266
- throw new UnauthorizeApiError("vercel");
5267
- }
5268
- if (((_r = options.ensureAuthorizationToken) == null ? void 0 : _r.netlify) && !headers.integrations.netlify) {
5269
- throw new UnauthorizeApiError("netlify");
5270
- }
5271
- if (((_s = options.ensureAuthorizationToken) == null ? void 0 : _s.planetscale) && !headers.integrations.planetscale) {
5272
- throw new UnauthorizeApiError("planetscale");
5273
- }
5274
- if (((_t = options.ensureAuthorizationToken) == null ? void 0 : _t.neon) && !headers.integrations.neon) {
5275
- throw new UnauthorizeApiError("neon");
5276
- }
5277
- if (((_u = options.ensureAuthorizationToken) == null ? void 0 : _u.sentry) && !headers.integrations.sentry) {
5278
- throw new UnauthorizeApiError("sentry");
5279
- }
5280
- if (((_v = options.ensureAuthorizationToken) == null ? void 0 : _v.openai) && !headers.integrations.openai) {
5281
- throw new UnauthorizeApiError("openai");
5282
- }
5283
- return {
5284
- headers: __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, headers.platform.dps ? { "platform-dps-token": headers.platform.dps } : {}), headers.integrations.github.app ? { "github-app-token": headers.integrations.github.app } : {}), headers.integrations.github.oauth ? { "github-oauth-token": headers.integrations.github.oauth } : {}), headers.integrations.netlify ? { "netlify-token": headers.integrations.netlify } : {}), headers.integrations.vercel ? { "vercel-token": headers.integrations.vercel } : {}), headers.integrations.planetscale ? { "planetscale-token": headers.integrations.planetscale } : {}), headers.integrations.sentry ? { "sentry-token": headers.integrations.sentry } : {}), headers.integrations.openai ? { "openai-token": headers.integrations.openai } : {})
5285
- };
5286
- }
5287
- function initPlatformAdapterClientInstance(baseUrl, tokens) {
5288
- if (baseUrl) {
5289
- platformAdapterClientInstance.interceptors.request.use(
5290
- (config) => {
5291
- config.baseURL = baseUrl;
5292
- return config;
5293
- },
5294
- (error) => Promise.reject(error)
5295
- );
5296
- }
5297
- if (tokens) {
5298
- updatePlatformAdapterClientInstance(tokens);
5299
- }
5300
- }
5301
- function updatePlatformAdapterClientInstance(tokens) {
5302
- var _a, _b, _c;
5303
- const headers = platformAdapterClientInstance.defaults.headers;
5304
- if ((_a = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _a.dps) {
5305
- headers["platform-dps-token"] = tokens.platform.dps;
5306
- }
5307
- if ((_b = tokens == null ? void 0 : tokens.github) == null ? void 0 : _b.app) {
5308
- headers["github-app-token"] = tokens.github.app;
5309
- }
5310
- if ((_c = tokens == null ? void 0 : tokens.github) == null ? void 0 : _c.oauth) {
5311
- headers["github-oauth-token"] = tokens.github.oauth;
5312
- }
5313
- if (tokens == null ? void 0 : tokens.netlify) {
5314
- headers["netlify-token"] = tokens.netlify;
5315
- }
5316
- if (tokens == null ? void 0 : tokens.vercel) {
5317
- headers["vercel-token"] = tokens.vercel;
5318
- }
5319
- if (tokens == null ? void 0 : tokens.planetscale) {
5320
- headers["planetscale-token"] = tokens.planetscale;
5321
- }
5322
- if (tokens == null ? void 0 : tokens.neon) {
5323
- headers["neon-token"] = tokens.neon;
5324
- }
5325
- if (tokens == null ? void 0 : tokens.sentry) {
5326
- headers["sentry-token"] = tokens.sentry;
5327
- }
5328
- if (tokens == null ? void 0 : tokens.openai) {
5329
- headers["openai-token"] = tokens.openai;
5330
- }
5331
- }
5332
-
5333
5500
  // src/apis/platform/adapter/app/blocks/deployment/api.ts
5334
5501
  var platformAdapterAppDeploymentApi = {
5335
5502
  get(appId, authorization) {
@@ -5870,42 +6037,6 @@ var platformAdapterApi = {
5870
6037
  conductor: platformAdapterConductorApi
5871
6038
  };
5872
6039
 
5873
- // src/apis/platform/billing/instance.ts
5874
- var import_axios16 = __toESM(require("axios"));
5875
- var platformBillingClientInstance = import_axios16.default.create({
5876
- baseURL: "https://billing.labs.livechatinc.com"
5877
- });
5878
- function getPlatformBillingClientAuthorization(req) {
5879
- return {
5880
- token: req.headers["platform-token"]
5881
- };
5882
- }
5883
- function getPlatformBillingClientConfig(options = {}) {
5884
- const defaultAuthorization = platformBillingClientInstance.defaults.headers.Authorization;
5885
- const headers = {
5886
- authorization: defaultAuthorization != null ? defaultAuthorization : options.token ? `Bearer ${options.token}` : void 0
5887
- };
5888
- return {
5889
- headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
5890
- };
5891
- }
5892
- function initPlatformBillingClientInstance(baseUrl, token) {
5893
- if (baseUrl) {
5894
- platformBillingClientInstance.interceptors.request.use(
5895
- (config) => __async(this, null, function* () {
5896
- config.baseURL = baseUrl;
5897
- return config;
5898
- }),
5899
- (error) => Promise.reject(error)
5900
- );
5901
- }
5902
- if (token) {
5903
- platformBillingClientInstance.defaults.headers.Authorization = `Bearer ${token}`;
5904
- } else {
5905
- delete platformBillingClientInstance.defaults.headers.Authorization;
5906
- }
5907
- }
5908
-
5909
6040
  // src/apis/platform/billing/account/api.ts
5910
6041
  var platformBillingAccountApi = {
5911
6042
  getAccount(authorization) {