@8ms/helpers 2.4.17 → 2.4.19

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.
Files changed (43) hide show
  1. package/dist/api/config.cjs +0 -0
  2. package/dist/api/config.d.cts +7 -0
  3. package/dist/api/config.d.mts +7 -0
  4. package/dist/api/config.mjs +1 -0
  5. package/dist/api/deleteRequest.d.cts +2 -1
  6. package/dist/api/deleteRequest.d.mts +2 -1
  7. package/dist/api/get.d.cts +2 -1
  8. package/dist/api/get.d.mts +2 -1
  9. package/dist/api/post.d.cts +2 -1
  10. package/dist/api/post.d.mts +2 -1
  11. package/dist/emsApi/awsTs/endpoint.cjs +18 -0
  12. package/dist/emsApi/awsTs/endpoint.d.cts +10 -0
  13. package/dist/emsApi/awsTs/endpoint.d.mts +10 -0
  14. package/dist/emsApi/awsTs/endpoint.mjs +16 -0
  15. package/dist/emsApi/awsTs/get.cjs +15 -0
  16. package/dist/emsApi/awsTs/get.d.cts +6 -0
  17. package/dist/emsApi/awsTs/get.d.mts +6 -0
  18. package/dist/emsApi/awsTs/get.mjs +14 -0
  19. package/dist/emsApi/awsTs/index.cjs +8 -0
  20. package/dist/emsApi/awsTs/index.d.cts +4 -0
  21. package/dist/emsApi/awsTs/index.d.mts +4 -0
  22. package/dist/emsApi/awsTs/index.mjs +4 -0
  23. package/dist/emsApi/awsTs/post.cjs +15 -0
  24. package/dist/emsApi/awsTs/post.d.cts +6 -0
  25. package/dist/emsApi/awsTs/post.d.mts +6 -0
  26. package/dist/emsApi/awsTs/post.mjs +14 -0
  27. package/dist/emsApi/vercel/endpoint.cjs +18 -0
  28. package/dist/emsApi/vercel/endpoint.d.cts +10 -0
  29. package/dist/emsApi/vercel/endpoint.d.mts +10 -0
  30. package/dist/emsApi/vercel/endpoint.mjs +16 -0
  31. package/dist/emsApi/vercel/get.cjs +15 -0
  32. package/dist/emsApi/vercel/get.d.cts +6 -0
  33. package/dist/emsApi/vercel/get.d.mts +6 -0
  34. package/dist/emsApi/vercel/get.mjs +14 -0
  35. package/dist/emsApi/vercel/index.cjs +8 -0
  36. package/dist/emsApi/vercel/index.d.cts +4 -0
  37. package/dist/emsApi/vercel/index.d.mts +4 -0
  38. package/dist/emsApi/vercel/index.mjs +4 -0
  39. package/dist/emsApi/vercel/post.cjs +15 -0
  40. package/dist/emsApi/vercel/post.d.cts +6 -0
  41. package/dist/emsApi/vercel/post.d.mts +6 -0
  42. package/dist/emsApi/vercel/post.mjs +14 -0
  43. package/package.json +37 -1
File without changes
@@ -0,0 +1,7 @@
1
+ //#region src/api/config.d.ts
2
+ type Config = {
3
+ headers?: HeadersInit;
4
+ [key: string]: unknown;
5
+ };
6
+ //#endregion
7
+ export { Config };
@@ -0,0 +1,7 @@
1
+ //#region src/api/config.d.ts
2
+ type Config = {
3
+ headers?: HeadersInit;
4
+ [key: string]: unknown;
5
+ };
6
+ //#endregion
7
+ export { Config };
@@ -0,0 +1 @@
1
+ export {};
@@ -1,10 +1,11 @@
1
1
  import { ApiResponseClass } from "./ApiResponseClass.cjs";
2
+ import { Config } from "./config.cjs";
2
3
 
3
4
  //#region src/api/deleteRequest.d.ts
4
5
  /**
5
6
  * Make a DELETE request.
6
7
  * Can't use the function name delete as it's reserved
7
8
  */
8
- declare const deleteRequest: (url: string, config?: {}) => Promise<ApiResponseClass>;
9
+ declare const deleteRequest: (url: string, config?: Config) => Promise<ApiResponseClass>;
9
10
  //#endregion
10
11
  export { deleteRequest };
@@ -1,10 +1,11 @@
1
1
  import { ApiResponseClass } from "./ApiResponseClass.mjs";
2
+ import { Config } from "./config.mjs";
2
3
 
3
4
  //#region src/api/deleteRequest.d.ts
4
5
  /**
5
6
  * Make a DELETE request.
6
7
  * Can't use the function name delete as it's reserved
7
8
  */
8
- declare const deleteRequest: (url: string, config?: {}) => Promise<ApiResponseClass>;
9
+ declare const deleteRequest: (url: string, config?: Config) => Promise<ApiResponseClass>;
9
10
  //#endregion
10
11
  export { deleteRequest };
@@ -1,9 +1,10 @@
1
1
  import { ApiResponseClass } from "./ApiResponseClass.cjs";
2
+ import { Config } from "./config.cjs";
2
3
 
3
4
  //#region src/api/get.d.ts
4
5
  /**
5
6
  * Make a GET request.
6
7
  */
7
- declare const get: (url: string, config?: {}) => Promise<ApiResponseClass>;
8
+ declare const get: (url: string, config?: Config) => Promise<ApiResponseClass>;
8
9
  //#endregion
9
10
  export { get };
@@ -1,9 +1,10 @@
1
1
  import { ApiResponseClass } from "./ApiResponseClass.mjs";
2
+ import { Config } from "./config.mjs";
2
3
 
3
4
  //#region src/api/get.d.ts
4
5
  /**
5
6
  * Make a GET request.
6
7
  */
7
- declare const get: (url: string, config?: {}) => Promise<ApiResponseClass>;
8
+ declare const get: (url: string, config?: Config) => Promise<ApiResponseClass>;
8
9
  //#endregion
9
10
  export { get };
@@ -1,9 +1,10 @@
1
1
  import { ApiResponseClass } from "./ApiResponseClass.cjs";
2
+ import { Config } from "./config.cjs";
2
3
 
3
4
  //#region src/api/post.d.ts
4
5
  /**
5
6
  * Make a POST request.
6
7
  */
7
- declare const post: (url: string, data?: {}, config?: {}) => Promise<ApiResponseClass>;
8
+ declare const post: (url: string, data?: {}, config?: Config) => Promise<ApiResponseClass>;
8
9
  //#endregion
9
10
  export { post };
@@ -1,9 +1,10 @@
1
1
  import { ApiResponseClass } from "./ApiResponseClass.mjs";
2
+ import { Config } from "./config.mjs";
2
3
 
3
4
  //#region src/api/post.d.ts
4
5
  /**
5
6
  * Make a POST request.
6
7
  */
7
- declare const post: (url: string, data?: {}, config?: {}) => Promise<ApiResponseClass>;
8
+ declare const post: (url: string, data?: {}, config?: Config) => Promise<ApiResponseClass>;
8
9
  //#endregion
9
10
  export { post };
@@ -0,0 +1,18 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_environment_environment = require("../../environment/environment.cjs");
3
+ //#region src/emsApi/awsTs/endpoint.ts
4
+ const awsTsEndpointEnvironment = {
5
+ DEVELOPMENT: "https://dev.api-aws-ts.8mscodex.com",
6
+ STAGING: "https://staging.api-aws-ts.8mscodex.com",
7
+ PRODUCTION: "https://api-aws-ts.8mscodex.com"
8
+ };
9
+ const getAwsTsEndpoint = () => {
10
+ switch (require_environment_environment.getEnvironment()) {
11
+ case require_environment_environment.environment.PRODUCTION: return awsTsEndpointEnvironment.PRODUCTION;
12
+ case require_environment_environment.environment.STAGING: return awsTsEndpointEnvironment.STAGING;
13
+ default: return awsTsEndpointEnvironment.DEVELOPMENT;
14
+ }
15
+ };
16
+ //#endregion
17
+ exports.awsTsEndpointEnvironment = awsTsEndpointEnvironment;
18
+ exports.getAwsTsEndpoint = getAwsTsEndpoint;
@@ -0,0 +1,10 @@
1
+ //#region src/emsApi/awsTs/endpoint.d.ts
2
+ declare const awsTsEndpointEnvironment: {
3
+ readonly DEVELOPMENT: "https://dev.api-aws-ts.8mscodex.com";
4
+ readonly STAGING: "https://staging.api-aws-ts.8mscodex.com";
5
+ readonly PRODUCTION: "https://api-aws-ts.8mscodex.com";
6
+ };
7
+ type AwsTsEndpointEnvironment = typeof awsTsEndpointEnvironment[keyof typeof awsTsEndpointEnvironment];
8
+ declare const getAwsTsEndpoint: () => "https://dev.api-aws-ts.8mscodex.com" | "https://staging.api-aws-ts.8mscodex.com" | "https://api-aws-ts.8mscodex.com";
9
+ //#endregion
10
+ export { AwsTsEndpointEnvironment, awsTsEndpointEnvironment, getAwsTsEndpoint };
@@ -0,0 +1,10 @@
1
+ //#region src/emsApi/awsTs/endpoint.d.ts
2
+ declare const awsTsEndpointEnvironment: {
3
+ readonly DEVELOPMENT: "https://dev.api-aws-ts.8mscodex.com";
4
+ readonly STAGING: "https://staging.api-aws-ts.8mscodex.com";
5
+ readonly PRODUCTION: "https://api-aws-ts.8mscodex.com";
6
+ };
7
+ type AwsTsEndpointEnvironment = typeof awsTsEndpointEnvironment[keyof typeof awsTsEndpointEnvironment];
8
+ declare const getAwsTsEndpoint: () => "https://dev.api-aws-ts.8mscodex.com" | "https://staging.api-aws-ts.8mscodex.com" | "https://api-aws-ts.8mscodex.com";
9
+ //#endregion
10
+ export { AwsTsEndpointEnvironment, awsTsEndpointEnvironment, getAwsTsEndpoint };
@@ -0,0 +1,16 @@
1
+ import { environment, getEnvironment } from "../../environment/environment.mjs";
2
+ //#region src/emsApi/awsTs/endpoint.ts
3
+ const awsTsEndpointEnvironment = {
4
+ DEVELOPMENT: "https://dev.api-aws-ts.8mscodex.com",
5
+ STAGING: "https://staging.api-aws-ts.8mscodex.com",
6
+ PRODUCTION: "https://api-aws-ts.8mscodex.com"
7
+ };
8
+ const getAwsTsEndpoint = () => {
9
+ switch (getEnvironment()) {
10
+ case environment.PRODUCTION: return awsTsEndpointEnvironment.PRODUCTION;
11
+ case environment.STAGING: return awsTsEndpointEnvironment.STAGING;
12
+ default: return awsTsEndpointEnvironment.DEVELOPMENT;
13
+ }
14
+ };
15
+ //#endregion
16
+ export { awsTsEndpointEnvironment, getAwsTsEndpoint };
@@ -0,0 +1,15 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_api_get = require("../../api/get.cjs");
3
+ const require_emsApi_awsTs_endpoint = require("./endpoint.cjs");
4
+ //#region src/emsApi/awsTs/get.ts
5
+ const getAwsTs = async (path, data = {}, config = {}) => {
6
+ return require_api_get.get(`${require_emsApi_awsTs_endpoint.getAwsTsEndpoint()}${path}`, {
7
+ ...config,
8
+ headers: {
9
+ "x-api-key": process.env?.EMS_API_KEY ?? "",
10
+ ...config?.headers ?? {}
11
+ }
12
+ });
13
+ };
14
+ //#endregion
15
+ exports.getAwsTs = getAwsTs;
@@ -0,0 +1,6 @@
1
+ import { ApiResponseClass } from "../../api/ApiResponseClass.cjs";
2
+ import { Config } from "../../api/config.cjs";
3
+ //#region src/emsApi/awsTs/get.d.ts
4
+ declare const getAwsTs: (path: string, data?: {}, config?: Config) => Promise<ApiResponseClass<any, any>>;
5
+ //#endregion
6
+ export { getAwsTs };
@@ -0,0 +1,6 @@
1
+ import { ApiResponseClass } from "../../api/ApiResponseClass.mjs";
2
+ import { Config } from "../../api/config.mjs";
3
+ //#region src/emsApi/awsTs/get.d.ts
4
+ declare const getAwsTs: (path: string, data?: {}, config?: Config) => Promise<ApiResponseClass<any, any>>;
5
+ //#endregion
6
+ export { getAwsTs };
@@ -0,0 +1,14 @@
1
+ import { get } from "../../api/get.mjs";
2
+ import { getAwsTsEndpoint } from "./endpoint.mjs";
3
+ //#region src/emsApi/awsTs/get.ts
4
+ const getAwsTs = async (path, data = {}, config = {}) => {
5
+ return get(`${getAwsTsEndpoint()}${path}`, {
6
+ ...config,
7
+ headers: {
8
+ "x-api-key": process.env?.EMS_API_KEY ?? "",
9
+ ...config?.headers ?? {}
10
+ }
11
+ });
12
+ };
13
+ //#endregion
14
+ export { getAwsTs };
@@ -0,0 +1,8 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_emsApi_awsTs_endpoint = require("./endpoint.cjs");
3
+ const require_emsApi_awsTs_get = require("./get.cjs");
4
+ const require_emsApi_awsTs_post = require("./post.cjs");
5
+ exports.awsTsEndpointEnvironment = require_emsApi_awsTs_endpoint.awsTsEndpointEnvironment;
6
+ exports.getAwsTs = require_emsApi_awsTs_get.getAwsTs;
7
+ exports.getAwsTsEndpoint = require_emsApi_awsTs_endpoint.getAwsTsEndpoint;
8
+ exports.postAwsTs = require_emsApi_awsTs_post.postAwsTs;
@@ -0,0 +1,4 @@
1
+ import { AwsTsEndpointEnvironment, awsTsEndpointEnvironment, getAwsTsEndpoint } from "./endpoint.cjs";
2
+ import { getAwsTs } from "./get.cjs";
3
+ import { postAwsTs } from "./post.cjs";
4
+ export { AwsTsEndpointEnvironment, awsTsEndpointEnvironment, getAwsTs, getAwsTsEndpoint, postAwsTs };
@@ -0,0 +1,4 @@
1
+ import { AwsTsEndpointEnvironment, awsTsEndpointEnvironment, getAwsTsEndpoint } from "./endpoint.mjs";
2
+ import { getAwsTs } from "./get.mjs";
3
+ import { postAwsTs } from "./post.mjs";
4
+ export { AwsTsEndpointEnvironment, awsTsEndpointEnvironment, getAwsTs, getAwsTsEndpoint, postAwsTs };
@@ -0,0 +1,4 @@
1
+ import { awsTsEndpointEnvironment, getAwsTsEndpoint } from "./endpoint.mjs";
2
+ import { getAwsTs } from "./get.mjs";
3
+ import { postAwsTs } from "./post.mjs";
4
+ export { awsTsEndpointEnvironment, getAwsTs, getAwsTsEndpoint, postAwsTs };
@@ -0,0 +1,15 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_api_post = require("../../api/post.cjs");
3
+ const require_emsApi_awsTs_endpoint = require("./endpoint.cjs");
4
+ //#region src/emsApi/awsTs/post.ts
5
+ const postAwsTs = async (path, data = {}, config = {}) => {
6
+ return require_api_post.post(`${require_emsApi_awsTs_endpoint.getAwsTsEndpoint()}${path}`, data, {
7
+ ...config,
8
+ headers: {
9
+ "x-api-key": process.env?.EMS_API_KEY ?? "",
10
+ ...config?.headers ?? {}
11
+ }
12
+ });
13
+ };
14
+ //#endregion
15
+ exports.postAwsTs = postAwsTs;
@@ -0,0 +1,6 @@
1
+ import { ApiResponseClass } from "../../api/ApiResponseClass.cjs";
2
+ import { Config } from "../../api/config.cjs";
3
+ //#region src/emsApi/awsTs/post.d.ts
4
+ declare const postAwsTs: (path: string, data?: {}, config?: Config) => Promise<ApiResponseClass<any, any>>;
5
+ //#endregion
6
+ export { postAwsTs };
@@ -0,0 +1,6 @@
1
+ import { ApiResponseClass } from "../../api/ApiResponseClass.mjs";
2
+ import { Config } from "../../api/config.mjs";
3
+ //#region src/emsApi/awsTs/post.d.ts
4
+ declare const postAwsTs: (path: string, data?: {}, config?: Config) => Promise<ApiResponseClass<any, any>>;
5
+ //#endregion
6
+ export { postAwsTs };
@@ -0,0 +1,14 @@
1
+ import { post } from "../../api/post.mjs";
2
+ import { getAwsTsEndpoint } from "./endpoint.mjs";
3
+ //#region src/emsApi/awsTs/post.ts
4
+ const postAwsTs = async (path, data = {}, config = {}) => {
5
+ return post(`${getAwsTsEndpoint()}${path}`, data, {
6
+ ...config,
7
+ headers: {
8
+ "x-api-key": process.env?.EMS_API_KEY ?? "",
9
+ ...config?.headers ?? {}
10
+ }
11
+ });
12
+ };
13
+ //#endregion
14
+ export { postAwsTs };
@@ -0,0 +1,18 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_environment_environment = require("../../environment/environment.cjs");
3
+ //#region src/emsApi/vercel/endpoint.ts
4
+ const vercelEndpointEnvironment = {
5
+ DEVELOPMENT: "https://dev.api-vercel.8mscodex.com",
6
+ STAGING: "https://staging.api-vercel.8mscodex.com",
7
+ PRODUCTION: "https://api-vercel.8mscodex.com"
8
+ };
9
+ const getVercelEndpoint = () => {
10
+ switch (require_environment_environment.getEnvironment()) {
11
+ case require_environment_environment.environment.PRODUCTION: return vercelEndpointEnvironment.PRODUCTION;
12
+ case require_environment_environment.environment.STAGING: return vercelEndpointEnvironment.STAGING;
13
+ default: return vercelEndpointEnvironment.DEVELOPMENT;
14
+ }
15
+ };
16
+ //#endregion
17
+ exports.getVercelEndpoint = getVercelEndpoint;
18
+ exports.vercelEndpointEnvironment = vercelEndpointEnvironment;
@@ -0,0 +1,10 @@
1
+ //#region src/emsApi/vercel/endpoint.d.ts
2
+ declare const vercelEndpointEnvironment: {
3
+ readonly DEVELOPMENT: "https://dev.api-vercel.8mscodex.com";
4
+ readonly STAGING: "https://staging.api-vercel.8mscodex.com";
5
+ readonly PRODUCTION: "https://api-vercel.8mscodex.com";
6
+ };
7
+ type VercelEndpointEnvironment = typeof vercelEndpointEnvironment[keyof typeof vercelEndpointEnvironment];
8
+ declare const getVercelEndpoint: () => "https://dev.api-vercel.8mscodex.com" | "https://staging.api-vercel.8mscodex.com" | "https://api-vercel.8mscodex.com";
9
+ //#endregion
10
+ export { VercelEndpointEnvironment, getVercelEndpoint, vercelEndpointEnvironment };
@@ -0,0 +1,10 @@
1
+ //#region src/emsApi/vercel/endpoint.d.ts
2
+ declare const vercelEndpointEnvironment: {
3
+ readonly DEVELOPMENT: "https://dev.api-vercel.8mscodex.com";
4
+ readonly STAGING: "https://staging.api-vercel.8mscodex.com";
5
+ readonly PRODUCTION: "https://api-vercel.8mscodex.com";
6
+ };
7
+ type VercelEndpointEnvironment = typeof vercelEndpointEnvironment[keyof typeof vercelEndpointEnvironment];
8
+ declare const getVercelEndpoint: () => "https://dev.api-vercel.8mscodex.com" | "https://staging.api-vercel.8mscodex.com" | "https://api-vercel.8mscodex.com";
9
+ //#endregion
10
+ export { VercelEndpointEnvironment, getVercelEndpoint, vercelEndpointEnvironment };
@@ -0,0 +1,16 @@
1
+ import { environment, getEnvironment } from "../../environment/environment.mjs";
2
+ //#region src/emsApi/vercel/endpoint.ts
3
+ const vercelEndpointEnvironment = {
4
+ DEVELOPMENT: "https://dev.api-vercel.8mscodex.com",
5
+ STAGING: "https://staging.api-vercel.8mscodex.com",
6
+ PRODUCTION: "https://api-vercel.8mscodex.com"
7
+ };
8
+ const getVercelEndpoint = () => {
9
+ switch (getEnvironment()) {
10
+ case environment.PRODUCTION: return vercelEndpointEnvironment.PRODUCTION;
11
+ case environment.STAGING: return vercelEndpointEnvironment.STAGING;
12
+ default: return vercelEndpointEnvironment.DEVELOPMENT;
13
+ }
14
+ };
15
+ //#endregion
16
+ export { getVercelEndpoint, vercelEndpointEnvironment };
@@ -0,0 +1,15 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_api_get = require("../../api/get.cjs");
3
+ const require_emsApi_vercel_endpoint = require("./endpoint.cjs");
4
+ //#region src/emsApi/vercel/get.ts
5
+ const getVercel = async (path, data = {}, config = {}) => {
6
+ return require_api_get.get(`${require_emsApi_vercel_endpoint.getVercelEndpoint()}${path}`, {
7
+ ...config,
8
+ headers: {
9
+ "x-api-key": process.env?.EMS_API_KEY ?? "",
10
+ ...config?.headers ?? {}
11
+ }
12
+ });
13
+ };
14
+ //#endregion
15
+ exports.getVercel = getVercel;
@@ -0,0 +1,6 @@
1
+ import { ApiResponseClass } from "../../api/ApiResponseClass.cjs";
2
+ import { Config } from "../../api/config.cjs";
3
+ //#region src/emsApi/vercel/get.d.ts
4
+ declare const getVercel: (path: string, data?: {}, config?: Config) => Promise<ApiResponseClass<any, any>>;
5
+ //#endregion
6
+ export { getVercel };
@@ -0,0 +1,6 @@
1
+ import { ApiResponseClass } from "../../api/ApiResponseClass.mjs";
2
+ import { Config } from "../../api/config.mjs";
3
+ //#region src/emsApi/vercel/get.d.ts
4
+ declare const getVercel: (path: string, data?: {}, config?: Config) => Promise<ApiResponseClass<any, any>>;
5
+ //#endregion
6
+ export { getVercel };
@@ -0,0 +1,14 @@
1
+ import { get } from "../../api/get.mjs";
2
+ import { getVercelEndpoint } from "./endpoint.mjs";
3
+ //#region src/emsApi/vercel/get.ts
4
+ const getVercel = async (path, data = {}, config = {}) => {
5
+ return get(`${getVercelEndpoint()}${path}`, {
6
+ ...config,
7
+ headers: {
8
+ "x-api-key": process.env?.EMS_API_KEY ?? "",
9
+ ...config?.headers ?? {}
10
+ }
11
+ });
12
+ };
13
+ //#endregion
14
+ export { getVercel };
@@ -0,0 +1,8 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_emsApi_vercel_endpoint = require("./endpoint.cjs");
3
+ const require_emsApi_vercel_get = require("./get.cjs");
4
+ const require_emsApi_vercel_post = require("./post.cjs");
5
+ exports.getVercel = require_emsApi_vercel_get.getVercel;
6
+ exports.getVercelEndpoint = require_emsApi_vercel_endpoint.getVercelEndpoint;
7
+ exports.postVercel = require_emsApi_vercel_post.postVercel;
8
+ exports.vercelEndpointEnvironment = require_emsApi_vercel_endpoint.vercelEndpointEnvironment;
@@ -0,0 +1,4 @@
1
+ import { VercelEndpointEnvironment, getVercelEndpoint, vercelEndpointEnvironment } from "./endpoint.cjs";
2
+ import { getVercel } from "./get.cjs";
3
+ import { postVercel } from "./post.cjs";
4
+ export { VercelEndpointEnvironment, getVercel, getVercelEndpoint, postVercel, vercelEndpointEnvironment };
@@ -0,0 +1,4 @@
1
+ import { VercelEndpointEnvironment, getVercelEndpoint, vercelEndpointEnvironment } from "./endpoint.mjs";
2
+ import { getVercel } from "./get.mjs";
3
+ import { postVercel } from "./post.mjs";
4
+ export { VercelEndpointEnvironment, getVercel, getVercelEndpoint, postVercel, vercelEndpointEnvironment };
@@ -0,0 +1,4 @@
1
+ import { getVercelEndpoint, vercelEndpointEnvironment } from "./endpoint.mjs";
2
+ import { getVercel } from "./get.mjs";
3
+ import { postVercel } from "./post.mjs";
4
+ export { getVercel, getVercelEndpoint, postVercel, vercelEndpointEnvironment };
@@ -0,0 +1,15 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_api_post = require("../../api/post.cjs");
3
+ const require_emsApi_vercel_endpoint = require("./endpoint.cjs");
4
+ //#region src/emsApi/vercel/post.ts
5
+ const postVercel = async (path, data = {}, config = {}) => {
6
+ return require_api_post.post(`${require_emsApi_vercel_endpoint.getVercelEndpoint()}${path}`, data, {
7
+ ...config,
8
+ headers: {
9
+ "x-api-key": process.env?.EMS_API_KEY ?? "",
10
+ ...config?.headers ?? {}
11
+ }
12
+ });
13
+ };
14
+ //#endregion
15
+ exports.postVercel = postVercel;
@@ -0,0 +1,6 @@
1
+ import { ApiResponseClass } from "../../api/ApiResponseClass.cjs";
2
+ import { Config } from "../../api/config.cjs";
3
+ //#region src/emsApi/vercel/post.d.ts
4
+ declare const postVercel: (path: string, data?: {}, config?: Config) => Promise<ApiResponseClass<any, any>>;
5
+ //#endregion
6
+ export { postVercel };
@@ -0,0 +1,6 @@
1
+ import { ApiResponseClass } from "../../api/ApiResponseClass.mjs";
2
+ import { Config } from "../../api/config.mjs";
3
+ //#region src/emsApi/vercel/post.d.ts
4
+ declare const postVercel: (path: string, data?: {}, config?: Config) => Promise<ApiResponseClass<any, any>>;
5
+ //#endregion
6
+ export { postVercel };
@@ -0,0 +1,14 @@
1
+ import { post } from "../../api/post.mjs";
2
+ import { getVercelEndpoint } from "./endpoint.mjs";
3
+ //#region src/emsApi/vercel/post.ts
4
+ const postVercel = async (path, data = {}, config = {}) => {
5
+ return post(`${getVercelEndpoint()}${path}`, data, {
6
+ ...config,
7
+ headers: {
8
+ "x-api-key": process.env?.EMS_API_KEY ?? "",
9
+ ...config?.headers ?? {}
10
+ }
11
+ });
12
+ };
13
+ //#endregion
14
+ export { postVercel };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@8ms/helpers",
3
3
  "license": "UNLICENSED",
4
- "version": "2.4.17",
4
+ "version": "2.4.19",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/8millionstories-organisation/8ms-helpers-ts.git"
@@ -238,6 +238,10 @@
238
238
  "import": "./dist/api/ApiResponseClass.mjs",
239
239
  "require": "./dist/api/ApiResponseClass.cjs"
240
240
  },
241
+ "./api/config": {
242
+ "import": "./dist/api/config.mjs",
243
+ "require": "./dist/api/config.cjs"
244
+ },
241
245
  "./api/deleteRequest": {
242
246
  "import": "./dist/api/deleteRequest.mjs",
243
247
  "require": "./dist/api/deleteRequest.cjs"
@@ -538,6 +542,38 @@
538
542
  "import": "./dist/drizzle/server/DrizzleNamespace.mjs",
539
543
  "require": "./dist/drizzle/server/DrizzleNamespace.cjs"
540
544
  },
545
+ "./emsApi/awsTs": {
546
+ "import": "./dist/emsApi/awsTs/index.mjs",
547
+ "require": "./dist/emsApi/awsTs/index.cjs"
548
+ },
549
+ "./emsApi/awsTs/endpoint": {
550
+ "import": "./dist/emsApi/awsTs/endpoint.mjs",
551
+ "require": "./dist/emsApi/awsTs/endpoint.cjs"
552
+ },
553
+ "./emsApi/awsTs/get": {
554
+ "import": "./dist/emsApi/awsTs/get.mjs",
555
+ "require": "./dist/emsApi/awsTs/get.cjs"
556
+ },
557
+ "./emsApi/awsTs/post": {
558
+ "import": "./dist/emsApi/awsTs/post.mjs",
559
+ "require": "./dist/emsApi/awsTs/post.cjs"
560
+ },
561
+ "./emsApi/vercel": {
562
+ "import": "./dist/emsApi/vercel/index.mjs",
563
+ "require": "./dist/emsApi/vercel/index.cjs"
564
+ },
565
+ "./emsApi/vercel/endpoint": {
566
+ "import": "./dist/emsApi/vercel/endpoint.mjs",
567
+ "require": "./dist/emsApi/vercel/endpoint.cjs"
568
+ },
569
+ "./emsApi/vercel/get": {
570
+ "import": "./dist/emsApi/vercel/get.mjs",
571
+ "require": "./dist/emsApi/vercel/get.cjs"
572
+ },
573
+ "./emsApi/vercel/post": {
574
+ "import": "./dist/emsApi/vercel/post.mjs",
575
+ "require": "./dist/emsApi/vercel/post.cjs"
576
+ },
541
577
  "./environment": {
542
578
  "import": "./dist/environment/index.mjs",
543
579
  "require": "./dist/environment/index.cjs"