@pikku/addon-graph 0.0.3 → 0.12.0
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/.pikku/addon/pikku-addon-types.gen.ts +105 -0
- package/.pikku/addon/pikku-package.gen.ts +11 -0
- package/.pikku/agent/pikku-agent-map.gen.d.ts +4 -0
- package/.pikku/agent/pikku-agent-types.gen.ts +82 -0
- package/.pikku/channel/pikku-channel-types.gen.ts +177 -0
- package/.pikku/cli/pikku-cli-types.gen.ts +105 -0
- package/.pikku/console/pikku-addon-meta.gen.json +281 -0
- package/.pikku/console/pikku-node-types.gen.ts +8 -0
- package/.pikku/function/pikku-function-types.gen.ts +684 -0
- package/.pikku/function/pikku-functions-meta-verbose.gen.json +660 -0
- package/.pikku/function/pikku-functions-meta.gen.json +450 -0
- package/.pikku/function/pikku-functions-meta.gen.ts +7 -0
- package/.pikku/function/pikku-functions.gen.ts +56 -0
- package/.pikku/http/pikku-http-types.gen.ts +147 -0
- package/.pikku/mcp/pikku-mcp-types.gen.ts +183 -0
- package/.pikku/pikku-bootstrap.gen.ts +8 -0
- package/.pikku/pikku-meta-service.gen.ts +10 -0
- package/.pikku/pikku-services.gen.ts +39 -0
- package/.pikku/pikku-types.gen.ts +21 -0
- package/.pikku/queue/pikku-queue-types.gen.ts +27 -0
- package/.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts +488 -0
- package/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +513 -0
- package/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +27 -0
- package/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts +6 -0
- package/.pikku/scheduler/pikku-scheduler-types.gen.ts +25 -0
- package/.pikku/schemas/register.gen.ts +199 -0
- package/.pikku/schemas/schemas/AggregateInput.schema.json +1 -0
- package/.pikku/schemas/schemas/AggregateOutput.schema.json +1 -0
- package/.pikku/schemas/schemas/ChunkInput.schema.json +1 -0
- package/.pikku/schemas/schemas/ChunkOutput.schema.json +1 -0
- package/.pikku/schemas/schemas/CoalesceInput.schema.json +1 -0
- package/.pikku/schemas/schemas/CoalesceOutput.schema.json +1 -0
- package/.pikku/schemas/schemas/CryptoInput.schema.json +1 -0
- package/.pikku/schemas/schemas/CryptoOutput.schema.json +1 -0
- package/.pikku/schemas/schemas/DateTimeInput.schema.json +1 -0
- package/.pikku/schemas/schemas/DateTimeOutput.schema.json +1 -0
- package/.pikku/schemas/schemas/EditFieldsInput.schema.json +1 -0
- package/.pikku/schemas/schemas/EditFieldsOutput.schema.json +1 -0
- package/.pikku/schemas/schemas/FindInput.schema.json +1 -0
- package/.pikku/schemas/schemas/FindOutput.schema.json +1 -0
- package/.pikku/schemas/schemas/GroupByInput.schema.json +1 -0
- package/.pikku/schemas/schemas/GroupByOutput.schema.json +1 -0
- package/.pikku/schemas/schemas/JwtDecodeInput.schema.json +1 -0
- package/.pikku/schemas/schemas/JwtDecodeOutput.schema.json +1 -0
- package/.pikku/schemas/schemas/JwtSignInput.schema.json +1 -0
- package/.pikku/schemas/schemas/JwtSignOutput.schema.json +1 -0
- package/.pikku/schemas/schemas/LimitInput.schema.json +1 -0
- package/.pikku/schemas/schemas/LimitOutput.schema.json +1 -0
- package/.pikku/schemas/schemas/MathInput.schema.json +1 -0
- package/.pikku/schemas/schemas/MathOutput.schema.json +1 -0
- package/.pikku/schemas/schemas/MergeInput.schema.json +1 -0
- package/.pikku/schemas/schemas/MergeOutput.schema.json +1 -0
- package/.pikku/schemas/schemas/OmitInput.schema.json +1 -0
- package/.pikku/schemas/schemas/OmitOutput.schema.json +1 -0
- package/.pikku/schemas/schemas/PickInput.schema.json +1 -0
- package/.pikku/schemas/schemas/PickOutput.schema.json +1 -0
- package/.pikku/schemas/schemas/RemoveDuplicatesInput.schema.json +1 -0
- package/.pikku/schemas/schemas/RemoveDuplicatesOutput.schema.json +1 -0
- package/.pikku/schemas/schemas/RenameKeysInput.schema.json +1 -0
- package/.pikku/schemas/schemas/RenameKeysOutput.schema.json +1 -0
- package/.pikku/schemas/schemas/ReverseInput.schema.json +1 -0
- package/.pikku/schemas/schemas/ReverseOutput.schema.json +1 -0
- package/.pikku/schemas/schemas/SleepInput.schema.json +1 -0
- package/.pikku/schemas/schemas/SortInput.schema.json +1 -0
- package/.pikku/schemas/schemas/SortOutput.schema.json +1 -0
- package/.pikku/schemas/schemas/SplitOutInput.schema.json +1 -0
- package/.pikku/schemas/schemas/SplitOutOutput.schema.json +1 -0
- package/.pikku/schemas/schemas/StringTransformInput.schema.json +1 -0
- package/.pikku/schemas/schemas/StringTransformOutput.schema.json +1 -0
- package/.pikku/schemas/schemas/SummarizeInput.schema.json +1 -0
- package/.pikku/schemas/schemas/SummarizeOutput.schema.json +1 -0
- package/.pikku/schemas/schemas/TypeConvertInput.schema.json +1 -0
- package/.pikku/schemas/schemas/TypeConvertOutput.schema.json +1 -0
- package/.pikku/schemas/schemas/UniqueInput.schema.json +1 -0
- package/.pikku/schemas/schemas/UniqueOutput.schema.json +1 -0
- package/.pikku/secrets/pikku-secret-types.gen.ts +5 -0
- package/.pikku/secrets/pikku-secrets-meta.gen.json +1 -0
- package/.pikku/secrets/pikku-secrets.gen.ts +21 -0
- package/.pikku/trigger/pikku-trigger-types.gen.ts +160 -0
- package/.pikku/variables/pikku-variable-types.gen.ts +5 -0
- package/.pikku/variables/pikku-variables-meta.gen.json +1 -0
- package/.pikku/variables/pikku-variables.gen.ts +21 -0
- package/.pikku/workflow/pikku-workflow-map.gen.d.ts +38 -0
- package/.pikku/workflow/pikku-workflow-types.gen.ts +167 -0
- package/.pikku/workflow/pikku-workflow-wirings-meta.gen.ts +9 -0
- package/.pikku/workflow/pikku-workflow-wirings.gen.ts +3 -0
- package/dist/.pikku/addon/pikku-addon-types.gen.d.ts +3 -3
- package/dist/.pikku/addon/pikku-addon-types.gen.d.ts.map +1 -1
- package/dist/.pikku/addon/pikku-addon-types.gen.js +6 -2
- package/dist/.pikku/addon/pikku-addon-types.gen.js.map +1 -1
- package/dist/.pikku/addon/pikku-addon-types.gen.ts +10 -5
- package/dist/.pikku/addon/pikku-package.gen.js +2 -1
- package/dist/.pikku/addon/pikku-package.gen.js.map +1 -1
- package/dist/.pikku/addon/pikku-package.gen.ts +3 -1
- package/dist/.pikku/agent/pikku-agent-map.gen.d.ts +2 -14
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +1 -1
- package/dist/.pikku/agent/pikku-agent-types.gen.ts +1 -1
- package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +112 -0
- package/dist/.pikku/channel/pikku-channel-types.gen.d.ts.map +1 -0
- package/dist/.pikku/channel/pikku-channel-types.gen.js +60 -0
- package/dist/.pikku/channel/pikku-channel-types.gen.js.map +1 -0
- package/dist/.pikku/channel/pikku-channel-types.gen.ts +177 -0
- package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +78 -0
- package/dist/.pikku/cli/pikku-cli-types.gen.d.ts.map +1 -0
- package/dist/.pikku/cli/pikku-cli-types.gen.js +61 -0
- package/dist/.pikku/cli/pikku-cli-types.gen.js.map +1 -0
- package/dist/.pikku/cli/pikku-cli-types.gen.ts +105 -0
- package/dist/.pikku/console/pikku-node-types.gen.d.ts +1 -1
- package/dist/.pikku/console/pikku-node-types.gen.ts +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.d.ts +16 -19
- package/dist/.pikku/function/pikku-function-types.gen.d.ts.map +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.js +15 -19
- package/dist/.pikku/function/pikku-function-types.gen.js.map +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.ts +18 -20
- package/dist/.pikku/function/pikku-functions-meta-verbose.gen.json +50 -0
- package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.ts +1 -1
- package/dist/.pikku/function/pikku-functions.gen.js +2 -2
- package/dist/.pikku/function/pikku-functions.gen.js.map +1 -1
- package/dist/.pikku/function/pikku-functions.gen.ts +2 -2
- package/dist/.pikku/http/pikku-http-types.gen.d.ts +120 -0
- package/dist/.pikku/http/pikku-http-types.gen.d.ts.map +1 -0
- package/dist/.pikku/http/pikku-http-types.gen.js +72 -0
- package/dist/.pikku/http/pikku-http-types.gen.js.map +1 -0
- package/dist/.pikku/http/pikku-http-types.gen.ts +147 -0
- package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +131 -0
- package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts.map +1 -0
- package/dist/.pikku/mcp/pikku-mcp-types.gen.js +38 -0
- package/dist/.pikku/mcp/pikku-mcp-types.gen.js.map +1 -0
- package/dist/.pikku/mcp/pikku-mcp-types.gen.ts +183 -0
- package/dist/.pikku/pikku-bootstrap.gen.d.ts +4 -2
- package/dist/.pikku/pikku-bootstrap.gen.d.ts.map +1 -1
- package/dist/.pikku/pikku-bootstrap.gen.js +2 -10
- package/dist/.pikku/pikku-bootstrap.gen.js.map +1 -1
- package/dist/.pikku/pikku-bootstrap.gen.ts +2 -9
- package/dist/.pikku/pikku-meta-service.gen.d.ts +8 -0
- package/dist/.pikku/pikku-meta-service.gen.d.ts.map +1 -0
- package/dist/.pikku/pikku-meta-service.gen.js +10 -0
- package/dist/.pikku/pikku-meta-service.gen.js.map +1 -0
- package/dist/.pikku/pikku-meta-service.gen.ts +10 -0
- package/dist/.pikku/pikku-services.gen.d.ts +6 -3
- package/dist/.pikku/pikku-services.gen.d.ts.map +1 -1
- package/dist/.pikku/pikku-services.gen.js +5 -1
- package/dist/.pikku/pikku-services.gen.js.map +1 -1
- package/dist/.pikku/pikku-services.gen.ts +8 -3
- package/dist/.pikku/pikku-types.gen.d.ts +1 -1
- package/dist/.pikku/pikku-types.gen.js +1 -1
- package/dist/.pikku/pikku-types.gen.ts +1 -1
- package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +24 -0
- package/dist/.pikku/queue/pikku-queue-types.gen.d.ts.map +1 -0
- package/dist/.pikku/queue/pikku-queue-types.gen.js +17 -0
- package/dist/.pikku/queue/pikku-queue-types.gen.js.map +1 -0
- package/dist/.pikku/queue/pikku-queue-types.gen.ts +27 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts +421 -57
- package/dist/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +421 -57
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.d.ts +2 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.d.ts.map +1 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +7 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js.map +1 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +27 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts +6 -0
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +22 -0
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts.map +1 -0
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +17 -0
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js.map +1 -0
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.ts +25 -0
- package/dist/.pikku/schemas/register.gen.js +1 -1
- package/dist/.pikku/schemas/register.gen.ts +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.ts +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.js +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.ts +1 -1
- package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
- package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
- package/dist/.pikku/trigger/pikku-trigger-types.gen.ts +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.ts +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.d.ts +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.js +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.ts +1 -1
- package/dist/.pikku/workflow/pikku-workflow-map.gen.d.ts +9 -5
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +3 -24
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts.map +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js +1 -14
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js.map +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.ts +5 -52
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.ts +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.d.ts +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.ts +1 -1
- package/dist/src/functions/data/jwt.function.d.ts.map +1 -1
- package/dist/src/functions/data/jwt.function.js +3 -2
- package/dist/src/functions/data/jwt.function.js.map +1 -1
- package/package.json +7 -9
- package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.d.ts +0 -2
- package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.d.ts.map +0 -1
- package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.js +0 -7
- package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.js.map +0 -1
- package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.json +0 -3
- package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.ts +0 -7
- package/dist/.pikku/agent/pikku-agent-wirings.gen.d.ts +0 -5
- package/dist/.pikku/agent/pikku-agent-wirings.gen.d.ts.map +0 -1
- package/dist/.pikku/agent/pikku-agent-wirings.gen.js +0 -5
- package/dist/.pikku/agent/pikku-agent-wirings.gen.js.map +0 -1
- package/dist/.pikku/agent/pikku-agent-wirings.gen.ts +0 -3
- package/dist/.pikku/schema-cache.json +0 -1
- package/dist/.pikku/schemas/pikku.cache.json +0 -1
|
@@ -0,0 +1,450 @@
|
|
|
1
|
+
{
|
|
2
|
+
"aggregate": {
|
|
3
|
+
"pikkuFuncId": "aggregate",
|
|
4
|
+
"functionType": "user",
|
|
5
|
+
"funcWrapper": "pikkuSessionlessFunc",
|
|
6
|
+
"sessionless": true,
|
|
7
|
+
"name": "aggregate",
|
|
8
|
+
"inputSchemaName": "AggregateInput",
|
|
9
|
+
"outputSchemaName": "AggregateOutput",
|
|
10
|
+
"inputs": [
|
|
11
|
+
"AggregateInput"
|
|
12
|
+
],
|
|
13
|
+
"outputs": [
|
|
14
|
+
"AggregateOutput"
|
|
15
|
+
],
|
|
16
|
+
"contractHash": "6646e357810ff732",
|
|
17
|
+
"inputHash": "7095d4db",
|
|
18
|
+
"outputHash": "e975f06d"
|
|
19
|
+
},
|
|
20
|
+
"chunk": {
|
|
21
|
+
"pikkuFuncId": "chunk",
|
|
22
|
+
"functionType": "user",
|
|
23
|
+
"funcWrapper": "pikkuSessionlessFunc",
|
|
24
|
+
"sessionless": true,
|
|
25
|
+
"name": "chunk",
|
|
26
|
+
"inputSchemaName": "ChunkInput",
|
|
27
|
+
"outputSchemaName": "ChunkOutput",
|
|
28
|
+
"inputs": [
|
|
29
|
+
"ChunkInput"
|
|
30
|
+
],
|
|
31
|
+
"outputs": [
|
|
32
|
+
"ChunkOutput"
|
|
33
|
+
],
|
|
34
|
+
"contractHash": "f3e025ccc0be3aa8",
|
|
35
|
+
"inputHash": "9e3887d0",
|
|
36
|
+
"outputHash": "09634b84"
|
|
37
|
+
},
|
|
38
|
+
"find": {
|
|
39
|
+
"pikkuFuncId": "find",
|
|
40
|
+
"functionType": "user",
|
|
41
|
+
"funcWrapper": "pikkuSessionlessFunc",
|
|
42
|
+
"sessionless": true,
|
|
43
|
+
"name": "find",
|
|
44
|
+
"inputSchemaName": "FindInput",
|
|
45
|
+
"outputSchemaName": "FindOutput",
|
|
46
|
+
"inputs": [
|
|
47
|
+
"FindInput"
|
|
48
|
+
],
|
|
49
|
+
"outputs": [
|
|
50
|
+
"FindOutput"
|
|
51
|
+
],
|
|
52
|
+
"contractHash": "d916d83598f3942c",
|
|
53
|
+
"inputHash": "463866fb",
|
|
54
|
+
"outputHash": "c8cf3580"
|
|
55
|
+
},
|
|
56
|
+
"groupBy": {
|
|
57
|
+
"pikkuFuncId": "groupBy",
|
|
58
|
+
"functionType": "user",
|
|
59
|
+
"funcWrapper": "pikkuSessionlessFunc",
|
|
60
|
+
"sessionless": true,
|
|
61
|
+
"name": "groupBy",
|
|
62
|
+
"inputSchemaName": "GroupByInput",
|
|
63
|
+
"outputSchemaName": "GroupByOutput",
|
|
64
|
+
"inputs": [
|
|
65
|
+
"GroupByInput"
|
|
66
|
+
],
|
|
67
|
+
"outputs": [
|
|
68
|
+
"GroupByOutput"
|
|
69
|
+
],
|
|
70
|
+
"contractHash": "983fc1270a3ef585",
|
|
71
|
+
"inputHash": "a559ec54",
|
|
72
|
+
"outputHash": "cbd369f9"
|
|
73
|
+
},
|
|
74
|
+
"limit": {
|
|
75
|
+
"pikkuFuncId": "limit",
|
|
76
|
+
"functionType": "user",
|
|
77
|
+
"funcWrapper": "pikkuSessionlessFunc",
|
|
78
|
+
"sessionless": true,
|
|
79
|
+
"name": "limit",
|
|
80
|
+
"inputSchemaName": "LimitInput",
|
|
81
|
+
"outputSchemaName": "LimitOutput",
|
|
82
|
+
"inputs": [
|
|
83
|
+
"LimitInput"
|
|
84
|
+
],
|
|
85
|
+
"outputs": [
|
|
86
|
+
"LimitOutput"
|
|
87
|
+
],
|
|
88
|
+
"contractHash": "634a5e4e1e4618a6",
|
|
89
|
+
"inputHash": "dd5593d3",
|
|
90
|
+
"outputHash": "82f7aa38"
|
|
91
|
+
},
|
|
92
|
+
"removeDuplicates": {
|
|
93
|
+
"pikkuFuncId": "removeDuplicates",
|
|
94
|
+
"functionType": "user",
|
|
95
|
+
"funcWrapper": "pikkuSessionlessFunc",
|
|
96
|
+
"sessionless": true,
|
|
97
|
+
"name": "removeDuplicates",
|
|
98
|
+
"inputSchemaName": "RemoveDuplicatesInput",
|
|
99
|
+
"outputSchemaName": "RemoveDuplicatesOutput",
|
|
100
|
+
"inputs": [
|
|
101
|
+
"RemoveDuplicatesInput"
|
|
102
|
+
],
|
|
103
|
+
"outputs": [
|
|
104
|
+
"RemoveDuplicatesOutput"
|
|
105
|
+
],
|
|
106
|
+
"contractHash": "ece62358aebbd4f4",
|
|
107
|
+
"inputHash": "a7dec329",
|
|
108
|
+
"outputHash": "93cbcf6f"
|
|
109
|
+
},
|
|
110
|
+
"reverse": {
|
|
111
|
+
"pikkuFuncId": "reverse",
|
|
112
|
+
"functionType": "user",
|
|
113
|
+
"funcWrapper": "pikkuSessionlessFunc",
|
|
114
|
+
"sessionless": true,
|
|
115
|
+
"name": "reverse",
|
|
116
|
+
"inputSchemaName": "ReverseInput",
|
|
117
|
+
"outputSchemaName": "ReverseOutput",
|
|
118
|
+
"inputs": [
|
|
119
|
+
"ReverseInput"
|
|
120
|
+
],
|
|
121
|
+
"outputs": [
|
|
122
|
+
"ReverseOutput"
|
|
123
|
+
],
|
|
124
|
+
"contractHash": "9673137c6f655969",
|
|
125
|
+
"inputHash": "1b826e9b",
|
|
126
|
+
"outputHash": "c609276e"
|
|
127
|
+
},
|
|
128
|
+
"sort": {
|
|
129
|
+
"pikkuFuncId": "sort",
|
|
130
|
+
"functionType": "user",
|
|
131
|
+
"funcWrapper": "pikkuSessionlessFunc",
|
|
132
|
+
"sessionless": true,
|
|
133
|
+
"name": "sort",
|
|
134
|
+
"inputSchemaName": "SortInput",
|
|
135
|
+
"outputSchemaName": "SortOutput",
|
|
136
|
+
"inputs": [
|
|
137
|
+
"SortInput"
|
|
138
|
+
],
|
|
139
|
+
"outputs": [
|
|
140
|
+
"SortOutput"
|
|
141
|
+
],
|
|
142
|
+
"contractHash": "8eab9165a4055318",
|
|
143
|
+
"inputHash": "1bd5a514",
|
|
144
|
+
"outputHash": "d1904adf"
|
|
145
|
+
},
|
|
146
|
+
"splitOut": {
|
|
147
|
+
"pikkuFuncId": "splitOut",
|
|
148
|
+
"functionType": "user",
|
|
149
|
+
"funcWrapper": "pikkuSessionlessFunc",
|
|
150
|
+
"sessionless": true,
|
|
151
|
+
"name": "splitOut",
|
|
152
|
+
"inputSchemaName": "SplitOutInput",
|
|
153
|
+
"outputSchemaName": "SplitOutOutput",
|
|
154
|
+
"inputs": [
|
|
155
|
+
"SplitOutInput"
|
|
156
|
+
],
|
|
157
|
+
"outputs": [
|
|
158
|
+
"SplitOutOutput"
|
|
159
|
+
],
|
|
160
|
+
"contractHash": "a4c3f093e598a514",
|
|
161
|
+
"inputHash": "c8e65194",
|
|
162
|
+
"outputHash": "608db389"
|
|
163
|
+
},
|
|
164
|
+
"summarize": {
|
|
165
|
+
"pikkuFuncId": "summarize",
|
|
166
|
+
"functionType": "user",
|
|
167
|
+
"funcWrapper": "pikkuSessionlessFunc",
|
|
168
|
+
"sessionless": true,
|
|
169
|
+
"name": "summarize",
|
|
170
|
+
"inputSchemaName": "SummarizeInput",
|
|
171
|
+
"outputSchemaName": "SummarizeOutput",
|
|
172
|
+
"inputs": [
|
|
173
|
+
"SummarizeInput"
|
|
174
|
+
],
|
|
175
|
+
"outputs": [
|
|
176
|
+
"SummarizeOutput"
|
|
177
|
+
],
|
|
178
|
+
"contractHash": "ab78ac6eed8b2ce0",
|
|
179
|
+
"inputHash": "7d7d0173",
|
|
180
|
+
"outputHash": "b03990e8"
|
|
181
|
+
},
|
|
182
|
+
"unique": {
|
|
183
|
+
"pikkuFuncId": "unique",
|
|
184
|
+
"functionType": "user",
|
|
185
|
+
"funcWrapper": "pikkuSessionlessFunc",
|
|
186
|
+
"sessionless": true,
|
|
187
|
+
"name": "unique",
|
|
188
|
+
"inputSchemaName": "UniqueInput",
|
|
189
|
+
"outputSchemaName": "UniqueOutput",
|
|
190
|
+
"inputs": [
|
|
191
|
+
"UniqueInput"
|
|
192
|
+
],
|
|
193
|
+
"outputs": [
|
|
194
|
+
"UniqueOutput"
|
|
195
|
+
],
|
|
196
|
+
"contractHash": "af135d5702d2aca2",
|
|
197
|
+
"inputHash": "2a18be03",
|
|
198
|
+
"outputHash": "b24ac8e7"
|
|
199
|
+
},
|
|
200
|
+
"coalesce": {
|
|
201
|
+
"pikkuFuncId": "coalesce",
|
|
202
|
+
"functionType": "user",
|
|
203
|
+
"funcWrapper": "pikkuSessionlessFunc",
|
|
204
|
+
"sessionless": true,
|
|
205
|
+
"name": "coalesce",
|
|
206
|
+
"inputSchemaName": "CoalesceInput",
|
|
207
|
+
"outputSchemaName": "CoalesceOutput",
|
|
208
|
+
"inputs": [
|
|
209
|
+
"CoalesceInput"
|
|
210
|
+
],
|
|
211
|
+
"outputs": [
|
|
212
|
+
"CoalesceOutput"
|
|
213
|
+
],
|
|
214
|
+
"contractHash": "9aa1a02f90b8ed52",
|
|
215
|
+
"inputHash": "d1baf6ed",
|
|
216
|
+
"outputHash": "eef08a58"
|
|
217
|
+
},
|
|
218
|
+
"crypto": {
|
|
219
|
+
"pikkuFuncId": "crypto",
|
|
220
|
+
"functionType": "user",
|
|
221
|
+
"funcWrapper": "pikkuSessionlessFunc",
|
|
222
|
+
"sessionless": true,
|
|
223
|
+
"name": "crypto",
|
|
224
|
+
"inputSchemaName": "CryptoInput",
|
|
225
|
+
"outputSchemaName": "CryptoOutput",
|
|
226
|
+
"inputs": [
|
|
227
|
+
"CryptoInput"
|
|
228
|
+
],
|
|
229
|
+
"outputs": [
|
|
230
|
+
"CryptoOutput"
|
|
231
|
+
],
|
|
232
|
+
"contractHash": "9e2e5b2bc9df616e",
|
|
233
|
+
"inputHash": "60d6d839",
|
|
234
|
+
"outputHash": "38bec130"
|
|
235
|
+
},
|
|
236
|
+
"dateTime": {
|
|
237
|
+
"pikkuFuncId": "dateTime",
|
|
238
|
+
"functionType": "user",
|
|
239
|
+
"funcWrapper": "pikkuSessionlessFunc",
|
|
240
|
+
"sessionless": true,
|
|
241
|
+
"name": "dateTime",
|
|
242
|
+
"inputSchemaName": "DateTimeInput",
|
|
243
|
+
"outputSchemaName": "DateTimeOutput",
|
|
244
|
+
"inputs": [
|
|
245
|
+
"DateTimeInput"
|
|
246
|
+
],
|
|
247
|
+
"outputs": [
|
|
248
|
+
"DateTimeOutput"
|
|
249
|
+
],
|
|
250
|
+
"contractHash": "b297121a74826469",
|
|
251
|
+
"inputHash": "fbb83641",
|
|
252
|
+
"outputHash": "93b7219a"
|
|
253
|
+
},
|
|
254
|
+
"jwtSign": {
|
|
255
|
+
"pikkuFuncId": "jwtSign",
|
|
256
|
+
"functionType": "user",
|
|
257
|
+
"funcWrapper": "pikkuSessionlessFunc",
|
|
258
|
+
"sessionless": true,
|
|
259
|
+
"name": "jwtSign",
|
|
260
|
+
"inputSchemaName": "JwtSignInput",
|
|
261
|
+
"outputSchemaName": "JwtSignOutput",
|
|
262
|
+
"inputs": [
|
|
263
|
+
"JwtSignInput"
|
|
264
|
+
],
|
|
265
|
+
"outputs": [
|
|
266
|
+
"JwtSignOutput"
|
|
267
|
+
],
|
|
268
|
+
"contractHash": "75f181ad1396ce9d",
|
|
269
|
+
"inputHash": "6c178a3f",
|
|
270
|
+
"outputHash": "5490ba45"
|
|
271
|
+
},
|
|
272
|
+
"jwtDecode": {
|
|
273
|
+
"pikkuFuncId": "jwtDecode",
|
|
274
|
+
"functionType": "user",
|
|
275
|
+
"funcWrapper": "pikkuSessionlessFunc",
|
|
276
|
+
"sessionless": true,
|
|
277
|
+
"name": "jwtDecode",
|
|
278
|
+
"inputSchemaName": "JwtDecodeInput",
|
|
279
|
+
"outputSchemaName": "JwtDecodeOutput",
|
|
280
|
+
"inputs": [
|
|
281
|
+
"JwtDecodeInput"
|
|
282
|
+
],
|
|
283
|
+
"outputs": [
|
|
284
|
+
"JwtDecodeOutput"
|
|
285
|
+
],
|
|
286
|
+
"contractHash": "3fc7b49a6cdaf7f0",
|
|
287
|
+
"inputHash": "4401b17b",
|
|
288
|
+
"outputHash": "7752bc62"
|
|
289
|
+
},
|
|
290
|
+
"math": {
|
|
291
|
+
"pikkuFuncId": "math",
|
|
292
|
+
"functionType": "user",
|
|
293
|
+
"funcWrapper": "pikkuSessionlessFunc",
|
|
294
|
+
"sessionless": true,
|
|
295
|
+
"name": "math",
|
|
296
|
+
"inputSchemaName": "MathInput",
|
|
297
|
+
"outputSchemaName": "MathOutput",
|
|
298
|
+
"inputs": [
|
|
299
|
+
"MathInput"
|
|
300
|
+
],
|
|
301
|
+
"outputs": [
|
|
302
|
+
"MathOutput"
|
|
303
|
+
],
|
|
304
|
+
"contractHash": "6777194d9fa978a2",
|
|
305
|
+
"inputHash": "91f5f92b",
|
|
306
|
+
"outputHash": "473f23f2"
|
|
307
|
+
},
|
|
308
|
+
"sleep": {
|
|
309
|
+
"pikkuFuncId": "sleep",
|
|
310
|
+
"functionType": "user",
|
|
311
|
+
"funcWrapper": "pikkuSessionlessFunc",
|
|
312
|
+
"sessionless": true,
|
|
313
|
+
"name": "sleep",
|
|
314
|
+
"inputSchemaName": "SleepInput",
|
|
315
|
+
"outputSchemaName": null,
|
|
316
|
+
"inputs": [
|
|
317
|
+
"SleepInput"
|
|
318
|
+
],
|
|
319
|
+
"outputs": [],
|
|
320
|
+
"contractHash": "649686d11b09c275",
|
|
321
|
+
"inputHash": "9fd961b9",
|
|
322
|
+
"outputHash": "ec28f86f"
|
|
323
|
+
},
|
|
324
|
+
"stringTransform": {
|
|
325
|
+
"pikkuFuncId": "stringTransform",
|
|
326
|
+
"functionType": "user",
|
|
327
|
+
"funcWrapper": "pikkuSessionlessFunc",
|
|
328
|
+
"sessionless": true,
|
|
329
|
+
"name": "stringTransform",
|
|
330
|
+
"inputSchemaName": "StringTransformInput",
|
|
331
|
+
"outputSchemaName": "StringTransformOutput",
|
|
332
|
+
"inputs": [
|
|
333
|
+
"StringTransformInput"
|
|
334
|
+
],
|
|
335
|
+
"outputs": [
|
|
336
|
+
"StringTransformOutput"
|
|
337
|
+
],
|
|
338
|
+
"contractHash": "a4cd02c14224c4e6",
|
|
339
|
+
"inputHash": "38037e18",
|
|
340
|
+
"outputHash": "5bfa9735"
|
|
341
|
+
},
|
|
342
|
+
"typeConvert": {
|
|
343
|
+
"pikkuFuncId": "typeConvert",
|
|
344
|
+
"functionType": "user",
|
|
345
|
+
"funcWrapper": "pikkuSessionlessFunc",
|
|
346
|
+
"sessionless": true,
|
|
347
|
+
"name": "typeConvert",
|
|
348
|
+
"inputSchemaName": "TypeConvertInput",
|
|
349
|
+
"outputSchemaName": "TypeConvertOutput",
|
|
350
|
+
"inputs": [
|
|
351
|
+
"TypeConvertInput"
|
|
352
|
+
],
|
|
353
|
+
"outputs": [
|
|
354
|
+
"TypeConvertOutput"
|
|
355
|
+
],
|
|
356
|
+
"contractHash": "a3bfeff5301903cc",
|
|
357
|
+
"inputHash": "3d6e4ac1",
|
|
358
|
+
"outputHash": "da7680c1"
|
|
359
|
+
},
|
|
360
|
+
"editFields": {
|
|
361
|
+
"pikkuFuncId": "editFields",
|
|
362
|
+
"functionType": "user",
|
|
363
|
+
"funcWrapper": "pikkuSessionlessFunc",
|
|
364
|
+
"sessionless": true,
|
|
365
|
+
"name": "editFields",
|
|
366
|
+
"inputSchemaName": "EditFieldsInput",
|
|
367
|
+
"outputSchemaName": "EditFieldsOutput",
|
|
368
|
+
"inputs": [
|
|
369
|
+
"EditFieldsInput"
|
|
370
|
+
],
|
|
371
|
+
"outputs": [
|
|
372
|
+
"EditFieldsOutput"
|
|
373
|
+
],
|
|
374
|
+
"contractHash": "860bd8089f3abd16",
|
|
375
|
+
"inputHash": "9b45e130",
|
|
376
|
+
"outputHash": "bc79d970"
|
|
377
|
+
},
|
|
378
|
+
"merge": {
|
|
379
|
+
"pikkuFuncId": "merge",
|
|
380
|
+
"functionType": "user",
|
|
381
|
+
"funcWrapper": "pikkuSessionlessFunc",
|
|
382
|
+
"sessionless": true,
|
|
383
|
+
"name": "merge",
|
|
384
|
+
"inputSchemaName": "MergeInput",
|
|
385
|
+
"outputSchemaName": "MergeOutput",
|
|
386
|
+
"inputs": [
|
|
387
|
+
"MergeInput"
|
|
388
|
+
],
|
|
389
|
+
"outputs": [
|
|
390
|
+
"MergeOutput"
|
|
391
|
+
],
|
|
392
|
+
"contractHash": "b07476afacdae525",
|
|
393
|
+
"inputHash": "1ad17e4d",
|
|
394
|
+
"outputHash": "0171e51c"
|
|
395
|
+
},
|
|
396
|
+
"omit": {
|
|
397
|
+
"pikkuFuncId": "omit",
|
|
398
|
+
"functionType": "user",
|
|
399
|
+
"funcWrapper": "pikkuSessionlessFunc",
|
|
400
|
+
"sessionless": true,
|
|
401
|
+
"name": "omit",
|
|
402
|
+
"inputSchemaName": "OmitInput",
|
|
403
|
+
"outputSchemaName": "OmitOutput",
|
|
404
|
+
"inputs": [
|
|
405
|
+
"OmitInput"
|
|
406
|
+
],
|
|
407
|
+
"outputs": [
|
|
408
|
+
"OmitOutput"
|
|
409
|
+
],
|
|
410
|
+
"contractHash": "dec15e51c95ffb1a",
|
|
411
|
+
"inputHash": "8a6dda94",
|
|
412
|
+
"outputHash": "6a6fb8c6"
|
|
413
|
+
},
|
|
414
|
+
"pick": {
|
|
415
|
+
"pikkuFuncId": "pick",
|
|
416
|
+
"functionType": "user",
|
|
417
|
+
"funcWrapper": "pikkuSessionlessFunc",
|
|
418
|
+
"sessionless": true,
|
|
419
|
+
"name": "pick",
|
|
420
|
+
"inputSchemaName": "PickInput",
|
|
421
|
+
"outputSchemaName": "PickOutput",
|
|
422
|
+
"inputs": [
|
|
423
|
+
"PickInput"
|
|
424
|
+
],
|
|
425
|
+
"outputs": [
|
|
426
|
+
"PickOutput"
|
|
427
|
+
],
|
|
428
|
+
"contractHash": "eee51c32e58e1297",
|
|
429
|
+
"inputHash": "8be4abcf",
|
|
430
|
+
"outputHash": "94b236c1"
|
|
431
|
+
},
|
|
432
|
+
"renameKeys": {
|
|
433
|
+
"pikkuFuncId": "renameKeys",
|
|
434
|
+
"functionType": "user",
|
|
435
|
+
"funcWrapper": "pikkuSessionlessFunc",
|
|
436
|
+
"sessionless": true,
|
|
437
|
+
"name": "renameKeys",
|
|
438
|
+
"inputSchemaName": "RenameKeysInput",
|
|
439
|
+
"outputSchemaName": "RenameKeysOutput",
|
|
440
|
+
"inputs": [
|
|
441
|
+
"RenameKeysInput"
|
|
442
|
+
],
|
|
443
|
+
"outputs": [
|
|
444
|
+
"RenameKeysOutput"
|
|
445
|
+
],
|
|
446
|
+
"contractHash": "8921f9a567b68dd7",
|
|
447
|
+
"inputHash": "0ff4890b",
|
|
448
|
+
"outputHash": "53ddf4c9"
|
|
449
|
+
}
|
|
450
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.19
|
|
3
|
+
*/
|
|
4
|
+
import { pikkuState } from '@pikku/core/internal'
|
|
5
|
+
import type { FunctionsMeta } from '@pikku/core'
|
|
6
|
+
import metaData from './pikku-functions-meta.gen.json' with { type: 'json' }
|
|
7
|
+
pikkuState('@pikku/addon-graph', 'function', 'meta', metaData as FunctionsMeta)
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.19
|
|
3
|
+
*/
|
|
4
|
+
/* Import and register functions used by RPCs */
|
|
5
|
+
import { addFunction } from '@pikku/core/function'
|
|
6
|
+
import { aggregate } from '../../src/functions/array/aggregate.function.js'
|
|
7
|
+
import { chunk } from '../../src/functions/array/chunk.function.js'
|
|
8
|
+
import { coalesce } from '../../src/functions/data/coalesce.function.js'
|
|
9
|
+
import { crypto } from '../../src/functions/data/crypto.function.js'
|
|
10
|
+
import { dateTime } from '../../src/functions/data/date-time.function.js'
|
|
11
|
+
import { editFields } from '../../src/functions/transform/edit-fields.function.js'
|
|
12
|
+
import { find } from '../../src/functions/array/find.function.js'
|
|
13
|
+
import { groupBy } from '../../src/functions/array/group-by.function.js'
|
|
14
|
+
import { jwtDecode } from '../../src/functions/data/jwt.function.js'
|
|
15
|
+
import { jwtSign } from '../../src/functions/data/jwt.function.js'
|
|
16
|
+
import { limit } from '../../src/functions/array/limit.function.js'
|
|
17
|
+
import { math } from '../../src/functions/data/math.function.js'
|
|
18
|
+
import { merge } from '../../src/functions/transform/merge.function.js'
|
|
19
|
+
import { omit } from '../../src/functions/transform/omit.function.js'
|
|
20
|
+
import { pick } from '../../src/functions/transform/pick.function.js'
|
|
21
|
+
import { removeDuplicates } from '../../src/functions/array/remove-duplicates.function.js'
|
|
22
|
+
import { renameKeys } from '../../src/functions/transform/rename-keys.function.js'
|
|
23
|
+
import { reverse } from '../../src/functions/array/reverse.function.js'
|
|
24
|
+
import { sleep } from '../../src/functions/data/sleep.function.js'
|
|
25
|
+
import { sort } from '../../src/functions/array/sort.function.js'
|
|
26
|
+
import { splitOut } from '../../src/functions/array/split-out.function.js'
|
|
27
|
+
import { stringTransform } from '../../src/functions/data/string-transform.function.js'
|
|
28
|
+
import { summarize } from '../../src/functions/array/summarize.function.js'
|
|
29
|
+
import { typeConvert } from '../../src/functions/data/type-convert.function.js'
|
|
30
|
+
import { unique } from '../../src/functions/array/unique.function.js'
|
|
31
|
+
|
|
32
|
+
addFunction('aggregate', aggregate, '@pikku/addon-graph')
|
|
33
|
+
addFunction('chunk', chunk, '@pikku/addon-graph')
|
|
34
|
+
addFunction('coalesce', coalesce, '@pikku/addon-graph')
|
|
35
|
+
addFunction('crypto', crypto, '@pikku/addon-graph')
|
|
36
|
+
addFunction('dateTime', dateTime, '@pikku/addon-graph')
|
|
37
|
+
addFunction('editFields', editFields, '@pikku/addon-graph')
|
|
38
|
+
addFunction('find', find, '@pikku/addon-graph')
|
|
39
|
+
addFunction('groupBy', groupBy, '@pikku/addon-graph')
|
|
40
|
+
addFunction('jwtDecode', jwtDecode, '@pikku/addon-graph')
|
|
41
|
+
addFunction('jwtSign', jwtSign, '@pikku/addon-graph')
|
|
42
|
+
addFunction('limit', limit, '@pikku/addon-graph')
|
|
43
|
+
addFunction('math', math, '@pikku/addon-graph')
|
|
44
|
+
addFunction('merge', merge, '@pikku/addon-graph')
|
|
45
|
+
addFunction('omit', omit, '@pikku/addon-graph')
|
|
46
|
+
addFunction('pick', pick, '@pikku/addon-graph')
|
|
47
|
+
addFunction('removeDuplicates', removeDuplicates, '@pikku/addon-graph')
|
|
48
|
+
addFunction('renameKeys', renameKeys, '@pikku/addon-graph')
|
|
49
|
+
addFunction('reverse', reverse, '@pikku/addon-graph')
|
|
50
|
+
addFunction('sleep', sleep, '@pikku/addon-graph')
|
|
51
|
+
addFunction('sort', sort, '@pikku/addon-graph')
|
|
52
|
+
addFunction('splitOut', splitOut, '@pikku/addon-graph')
|
|
53
|
+
addFunction('stringTransform', stringTransform, '@pikku/addon-graph')
|
|
54
|
+
addFunction('summarize', summarize, '@pikku/addon-graph')
|
|
55
|
+
addFunction('typeConvert', typeConvert, '@pikku/addon-graph')
|
|
56
|
+
addFunction('unique', unique, '@pikku/addon-graph')
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.19
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* HTTP-specific type definitions for tree-shaking optimization
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { AssertHTTPWiringParams, wireHTTP as wireHTTPCore, addHTTPMiddleware as addHTTPMiddlewareCore, addHTTPPermission as addHTTPPermissionCore, wireHTTPRoutes as wireHTTPRoutesCore, defineHTTPRoutes as defineHTTPRoutesCore } from '@pikku/core/http'
|
|
9
|
+
import type { PikkuFunction, PikkuFunctionSessionless, PikkuPermission, PikkuMiddleware, PikkuFunctionConfig } from '../function/pikku-function-types.gen.js'
|
|
10
|
+
import type { CoreHTTPFunctionWiring, HTTPMethod, HTTPRouteBaseConfig } from '@pikku/core/http'
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Type definition for HTTP API wirings with type-safe path parameters.
|
|
14
|
+
* Supports both authenticated and unauthenticated functions.
|
|
15
|
+
*
|
|
16
|
+
* @template In - Input type for the HTTP wiring
|
|
17
|
+
* @template Out - Output type for the HTTP wiring
|
|
18
|
+
* @template Route - String literal type for the HTTP path (e.g., "/users/:id")
|
|
19
|
+
*/
|
|
20
|
+
type HTTPWiring<In, Out, Route extends string> = CoreHTTPFunctionWiring<In, Out, Route, PikkuFunction<In, Out, 'rpc' | 'session'>, PikkuFunctionSessionless<In, Out, 'rpc' | 'session'>, PikkuPermission<In>, PikkuMiddleware>
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Registers an HTTP wiring with the Pikku framework.
|
|
24
|
+
*
|
|
25
|
+
* @template In - Input type for the HTTP wiring
|
|
26
|
+
* @template Out - Output type for the HTTP wiring
|
|
27
|
+
* @template Route - String literal type for the HTTP path (e.g., "/users/:id")
|
|
28
|
+
* @param httpWiring - HTTP wiring definition with handler, method, and optional middleware
|
|
29
|
+
*/
|
|
30
|
+
export const wireHTTP = <In, Out, Route extends string>(
|
|
31
|
+
httpWiring: HTTPWiring<In, Out, Route> & AssertHTTPWiringParams<In, Route>
|
|
32
|
+
) => {
|
|
33
|
+
wireHTTPCore(httpWiring as any)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Registers HTTP middleware either globally or for a specific route pattern.
|
|
38
|
+
*
|
|
39
|
+
* When a string route pattern is provided along with middleware, the middleware
|
|
40
|
+
* is applied only to that route. Otherwise, if an array is provided, it is treated
|
|
41
|
+
* as global middleware (applied to all routes).
|
|
42
|
+
*
|
|
43
|
+
* @param routeOrMiddleware - Either a global middleware array or a route pattern string
|
|
44
|
+
* @param middleware - The middleware array to apply when a route pattern is specified
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```typescript
|
|
48
|
+
* // Add global HTTP middleware
|
|
49
|
+
* addHTTPMiddleware([authMiddleware, loggingMiddleware])
|
|
50
|
+
*
|
|
51
|
+
* // Add route-specific middleware
|
|
52
|
+
* addHTTPMiddleware('/api/admin/*', [adminAuthMiddleware])
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
export const addHTTPMiddleware = (
|
|
56
|
+
routeOrMiddleware: PikkuMiddleware[] | string,
|
|
57
|
+
middleware?: PikkuMiddleware[]
|
|
58
|
+
) => {
|
|
59
|
+
addHTTPMiddlewareCore(routeOrMiddleware as any, middleware as any)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Registers HTTP permissions either globally or for a specific route pattern.
|
|
64
|
+
*
|
|
65
|
+
* When a string route pattern is provided along with permissions, the permissions
|
|
66
|
+
* are applied only to that route. Permissions can be passed as an array or as a
|
|
67
|
+
* permission group object.
|
|
68
|
+
*
|
|
69
|
+
* @param pattern - Route pattern string (e.g., '*' for all routes, '/api/*' for specific routes)
|
|
70
|
+
* @param permissions - The permissions to apply for the specified route pattern
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```typescript
|
|
74
|
+
* // Add global HTTP permissions
|
|
75
|
+
* addHTTPPermission('*', { global: globalPermission })
|
|
76
|
+
*
|
|
77
|
+
* // Add route-specific permissions
|
|
78
|
+
* addHTTPPermission('/api/admin/*', { admin: adminPermission })
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
export const addHTTPPermission = <In = unknown>(
|
|
82
|
+
pattern: string,
|
|
83
|
+
permissions: Record<string, PikkuPermission<In>> | PikkuPermission<In>[]
|
|
84
|
+
) => {
|
|
85
|
+
addHTTPPermissionCore(pattern, permissions as any)
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Route configuration for wireHTTPRoutes with proper typing
|
|
90
|
+
*/
|
|
91
|
+
type HTTPRouteConfig = HTTPRouteBaseConfig & {
|
|
92
|
+
method: HTTPMethod
|
|
93
|
+
route: string
|
|
94
|
+
func: PikkuFunctionConfig<any, any, any, any, any, any>
|
|
95
|
+
auth?: boolean
|
|
96
|
+
permissions?: Record<string, PikkuPermission | PikkuPermission[]>
|
|
97
|
+
middleware?: PikkuMiddleware[]
|
|
98
|
+
sse?: boolean
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Typed route map for wireHTTPRoutes
|
|
103
|
+
*/
|
|
104
|
+
type TypedHTTPRouteMap = {
|
|
105
|
+
[key: string]: HTTPRouteConfig | TypedHTTPRouteMap | TypedHTTPRouteContract
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Typed route contract for defineHTTPRoutes
|
|
110
|
+
*/
|
|
111
|
+
type TypedHTTPRouteContract<T extends TypedHTTPRouteMap = TypedHTTPRouteMap> = TypedHTTPRoutesGroupConfig & {
|
|
112
|
+
routes: T
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Group config with typed middleware/permissions
|
|
117
|
+
*/
|
|
118
|
+
type TypedHTTPRoutesGroupConfig = {
|
|
119
|
+
basePath?: string
|
|
120
|
+
tags?: string[]
|
|
121
|
+
auth?: boolean
|
|
122
|
+
middleware?: PikkuMiddleware[]
|
|
123
|
+
permissions?: Record<string, PikkuPermission | PikkuPermission[]>
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Full config for wireHTTPRoutes
|
|
128
|
+
*/
|
|
129
|
+
type TypedWireHTTPRoutesConfig = TypedHTTPRoutesGroupConfig & {
|
|
130
|
+
routes: TypedHTTPRouteMap | HTTPRouteConfig[]
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Type-safe helper for defining route contracts that can be composed.
|
|
135
|
+
*/
|
|
136
|
+
export function defineHTTPRoutes<T extends TypedHTTPRouteMap>(routes: T): TypedHTTPRouteContract<T>
|
|
137
|
+
export function defineHTTPRoutes<T extends TypedHTTPRouteMap>(config: TypedHTTPRoutesGroupConfig & { routes: T }): TypedHTTPRouteContract<T>
|
|
138
|
+
export function defineHTTPRoutes<T extends TypedHTTPRouteMap>(configOrRoutes: T | (TypedHTTPRoutesGroupConfig & { routes: T })): TypedHTTPRouteContract<T> {
|
|
139
|
+
return defineHTTPRoutesCore(configOrRoutes as any) as unknown as TypedHTTPRouteContract<T>
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Wires multiple HTTP routes from a nested map or array configuration.
|
|
144
|
+
*/
|
|
145
|
+
export const wireHTTPRoutes = (config: TypedWireHTTPRoutesConfig): void => {
|
|
146
|
+
wireHTTPRoutesCore(config as any)
|
|
147
|
+
}
|