@imbue-ai/detent 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/README.md +246 -0
  2. package/dist/src/builtinPatterns/any.json +3 -0
  3. package/dist/src/builtinPatterns/builtinPatterns/any.json +3 -0
  4. package/dist/src/builtinPatterns.d.ts +5 -0
  5. package/dist/src/builtinPatterns.d.ts.map +1 -0
  6. package/dist/src/builtinPatterns.js +50 -0
  7. package/dist/src/builtinPatterns.js.map +1 -0
  8. package/dist/src/check.d.ts +2 -0
  9. package/dist/src/check.d.ts.map +1 -0
  10. package/dist/src/check.js +8 -0
  11. package/dist/src/check.js.map +1 -0
  12. package/dist/src/cli.d.ts +3 -0
  13. package/dist/src/cli.d.ts.map +1 -0
  14. package/dist/src/cli.js +64 -0
  15. package/dist/src/cli.js.map +1 -0
  16. package/dist/src/config.d.ts +18 -0
  17. package/dist/src/config.d.ts.map +1 -0
  18. package/dist/src/config.js +157 -0
  19. package/dist/src/config.js.map +1 -0
  20. package/dist/src/curl.d.ts +5 -0
  21. package/dist/src/curl.d.ts.map +1 -0
  22. package/dist/src/curl.js +394 -0
  23. package/dist/src/curl.js.map +1 -0
  24. package/dist/src/decomposedRequest.d.ts +24 -0
  25. package/dist/src/decomposedRequest.d.ts.map +1 -0
  26. package/dist/src/decomposedRequest.js +51 -0
  27. package/dist/src/decomposedRequest.js.map +1 -0
  28. package/dist/src/detentConfig.d.ts +15 -0
  29. package/dist/src/detentConfig.d.ts.map +1 -0
  30. package/dist/src/detentConfig.js +169 -0
  31. package/dist/src/detentConfig.js.map +1 -0
  32. package/dist/src/dump.d.ts +6 -0
  33. package/dist/src/dump.d.ts.map +1 -0
  34. package/dist/src/dump.js +14 -0
  35. package/dist/src/dump.js.map +1 -0
  36. package/dist/src/environment.d.ts +3 -0
  37. package/dist/src/environment.d.ts.map +1 -0
  38. package/dist/src/environment.js +15 -0
  39. package/dist/src/environment.js.map +1 -0
  40. package/dist/src/index.d.ts +9 -0
  41. package/dist/src/index.d.ts.map +1 -0
  42. package/dist/src/index.js +7 -0
  43. package/dist/src/index.js.map +1 -0
  44. package/dist/src/patterns/builtin/any.json +3 -0
  45. package/dist/src/patterns/builtin/builtin/any.json +3 -0
  46. package/dist/src/patterns/builtin/builtin/aws.json +326 -0
  47. package/dist/src/patterns/builtin/builtin/calendly.json +274 -0
  48. package/dist/src/patterns/builtin/builtin/coolify.json +238 -0
  49. package/dist/src/patterns/builtin/builtin/discord.json +157 -0
  50. package/dist/src/patterns/builtin/builtin/dropbox.json +115 -0
  51. package/dist/src/patterns/builtin/builtin/figma.json +228 -0
  52. package/dist/src/patterns/builtin/builtin/github.json +248 -0
  53. package/dist/src/patterns/builtin/builtin/gitlab.json +262 -0
  54. package/dist/src/patterns/builtin/builtin/google-analytics.json +155 -0
  55. package/dist/src/patterns/builtin/builtin/google-calendar.json +227 -0
  56. package/dist/src/patterns/builtin/builtin/google-directions.json +67 -0
  57. package/dist/src/patterns/builtin/builtin/google-docs.json +102 -0
  58. package/dist/src/patterns/builtin/builtin/google-drive.json +162 -0
  59. package/dist/src/patterns/builtin/builtin/google-gmail.json +257 -0
  60. package/dist/src/patterns/builtin/builtin/google-people.json +142 -0
  61. package/dist/src/patterns/builtin/builtin/google-sheets.json +115 -0
  62. package/dist/src/patterns/builtin/builtin/linear.json +12 -0
  63. package/dist/src/patterns/builtin/builtin/mailchimp.json +263 -0
  64. package/dist/src/patterns/builtin/builtin/notion.json +230 -0
  65. package/dist/src/patterns/builtin/builtin/sentry.json +172 -0
  66. package/dist/src/patterns/builtin/builtin/slack.json +221 -0
  67. package/dist/src/patterns/builtin/builtin/stripe.json +347 -0
  68. package/dist/src/patterns/builtin/builtin/telegram.json +89 -0
  69. package/dist/src/patterns/builtin/builtin/umami.json +172 -0
  70. package/dist/src/patterns/builtin/builtin/yelp.json +147 -0
  71. package/dist/src/patterns/builtin/builtin/zoom.json +192 -0
  72. package/dist/src/patterns/requestPattern.d.ts +33 -0
  73. package/dist/src/patterns/requestPattern.d.ts.map +1 -0
  74. package/dist/src/patterns/requestPattern.js +157 -0
  75. package/dist/src/patterns/requestPattern.js.map +1 -0
  76. package/dist/src/requestPattern.d.ts +15 -0
  77. package/dist/src/requestPattern.d.ts.map +1 -0
  78. package/dist/src/requestPattern.js +35 -0
  79. package/dist/src/requestPattern.js.map +1 -0
  80. package/dist/tests/builtinPatterns.test.d.ts +2 -0
  81. package/dist/tests/builtinPatterns.test.d.ts.map +1 -0
  82. package/dist/tests/builtinPatterns.test.js +1293 -0
  83. package/dist/tests/builtinPatterns.test.js.map +1 -0
  84. package/dist/tests/check.test.d.ts +2 -0
  85. package/dist/tests/check.test.d.ts.map +1 -0
  86. package/dist/tests/check.test.js +671 -0
  87. package/dist/tests/check.test.js.map +1 -0
  88. package/dist/tests/cli.test.d.ts +2 -0
  89. package/dist/tests/cli.test.d.ts.map +1 -0
  90. package/dist/tests/cli.test.js +77 -0
  91. package/dist/tests/cli.test.js.map +1 -0
  92. package/dist/tests/codeQuality.test.d.ts +2 -0
  93. package/dist/tests/codeQuality.test.d.ts.map +1 -0
  94. package/dist/tests/codeQuality.test.js +15 -0
  95. package/dist/tests/codeQuality.test.js.map +1 -0
  96. package/dist/tests/curl.test.d.ts +2 -0
  97. package/dist/tests/curl.test.d.ts.map +1 -0
  98. package/dist/tests/curl.test.js +241 -0
  99. package/dist/tests/curl.test.js.map +1 -0
  100. package/dist/tests/dump.test.d.ts +2 -0
  101. package/dist/tests/dump.test.d.ts.map +1 -0
  102. package/dist/tests/dump.test.js +154 -0
  103. package/dist/tests/dump.test.js.map +1 -0
  104. package/package.json +67 -0
@@ -0,0 +1,115 @@
1
+ {
2
+ "dropbox-api": {
3
+ "properties": {
4
+ "domain": {
5
+ "enum": [
6
+ "api.dropboxapi.com",
7
+ "content.dropboxapi.com",
8
+ "notify.dropboxapi.com"
9
+ ]
10
+ }
11
+ },
12
+ "required": [
13
+ "domain"
14
+ ]
15
+ },
16
+ "dropbox-files": {
17
+ "properties": {
18
+ "path": {
19
+ "type": "string",
20
+ "pattern": "^/2/files/"
21
+ }
22
+ },
23
+ "required": [
24
+ "path"
25
+ ]
26
+ },
27
+ "dropbox-files-read": {
28
+ "properties": {
29
+ "path": {
30
+ "type": "string",
31
+ "pattern": "^/2/files/(list_|get_|download|export|search|copy_reference/get|tags/get)"
32
+ }
33
+ },
34
+ "required": [
35
+ "path"
36
+ ]
37
+ },
38
+ "dropbox-files-write": {
39
+ "properties": {
40
+ "path": {
41
+ "type": "string",
42
+ "pattern": "^/2/files/(copy(?!_reference/get)|create_folder|delete|lock_file|move|paper/|permanently_delete|restore|save_url|tags/(add|remove)|unlock_file|upload)"
43
+ }
44
+ },
45
+ "required": [
46
+ "path"
47
+ ]
48
+ },
49
+ "dropbox-sharing": {
50
+ "properties": {
51
+ "path": {
52
+ "type": "string",
53
+ "pattern": "^/2/sharing/"
54
+ }
55
+ },
56
+ "required": [
57
+ "path"
58
+ ]
59
+ },
60
+ "dropbox-sharing-read": {
61
+ "properties": {
62
+ "path": {
63
+ "type": "string",
64
+ "pattern": "^/2/sharing/(check_|get_|list_)"
65
+ }
66
+ },
67
+ "required": [
68
+ "path"
69
+ ]
70
+ },
71
+ "dropbox-sharing-write": {
72
+ "properties": {
73
+ "path": {
74
+ "type": "string",
75
+ "pattern": "^/2/sharing/(add_|create_|modify_|mount_|relinquish_|remove_|revoke_|set_|share_|transfer_|unmount_|unshare_|update_)"
76
+ }
77
+ },
78
+ "required": [
79
+ "path"
80
+ ]
81
+ },
82
+ "dropbox-account": {
83
+ "properties": {
84
+ "path": {
85
+ "type": "string",
86
+ "pattern": "^/2/users/"
87
+ }
88
+ },
89
+ "required": [
90
+ "path"
91
+ ]
92
+ },
93
+ "dropbox-file-requests": {
94
+ "properties": {
95
+ "path": {
96
+ "type": "string",
97
+ "pattern": "^/2/file_requests/"
98
+ }
99
+ },
100
+ "required": [
101
+ "path"
102
+ ]
103
+ },
104
+ "dropbox-contacts": {
105
+ "properties": {
106
+ "path": {
107
+ "type": "string",
108
+ "pattern": "^/2/contacts/"
109
+ }
110
+ },
111
+ "required": [
112
+ "path"
113
+ ]
114
+ }
115
+ }
@@ -0,0 +1,228 @@
1
+ {
2
+ "figma-api": {
3
+ "properties": {
4
+ "domain": {
5
+ "const": "api.figma.com"
6
+ }
7
+ },
8
+ "required": [
9
+ "domain"
10
+ ]
11
+ },
12
+ "figma-read-all": {
13
+ "properties": {
14
+ "method": {
15
+ "const": "GET"
16
+ }
17
+ },
18
+ "required": [
19
+ "method"
20
+ ]
21
+ },
22
+ "figma-write-all": {
23
+ "properties": {
24
+ "method": {
25
+ "enum": [
26
+ "POST",
27
+ "PUT",
28
+ "PATCH",
29
+ "DELETE"
30
+ ]
31
+ }
32
+ },
33
+ "required": [
34
+ "method"
35
+ ]
36
+ },
37
+ "figma-read-files": {
38
+ "properties": {
39
+ "method": {
40
+ "const": "GET"
41
+ },
42
+ "path": {
43
+ "type": "string",
44
+ "pattern": "^/v[0-9]+/(files|images)/[^/]+(/nodes|/images|/meta|/versions)?$"
45
+ }
46
+ },
47
+ "required": [
48
+ "method",
49
+ "path"
50
+ ]
51
+ },
52
+ "figma-read-comments": {
53
+ "properties": {
54
+ "method": {
55
+ "const": "GET"
56
+ },
57
+ "path": {
58
+ "type": "string",
59
+ "pattern": "^/v[0-9]+/files/[^/]+/comments(/.*)?$"
60
+ }
61
+ },
62
+ "required": [
63
+ "method",
64
+ "path"
65
+ ]
66
+ },
67
+ "figma-write-comments": {
68
+ "properties": {
69
+ "method": {
70
+ "enum": [
71
+ "POST",
72
+ "DELETE"
73
+ ]
74
+ },
75
+ "path": {
76
+ "type": "string",
77
+ "pattern": "^/v[0-9]+/files/[^/]+/comments(/.*)?$"
78
+ }
79
+ },
80
+ "required": [
81
+ "method",
82
+ "path"
83
+ ]
84
+ },
85
+ "figma-read-projects": {
86
+ "properties": {
87
+ "method": {
88
+ "const": "GET"
89
+ },
90
+ "path": {
91
+ "type": "string",
92
+ "pattern": "^/v[0-9]+/(teams/[^/]+/projects|projects/[^/]+/files)$"
93
+ }
94
+ },
95
+ "required": [
96
+ "method",
97
+ "path"
98
+ ]
99
+ },
100
+ "figma-read-components": {
101
+ "properties": {
102
+ "method": {
103
+ "const": "GET"
104
+ },
105
+ "path": {
106
+ "type": "string",
107
+ "pattern": "^/v[0-9]+/(components/[^/]+|component_sets/[^/]+|styles/[^/]+|teams/[^/]+/(components|component_sets|styles)|files/[^/]+/(components|component_sets|styles))$"
108
+ }
109
+ },
110
+ "required": [
111
+ "method",
112
+ "path"
113
+ ]
114
+ },
115
+ "figma-read-webhooks": {
116
+ "properties": {
117
+ "method": {
118
+ "const": "GET"
119
+ },
120
+ "path": {
121
+ "type": "string",
122
+ "pattern": "^/v[0-9]+/(webhooks|teams/[^/]+/webhooks)(/.*)?$"
123
+ }
124
+ },
125
+ "required": [
126
+ "method",
127
+ "path"
128
+ ]
129
+ },
130
+ "figma-write-webhooks": {
131
+ "properties": {
132
+ "method": {
133
+ "enum": [
134
+ "POST",
135
+ "PUT",
136
+ "DELETE"
137
+ ]
138
+ },
139
+ "path": {
140
+ "type": "string",
141
+ "pattern": "^/v[0-9]+/(webhooks|teams/[^/]+/webhooks)(/.*)?$"
142
+ }
143
+ },
144
+ "required": [
145
+ "method",
146
+ "path"
147
+ ]
148
+ },
149
+ "figma-read-variables": {
150
+ "properties": {
151
+ "method": {
152
+ "const": "GET"
153
+ },
154
+ "path": {
155
+ "type": "string",
156
+ "pattern": "^/v[0-9]+/files/[^/]+/variables(/.*)?$"
157
+ }
158
+ },
159
+ "required": [
160
+ "method",
161
+ "path"
162
+ ]
163
+ },
164
+ "figma-write-variables": {
165
+ "properties": {
166
+ "method": {
167
+ "const": "POST"
168
+ },
169
+ "path": {
170
+ "type": "string",
171
+ "pattern": "^/v[0-9]+/files/[^/]+/variables$"
172
+ }
173
+ },
174
+ "required": [
175
+ "method",
176
+ "path"
177
+ ]
178
+ },
179
+ "figma-read-dev-resources": {
180
+ "properties": {
181
+ "method": {
182
+ "const": "GET"
183
+ },
184
+ "path": {
185
+ "type": "string",
186
+ "pattern": "^/v[0-9]+/(files/[^/]+/dev_resources|dev_resources)(/.*)?$"
187
+ }
188
+ },
189
+ "required": [
190
+ "method",
191
+ "path"
192
+ ]
193
+ },
194
+ "figma-write-dev-resources": {
195
+ "properties": {
196
+ "method": {
197
+ "enum": [
198
+ "POST",
199
+ "PUT",
200
+ "DELETE"
201
+ ]
202
+ },
203
+ "path": {
204
+ "type": "string",
205
+ "pattern": "^/v[0-9]+/(files/[^/]+/dev_resources|dev_resources)(/.*)?$"
206
+ }
207
+ },
208
+ "required": [
209
+ "method",
210
+ "path"
211
+ ]
212
+ },
213
+ "figma-read-library-analytics": {
214
+ "properties": {
215
+ "method": {
216
+ "const": "GET"
217
+ },
218
+ "path": {
219
+ "type": "string",
220
+ "pattern": "^/v[0-9]+/analytics/libraries(/.*)?$"
221
+ }
222
+ },
223
+ "required": [
224
+ "method",
225
+ "path"
226
+ ]
227
+ }
228
+ }
@@ -0,0 +1,248 @@
1
+ {
2
+ "github-rest-api": {
3
+ "properties": {
4
+ "domain": {
5
+ "const": "api.github.com"
6
+ },
7
+ "path": {
8
+ "type": "string",
9
+ "not": {
10
+ "pattern": "^/graphql$"
11
+ }
12
+ }
13
+ },
14
+ "required": [
15
+ "domain",
16
+ "path"
17
+ ]
18
+ },
19
+ "github-read-all": {
20
+ "properties": {
21
+ "method": {
22
+ "const": "GET"
23
+ }
24
+ },
25
+ "required": [
26
+ "method"
27
+ ]
28
+ },
29
+ "github-write-all": {
30
+ "properties": {
31
+ "method": {
32
+ "enum": [
33
+ "POST",
34
+ "PUT",
35
+ "PATCH",
36
+ "DELETE"
37
+ ]
38
+ }
39
+ },
40
+ "required": [
41
+ "method"
42
+ ]
43
+ },
44
+ "github-read-repos": {
45
+ "properties": {
46
+ "method": {
47
+ "const": "GET"
48
+ },
49
+ "path": {
50
+ "type": "string",
51
+ "pattern": "^/repos(/.*)?$"
52
+ }
53
+ },
54
+ "required": [
55
+ "method",
56
+ "path"
57
+ ]
58
+ },
59
+ "github-write-repos": {
60
+ "properties": {
61
+ "method": {
62
+ "enum": [
63
+ "POST",
64
+ "PUT",
65
+ "PATCH",
66
+ "DELETE"
67
+ ]
68
+ },
69
+ "path": {
70
+ "type": "string",
71
+ "pattern": "^/repos(/.*)?$"
72
+ }
73
+ },
74
+ "required": [
75
+ "method",
76
+ "path"
77
+ ]
78
+ },
79
+ "github-read-issues": {
80
+ "properties": {
81
+ "method": {
82
+ "const": "GET"
83
+ },
84
+ "path": {
85
+ "type": "string",
86
+ "pattern": "^/(repos/[^/]+/[^/]+/issues|issues)(/.*)?$"
87
+ }
88
+ },
89
+ "required": [
90
+ "method",
91
+ "path"
92
+ ]
93
+ },
94
+ "github-write-issues": {
95
+ "properties": {
96
+ "method": {
97
+ "enum": [
98
+ "POST",
99
+ "PUT",
100
+ "PATCH",
101
+ "DELETE"
102
+ ]
103
+ },
104
+ "path": {
105
+ "type": "string",
106
+ "pattern": "^/repos/[^/]+/[^/]+/issues(/.*)?$"
107
+ }
108
+ },
109
+ "required": [
110
+ "method",
111
+ "path"
112
+ ]
113
+ },
114
+ "github-read-pulls": {
115
+ "properties": {
116
+ "method": {
117
+ "const": "GET"
118
+ },
119
+ "path": {
120
+ "type": "string",
121
+ "pattern": "^/repos/[^/]+/[^/]+/pulls(/.*)?$"
122
+ }
123
+ },
124
+ "required": [
125
+ "method",
126
+ "path"
127
+ ]
128
+ },
129
+ "github-write-pulls": {
130
+ "properties": {
131
+ "method": {
132
+ "enum": [
133
+ "POST",
134
+ "PUT",
135
+ "PATCH",
136
+ "DELETE"
137
+ ]
138
+ },
139
+ "path": {
140
+ "type": "string",
141
+ "pattern": "^/repos/[^/]+/[^/]+/pulls(/.*)?$"
142
+ }
143
+ },
144
+ "required": [
145
+ "method",
146
+ "path"
147
+ ]
148
+ },
149
+ "github-read-gists": {
150
+ "properties": {
151
+ "method": {
152
+ "const": "GET"
153
+ },
154
+ "path": {
155
+ "type": "string",
156
+ "pattern": "^/gists(/.*)?$"
157
+ }
158
+ },
159
+ "required": [
160
+ "method",
161
+ "path"
162
+ ]
163
+ },
164
+ "github-write-gists": {
165
+ "properties": {
166
+ "method": {
167
+ "enum": [
168
+ "POST",
169
+ "PUT",
170
+ "PATCH",
171
+ "DELETE"
172
+ ]
173
+ },
174
+ "path": {
175
+ "type": "string",
176
+ "pattern": "^/gists(/.*)?$"
177
+ }
178
+ },
179
+ "required": [
180
+ "method",
181
+ "path"
182
+ ]
183
+ },
184
+ "github-read-user": {
185
+ "properties": {
186
+ "method": {
187
+ "const": "GET"
188
+ },
189
+ "path": {
190
+ "type": "string",
191
+ "pattern": "^/user(/.*)?$"
192
+ }
193
+ },
194
+ "required": [
195
+ "method",
196
+ "path"
197
+ ]
198
+ },
199
+ "github-search": {
200
+ "properties": {
201
+ "method": {
202
+ "const": "GET"
203
+ },
204
+ "path": {
205
+ "type": "string",
206
+ "pattern": "^/search(/.*)?$"
207
+ }
208
+ },
209
+ "required": [
210
+ "method",
211
+ "path"
212
+ ]
213
+ },
214
+ "github-read-notifications": {
215
+ "properties": {
216
+ "method": {
217
+ "const": "GET"
218
+ },
219
+ "path": {
220
+ "type": "string",
221
+ "pattern": "^/notifications(/.*)?$"
222
+ }
223
+ },
224
+ "required": [
225
+ "method",
226
+ "path"
227
+ ]
228
+ },
229
+ "github-write-notifications": {
230
+ "properties": {
231
+ "method": {
232
+ "enum": [
233
+ "PUT",
234
+ "PATCH",
235
+ "DELETE"
236
+ ]
237
+ },
238
+ "path": {
239
+ "type": "string",
240
+ "pattern": "^/notifications(/.*)?$"
241
+ }
242
+ },
243
+ "required": [
244
+ "method",
245
+ "path"
246
+ ]
247
+ }
248
+ }