@space-df/sdk 0.0.1-dev.3.3 → 0.0.1-dev.5
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/.editorconfig +24 -0
- package/.github/pull_request_template.md +25 -0
- package/.github/workflows/bump-version.yml +67 -0
- package/.github/workflows/publish-package.yml +28 -0
- package/.gitignore +11 -0
- package/CODE_OF_CONDUCT.md +128 -0
- package/CONTRIBUTING.md +89 -0
- package/api.doc.md +1537 -0
- package/dist/LICENSE +7 -0
- package/dist/README.md +382 -0
- package/{index.d.mts → dist/index.d.mts} +4 -0
- package/{index.d.ts → dist/index.d.ts} +4 -0
- package/{index.d.ts.map → dist/index.d.ts.map} +1 -1
- package/{index.js → dist/index.js} +4 -0
- package/dist/index.js.map +1 -0
- package/{index.mjs → dist/index.mjs} +4 -0
- package/dist/index.mjs.map +1 -0
- package/dist/package.json +101 -0
- package/{resources → dist/resources}/auth/auth.d.ts +5 -0
- package/dist/resources/auth/auth.d.ts.map +1 -0
- package/{resources → dist/resources}/auth/auth.js +3 -0
- package/dist/resources/auth/auth.js.map +1 -0
- package/{resources → dist/resources}/auth/auth.mjs +3 -0
- package/dist/resources/auth/auth.mjs.map +1 -0
- package/{resources → dist/resources}/auth/index.d.ts +4 -0
- package/{resources → dist/resources}/auth/index.d.ts.map +1 -1
- package/{resources → dist/resources}/auth/index.js +4 -0
- package/{resources → dist/resources}/auth/index.js.map +1 -1
- package/{resources → dist/resources}/auth/index.mjs +4 -0
- package/dist/resources/auth/invitation.d.ts +13 -0
- package/dist/resources/auth/invitation.d.ts.map +1 -0
- package/dist/resources/auth/invitation.js +11 -0
- package/dist/resources/auth/invitation.js.map +1 -0
- package/dist/resources/auth/invitation.mjs +7 -0
- package/dist/resources/auth/invitation.mjs.map +1 -0
- package/dist/resources/auth/join-space.d.ts +6 -0
- package/dist/resources/auth/join-space.d.ts.map +1 -0
- package/dist/resources/auth/join-space.js +11 -0
- package/dist/resources/auth/join-space.js.map +1 -0
- package/dist/resources/auth/join-space.mjs +7 -0
- package/dist/resources/auth/join-space.mjs.map +1 -0
- package/dist/resources/auth/presigned-url.d.ts +10 -0
- package/dist/resources/auth/presigned-url.d.ts.map +1 -0
- package/dist/resources/auth/presigned-url.js +11 -0
- package/dist/resources/auth/presigned-url.js.map +1 -0
- package/dist/resources/auth/presigned-url.mjs +7 -0
- package/dist/resources/auth/presigned-url.mjs.map +1 -0
- package/{resources → dist/resources}/auth/space-role-users.d.ts +5 -0
- package/dist/resources/auth/space-role-users.d.ts.map +1 -0
- package/{resources → dist/resources}/auth/space-role-users.js +16 -0
- package/dist/resources/auth/space-role-users.js.map +1 -0
- package/{resources → dist/resources}/auth/space-role-users.mjs +16 -0
- package/dist/resources/auth/space-role-users.mjs.map +1 -0
- package/dist/resources/auth/users.d.ts +19 -0
- package/dist/resources/auth/users.d.ts.map +1 -0
- package/dist/resources/auth/users.js +17 -0
- package/dist/resources/auth/users.js.map +1 -0
- package/dist/resources/auth/users.mjs +13 -0
- package/dist/resources/auth/users.mjs.map +1 -0
- package/dist/src/_shims/MultipartBody.ts +9 -0
- package/dist/src/_shims/README.md +46 -0
- package/dist/src/_shims/auto/runtime-bun.ts +4 -0
- package/dist/src/_shims/auto/runtime-node.ts +4 -0
- package/dist/src/_shims/auto/runtime.ts +4 -0
- package/dist/src/_shims/auto/types-node.ts +4 -0
- package/dist/src/_shims/auto/types.d.ts +101 -0
- package/dist/src/_shims/auto/types.js +3 -0
- package/dist/src/_shims/auto/types.mjs +3 -0
- package/dist/src/_shims/bun-runtime.ts +14 -0
- package/dist/src/_shims/index.d.ts +72 -0
- package/dist/src/_shims/index.js +13 -0
- package/dist/src/_shims/index.mjs +7 -0
- package/dist/src/_shims/manual-types.d.ts +12 -0
- package/dist/src/_shims/manual-types.js +3 -0
- package/dist/src/_shims/manual-types.mjs +3 -0
- package/dist/src/_shims/node-runtime.ts +78 -0
- package/dist/src/_shims/node-types.d.ts +42 -0
- package/dist/src/_shims/node-types.js +3 -0
- package/dist/src/_shims/node-types.mjs +3 -0
- package/dist/src/_shims/registry.ts +60 -0
- package/dist/src/_shims/web-runtime.ts +91 -0
- package/dist/src/_shims/web-types.d.ts +83 -0
- package/dist/src/_shims/web-types.js +3 -0
- package/dist/src/_shims/web-types.mjs +3 -0
- package/dist/src/core.ts +1061 -0
- package/dist/src/error.ts +134 -0
- package/dist/src/index.ts +210 -0
- package/dist/src/libs/utils.ts +66 -0
- package/dist/src/resource.ts +9 -0
- package/dist/src/resources/auth/auth.ts +102 -0
- package/dist/src/resources/auth/credentials.ts +12 -0
- package/dist/src/resources/auth/index.ts +10 -0
- package/dist/src/resources/auth/invitation.ts +17 -0
- package/dist/src/resources/auth/join-space.ts +8 -0
- package/dist/src/resources/auth/presigned-url.ts +13 -0
- package/dist/src/resources/auth/space-policies.ts +55 -0
- package/dist/src/resources/auth/space-role-users.ts +64 -0
- package/dist/src/resources/auth/space-roles.ts +95 -0
- package/dist/src/resources/auth/spaces.ts +118 -0
- package/dist/src/resources/auth/users.ts +36 -0
- package/dist/src/resources/console/index.ts +1 -0
- package/dist/src/resources/console/oauth2.ts +83 -0
- package/dist/src/resources/dashboard/dashboards.ts +171 -0
- package/dist/src/resources/dashboard/device-states.ts +142 -0
- package/dist/src/resources/dashboard/index.ts +2 -0
- package/dist/src/resources/index.ts +6 -0
- package/dist/src/shims/node.ts +50 -0
- package/dist/src/shims/web.ts +50 -0
- package/dist/src/types/api.ts +31 -0
- package/dist/src/types/jwt.ts +12 -0
- package/dist/src/version.ts +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/{version.js → dist/version.js} +1 -1
- package/dist/version.js.map +1 -0
- package/dist/version.mjs +2 -0
- package/{version.mjs.map → dist/version.mjs.map} +1 -1
- package/eslint.config.mjs +33 -0
- package/examples/auth/login.ts +14 -0
- package/examples/auth/register.ts +15 -0
- package/examples/console/oauth2.ts +15 -0
- package/package.json +52 -36
- package/scripts/build +56 -0
- package/scripts/utils/check-version.cjs +20 -0
- package/scripts/utils/fix-index-exports.cjs +8 -0
- package/scripts/utils/make-dist-package-json.cjs +21 -0
- package/scripts/utils/postprocess-files.cjs +153 -0
- package/src/_shims/auto/runtime-deno.ts +4 -0
- package/src/_shims/auto/types-deno.ts +4 -0
- package/src/_shims/auto/types.d.ts +18 -18
- package/src/_shims/index-deno.ts +105 -0
- package/src/_shims/index.d.ts +1 -1
- package/src/_shims/index.mjs +1 -1
- package/src/index.ts +4 -0
- package/src/resources/auth/auth.ts +10 -0
- package/src/resources/auth/index.ts +4 -0
- package/src/resources/auth/invitation.ts +17 -0
- package/src/resources/auth/join-space.ts +8 -0
- package/src/resources/auth/presigned-url.ts +13 -0
- package/src/resources/auth/space-role-users.ts +22 -0
- package/src/resources/auth/users.ts +36 -0
- package/src/version.ts +1 -1
- package/tsc-multi.json +7 -0
- package/tsconfig.build.json +18 -0
- package/tsconfig.deno.json +20 -0
- package/tsconfig.dist-src.json +11 -0
- package/tsconfig.json +38 -0
- package/index.js.map +0 -1
- package/index.mjs.map +0 -1
- package/resources/auth/auth.d.ts.map +0 -1
- package/resources/auth/auth.js.map +0 -1
- package/resources/auth/auth.mjs.map +0 -1
- package/resources/auth/space-role-users.d.ts.map +0 -1
- package/resources/auth/space-role-users.js.map +0 -1
- package/resources/auth/space-role-users.mjs.map +0 -1
- package/src/resources/.DS_Store +0 -0
- package/version.d.ts +0 -2
- package/version.d.ts.map +0 -1
- package/version.js.map +0 -1
- package/version.mjs +0 -2
- package/yarn.lock +0 -268
- /package/{_shims → dist/_shims}/MultipartBody.d.ts +0 -0
- /package/{_shims → dist/_shims}/MultipartBody.d.ts.map +0 -0
- /package/{_shims → dist/_shims}/MultipartBody.js +0 -0
- /package/{_shims → dist/_shims}/MultipartBody.js.map +0 -0
- /package/{_shims → dist/_shims}/MultipartBody.mjs +0 -0
- /package/{_shims → dist/_shims}/MultipartBody.mjs.map +0 -0
- /package/{_shims → dist/_shims}/README.md +0 -0
- /package/{_shims → dist/_shims}/auto/runtime-bun.d.ts +0 -0
- /package/{_shims → dist/_shims}/auto/runtime-bun.d.ts.map +0 -0
- /package/{_shims → dist/_shims}/auto/runtime-bun.js +0 -0
- /package/{_shims → dist/_shims}/auto/runtime-bun.js.map +0 -0
- /package/{_shims → dist/_shims}/auto/runtime-bun.mjs +0 -0
- /package/{_shims → dist/_shims}/auto/runtime-bun.mjs.map +0 -0
- /package/{_shims → dist/_shims}/auto/runtime-node.d.ts +0 -0
- /package/{_shims → dist/_shims}/auto/runtime-node.d.ts.map +0 -0
- /package/{_shims → dist/_shims}/auto/runtime-node.js +0 -0
- /package/{_shims → dist/_shims}/auto/runtime-node.js.map +0 -0
- /package/{_shims → dist/_shims}/auto/runtime-node.mjs +0 -0
- /package/{_shims → dist/_shims}/auto/runtime-node.mjs.map +0 -0
- /package/{_shims → dist/_shims}/auto/runtime.d.ts +0 -0
- /package/{_shims → dist/_shims}/auto/runtime.d.ts.map +0 -0
- /package/{_shims → dist/_shims}/auto/runtime.js +0 -0
- /package/{_shims → dist/_shims}/auto/runtime.js.map +0 -0
- /package/{_shims → dist/_shims}/auto/runtime.mjs +0 -0
- /package/{_shims → dist/_shims}/auto/runtime.mjs.map +0 -0
- /package/{_shims → dist/_shims}/auto/types-node.d.ts +0 -0
- /package/{_shims → dist/_shims}/auto/types-node.d.ts.map +0 -0
- /package/{_shims → dist/_shims}/auto/types-node.js +0 -0
- /package/{_shims → dist/_shims}/auto/types-node.js.map +0 -0
- /package/{_shims → dist/_shims}/auto/types-node.mjs +0 -0
- /package/{_shims → dist/_shims}/auto/types-node.mjs.map +0 -0
- /package/{_shims → dist/_shims}/auto/types.d.ts +0 -0
- /package/{_shims → dist/_shims}/auto/types.js +0 -0
- /package/{_shims → dist/_shims}/auto/types.mjs +0 -0
- /package/{_shims → dist/_shims}/bun-runtime.d.ts +0 -0
- /package/{_shims → dist/_shims}/bun-runtime.d.ts.map +0 -0
- /package/{_shims → dist/_shims}/bun-runtime.js +0 -0
- /package/{_shims → dist/_shims}/bun-runtime.js.map +0 -0
- /package/{_shims → dist/_shims}/bun-runtime.mjs +0 -0
- /package/{_shims → dist/_shims}/bun-runtime.mjs.map +0 -0
- /package/{_shims → dist/_shims}/index.d.ts +0 -0
- /package/{_shims → dist/_shims}/index.js +0 -0
- /package/{_shims → dist/_shims}/index.mjs +0 -0
- /package/{_shims → dist/_shims}/manual-types.d.ts +0 -0
- /package/{_shims → dist/_shims}/manual-types.js +0 -0
- /package/{_shims → dist/_shims}/manual-types.mjs +0 -0
- /package/{_shims → dist/_shims}/node-runtime.d.ts +0 -0
- /package/{_shims → dist/_shims}/node-runtime.d.ts.map +0 -0
- /package/{_shims → dist/_shims}/node-runtime.js +0 -0
- /package/{_shims → dist/_shims}/node-runtime.js.map +0 -0
- /package/{_shims → dist/_shims}/node-runtime.mjs +0 -0
- /package/{_shims → dist/_shims}/node-runtime.mjs.map +0 -0
- /package/{_shims → dist/_shims}/node-types.d.ts +0 -0
- /package/{_shims → dist/_shims}/node-types.js +0 -0
- /package/{_shims → dist/_shims}/node-types.mjs +0 -0
- /package/{_shims → dist/_shims}/registry.d.ts +0 -0
- /package/{_shims → dist/_shims}/registry.d.ts.map +0 -0
- /package/{_shims → dist/_shims}/registry.js +0 -0
- /package/{_shims → dist/_shims}/registry.js.map +0 -0
- /package/{_shims → dist/_shims}/registry.mjs +0 -0
- /package/{_shims → dist/_shims}/registry.mjs.map +0 -0
- /package/{_shims → dist/_shims}/web-runtime.d.ts +0 -0
- /package/{_shims → dist/_shims}/web-runtime.d.ts.map +0 -0
- /package/{_shims → dist/_shims}/web-runtime.js +0 -0
- /package/{_shims → dist/_shims}/web-runtime.js.map +0 -0
- /package/{_shims → dist/_shims}/web-runtime.mjs +0 -0
- /package/{_shims → dist/_shims}/web-runtime.mjs.map +0 -0
- /package/{_shims → dist/_shims}/web-types.d.ts +0 -0
- /package/{_shims → dist/_shims}/web-types.js +0 -0
- /package/{_shims → dist/_shims}/web-types.mjs +0 -0
- /package/{core.d.ts → dist/core.d.ts} +0 -0
- /package/{core.d.ts.map → dist/core.d.ts.map} +0 -0
- /package/{core.js → dist/core.js} +0 -0
- /package/{core.js.map → dist/core.js.map} +0 -0
- /package/{core.mjs → dist/core.mjs} +0 -0
- /package/{core.mjs.map → dist/core.mjs.map} +0 -0
- /package/{error.d.ts → dist/error.d.ts} +0 -0
- /package/{error.d.ts.map → dist/error.d.ts.map} +0 -0
- /package/{error.js → dist/error.js} +0 -0
- /package/{error.js.map → dist/error.js.map} +0 -0
- /package/{error.mjs → dist/error.mjs} +0 -0
- /package/{error.mjs.map → dist/error.mjs.map} +0 -0
- /package/{libs → dist/libs}/utils.d.ts +0 -0
- /package/{libs → dist/libs}/utils.d.ts.map +0 -0
- /package/{libs → dist/libs}/utils.js +0 -0
- /package/{libs → dist/libs}/utils.js.map +0 -0
- /package/{libs → dist/libs}/utils.mjs +0 -0
- /package/{libs → dist/libs}/utils.mjs.map +0 -0
- /package/{resource.d.ts → dist/resource.d.ts} +0 -0
- /package/{resource.d.ts.map → dist/resource.d.ts.map} +0 -0
- /package/{resource.js → dist/resource.js} +0 -0
- /package/{resource.js.map → dist/resource.js.map} +0 -0
- /package/{resource.mjs → dist/resource.mjs} +0 -0
- /package/{resource.mjs.map → dist/resource.mjs.map} +0 -0
- /package/{resources → dist/resources}/auth/credentials.d.ts +0 -0
- /package/{resources → dist/resources}/auth/credentials.d.ts.map +0 -0
- /package/{resources → dist/resources}/auth/credentials.js +0 -0
- /package/{resources → dist/resources}/auth/credentials.js.map +0 -0
- /package/{resources → dist/resources}/auth/credentials.mjs +0 -0
- /package/{resources → dist/resources}/auth/credentials.mjs.map +0 -0
- /package/{resources → dist/resources}/auth/index.mjs.map +0 -0
- /package/{resources → dist/resources}/auth/space-policies.d.ts +0 -0
- /package/{resources → dist/resources}/auth/space-policies.d.ts.map +0 -0
- /package/{resources → dist/resources}/auth/space-policies.js +0 -0
- /package/{resources → dist/resources}/auth/space-policies.js.map +0 -0
- /package/{resources → dist/resources}/auth/space-policies.mjs +0 -0
- /package/{resources → dist/resources}/auth/space-policies.mjs.map +0 -0
- /package/{resources → dist/resources}/auth/space-roles.d.ts +0 -0
- /package/{resources → dist/resources}/auth/space-roles.d.ts.map +0 -0
- /package/{resources → dist/resources}/auth/space-roles.js +0 -0
- /package/{resources → dist/resources}/auth/space-roles.js.map +0 -0
- /package/{resources → dist/resources}/auth/space-roles.mjs +0 -0
- /package/{resources → dist/resources}/auth/space-roles.mjs.map +0 -0
- /package/{resources → dist/resources}/auth/spaces.d.ts +0 -0
- /package/{resources → dist/resources}/auth/spaces.d.ts.map +0 -0
- /package/{resources → dist/resources}/auth/spaces.js +0 -0
- /package/{resources → dist/resources}/auth/spaces.js.map +0 -0
- /package/{resources → dist/resources}/auth/spaces.mjs +0 -0
- /package/{resources → dist/resources}/auth/spaces.mjs.map +0 -0
- /package/{resources → dist/resources}/console/index.d.ts +0 -0
- /package/{resources → dist/resources}/console/index.d.ts.map +0 -0
- /package/{resources → dist/resources}/console/index.js +0 -0
- /package/{resources → dist/resources}/console/index.js.map +0 -0
- /package/{resources → dist/resources}/console/index.mjs +0 -0
- /package/{resources → dist/resources}/console/index.mjs.map +0 -0
- /package/{resources → dist/resources}/console/oauth2.d.ts +0 -0
- /package/{resources → dist/resources}/console/oauth2.d.ts.map +0 -0
- /package/{resources → dist/resources}/console/oauth2.js +0 -0
- /package/{resources → dist/resources}/console/oauth2.js.map +0 -0
- /package/{resources → dist/resources}/console/oauth2.mjs +0 -0
- /package/{resources → dist/resources}/console/oauth2.mjs.map +0 -0
- /package/{resources → dist/resources}/dashboard/dashboards.d.ts +0 -0
- /package/{resources → dist/resources}/dashboard/dashboards.d.ts.map +0 -0
- /package/{resources → dist/resources}/dashboard/dashboards.js +0 -0
- /package/{resources → dist/resources}/dashboard/dashboards.js.map +0 -0
- /package/{resources → dist/resources}/dashboard/dashboards.mjs +0 -0
- /package/{resources → dist/resources}/dashboard/dashboards.mjs.map +0 -0
- /package/{resources → dist/resources}/dashboard/device-states.d.ts +0 -0
- /package/{resources → dist/resources}/dashboard/device-states.d.ts.map +0 -0
- /package/{resources → dist/resources}/dashboard/device-states.js +0 -0
- /package/{resources → dist/resources}/dashboard/device-states.js.map +0 -0
- /package/{resources → dist/resources}/dashboard/device-states.mjs +0 -0
- /package/{resources → dist/resources}/dashboard/device-states.mjs.map +0 -0
- /package/{resources → dist/resources}/dashboard/index.d.ts +0 -0
- /package/{resources → dist/resources}/dashboard/index.d.ts.map +0 -0
- /package/{resources → dist/resources}/dashboard/index.js +0 -0
- /package/{resources → dist/resources}/dashboard/index.js.map +0 -0
- /package/{resources → dist/resources}/dashboard/index.mjs +0 -0
- /package/{resources → dist/resources}/dashboard/index.mjs.map +0 -0
- /package/{resources → dist/resources}/index.d.ts +0 -0
- /package/{resources → dist/resources}/index.d.ts.map +0 -0
- /package/{resources → dist/resources}/index.js +0 -0
- /package/{resources → dist/resources}/index.js.map +0 -0
- /package/{resources → dist/resources}/index.mjs +0 -0
- /package/{resources → dist/resources}/index.mjs.map +0 -0
- /package/{shims → dist/shims}/node.d.ts +0 -0
- /package/{shims → dist/shims}/node.d.ts.map +0 -0
- /package/{shims → dist/shims}/node.js +0 -0
- /package/{shims → dist/shims}/node.js.map +0 -0
- /package/{shims → dist/shims}/node.mjs +0 -0
- /package/{shims → dist/shims}/node.mjs.map +0 -0
- /package/{shims → dist/shims}/web.d.ts +0 -0
- /package/{shims → dist/shims}/web.d.ts.map +0 -0
- /package/{shims → dist/shims}/web.js +0 -0
- /package/{shims → dist/shims}/web.js.map +0 -0
- /package/{shims → dist/shims}/web.mjs +0 -0
- /package/{shims → dist/shims}/web.mjs.map +0 -0
- /package/{src → dist/src}/tsconfig.json +0 -0
- /package/{types → dist/types}/api.d.ts +0 -0
- /package/{types → dist/types}/api.d.ts.map +0 -0
- /package/{types → dist/types}/api.js +0 -0
- /package/{types → dist/types}/api.js.map +0 -0
- /package/{types → dist/types}/api.mjs +0 -0
- /package/{types → dist/types}/api.mjs.map +0 -0
- /package/{types → dist/types}/jwt.d.ts +0 -0
- /package/{types → dist/types}/jwt.d.ts.map +0 -0
- /package/{types → dist/types}/jwt.js +0 -0
- /package/{types → dist/types}/jwt.js.map +0 -0
- /package/{types → dist/types}/jwt.mjs +0 -0
- /package/{types → dist/types}/jwt.mjs.map +0 -0
package/.editorconfig
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# EditorConfig is awesome: https://EditorConfig.org
|
|
2
|
+
|
|
3
|
+
# top-most EditorConfig file
|
|
4
|
+
root = true
|
|
5
|
+
|
|
6
|
+
[*]
|
|
7
|
+
charset = utf-8
|
|
8
|
+
end_of_line = lf
|
|
9
|
+
indent_style = space
|
|
10
|
+
indent_size = 4
|
|
11
|
+
insert_final_newline = true
|
|
12
|
+
trim_trailing_whitespace = true
|
|
13
|
+
max_line_length = 160
|
|
14
|
+
quote_type = single
|
|
15
|
+
|
|
16
|
+
[*.json]
|
|
17
|
+
indent_size = 2
|
|
18
|
+
|
|
19
|
+
[*.md]
|
|
20
|
+
trim_trailing_whitespace = false
|
|
21
|
+
|
|
22
|
+
[Makefile]
|
|
23
|
+
indent_size = 8
|
|
24
|
+
indent_style = tab
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
## What?
|
|
2
|
+
|
|
3
|
+
<!-- Explain the changes you've made in this pull request. Provide a brief summary of the features, bug fixes, or refactors included. -->
|
|
4
|
+
|
|
5
|
+
## Why?
|
|
6
|
+
|
|
7
|
+
<!-- Describe the business or technical reason behind these changes. What goal does this PR achieve? -->
|
|
8
|
+
|
|
9
|
+
## How?
|
|
10
|
+
|
|
11
|
+
<!-- Detail how the changes were implemented. Include specifics on the code, technologies, or processes used. -->
|
|
12
|
+
|
|
13
|
+
## Testing?
|
|
14
|
+
|
|
15
|
+
- [ ] Functional Testing
|
|
16
|
+
- [ ] Accessibility
|
|
17
|
+
- [ ] Performance
|
|
18
|
+
- [ ] Code Quality
|
|
19
|
+
- [ ] Security
|
|
20
|
+
- [ ] Documentation
|
|
21
|
+
- [ ] Final Review
|
|
22
|
+
|
|
23
|
+
## Anything Else?
|
|
24
|
+
|
|
25
|
+
<!-- Add any further context, suggestions, or future considerations. -->
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
name: Version Bump and Pull Request
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
version_bump:
|
|
9
|
+
if: github.event.commits[0].author.username != 'github-actions[bot]'
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
|
|
12
|
+
steps:
|
|
13
|
+
- name: Checkout code
|
|
14
|
+
uses: actions/checkout@v4
|
|
15
|
+
|
|
16
|
+
- name: Set up Git
|
|
17
|
+
run: |
|
|
18
|
+
git config --global user.name 'github-actions[bot]'
|
|
19
|
+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
|
|
20
|
+
|
|
21
|
+
- name: Bump version
|
|
22
|
+
id: bump_version
|
|
23
|
+
run: |
|
|
24
|
+
version=$(npm version prerelease --preid=dev --no-git-tag-version)
|
|
25
|
+
echo "bumped_version=${version}" >> $GITHUB_ENV
|
|
26
|
+
|
|
27
|
+
- name: Update src/version.ts
|
|
28
|
+
run: |
|
|
29
|
+
echo "export const VERSION = '${{ env.bumped_version }}';" > src/version.ts
|
|
30
|
+
git add src/version.ts
|
|
31
|
+
|
|
32
|
+
- name: Create new branch
|
|
33
|
+
run: |
|
|
34
|
+
git checkout -b "${{ env.bumped_version }}"
|
|
35
|
+
npm install
|
|
36
|
+
npm run build
|
|
37
|
+
git add src/version.ts
|
|
38
|
+
git commit -m"${{ env.bumped_version }}"
|
|
39
|
+
git push origin "${{ env.bumped_version }}"
|
|
40
|
+
|
|
41
|
+
- name: Create Pull Request
|
|
42
|
+
id: cpr
|
|
43
|
+
uses: peter-evans/create-pull-request@v5
|
|
44
|
+
with:
|
|
45
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
46
|
+
branch: '${{ env.bumped_version }}'
|
|
47
|
+
commit-message: '${{ env.bumped_version }}'
|
|
48
|
+
committer: 'github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>'
|
|
49
|
+
author: 'github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>'
|
|
50
|
+
title: 'Bump version to ${{ env.bumped_version }}'
|
|
51
|
+
body: 'This pull request bumps the version to ${{ env.bumped_version }}.'
|
|
52
|
+
base: main
|
|
53
|
+
labels: 'dev'
|
|
54
|
+
|
|
55
|
+
- name: Auto approve
|
|
56
|
+
if: steps.cpr.outputs.pull-request-operation == 'created'
|
|
57
|
+
run: gh pr review --approve "${{ steps.cpr.outputs.pull-request-number }}"
|
|
58
|
+
env:
|
|
59
|
+
GH_TOKEN: ${{ secrets.GH_PACKAGE }}
|
|
60
|
+
|
|
61
|
+
- name: Request Automerge
|
|
62
|
+
if: steps.cpr.outputs.pull-request-operation == 'created'
|
|
63
|
+
uses: peter-evans/enable-pull-request-automerge@v3
|
|
64
|
+
with:
|
|
65
|
+
token: ${{ secrets.GH_PACKAGE }}
|
|
66
|
+
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
|
|
67
|
+
merge-method: squash
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: Publish to npm
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
publish:
|
|
9
|
+
if: github.event.commits[0].author.username == 'github-actions[bot]'
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
- uses: actions/setup-node@v4
|
|
15
|
+
with:
|
|
16
|
+
node-version: '20'
|
|
17
|
+
registry-url: 'https://registry.npmjs.org'
|
|
18
|
+
|
|
19
|
+
- name: Install dependencies
|
|
20
|
+
run: npm install
|
|
21
|
+
|
|
22
|
+
- run: npm run build
|
|
23
|
+
- run: cd dist
|
|
24
|
+
|
|
25
|
+
- name: Publish to npm
|
|
26
|
+
run: npm publish --access public
|
|
27
|
+
env:
|
|
28
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/.gitignore
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity
|
|
10
|
+
and orientation.
|
|
11
|
+
|
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
+
diverse, inclusive, and healthy community.
|
|
14
|
+
|
|
15
|
+
## Our Standards
|
|
16
|
+
|
|
17
|
+
Examples of behavior that contributes to a positive environment for our
|
|
18
|
+
community include:
|
|
19
|
+
|
|
20
|
+
* Demonstrating empathy and kindness toward other people
|
|
21
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
+
* Giving and gracefully accepting constructive feedback
|
|
23
|
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
|
+
and learning from the experience
|
|
25
|
+
* Focusing on what is best not just for us as individuals, but for the
|
|
26
|
+
overall community
|
|
27
|
+
|
|
28
|
+
Examples of unacceptable behavior include:
|
|
29
|
+
|
|
30
|
+
* The use of sexualized language or imagery, and sexual attention or
|
|
31
|
+
advances of any kind
|
|
32
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
33
|
+
* Public or private harassment
|
|
34
|
+
* Publishing others' private information, such as a physical or email
|
|
35
|
+
address, without their explicit permission
|
|
36
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
|
37
|
+
professional setting
|
|
38
|
+
|
|
39
|
+
## Enforcement Responsibilities
|
|
40
|
+
|
|
41
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
|
42
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
|
43
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
44
|
+
or harmful.
|
|
45
|
+
|
|
46
|
+
Community leaders have the right and responsibility to remove, edit, or reject
|
|
47
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
48
|
+
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
49
|
+
decisions when appropriate.
|
|
50
|
+
|
|
51
|
+
## Scope
|
|
52
|
+
|
|
53
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
|
54
|
+
an individual is officially representing the community in public spaces.
|
|
55
|
+
Examples of representing our community include using an official e-mail address,
|
|
56
|
+
posting via an official social media account, or acting as an appointed
|
|
57
|
+
representative at an online or offline event.
|
|
58
|
+
|
|
59
|
+
## Enforcement
|
|
60
|
+
|
|
61
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
62
|
+
reported to the community leaders responsible for enforcement at
|
|
63
|
+
.
|
|
64
|
+
All complaints will be reviewed and investigated promptly and fairly.
|
|
65
|
+
|
|
66
|
+
All community leaders are obligated to respect the privacy and security of the
|
|
67
|
+
reporter of any incident.
|
|
68
|
+
|
|
69
|
+
## Enforcement Guidelines
|
|
70
|
+
|
|
71
|
+
Community leaders will follow these Community Impact Guidelines in determining
|
|
72
|
+
the consequences for any action they deem in violation of this Code of Conduct:
|
|
73
|
+
|
|
74
|
+
### 1. Correction
|
|
75
|
+
|
|
76
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
77
|
+
unprofessional or unwelcome in the community.
|
|
78
|
+
|
|
79
|
+
**Consequence**: A private, written warning from community leaders, providing
|
|
80
|
+
clarity around the nature of the violation and an explanation of why the
|
|
81
|
+
behavior was inappropriate. A public apology may be requested.
|
|
82
|
+
|
|
83
|
+
### 2. Warning
|
|
84
|
+
|
|
85
|
+
**Community Impact**: A violation through a single incident or series
|
|
86
|
+
of actions.
|
|
87
|
+
|
|
88
|
+
**Consequence**: A warning with consequences for continued behavior. No
|
|
89
|
+
interaction with the people involved, including unsolicited interaction with
|
|
90
|
+
those enforcing the Code of Conduct, for a specified period of time. This
|
|
91
|
+
includes avoiding interactions in community spaces as well as external channels
|
|
92
|
+
like social media. Violating these terms may lead to a temporary or
|
|
93
|
+
permanent ban.
|
|
94
|
+
|
|
95
|
+
### 3. Temporary Ban
|
|
96
|
+
|
|
97
|
+
**Community Impact**: A serious violation of community standards, including
|
|
98
|
+
sustained inappropriate behavior.
|
|
99
|
+
|
|
100
|
+
**Consequence**: A temporary ban from any sort of interaction or public
|
|
101
|
+
communication with the community for a specified period of time. No public or
|
|
102
|
+
private interaction with the people involved, including unsolicited interaction
|
|
103
|
+
with those enforcing the Code of Conduct, is allowed during this period.
|
|
104
|
+
Violating these terms may lead to a permanent ban.
|
|
105
|
+
|
|
106
|
+
### 4. Permanent Ban
|
|
107
|
+
|
|
108
|
+
**Community Impact**: Demonstrating a pattern of violation of community
|
|
109
|
+
standards, including sustained inappropriate behavior, harassment of an
|
|
110
|
+
individual, or aggression toward or disparagement of classes of individuals.
|
|
111
|
+
|
|
112
|
+
**Consequence**: A permanent ban from any sort of public interaction within
|
|
113
|
+
the community.
|
|
114
|
+
|
|
115
|
+
## Attribution
|
|
116
|
+
|
|
117
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
118
|
+
version 2.0, available at
|
|
119
|
+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
|
120
|
+
|
|
121
|
+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
|
122
|
+
enforcement ladder](https://github.com/mozilla/diversity).
|
|
123
|
+
|
|
124
|
+
[homepage]: https://www.contributor-covenant.org
|
|
125
|
+
|
|
126
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
|
127
|
+
https://www.contributor-covenant.org/faq. Translations are available at
|
|
128
|
+
https://www.contributor-covenant.org/translations.
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
## Setting up the environment
|
|
2
|
+
|
|
3
|
+
This repository uses [`yarn@v1`](https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable).
|
|
4
|
+
Other package managers may work but are not officially supported for development.
|
|
5
|
+
|
|
6
|
+
To set up the repository, run:
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
yarn
|
|
10
|
+
yarn build
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
This will install all the required dependencies and build output files to `dist/`.
|
|
14
|
+
|
|
15
|
+
## Modifying/Adding code
|
|
16
|
+
|
|
17
|
+
Most of the SDK is generated code. Modifications to code will be persisted between generations, but may
|
|
18
|
+
result in merge conflicts between manual patches and changes from the generator. The generator will never
|
|
19
|
+
modify the contents of the `src/lib/` and `examples/` directories.
|
|
20
|
+
|
|
21
|
+
## Adding and running examples
|
|
22
|
+
|
|
23
|
+
All files in the `examples/` directory are not modified by the generator and can be freely edited or added to.
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
// add an example to examples/<your-example>.ts
|
|
27
|
+
|
|
28
|
+
#!/usr/bin/env -S npm run tsn -T
|
|
29
|
+
…
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
chmod +x examples/<your-example>.ts
|
|
34
|
+
# run the example against your api
|
|
35
|
+
yarn tsn -T examples/<your-example>.ts
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
# With yarn
|
|
39
|
+
|
|
40
|
+
yarn link
|
|
41
|
+
cd ../my-package
|
|
42
|
+
yarn link @space-df/sdk
|
|
43
|
+
|
|
44
|
+
# With pnpm
|
|
45
|
+
|
|
46
|
+
pnpm link --global
|
|
47
|
+
cd ../my-package
|
|
48
|
+
pnpm link -—global @space-df/sdk
|
|
49
|
+
|
|
50
|
+
````
|
|
51
|
+
|
|
52
|
+
## Running tests
|
|
53
|
+
|
|
54
|
+
Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
npx prism mock path/to/your/openapi.yml
|
|
58
|
+
````
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
yarn run test
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Linting and formatting
|
|
65
|
+
|
|
66
|
+
This repository uses [prettier](https://www.npmjs.com/package/prettier) and
|
|
67
|
+
[eslint](https://www.npmjs.com/package/eslint) to format the code in the repository.
|
|
68
|
+
|
|
69
|
+
To lint:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
yarn lint
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
To format and fix all lint issues automatically:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
yarn fix
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Publishing and releases
|
|
82
|
+
|
|
83
|
+
Changes made to this repository via the automated release PR pipeline should publish to npm automatically. If
|
|
84
|
+
the changes aren't made through the automated pipeline, you may want to make releases manually.
|
|
85
|
+
|
|
86
|
+
### Publish manually
|
|
87
|
+
|
|
88
|
+
If you need to manually release a package, you can run the `bin/publish-npm` script with an `NPM_TOKEN` set on
|
|
89
|
+
the environment.
|