@8ms/helpers 2.3.26 → 2.3.27

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 (148) hide show
  1. package/dist/_class/index.d.mts +2 -0
  2. package/dist/_class/index.mjs +61 -0
  3. package/dist/adverity/index.d.mts +2 -0
  4. package/dist/adverity/index.mjs +64 -0
  5. package/dist/adverity/server/index.d.mts +18 -0
  6. package/dist/adverity/server/index.mjs +25 -0
  7. package/dist/api/index.d.mts +2 -0
  8. package/dist/api/index.mjs +3 -0
  9. package/dist/api-DGKJDAfb.mjs +139 -0
  10. package/dist/array/index.d.mts +11 -0
  11. package/dist/array/index.mjs +12 -0
  12. package/dist/atInternet/index.d.mts +20 -0
  13. package/dist/atInternet/index.mjs +18 -0
  14. package/dist/aws/ec2/server/index.d.mts +18 -0
  15. package/dist/aws/ec2/server/index.mjs +48 -0
  16. package/dist/aws/ecs/server/index.d.mts +59 -0
  17. package/dist/aws/ecs/server/index.mjs +113 -0
  18. package/dist/aws/glue/server/index.d.mts +19 -0
  19. package/dist/aws/glue/server/index.mjs +36 -0
  20. package/dist/aws/lambda/server/index.d.mts +28 -0
  21. package/dist/aws/lambda/server/index.mjs +57 -0
  22. package/dist/aws/s3/server/index.d.mts +124 -0
  23. package/dist/aws/s3/server/index.mjs +360 -0
  24. package/dist/aws/server/index.d.mts +2 -0
  25. package/dist/aws/server/index.mjs +3 -0
  26. package/dist/aws/ses/server/index.d.mts +105 -0
  27. package/dist/aws/ses/server/index.mjs +268 -0
  28. package/dist/aws/sqs/server/index.d.mts +41 -0
  29. package/dist/aws/sqs/server/index.mjs +56 -0
  30. package/dist/aws/ssm/server/index.d.mts +18 -0
  31. package/dist/aws/ssm/server/index.mjs +47 -0
  32. package/dist/axios/index.d.mts +22 -0
  33. package/dist/axios/index.mjs +50 -0
  34. package/dist/boolean/index.d.mts +7 -0
  35. package/dist/boolean/index.mjs +13 -0
  36. package/dist/brightData/serpApi/server/index.d.mts +93 -0
  37. package/dist/brightData/serpApi/server/index.mjs +229 -0
  38. package/dist/brightData/server/index.d.mts +2 -0
  39. package/dist/brightData/server/index.mjs +18 -0
  40. package/dist/brightData/webScraperIde/server/index.d.mts +19 -0
  41. package/dist/brightData/webScraperIde/server/index.mjs +50 -0
  42. package/dist/cache/server/index.d.mts +10 -0
  43. package/dist/cache/server/index.mjs +31 -0
  44. package/dist/chunk-DDarj8oW.mjs +7 -0
  45. package/dist/crud/index.d.mts +10 -0
  46. package/dist/crud/index.mjs +10 -0
  47. package/dist/crypto/index.d.mts +25 -0
  48. package/dist/crypto/index.mjs +57 -0
  49. package/dist/date/index.d.mts +2 -0
  50. package/dist/date/index.mjs +471 -0
  51. package/dist/drizzle/server/index.d.mts +22 -0
  52. package/dist/drizzle/server/index.mjs +69 -0
  53. package/dist/environment/index.d.mts +37 -0
  54. package/dist/environment/index.mjs +60 -0
  55. package/dist/eskimi/index.d.mts +52 -0
  56. package/dist/eskimi/index.mjs +90 -0
  57. package/dist/eskimi/server/index.d.mts +25 -0
  58. package/dist/eskimi/server/index.mjs +50 -0
  59. package/dist/file/index.d.mts +7 -0
  60. package/dist/file/index.mjs +20 -0
  61. package/dist/file/server/index.d.mts +8 -0
  62. package/dist/file/server/index.mjs +16 -0
  63. package/dist/geo/index.d.mts +26 -0
  64. package/dist/geo/index.mjs +1591 -0
  65. package/dist/getDecimal-CafxtLhH.mjs +40 -0
  66. package/dist/googleAds/keywordPlanner/server/index.d.mts +45 -0
  67. package/dist/googleAds/keywordPlanner/server/index.mjs +51 -0
  68. package/dist/googleAds/server/index.d.mts +27 -0
  69. package/dist/googleAds/server/index.mjs +48 -0
  70. package/dist/googleCloud/bigquery/server/index.d.mts +82 -0
  71. package/dist/googleCloud/bigquery/server/index.mjs +133 -0
  72. package/dist/googleCloud/server/index.d.mts +2 -0
  73. package/dist/googleCloud/server/index.mjs +24 -0
  74. package/dist/googleCloud/sheets/server/index.d.mts +22 -0
  75. package/dist/googleCloud/sheets/server/index.mjs +31 -0
  76. package/dist/googleCloud/storage/server/index.d.mts +31 -0
  77. package/dist/googleCloud/storage/server/index.mjs +79 -0
  78. package/dist/googlePageSpeed/server/index.d.mts +34 -0
  79. package/dist/googlePageSpeed/server/index.mjs +53 -0
  80. package/dist/googleSearchIncidents/server/index.d.mts +73 -0
  81. package/dist/googleSearchIncidents/server/index.mjs +55 -0
  82. package/dist/greenDomain/server/index.d.mts +25 -0
  83. package/dist/greenDomain/server/index.mjs +31 -0
  84. package/dist/index-1fBbJGQz.d.mts +246 -0
  85. package/dist/index-BHuvb_7y.d.mts +116 -0
  86. package/dist/index-BfyGIdDD.d.mts +18 -0
  87. package/dist/index-CqTOMR8f.d.mts +17 -0
  88. package/dist/index-DW9yJLtI.d.mts +67 -0
  89. package/dist/index-DmCSxHCc.d.mts +32 -0
  90. package/dist/index-DwB8X1lz.d.mts +32 -0
  91. package/dist/inngest/index.d.mts +10 -0
  92. package/dist/inngest/index.mjs +10 -0
  93. package/dist/json/index.d.mts +7 -0
  94. package/dist/json/index.mjs +27 -0
  95. package/dist/littleWarden/server/index.d.mts +56 -0
  96. package/dist/littleWarden/server/index.mjs +79 -0
  97. package/dist/lodash/index.d.mts +45 -0
  98. package/dist/lodash/index.mjs +176 -0
  99. package/dist/lumar/api/server/index.d.mts +66 -0
  100. package/dist/lumar/api/server/index.mjs +111 -0
  101. package/dist/lumar/graphql/server/index.d.mts +308 -0
  102. package/dist/lumar/graphql/server/index.mjs +172 -0
  103. package/dist/myTarget/server/index.d.mts +9 -0
  104. package/dist/myTarget/server/index.mjs +16 -0
  105. package/dist/nextAuth/index.d.mts +12 -0
  106. package/dist/nextAuth/index.mjs +15 -0
  107. package/dist/nextJs/client/index.d.mts +10 -0
  108. package/dist/nextJs/client/index.mjs +12 -0
  109. package/dist/nextJs/index.d.mts +19 -0
  110. package/dist/nextJs/index.mjs +12 -0
  111. package/dist/number/index.d.mts +54 -0
  112. package/dist/number/index.mjs +75 -0
  113. package/dist/object/index.d.mts +8 -0
  114. package/dist/object/index.mjs +22 -0
  115. package/dist/onePassword/server/index.d.mts +24 -0
  116. package/dist/onePassword/server/index.mjs +50 -0
  117. package/dist/openAi/server/index.d.mts +20 -0
  118. package/dist/openAi/server/index.mjs +46 -0
  119. package/dist/prisma/index.d.mts +7 -0
  120. package/dist/prisma/index.mjs +15 -0
  121. package/dist/prisma/server/index.d.mts +31 -0
  122. package/dist/prisma/server/index.mjs +64 -0
  123. package/dist/server-Bwy4JI8Z.mjs +33 -0
  124. package/dist/snapchat/server/index.d.mts +25 -0
  125. package/dist/snapchat/server/index.mjs +39 -0
  126. package/dist/sorting/index.d.mts +25 -0
  127. package/dist/sorting/index.mjs +50 -0
  128. package/dist/stream/server/index.d.mts +15 -0
  129. package/dist/stream/server/index.mjs +48 -0
  130. package/dist/string/index.d.mts +107 -0
  131. package/dist/string/index.mjs +187 -0
  132. package/dist/swr/client/index.d.mts +46 -0
  133. package/dist/swr/client/index.mjs +40 -0
  134. package/dist/upTimeRobot/server/index.d.mts +72 -0
  135. package/dist/upTimeRobot/server/index.mjs +82 -0
  136. package/dist/url/index.d.mts +29 -0
  137. package/dist/url/index.mjs +52 -0
  138. package/dist/url/server/index.d.mts +9 -0
  139. package/dist/url/server/index.mjs +35 -0
  140. package/dist/util/index.d.mts +50 -0
  141. package/dist/util/index.mjs +107 -0
  142. package/dist/util/server/index.d.mts +27 -0
  143. package/dist/util/server/index.mjs +61 -0
  144. package/dist/webWorker/index.d.mts +11 -0
  145. package/dist/webWorker/index.mjs +11 -0
  146. package/dist/xml/server/index.d.mts +4 -0
  147. package/dist/xml/server/index.mjs +17 -0
  148. package/package.json +189 -118
@@ -0,0 +1,53 @@
1
+ import { BaseNamespace } from "../../_class/index.mjs";
2
+ import "../../api-DGKJDAfb.mjs";
3
+ import { get } from "../../axios/index.mjs";
4
+ import { onePasswordClient } from "../../onePassword/server/index.mjs";
5
+
6
+ //#region src/googlePageSpeed/server/GooglePageSpeedNamespace.ts
7
+ /**
8
+ * Based on https://developers.google.com/speed/docs/insights/rest/v5/pagespeedapi/runpagespeed
9
+ */
10
+ var GooglePageSpeedNamespace = class extends BaseNamespace {
11
+ ensureInit = async () => {
12
+ if (!this.client) try {
13
+ this.client = true;
14
+ } catch (e) {
15
+ throw new Error("Google PageSpeed Client not installed");
16
+ }
17
+ };
18
+ getReport = async (url, inputCategory = category.PERFORMANCE, inputStrategy = strategy.MOBILE) => {
19
+ const apiResponse = await get(`https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url=${url}&strategy=${inputStrategy}&category=${inputCategory}&key=${this.config.apiKey}`);
20
+ if (apiResponse.isSuccess()) return apiResponse.getBody();
21
+ return null;
22
+ };
23
+ };
24
+
25
+ //#endregion
26
+ //#region src/googlePageSpeed/server/googlePageSpeed.ts
27
+ const googlePageSpeedNamespaces = /* @__PURE__ */ new Map();
28
+ const googlePageSpeedClient = async (key = "default", config, vaultId, itemId) => {
29
+ if (googlePageSpeedNamespaces.has(key)) return googlePageSpeedNamespaces.get(key);
30
+ let instanceConfig;
31
+ if (config) instanceConfig = config;
32
+ else if (vaultId && itemId) instanceConfig = await (await onePasswordClient()).getJsonNote(vaultId, itemId);
33
+ else if (process.env.GOOGLE_PAGE_SPEED_VAULT_ID && process.env.GOOGLE_PAGE_SPEED_ITEM_ID) instanceConfig = await (await onePasswordClient()).getJsonNote(process.env.GOOGLE_PAGE_SPEED_VAULT_ID, process.env.GOOGLE_PAGE_SPEED_ITEM_ID);
34
+ else throw new Error(`Config required for namespace '${key}'`);
35
+ const namespace = new GooglePageSpeedNamespace(key, instanceConfig);
36
+ googlePageSpeedNamespaces.set(key, namespace);
37
+ return namespace;
38
+ };
39
+ const category = {
40
+ CATEGORY_UNSPECIFIED: "CATEGORY_UNSPECIFIED",
41
+ ACCESSIBILITY: "ACCESSIBILITY",
42
+ BEST_PRACTICES: "BEST_PRACTICES",
43
+ PERFORMANCE: "PERFORMANCE",
44
+ SEO: "SEO"
45
+ };
46
+ const strategy = {
47
+ STRATEGY_UNSPECIFIED: "STRATEGY_UNSPECIFIED",
48
+ DESKTOP: "DESKTOP",
49
+ MOBILE: "MOBILE"
50
+ };
51
+
52
+ //#endregion
53
+ export { GooglePageSpeedNamespace, category, googlePageSpeedClient, strategy };
@@ -0,0 +1,73 @@
1
+ import { z } from "zod/v4";
2
+
3
+ //#region src/googleSearchIncidents/server/googleSearchIncidents.d.ts
4
+ /**
5
+ * https://status.search.google.com/summary
6
+ */
7
+ declare const getReport: () => Promise<any>;
8
+ declare const updateSchema: z.ZodObject<{
9
+ created: z.ZodString;
10
+ modified: z.ZodString;
11
+ when: z.ZodString;
12
+ text: z.ZodString;
13
+ status: z.ZodEnum<{
14
+ AVAILABLE: "AVAILABLE";
15
+ SERVICE_DISRUPTION: "SERVICE_DISRUPTION";
16
+ SERVICE_INFORMATION: "SERVICE_INFORMATION";
17
+ }>;
18
+ }, z.core.$strip>;
19
+ type UpdateSchemaType = z.infer<typeof updateSchema>;
20
+ declare const incidentSchema: z.ZodArray<z.ZodObject<{
21
+ id: z.ZodString;
22
+ number: z.ZodString;
23
+ begin: z.ZodString;
24
+ created: z.ZodString;
25
+ end: z.ZodOptional<z.ZodString>;
26
+ modified: z.ZodString;
27
+ external_desc: z.ZodString;
28
+ updates: z.ZodArray<z.ZodObject<{
29
+ created: z.ZodString;
30
+ modified: z.ZodString;
31
+ when: z.ZodString;
32
+ text: z.ZodString;
33
+ status: z.ZodEnum<{
34
+ AVAILABLE: "AVAILABLE";
35
+ SERVICE_DISRUPTION: "SERVICE_DISRUPTION";
36
+ SERVICE_INFORMATION: "SERVICE_INFORMATION";
37
+ }>;
38
+ }, z.core.$strip>>;
39
+ most_recent_update: z.ZodObject<{
40
+ created: z.ZodString;
41
+ modified: z.ZodString;
42
+ when: z.ZodString;
43
+ text: z.ZodString;
44
+ status: z.ZodEnum<{
45
+ AVAILABLE: "AVAILABLE";
46
+ SERVICE_DISRUPTION: "SERVICE_DISRUPTION";
47
+ SERVICE_INFORMATION: "SERVICE_INFORMATION";
48
+ }>;
49
+ }, z.core.$strip>;
50
+ status_impact: z.ZodEnum<{
51
+ SERVICE_DISRUPTION: "SERVICE_DISRUPTION";
52
+ SERVICE_INFORMATION: "SERVICE_INFORMATION";
53
+ }>;
54
+ severity: z.ZodEnum<{
55
+ low: "low";
56
+ medium: "medium";
57
+ high: "high";
58
+ }>;
59
+ service_key: z.ZodString;
60
+ service_name: z.ZodEnum<{
61
+ Indexing: "Indexing";
62
+ Ranking: "Ranking";
63
+ Serving: "Serving";
64
+ }>;
65
+ affected_products: z.ZodArray<z.ZodObject<{
66
+ title: z.ZodString;
67
+ id: z.ZodString;
68
+ }, z.core.$strip>>;
69
+ uri: z.ZodString;
70
+ }, z.core.$strip>>;
71
+ type IncidentSchemaType = z.infer<typeof incidentSchema>;
72
+ //#endregion
73
+ export { IncidentSchemaType, UpdateSchemaType, getReport, incidentSchema, updateSchema };
@@ -0,0 +1,55 @@
1
+ import "../../api-DGKJDAfb.mjs";
2
+ import { get } from "../../axios/index.mjs";
3
+ import { z } from "zod/v4";
4
+
5
+ //#region src/googleSearchIncidents/server/googleSearchIncidents.ts
6
+ /**
7
+ * https://status.search.google.com/summary
8
+ */
9
+ const getReport = async () => {
10
+ const apiResponse = await get("https://status.search.google.com/incidents.json");
11
+ if (apiResponse.isSuccess()) return apiResponse.getBody();
12
+ return null;
13
+ };
14
+ const updateSchema = z.object({
15
+ created: z.string(),
16
+ modified: z.string(),
17
+ when: z.string(),
18
+ text: z.string(),
19
+ status: z.enum([
20
+ "AVAILABLE",
21
+ "SERVICE_DISRUPTION",
22
+ "SERVICE_INFORMATION"
23
+ ])
24
+ });
25
+ const incidentSchema = z.object({
26
+ id: z.string(),
27
+ number: z.string(),
28
+ begin: z.string(),
29
+ created: z.string(),
30
+ end: z.string().optional(),
31
+ modified: z.string(),
32
+ external_desc: z.string(),
33
+ updates: updateSchema.array(),
34
+ most_recent_update: updateSchema,
35
+ status_impact: z.enum(["SERVICE_DISRUPTION", "SERVICE_INFORMATION"]),
36
+ severity: z.enum([
37
+ "low",
38
+ "medium",
39
+ "high"
40
+ ]),
41
+ service_key: z.string(),
42
+ service_name: z.enum([
43
+ "Indexing",
44
+ "Ranking",
45
+ "Serving"
46
+ ]),
47
+ affected_products: z.object({
48
+ title: z.string(),
49
+ id: z.string()
50
+ }).array(),
51
+ uri: z.string()
52
+ }).array();
53
+
54
+ //#endregion
55
+ export { getReport, incidentSchema, updateSchema };
@@ -0,0 +1,25 @@
1
+ import { z } from "zod/v4";
2
+
3
+ //#region src/greenDomain/server/greenDomain.d.ts
4
+ /**
5
+ * https://developers.thegreenwebfoundation.org/api/greencheck/v3/check-single-domain/
6
+ */
7
+ declare const getSingleReport: (domain: string) => Promise<any>;
8
+ declare const greenDomainSchema: z.ZodObject<{
9
+ green: z.ZodBoolean;
10
+ url: z.ZodString;
11
+ data: z.ZodOptional<z.ZodBoolean>;
12
+ hosted_by: z.ZodOptional<z.ZodString>;
13
+ hosted_by_website: z.ZodOptional<z.ZodString>;
14
+ partner: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
+ hosted_by_id: z.ZodOptional<z.ZodNumber>;
16
+ modified: z.ZodOptional<z.ZodString>;
17
+ supporting_documents: z.ZodOptional<z.ZodArray<z.ZodObject<{
18
+ id: z.ZodNumber;
19
+ title: z.ZodString;
20
+ link: z.ZodString;
21
+ }, z.core.$strip>>>;
22
+ }, z.core.$strip>;
23
+ type GreenDomainSchemaType = z.infer<typeof greenDomainSchema>;
24
+ //#endregion
25
+ export { GreenDomainSchemaType, getSingleReport, greenDomainSchema };
@@ -0,0 +1,31 @@
1
+ import "../../api-DGKJDAfb.mjs";
2
+ import { get } from "../../axios/index.mjs";
3
+ import { z } from "zod/v4";
4
+
5
+ //#region src/greenDomain/server/greenDomain.ts
6
+ /**
7
+ * https://developers.thegreenwebfoundation.org/api/greencheck/v3/check-single-domain/
8
+ */
9
+ const getSingleReport = async (domain) => {
10
+ const apiResponse = await get(`https://api.thegreenwebfoundation.org/greencheck/${domain}`);
11
+ if (apiResponse.isSuccess()) return apiResponse.getBody();
12
+ return null;
13
+ };
14
+ const greenDomainSchema = z.object({
15
+ green: z.boolean(),
16
+ url: z.string(),
17
+ data: z.boolean().optional(),
18
+ hosted_by: z.string().optional(),
19
+ hosted_by_website: z.string().optional(),
20
+ partner: z.string().nullable().optional(),
21
+ hosted_by_id: z.number().optional(),
22
+ modified: z.string().optional(),
23
+ supporting_documents: z.object({
24
+ id: z.number(),
25
+ title: z.string(),
26
+ link: z.string()
27
+ }).array().optional()
28
+ });
29
+
30
+ //#endregion
31
+ export { getSingleReport, greenDomainSchema };
@@ -0,0 +1,246 @@
1
+ import { DateTime, Interval } from "luxon";
2
+
3
+ //#region src/date/date.d.ts
4
+ type InputDate = Date | DateTime | string | number;
5
+ type FinancialWeek = {
6
+ end: DateTime;
7
+ start: DateTime;
8
+ weekNumber: number;
9
+ year: number;
10
+ };
11
+ /**
12
+ * A timeframe has a start and an end date.
13
+ */
14
+ type Timeframe = {
15
+ end: DateTime;
16
+ start: DateTime;
17
+ };
18
+ declare const defaultDate: "1901-01-01";
19
+ declare const defaultDateNumber: 19010101;
20
+ declare const defaultDateTime: "1901-01-01 00:00:00";
21
+ /**
22
+ * Used by Google Ads API.
23
+ */
24
+ declare const month: {
25
+ readonly JANUARY: "JANUARY";
26
+ readonly FEBRUARY: "FEBRUARY";
27
+ readonly MARCH: "MARCH";
28
+ readonly APRIL: "APRIL";
29
+ readonly MAY: "MAY";
30
+ readonly JUNE: "JUNE";
31
+ readonly JULY: "JULY";
32
+ readonly AUGUST: "AUGUST";
33
+ readonly SEPTEMBER: "SEPTEMBER";
34
+ readonly OCTOBER: "OCTOBER";
35
+ readonly NOVEMBER: "NOVEMBER";
36
+ readonly DECEMBER: "DECEMBER";
37
+ };
38
+ type Month = typeof month[keyof typeof month];
39
+ //#endregion
40
+ //#region src/date/calculation.d.ts
41
+ /**
42
+ * Return unix timestamp in seconds.
43
+ */
44
+ declare const getUnix: (input?: InputDate) => number;
45
+ /**
46
+ * Assume the input is always UTC.
47
+ *
48
+ * If it's not UTC, it needs to be converted to UTC before being used.
49
+ */
50
+ declare const getLuxonDate: (input?: InputDate, setMidnight?: boolean) => DateTime<boolean>;
51
+ declare const isMonday: (input?: InputDate) => boolean;
52
+ declare const isTuesday: (input?: InputDate) => boolean;
53
+ declare const isWednesday: (input?: InputDate) => boolean;
54
+ declare const isThursday: (input?: InputDate) => boolean;
55
+ declare const isFriday: (input?: InputDate) => boolean;
56
+ declare const isSaturday: (input?: InputDate) => boolean;
57
+ declare const isSunday: (input?: InputDate) => boolean;
58
+ /**
59
+ * Determines if a given date falls on a weekend.
60
+ *
61
+ * This function checks whether the day of the week for the provided input corresponds
62
+ * to Saturday or Sunday, where weekday values of 6 and 7 represent Saturday and Sunday, respectively.
63
+ */
64
+ declare const isWeekend: (input?: InputDate) => boolean;
65
+ /**
66
+ * Calculates the difference in minutes between two provided dates.
67
+ */
68
+ declare const differenceInMinutes: (start: InputDate, end: InputDate) => number;
69
+ /**
70
+ * Calculates the difference in business days between two dates.
71
+ * Business days are considered as weekdays (Monday to Friday).
72
+ */
73
+ declare const differenceInBusinessDays: (start: InputDate, end: InputDate) => number;
74
+ /**
75
+ * Similar to date-fns' eachDayOfInterval, however the timezone messes this function up.
76
+ * https://date-fns.org/v2.28.0/docs/eachDayOfInterval
77
+ * https://www.gov.uk/when-do-the-clocks-change
78
+ */
79
+ declare const getDatesBetween: (start: InputDate, end: InputDate) => DateTime<true>[];
80
+ /**
81
+ * Get an array of DateTime objects representing the 1st of each month between start and end dates.
82
+ */
83
+ declare const getMonthsBetween: (start: InputDate, end: InputDate) => DateTime<boolean>[];
84
+ /**
85
+ * If a given date is beyond the maximum, return the maximum.
86
+ */
87
+ declare const getMax: (input: DateTime, max: DateTime) => DateTime<boolean>;
88
+ /**
89
+ * If a given date is before the minimum, return the minimum.
90
+ */
91
+ declare const getMin: (input: DateTime, min: DateTime) => DateTime<boolean>;
92
+ /**
93
+ * Retrieve the closest last Monday relative to the input or today.
94
+ * 0 weeksAgo - Tuesday (10th), return Monday (8th)
95
+ * 1 weeksAgo - Tuesday (10th), return Monday (1st)
96
+ */
97
+ declare const getMonday: (input?: InputDate, weeksAgo?: number) => DateTime<boolean>;
98
+ /**
99
+ * Retrieve the closest last Sunday relative to the input or today.
100
+ * 0 weeksAgo - Tuesday (17th), return Sunday (14th)
101
+ * 1 weeksAgo - Tuesday (17th), return Monday (7th)
102
+ */
103
+ declare const getSunday: (input?: InputDate, weeksAgo?: number) => DateTime<boolean>;
104
+ /**
105
+ * Return an object of start/end predefined date of Last Week.
106
+ * Creating a date from scratch (no user input), thus needs to be London time.
107
+ */
108
+ declare const getLastWeek: () => Timeframe;
109
+ /**
110
+ * Return an object of start/end predefined date of This Week.
111
+ * Creating a date from scratch (no user input), thus needs to be London time.
112
+ */
113
+ declare const getThisWeek: () => Timeframe;
114
+ /**
115
+ * Return an object of start/end predefined date of Two Weeks Ago.
116
+ * Creating a date from scratch (no user input), thus needs to be London time.
117
+ */
118
+ declare const getTwoWeeksAgo: () => Timeframe;
119
+ /**
120
+ * Shortcut to get today's date.
121
+ * Creating a date from scratch (no user input), thus needs to be London time.
122
+ */
123
+ declare const getToday: (setMidnight?: boolean) => DateTime<boolean>;
124
+ /**
125
+ * From a given input, move the date back X weeksAgo
126
+ */
127
+ declare const getWeeksAgo: (input?: InputDate, weeksAgo?: number) => DateTime<boolean>;
128
+ /**
129
+ * Shortcut to get yesterday's date.
130
+ * Creating a date from scratch (no user input), thus needs to be London time.
131
+ */
132
+ declare const getYesterday: (input?: InputDate) => DateTime<boolean>;
133
+ /**
134
+ * Check to see if a given timeframe is This Week.
135
+ */
136
+ declare const isThisWeek: (start: InputDate, end: InputDate) => boolean;
137
+ /**
138
+ * Check to see if a given timeframe is Last Week.
139
+ */
140
+ declare const isLastWeek: (start: InputDate, end: InputDate) => boolean;
141
+ //#endregion
142
+ //#region src/date/financialYear.d.ts
143
+ /**
144
+ * Get the financial year based on an optional year.
145
+ */
146
+ declare const getFinancialYear: (year?: number) => Timeframe;
147
+ /**
148
+ * Return the current financial year up to today.
149
+ */
150
+ declare const getFinancialYearToDate: () => Timeframe;
151
+ /**
152
+ * Return the current financial year up to yesterday.
153
+ * Timezone should always be London based
154
+ */
155
+ declare const getFinancialYearToYesterday: () => Timeframe;
156
+ /**
157
+ * Get the current financial year.
158
+ */
159
+ declare const getFinancialYearWeeks: (year?: number) => Interval<boolean>[];
160
+ //#endregion
161
+ //#region src/date/format.d.ts
162
+ /**
163
+ * Convert a number of seconds into HH:MM:SS
164
+ * https://www.codevertiser.com/convert-seconds-to-hours-and-minutes-javascript/
165
+ */
166
+ declare const getDurationHours: (seconds: number) => string;
167
+ /**
168
+ * Convert a number of seconds into MM:SS
169
+ * https://www.codevertiser.com/convert-seconds-to-hours-and-minutes-javascript/
170
+ */
171
+ declare const getDurationMinutes: (seconds: number) => string;
172
+ /**
173
+ * Simple function takes any DateTime, String or Number and formats it.
174
+ */
175
+ declare const format: (input: InputDate, dateFormat: string) => string;
176
+ /**
177
+ * Convert a Date into a dd number.
178
+ */
179
+ declare const getDayNumber: (input: InputDate) => number;
180
+ /**
181
+ * Whenever we are displaying a month and year date in Codex, this will be the standardised format.
182
+ * Example: 1901-02-03 → 3 Feb 1901
183
+ */
184
+ declare const getFullDate: (input: InputDate) => string;
185
+ /**
186
+ * Whenever we are displaying a month and year date in Codex, this will be the standardised format.
187
+ * Example: 1901-02-03 01:23:45 → 1:23am 3 Feb 1901
188
+ */
189
+ declare const getFullDateTime: (input: InputDate) => string;
190
+ /**
191
+ * Returns a MMM YYYY value as a number for a given year.
192
+ * Example: 1901-02-03 → Feb 1901
193
+ */
194
+ declare const getMonthYearString: (input: InputDate) => string;
195
+ /**
196
+ * Returns a YYYY MMM value as a number for a given year.
197
+ * Example: 1901-02-03 → 1901 Feb
198
+ */
199
+ declare const getYearMonthString: (input: InputDate) => string;
200
+ /**
201
+ * Shorthand to get the current date.
202
+ */
203
+ declare const getTodayYmdString: (setMidnight?: boolean) => string;
204
+ /**
205
+ * Shorthand to get the current date.
206
+ */
207
+ declare const getTodayYmdHisString: (setMidnight?: boolean) => string;
208
+ /**
209
+ * Shorthand to get the current date.
210
+ */
211
+ declare const getTodayYmdNumber: (setMidnight?: boolean) => number;
212
+ /**
213
+ * Shorthand to get the current date.
214
+ */
215
+ declare const getTodayYmdHisNumber: (setMidnight?: boolean) => number;
216
+ /**
217
+ * Convert a Date into a YYYY number.
218
+ */
219
+ declare const getYearNumber: (input: InputDate) => number;
220
+ /**
221
+ * Returns a YYYYMMDDHHIISS value as a number.
222
+ * Example: 1901-02-03 01:23:45 → 19010203012345
223
+ */
224
+ declare const getYmdHisNumber: (input: InputDate) => number;
225
+ /**
226
+ * Returns a YYYY-MM-DD HH:MM:SS value as a string.
227
+ * Example: 1901-02-03 → 1901-02-03 00:00:00
228
+ */
229
+ declare const getYmdHisString: (input: InputDate) => string;
230
+ /**
231
+ * Returns a YYYYMMDD value as a number.
232
+ * Example: 1901-02-03 → 19010203
233
+ */
234
+ declare const getYmdNumber: (input: InputDate) => number;
235
+ /**
236
+ * Whenever we are displaying a YYYY-MM-DD date in Codex
237
+ * Example: 1901-02-03 → 1901-02-03
238
+ */
239
+ declare const getYmdString: (input: InputDate) => string;
240
+ /**
241
+ * Convert an Excel date "e.g. 44216" into a JavaScript date object.
242
+ * https://stackoverflow.com/questions/16229494/converting-excel-date-serial-number-to-date-using-javascript
243
+ */
244
+ declare const getLuxonDateFromExcel: (serial: number) => DateTime<true> | DateTime<false>;
245
+ //#endregion
246
+ export { defaultDate as $, getMonday as A, isLastWeek as B, differenceInBusinessDays as C, getLuxonDate as D, getLastWeek as E, getTwoWeeksAgo as F, isThursday as G, isSaturday as H, getUnix as I, isWeekend as J, isTuesday as K, getWeeksAgo as L, getSunday as M, getThisWeek as N, getMax as O, getToday as P, Timeframe as Q, getYesterday as R, getFinancialYearWeeks as S, getDatesBetween as T, isSunday as U, isMonday as V, isThisWeek as W, InputDate as X, FinancialWeek as Y, Month as Z, getYmdNumber as _, getFullDate as a, getFinancialYearToDate as b, getMonthYearString as c, getTodayYmdNumber as d, defaultDateNumber as et, getTodayYmdString as f, getYmdHisString as g, getYmdHisNumber as h, getDurationMinutes as i, getMonthsBetween as j, getMin as k, getTodayYmdHisNumber as l, getYearNumber as m, getDayNumber as n, month as nt, getFullDateTime as o, getYearMonthString as p, isWednesday as q, getDurationHours as r, getLuxonDateFromExcel as s, format as t, defaultDateTime as tt, getTodayYmdHisString as u, getYmdString as v, differenceInMinutes as w, getFinancialYearToYesterday as x, getFinancialYear as y, isFriday as z };
@@ -0,0 +1,116 @@
1
+ import { z } from "zod/v4";
2
+
3
+ //#region src/adverity/adverity.d.ts
4
+ declare const stackSchema: z.ZodObject<{
5
+ id: z.ZodString;
6
+ uuid: z.ZodString;
7
+ name: z.ZodString;
8
+ slug: z.ZodString;
9
+ url: z.ZodString;
10
+ change_url: z.ZodString;
11
+ extracts_url: z.ZodString;
12
+ issues_url: z.ZodString;
13
+ overview_url: z.ZodString;
14
+ permissions: z.ZodObject<{
15
+ isCreator: z.ZodBoolean;
16
+ isDatastreamManager: z.ZodBoolean;
17
+ isViewer: z.ZodBoolean;
18
+ }, z.core.$strip>;
19
+ }, z.core.$strip>;
20
+ type StackSchemaType = z.infer<typeof stackSchema>;
21
+ declare const datastreamSchema: z.ZodObject<{
22
+ id: z.ZodNumber;
23
+ stack: z.ZodObject<{
24
+ id: z.ZodString;
25
+ uuid: z.ZodString;
26
+ name: z.ZodString;
27
+ slug: z.ZodString;
28
+ url: z.ZodString;
29
+ change_url: z.ZodString;
30
+ extracts_url: z.ZodString;
31
+ issues_url: z.ZodString;
32
+ overview_url: z.ZodString;
33
+ permissions: z.ZodObject<{
34
+ isCreator: z.ZodBoolean;
35
+ isDatastreamManager: z.ZodBoolean;
36
+ isViewer: z.ZodBoolean;
37
+ }, z.core.$strip>;
38
+ }, z.core.$strip>;
39
+ stack_id: z.ZodNumber;
40
+ name: z.ZodString;
41
+ slug: z.ZodString;
42
+ app_label: z.ZodString;
43
+ absolute_url: z.ZodString;
44
+ change_url: z.ZodString;
45
+ extracts_url: z.ZodString;
46
+ fetch_url: z.ZodString;
47
+ overview_url: z.ZodString;
48
+ schema_mapping_url: z.ZodString;
49
+ enabled: z.ZodBigInt;
50
+ next_run: z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"Not Scheduled">]>;
51
+ url: z.ZodString;
52
+ datastream_type_id: z.ZodNumber;
53
+ logo_url: z.ZodString;
54
+ extracts_stream_url: z.ZodString;
55
+ supports_extended_intervals: z.ZodNumber;
56
+ updated: z.ZodString;
57
+ created: z.ZodString;
58
+ creator: z.ZodString;
59
+ can_be_fetched: z.ZodNumber;
60
+ }, z.core.$strip>;
61
+ type DatastreamSchemaType = z.infer<typeof datastreamSchema>;
62
+ declare const jobSchema: z.ZodObject<{
63
+ id: z.ZodNumber;
64
+ url: z.ZodString;
65
+ job_start: z.ZodNullable<z.ZodString>;
66
+ job_end: z.ZodNullable<z.ZodString>;
67
+ progress: z.ZodNumber;
68
+ state: z.ZodNumber;
69
+ state_label: z.ZodString;
70
+ state_color: z.ZodString;
71
+ datastream: z.ZodObject<{
72
+ id: z.ZodNumber;
73
+ stack: z.ZodObject<{
74
+ id: z.ZodString;
75
+ uuid: z.ZodString;
76
+ name: z.ZodString;
77
+ slug: z.ZodString;
78
+ url: z.ZodString;
79
+ change_url: z.ZodString;
80
+ extracts_url: z.ZodString;
81
+ issues_url: z.ZodString;
82
+ overview_url: z.ZodString;
83
+ permissions: z.ZodObject<{
84
+ isCreator: z.ZodBoolean;
85
+ isDatastreamManager: z.ZodBoolean;
86
+ isViewer: z.ZodBoolean;
87
+ }, z.core.$strip>;
88
+ }, z.core.$strip>;
89
+ stack_id: z.ZodNumber;
90
+ name: z.ZodString;
91
+ slug: z.ZodString;
92
+ app_label: z.ZodString;
93
+ absolute_url: z.ZodString;
94
+ change_url: z.ZodString;
95
+ extracts_url: z.ZodString;
96
+ fetch_url: z.ZodString;
97
+ overview_url: z.ZodString;
98
+ schema_mapping_url: z.ZodString;
99
+ enabled: z.ZodBigInt;
100
+ next_run: z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"Not Scheduled">]>;
101
+ url: z.ZodString;
102
+ datastream_type_id: z.ZodNumber;
103
+ logo_url: z.ZodString;
104
+ extracts_stream_url: z.ZodString;
105
+ supports_extended_intervals: z.ZodNumber;
106
+ updated: z.ZodString;
107
+ created: z.ZodString;
108
+ creator: z.ZodString;
109
+ can_be_fetched: z.ZodNumber;
110
+ }, z.core.$strip>;
111
+ issues: z.ZodArray<z.ZodAny>;
112
+ type: z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodString]>;
113
+ }, z.core.$strip>;
114
+ type JobSchemaType = z.infer<typeof jobSchema>;
115
+ //#endregion
116
+ export { jobSchema as a, datastreamSchema as i, JobSchemaType as n, stackSchema as o, StackSchemaType as r, DatastreamSchemaType as t };
@@ -0,0 +1,18 @@
1
+ //#region src/brightData/server/brightData.d.ts
2
+ type Auth = {
3
+ apiKey: string;
4
+ host: string;
5
+ port: string;
6
+ username: string;
7
+ password: string;
8
+ };
9
+ /**
10
+ * Return the Zone based on the username.
11
+ */
12
+ declare const getZone: (auth: Auth) => string;
13
+ /**
14
+ * Return the customer Id based on the username.
15
+ */
16
+ declare const getCustomerId: (auth: Auth, prefix?: string) => string;
17
+ //#endregion
18
+ export { getCustomerId as n, getZone as r, Auth as t };
@@ -0,0 +1,17 @@
1
+ //#region src/aws/server/isResponse200.d.ts
2
+ /**
3
+ * Was the API response a 200?
4
+ */
5
+ declare const isResponse200: (apiResponse: any) => boolean;
6
+ //#endregion
7
+ //#region src/aws/server/aws.d.ts
8
+ type AwsConfig = {
9
+ region: string;
10
+ credentials: {
11
+ accessKeyId: string;
12
+ secretAccessKey: string;
13
+ };
14
+ };
15
+ declare const getConfig: (key: any, config?: AwsConfig, vaultId?: string, itemId?: string) => Promise<AwsConfig>;
16
+ //#endregion
17
+ export { getConfig as n, isResponse200 as r, AwsConfig as t };