@stacksjs/types 0.70.22 → 0.70.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/src/ai.d.ts +37 -0
- package/dist/src/analytics.d.ts +36 -0
- package/dist/src/api.d.ts +26 -0
- package/dist/src/app.d.ts +28 -0
- package/dist/src/attributes.d.ts +1 -0
- package/dist/src/auth.d.ts +49 -0
- package/dist/src/auto-imports.d.ts +8 -0
- package/dist/{binary.d.ts → src/binary.d.ts} +4 -1
- package/dist/src/cache.d.ts +79 -0
- package/dist/{cdn.d.ts → src/cdn.d.ts} +1 -1
- package/dist/{chat.d.ts → src/chat.d.ts} +29 -48
- package/dist/src/cli.d.ts +308 -0
- package/dist/{cloud.d.ts → src/cloud.d.ts} +81 -26
- package/dist/{components.d.ts → src/components.d.ts} +1 -4
- package/dist/{configure.d.ts → src/configure.d.ts} +1 -1
- package/dist/{cron-jobs.d.ts → src/cron-jobs.d.ts} +33 -37
- package/dist/src/dashboard.d.ts +33 -0
- package/dist/{database.d.ts → src/database.d.ts} +20 -12
- package/dist/src/dependencies.d.ts +17 -0
- package/dist/src/deploy.d.ts +16 -0
- package/dist/{dns.d.ts → src/dns.d.ts} +59 -59
- package/dist/src/docs.d.ts +23 -0
- package/dist/src/email.d.ts +201 -0
- package/dist/src/env.d.ts +1 -0
- package/dist/{errors.d.ts → src/errors.d.ts} +17 -24
- package/dist/src/events.d.ts +31 -0
- package/dist/src/exit-code.d.ts +10 -0
- package/dist/{file-systems.d.ts → src/file-systems.d.ts} +10 -6
- package/dist/{git.d.ts → src/git.d.ts} +9 -6
- package/dist/src/hashing.d.ts +57 -0
- package/dist/src/helpers.d.ts +1 -0
- package/dist/src/i18n.d.ts +65 -0
- package/dist/src/index.d.ts +70 -0
- package/dist/{library.d.ts → src/library.d.ts} +31 -33
- package/dist/src/logging.d.ts +12 -0
- package/dist/{manifest.d.ts → src/manifest.d.ts} +4 -1
- package/dist/src/model-names.d.ts +1 -0
- package/dist/src/model.d.ts +251 -0
- package/dist/{notifications.d.ts → src/notifications.d.ts} +1 -26
- package/dist/src/oauth.d.ts +290 -0
- package/dist/{pages.d.ts → src/pages.d.ts} +1 -1
- package/dist/src/payments.d.ts +322 -0
- package/dist/src/phone.d.ts +52 -0
- package/dist/src/ports.d.ts +20 -0
- package/dist/src/promise.d.ts +1 -0
- package/dist/src/push.d.ts +108 -0
- package/dist/src/queue.d.ts +310 -0
- package/dist/src/reactivity.d.ts +1 -0
- package/dist/src/realtime.d.ts +443 -0
- package/dist/src/request.d.ts +154 -0
- package/dist/{response.d.ts → src/response.d.ts} +1 -1
- package/dist/src/router.d.ts +105 -0
- package/dist/{saas.d.ts → src/saas.d.ts} +2 -2
- package/dist/src/scheduler.d.ts +1 -0
- package/dist/{search-engine.d.ts → src/search-engine.d.ts} +41 -45
- package/dist/{security.d.ts → src/security.d.ts} +4 -8
- package/dist/{server.d.ts → src/server.d.ts} +1 -1
- package/dist/src/services.d.ts +140 -0
- package/dist/{settings-config.d.ts → src/settings-config.d.ts} +1 -1
- package/dist/src/sms.d.ts +144 -0
- package/dist/src/stack-extensions.d.ts +137 -0
- package/dist/src/stacks.d.ts +40 -0
- package/dist/src/storage.d.ts +105 -0
- package/dist/src/table-names.d.ts +1 -0
- package/dist/src/tables.d.ts +34 -0
- package/dist/src/team.d.ts +7 -0
- package/dist/src/ui.d.ts +55 -0
- package/dist/src/utils.d.ts +39 -0
- package/package.json +13 -32
- package/src/ai.ts +20 -6
- package/src/analytics.ts +38 -1
- package/src/app.ts +38 -0
- package/src/attributes.ts +5 -1
- package/src/auth.ts +122 -0
- package/src/auto-imports.ts +8 -1
- package/src/cache.ts +226 -69
- package/src/chat.ts +0 -20
- package/src/cli.ts +24 -9
- package/src/cloud.ts +40 -1
- package/src/components.ts +3 -5
- package/src/cron-jobs.ts +1 -1
- package/src/dashboard.ts +40 -0
- package/src/database.ts +18 -2
- package/src/dns.ts +1 -1
- package/src/docs.ts +3 -3
- package/src/email.ts +303 -13
- package/src/errors.ts +2 -3
- package/src/events.ts +10 -5
- package/src/git.ts +3 -3
- package/src/hashing.ts +15 -19
- package/src/i18n.ts +105 -3
- package/src/index.ts +9 -5
- package/src/library.ts +0 -5
- package/src/model-names.ts +1 -1
- package/src/model.ts +94 -11
- package/src/oauth.ts +488 -0
- package/src/payments.ts +370 -27
- package/src/phone.ts +62 -0
- package/src/push.ts +107 -0
- package/src/queue.ts +386 -28
- package/src/reactivity.ts +1 -1
- package/src/realtime.ts +584 -0
- package/src/request.ts +344 -22
- package/src/router.ts +63 -5
- package/src/search-engine.ts +13 -13
- package/src/services.ts +100 -5
- package/src/sms.ts +263 -3
- package/src/stack-extensions.ts +184 -0
- package/src/stacks.ts +34 -4
- package/src/storage.ts +140 -6
- package/src/table-names.ts +1 -1
- package/src/ui.ts +20 -12
- package/src/utils.ts +1 -1
- package/dist/ai.d.ts +0 -20
- package/dist/analytics.d.ts +0 -13
- package/dist/api.d.ts +0 -26
- package/dist/app.d.ts +0 -32
- package/dist/attributes.d.ts +0 -1
- package/dist/auto-imports.d.ts +0 -1
- package/dist/build.d.ts +0 -2
- package/dist/cache.d.ts +0 -49
- package/dist/cli.d.ts +0 -310
- package/dist/dependencies.d.ts +0 -16
- package/dist/deploy.d.ts +0 -10
- package/dist/docs.d.ts +0 -26
- package/dist/email.d.ts +0 -107
- package/dist/events.d.ts +0 -5
- package/dist/exit-code.d.ts +0 -5
- package/dist/hashing.d.ts +0 -36
- package/dist/helpers.d.ts +0 -1
- package/dist/i18n.d.ts +0 -11
- package/dist/index.d.ts +0 -65
- package/dist/inspect.d.ts +0 -3
- package/dist/logging.d.ts +0 -6
- package/dist/model-names.d.ts +0 -1
- package/dist/model.d.ts +0 -226
- package/dist/payments.d.ts +0 -94
- package/dist/ports.d.ts +0 -13
- package/dist/promise.d.ts +0 -1
- package/dist/push.d.ts +0 -35
- package/dist/pwa.d.ts +0 -3
- package/dist/queue.d.ts +0 -45
- package/dist/reactivity.d.ts +0 -1
- package/dist/request.d.ts +0 -49
- package/dist/router.d.ts +0 -65
- package/dist/scheduler.d.ts +0 -1
- package/dist/services.d.ts +0 -81
- package/dist/ssg.d.ts +0 -3
- package/dist/stacks.d.ts +0 -54
- package/dist/storage.d.ts +0 -31
- package/dist/table-names.d.ts +0 -1
- package/dist/tables.d.ts +0 -34
- package/dist/team.d.ts +0 -8
- package/dist/ui.d.ts +0 -47
- package/dist/utils.d.ts +0 -27
- package/src/build.ts +0 -2
- package/src/inspect.ts +0 -10
- package/src/layout.ts +0 -8
- package/src/pwa.ts +0 -8
- package/src/ssg.ts +0 -3
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var _;((a)=>{a.Second="* * * * * *";a.FiveSeconds="*/5 * * * * *";a.TenSeconds="*/10 * * * * *";a.ThirtySeconds="*/30 * * * * *";a.Minute="* * * * *";a.TwoMinutes="*/2 * * * *";a.FiveMinutes="*/5 * * * *";a.TenMinutes="*/10 * * * *";a.FifteenMinutes="*/15 * * * *";a.ThirtyMinutes="*/30 * * * *";a.Hour="0 * * * *";a.HalfHour="0,30 * * * *";a.Day="0 0 * * *";a.Week="0 0 * * 0";a.Weekday="0 0 * * 1-5";a.Weekend="0 0 * * 0,6";a.Month="0 0 1 * *";a.Year="0 0 1 1 *"})(_||={});var x;((n)=>{n.Bluesky="bluesky";n.Discord="discord";n.Facebook="facebook";n.GitHub="github";n.Instagram="instagram";n.LinkedIn="linkedin";n.Mastodon="mastodon";n.Slack="slack";n.Twitter="twitter";n.YouTube="youtube"})(x||={});var M;((t)=>{t[t.Success=0]="Success";t[t.FatalError=1]="FatalError";t[t.InvalidArgument=9]="InvalidArgument"})(M||={});var v=new Set([".","!","?"]),U=new Set([...v,":",'"',"'","\u201D"]);function c(e){return Object.prototype.toString.call(e)}var u=[],d=[],p={},g={},m={};function y(e){return typeof e==="string"?new RegExp(`^${e}$`,"i"):e}function l(e,r){if(e===r)return r;if(e===e.toLowerCase())return r.toLowerCase();if(e===e.toUpperCase())return r.toUpperCase();if(e[0]===e[0].toUpperCase())return r.charAt(0).toUpperCase()+r.slice(1).toLowerCase();return r.toLowerCase()}function O(e,...r){return e.replace(/\$(\d{1,2})/g,(i,t)=>r[Number(t)]||"")}function R(e,r){return e.replace(r[0],(...i)=>{let t=O(r[1],...i);if(i[0]==="")return l(e[i[i.length-2]-1],t);return l(i[0],t)})}function b(e,r,i){if(!e.length||p[e])return r;for(let t=i.length-1;t>=0;t--){let s=i[t];if(s[0].test(r))return R(r,s)}return r}function f(e,r,i){return(t)=>{let s=t.toLowerCase();if(r[s])return l(t,s);if(e[s])return l(t,e[s]);return b(s,t,i)}}function h(e,r,i){return(t)=>{let s=t.toLowerCase();if(r[s])return!0;if(e[s])return!1;return b(s,s,i)===s}}var o=(e,r={})=>{let{count:i=2,inclusive:t=!1}=r;if(typeof e!=="string")throw new TypeError("Word must be a string");let s=i===1?o.singular(e):o.plural(e);return t?`${i} ${s}`:s};o.plural=f(m,g,u);o.isPlural=h(m,g,u);o.singular=f(g,m,d);o.isSingular=h(g,m,d);o.addPluralRule=(e,r)=>{u.push([y(e),r])};o.addSingularRule=(e,r)=>{d.push([y(e),r])};o.addUncountableRule=(e)=>{if(typeof e==="string"){p[e.toLowerCase()]=!0;return}o.addPluralRule(e,"$0"),o.addSingularRule(e,"$0")};o.addIrregularRule=(e,r)=>{let i=r.toLowerCase(),t=e.toLowerCase();m[t]=i,g[i]=t};[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["my","our"],["its","their"],["his","their"],["her","their"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"],["canvas","canvases"]].forEach(([e,r])=>o.addIrregularRule(e,r));[[/s?$/i,"s"],[/[^\x20-\x7F]$/,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(([e,r])=>o.addPluralRule(e,r));[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|\W|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/(dg|ss|ois|lk|ok|wn|mb|th|ch|ec|oal|is|ck|ix|sser|ts|wb)ies$/i,"$1ie"],[/\b(l|(?:neck|cross|hog|aun)?t|coll|faer|food|gen|goon|group|hipp|junk|vegg|(?:pork)?p|charl|calor|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(([e,r])=>o.addSingularRule(e,r));["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[e\u00E9]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(o.addUncountableRule);var w=JSON.parse('{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","\xA2":"cent","\xA3":"pound","\xA4":"currency","\xA5":"yen","\xA9":"(c)","\xAA":"a","\xAE":"(r)","\xBA":"o","\xC0":"A","\xC1":"A","\xC2":"A","\xC3":"A","\xC4":"A","\xC5":"A","\xC6":"AE","\xC7":"C","\xC8":"E","\xC9":"E","\xCA":"E","\xCB":"E","\xCC":"I","\xCD":"I","\xCE":"I","\xCF":"I","\xD0":"D","\xD1":"N","\xD2":"O","\xD3":"O","\xD4":"O","\xD5":"O","\xD6":"O","\xD8":"O","\xD9":"U","\xDA":"U","\xDB":"U","\xDC":"U","\xDD":"Y","\xDE":"TH","\xDF":"ss","\xE0":"a","\xE1":"a","\xE2":"a","\xE3":"a","\xE4":"a","\xE5":"a","\xE6":"ae","\xE7":"c","\xE8":"e","\xE9":"e","\xEA":"e","\xEB":"e","\xEC":"i","\xED":"i","\xEE":"i","\xEF":"i","\xF0":"d","\xF1":"n","\xF2":"o","\xF3":"o","\xF4":"o","\xF5":"o","\xF6":"o","\xF8":"o","\xF9":"u","\xFA":"u","\xFB":"u","\xFC":"u","\xFD":"y","\xFE":"th","\xFF":"y","\u0100":"A","\u0101":"a","\u0102":"A","\u0103":"a","\u0104":"A","\u0105":"a","\u0106":"C","\u0107":"c","\u010C":"C","\u010D":"c","\u010E":"D","\u010F":"d","\u0110":"DJ","\u0111":"dj","\u0112":"E","\u0113":"e","\u0116":"E","\u0117":"e","\u0118":"e","\u0119":"e","\u011A":"E","\u011B":"e","\u011E":"G","\u011F":"g","\u0122":"G","\u0123":"g","\u0128":"I","\u0129":"i","\u012A":"i","\u012B":"i","\u012E":"I","\u012F":"i","\u0130":"I","\u0131":"i","\u0136":"k","\u0137":"k","\u013B":"L","\u013C":"l","\u013D":"L","\u013E":"l","\u0141":"L","\u0142":"l","\u0143":"N","\u0144":"n","\u0145":"N","\u0146":"n","\u0147":"N","\u0148":"n","\u014C":"O","\u014D":"o","\u0150":"O","\u0151":"o","\u0152":"OE","\u0153":"oe","\u0154":"R","\u0155":"r","\u0158":"R","\u0159":"r","\u015A":"S","\u015B":"s","\u015E":"S","\u015F":"s","\u0160":"S","\u0161":"s","\u0162":"T","\u0163":"t","\u0164":"T","\u0165":"t","\u0168":"U","\u0169":"u","\u016A":"u","\u016B":"u","\u016E":"U","\u016F":"u","\u0170":"U","\u0171":"u","\u0172":"U","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017A":"z","\u017B":"Z","\u017C":"z","\u017D":"Z","\u017E":"z","\u018F":"E","\u0192":"f","\u01A0":"O","\u01A1":"o","\u01AF":"U","\u01B0":"u","\u01C8":"LJ","\u01C9":"lj","\u01CB":"NJ","\u01CC":"nj","\u0218":"S","\u0219":"s","\u021A":"T","\u021B":"t","\u0259":"e","\u02DA":"o","\u0386":"A","\u0388":"E","\u0389":"H","\u038A":"I","\u038C":"O","\u038E":"Y","\u038F":"W","\u0390":"i","\u0391":"A","\u0392":"B","\u0393":"G","\u0394":"D","\u0395":"E","\u0396":"Z","\u0397":"H","\u0398":"8","\u0399":"I","\u039A":"K","\u039B":"L","\u039C":"M","\u039D":"N","\u039E":"3","\u039F":"O","\u03A0":"P","\u03A1":"R","\u03A3":"S","\u03A4":"T","\u03A5":"Y","\u03A6":"F","\u03A7":"X","\u03A8":"PS","\u03A9":"W","\u03AA":"I","\u03AB":"Y","\u03AC":"a","\u03AD":"e","\u03AE":"h","\u03AF":"i","\u03B0":"y","\u03B1":"a","\u03B2":"b","\u03B3":"g","\u03B4":"d","\u03B5":"e","\u03B6":"z","\u03B7":"h","\u03B8":"8","\u03B9":"i","\u03BA":"k","\u03BB":"l","\u03BC":"m","\u03BD":"n","\u03BE":"3","\u03BF":"o","\u03C0":"p","\u03C1":"r","\u03C2":"s","\u03C3":"s","\u03C4":"t","\u03C5":"y","\u03C6":"f","\u03C7":"x","\u03C8":"ps","\u03C9":"w","\u03CA":"i","\u03CB":"y","\u03CC":"o","\u03CD":"y","\u03CE":"w","\u0401":"Yo","\u0402":"DJ","\u0404":"Ye","\u0406":"I","\u0407":"Yi","\u0408":"J","\u0409":"LJ","\u040A":"NJ","\u040B":"C","\u040F":"DZ","\u0410":"A","\u0411":"B","\u0412":"V","\u0413":"G","\u0414":"D","\u0415":"E","\u0416":"Zh","\u0417":"Z","\u0418":"I","\u0419":"J","\u041A":"K","\u041B":"L","\u041C":"M","\u041D":"N","\u041E":"O","\u041F":"P","\u0420":"R","\u0421":"S","\u0422":"T","\u0423":"U","\u0424":"F","\u0425":"H","\u0426":"C","\u0427":"Ch","\u0428":"Sh","\u0429":"Sh","\u042A":"U","\u042B":"Y","\u042C":"","\u042D":"E","\u042E":"Yu","\u042F":"Ya","\u0430":"a","\u0431":"b","\u0432":"v","\u0433":"g","\u0434":"d","\u0435":"e","\u0436":"zh","\u0437":"z","\u0438":"i","\u0439":"j","\u043A":"k","\u043B":"l","\u043C":"m","\u043D":"n","\u043E":"o","\u043F":"p","\u0440":"r","\u0441":"s","\u0442":"t","\u0443":"u","\u0444":"f","\u0445":"h","\u0446":"c","\u0447":"ch","\u0448":"sh","\u0449":"sh","\u044A":"u","\u044B":"y","\u044C":"","\u044D":"e","\u044E":"yu","\u044F":"ya","\u0451":"yo","\u0452":"dj","\u0454":"ye","\u0456":"i","\u0457":"yi","\u0458":"j","\u0459":"lj","\u045A":"nj","\u045B":"c","\u045D":"u","\u045F":"dz","\u0490":"G","\u0491":"g","\u0492":"GH","\u0493":"gh","\u049A":"KH","\u049B":"kh","\u04A2":"NG","\u04A3":"ng","\u04AE":"UE","\u04AF":"ue","\u04B0":"U","\u04B1":"u","\u04BA":"H","\u04BB":"h","\u04D8":"AE","\u04D9":"ae","\u04E8":"OE","\u04E9":"oe","\u0531":"A","\u0532":"B","\u0533":"G","\u0534":"D","\u0535":"E","\u0536":"Z","\u0537":"E\'","\u0538":"Y\'","\u0539":"T\'","\u053A":"JH","\u053B":"I","\u053C":"L","\u053D":"X","\u053E":"C\'","\u053F":"K","\u0540":"H","\u0541":"D\'","\u0542":"GH","\u0543":"TW","\u0544":"M","\u0545":"Y","\u0546":"N","\u0547":"SH","\u0549":"CH","\u054A":"P","\u054B":"J","\u054C":"R\'","\u054D":"S","\u054E":"V","\u054F":"T","\u0550":"R","\u0551":"C","\u0553":"P\'","\u0554":"Q\'","\u0555":"O\'\'","\u0556":"F","\u0587":"EV","\u0621":"a","\u0622":"aa","\u0623":"a","\u0624":"u","\u0625":"i","\u0626":"e","\u0627":"a","\u0628":"b","\u0629":"h","\u062A":"t","\u062B":"th","\u062C":"j","\u062D":"h","\u062E":"kh","\u062F":"d","\u0630":"th","\u0631":"r","\u0632":"z","\u0633":"s","\u0634":"sh","\u0635":"s","\u0636":"dh","\u0637":"t","\u0638":"z","\u0639":"a","\u063A":"gh","\u0641":"f","\u0642":"q","\u0643":"k","\u0644":"l","\u0645":"m","\u0646":"n","\u0647":"h","\u0648":"w","\u0649":"a","\u064A":"y","\u064B":"an","\u064C":"on","\u064D":"en","\u064E":"a","\u064F":"u","\u0650":"e","\u0652":"","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u067E":"p","\u0686":"ch","\u0698":"zh","\u06A9":"k","\u06AF":"g","\u06CC":"y","\u06F0":"0","\u06F1":"1","\u06F2":"2","\u06F3":"3","\u06F4":"4","\u06F5":"5","\u06F6":"6","\u06F7":"7","\u06F8":"8","\u06F9":"9","\u0E3F":"baht","\u10D0":"a","\u10D1":"b","\u10D2":"g","\u10D3":"d","\u10D4":"e","\u10D5":"v","\u10D6":"z","\u10D7":"t","\u10D8":"i","\u10D9":"k","\u10DA":"l","\u10DB":"m","\u10DC":"n","\u10DD":"o","\u10DE":"p","\u10DF":"zh","\u10E0":"r","\u10E1":"s","\u10E2":"t","\u10E3":"u","\u10E4":"f","\u10E5":"k","\u10E6":"gh","\u10E7":"q","\u10E8":"sh","\u10E9":"ch","\u10EA":"ts","\u10EB":"dz","\u10EC":"ts","\u10ED":"ch","\u10EE":"kh","\u10EF":"j","\u10F0":"h","\u1E62":"S","\u1E63":"s","\u1E80":"W","\u1E81":"w","\u1E82":"W","\u1E83":"w","\u1E84":"W","\u1E85":"w","\u1E9E":"SS","\u1EA0":"A","\u1EA1":"a","\u1EA2":"A","\u1EA3":"a","\u1EA4":"A","\u1EA5":"a","\u1EA6":"A","\u1EA7":"a","\u1EA8":"A","\u1EA9":"a","\u1EAA":"A","\u1EAB":"a","\u1EAC":"A","\u1EAD":"a","\u1EAE":"A","\u1EAF":"a","\u1EB0":"A","\u1EB1":"a","\u1EB2":"A","\u1EB3":"a","\u1EB4":"A","\u1EB5":"a","\u1EB6":"A","\u1EB7":"a","\u1EB8":"E","\u1EB9":"e","\u1EBA":"E","\u1EBB":"e","\u1EBC":"E","\u1EBD":"e","\u1EBE":"E","\u1EBF":"e","\u1EC0":"E","\u1EC1":"e","\u1EC2":"E","\u1EC3":"e","\u1EC4":"E","\u1EC5":"e","\u1EC6":"E","\u1EC7":"e","\u1EC8":"I","\u1EC9":"i","\u1ECA":"I","\u1ECB":"i","\u1ECC":"O","\u1ECD":"o","\u1ECE":"O","\u1ECF":"o","\u1ED0":"O","\u1ED1":"o","\u1ED2":"O","\u1ED3":"o","\u1ED4":"O","\u1ED5":"o","\u1ED6":"O","\u1ED7":"o","\u1ED8":"O","\u1ED9":"o","\u1EDA":"O","\u1EDB":"o","\u1EDC":"O","\u1EDD":"o","\u1EDE":"O","\u1EDF":"o","\u1EE0":"O","\u1EE1":"o","\u1EE2":"O","\u1EE3":"o","\u1EE4":"U","\u1EE5":"u","\u1EE6":"U","\u1EE7":"u","\u1EE8":"U","\u1EE9":"u","\u1EEA":"U","\u1EEB":"u","\u1EEC":"U","\u1EED":"u","\u1EEE":"U","\u1EEF":"u","\u1EF0":"U","\u1EF1":"u","\u1EF2":"Y","\u1EF3":"y","\u1EF4":"Y","\u1EF5":"y","\u1EF6":"Y","\u1EF7":"y","\u1EF8":"Y","\u1EF9":"y","\u2013":"-","\u2018":"\'","\u2019":"\'","\u201C":"\\"","\u201D":"\\"","\u201E":"\\"","\u2020":"+","\u2022":"*","\u2026":"...","\u20A0":"ecu","\u20A2":"cruzeiro","\u20A3":"french franc","\u20A4":"lira","\u20A5":"mill","\u20A6":"naira","\u20A7":"peseta","\u20A8":"rupee","\u20A9":"won","\u20AA":"new shequel","\u20AB":"dong","\u20AC":"euro","\u20AD":"kip","\u20AE":"tugrik","\u20AF":"drachma","\u20B0":"penny","\u20B1":"peso","\u20B2":"guarani","\u20B3":"austral","\u20B4":"hryvnia","\u20B5":"cedi","\u20B8":"kazakhstani tenge","\u20B9":"indian rupee","\u20BA":"turkish lira","\u20BD":"russian ruble","\u20BF":"bitcoin","\u2120":"sm","\u2122":"tm","\u2202":"d","\u2206":"delta","\u2211":"sum","\u221E":"infinity","\u2665":"love","\u5143":"yuan","\u5186":"yen","\uFDFC":"rial","\uFEF5":"laa","\uFEF7":"laa","\uFEF9":"lai","\uFEFB":"la"}'),H=JSON.parse('{"bg":{"\u0419":"Y","\u0426":"Ts","\u0429":"Sht","\u042A":"A","\u042C":"Y","\u0439":"y","\u0446":"ts","\u0449":"sht","\u044A":"a","\u044C":"y"},"de":{"\xC4":"AE","\xE4":"ae","\xD6":"OE","\xF6":"oe","\xDC":"UE","\xFC":"ue","\xDF":"ss","%":"prozent","&":"und","|":"oder","\u2211":"summe","\u221E":"unendlich","\u2665":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","\xA2":"centavos","\xA3":"libras","\xA4":"moneda","\u20A3":"francos","\u2211":"suma","\u221E":"infinito","\u2665":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","\xA2":"centime","\xA3":"livre","\xA4":"devise","\u20A3":"franc","\u2211":"somme","\u221E":"infini","\u2665":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","\xA2":"centavo","\u2211":"soma","\xA3":"libra","\u221E":"infinito","\u2665":"amor"},"uk":{"\u0418":"Y","\u0438":"y","\u0419":"Y","\u0439":"y","\u0426":"Ts","\u0446":"ts","\u0425":"Kh","\u0445":"kh","\u0429":"Shch","\u0449":"shch","\u0413":"H","\u0433":"h"},"vi":{"\u0110":"D","\u0111":"d"},"da":{"\xD8":"OE","\xF8":"oe","\xC5":"AA","\xE5":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"st\xF8rre end"},"nb":{"&":"og","\xC5":"AA","\xC6":"AE","\xD8":"OE","\xE5":"aa","\xE6":"ae","\xF8":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","\xC5":"AA","\xC4":"AE","\xD6":"OE","\xE5":"aa","\xE4":"ae","\xF6":"oe"}}');function ze(e){if(e===null)return"null";let r=c(e).slice(8,-1).toLowerCase();return typeof e==="object"||typeof e==="function"?r:typeof e}export{ze as getTypeName,x as SocialLinkIcon,M as ExitCode,_ as Every};
|
|
2
|
+
function f(D){return typeof D==="object"&&D!==null&&"id"in D&&"userId"in D&&"clientId"in D&&"scopes"in D}function G(D){return f(D)&&"abilities"in D}function H(D){return typeof D==="object"&&D!==null&&"id"in D&&"name"in D&&"secret"in D&&"redirect"in D}var x;((p)=>{p.Second="* * * * * *";p.FiveSeconds="*/5 * * * * *";p.TenSeconds="*/10 * * * * *";p.ThirtySeconds="*/30 * * * * *";p.Minute="* * * * *";p.TwoMinutes="*/2 * * * *";p.FiveMinutes="*/5 * * * *";p.TenMinutes="*/10 * * * *";p.FifteenMinutes="*/15 * * * *";p.ThirtyMinutes="*/30 * * * *";p.Hour="0 * * * *";p.HalfHour="0,30 * * * *";p.Day="0 0 * * *";p.Week="0 0 * * 0";p.Weekday="0 0 * * 1-5";p.Weekend="0 0 * * 0,6";p.Month="0 0 1 * *";p.Year="0 0 1 1 *"})(x||={});var F;((B)=>{B.Bluesky="bluesky";B.Discord="discord";B.Facebook="facebook";B.GitHub="github";B.Instagram="instagram";B.LinkedIn="linkedin";B.Mastodon="mastodon";B.Slack="slack";B.Twitter="twitter";B.YouTube="youtube"})(F||={});var U;((O)=>{O[O.Success=0]="Success";O[O.FatalError=1]="FatalError";O[O.InvalidArgument=9]="InvalidArgument"})(U||={});import{toString as _}from"@stacksjs/strings";function J(D){if(D===null)return"null";let P=_(D).slice(8,-1).toLowerCase();return typeof D==="object"||typeof D==="function"?P:typeof D}function Q(D){return D}function R(D){return D}var W={development:{default:"sync",connections:{sync:{driver:"sync"}},failed:{driver:"database",table:"failed_jobs"}},production:{default:"redis",connections:{redis:{driver:"redis",prefix:"stacks:queue",concurrency:5,distributedLock:!0,metrics:{enabled:!0},defaultDeadLetterOptions:{enabled:!0,maxRetries:3}}},failed:{driver:"redis",prefix:"stacks:failed"},worker:{concurrency:5,shutdownTimeout:30000}},highPerformance:{default:"redis",connections:{redis:{driver:"redis",prefix:"stacks:queue",concurrency:20,distributedLock:!0,metrics:{enabled:!0,collectInterval:5000},horizontalScaling:{enabled:!0,maxWorkersPerInstance:20,jobsPerWorker:50},defaultDeadLetterOptions:{enabled:!0,maxRetries:5}}},failed:{driver:"redis",prefix:"stacks:failed"},worker:{concurrency:20,shutdownTimeout:60000}},database:{default:"database",connections:{database:{driver:"database",table:"jobs",queue:"default",retryAfter:90}},failed:{driver:"database",table:"failed_jobs"}}};var Z={server:{development:{enabled:!0,mode:"server",debug:!0,server:{host:"localhost",port:6001,scheme:"ws",driver:"bun",rateLimit:{enabled:!1},healthCheck:{enabled:!0,path:"/health"}},channels:{public:!0,private:!0,presence:!0}},production:{enabled:!0,mode:"server",debug:!1,server:{host:"0.0.0.0",port:6001,scheme:"wss",driver:"bun",redis:{enabled:!0,prefix:"stacks:realtime:"},rateLimit:{enabled:!0,maxConnectionsPerIp:100,maxMessagesPerSecond:50,maxPayloadSize:65536},loadManagement:{maxConnections:1e4,backpressureThreshold:1000,messageQueueSize:1e4,gracefulShutdownTimeout:30000},autoScaling:{min:2,max:10,targetCPU:70},healthCheck:{enabled:!0,path:"/health",interval:30},metrics:{enabled:!0,port:9090,path:"/metrics"}},channels:{public:!0,private:!0,presence:!0}},highPerformance:{enabled:!0,mode:"server",server:{driver:"bun",redis:{enabled:!0,cluster:!0},rateLimit:{enabled:!0,maxConnectionsPerIp:500,maxMessagesPerSecond:200,maxPayloadSize:131072},loadManagement:{maxConnections:1e5,backpressureThreshold:5000,messageQueueSize:50000,gracefulShutdownTimeout:60000},autoScaling:{min:4,max:50,targetCPU:60}}},chat:{enabled:!0,mode:"server",server:{driver:"bun",redis:{enabled:!0},rateLimit:{enabled:!0,maxConnectionsPerIp:10,maxMessagesPerSecond:20},loadManagement:{maxConnections:50000}},channels:{public:!0,private:!0,presence:{enabled:!0,maxMembersPerChannel:500,memberInfoTtl:60}}},gaming:{enabled:!0,mode:"server",server:{driver:"bun",redis:{enabled:!0,cluster:!0},rateLimit:{enabled:!0,maxConnectionsPerIp:50,maxMessagesPerSecond:100},loadManagement:{maxConnections:50000,backpressureThreshold:2000,messageQueueSize:20000},autoScaling:{min:2,max:20,targetCPU:50}},channels:{public:!0,private:!0,presence:!0}}},serverless:{development:{enabled:!0,mode:"serverless",debug:!0,serverless:{connectionTimeout:3600,idleTimeout:600,stageName:"dev",memorySize:256,timeout:30},channels:{public:!0,private:!0,presence:!0}},production:{enabled:!0,mode:"serverless",debug:!1,serverless:{connectionTimeout:3600,idleTimeout:600,stageName:"production",memorySize:512,timeout:30,provisionedConcurrency:2},channels:{public:!0,private:!0,presence:!0}},notifications:{enabled:!0,mode:"serverless",serverless:{connectionTimeout:7200,idleTimeout:1800,memorySize:256,timeout:15},channels:{public:!0,private:!0,presence:!1}}}};var w={};export{w as stackExtensionRegistry,G as isPersonalAccessToken,H as isOAuthClient,f as isAccessToken,J as getTypeName,R as defineModels,Q as defineModel,F as SocialLinkIcon,Z as RealtimePresets,W as QueuePresets,U as ExitCode,x as Every};
|
package/dist/src/ai.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* **AI Options**
|
|
3
|
+
*
|
|
4
|
+
* This configuration defines all of your AI options. Because Stacks is fully-typed, you
|
|
5
|
+
* may hover any of the options below and the definitions will be provided. In case you
|
|
6
|
+
* have any questions, feel free to reach out via Discord or GitHub Discussions.
|
|
7
|
+
*/
|
|
8
|
+
export declare interface AiOptions {
|
|
9
|
+
default: AiModel
|
|
10
|
+
models: AiModel[]
|
|
11
|
+
deploy: boolean
|
|
12
|
+
}
|
|
13
|
+
declare type AiModel = | 'amazon.titan-embed-text-v1'
|
|
14
|
+
| 'amazon.titan-embed-text-v2:0'
|
|
15
|
+
| 'amazon.titan-text-lite-v1'
|
|
16
|
+
| 'amazon.titan-text-express-v1'
|
|
17
|
+
| 'amazon.titan-text-premier-v1:0'
|
|
18
|
+
| 'amazon.titan-embed-image-v1'
|
|
19
|
+
| 'amazon.titan-image-generator-v1'
|
|
20
|
+
| 'amazon.titan-image-generator-v2:0'
|
|
21
|
+
// Anthropic Claude (current models via Bedrock)
|
|
22
|
+
| 'anthropic.claude-sonnet-4-20250514-v1:0'
|
|
23
|
+
| 'anthropic.claude-haiku-4-20250514-v1:0'
|
|
24
|
+
| 'anthropic.claude-3-5-sonnet-20241022-v2:0'
|
|
25
|
+
| 'anthropic.claude-3-5-haiku-20241022-v1:0'
|
|
26
|
+
| 'anthropic.claude-3-opus-20240229-v1:0'
|
|
27
|
+
| 'anthropic.claude-3-sonnet-20240229-v1:0'
|
|
28
|
+
| 'anthropic.claude-3-haiku-20240307-v1:0'
|
|
29
|
+
// Meta Llama 3
|
|
30
|
+
| 'meta.llama3-8b-instruct-v1:0'
|
|
31
|
+
| 'meta.llama3-70b-instruct-v1:0'
|
|
32
|
+
| 'meta.llama3-1-8b-instruct-v1:0'
|
|
33
|
+
| 'meta.llama3-1-70b-instruct-v1:0'
|
|
34
|
+
| 'meta.llama3-1-405b-instruct-v1:0'
|
|
35
|
+
// Allow custom model strings
|
|
36
|
+
| (string & {});
|
|
37
|
+
export type AiConfig = Partial<AiOptions>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* **Analytics Options**
|
|
3
|
+
*
|
|
4
|
+
* This configuration defines all of your Analytics options. Because Stacks is fully-typed, you
|
|
5
|
+
* may hover any of the options below and the definitions will be provided. In case you
|
|
6
|
+
* have any questions, feel free to reach out via Discord or GitHub Discussions.
|
|
7
|
+
*/
|
|
8
|
+
export declare interface AnalyticsOptions {
|
|
9
|
+
driver: 'google-analytics' | 'fathom' | 'plausible' | 'self-hosted'
|
|
10
|
+
drivers: {
|
|
11
|
+
googleAnalytics?: {
|
|
12
|
+
trackingId: string
|
|
13
|
+
debug?: boolean
|
|
14
|
+
}
|
|
15
|
+
fathom?: {
|
|
16
|
+
siteId: string
|
|
17
|
+
scriptUrl?: string
|
|
18
|
+
honorDnt?: boolean
|
|
19
|
+
spa?: boolean
|
|
20
|
+
}
|
|
21
|
+
plausible?: {
|
|
22
|
+
domain: string
|
|
23
|
+
scriptUrl?: string
|
|
24
|
+
trackLocalhost?: boolean
|
|
25
|
+
hashMode?: boolean
|
|
26
|
+
}
|
|
27
|
+
selfHosted?: {
|
|
28
|
+
siteId: string
|
|
29
|
+
apiEndpoint: string
|
|
30
|
+
honorDnt?: boolean
|
|
31
|
+
trackHashChanges?: boolean
|
|
32
|
+
trackOutboundLinks?: boolean
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export type AnalyticsConfig = Partial<AnalyticsOptions>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* **API Options**
|
|
3
|
+
*
|
|
4
|
+
* This configuration defines all of your API options. Because Stacks is fully-typed, you
|
|
5
|
+
* may hover any of the options below and the definitions will be provided. In case you
|
|
6
|
+
* have any questions, feel free to reach out via Discord or GitHub Discussions.
|
|
7
|
+
*/
|
|
8
|
+
export declare interface ApiOptions {
|
|
9
|
+
description: string
|
|
10
|
+
prefix: string
|
|
11
|
+
middleware: string[]
|
|
12
|
+
routes:
|
|
13
|
+
| {
|
|
14
|
+
index: boolean
|
|
15
|
+
show: boolean
|
|
16
|
+
store: boolean
|
|
17
|
+
update: boolean
|
|
18
|
+
destroy: boolean
|
|
19
|
+
}
|
|
20
|
+
| boolean
|
|
21
|
+
prewarm: boolean | number
|
|
22
|
+
memorySize: number
|
|
23
|
+
timeout: number
|
|
24
|
+
deploy: boolean
|
|
25
|
+
}
|
|
26
|
+
export type ApiConfig = Partial<ApiOptions>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* **Application Options**
|
|
3
|
+
*
|
|
4
|
+
* This configuration defines all of your application options. Because Stacks is fully-typed,
|
|
5
|
+
* you may hover any of the options below and the definitions will be provided. In case
|
|
6
|
+
* you have any questions, feel free to reach out via Discord or GitHub Discussions.
|
|
7
|
+
*/
|
|
8
|
+
export declare interface AppOptions {
|
|
9
|
+
name: string
|
|
10
|
+
description: string
|
|
11
|
+
env: AppEnvType
|
|
12
|
+
url: string
|
|
13
|
+
redirectUrls: string | string[]
|
|
14
|
+
debug: boolean
|
|
15
|
+
maintenanceMode: boolean
|
|
16
|
+
comingSoonMode?: boolean
|
|
17
|
+
comingSoonSecret?: string
|
|
18
|
+
key: string
|
|
19
|
+
timezone: string
|
|
20
|
+
locale: string
|
|
21
|
+
fallbackLocale: 'en'
|
|
22
|
+
cipher: string
|
|
23
|
+
docMode: boolean
|
|
24
|
+
primaryColor: string
|
|
25
|
+
supportEmail: string
|
|
26
|
+
}
|
|
27
|
+
export type AppEnvType = 'local' | 'dev' | 'stage' | 'prod' | 'testing' | string;
|
|
28
|
+
export type AppConfig = Partial<AppOptions>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from '../../../types/attributes';
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export declare interface AuthOptions {
|
|
2
|
+
default: string
|
|
3
|
+
guards: {
|
|
4
|
+
[key: string]: {
|
|
5
|
+
driver: 'session' | 'token'
|
|
6
|
+
provider: string
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
providers: {
|
|
10
|
+
[key: string]: {
|
|
11
|
+
driver: 'database'
|
|
12
|
+
table: string
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
username: string
|
|
16
|
+
password: string
|
|
17
|
+
tokenExpiry: number
|
|
18
|
+
refreshTokenExpiry?: number
|
|
19
|
+
tokenRotation: number
|
|
20
|
+
defaultAbilities: string[]
|
|
21
|
+
defaultTokenName: string
|
|
22
|
+
passwordReset: {
|
|
23
|
+
expire: number
|
|
24
|
+
throttle: number
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export declare interface AuthInstance {
|
|
28
|
+
guard: string
|
|
29
|
+
provider: string
|
|
30
|
+
user?: any
|
|
31
|
+
token?: string
|
|
32
|
+
}
|
|
33
|
+
export declare interface AuthDriver {
|
|
34
|
+
attempt: (credentials: any) => Promise<boolean>
|
|
35
|
+
validate: (token: string) => Promise<boolean>
|
|
36
|
+
login: (credentials: any) => Promise<{ token: string } | null>
|
|
37
|
+
logout: () => Promise<void>
|
|
38
|
+
user: () => Promise<any>
|
|
39
|
+
token: () => string | null
|
|
40
|
+
}
|
|
41
|
+
export declare interface Authenticatable {
|
|
42
|
+
getAuthIdentifier: () => any
|
|
43
|
+
getAuthPassword: () => string
|
|
44
|
+
getRememberToken: () => string
|
|
45
|
+
setRememberToken: (token: string) => void
|
|
46
|
+
}
|
|
47
|
+
export type AuthConfig = Partial<AuthOptions>;
|
|
48
|
+
export type GuardType = 'session' | 'token';
|
|
49
|
+
export type ProviderType = 'database';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// `unplugin-auto-import` isn't a runtime dependency of @stacksjs/types — we
|
|
2
|
+
// only re-publish its option shape so users get autocomplete in user-land
|
|
3
|
+
// configs. The local type intentionally mirrors the upstream `Options`
|
|
4
|
+
// surface as an open record; if/when this package adopts unplugin-auto-import
|
|
5
|
+
// as a real dependency, swap this for `import type { Options }` from there.
|
|
6
|
+
export declare interface AutoImportsOptions {
|
|
7
|
+
[key: string]: unknown
|
|
8
|
+
}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Binary/CLI Options used in `./config/cli.ts`.
|
|
3
|
+
*/
|
|
1
4
|
export declare interface BinaryOptions {
|
|
2
5
|
name: string
|
|
3
6
|
command: string
|
|
@@ -5,4 +8,4 @@ export declare interface BinaryOptions {
|
|
|
5
8
|
source: string
|
|
6
9
|
deploy: boolean
|
|
7
10
|
}
|
|
8
|
-
export
|
|
11
|
+
export type BinaryConfig = Partial<BinaryOptions>;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cache Options - Configuration for the caching system
|
|
3
|
+
*/
|
|
4
|
+
export declare interface CacheOptions {
|
|
5
|
+
driver: 'memory' | 'redis'
|
|
6
|
+
prefix: string
|
|
7
|
+
ttl: number
|
|
8
|
+
maxKeys?: number
|
|
9
|
+
useClones?: boolean
|
|
10
|
+
drivers: {
|
|
11
|
+
redis?: {
|
|
12
|
+
url?: string
|
|
13
|
+
host: string
|
|
14
|
+
port: number
|
|
15
|
+
username?: string
|
|
16
|
+
password?: string
|
|
17
|
+
database?: number
|
|
18
|
+
tls?: boolean
|
|
19
|
+
}
|
|
20
|
+
memory?: {
|
|
21
|
+
maxKeys?: number
|
|
22
|
+
checkPeriod?: number
|
|
23
|
+
deleteOnExpire?: boolean
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Cache Driver Interface - Defines the API for all cache implementations
|
|
29
|
+
*/
|
|
30
|
+
export declare interface CacheDriver {
|
|
31
|
+
get: <T>(key: string) => Promise<T | undefined>
|
|
32
|
+
mget: <T>(keys: string[]) => Promise<Record<string, T>>
|
|
33
|
+
set: <T>(key: string, value: T, ttl?: number) => Promise<boolean>
|
|
34
|
+
mset: <T>(entries: Array<{ key: string, value: T, ttl?: number }>) => Promise<boolean>
|
|
35
|
+
setForever: <T>(key: string, value: T) => Promise<boolean>
|
|
36
|
+
getOrSet: <T>(key: string, fetcher: () => T | Promise<T>, ttl?: number) => Promise<T>
|
|
37
|
+
del: (keys: string | string[]) => Promise<number>
|
|
38
|
+
has: (key: string) => Promise<boolean>
|
|
39
|
+
missing: (key: string) => Promise<boolean>
|
|
40
|
+
remove: (key: string) => Promise<void>
|
|
41
|
+
deleteMany: (keys: string[]) => Promise<number>
|
|
42
|
+
clear: () => Promise<void>
|
|
43
|
+
flush: () => Promise<void>
|
|
44
|
+
keys: (pattern?: string) => Promise<string[]>
|
|
45
|
+
getTtl: (key: string) => Promise<number | undefined>
|
|
46
|
+
ttl: (key: string, ttl: number) => Promise<boolean>
|
|
47
|
+
take: <T>(key: string) => Promise<T | undefined>
|
|
48
|
+
remember: <T>(key: string, ttl: number, callback: () => T | Promise<T>) => Promise<T>
|
|
49
|
+
rememberForever: <T>(key: string, callback: () => T | Promise<T>) => Promise<T>
|
|
50
|
+
getStats: () => Promise<CacheStats>
|
|
51
|
+
close: () => Promise<void>
|
|
52
|
+
disconnect: () => Promise<void>
|
|
53
|
+
tags?: (tags: readonly string[]) => TaggedCacheScope
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Returned by `cache.tags(tags)`. Tag-scoped writes/reads with a
|
|
57
|
+
* cascading `flush()`.
|
|
58
|
+
*/
|
|
59
|
+
export declare interface TaggedCacheScope {
|
|
60
|
+
put: <T>(key: string, value: T, ttl?: number) => Promise<boolean>
|
|
61
|
+
set: <T>(key: string, value: T, ttl?: number) => Promise<boolean>
|
|
62
|
+
setForever: <T>(key: string, value: T) => Promise<boolean>
|
|
63
|
+
remember: <T>(key: string, ttl: number, callback: () => T | Promise<T>) => Promise<T>
|
|
64
|
+
rememberForever: <T>(key: string, callback: () => T | Promise<T>) => Promise<T>
|
|
65
|
+
get: <T>(key: string) => Promise<T | undefined>
|
|
66
|
+
has: (key: string) => Promise<boolean>
|
|
67
|
+
flush: () => Promise<number>
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Cache Statistics
|
|
71
|
+
*/
|
|
72
|
+
export declare interface CacheStats {
|
|
73
|
+
hits: number
|
|
74
|
+
misses: number
|
|
75
|
+
keys: number
|
|
76
|
+
size?: number
|
|
77
|
+
hitRate?: number
|
|
78
|
+
}
|
|
79
|
+
export type CacheConfig = Partial<CacheOptions>;
|
|
@@ -1,88 +1,69 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export interface ChatDriverConfig {
|
|
1
|
+
/**
|
|
2
|
+
* Configuration options for chat drivers
|
|
3
|
+
*/
|
|
4
|
+
export declare interface ChatDriverConfig {
|
|
5
5
|
maxRetries?: number
|
|
6
|
-
|
|
7
6
|
retryTimeout?: number
|
|
8
|
-
|
|
9
7
|
[key: string]: any
|
|
10
8
|
}
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Base chat message interface
|
|
11
|
+
*/
|
|
12
|
+
export declare interface ChatMessage {
|
|
13
13
|
to: string | string[]
|
|
14
|
-
|
|
15
14
|
from?: {
|
|
16
15
|
id?: string
|
|
17
16
|
name?: string
|
|
18
17
|
avatar?: string
|
|
19
18
|
}
|
|
20
|
-
|
|
21
19
|
subject?: string
|
|
22
|
-
|
|
23
20
|
content?: string
|
|
24
|
-
|
|
25
21
|
template?: string
|
|
26
|
-
|
|
27
22
|
data?: Record<string, any>
|
|
28
|
-
|
|
29
23
|
attachments?: ChatAttachment[]
|
|
30
|
-
|
|
31
24
|
onSuccess?: () => void | Promise<void> | Partial<ChatResult>
|
|
32
|
-
|
|
33
25
|
onError?: (error: Error) => void | Promise<void> | Partial<ChatResult>
|
|
34
|
-
|
|
35
26
|
handle?: () => void | Promise<void> | Partial<ChatResult>
|
|
36
|
-
|
|
37
27
|
[key: string]: any
|
|
38
28
|
}
|
|
39
|
-
|
|
40
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Structure for message attachments
|
|
31
|
+
*/
|
|
32
|
+
export declare interface ChatAttachment {
|
|
41
33
|
filename: string
|
|
42
|
-
|
|
43
34
|
content: string | Uint8Array
|
|
44
|
-
|
|
45
35
|
contentType: string
|
|
46
|
-
|
|
47
36
|
options?: Record<string, any>
|
|
48
37
|
}
|
|
49
|
-
|
|
50
|
-
|
|
38
|
+
/**
|
|
39
|
+
* Standard result object for chat operations
|
|
40
|
+
*/
|
|
41
|
+
export declare interface ChatResult {
|
|
51
42
|
success: boolean
|
|
52
|
-
|
|
53
43
|
message: string
|
|
54
|
-
|
|
55
44
|
provider: string
|
|
56
|
-
|
|
57
45
|
messageId?: string
|
|
58
|
-
|
|
59
46
|
data?: Record<string, any>
|
|
60
47
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
export interface ChatDriver {
|
|
48
|
+
/**
|
|
49
|
+
* Base chat driver interface
|
|
50
|
+
*/
|
|
51
|
+
export declare interface ChatDriver {
|
|
65
52
|
name: string
|
|
66
|
-
|
|
67
53
|
configure: (config: ChatDriverConfig) => void
|
|
68
|
-
|
|
69
54
|
send: (message: ChatMessage, options?: ChatOptions) => Promise<ChatResult>
|
|
70
55
|
}
|
|
71
|
-
|
|
72
|
-
|
|
56
|
+
/**
|
|
57
|
+
* Slack-specific response
|
|
58
|
+
*/
|
|
59
|
+
export declare interface SlackResponse {
|
|
73
60
|
id: string
|
|
74
|
-
|
|
75
61
|
channel?: string
|
|
76
|
-
|
|
77
62
|
ts?: string
|
|
78
|
-
|
|
79
63
|
[key: string]: any
|
|
80
64
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
[key: string]: any
|
|
88
|
-
}
|
|
65
|
+
export type ChatConfig = ChatOptions;
|
|
66
|
+
/**
|
|
67
|
+
* Chat driver options
|
|
68
|
+
*/
|
|
69
|
+
export type ChatOptions = Record<string, any>;
|