@shushed/helpers 0.0.199 → 0.0.200-v2-20251125135041
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/cjs/dist-dereferenced/asset.js +4 -0
- package/dist/cjs/dist-dereferenced/category.js +4 -0
- package/dist/cjs/dist-dereferenced/country.js +4 -0
- package/dist/cjs/dist-dereferenced/currency.js +4 -0
- package/dist/cjs/dist-dereferenced/customer-segment.js +4 -0
- package/dist/cjs/dist-dereferenced/development-colour.js +4 -0
- package/dist/cjs/dist-dereferenced/index.js +69 -0
- package/dist/cjs/dist-dereferenced/marketing-preferences.js +4 -0
- package/dist/cjs/dist-dereferenced/messages/ean-change.js +4 -0
- package/dist/cjs/dist-dereferenced/messages/index.js +50 -0
- package/dist/cjs/dist-dereferenced/messages/order/delivered.js +4 -0
- package/dist/cjs/dist-dereferenced/messages/order/index.js +18 -0
- package/dist/cjs/dist-dereferenced/messages/order/new.js +4 -0
- package/dist/cjs/dist-dereferenced/messages/order/processed.js +4 -0
- package/dist/cjs/dist-dereferenced/messages/order/return-initiated.js +4 -0
- package/dist/cjs/dist-dereferenced/messages/order/returned.js +4 -0
- package/dist/cjs/dist-dereferenced/messages/order/shipped.js +4 -0
- package/dist/cjs/dist-dereferenced/messages/price-change.js +4 -0
- package/dist/cjs/dist-dereferenced/messages/product-category.js +4 -0
- package/dist/cjs/dist-dereferenced/messages/product-draft.js +4 -0
- package/dist/cjs/dist-dereferenced/messages/product.js +4 -0
- package/dist/cjs/dist-dereferenced/money.js +4 -0
- package/dist/cjs/dist-dereferenced/order/address.js +4 -0
- package/dist/cjs/dist-dereferenced/order/customer.js +4 -0
- package/dist/cjs/dist-dereferenced/order/index.js +51 -0
- package/dist/cjs/dist-dereferenced/order/item.js +4 -0
- package/dist/cjs/dist-dereferenced/order/orderMain.js +4 -0
- package/dist/cjs/dist-dereferenced/order/payment.js +4 -0
- package/dist/cjs/dist-dereferenced/order/shipment/index.js +45 -0
- package/dist/cjs/dist-dereferenced/order/shipment/item/index.js +11 -0
- package/dist/cjs/dist-dereferenced/order/shipment/item/itemMain.js +4 -0
- package/dist/cjs/dist-dereferenced/order/shipment/item/returned.js +4 -0
- package/dist/cjs/dist-dereferenced/order/shipment/pos/index.js +13 -0
- package/dist/cjs/dist-dereferenced/order/shipment/pos/outbound.js +4 -0
- package/dist/cjs/dist-dereferenced/order/shipment/pos/posMain.js +4 -0
- package/dist/cjs/dist-dereferenced/order/shipment/pos/return.js +4 -0
- package/dist/cjs/dist-dereferenced/order/shipment/shipmentMain.js +4 -0
- package/dist/cjs/dist-dereferenced/order/shipment/shipped/index.js +13 -0
- package/dist/cjs/dist-dereferenced/order/shipment/shipped/outbound.js +4 -0
- package/dist/cjs/dist-dereferenced/order/shipment/shipped/return.js +4 -0
- package/dist/cjs/dist-dereferenced/order/shipment/shipped/shippedMain.js +4 -0
- package/dist/cjs/dist-dereferenced/price.js +4 -0
- package/dist/cjs/dist-dereferenced/product-category.js +4 -0
- package/dist/cjs/dist-dereferenced/product-draft.js +4 -0
- package/dist/cjs/dist-dereferenced/product.js +4 -0
- package/dist/cjs/dist-dereferenced/stock.js +4 -0
- package/dist/cjs/dist-dereferenced/total.js +4 -0
- package/dist/cjs/dist-types/asset.js +2 -0
- package/dist/cjs/dist-types/category.js +2 -0
- package/dist/cjs/dist-types/country.js +2 -0
- package/dist/cjs/dist-types/currency.js +2 -0
- package/dist/cjs/dist-types/customer-segment.js +2 -0
- package/dist/cjs/dist-types/development-colour.js +2 -0
- package/dist/cjs/dist-types/index.js +38 -0
- package/dist/cjs/dist-types/marketing-preferences.js +2 -0
- package/dist/cjs/dist-types/messages/ean-change.js +2 -0
- package/dist/cjs/dist-types/messages/index.js +37 -0
- package/dist/cjs/dist-types/messages/order/delivered.js +2 -0
- package/dist/cjs/dist-types/messages/order/index.js +2 -0
- package/dist/cjs/dist-types/messages/order/new.js +2 -0
- package/dist/cjs/dist-types/messages/order/processed.js +2 -0
- package/dist/cjs/dist-types/messages/order/return-initiated.js +2 -0
- package/dist/cjs/dist-types/messages/order/returned.js +2 -0
- package/dist/cjs/dist-types/messages/order/shipped.js +2 -0
- package/dist/cjs/dist-types/messages/price-change.js +2 -0
- package/dist/cjs/dist-types/messages/product-category.js +2 -0
- package/dist/cjs/dist-types/messages/product-draft.js +2 -0
- package/dist/cjs/dist-types/messages/product.js +2 -0
- package/dist/cjs/dist-types/money.js +2 -0
- package/dist/cjs/dist-types/order/address.js +2 -0
- package/dist/cjs/dist-types/order/customer.js +2 -0
- package/dist/cjs/dist-types/order/index.js +37 -0
- package/dist/cjs/dist-types/order/item.js +2 -0
- package/dist/cjs/dist-types/order/orderMain.js +2 -0
- package/dist/cjs/dist-types/order/payment.js +2 -0
- package/dist/cjs/dist-types/order/shipment/index.js +39 -0
- package/dist/cjs/dist-types/order/shipment/item/index.js +2 -0
- package/dist/cjs/dist-types/order/shipment/item/itemMain.js +2 -0
- package/dist/cjs/dist-types/order/shipment/item/returned.js +2 -0
- package/dist/cjs/dist-types/order/shipment/pos/index.js +2 -0
- package/dist/cjs/dist-types/order/shipment/pos/outbound.js +2 -0
- package/dist/cjs/dist-types/order/shipment/pos/posMain.js +2 -0
- package/dist/cjs/dist-types/order/shipment/pos/return.js +2 -0
- package/dist/cjs/dist-types/order/shipment/shipmentMain.js +2 -0
- package/dist/cjs/dist-types/order/shipment/shipped/index.js +2 -0
- package/dist/cjs/dist-types/order/shipment/shipped/outbound.js +2 -0
- package/dist/cjs/dist-types/order/shipment/shipped/return.js +2 -0
- package/dist/cjs/dist-types/order/shipment/shipped/shippedMain.js +2 -0
- package/dist/cjs/dist-types/price.js +2 -0
- package/dist/cjs/dist-types/product-category.js +2 -0
- package/dist/cjs/dist-types/product-draft.js +2 -0
- package/dist/cjs/dist-types/product.js +2 -0
- package/dist/cjs/dist-types/stock.js +2 -0
- package/dist/cjs/dist-types/total.js +2 -0
- package/dist/cjs/index.js +39 -0
- package/dist/cjs/src-public/airtable.js +590 -0
- package/dist/cjs/src-public/bigquery.js +59 -0
- package/dist/cjs/src-public/cloudtasks.js +207 -0
- package/dist/cjs/src-public/dato.js +260 -0
- package/dist/cjs/src-public/env.js +897 -0
- package/dist/cjs/src-public/getEventTime.js +28 -0
- package/dist/cjs/src-public/index.js +50 -0
- package/dist/cjs/src-public/ipValidation.js +167 -0
- package/dist/cjs/src-public/jwks.js +108 -0
- package/dist/cjs/src-public/pubsub.js +423 -0
- package/dist/cjs/src-public/rateLimit.js +140 -0
- package/dist/cjs/src-public/redisClient.js +44 -0
- package/dist/cjs/src-public/runtime.js +135 -0
- package/dist/cjs/src-public/sanitize.js +25 -0
- package/dist/cjs/src-public/scheduler.js +247 -0
- package/dist/cjs/src-public/secret.js +16 -0
- package/dist/cjs/src-public/setHeaders.js +16 -0
- package/dist/cjs/src-public/types.js +2 -0
- package/dist/cjs/src-public/utils.js +454 -0
- package/dist/cjs/src-public/validate.js +40 -0
- package/dist/package.json +6 -3
- package/dist/types/dist-dereferenced/asset.d.ts +51 -0
- package/dist/types/dist-dereferenced/category.d.ts +58 -0
- package/dist/types/dist-dereferenced/country.d.ts +8 -0
- package/dist/types/dist-dereferenced/currency.d.ts +8 -0
- package/dist/types/dist-dereferenced/customer-segment.d.ts +26 -0
- package/dist/types/dist-dereferenced/development-colour.d.ts +114 -0
- package/dist/types/dist-dereferenced/index.d.ts +16 -0
- package/dist/types/dist-dereferenced/marketing-preferences.d.ts +31 -0
- package/dist/types/dist-dereferenced/messages/ean-change.d.ts +17 -0
- package/dist/types/dist-dereferenced/messages/index.d.ts +6 -0
- package/dist/types/dist-dereferenced/messages/order/delivered.d.ts +3414 -0
- package/dist/types/dist-dereferenced/messages/order/index.d.ts +6 -0
- package/dist/types/dist-dereferenced/messages/order/new.d.ts +3414 -0
- package/dist/types/dist-dereferenced/messages/order/processed.d.ts +3408 -0
- package/dist/types/dist-dereferenced/messages/order/return-initiated.d.ts +3414 -0
- package/dist/types/dist-dereferenced/messages/order/returned.d.ts +3413 -0
- package/dist/types/dist-dereferenced/messages/order/shipped.d.ts +3412 -0
- package/dist/types/dist-dereferenced/messages/price-change.d.ts +67 -0
- package/dist/types/dist-dereferenced/messages/product-category.d.ts +33 -0
- package/dist/types/dist-dereferenced/messages/product-draft.d.ts +589 -0
- package/dist/types/dist-dereferenced/messages/product.d.ts +628 -0
- package/dist/types/dist-dereferenced/money.d.ts +41 -0
- package/dist/types/dist-dereferenced/order/address.d.ts +98 -0
- package/dist/types/dist-dereferenced/order/customer.d.ts +309 -0
- package/dist/types/dist-dereferenced/order/index.d.ts +3404 -0
- package/dist/types/dist-dereferenced/order/item.d.ts +336 -0
- package/dist/types/dist-dereferenced/order/orderMain.d.ts +3399 -0
- package/dist/types/dist-dereferenced/order/payment.d.ts +94 -0
- package/dist/types/dist-dereferenced/order/shipment/index.d.ts +253 -0
- package/dist/types/dist-dereferenced/order/shipment/item/index.d.ts +19 -0
- package/dist/types/dist-dereferenced/order/shipment/item/itemMain.d.ts +18 -0
- package/dist/types/dist-dereferenced/order/shipment/item/returned.d.ts +34 -0
- package/dist/types/dist-dereferenced/order/shipment/pos/index.d.ts +282 -0
- package/dist/types/dist-dereferenced/order/shipment/pos/outbound.d.ts +320 -0
- package/dist/types/dist-dereferenced/order/shipment/pos/posMain.d.ts +280 -0
- package/dist/types/dist-dereferenced/order/shipment/pos/return.d.ts +331 -0
- package/dist/types/dist-dereferenced/order/shipment/shipmentMain.d.ts +250 -0
- package/dist/types/dist-dereferenced/order/shipment/shipped/index.d.ts +288 -0
- package/dist/types/dist-dereferenced/order/shipment/shipped/outbound.d.ts +286 -0
- package/dist/types/dist-dereferenced/order/shipment/shipped/return.d.ts +287 -0
- package/dist/types/dist-dereferenced/order/shipment/shipped/shippedMain.d.ts +286 -0
- package/dist/types/dist-dereferenced/price.d.ts +58 -0
- package/dist/types/dist-dereferenced/product-category.d.ts +24 -0
- package/dist/types/dist-dereferenced/product-draft.d.ts +580 -0
- package/dist/types/dist-dereferenced/product.d.ts +619 -0
- package/dist/types/dist-dereferenced/stock.d.ts +74 -0
- package/dist/types/dist-dereferenced/total.d.ts +172 -0
- package/dist/types/dist-types/asset.d.ts +16 -0
- package/dist/types/dist-types/category.d.ts +20 -0
- package/dist/types/dist-types/country.d.ts +2 -0
- package/dist/types/dist-types/currency.d.ts +2 -0
- package/dist/types/dist-types/customer-segment.d.ts +6 -0
- package/dist/types/dist-types/development-colour.d.ts +31 -0
- package/dist/types/dist-types/index.d.ts +16 -0
- package/dist/types/dist-types/marketing-preferences.d.ts +9 -0
- package/dist/types/dist-types/messages/ean-change.d.ts +5 -0
- package/dist/types/dist-types/messages/index.d.ts +6 -0
- package/dist/types/dist-types/messages/order/delivered.d.ts +292 -0
- package/dist/types/dist-types/messages/order/index.d.ts +6 -0
- package/dist/types/dist-types/messages/order/new.d.ts +292 -0
- package/dist/types/dist-types/messages/order/processed.d.ts +292 -0
- package/dist/types/dist-types/messages/order/return-initiated.d.ts +292 -0
- package/dist/types/dist-types/messages/order/returned.d.ts +293 -0
- package/dist/types/dist-types/messages/order/shipped.d.ts +293 -0
- package/dist/types/dist-types/messages/price-change.d.ts +16 -0
- package/dist/types/dist-types/messages/product-category.d.ts +7 -0
- package/dist/types/dist-types/messages/product-draft.d.ts +136 -0
- package/dist/types/dist-types/messages/product.d.ts +144 -0
- package/dist/types/dist-types/money.d.ts +11 -0
- package/dist/types/dist-types/order/address.d.ts +27 -0
- package/dist/types/dist-types/order/customer.d.ts +81 -0
- package/dist/types/dist-types/order/index.d.ts +8 -0
- package/dist/types/dist-types/order/item.d.ts +85 -0
- package/dist/types/dist-types/order/orderMain.d.ts +289 -0
- package/dist/types/dist-types/order/payment.d.ts +26 -0
- package/dist/types/dist-types/order/shipment/index.d.ts +6 -0
- package/dist/types/dist-types/order/shipment/item/index.d.ts +4 -0
- package/dist/types/dist-types/order/shipment/item/itemMain.d.ts +6 -0
- package/dist/types/dist-types/order/shipment/item/returned.d.ts +11 -0
- package/dist/types/dist-types/order/shipment/pos/index.d.ts +5 -0
- package/dist/types/dist-types/order/shipment/pos/outbound.d.ts +76 -0
- package/dist/types/dist-types/order/shipment/pos/posMain.d.ts +71 -0
- package/dist/types/dist-types/order/shipment/pos/return.d.ts +75 -0
- package/dist/types/dist-types/order/shipment/shipmentMain.d.ts +62 -0
- package/dist/types/dist-types/order/shipment/shipped/index.d.ts +5 -0
- package/dist/types/dist-types/order/shipment/shipped/outbound.d.ts +68 -0
- package/dist/types/dist-types/order/shipment/shipped/return.d.ts +68 -0
- package/dist/types/dist-types/order/shipment/shipped/shippedMain.d.ts +69 -0
- package/dist/types/dist-types/price.d.ts +15 -0
- package/dist/types/dist-types/product-category.d.ts +6 -0
- package/dist/types/dist-types/product-draft.d.ts +135 -0
- package/dist/types/dist-types/product.d.ts +143 -0
- package/dist/types/dist-types/stock.d.ts +19 -0
- package/dist/types/dist-types/total.d.ts +44 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/src-public/airtable.d.ts +220 -0
- package/dist/types/src-public/bigquery.d.ts +17 -0
- package/dist/types/src-public/cloudtasks.d.ts +74 -0
- package/dist/types/src-public/dato.d.ts +55 -0
- package/dist/types/src-public/env.d.ts +144 -0
- package/dist/types/src-public/getEventTime.d.ts +1 -0
- package/dist/types/src-public/index.d.ts +16 -0
- package/dist/types/src-public/ipValidation.d.ts +15 -0
- package/dist/types/src-public/jwks.d.ts +15 -0
- package/dist/types/src-public/pubsub.d.ts +95 -0
- package/dist/types/src-public/rateLimit.d.ts +21 -0
- package/dist/types/src-public/redisClient.d.ts +6 -0
- package/dist/types/src-public/runtime.d.ts +56 -0
- package/dist/types/src-public/sanitize.d.ts +4 -0
- package/dist/types/src-public/scheduler.d.ts +71 -0
- package/dist/types/src-public/secret.d.ts +6 -0
- package/dist/types/src-public/setHeaders.d.ts +13 -0
- package/dist/types/src-public/types.d.ts +264 -0
- package/dist/types/src-public/utils.d.ts +101 -0
- package/dist/types/src-public/validate.d.ts +9 -0
- package/package.json +7 -4
- package/dist/index.d.ts +0 -34970
- package/dist/index.js +0 -112969
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type Currency = ("AFN" | "ALL" | "DZD" | "USD" | "EUR" | "AOA" | "XCD" | "ARS" | "AMD" | "AWG" | "AUD" | "AZN" | "BSD" | "BHD" | "BDT" | "BBD" | "BYN" | "BZD" | "XOF" | "BMD" | "BTN" | "INR" | "BOB" | "BOV" | "BAM" | "BWP" | "NOK" | "BRL" | "BND" | "BGN" | "BIF" | "CVE" | "KHR" | "XAF" | "CAD" | "KYD" | "CLF" | "CLP" | "CNY" | "COP" | "COU" | "KMF" | "CDF" | "NZD" | "CRC" | "CUC" | "CUP" | "ANG" | "CZK" | "DKK" | "DJF" | "DOP" | "EGP" | "SVC" | "ERN" | "ETB" | "FKP" | "FJD" | "XPF" | "GMD" | "GEL" | "GHS" | "GIP" | "GTQ" | "GBP" | "GNF" | "GYD" | "HTG" | "HNL" | "HKD" | "HUF" | "ISK" | "IDR" | "XDR" | "IRR" | "IQD" | "ILS" | "JMD" | "JPY" | "JOD" | "KZT" | "KES" | "KPW" | "KRW" | "KWD" | "KGS" | "LAK" | "LBP" | "LSL" | "ZAR" | "LRD" | "LYD" | "CHF" | "MOP" | "MGA" | "MWK" | "MYR" | "MVR" | "MRU" | "MUR" | "XUA" | "MXN" | "MXV" | "MDL" | "MNT" | "MAD" | "MZN" | "MMK" | "NAD" | "NPR" | "NIO" | "NGN" | "OMR" | "PKR" | "PAB" | "PGK" | "PYG" | "PEN" | "PHP" | "PLN" | "QAR" | "MKD" | "RON" | "RUB" | "RWF" | "SHP" | "WST" | "STN" | "SAR" | "RSD" | "SCR" | "SLE" | "SGD" | "XSU" | "SBD" | "SOS" | "SSP" | "LKR" | "SDG" | "SRD" | "SZL" | "SEK" | "CHE" | "CHW" | "SYP" | "TWD" | "TJS" | "TZS" | "THB" | "TOP" | "TTD" | "TND" | "TRY" | "TMT" | "UGX" | "UAH" | "AED" | "USN" | "UYI" | "UYU" | "UZS" | "VUV" | "VEF" | "VED" | "VND" | "YER" | "ZMW" | "ZWL");
|
|
2
|
+
export type LCYCurrency = ("AFN" | "ALL" | "DZD" | "USD" | "EUR" | "AOA" | "XCD" | "ARS" | "AMD" | "AWG" | "AUD" | "AZN" | "BSD" | "BHD" | "BDT" | "BBD" | "BYN" | "BZD" | "XOF" | "BMD" | "BTN" | "INR" | "BOB" | "BOV" | "BAM" | "BWP" | "NOK" | "BRL" | "BND" | "BGN" | "BIF" | "CVE" | "KHR" | "XAF" | "CAD" | "KYD" | "CLF" | "CLP" | "CNY" | "COP" | "COU" | "KMF" | "CDF" | "NZD" | "CRC" | "CUC" | "CUP" | "ANG" | "CZK" | "DKK" | "DJF" | "DOP" | "EGP" | "SVC" | "ERN" | "ETB" | "FKP" | "FJD" | "XPF" | "GMD" | "GEL" | "GHS" | "GIP" | "GTQ" | "GBP" | "GNF" | "GYD" | "HTG" | "HNL" | "HKD" | "HUF" | "ISK" | "IDR" | "XDR" | "IRR" | "IQD" | "ILS" | "JMD" | "JPY" | "JOD" | "KZT" | "KES" | "KPW" | "KRW" | "KWD" | "KGS" | "LAK" | "LBP" | "LSL" | "ZAR" | "LRD" | "LYD" | "CHF" | "MOP" | "MGA" | "MWK" | "MYR" | "MVR" | "MRU" | "MUR" | "XUA" | "MXN" | "MXV" | "MDL" | "MNT" | "MAD" | "MZN" | "MMK" | "NAD" | "NPR" | "NIO" | "NGN" | "OMR" | "PKR" | "PAB" | "PGK" | "PYG" | "PEN" | "PHP" | "PLN" | "QAR" | "MKD" | "RON" | "RUB" | "RWF" | "SHP" | "WST" | "STN" | "SAR" | "RSD" | "SCR" | "SLE" | "SGD" | "XSU" | "SBD" | "SOS" | "SSP" | "LKR" | "SDG" | "SRD" | "SZL" | "SEK" | "CHE" | "CHW" | "SYP" | "TWD" | "TJS" | "TZS" | "THB" | "TOP" | "TTD" | "TND" | "TRY" | "TMT" | "UGX" | "UAH" | "AED" | "USN" | "UYI" | "UYU" | "UZS" | "VUV" | "VEF" | "VED" | "VND" | "YER" | "ZMW" | "ZWL");
|
|
3
|
+
export interface __MainSchema {
|
|
4
|
+
style_id: string;
|
|
5
|
+
colour_id: string;
|
|
6
|
+
size_code: string;
|
|
7
|
+
quantity: number;
|
|
8
|
+
location_code: string;
|
|
9
|
+
unit_cost: (Money | null);
|
|
10
|
+
}
|
|
11
|
+
export interface Money {
|
|
12
|
+
value: number;
|
|
13
|
+
decimal_places: number;
|
|
14
|
+
currency: Currency;
|
|
15
|
+
lcy_value: number;
|
|
16
|
+
lcy_currency: LCYCurrency;
|
|
17
|
+
lcy_decimal_places: number;
|
|
18
|
+
}
|
|
19
|
+
export default __MainSchema;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export type Currency = ("AFN" | "ALL" | "DZD" | "USD" | "EUR" | "AOA" | "XCD" | "ARS" | "AMD" | "AWG" | "AUD" | "AZN" | "BSD" | "BHD" | "BDT" | "BBD" | "BYN" | "BZD" | "XOF" | "BMD" | "BTN" | "INR" | "BOB" | "BOV" | "BAM" | "BWP" | "NOK" | "BRL" | "BND" | "BGN" | "BIF" | "CVE" | "KHR" | "XAF" | "CAD" | "KYD" | "CLF" | "CLP" | "CNY" | "COP" | "COU" | "KMF" | "CDF" | "NZD" | "CRC" | "CUC" | "CUP" | "ANG" | "CZK" | "DKK" | "DJF" | "DOP" | "EGP" | "SVC" | "ERN" | "ETB" | "FKP" | "FJD" | "XPF" | "GMD" | "GEL" | "GHS" | "GIP" | "GTQ" | "GBP" | "GNF" | "GYD" | "HTG" | "HNL" | "HKD" | "HUF" | "ISK" | "IDR" | "XDR" | "IRR" | "IQD" | "ILS" | "JMD" | "JPY" | "JOD" | "KZT" | "KES" | "KPW" | "KRW" | "KWD" | "KGS" | "LAK" | "LBP" | "LSL" | "ZAR" | "LRD" | "LYD" | "CHF" | "MOP" | "MGA" | "MWK" | "MYR" | "MVR" | "MRU" | "MUR" | "XUA" | "MXN" | "MXV" | "MDL" | "MNT" | "MAD" | "MZN" | "MMK" | "NAD" | "NPR" | "NIO" | "NGN" | "OMR" | "PKR" | "PAB" | "PGK" | "PYG" | "PEN" | "PHP" | "PLN" | "QAR" | "MKD" | "RON" | "RUB" | "RWF" | "SHP" | "WST" | "STN" | "SAR" | "RSD" | "SCR" | "SLE" | "SGD" | "XSU" | "SBD" | "SOS" | "SSP" | "LKR" | "SDG" | "SRD" | "SZL" | "SEK" | "CHE" | "CHW" | "SYP" | "TWD" | "TJS" | "TZS" | "THB" | "TOP" | "TTD" | "TND" | "TRY" | "TMT" | "UGX" | "UAH" | "AED" | "USN" | "UYI" | "UYU" | "UZS" | "VUV" | "VEF" | "VED" | "VND" | "YER" | "ZMW" | "ZWL");
|
|
2
|
+
export type LCYCurrency = ("AFN" | "ALL" | "DZD" | "USD" | "EUR" | "AOA" | "XCD" | "ARS" | "AMD" | "AWG" | "AUD" | "AZN" | "BSD" | "BHD" | "BDT" | "BBD" | "BYN" | "BZD" | "XOF" | "BMD" | "BTN" | "INR" | "BOB" | "BOV" | "BAM" | "BWP" | "NOK" | "BRL" | "BND" | "BGN" | "BIF" | "CVE" | "KHR" | "XAF" | "CAD" | "KYD" | "CLF" | "CLP" | "CNY" | "COP" | "COU" | "KMF" | "CDF" | "NZD" | "CRC" | "CUC" | "CUP" | "ANG" | "CZK" | "DKK" | "DJF" | "DOP" | "EGP" | "SVC" | "ERN" | "ETB" | "FKP" | "FJD" | "XPF" | "GMD" | "GEL" | "GHS" | "GIP" | "GTQ" | "GBP" | "GNF" | "GYD" | "HTG" | "HNL" | "HKD" | "HUF" | "ISK" | "IDR" | "XDR" | "IRR" | "IQD" | "ILS" | "JMD" | "JPY" | "JOD" | "KZT" | "KES" | "KPW" | "KRW" | "KWD" | "KGS" | "LAK" | "LBP" | "LSL" | "ZAR" | "LRD" | "LYD" | "CHF" | "MOP" | "MGA" | "MWK" | "MYR" | "MVR" | "MRU" | "MUR" | "XUA" | "MXN" | "MXV" | "MDL" | "MNT" | "MAD" | "MZN" | "MMK" | "NAD" | "NPR" | "NIO" | "NGN" | "OMR" | "PKR" | "PAB" | "PGK" | "PYG" | "PEN" | "PHP" | "PLN" | "QAR" | "MKD" | "RON" | "RUB" | "RWF" | "SHP" | "WST" | "STN" | "SAR" | "RSD" | "SCR" | "SLE" | "SGD" | "XSU" | "SBD" | "SOS" | "SSP" | "LKR" | "SDG" | "SRD" | "SZL" | "SEK" | "CHE" | "CHW" | "SYP" | "TWD" | "TJS" | "TZS" | "THB" | "TOP" | "TTD" | "TND" | "TRY" | "TMT" | "UGX" | "UAH" | "AED" | "USN" | "UYI" | "UYU" | "UZS" | "VUV" | "VEF" | "VED" | "VND" | "YER" | "ZMW" | "ZWL");
|
|
3
|
+
export type DiscountAmountPercent = number;
|
|
4
|
+
export interface __MainSchema {
|
|
5
|
+
amount_net: AmountNet;
|
|
6
|
+
amount_gross: AmountGross;
|
|
7
|
+
discount_amount_net: DiscountAmountNet;
|
|
8
|
+
discount_amount_gross: DiscountAmountGross;
|
|
9
|
+
discount_amount_percent: DiscountAmountPercent;
|
|
10
|
+
[k: string]: unknown;
|
|
11
|
+
}
|
|
12
|
+
export interface AmountNet {
|
|
13
|
+
value: number;
|
|
14
|
+
decimal_places: number;
|
|
15
|
+
currency: Currency;
|
|
16
|
+
lcy_value: number;
|
|
17
|
+
lcy_currency: LCYCurrency;
|
|
18
|
+
lcy_decimal_places: number;
|
|
19
|
+
}
|
|
20
|
+
export interface AmountGross {
|
|
21
|
+
value: number;
|
|
22
|
+
decimal_places: number;
|
|
23
|
+
currency: Currency;
|
|
24
|
+
lcy_value: number;
|
|
25
|
+
lcy_currency: LCYCurrency;
|
|
26
|
+
lcy_decimal_places: number;
|
|
27
|
+
}
|
|
28
|
+
export interface DiscountAmountNet {
|
|
29
|
+
value: number;
|
|
30
|
+
decimal_places: number;
|
|
31
|
+
currency: Currency;
|
|
32
|
+
lcy_value: number;
|
|
33
|
+
lcy_currency: LCYCurrency;
|
|
34
|
+
lcy_decimal_places: number;
|
|
35
|
+
}
|
|
36
|
+
export interface DiscountAmountGross {
|
|
37
|
+
value: number;
|
|
38
|
+
decimal_places: number;
|
|
39
|
+
currency: Currency;
|
|
40
|
+
lcy_value: number;
|
|
41
|
+
lcy_currency: LCYCurrency;
|
|
42
|
+
lcy_decimal_places: number;
|
|
43
|
+
}
|
|
44
|
+
export default __MainSchema;
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import Runtime, { Opts as RuntimeOpts } from './runtime';
|
|
2
|
+
declare class AirtableHelper<T extends Record<string, string>, K extends keyof T> extends Runtime {
|
|
3
|
+
baseId: string;
|
|
4
|
+
tableId: string;
|
|
5
|
+
apiKey: string;
|
|
6
|
+
dictionary: T;
|
|
7
|
+
primaryKeyFieldName: K;
|
|
8
|
+
primaryKeyWritable: boolean;
|
|
9
|
+
constructor(opts: RuntimeOpts, airtableOpts: {
|
|
10
|
+
baseId: string;
|
|
11
|
+
tableId: string;
|
|
12
|
+
apiKey: string;
|
|
13
|
+
dictionary: T;
|
|
14
|
+
primaryKeyFieldName: K;
|
|
15
|
+
primaryKeyWritable?: boolean;
|
|
16
|
+
});
|
|
17
|
+
static translateFields<T extends Record<string, string>, S extends {
|
|
18
|
+
fields: {
|
|
19
|
+
[key in T[keyof T]]: any;
|
|
20
|
+
};
|
|
21
|
+
}>(dictionary: T, y: S): S & {
|
|
22
|
+
fields: {
|
|
23
|
+
[key in keyof T]: any;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
createIfNotExist(payload: Partial<{
|
|
27
|
+
[key in keyof T]: any;
|
|
28
|
+
}> & {
|
|
29
|
+
[prumaryKeyFieldName in K]: string;
|
|
30
|
+
}): Promise<{
|
|
31
|
+
id: string;
|
|
32
|
+
fields: { [key in keyof T]: any; };
|
|
33
|
+
}>;
|
|
34
|
+
updateMultiple(payload: Array<Partial<{
|
|
35
|
+
[key in keyof T]: any;
|
|
36
|
+
}> & {
|
|
37
|
+
[prumaryKeyFieldName in K]: string;
|
|
38
|
+
}>, options?: {
|
|
39
|
+
fieldsToMergeOn?: Array<keyof T>;
|
|
40
|
+
primaryKeyWritable?: boolean;
|
|
41
|
+
}, callIdx?: number, collectedResult?: {
|
|
42
|
+
updatedRecords: Array<string>;
|
|
43
|
+
createdRecords: Array<string>;
|
|
44
|
+
records: Array<{
|
|
45
|
+
id: string;
|
|
46
|
+
fields: {
|
|
47
|
+
[key in T[keyof T]]: any;
|
|
48
|
+
};
|
|
49
|
+
} | Error>;
|
|
50
|
+
}): Promise<{
|
|
51
|
+
updatedRecords: Array<string>;
|
|
52
|
+
createdRecords: Array<string>;
|
|
53
|
+
records: Array<{
|
|
54
|
+
id: string;
|
|
55
|
+
fields: {
|
|
56
|
+
[key in T[keyof T]]: any;
|
|
57
|
+
};
|
|
58
|
+
} | Error>;
|
|
59
|
+
}>;
|
|
60
|
+
upsert(payload: Partial<{
|
|
61
|
+
[key in keyof T]: any;
|
|
62
|
+
}> & {
|
|
63
|
+
[prumaryKeyFieldName in K]: string;
|
|
64
|
+
}): Promise<{
|
|
65
|
+
id: string;
|
|
66
|
+
fields: { [key in keyof T]: any; };
|
|
67
|
+
}>;
|
|
68
|
+
static removePrimaryKey(x: any, primaryKeyFieldId: string): any;
|
|
69
|
+
static convertToDictionary<T extends Record<string, string>>(dictionary: T, x: Partial<{
|
|
70
|
+
[key in keyof T]: any;
|
|
71
|
+
}>): Partial<Record<T[keyof T], any>>;
|
|
72
|
+
createRecord(payload: Partial<{
|
|
73
|
+
[key in keyof T]: any;
|
|
74
|
+
}>): Promise<{
|
|
75
|
+
id: string;
|
|
76
|
+
fields: {
|
|
77
|
+
[key in keyof T]: any;
|
|
78
|
+
};
|
|
79
|
+
}>;
|
|
80
|
+
updateRecord(recordId: string, payload: Partial<{
|
|
81
|
+
[key in keyof T]: any;
|
|
82
|
+
}> & {
|
|
83
|
+
[prumaryKeyFieldName in K]: string;
|
|
84
|
+
}): Promise<{
|
|
85
|
+
id: string;
|
|
86
|
+
fields: {
|
|
87
|
+
[key in keyof T]: any;
|
|
88
|
+
};
|
|
89
|
+
}>;
|
|
90
|
+
getExistingRecord(payload: Partial<{
|
|
91
|
+
[key in keyof T]: any;
|
|
92
|
+
}> & {
|
|
93
|
+
[x in K]: string;
|
|
94
|
+
}): Promise<null | {
|
|
95
|
+
id: string;
|
|
96
|
+
fields: {
|
|
97
|
+
[key in keyof T]: any;
|
|
98
|
+
};
|
|
99
|
+
}>;
|
|
100
|
+
getExistingRecordById(id: string): Promise<{
|
|
101
|
+
id: string;
|
|
102
|
+
fields: {
|
|
103
|
+
[key in keyof T]: any;
|
|
104
|
+
};
|
|
105
|
+
}>;
|
|
106
|
+
getExistingRecords(formula?: string): Promise<Array<{
|
|
107
|
+
id: string;
|
|
108
|
+
fields: {
|
|
109
|
+
[key in keyof T]: any;
|
|
110
|
+
};
|
|
111
|
+
}>>;
|
|
112
|
+
getExistingRecordsByKeys(keys: Array<string>): Promise<Map<string, {
|
|
113
|
+
id: string;
|
|
114
|
+
fields: {
|
|
115
|
+
[key in keyof T]: any;
|
|
116
|
+
};
|
|
117
|
+
}>>;
|
|
118
|
+
pingWebhook(webhook: {
|
|
119
|
+
webhook: {
|
|
120
|
+
id: string;
|
|
121
|
+
};
|
|
122
|
+
}): Promise<void>;
|
|
123
|
+
getPayloads(opts: {
|
|
124
|
+
url: string;
|
|
125
|
+
}): Promise<{
|
|
126
|
+
result: any[];
|
|
127
|
+
unprocessed: {
|
|
128
|
+
url: string;
|
|
129
|
+
$$error?: any;
|
|
130
|
+
} | null;
|
|
131
|
+
nextToProcess: {
|
|
132
|
+
url: string;
|
|
133
|
+
} | null;
|
|
134
|
+
}>;
|
|
135
|
+
listPayloads(input: {
|
|
136
|
+
webhook: {
|
|
137
|
+
id: string;
|
|
138
|
+
};
|
|
139
|
+
}, startingCursor: number): Promise<{
|
|
140
|
+
result: any[];
|
|
141
|
+
cursor: number;
|
|
142
|
+
unprocessed: {
|
|
143
|
+
webhook: {
|
|
144
|
+
id: string;
|
|
145
|
+
};
|
|
146
|
+
} | null;
|
|
147
|
+
nextToProcess: {
|
|
148
|
+
webhook: {
|
|
149
|
+
id: string;
|
|
150
|
+
};
|
|
151
|
+
} | null;
|
|
152
|
+
}>;
|
|
153
|
+
getWebhooks(): Promise<AirtableWebhook[]>;
|
|
154
|
+
enableOrPauseWebhook({ webhookId, pause }: {
|
|
155
|
+
webhookId: string;
|
|
156
|
+
pause: boolean;
|
|
157
|
+
}): Promise<AirtableWebhook>;
|
|
158
|
+
pause(): Promise<{
|
|
159
|
+
webhookId: string;
|
|
160
|
+
} | {
|
|
161
|
+
webhookId: null;
|
|
162
|
+
}>;
|
|
163
|
+
resume(): Promise<{
|
|
164
|
+
webhookId: string;
|
|
165
|
+
} | {
|
|
166
|
+
webhookId: null;
|
|
167
|
+
}>;
|
|
168
|
+
getWebhook(): Promise<AirtableWebhook | null>;
|
|
169
|
+
private createNotificationUrl;
|
|
170
|
+
isValidSignature(secret: string, payload: string, signature: string): Promise<boolean>;
|
|
171
|
+
deleteWebhook(x?: string): Promise<boolean>;
|
|
172
|
+
webhookHasChanged(): Promise<boolean>;
|
|
173
|
+
updateOrCreateWebhook(): Promise<AirtableWebhook | {
|
|
174
|
+
areNotificationsEnabled: true;
|
|
175
|
+
id: string;
|
|
176
|
+
macSecretBase64: string;
|
|
177
|
+
expirationTime: string;
|
|
178
|
+
}>;
|
|
179
|
+
}
|
|
180
|
+
export default AirtableHelper;
|
|
181
|
+
type AirtableWebhook = {
|
|
182
|
+
areNotificationsEnabled: boolean;
|
|
183
|
+
cursorForNextPayload: number;
|
|
184
|
+
expirationTime: string;
|
|
185
|
+
id: string;
|
|
186
|
+
isHookEnabled: true;
|
|
187
|
+
lastNotificationResult: {
|
|
188
|
+
completionTimestamp: string;
|
|
189
|
+
durationMs: number;
|
|
190
|
+
retryNumber: number;
|
|
191
|
+
success: true;
|
|
192
|
+
};
|
|
193
|
+
lastSuccessfulNotificationTime: string;
|
|
194
|
+
notificationUrl: string;
|
|
195
|
+
specification: {
|
|
196
|
+
options: {
|
|
197
|
+
filters: {
|
|
198
|
+
dataTypes: Array<"tableData" | "tableFields" | "tableMetadata">;
|
|
199
|
+
recordChangeScope?: string;
|
|
200
|
+
changeTypes?: Array<"add" | "remove" | "update">;
|
|
201
|
+
fromSources?: Array<"client" | "publicApi" | "formSubmission" | "formPageSubmission" | "automation" | "system" | "sync" | "anonymousUser" | "unknown">;
|
|
202
|
+
sourceOptions?: {
|
|
203
|
+
formPageSubmission?: {
|
|
204
|
+
pageId?: string;
|
|
205
|
+
};
|
|
206
|
+
formSubmission?: {
|
|
207
|
+
viewId?: string;
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
watchDataInFieldIds?: Array<string>;
|
|
211
|
+
watchSchemasOfFieldIds?: Array<string>;
|
|
212
|
+
};
|
|
213
|
+
includes?: {
|
|
214
|
+
includeCellValuesInFieldIds: Array<string> | "all";
|
|
215
|
+
includePreviousCellValues?: boolean;
|
|
216
|
+
includePreviousFieldDefinitions?: boolean;
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type BigQuery } from '@google-cloud/bigquery';
|
|
2
|
+
import Runtime, { Opts as RuntimeOpts } from './runtime';
|
|
3
|
+
interface ColumnSchema {
|
|
4
|
+
name: string;
|
|
5
|
+
type: string;
|
|
6
|
+
mode?: string;
|
|
7
|
+
}
|
|
8
|
+
declare class BigQueryHelper extends Runtime {
|
|
9
|
+
private bigQuery;
|
|
10
|
+
constructor(opts: RuntimeOpts, bigQuery: BigQuery);
|
|
11
|
+
createOrUpdate(opts: {
|
|
12
|
+
datasetId: string;
|
|
13
|
+
tableName: string;
|
|
14
|
+
incomingSchema: ColumnSchema[];
|
|
15
|
+
}): Promise<string>;
|
|
16
|
+
}
|
|
17
|
+
export default BigQueryHelper;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import Runtime from './runtime';
|
|
2
|
+
export interface CloudTasksHelperOpts {
|
|
3
|
+
projectId: string;
|
|
4
|
+
serviceAccount: string;
|
|
5
|
+
accessToken: string;
|
|
6
|
+
envName: string;
|
|
7
|
+
workflowId: string;
|
|
8
|
+
triggerId: string;
|
|
9
|
+
url: string;
|
|
10
|
+
}
|
|
11
|
+
export interface CreateTaskOpts {
|
|
12
|
+
topicName: string;
|
|
13
|
+
httpTarget: {
|
|
14
|
+
uri?: string;
|
|
15
|
+
httpMethod?: 'POST' | 'GET' | 'PUT' | 'DELETE';
|
|
16
|
+
headers?: Record<string, string>;
|
|
17
|
+
body?: any;
|
|
18
|
+
};
|
|
19
|
+
extraQuery?: Record<string, string>;
|
|
20
|
+
scheduleSeconds?: number;
|
|
21
|
+
doNotCreateIfExists?: string;
|
|
22
|
+
deleteExistingTasks?: boolean;
|
|
23
|
+
repeatCount?: number;
|
|
24
|
+
}
|
|
25
|
+
export interface GcpQueue {
|
|
26
|
+
name: string;
|
|
27
|
+
retryConfig?: {
|
|
28
|
+
maxAttempts?: number;
|
|
29
|
+
maxRetryDuration?: string;
|
|
30
|
+
minBackoff?: string;
|
|
31
|
+
maxBackoff?: string;
|
|
32
|
+
maxDoublings?: number;
|
|
33
|
+
};
|
|
34
|
+
rateLimits?: {
|
|
35
|
+
maxDispatchesPerSecond?: number;
|
|
36
|
+
maxConcurrentDispatches?: number;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export interface GcpTask {
|
|
40
|
+
name: string;
|
|
41
|
+
scheduleTime?: string;
|
|
42
|
+
httpRequest?: {
|
|
43
|
+
httpMethod?: string;
|
|
44
|
+
url?: string;
|
|
45
|
+
headers?: Record<string, string>;
|
|
46
|
+
body?: string;
|
|
47
|
+
oidcToken?: {
|
|
48
|
+
serviceAccountEmail: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
export interface GcpListTasksResponse {
|
|
53
|
+
tasks?: GcpTask[];
|
|
54
|
+
}
|
|
55
|
+
export default class CloudTasksHelper extends Runtime {
|
|
56
|
+
private projectId;
|
|
57
|
+
private serviceAccount;
|
|
58
|
+
private accessToken;
|
|
59
|
+
envName: string;
|
|
60
|
+
workflowId: string;
|
|
61
|
+
triggerId: string;
|
|
62
|
+
private location;
|
|
63
|
+
constructor(opts: CloudTasksHelperOpts);
|
|
64
|
+
private getQueueName;
|
|
65
|
+
private getQueuePath;
|
|
66
|
+
private getQueueApiUrl;
|
|
67
|
+
private getLocationApiUrl;
|
|
68
|
+
getQueue(topicName: string): Promise<GcpQueue | null>;
|
|
69
|
+
createOrUpdateQueue(topicName: string, retryConfig?: Required<GcpQueue['retryConfig']>, rateLimits?: Required<GcpQueue['rateLimits']>): Promise<void>;
|
|
70
|
+
private listTasks;
|
|
71
|
+
private deleteTask;
|
|
72
|
+
create(opts: CreateTaskOpts): Promise<false | string[]>;
|
|
73
|
+
delete(topicName: string): Promise<boolean>;
|
|
74
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import Runtime, { Opts as RuntimeOpts } from './runtime';
|
|
2
|
+
interface DatoHelperOptions {
|
|
3
|
+
apiToken: string;
|
|
4
|
+
baseUrl?: string;
|
|
5
|
+
}
|
|
6
|
+
interface UploadResult {
|
|
7
|
+
success: boolean;
|
|
8
|
+
upload: string;
|
|
9
|
+
assetId?: string;
|
|
10
|
+
}
|
|
11
|
+
export default class DatoHelper extends Runtime {
|
|
12
|
+
private apiToken;
|
|
13
|
+
private baseUrl;
|
|
14
|
+
constructor(opts: RuntimeOpts, datoOpts: DatoHelperOptions);
|
|
15
|
+
private requestUploadParameters;
|
|
16
|
+
private uploadToStorageBucket;
|
|
17
|
+
private createAssetFromUpload;
|
|
18
|
+
private checkJobResult;
|
|
19
|
+
private waitForJobCompletion;
|
|
20
|
+
uploadFromUrl(options: {
|
|
21
|
+
url: string;
|
|
22
|
+
copyright: string;
|
|
23
|
+
author: string;
|
|
24
|
+
notes?: string;
|
|
25
|
+
tags: string[];
|
|
26
|
+
title: string;
|
|
27
|
+
alt: string;
|
|
28
|
+
filename?: string;
|
|
29
|
+
skipCreationIfAlreadyExists?: boolean;
|
|
30
|
+
uploadCollectionId?: string;
|
|
31
|
+
}): Promise<UploadResult>;
|
|
32
|
+
uploadFromFile(options: {
|
|
33
|
+
filePath: string;
|
|
34
|
+
copyright: string;
|
|
35
|
+
author: string;
|
|
36
|
+
notes?: string;
|
|
37
|
+
tags: string[];
|
|
38
|
+
title: string;
|
|
39
|
+
alt: string;
|
|
40
|
+
filename?: string;
|
|
41
|
+
skipCreationIfAlreadyExists?: boolean;
|
|
42
|
+
uploadCollectionId?: string;
|
|
43
|
+
}): Promise<UploadResult>;
|
|
44
|
+
getUploadCollections(): Promise<any>;
|
|
45
|
+
findUploadCollectionByLabel(label: string): Promise<any>;
|
|
46
|
+
static buildUrl(asset: string, opts: {
|
|
47
|
+
overrideExisting: boolean;
|
|
48
|
+
width?: number;
|
|
49
|
+
height?: number;
|
|
50
|
+
crop?: 'top' | 'bottom' | 'left' | 'right' | 'faces' | 'entropy' | 'edges' | 'focalpoint' | (string & {});
|
|
51
|
+
quality?: number;
|
|
52
|
+
format?: 'jpg' | 'pjpg' | 'png' | 'webp' | 'avif' | 'gif' | 'jxl' | 'jp2' | 'jxr' | 'json' | 'blurhash' | (string & {});
|
|
53
|
+
}): string;
|
|
54
|
+
}
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { IncomingMessage } from "http";
|
|
2
|
+
import { type PubSub } from "@google-cloud/pubsub";
|
|
3
|
+
import { RateLimiterRedis } from "rate-limiter-flexible";
|
|
4
|
+
import PubSubHelper from "./pubsub";
|
|
5
|
+
import Runtime, { Opts as RuntimeOpts } from './runtime';
|
|
6
|
+
import { RNConfiguration } from "./types";
|
|
7
|
+
declare global {
|
|
8
|
+
var HUSH_PUBSUB_INSTANCE: PubSub | undefined;
|
|
9
|
+
}
|
|
10
|
+
type Level = 'env' | 'workflow' | 'trigger';
|
|
11
|
+
type SetOptions = {
|
|
12
|
+
ephemeralMs?: number;
|
|
13
|
+
ignoreStores?: Array<'redis' | 'global'>;
|
|
14
|
+
encrypted: boolean;
|
|
15
|
+
encryptionKey?: string | undefined;
|
|
16
|
+
};
|
|
17
|
+
type GetOptions = {
|
|
18
|
+
isEphemeral?: boolean;
|
|
19
|
+
encrypted?: boolean;
|
|
20
|
+
encryptionKey?: string | undefined;
|
|
21
|
+
expirationMarginMs?: number;
|
|
22
|
+
store?: 'inMemory' | 'global' | 'redis';
|
|
23
|
+
};
|
|
24
|
+
type ValueDetails = {
|
|
25
|
+
createdAt: number;
|
|
26
|
+
expiresAt: number;
|
|
27
|
+
value: string;
|
|
28
|
+
valid: boolean;
|
|
29
|
+
fetch?: () => Promise<string>;
|
|
30
|
+
};
|
|
31
|
+
declare global {
|
|
32
|
+
var IN_MEMORY_REF: undefined | {
|
|
33
|
+
env: Record<string, Record<string, string>>;
|
|
34
|
+
workflow: Record<string, Record<string, string>>;
|
|
35
|
+
trigger: Record<string, Record<string, string>>;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
declare class EnvEngine extends Runtime {
|
|
39
|
+
globalInMemoryRef: {
|
|
40
|
+
env: Record<string, string>;
|
|
41
|
+
workflow: Record<string, string>;
|
|
42
|
+
trigger: Record<string, string>;
|
|
43
|
+
};
|
|
44
|
+
inMemoryRef: {
|
|
45
|
+
env: Record<string, string>;
|
|
46
|
+
workflow: Record<string, string>;
|
|
47
|
+
trigger: Record<string, string>;
|
|
48
|
+
};
|
|
49
|
+
private docRef;
|
|
50
|
+
private store;
|
|
51
|
+
private _envCache;
|
|
52
|
+
private _lockRateLimiter;
|
|
53
|
+
constructor(opts: Runtime | RuntimeOpts, _?: any);
|
|
54
|
+
private initializeDocRef;
|
|
55
|
+
set(envs: Array<{
|
|
56
|
+
name: string;
|
|
57
|
+
value: string;
|
|
58
|
+
}>, level: Level, options?: SetOptions): Promise<void>;
|
|
59
|
+
set(envs: Array<{
|
|
60
|
+
name: string;
|
|
61
|
+
value: string;
|
|
62
|
+
}>, level: Level, encryptWithValue?: string): Promise<void>;
|
|
63
|
+
private getFirestoreStore;
|
|
64
|
+
get<T extends ReadonlyArray<string>>(keys: T, level?: Level, options?: GetOptions): Promise<{
|
|
65
|
+
[K in T[number]]: string;
|
|
66
|
+
}>;
|
|
67
|
+
get<T extends ReadonlyArray<string>>(keys: T, level?: Level, decryptWithValue?: string): Promise<{
|
|
68
|
+
[K in T[number]]: string;
|
|
69
|
+
}>;
|
|
70
|
+
get<M extends string, T extends readonly [M] = [M]>(key: M, level?: Level, options?: GetOptions): Promise<string>;
|
|
71
|
+
get<M extends string, T extends readonly [M] = [M]>(key: M, level?: Level, decryptWithValue?: string): Promise<string>;
|
|
72
|
+
_get<T extends ReadonlyArray<string>>(keysParsed: T, level: Level | undefined, options: GetOptions): Promise<{
|
|
73
|
+
[K in T[number]]: ValueDetails;
|
|
74
|
+
}>;
|
|
75
|
+
withGoogleAccessToken(): ReturnType<typeof this.with<string>>;
|
|
76
|
+
withGoogleIdentityToken(audience: {
|
|
77
|
+
workflowId: string;
|
|
78
|
+
triggerId: string;
|
|
79
|
+
}): ReturnType<typeof this.with<string>>;
|
|
80
|
+
resolveEnvName(envName: string): string;
|
|
81
|
+
checkGoogleIdentiyToken(accessToken: string, audience?: {
|
|
82
|
+
workflowId?: string;
|
|
83
|
+
triggerId?: string;
|
|
84
|
+
}, allowedServiceAccounts?: Array<string>): Promise<any>;
|
|
85
|
+
withSecret(key: string): ReturnType<typeof this.with<string>>;
|
|
86
|
+
with<M extends string>(key: M, level?: Level, options?: SetOptions & {
|
|
87
|
+
fetch?: () => Promise<M>;
|
|
88
|
+
}): <T>(fn: (value: M, requestCacheRefresh?: () => void) => Promise<T> | T) => Promise<T>;
|
|
89
|
+
pauseRespectfulNudge(subscriptionName: string, partialConfig?: Partial<{
|
|
90
|
+
workflowTriggerId: string;
|
|
91
|
+
pubSubProjectId: string;
|
|
92
|
+
}>): Promise<boolean>;
|
|
93
|
+
getRespectfulNudgeConfig(subscriptionName: string, rnPartialConfig: Partial<RNConfiguration>): RNConfiguration;
|
|
94
|
+
createOrUpdateRespectfulNudge(subscriptionName: string, rnPartialConfig: Partial<RNConfiguration>): Promise<boolean>;
|
|
95
|
+
getRequestSource(request: {
|
|
96
|
+
headers: NodeJS.Dict<string | string[]>;
|
|
97
|
+
}): "respectful-nudge" | "pubsub" | "scheduler" | "cloud-task" | "direct";
|
|
98
|
+
validateAuthorizationHeader(request: {
|
|
99
|
+
headers: NodeJS.Dict<string | string[]>;
|
|
100
|
+
}): Promise<{
|
|
101
|
+
serviceAccount: any;
|
|
102
|
+
flags: string[];
|
|
103
|
+
}>;
|
|
104
|
+
decodeRequests(request: {
|
|
105
|
+
headers: NodeJS.Dict<string | string[]>;
|
|
106
|
+
query: Record<string, string>;
|
|
107
|
+
}, nodeReq: IncomingMessage): Promise<{
|
|
108
|
+
requestSource: string;
|
|
109
|
+
messageId: string | undefined;
|
|
110
|
+
sourceSystem: string;
|
|
111
|
+
targetSystem: string;
|
|
112
|
+
buildshipId: string;
|
|
113
|
+
publishTime: Date | null;
|
|
114
|
+
body: any;
|
|
115
|
+
bodyTxt: string | null;
|
|
116
|
+
exportableToBigQuery: boolean;
|
|
117
|
+
extraAttributes: Record<string, string>;
|
|
118
|
+
subscriptionName: string | undefined;
|
|
119
|
+
}[]>;
|
|
120
|
+
decodeRequest(request: {
|
|
121
|
+
headers: NodeJS.Dict<string | string[]>;
|
|
122
|
+
query: Record<string, string>;
|
|
123
|
+
}, nodeReq: IncomingMessage): Promise<{
|
|
124
|
+
requestSource: string;
|
|
125
|
+
messageId: string | undefined;
|
|
126
|
+
sourceSystem: string;
|
|
127
|
+
targetSystem: string;
|
|
128
|
+
buildshipId: string;
|
|
129
|
+
publishTime: Date | null;
|
|
130
|
+
body: any;
|
|
131
|
+
bodyTxt: string | null;
|
|
132
|
+
exportableToBigQuery: boolean;
|
|
133
|
+
extraAttributes: Record<string, string>;
|
|
134
|
+
subscriptionName: string | undefined;
|
|
135
|
+
}>;
|
|
136
|
+
fetchLogEntries(triggerId: string, retries?: number, delay?: number, filterOverride?: string | null): Promise<any>;
|
|
137
|
+
getPubSubHelper(PubSubClass: typeof PubSub): PubSubHelper;
|
|
138
|
+
static readonly LOCK_NOT_ACQUIRED_ERROR: unique symbol;
|
|
139
|
+
withLock<T>(key: string, maxWaitTimeMs: number | undefined, fn: () => Promise<T>): Promise<T | typeof EnvEngine.LOCK_NOT_ACQUIRED_ERROR>;
|
|
140
|
+
acquireLock(key: string, maxWaitTimeMs?: number): Promise<boolean>;
|
|
141
|
+
releaseLock(key: string): Promise<boolean>;
|
|
142
|
+
getLockRateLimiter(): Promise<null | RateLimiterRedis>;
|
|
143
|
+
}
|
|
144
|
+
export default EnvEngine;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function getEventTime(x: any, defaultValue: Date): Date;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { default as validate } from './validate';
|
|
2
|
+
export * from './sanitize';
|
|
3
|
+
export * from './utils';
|
|
4
|
+
export { default as EnvEngine } from './env';
|
|
5
|
+
export { default as PubSubHelper, type Message, type ReceivedMessage } from './pubsub';
|
|
6
|
+
export { default as Runtime, Logging, ILogging } from './runtime';
|
|
7
|
+
export { default as SchedulerHelper } from './scheduler';
|
|
8
|
+
export { default as Secrets } from './secret';
|
|
9
|
+
export { default as CloudTasksHelper } from './cloudtasks';
|
|
10
|
+
export { default as JWKSHelper } from './jwks';
|
|
11
|
+
export { default as BigQueryHelper } from './bigquery';
|
|
12
|
+
export { default as AirtableHelper } from './airtable';
|
|
13
|
+
export { default as DatoHelper } from './dato';
|
|
14
|
+
export { default as setHeaders } from './setHeaders';
|
|
15
|
+
export { default as RateLimit, RedisConnectionError } from './rateLimit';
|
|
16
|
+
export { type TriggerOnCreateOptions, type TriggerOnExecuteOptions, type NodeOptions, type RNConfiguration, type TriggerExtraOptions } from './types';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IncomingMessage } from 'http';
|
|
2
|
+
export declare function isValidIp(value: string): boolean;
|
|
3
|
+
export declare function isValidCidr(value: string): boolean;
|
|
4
|
+
export declare function validateIpOrCidr(value: string): boolean;
|
|
5
|
+
export declare function isIpInCidr(ip: string, cidr: string): boolean;
|
|
6
|
+
export declare function isIpInCidrs(ip: string, cidrs: string[]): boolean;
|
|
7
|
+
export declare function getClientIp(req: IncomingMessage): string | undefined;
|
|
8
|
+
declare const _default: {
|
|
9
|
+
isValidIp: typeof isValidIp;
|
|
10
|
+
isValidCidr: typeof isValidCidr;
|
|
11
|
+
validateIpOrCidr: typeof validateIpOrCidr;
|
|
12
|
+
isIpInCidr: typeof isIpInCidr;
|
|
13
|
+
isIpInCidrs: typeof isIpInCidrs;
|
|
14
|
+
};
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type Firestore } from "@google-cloud/firestore";
|
|
2
|
+
import Runtime, { Opts as RuntimeOpts } from "./runtime";
|
|
3
|
+
export declare const CACHE_TABLE = "cache-global";
|
|
4
|
+
declare class JWKSHelper extends Runtime {
|
|
5
|
+
private firestore;
|
|
6
|
+
constructor(opts: RuntimeOpts, firestore: Firestore);
|
|
7
|
+
validateAuthorizationHeader(authorizationHeader: string, expectedServiceAccount?: false | string | null): Promise<{
|
|
8
|
+
email: any;
|
|
9
|
+
}>;
|
|
10
|
+
getKey(keyId: string): Promise<{
|
|
11
|
+
kid: string;
|
|
12
|
+
} | undefined>;
|
|
13
|
+
private fetchJWKS;
|
|
14
|
+
}
|
|
15
|
+
export default JWKSHelper;
|