@stackone/utils 0.15.2 → 0.16.1
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/edge/index.d.mts +29 -1
- package/dist/edge/index.mjs +7 -5
- package/dist/node/index.cjs +7 -5
- package/dist/node/index.d.cts +29 -1
- package/dist/node/index.d.mts +29 -1
- package/dist/node/index.mjs +8 -6
- package/package.json +7 -2
package/dist/node/index.d.cts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Saml20 } from "saml";
|
|
1
2
|
import { ZodType, z } from "zod/v4";
|
|
2
3
|
import { randomUUID } from "crypto";
|
|
3
4
|
|
|
@@ -119,6 +120,33 @@ declare const safeParseToDateTimeString: ({
|
|
|
119
120
|
format?: string;
|
|
120
121
|
}) => string | null;
|
|
121
122
|
//#endregion
|
|
123
|
+
//#region src/shared/saml.d.ts
|
|
124
|
+
declare const generateSamlAssertion: ({
|
|
125
|
+
cert,
|
|
126
|
+
key,
|
|
127
|
+
issuer,
|
|
128
|
+
lifetime,
|
|
129
|
+
clientId,
|
|
130
|
+
nameId,
|
|
131
|
+
tokenEndpoint,
|
|
132
|
+
audience,
|
|
133
|
+
nameIdentifierFormat,
|
|
134
|
+
createSamlFn,
|
|
135
|
+
sleepFn
|
|
136
|
+
}: {
|
|
137
|
+
cert?: Buffer;
|
|
138
|
+
key: string;
|
|
139
|
+
issuer?: string;
|
|
140
|
+
lifetime?: number;
|
|
141
|
+
clientId: string;
|
|
142
|
+
nameId?: string;
|
|
143
|
+
tokenEndpoint?: string;
|
|
144
|
+
audience?: string;
|
|
145
|
+
nameIdentifierFormat?: string;
|
|
146
|
+
createSamlFn?: typeof Saml20.create;
|
|
147
|
+
sleepFn?: (ms: number) => Promise<void>;
|
|
148
|
+
}) => Promise<string>;
|
|
149
|
+
//#endregion
|
|
122
150
|
//#region src/shared/sourceTypes/types.d.ts
|
|
123
151
|
declare enum RequestSourceType {
|
|
124
152
|
DASHBOARD = "DASHBOARD",
|
|
@@ -173,4 +201,4 @@ declare const generateRequestId: (randomUUIDGenerator?: typeof randomUUID) => st
|
|
|
173
201
|
declare const generateActionRunId: (randomUUIDGenerator?: typeof randomUUID) => string;
|
|
174
202
|
declare const generateEventId: (randomUUIDGenerator?: typeof randomUUID) => string;
|
|
175
203
|
//#endregion
|
|
176
|
-
export { NON_BACKGROUND_LOGS_SOURCE_TYPES, NormalizedKeyMap, RequestSourceType, ZodType, calculateNextAnniversary, calculateYearsElapsed, dateHasPassed, decodeFromBase64, deepCopy, delay, encodeToBase64, exponentialBackoffInMS, generateActionRunId, generateEventId, generateRequestId, getContentHash, getCountryAlpha2CodeByAlpha2Code, getCountryAlpha2CodeByAlpha3Code, getCountryAlpha2CodeByCitizenship, getCountryAlpha2CodeByCountryCode, getCountryAlpha2CodeByCountryName, getCountryAlpha3CodeByAlpha2Code, getCountryAlpha3CodeByAlpha3Code, getCountryAlpha3CodeByCountryCode, getCountryAlpha3CodeByCountryName, getCountryCodeByAlpha2Code, getCountryCodeByAlpha3Code, getCountryCodeByCountryCode, getCountryCodeByCountryName, getCountryNameByAlpha2Code, getCountryNameByAlpha3Code, getCountryNameByCountryCode, getCountryNameByCountryName, getCountrySubDivisionByAlpha2CodeAndName, getCountrySubDivisionCodeBySubDivisionName, getCountrySubDivisionNameBySubDivisionCode, getCountrySubDivisionsByAlpha2Code, getDocumentFileFormatFromExtension, isBoolean, isDate, isFunction, isFutureUnixTimestamp, isIpInRange, isIpInRanges, isMissing, isNumber, isObject, isString, isValidIp, isValidIpRange, isValidIpRanges, isValidUUID, notMissing, safeParseToBoolean, safeParseToDateTime, safeParseToDateTimeString, safeParseToNumber, safeParseToString, z, zStrictObject };
|
|
204
|
+
export { NON_BACKGROUND_LOGS_SOURCE_TYPES, NormalizedKeyMap, RequestSourceType, ZodType, calculateNextAnniversary, calculateYearsElapsed, dateHasPassed, decodeFromBase64, deepCopy, delay, encodeToBase64, exponentialBackoffInMS, generateActionRunId, generateEventId, generateRequestId, generateSamlAssertion, getContentHash, getCountryAlpha2CodeByAlpha2Code, getCountryAlpha2CodeByAlpha3Code, getCountryAlpha2CodeByCitizenship, getCountryAlpha2CodeByCountryCode, getCountryAlpha2CodeByCountryName, getCountryAlpha3CodeByAlpha2Code, getCountryAlpha3CodeByAlpha3Code, getCountryAlpha3CodeByCountryCode, getCountryAlpha3CodeByCountryName, getCountryCodeByAlpha2Code, getCountryCodeByAlpha3Code, getCountryCodeByCountryCode, getCountryCodeByCountryName, getCountryNameByAlpha2Code, getCountryNameByAlpha3Code, getCountryNameByCountryCode, getCountryNameByCountryName, getCountrySubDivisionByAlpha2CodeAndName, getCountrySubDivisionCodeBySubDivisionName, getCountrySubDivisionNameBySubDivisionCode, getCountrySubDivisionsByAlpha2Code, getDocumentFileFormatFromExtension, isBoolean, isDate, isFunction, isFutureUnixTimestamp, isIpInRange, isIpInRanges, isMissing, isNumber, isObject, isString, isValidIp, isValidIpRange, isValidIpRanges, isValidUUID, notMissing, safeParseToBoolean, safeParseToDateTime, safeParseToDateTimeString, safeParseToNumber, safeParseToString, z, zStrictObject };
|
package/dist/node/index.d.mts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Saml20 } from "saml";
|
|
1
2
|
import { randomUUID } from "crypto";
|
|
2
3
|
import { ZodType, z } from "zod/v4";
|
|
3
4
|
|
|
@@ -119,6 +120,33 @@ declare const safeParseToDateTimeString: ({
|
|
|
119
120
|
format?: string;
|
|
120
121
|
}) => string | null;
|
|
121
122
|
//#endregion
|
|
123
|
+
//#region src/shared/saml.d.ts
|
|
124
|
+
declare const generateSamlAssertion: ({
|
|
125
|
+
cert,
|
|
126
|
+
key,
|
|
127
|
+
issuer,
|
|
128
|
+
lifetime,
|
|
129
|
+
clientId,
|
|
130
|
+
nameId,
|
|
131
|
+
tokenEndpoint,
|
|
132
|
+
audience,
|
|
133
|
+
nameIdentifierFormat,
|
|
134
|
+
createSamlFn,
|
|
135
|
+
sleepFn
|
|
136
|
+
}: {
|
|
137
|
+
cert?: Buffer;
|
|
138
|
+
key: string;
|
|
139
|
+
issuer?: string;
|
|
140
|
+
lifetime?: number;
|
|
141
|
+
clientId: string;
|
|
142
|
+
nameId?: string;
|
|
143
|
+
tokenEndpoint?: string;
|
|
144
|
+
audience?: string;
|
|
145
|
+
nameIdentifierFormat?: string;
|
|
146
|
+
createSamlFn?: typeof Saml20.create;
|
|
147
|
+
sleepFn?: (ms: number) => Promise<void>;
|
|
148
|
+
}) => Promise<string>;
|
|
149
|
+
//#endregion
|
|
122
150
|
//#region src/shared/sourceTypes/types.d.ts
|
|
123
151
|
declare enum RequestSourceType {
|
|
124
152
|
DASHBOARD = "DASHBOARD",
|
|
@@ -173,4 +201,4 @@ declare const generateRequestId: (randomUUIDGenerator?: typeof randomUUID) => st
|
|
|
173
201
|
declare const generateActionRunId: (randomUUIDGenerator?: typeof randomUUID) => string;
|
|
174
202
|
declare const generateEventId: (randomUUIDGenerator?: typeof randomUUID) => string;
|
|
175
203
|
//#endregion
|
|
176
|
-
export { NON_BACKGROUND_LOGS_SOURCE_TYPES, NormalizedKeyMap, RequestSourceType, ZodType, calculateNextAnniversary, calculateYearsElapsed, dateHasPassed, decodeFromBase64, deepCopy, delay, encodeToBase64, exponentialBackoffInMS, generateActionRunId, generateEventId, generateRequestId, getContentHash, getCountryAlpha2CodeByAlpha2Code, getCountryAlpha2CodeByAlpha3Code, getCountryAlpha2CodeByCitizenship, getCountryAlpha2CodeByCountryCode, getCountryAlpha2CodeByCountryName, getCountryAlpha3CodeByAlpha2Code, getCountryAlpha3CodeByAlpha3Code, getCountryAlpha3CodeByCountryCode, getCountryAlpha3CodeByCountryName, getCountryCodeByAlpha2Code, getCountryCodeByAlpha3Code, getCountryCodeByCountryCode, getCountryCodeByCountryName, getCountryNameByAlpha2Code, getCountryNameByAlpha3Code, getCountryNameByCountryCode, getCountryNameByCountryName, getCountrySubDivisionByAlpha2CodeAndName, getCountrySubDivisionCodeBySubDivisionName, getCountrySubDivisionNameBySubDivisionCode, getCountrySubDivisionsByAlpha2Code, getDocumentFileFormatFromExtension, isBoolean, isDate, isFunction, isFutureUnixTimestamp, isIpInRange, isIpInRanges, isMissing, isNumber, isObject, isString, isValidIp, isValidIpRange, isValidIpRanges, isValidUUID, notMissing, safeParseToBoolean, safeParseToDateTime, safeParseToDateTimeString, safeParseToNumber, safeParseToString, z, zStrictObject };
|
|
204
|
+
export { NON_BACKGROUND_LOGS_SOURCE_TYPES, NormalizedKeyMap, RequestSourceType, type ZodType, calculateNextAnniversary, calculateYearsElapsed, dateHasPassed, decodeFromBase64, deepCopy, delay, encodeToBase64, exponentialBackoffInMS, generateActionRunId, generateEventId, generateRequestId, generateSamlAssertion, getContentHash, getCountryAlpha2CodeByAlpha2Code, getCountryAlpha2CodeByAlpha3Code, getCountryAlpha2CodeByCitizenship, getCountryAlpha2CodeByCountryCode, getCountryAlpha2CodeByCountryName, getCountryAlpha3CodeByAlpha2Code, getCountryAlpha3CodeByAlpha3Code, getCountryAlpha3CodeByCountryCode, getCountryAlpha3CodeByCountryName, getCountryCodeByAlpha2Code, getCountryCodeByAlpha3Code, getCountryCodeByCountryCode, getCountryCodeByCountryName, getCountryNameByAlpha2Code, getCountryNameByAlpha3Code, getCountryNameByCountryCode, getCountryNameByCountryName, getCountrySubDivisionByAlpha2CodeAndName, getCountrySubDivisionCodeBySubDivisionName, getCountrySubDivisionNameBySubDivisionCode, getCountrySubDivisionsByAlpha2Code, getDocumentFileFormatFromExtension, isBoolean, isDate, isFunction, isFutureUnixTimestamp, isIpInRange, isIpInRanges, isMissing, isNumber, isObject, isString, isValidIp, isValidIpRange, isValidIpRanges, isValidUUID, notMissing, safeParseToBoolean, safeParseToDateTime, safeParseToDateTimeString, safeParseToNumber, safeParseToString, z, zStrictObject };
|