@opens/gateways 1.16.21 → 1.16.23

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.mjs CHANGED
@@ -922,6 +922,41 @@ var IntegrationsGateway = class {
922
922
  }
923
923
  httpClient;
924
924
  baseUrl;
925
+ /**
926
+ * Retrieves the apps available to the authenticated company.
927
+ * @returns The available apps and their total count.
928
+ */
929
+ async getAppList() {
930
+ const { data } = await this.httpClient.get(`${this.baseUrl}/apps`);
931
+ return data;
932
+ }
933
+ /**
934
+ * Retrieves an app and its form definition.
935
+ * @param appId - The app identifier.
936
+ * @returns The app details.
937
+ */
938
+ async getApp({ appId }) {
939
+ const { data } = await this.httpClient.get(`${this.baseUrl}/apps/${appId}`);
940
+ return data;
941
+ }
942
+ /**
943
+ * Resolves the available items for an app datasource using the supplied context.
944
+ * @param appId - The app identifier.
945
+ * @param datasourceId - The datasource identifier.
946
+ * @param context - The JSON context used to resolve the datasource.
947
+ * @returns The resolved datasource items.
948
+ */
949
+ async resolveAppDatasource({
950
+ appId,
951
+ datasourceId,
952
+ context
953
+ }) {
954
+ const { data } = await this.httpClient.post(
955
+ `${this.baseUrl}/apps/${appId}/datasources/${datasourceId}`,
956
+ { context }
957
+ );
958
+ return data;
959
+ }
925
960
  /**
926
961
  * Retrieves all integration partners configured for a company.
927
962
  * @param companyId - The company identifier.