@terreno/api 0.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.
- package/LICENSE +202 -0
- package/README.md +170 -0
- package/biome.jsonc +22 -0
- package/bunfig.toml +4 -0
- package/dist/api.d.ts +227 -0
- package/dist/api.js +1024 -0
- package/dist/api.test.d.ts +1 -0
- package/dist/api.test.js +2143 -0
- package/dist/auth.d.ts +50 -0
- package/dist/auth.js +512 -0
- package/dist/auth.test.d.ts +1 -0
- package/dist/auth.test.js +778 -0
- package/dist/errors.d.ts +75 -0
- package/dist/errors.js +216 -0
- package/dist/example.d.ts +1 -0
- package/dist/example.js +118 -0
- package/dist/expressServer.d.ts +35 -0
- package/dist/expressServer.js +436 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +30 -0
- package/dist/logger.d.ts +23 -0
- package/dist/logger.js +249 -0
- package/dist/middleware.d.ts +10 -0
- package/dist/middleware.js +52 -0
- package/dist/notifiers/googleChatNotifier.d.ts +5 -0
- package/dist/notifiers/googleChatNotifier.js +130 -0
- package/dist/notifiers/googleChatNotifier.test.d.ts +1 -0
- package/dist/notifiers/googleChatNotifier.test.js +260 -0
- package/dist/notifiers/index.d.ts +3 -0
- package/dist/notifiers/index.js +19 -0
- package/dist/notifiers/slackNotifier.d.ts +5 -0
- package/dist/notifiers/slackNotifier.js +130 -0
- package/dist/notifiers/slackNotifier.test.d.ts +1 -0
- package/dist/notifiers/slackNotifier.test.js +259 -0
- package/dist/notifiers/zoomNotifier.d.ts +34 -0
- package/dist/notifiers/zoomNotifier.js +181 -0
- package/dist/notifiers/zoomNotifier.test.d.ts +1 -0
- package/dist/notifiers/zoomNotifier.test.js +370 -0
- package/dist/openApi.d.ts +60 -0
- package/dist/openApi.js +441 -0
- package/dist/openApi.test.d.ts +1 -0
- package/dist/openApi.test.js +445 -0
- package/dist/openApiBuilder.d.ts +419 -0
- package/dist/openApiBuilder.js +424 -0
- package/dist/openApiBuilder.test.d.ts +1 -0
- package/dist/openApiBuilder.test.js +509 -0
- package/dist/openApiEtag.d.ts +7 -0
- package/dist/openApiEtag.js +38 -0
- package/dist/permissions.d.ts +26 -0
- package/dist/permissions.js +331 -0
- package/dist/permissions.test.d.ts +1 -0
- package/dist/permissions.test.js +413 -0
- package/dist/plugins.d.ts +67 -0
- package/dist/plugins.js +315 -0
- package/dist/plugins.test.d.ts +1 -0
- package/dist/plugins.test.js +639 -0
- package/dist/populate.d.ts +14 -0
- package/dist/populate.js +315 -0
- package/dist/populate.test.d.ts +1 -0
- package/dist/populate.test.js +133 -0
- package/dist/response.d.ts +0 -0
- package/dist/response.js +1 -0
- package/dist/tests/bunSetup.d.ts +1 -0
- package/dist/tests/bunSetup.js +297 -0
- package/dist/tests/index.d.ts +1 -0
- package/dist/tests/index.js +17 -0
- package/dist/tests.d.ts +99 -0
- package/dist/tests.js +273 -0
- package/dist/transformers.d.ts +25 -0
- package/dist/transformers.js +217 -0
- package/dist/transformers.test.d.ts +1 -0
- package/dist/transformers.test.js +370 -0
- package/dist/utils.d.ts +11 -0
- package/dist/utils.js +143 -0
- package/dist/utils.test.d.ts +1 -0
- package/dist/utils.test.js +14 -0
- package/index.ts +1 -0
- package/package.json +88 -0
- package/src/__snapshots__/openApi.test.ts.snap +4814 -0
- package/src/__snapshots__/openApiBuilder.test.ts.snap +1485 -0
- package/src/api.test.ts +1661 -0
- package/src/api.ts +1036 -0
- package/src/auth.test.ts +550 -0
- package/src/auth.ts +408 -0
- package/src/errors.ts +225 -0
- package/src/example.ts +99 -0
- package/src/express.d.ts +5 -0
- package/src/expressServer.ts +387 -0
- package/src/index.ts +14 -0
- package/src/logger.ts +190 -0
- package/src/middleware.ts +18 -0
- package/src/notifiers/googleChatNotifier.test.ts +114 -0
- package/src/notifiers/googleChatNotifier.ts +47 -0
- package/src/notifiers/index.ts +3 -0
- package/src/notifiers/slackNotifier.test.ts +113 -0
- package/src/notifiers/slackNotifier.ts +55 -0
- package/src/notifiers/zoomNotifier.test.ts +207 -0
- package/src/notifiers/zoomNotifier.ts +111 -0
- package/src/openApi.test.ts +331 -0
- package/src/openApi.ts +494 -0
- package/src/openApiBuilder.test.ts +442 -0
- package/src/openApiBuilder.ts +636 -0
- package/src/openApiEtag.ts +40 -0
- package/src/permissions.test.ts +219 -0
- package/src/permissions.ts +228 -0
- package/src/plugins.test.ts +390 -0
- package/src/plugins.ts +289 -0
- package/src/populate.test.ts +65 -0
- package/src/populate.ts +258 -0
- package/src/response.ts +0 -0
- package/src/tests/bunSetup.ts +234 -0
- package/src/tests/index.ts +1 -0
- package/src/tests.ts +218 -0
- package/src/transformers.test.ts +202 -0
- package/src/transformers.ts +170 -0
- package/src/utils.test.ts +14 -0
- package/src/utils.ts +47 -0
- package/tsconfig.json +60 -0
- package/types.d.ts +17 -0
package/tsconfig.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
// "lib": [], /* Specify library files to be included in the compilation. */
|
|
4
|
+
"allowJs": true /* Allow javascript files to be compiled. */,
|
|
5
|
+
"allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */,
|
|
6
|
+
"baseUrl": "./" /* Base directory to resolve non-absolute module names. */,
|
|
7
|
+
"declaration": true /* Generates corresponding '.d.ts' file. */,
|
|
8
|
+
"downlevelIteration": true,
|
|
9
|
+
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
|
|
10
|
+
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
|
|
11
|
+
/* Source Map Options */
|
|
12
|
+
// "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
|
|
13
|
+
// "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */
|
|
14
|
+
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
|
|
15
|
+
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
|
|
16
|
+
/* Experimental Options */
|
|
17
|
+
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
|
|
18
|
+
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
|
|
19
|
+
"forceConsistentCasingInFileNames": true,
|
|
20
|
+
// "checkJs": true, /* Report errors in .js files. */
|
|
21
|
+
"jsx": "react" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */,
|
|
22
|
+
"lib": ["es2017", "dom", "es2017.object"],
|
|
23
|
+
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
|
|
24
|
+
|
|
25
|
+
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
|
26
|
+
/* Module Resolution Options */
|
|
27
|
+
"moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
|
|
28
|
+
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
|
|
29
|
+
// "removeComments": true, /* Do not emit comments to output. */
|
|
30
|
+
"noEmit": false /* Do not emit outputs. */,
|
|
31
|
+
"noImplicitAny": false /* Raise error on expressions and declarations with an implied 'any' type. */,
|
|
32
|
+
"noImplicitReturns": true,
|
|
33
|
+
"noImplicitThis": true,
|
|
34
|
+
// "strictPropertyInitialization": true /* Enable strict checking of property initialization in classes. */,
|
|
35
|
+
"noUnusedLocals": false,
|
|
36
|
+
"noUnusedParameters": false,
|
|
37
|
+
// "sourceMap": true, /* Generates corresponding '.map' file. */
|
|
38
|
+
// "outFile": "./", /* Concatenate and emit output to single file. */
|
|
39
|
+
"outDir": "./dist" /* Redirect output structure to the directory. */,
|
|
40
|
+
"preserveConstEnums": true,
|
|
41
|
+
"removeComments": false,
|
|
42
|
+
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
|
43
|
+
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
|
44
|
+
// "typeRoots": [], /* List of folders to include type definitions from. */
|
|
45
|
+
// "types": ["types/*.d.ts"] /* Type declaration files to be included in compilation. */,
|
|
46
|
+
"skipLibCheck": true,
|
|
47
|
+
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
|
|
48
|
+
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
|
|
49
|
+
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
|
|
50
|
+
/* Strict Type-Checking Options */
|
|
51
|
+
"strict": true /* Enable all strict type-checking options. */,
|
|
52
|
+
"strictFunctionTypes": true /* Enable strict checking of function types. */,
|
|
53
|
+
"strictNullChecks": true /* Enable strict null checks. */,
|
|
54
|
+
// "paths": {"*": ["types/*"]},
|
|
55
|
+
/* Basic Options */
|
|
56
|
+
"target": "es5" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
|
|
57
|
+
},
|
|
58
|
+
"exclude": ["node_modules"],
|
|
59
|
+
"include": ["src/**/*.ts*", "src/*.ts", "types.d.ts"]
|
|
60
|
+
}
|
package/types.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare namespace NodeJS {
|
|
2
|
+
export interface ProcessEnv {
|
|
3
|
+
NODE_ENV: "development" | "production" | "test";
|
|
4
|
+
LOGGING_LEVEL: "debug" | "info" | "warn" | "error";
|
|
5
|
+
SENTRY_DSN: string;
|
|
6
|
+
SENTRY_TRACES_SAMPLE_RATE: string;
|
|
7
|
+
SENTRY_PROFILES_SAMPLE_RATE: string;
|
|
8
|
+
SLACK_WEBHOOKS?: string;
|
|
9
|
+
GOOGLE_CHAT_WEBHOOKS?: string;
|
|
10
|
+
SESSION_SECRET: string;
|
|
11
|
+
TOKEN_ISSUER: string;
|
|
12
|
+
TOKEN_EXPIRES_IN: string;
|
|
13
|
+
REFRESH_TOKEN_SECRET: string;
|
|
14
|
+
DISABLE_LOG_ALL_REQUESTS: string;
|
|
15
|
+
ZOOM_CHAT_WEBHOOKS?: string;
|
|
16
|
+
}
|
|
17
|
+
}
|