dub 0.10.0 → 0.20.2
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/.github/workflows/sdk_generation.yaml +26 -0
- package/.github/workflows/sdk_publish.yaml +15 -0
- package/.speakeasy/gen.lock +205 -0
- package/.speakeasy/gen.yaml +37 -0
- package/.speakeasy/workflow.yaml +12 -0
- package/README.md +292 -182
- package/docs/sdks/analytics/README.md +535 -0
- package/docs/sdks/dub/README.md +9 -0
- package/docs/sdks/links/README.md +415 -0
- package/docs/sdks/qrcodes/README.md +58 -0
- package/docs/sdks/tags/README.md +113 -0
- package/docs/sdks/workspaces/README.md +168 -0
- package/hooks/hooks.d.ts +20 -0
- package/hooks/hooks.d.ts.map +1 -0
- package/hooks/hooks.js +55 -0
- package/hooks/hooks.js.map +1 -0
- package/hooks/index.d.ts +3 -0
- package/hooks/index.d.ts.map +1 -0
- package/{_shims/auto/runtime-bun.js → hooks/index.js} +6 -5
- package/hooks/index.js.map +1 -0
- package/hooks/types.d.ts +59 -0
- package/hooks/types.d.ts.map +1 -0
- package/hooks/types.js +6 -0
- package/hooks/types.js.map +1 -0
- package/index.d.ts +4 -125
- package/index.d.ts.map +1 -1
- package/index.js +10 -103
- package/index.js.map +1 -1
- package/lib/base64.d.ts +10 -0
- package/lib/base64.d.ts.map +1 -0
- package/lib/base64.js +61 -0
- package/lib/base64.js.map +1 -0
- package/lib/config.d.ts +39 -0
- package/lib/config.d.ts.map +1 -0
- package/lib/config.js +39 -0
- package/lib/config.js.map +1 -0
- package/lib/encodings.d.ts +39 -0
- package/lib/encodings.d.ts.map +1 -0
- package/lib/encodings.js +311 -0
- package/lib/encodings.js.map +1 -0
- package/lib/http.d.ts +46 -0
- package/lib/http.d.ts.map +1 -0
- package/lib/http.js +143 -0
- package/lib/http.js.map +1 -0
- package/lib/retries.d.ts +18 -0
- package/lib/retries.d.ts.map +1 -0
- package/lib/retries.js +157 -0
- package/lib/retries.js.map +1 -0
- package/lib/schemas.d.ts +7 -0
- package/lib/schemas.d.ts.map +1 -0
- package/{shims/web.js → lib/schemas.js} +24 -6
- package/lib/schemas.js.map +1 -0
- package/lib/sdks.d.ts +39 -0
- package/lib/sdks.d.ts.map +1 -0
- package/lib/sdks.js +98 -0
- package/lib/sdks.js.map +1 -0
- package/lib/security.d.ts +57 -0
- package/lib/security.d.ts.map +1 -0
- package/lib/security.js +115 -0
- package/lib/security.js.map +1 -0
- package/lib/url.d.ts +4 -0
- package/lib/url.d.ts.map +1 -0
- package/lib/url.js +26 -0
- package/lib/url.js.map +1 -0
- package/models/components/index.d.ts +5 -0
- package/models/components/index.d.ts.map +1 -0
- package/{_shims/auto/runtime-node.js → models/components/index.js} +8 -5
- package/models/components/index.js.map +1 -0
- package/models/components/linkschema.d.ts +222 -0
- package/models/components/linkschema.d.ts.map +1 -0
- package/models/components/linkschema.js +189 -0
- package/models/components/linkschema.js.map +1 -0
- package/models/components/security.d.ts +16 -0
- package/models/components/security.d.ts.map +1 -0
- package/models/components/security.js +53 -0
- package/models/components/security.js.map +1 -0
- package/models/components/tagschema.d.ts +45 -0
- package/models/components/tagschema.d.ts.map +1 -0
- package/models/components/tagschema.js +76 -0
- package/models/components/tagschema.js.map +1 -0
- package/models/components/workspaceschema.d.ts +178 -0
- package/models/components/workspaceschema.d.ts.map +1 -0
- package/models/components/workspaceschema.js +190 -0
- package/models/components/workspaceschema.js.map +1 -0
- package/models/errors/badrequest.d.ts +65 -0
- package/models/errors/badrequest.d.ts.map +1 -0
- package/models/errors/badrequest.js +111 -0
- package/models/errors/badrequest.js.map +1 -0
- package/models/errors/conflict.d.ts +65 -0
- package/models/errors/conflict.d.ts.map +1 -0
- package/models/errors/conflict.js +111 -0
- package/models/errors/conflict.js.map +1 -0
- package/models/errors/forbidden.d.ts +65 -0
- package/models/errors/forbidden.d.ts.map +1 -0
- package/models/errors/forbidden.js +111 -0
- package/models/errors/forbidden.js.map +1 -0
- package/models/errors/index.d.ts +12 -0
- package/models/errors/index.d.ts.map +1 -0
- package/{_shims/auto/types-node.js → models/errors/index.js} +15 -5
- package/models/errors/index.js.map +1 -0
- package/models/errors/internalservererror.d.ts +65 -0
- package/models/errors/internalservererror.d.ts.map +1 -0
- package/models/errors/internalservererror.js +111 -0
- package/models/errors/internalservererror.js.map +1 -0
- package/models/errors/inviteexpired.d.ts +65 -0
- package/models/errors/inviteexpired.d.ts.map +1 -0
- package/models/errors/inviteexpired.js +111 -0
- package/models/errors/inviteexpired.js.map +1 -0
- package/models/errors/notfound.d.ts +65 -0
- package/models/errors/notfound.d.ts.map +1 -0
- package/models/errors/notfound.js +111 -0
- package/models/errors/notfound.js.map +1 -0
- package/models/errors/ratelimitexceeded.d.ts +65 -0
- package/models/errors/ratelimitexceeded.d.ts.map +1 -0
- package/models/errors/ratelimitexceeded.js +111 -0
- package/models/errors/ratelimitexceeded.js.map +1 -0
- package/models/errors/sdkerror.d.ts +7 -0
- package/models/errors/sdkerror.d.ts.map +1 -0
- package/models/errors/sdkerror.js +19 -0
- package/models/errors/sdkerror.js.map +1 -0
- package/models/errors/sdkvalidationerror.d.ts +17 -0
- package/models/errors/sdkvalidationerror.d.ts.map +1 -0
- package/models/errors/sdkvalidationerror.js +107 -0
- package/models/errors/sdkvalidationerror.js.map +1 -0
- package/models/errors/unauthorized.d.ts +65 -0
- package/models/errors/unauthorized.d.ts.map +1 -0
- package/models/errors/unauthorized.js +111 -0
- package/models/errors/unauthorized.js.map +1 -0
- package/models/errors/unprocessableentity.d.ts +65 -0
- package/models/errors/unprocessableentity.d.ts.map +1 -0
- package/models/errors/unprocessableentity.js +111 -0
- package/models/errors/unprocessableentity.js.map +1 -0
- package/models/operations/bulkcreatelinks.d.ts +146 -0
- package/models/operations/bulkcreatelinks.d.ts.map +1 -0
- package/models/operations/bulkcreatelinks.js +138 -0
- package/models/operations/bulkcreatelinks.js.map +1 -0
- package/models/operations/createlink.d.ts +146 -0
- package/models/operations/createlink.d.ts.map +1 -0
- package/models/operations/createlink.js +141 -0
- package/models/operations/createlink.js.map +1 -0
- package/models/operations/createtag.d.ts +39 -0
- package/models/operations/createtag.d.ts.map +1 -0
- package/models/operations/createtag.js +72 -0
- package/models/operations/createtag.js.map +1 -0
- package/models/operations/createworkspace.d.ts +22 -0
- package/models/operations/createworkspace.d.ts.map +1 -0
- package/models/operations/createworkspace.js +61 -0
- package/models/operations/createworkspace.js.map +1 -0
- package/models/operations/deletelink.d.ts +39 -0
- package/models/operations/deletelink.d.ts.map +1 -0
- package/models/operations/deletelink.js +75 -0
- package/models/operations/deletelink.js.map +1 -0
- package/models/operations/editlink.d.ts +166 -0
- package/models/operations/editlink.d.ts.map +1 -0
- package/models/operations/editlink.js +167 -0
- package/models/operations/editlink.js.map +1 -0
- package/models/operations/getbrowseranalytics.d.ts +378 -0
- package/models/operations/getbrowseranalytics.d.ts.map +1 -0
- package/models/operations/getbrowseranalytics.js +395 -0
- package/models/operations/getbrowseranalytics.js.map +1 -0
- package/models/operations/getcityanalytics.d.ts +641 -0
- package/models/operations/getcityanalytics.d.ts.map +1 -0
- package/models/operations/getcityanalytics.js +657 -0
- package/models/operations/getcityanalytics.js.map +1 -0
- package/models/operations/getclicksanalytics.d.ts +355 -0
- package/models/operations/getclicksanalytics.d.ts.map +1 -0
- package/models/operations/getclicksanalytics.js +369 -0
- package/models/operations/getclicksanalytics.js.map +1 -0
- package/models/operations/getcountryanalytics.d.ts +635 -0
- package/models/operations/getcountryanalytics.d.ts.map +1 -0
- package/models/operations/getcountryanalytics.js +653 -0
- package/models/operations/getcountryanalytics.js.map +1 -0
- package/models/operations/getdeviceanalytics.d.ts +378 -0
- package/models/operations/getdeviceanalytics.d.ts.map +1 -0
- package/models/operations/getdeviceanalytics.js +395 -0
- package/models/operations/getdeviceanalytics.js.map +1 -0
- package/models/operations/getlinkinfo.d.ts +25 -0
- package/models/operations/getlinkinfo.d.ts.map +1 -0
- package/models/operations/getlinkinfo.js +57 -0
- package/models/operations/getlinkinfo.js.map +1 -0
- package/models/operations/getlinks.d.ts +88 -0
- package/models/operations/getlinks.d.ts.map +1 -0
- package/models/operations/getlinks.js +108 -0
- package/models/operations/getlinks.js.map +1 -0
- package/models/operations/getlinkscount.d.ts +93 -0
- package/models/operations/getlinkscount.d.ts.map +1 -0
- package/models/operations/getlinkscount.js +105 -0
- package/models/operations/getlinkscount.js.map +1 -0
- package/models/operations/getosanalytics.d.ts +378 -0
- package/models/operations/getosanalytics.d.ts.map +1 -0
- package/models/operations/getosanalytics.js +395 -0
- package/models/operations/getosanalytics.js.map +1 -0
- package/models/operations/getqrcode.d.ts +60 -0
- package/models/operations/getqrcode.d.ts.map +1 -0
- package/models/operations/getqrcode.js +85 -0
- package/models/operations/getqrcode.js.map +1 -0
- package/models/operations/getrefereranalytics.d.ts +378 -0
- package/models/operations/getrefereranalytics.d.ts.map +1 -0
- package/models/operations/getrefereranalytics.js +395 -0
- package/models/operations/getrefereranalytics.js.map +1 -0
- package/models/operations/gettags.d.ts +10 -0
- package/models/operations/gettags.d.ts.map +1 -0
- package/{shims/node.js → models/operations/gettags.js} +12 -6
- package/models/operations/gettags.js.map +1 -0
- package/models/operations/gettimeseriesanalytics.d.ts +378 -0
- package/models/operations/gettimeseriesanalytics.d.ts.map +1 -0
- package/models/operations/gettimeseriesanalytics.js +395 -0
- package/models/operations/gettimeseriesanalytics.js.map +1 -0
- package/models/operations/gettoplinks.d.ts +378 -0
- package/models/operations/gettoplinks.d.ts.map +1 -0
- package/models/operations/gettoplinks.js +395 -0
- package/models/operations/gettoplinks.js.map +1 -0
- package/models/operations/gettopurls.d.ts +378 -0
- package/models/operations/gettopurls.d.ts.map +1 -0
- package/models/operations/gettopurls.js +395 -0
- package/models/operations/gettopurls.js.map +1 -0
- package/models/operations/getworkspace.d.ts +19 -0
- package/models/operations/getworkspace.d.ts.map +1 -0
- package/models/operations/getworkspace.js +53 -0
- package/models/operations/getworkspace.js.map +1 -0
- package/models/operations/index.d.ts +23 -0
- package/models/operations/index.d.ts.map +1 -0
- package/models/operations/index.js +42 -0
- package/models/operations/index.js.map +1 -0
- package/package.json +25 -98
- package/sdk/analytics.d.ts +78 -0
- package/sdk/analytics.d.ts.map +1 -0
- package/sdk/analytics.js +2044 -0
- package/sdk/analytics.js.map +1 -0
- package/sdk/index.d.ts +2 -0
- package/sdk/index.d.ts.map +1 -0
- package/{_shims/auto/runtime.js → sdk/index.js} +5 -5
- package/sdk/index.js.map +1 -0
- package/sdk/links.d.ts +58 -0
- package/sdk/links.d.ts.map +1 -0
- package/sdk/links.js +1309 -0
- package/sdk/links.js.map +1 -0
- package/sdk/qrcodes.d.ts +21 -0
- package/sdk/qrcodes.d.ts.map +1 -0
- package/sdk/qrcodes.js +249 -0
- package/sdk/qrcodes.js.map +1 -0
- package/sdk/sdk.d.ts +22 -0
- package/sdk/sdk.d.ts.map +1 -0
- package/sdk/sdk.js +59 -0
- package/sdk/sdk.js.map +1 -0
- package/sdk/tags.d.ts +23 -0
- package/sdk/tags.d.ts.map +1 -0
- package/sdk/tags.js +401 -0
- package/sdk/tags.js.map +1 -0
- package/sdk/workspaces.d.ts +30 -0
- package/sdk/workspaces.d.ts.map +1 -0
- package/sdk/workspaces.js +556 -0
- package/sdk/workspaces.js.map +1 -0
- package/src/hooks/hooks.ts +81 -0
- package/src/hooks/index.ts +6 -0
- package/src/hooks/types.ts +74 -0
- package/src/index.ts +8 -209
- package/src/lib/base64.ts +37 -0
- package/src/lib/config.ts +70 -0
- package/src/lib/encodings.ts +384 -0
- package/src/lib/http.ts +215 -0
- package/src/lib/retries.ts +226 -0
- package/src/lib/schemas.ts +22 -0
- package/src/lib/sdks.ts +139 -0
- package/src/lib/security.ts +180 -0
- package/src/lib/url.ts +31 -0
- package/src/models/components/index.ts +8 -0
- package/src/models/components/linkschema.ts +383 -0
- package/src/models/components/security.ts +40 -0
- package/src/models/components/tagschema.ts +79 -0
- package/src/models/components/workspaceschema.ts +316 -0
- package/src/models/errors/badrequest.ts +140 -0
- package/src/models/errors/conflict.ts +140 -0
- package/src/models/errors/forbidden.ts +140 -0
- package/src/models/errors/index.ts +15 -0
- package/src/models/errors/internalservererror.ts +140 -0
- package/src/models/errors/inviteexpired.ts +140 -0
- package/src/models/errors/notfound.ts +140 -0
- package/src/models/errors/ratelimitexceeded.ts +140 -0
- package/src/models/errors/sdkerror.ts +22 -0
- package/src/models/errors/sdkvalidationerror.ts +95 -0
- package/src/models/errors/unauthorized.ts +140 -0
- package/src/models/errors/unprocessableentity.ts +140 -0
- package/src/models/operations/bulkcreatelinks.ts +254 -0
- package/src/models/operations/createlink.ts +255 -0
- package/src/models/operations/createtag.ts +69 -0
- package/src/models/operations/createworkspace.ts +54 -0
- package/src/models/operations/deletelink.ts +84 -0
- package/src/models/operations/editlink.ts +300 -0
- package/src/models/operations/getbrowseranalytics.ts +484 -0
- package/src/models/operations/getcityanalytics.ts +744 -0
- package/src/models/operations/getclicksanalytics.ts +427 -0
- package/src/models/operations/getcountryanalytics.ts +743 -0
- package/src/models/operations/getdeviceanalytics.ts +480 -0
- package/src/models/operations/getlinkinfo.ts +53 -0
- package/src/models/operations/getlinks.ts +155 -0
- package/src/models/operations/getlinkscount.ts +157 -0
- package/src/models/operations/getosanalytics.ts +475 -0
- package/src/models/operations/getqrcode.ts +106 -0
- package/src/models/operations/getrefereranalytics.ts +484 -0
- package/src/models/operations/gettags.ts +18 -0
- package/src/models/operations/gettimeseriesanalytics.ts +476 -0
- package/src/models/operations/gettoplinks.ts +475 -0
- package/src/models/operations/gettopurls.ts +475 -0
- package/src/models/operations/getworkspace.ts +43 -0
- package/src/models/operations/index.ts +26 -0
- package/src/sdk/analytics.ts +2493 -0
- package/src/sdk/index.ts +5 -0
- package/src/sdk/links.ts +1617 -0
- package/src/sdk/qrcodes.ts +276 -0
- package/src/sdk/sdk.ts +66 -0
- package/src/sdk/tags.ts +470 -0
- package/src/sdk/workspaces.ts +670 -0
- package/src/types/blobs.ts +30 -0
- package/src/types/index.ts +8 -0
- package/src/types/operations.ts +25 -0
- package/src/types/rfcdate.ts +54 -0
- package/types/blobs.d.ts +4 -0
- package/types/blobs.d.ts.map +1 -0
- package/{resources/projects/projects.js → types/blobs.js} +23 -24
- package/types/blobs.js.map +1 -0
- package/types/index.d.ts +5 -0
- package/types/index.d.ts.map +1 -0
- package/types/index.js +14 -0
- package/types/index.js.map +1 -0
- package/types/operations.d.ts +13 -0
- package/types/operations.d.ts.map +1 -0
- package/types/operations.js +19 -0
- package/types/operations.js.map +1 -0
- package/types/rfcdate.d.ts +21 -0
- package/types/rfcdate.d.ts.map +1 -0
- package/types/rfcdate.js +46 -0
- package/types/rfcdate.js.map +1 -0
- package/CHANGELOG.md +0 -116
- package/LICENSE +0 -201
- package/_shims/MultipartBody.d.ts +0 -9
- package/_shims/MultipartBody.d.ts.map +0 -1
- package/_shims/MultipartBody.js +0 -16
- package/_shims/MultipartBody.js.map +0 -1
- package/_shims/MultipartBody.mjs +0 -12
- package/_shims/MultipartBody.mjs.map +0 -1
- package/_shims/README.md +0 -46
- package/_shims/auto/runtime-bun.d.ts +0 -5
- package/_shims/auto/runtime-bun.d.ts.map +0 -1
- package/_shims/auto/runtime-bun.js.map +0 -1
- package/_shims/auto/runtime-bun.mjs +0 -2
- package/_shims/auto/runtime-bun.mjs.map +0 -1
- package/_shims/auto/runtime-node.d.ts +0 -5
- package/_shims/auto/runtime-node.d.ts.map +0 -1
- package/_shims/auto/runtime-node.js.map +0 -1
- package/_shims/auto/runtime-node.mjs +0 -2
- package/_shims/auto/runtime-node.mjs.map +0 -1
- package/_shims/auto/runtime.d.ts +0 -5
- package/_shims/auto/runtime.d.ts.map +0 -1
- package/_shims/auto/runtime.js.map +0 -1
- package/_shims/auto/runtime.mjs +0 -2
- package/_shims/auto/runtime.mjs.map +0 -1
- package/_shims/auto/types-node.d.ts +0 -5
- package/_shims/auto/types-node.d.ts.map +0 -1
- package/_shims/auto/types-node.js.map +0 -1
- package/_shims/auto/types-node.mjs +0 -2
- package/_shims/auto/types-node.mjs.map +0 -1
- package/_shims/auto/types.d.ts +0 -101
- package/_shims/auto/types.js +0 -3
- package/_shims/auto/types.mjs +0 -3
- package/_shims/bun-runtime.d.ts +0 -6
- package/_shims/bun-runtime.d.ts.map +0 -1
- package/_shims/bun-runtime.js +0 -14
- package/_shims/bun-runtime.js.map +0 -1
- package/_shims/bun-runtime.mjs +0 -10
- package/_shims/bun-runtime.mjs.map +0 -1
- package/_shims/index.d.ts +0 -81
- package/_shims/index.js +0 -13
- package/_shims/index.mjs +0 -7
- package/_shims/manual-types.d.ts +0 -12
- package/_shims/manual-types.js +0 -3
- package/_shims/manual-types.mjs +0 -3
- package/_shims/node-runtime.d.ts +0 -3
- package/_shims/node-runtime.d.ts.map +0 -1
- package/_shims/node-runtime.js +0 -90
- package/_shims/node-runtime.js.map +0 -1
- package/_shims/node-runtime.mjs +0 -56
- package/_shims/node-runtime.mjs.map +0 -1
- package/_shims/node-types.d.ts +0 -42
- package/_shims/node-types.js +0 -3
- package/_shims/node-types.mjs +0 -3
- package/_shims/registry.d.ts +0 -37
- package/_shims/registry.d.ts.map +0 -1
- package/_shims/registry.js +0 -41
- package/_shims/registry.js.map +0 -1
- package/_shims/registry.mjs +0 -37
- package/_shims/registry.mjs.map +0 -1
- package/_shims/web-runtime.d.ts +0 -5
- package/_shims/web-runtime.d.ts.map +0 -1
- package/_shims/web-runtime.js +0 -78
- package/_shims/web-runtime.js.map +0 -1
- package/_shims/web-runtime.mjs +0 -71
- package/_shims/web-runtime.mjs.map +0 -1
- package/_shims/web-types.d.ts +0 -83
- package/_shims/web-types.js +0 -3
- package/_shims/web-types.mjs +0 -3
- package/core.d.ts +0 -237
- package/core.d.ts.map +0 -1
- package/core.js +0 -868
- package/core.js.map +0 -1
- package/core.mjs +0 -837
- package/core.mjs.map +0 -1
- package/error.d.ts +0 -53
- package/error.d.ts.map +0 -1
- package/error.js +0 -143
- package/error.js.map +0 -1
- package/error.mjs +0 -127
- package/error.mjs.map +0 -1
- package/index.d.mts +0 -127
- package/index.mjs +0 -90
- package/index.mjs.map +0 -1
- package/resource.d.ts +0 -6
- package/resource.d.ts.map +0 -1
- package/resource.js +0 -11
- package/resource.js.map +0 -1
- package/resource.mjs +0 -7
- package/resource.mjs.map +0 -1
- package/resources/index.d.ts +0 -4
- package/resources/index.d.ts.map +0 -1
- package/resources/index.js +0 -11
- package/resources/index.js.map +0 -1
- package/resources/index.mjs +0 -5
- package/resources/index.mjs.map +0 -1
- package/resources/links/bulk.d.ts +0 -274
- package/resources/links/bulk.d.ts.map +0 -1
- package/resources/links/bulk.js +0 -18
- package/resources/links/bulk.js.map +0 -1
- package/resources/links/bulk.mjs +0 -14
- package/resources/links/bulk.mjs.map +0 -1
- package/resources/links/index.d.ts +0 -4
- package/resources/links/index.d.ts.map +0 -1
- package/resources/links/index.js +0 -11
- package/resources/links/index.js.map +0 -1
- package/resources/links/index.mjs +0 -5
- package/resources/links/index.mjs.map +0 -1
- package/resources/links/info.d.ts +0 -186
- package/resources/links/info.d.ts.map +0 -1
- package/resources/links/info.js +0 -18
- package/resources/links/info.js.map +0 -1
- package/resources/links/info.mjs +0 -14
- package/resources/links/info.mjs.map +0 -1
- package/resources/links/links.d.ts +0 -916
- package/resources/links/links.d.ts.map +0 -1
- package/resources/links/links.js +0 -72
- package/resources/links/links.js.map +0 -1
- package/resources/links/links.mjs +0 -45
- package/resources/links/links.mjs.map +0 -1
- package/resources/projects/index.d.ts +0 -3
- package/resources/projects/index.d.ts.map +0 -1
- package/resources/projects/index.js +0 -9
- package/resources/projects/index.js.map +0 -1
- package/resources/projects/index.mjs +0 -4
- package/resources/projects/index.mjs.map +0 -1
- package/resources/projects/projects.d.ts +0 -200
- package/resources/projects/projects.d.ts.map +0 -1
- package/resources/projects/projects.js.map +0 -1
- package/resources/projects/projects.mjs +0 -26
- package/resources/projects/projects.mjs.map +0 -1
- package/resources/projects/tags.d.ts +0 -4
- package/resources/projects/tags.d.ts.map +0 -1
- package/resources/projects/tags.js +0 -9
- package/resources/projects/tags.js.map +0 -1
- package/resources/projects/tags.mjs +0 -5
- package/resources/projects/tags.mjs.map +0 -1
- package/resources/qr.d.ts +0 -45
- package/resources/qr.d.ts.map +0 -1
- package/resources/qr.js +0 -18
- package/resources/qr.js.map +0 -1
- package/resources/qr.mjs +0 -14
- package/resources/qr.mjs.map +0 -1
- package/shims/node.d.ts +0 -29
- package/shims/node.d.ts.map +0 -1
- package/shims/node.js.map +0 -1
- package/shims/node.mjs +0 -5
- package/shims/node.mjs.map +0 -1
- package/shims/web.d.ts +0 -26
- package/shims/web.d.ts.map +0 -1
- package/shims/web.js.map +0 -1
- package/shims/web.mjs +0 -5
- package/shims/web.mjs.map +0 -1
- package/src/_shims/MultipartBody.ts +0 -9
- package/src/_shims/README.md +0 -46
- package/src/_shims/auto/runtime-bun.ts +0 -4
- package/src/_shims/auto/runtime-node.ts +0 -4
- package/src/_shims/auto/runtime.ts +0 -4
- package/src/_shims/auto/types-node.ts +0 -4
- package/src/_shims/auto/types.d.ts +0 -101
- package/src/_shims/auto/types.js +0 -3
- package/src/_shims/auto/types.mjs +0 -3
- package/src/_shims/bun-runtime.ts +0 -14
- package/src/_shims/index.d.ts +0 -81
- package/src/_shims/index.js +0 -13
- package/src/_shims/index.mjs +0 -7
- package/src/_shims/manual-types.d.ts +0 -12
- package/src/_shims/manual-types.js +0 -3
- package/src/_shims/manual-types.mjs +0 -3
- package/src/_shims/node-runtime.ts +0 -83
- package/src/_shims/node-types.d.ts +0 -42
- package/src/_shims/node-types.js +0 -3
- package/src/_shims/node-types.mjs +0 -3
- package/src/_shims/registry.ts +0 -63
- package/src/_shims/web-runtime.ts +0 -103
- package/src/_shims/web-types.d.ts +0 -83
- package/src/_shims/web-types.js +0 -3
- package/src/_shims/web-types.mjs +0 -3
- package/src/core.ts +0 -1145
- package/src/error.ts +0 -146
- package/src/lib/.keep +0 -4
- package/src/resource.ts +0 -11
- package/src/resources/index.ts +0 -20
- package/src/resources/links/bulk.ts +0 -337
- package/src/resources/links/index.ts +0 -15
- package/src/resources/links/info.ts +0 -230
- package/src/resources/links/links.ts +0 -1135
- package/src/resources/projects/index.ts +0 -4
- package/src/resources/projects/projects.ts +0 -253
- package/src/resources/projects/tags.ts +0 -5
- package/src/resources/qr.ts +0 -64
- package/src/shims/node.ts +0 -50
- package/src/shims/web.ts +0 -50
- package/src/tsconfig.json +0 -11
- package/src/uploads.ts +0 -245
- package/src/version.ts +0 -1
- package/uploads.d.ts +0 -75
- package/uploads.d.ts.map +0 -1
- package/uploads.js +0 -163
- package/uploads.js.map +0 -1
- package/uploads.mjs +0 -150
- package/uploads.mjs.map +0 -1
- package/version.d.ts +0 -2
- package/version.d.ts.map +0 -1
- package/version.js +0 -5
- package/version.js.map +0 -1
- package/version.mjs +0 -2
- package/version.mjs.map +0 -1
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# Workspaces
|
|
2
|
+
(*workspaces*)
|
|
3
|
+
|
|
4
|
+
### Available Operations
|
|
5
|
+
|
|
6
|
+
* [list](#list) - Retrieve a list of workspaces
|
|
7
|
+
* [create](#create) - Create a workspace
|
|
8
|
+
* [get](#get) - Retrieve a workspace
|
|
9
|
+
|
|
10
|
+
## list
|
|
11
|
+
|
|
12
|
+
Retrieve a list of workspaces for the authenticated user.
|
|
13
|
+
|
|
14
|
+
### Example Usage
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import { Dub } from "dub";
|
|
18
|
+
|
|
19
|
+
async function run() {
|
|
20
|
+
const sdk = new Dub({
|
|
21
|
+
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
22
|
+
workspaceId: "<value>",
|
|
23
|
+
projectSlug: "<value>",
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const result = await sdk.workspaces.list();
|
|
27
|
+
|
|
28
|
+
// Handle the result
|
|
29
|
+
console.log(result)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
run();
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Parameters
|
|
36
|
+
|
|
37
|
+
| Parameter | Type | Required | Description |
|
|
38
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
39
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
40
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### Response
|
|
44
|
+
|
|
45
|
+
**Promise<[components.WorkspaceSchema[]](../../models/.md)>**
|
|
46
|
+
### Errors
|
|
47
|
+
|
|
48
|
+
| Error Object | Status Code | Content Type |
|
|
49
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
50
|
+
| errors.BadRequest | 400 | application/json |
|
|
51
|
+
| errors.Unauthorized | 401 | application/json |
|
|
52
|
+
| errors.Forbidden | 403 | application/json |
|
|
53
|
+
| errors.NotFound | 404 | application/json |
|
|
54
|
+
| errors.Conflict | 409 | application/json |
|
|
55
|
+
| errors.InviteExpired | 410 | application/json |
|
|
56
|
+
| errors.UnprocessableEntity | 422 | application/json |
|
|
57
|
+
| errors.RateLimitExceeded | 429 | application/json |
|
|
58
|
+
| errors.InternalServerError | 500 | application/json |
|
|
59
|
+
| errors.SDKError | 4xx-5xx | */* |
|
|
60
|
+
|
|
61
|
+
## create
|
|
62
|
+
|
|
63
|
+
Create a new workspace for the authenticated user.
|
|
64
|
+
|
|
65
|
+
### Example Usage
|
|
66
|
+
|
|
67
|
+
```typescript
|
|
68
|
+
import { Dub } from "dub";
|
|
69
|
+
|
|
70
|
+
async function run() {
|
|
71
|
+
const sdk = new Dub({
|
|
72
|
+
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
73
|
+
workspaceId: "<value>",
|
|
74
|
+
projectSlug: "<value>",
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
const result = await sdk.workspaces.create({
|
|
78
|
+
name: "<value>",
|
|
79
|
+
slug: "<value>",
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
// Handle the result
|
|
83
|
+
console.log(result)
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
run();
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Parameters
|
|
90
|
+
|
|
91
|
+
| Parameter | Type | Required | Description |
|
|
92
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
93
|
+
| `request` | [operations.CreateWorkspaceRequestBody](../../models/operations/createworkspacerequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
94
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
95
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
### Response
|
|
99
|
+
|
|
100
|
+
**Promise<[components.WorkspaceSchema](../../models/components/workspaceschema.md)>**
|
|
101
|
+
### Errors
|
|
102
|
+
|
|
103
|
+
| Error Object | Status Code | Content Type |
|
|
104
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
105
|
+
| errors.BadRequest | 400 | application/json |
|
|
106
|
+
| errors.Unauthorized | 401 | application/json |
|
|
107
|
+
| errors.Forbidden | 403 | application/json |
|
|
108
|
+
| errors.NotFound | 404 | application/json |
|
|
109
|
+
| errors.Conflict | 409 | application/json |
|
|
110
|
+
| errors.InviteExpired | 410 | application/json |
|
|
111
|
+
| errors.UnprocessableEntity | 422 | application/json |
|
|
112
|
+
| errors.RateLimitExceeded | 429 | application/json |
|
|
113
|
+
| errors.InternalServerError | 500 | application/json |
|
|
114
|
+
| errors.SDKError | 4xx-5xx | */* |
|
|
115
|
+
|
|
116
|
+
## get
|
|
117
|
+
|
|
118
|
+
Retrieve a workspace for the authenticated user.
|
|
119
|
+
|
|
120
|
+
### Example Usage
|
|
121
|
+
|
|
122
|
+
```typescript
|
|
123
|
+
import { Dub } from "dub";
|
|
124
|
+
|
|
125
|
+
async function run() {
|
|
126
|
+
const sdk = new Dub({
|
|
127
|
+
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
128
|
+
workspaceId: "<value>",
|
|
129
|
+
projectSlug: "<value>",
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
const result = await sdk.workspaces.get({
|
|
133
|
+
idOrSlug: "<value>",
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
// Handle the result
|
|
137
|
+
console.log(result)
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
run();
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Parameters
|
|
144
|
+
|
|
145
|
+
| Parameter | Type | Required | Description |
|
|
146
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
147
|
+
| `request` | [operations.GetWorkspaceRequest](../../models/operations/getworkspacerequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
148
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
149
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
### Response
|
|
153
|
+
|
|
154
|
+
**Promise<[components.WorkspaceSchema](../../models/components/workspaceschema.md)>**
|
|
155
|
+
### Errors
|
|
156
|
+
|
|
157
|
+
| Error Object | Status Code | Content Type |
|
|
158
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
159
|
+
| errors.BadRequest | 400 | application/json |
|
|
160
|
+
| errors.Unauthorized | 401 | application/json |
|
|
161
|
+
| errors.Forbidden | 403 | application/json |
|
|
162
|
+
| errors.NotFound | 404 | application/json |
|
|
163
|
+
| errors.Conflict | 409 | application/json |
|
|
164
|
+
| errors.InviteExpired | 410 | application/json |
|
|
165
|
+
| errors.UnprocessableEntity | 422 | application/json |
|
|
166
|
+
| errors.RateLimitExceeded | 429 | application/json |
|
|
167
|
+
| errors.InternalServerError | 500 | application/json |
|
|
168
|
+
| errors.SDKError | 4xx-5xx | */* |
|
package/hooks/hooks.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AfterErrorContext, AfterErrorHook, AfterSuccessContext, AfterSuccessHook, BeforeRequestContext, BeforeRequestHook, Hooks, SDKInitHook, SDKInitOptions } from "./types";
|
|
2
|
+
export declare class SDKHooks implements Hooks {
|
|
3
|
+
sdkInitHooks: SDKInitHook[];
|
|
4
|
+
beforeRequestHooks: BeforeRequestHook[];
|
|
5
|
+
afterSuccessHooks: AfterSuccessHook[];
|
|
6
|
+
afterErrorHooks: AfterErrorHook[];
|
|
7
|
+
constructor();
|
|
8
|
+
registerSDKInitHook(hook: SDKInitHook): void;
|
|
9
|
+
registerBeforeRequestHook(hook: BeforeRequestHook): void;
|
|
10
|
+
registerAfterSuccessHook(hook: AfterSuccessHook): void;
|
|
11
|
+
registerAfterErrorHook(hook: AfterErrorHook): void;
|
|
12
|
+
sdkInit(opts: SDKInitOptions): SDKInitOptions;
|
|
13
|
+
beforeRequest(hookCtx: BeforeRequestContext, request: Request): Promise<Request>;
|
|
14
|
+
afterSuccess(hookCtx: AfterSuccessContext, response: Response): Promise<Response>;
|
|
15
|
+
afterError(hookCtx: AfterErrorContext, response: Response | null, error: unknown): Promise<{
|
|
16
|
+
response: Response | null;
|
|
17
|
+
error: unknown;
|
|
18
|
+
}>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../src/hooks/hooks.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,KAAK,EACL,WAAW,EACX,cAAc,EACjB,MAAM,SAAS,CAAC;AAEjB,qBAAa,QAAS,YAAW,KAAK;IAClC,YAAY,EAAE,WAAW,EAAE,CAAM;IACjC,kBAAkB,EAAE,iBAAiB,EAAE,CAAM;IAC7C,iBAAiB,EAAE,gBAAgB,EAAE,CAAM;IAC3C,eAAe,EAAE,cAAc,EAAE,CAAM;;IAIvC,mBAAmB,CAAC,IAAI,EAAE,WAAW;IAIrC,yBAAyB,CAAC,IAAI,EAAE,iBAAiB;IAIjD,wBAAwB,CAAC,IAAI,EAAE,gBAAgB;IAI/C,sBAAsB,CAAC,IAAI,EAAE,cAAc;IAI3C,OAAO,CAAC,IAAI,EAAE,cAAc,GAAG,cAAc;IAIvC,aAAa,CAAC,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAUhF,YAAY,CAAC,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;IAUjF,UAAU,CACZ,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,QAAQ,GAAG,IAAI,EACzB,KAAK,EAAE,OAAO,GACf,OAAO,CAAC;QAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC;CAY5D"}
|
package/hooks/hooks.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.SDKHooks = void 0;
|
|
7
|
+
class SDKHooks {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.sdkInitHooks = [];
|
|
10
|
+
this.beforeRequestHooks = [];
|
|
11
|
+
this.afterSuccessHooks = [];
|
|
12
|
+
this.afterErrorHooks = [];
|
|
13
|
+
}
|
|
14
|
+
registerSDKInitHook(hook) {
|
|
15
|
+
this.sdkInitHooks.push(hook);
|
|
16
|
+
}
|
|
17
|
+
registerBeforeRequestHook(hook) {
|
|
18
|
+
this.beforeRequestHooks.push(hook);
|
|
19
|
+
}
|
|
20
|
+
registerAfterSuccessHook(hook) {
|
|
21
|
+
this.afterSuccessHooks.push(hook);
|
|
22
|
+
}
|
|
23
|
+
registerAfterErrorHook(hook) {
|
|
24
|
+
this.afterErrorHooks.push(hook);
|
|
25
|
+
}
|
|
26
|
+
sdkInit(opts) {
|
|
27
|
+
return this.sdkInitHooks.reduce((opts, hook) => hook.sdkInit(opts), opts);
|
|
28
|
+
}
|
|
29
|
+
async beforeRequest(hookCtx, request) {
|
|
30
|
+
let req = request;
|
|
31
|
+
for (const hook of this.beforeRequestHooks) {
|
|
32
|
+
req = await hook.beforeRequest(hookCtx, req);
|
|
33
|
+
}
|
|
34
|
+
return req;
|
|
35
|
+
}
|
|
36
|
+
async afterSuccess(hookCtx, response) {
|
|
37
|
+
let res = response;
|
|
38
|
+
for (const hook of this.afterSuccessHooks) {
|
|
39
|
+
res = await hook.afterSuccess(hookCtx, res);
|
|
40
|
+
}
|
|
41
|
+
return res;
|
|
42
|
+
}
|
|
43
|
+
async afterError(hookCtx, response, error) {
|
|
44
|
+
let res = response;
|
|
45
|
+
let err = error;
|
|
46
|
+
for (const hook of this.afterErrorHooks) {
|
|
47
|
+
const result = await hook.afterError(hookCtx, res, err);
|
|
48
|
+
res = result.response;
|
|
49
|
+
err = result.error;
|
|
50
|
+
}
|
|
51
|
+
return { response: res, error: err };
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.SDKHooks = SDKHooks;
|
|
55
|
+
//# sourceMappingURL=hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../src/hooks/hooks.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAcH,MAAa,QAAQ;IAMjB;QALA,iBAAY,GAAkB,EAAE,CAAC;QACjC,uBAAkB,GAAwB,EAAE,CAAC;QAC7C,sBAAiB,GAAuB,EAAE,CAAC;QAC3C,oBAAe,GAAqB,EAAE,CAAC;IAExB,CAAC;IAEhB,mBAAmB,CAAC,IAAiB;QACjC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IAED,yBAAyB,CAAC,IAAuB;QAC7C,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;IAED,wBAAwB,CAAC,IAAsB;QAC3C,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IAED,sBAAsB,CAAC,IAAoB;QACvC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;IAED,OAAO,CAAC,IAAoB;QACxB,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC;IAC9E,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,OAA6B,EAAE,OAAgB;QAC/D,IAAI,GAAG,GAAG,OAAO,CAAC;QAElB,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,kBAAkB,EAAE,CAAC;YACzC,GAAG,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QACjD,CAAC;QAED,OAAO,GAAG,CAAC;IACf,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,OAA4B,EAAE,QAAkB;QAC/D,IAAI,GAAG,GAAG,QAAQ,CAAC;QAEnB,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACxC,GAAG,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QAChD,CAAC;QAED,OAAO,GAAG,CAAC;IACf,CAAC;IAED,KAAK,CAAC,UAAU,CACZ,OAA0B,EAC1B,QAAyB,EACzB,KAAc;QAEd,IAAI,GAAG,GAAG,QAAQ,CAAC;QACnB,IAAI,GAAG,GAAG,KAAK,CAAC;QAEhB,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,eAAe,EAAE,CAAC;YACtC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;YACxD,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;YACtB,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC;QACvB,CAAC;QAED,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;IACzC,CAAC;CACJ;AAhED,4BAgEC"}
|
package/hooks/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/hooks/index.ts"],"names":[],"mappings":"AAIA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
4
|
+
*/
|
|
2
5
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
6
|
if (k2 === undefined) k2 = k;
|
|
4
7
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -14,8 +17,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
17
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
18
|
};
|
|
16
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
__exportStar(require("../bun-runtime.js"), exports);
|
|
21
|
-
//# sourceMappingURL=runtime-bun.js.map
|
|
20
|
+
__exportStar(require("./types"), exports);
|
|
21
|
+
__exportStar(require("./hooks"), exports);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/hooks/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,0CAAwB;AACxB,0CAAwB"}
|
package/hooks/types.d.ts
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { HTTPClient } from "../lib/http";
|
|
2
|
+
export type HookContext = {
|
|
3
|
+
operationID: string;
|
|
4
|
+
oAuth2Scopes?: string[];
|
|
5
|
+
securitySource?: any | (() => Promise<any>);
|
|
6
|
+
};
|
|
7
|
+
export type Awaitable<T> = T | Promise<T>;
|
|
8
|
+
export type SDKInitOptions = {
|
|
9
|
+
baseURL: URL | null;
|
|
10
|
+
client: HTTPClient;
|
|
11
|
+
};
|
|
12
|
+
export type BeforeRequestContext = HookContext & {};
|
|
13
|
+
export type AfterSuccessContext = HookContext & {};
|
|
14
|
+
export type AfterErrorContext = HookContext & {};
|
|
15
|
+
/**
|
|
16
|
+
* SDKInitHook is called when the SDK is initializing. The
|
|
17
|
+
* hook can return a new baseURL and HTTP client to be used by the SDK.
|
|
18
|
+
*/
|
|
19
|
+
export interface SDKInitHook {
|
|
20
|
+
sdkInit: (opts: SDKInitOptions) => SDKInitOptions;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* BeforeRequestHook is called before the SDK sends a request. The hook can
|
|
24
|
+
* modify the request before it is sent or throw an error to stop the request
|
|
25
|
+
* from being sent.
|
|
26
|
+
*/
|
|
27
|
+
export interface BeforeRequestHook {
|
|
28
|
+
beforeRequest: (hookCtx: BeforeRequestContext, request: Request) => Awaitable<Request>;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* AfterSuccessHook is called after the SDK receives a response. The hook can
|
|
32
|
+
* modify the response before it is handled or throw an error to stop the
|
|
33
|
+
* response from being handled.
|
|
34
|
+
*/
|
|
35
|
+
export interface AfterSuccessHook {
|
|
36
|
+
afterSuccess: (hookCtx: AfterSuccessContext, response: Response) => Awaitable<Response>;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* AfterErrorHook is called after the SDK encounters an error, or a
|
|
40
|
+
* non-successful response. The hook can modify the response if available
|
|
41
|
+
* otherwise modify the error.
|
|
42
|
+
*/
|
|
43
|
+
export interface AfterErrorHook {
|
|
44
|
+
afterError: (hookCtx: AfterErrorContext, response: Response | null, error: unknown) => Awaitable<{
|
|
45
|
+
response: Response | null;
|
|
46
|
+
error: unknown;
|
|
47
|
+
}>;
|
|
48
|
+
}
|
|
49
|
+
export interface Hooks {
|
|
50
|
+
/** Registers a hook to be used by the SDK for initialization event. */
|
|
51
|
+
registerSDKInitHook(hook: SDKInitHook): void;
|
|
52
|
+
/** Registers a hook to be used by the SDK for the before request event. */
|
|
53
|
+
registerBeforeRequestHook(hook: BeforeRequestHook): void;
|
|
54
|
+
/** Registers a hook to be used by the SDK for the after success event. */
|
|
55
|
+
registerAfterSuccessHook(hook: AfterSuccessHook): void;
|
|
56
|
+
/** Registers a hook to be used by the SDK for the after error event. */
|
|
57
|
+
registerAfterErrorHook(hook: AfterErrorHook): void;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/hooks/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,MAAM,WAAW,GAAG;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,cAAc,CAAC,EAAE,GAAG,GAAG,CAAC,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;CAC/C,CAAC;AAEF,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAE1C,MAAM,MAAM,cAAc,GAAG;IACzB,OAAO,EAAE,GAAG,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,UAAU,CAAC;CACtB,CAAC;AACF,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAAG,EAAE,CAAC;AACpD,MAAM,MAAM,mBAAmB,GAAG,WAAW,GAAG,EAAE,CAAC;AACnD,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG,EAAE,CAAC;AAEjD;;;GAGG;AACH,MAAM,WAAW,WAAW;IACxB,OAAO,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,cAAc,CAAC;CACrD;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAC9B,aAAa,EAAE,CAAC,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,OAAO,KAAK,SAAS,CAAC,OAAO,CAAC,CAAC;CAC1F;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC7B,YAAY,EAAE,CAAC,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,QAAQ,KAAK,SAAS,CAAC,QAAQ,CAAC,CAAC;CAC3F;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC3B,UAAU,EAAE,CACR,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,QAAQ,GAAG,IAAI,EACzB,KAAK,EAAE,OAAO,KACb,SAAS,CAAC;QACX,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;QAC1B,KAAK,EAAE,OAAO,CAAC;KAClB,CAAC,CAAC;CACN;AAED,MAAM,WAAW,KAAK;IAClB,uEAAuE;IACvE,mBAAmB,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,CAAC;IAC7C,2EAA2E;IAC3E,yBAAyB,CAAC,IAAI,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACzD,0EAA0E;IAC1E,wBAAwB,CAAC,IAAI,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACvD,wEAAwE;IACxE,sBAAsB,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAAC;CACtD"}
|
package/hooks/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/hooks/types.ts"],"names":[],"mappings":";AAAA;;GAEG"}
|
package/index.d.ts
CHANGED
|
@@ -1,127 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import * as API from 'dub/resources/index';
|
|
6
|
-
export interface ClientOptions {
|
|
7
|
-
/**
|
|
8
|
-
* Defaults to process.env['DUB_API_KEY'].
|
|
9
|
-
*/
|
|
10
|
-
token?: string | undefined;
|
|
11
|
-
projectSlug?: string | null | undefined;
|
|
12
|
-
/**
|
|
13
|
-
* Override the default base URL for the API, e.g., "https://api.example.com/v2/"
|
|
14
|
-
*
|
|
15
|
-
* Defaults to process.env['DUB_BASE_URL'].
|
|
16
|
-
*/
|
|
17
|
-
baseURL?: string | null | undefined;
|
|
18
|
-
/**
|
|
19
|
-
* The maximum amount of time (in milliseconds) that the client should wait for a response
|
|
20
|
-
* from the server before timing out a single request.
|
|
21
|
-
*
|
|
22
|
-
* Note that request timeouts are retried by default, so in a worst-case scenario you may wait
|
|
23
|
-
* much longer than this timeout before the promise succeeds or fails.
|
|
24
|
-
*/
|
|
25
|
-
timeout?: number;
|
|
26
|
-
/**
|
|
27
|
-
* An HTTP agent used to manage HTTP(S) connections.
|
|
28
|
-
*
|
|
29
|
-
* If not provided, an agent will be constructed by default in the Node.js environment,
|
|
30
|
-
* otherwise no agent is used.
|
|
31
|
-
*/
|
|
32
|
-
httpAgent?: Agent;
|
|
33
|
-
/**
|
|
34
|
-
* Specify a custom `fetch` function implementation.
|
|
35
|
-
*
|
|
36
|
-
* If not provided, we use `node-fetch` on Node.js and otherwise expect that `fetch` is
|
|
37
|
-
* defined globally.
|
|
38
|
-
*/
|
|
39
|
-
fetch?: Core.Fetch | undefined;
|
|
40
|
-
/**
|
|
41
|
-
* The maximum number of times that the client will retry a request in case of a
|
|
42
|
-
* temporary failure, like a network error or a 5XX error from the server.
|
|
43
|
-
*
|
|
44
|
-
* @default 2
|
|
45
|
-
*/
|
|
46
|
-
maxRetries?: number;
|
|
47
|
-
/**
|
|
48
|
-
* Default headers to include with every request to the API.
|
|
49
|
-
*
|
|
50
|
-
* These can be removed in individual requests by explicitly setting the
|
|
51
|
-
* header to `undefined` or `null` in request options.
|
|
52
|
-
*/
|
|
53
|
-
defaultHeaders?: Core.Headers;
|
|
54
|
-
/**
|
|
55
|
-
* Default query parameters to include with every request to the API.
|
|
56
|
-
*
|
|
57
|
-
* These can be removed in individual requests by explicitly setting the
|
|
58
|
-
* param to `undefined` in request options.
|
|
59
|
-
*/
|
|
60
|
-
defaultQuery?: Core.DefaultQuery;
|
|
61
|
-
}
|
|
62
|
-
/** API Client for interfacing with the Dub API. */
|
|
63
|
-
export declare class Dub extends Core.APIClient {
|
|
64
|
-
token: string;
|
|
65
|
-
projectSlug: string | null;
|
|
66
|
-
private _options;
|
|
67
|
-
/**
|
|
68
|
-
* API Client for interfacing with the Dub API.
|
|
69
|
-
*
|
|
70
|
-
* @param {string | undefined} [opts.token=process.env['DUB_API_KEY'] ?? undefined]
|
|
71
|
-
* @param {string | null | undefined} [opts.projectSlug]
|
|
72
|
-
* @param {string} [opts.baseURL=process.env['DUB_BASE_URL'] ?? https://api.dub.co] - Override the default base URL for the API.
|
|
73
|
-
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
74
|
-
* @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
|
|
75
|
-
* @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
76
|
-
* @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.
|
|
77
|
-
* @param {Core.Headers} opts.defaultHeaders - Default headers to include with every request to the API.
|
|
78
|
-
* @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
|
|
79
|
-
*/
|
|
80
|
-
constructor({ baseURL, token, projectSlug, ...opts }?: ClientOptions);
|
|
81
|
-
links: API.Links;
|
|
82
|
-
qr: API.Qr;
|
|
83
|
-
projects: API.Projects;
|
|
84
|
-
protected defaultQuery(): Core.DefaultQuery | undefined;
|
|
85
|
-
protected defaultHeaders(opts: Core.FinalRequestOptions): Core.Headers;
|
|
86
|
-
protected authHeaders(opts: Core.FinalRequestOptions): Core.Headers;
|
|
87
|
-
protected stringifyQuery(query: Record<string, unknown>): string;
|
|
88
|
-
static Dub: typeof Dub;
|
|
89
|
-
static DubError: typeof Errors.DubError;
|
|
90
|
-
static APIError: typeof Errors.APIError;
|
|
91
|
-
static APIConnectionError: typeof Errors.APIConnectionError;
|
|
92
|
-
static APIConnectionTimeoutError: typeof Errors.APIConnectionTimeoutError;
|
|
93
|
-
static APIUserAbortError: typeof Errors.APIUserAbortError;
|
|
94
|
-
static NotFoundError: typeof Errors.NotFoundError;
|
|
95
|
-
static ConflictError: typeof Errors.ConflictError;
|
|
96
|
-
static RateLimitError: typeof Errors.RateLimitError;
|
|
97
|
-
static BadRequestError: typeof Errors.BadRequestError;
|
|
98
|
-
static AuthenticationError: typeof Errors.AuthenticationError;
|
|
99
|
-
static InternalServerError: typeof Errors.InternalServerError;
|
|
100
|
-
static PermissionDeniedError: typeof Errors.PermissionDeniedError;
|
|
101
|
-
static UnprocessableEntityError: typeof Errors.UnprocessableEntityError;
|
|
102
|
-
}
|
|
103
|
-
export declare const DubError: typeof Errors.DubError, APIError: typeof Errors.APIError, APIConnectionError: typeof Errors.APIConnectionError, APIConnectionTimeoutError: typeof Errors.APIConnectionTimeoutError, APIUserAbortError: typeof Errors.APIUserAbortError, NotFoundError: typeof Errors.NotFoundError, ConflictError: typeof Errors.ConflictError, RateLimitError: typeof Errors.RateLimitError, BadRequestError: typeof Errors.BadRequestError, AuthenticationError: typeof Errors.AuthenticationError, InternalServerError: typeof Errors.InternalServerError, PermissionDeniedError: typeof Errors.PermissionDeniedError, UnprocessableEntityError: typeof Errors.UnprocessableEntityError;
|
|
104
|
-
export import toFile = Uploads.toFile;
|
|
105
|
-
export import fileFromPath = Uploads.fileFromPath;
|
|
106
|
-
export declare namespace Dub {
|
|
107
|
-
export import toFile = Uploads.toFile;
|
|
108
|
-
export import fileFromPath = Uploads.fileFromPath;
|
|
109
|
-
export import RequestOptions = Core.RequestOptions;
|
|
110
|
-
export import Links = API.Links;
|
|
111
|
-
export import LinkCreateResponse = API.LinkCreateResponse;
|
|
112
|
-
export import LinkUpdateResponse = API.LinkUpdateResponse;
|
|
113
|
-
export import LinkListResponse = API.LinkListResponse;
|
|
114
|
-
export import LinkDeleteLinkResponse = API.LinkDeleteLinkResponse;
|
|
115
|
-
export import LinkCreateParams = API.LinkCreateParams;
|
|
116
|
-
export import LinkUpdateParams = API.LinkUpdateParams;
|
|
117
|
-
export import LinkListParams = API.LinkListParams;
|
|
118
|
-
export import LinkDeleteLinkParams = API.LinkDeleteLinkParams;
|
|
119
|
-
export import Qr = API.Qr;
|
|
120
|
-
export import QrRetrieveParams = API.QrRetrieveParams;
|
|
121
|
-
export import Projects = API.Projects;
|
|
122
|
-
export import ProjectRetrieveResponse = API.ProjectRetrieveResponse;
|
|
123
|
-
export import ProjectListResponse = API.ProjectListResponse;
|
|
124
|
-
export import ProjectRetrieveParams = API.ProjectRetrieveParams;
|
|
125
|
-
}
|
|
1
|
+
export * from "./sdk";
|
|
2
|
+
export * from "./lib/config";
|
|
3
|
+
import { Dub } from './sdk';
|
|
4
|
+
/** @deprecated Use named export instead: `import { Dub } from "dub";` */
|
|
126
5
|
export default Dub;
|
|
127
6
|
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAIA,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAE7B,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAE3B,yEAAyE;AACzE,eAAe,GAAG,CAAC"}
|
package/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
4
|
+
*/
|
|
3
5
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
6
|
if (k2 === undefined) k2 = k;
|
|
5
7
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -11,108 +13,13 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
11
13
|
if (k2 === undefined) k2 = k;
|
|
12
14
|
o[k2] = m[k];
|
|
13
15
|
}));
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
}) : function(o, v) {
|
|
17
|
-
o["default"] = v;
|
|
18
|
-
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
20
|
-
if (mod && mod.__esModule) return mod;
|
|
21
|
-
var result = {};
|
|
22
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
23
|
-
__setModuleDefault(result, mod);
|
|
24
|
-
return result;
|
|
16
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
17
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
25
18
|
};
|
|
26
|
-
var _a;
|
|
27
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
const API = __importStar(require("dub/resources/index"));
|
|
34
|
-
/** API Client for interfacing with the Dub API. */
|
|
35
|
-
class Dub extends Core.APIClient {
|
|
36
|
-
/**
|
|
37
|
-
* API Client for interfacing with the Dub API.
|
|
38
|
-
*
|
|
39
|
-
* @param {string | undefined} [opts.token=process.env['DUB_API_KEY'] ?? undefined]
|
|
40
|
-
* @param {string | null | undefined} [opts.projectSlug]
|
|
41
|
-
* @param {string} [opts.baseURL=process.env['DUB_BASE_URL'] ?? https://api.dub.co] - Override the default base URL for the API.
|
|
42
|
-
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
43
|
-
* @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
|
|
44
|
-
* @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
45
|
-
* @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.
|
|
46
|
-
* @param {Core.Headers} opts.defaultHeaders - Default headers to include with every request to the API.
|
|
47
|
-
* @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
|
|
48
|
-
*/
|
|
49
|
-
constructor({ baseURL = Core.readEnv('DUB_BASE_URL'), token = Core.readEnv('DUB_API_KEY'), projectSlug = null, ...opts } = {}) {
|
|
50
|
-
if (token === undefined) {
|
|
51
|
-
throw new Errors.DubError("The DUB_API_KEY environment variable is missing or empty; either provide it, or instantiate the Dub client with an token option, like new Dub({ token: 'My Token' }).");
|
|
52
|
-
}
|
|
53
|
-
const options = {
|
|
54
|
-
token,
|
|
55
|
-
projectSlug,
|
|
56
|
-
...opts,
|
|
57
|
-
baseURL: baseURL || `https://api.dub.co`,
|
|
58
|
-
};
|
|
59
|
-
super({
|
|
60
|
-
baseURL: options.baseURL,
|
|
61
|
-
timeout: options.timeout ?? 60000 /* 1 minute */,
|
|
62
|
-
httpAgent: options.httpAgent,
|
|
63
|
-
maxRetries: options.maxRetries,
|
|
64
|
-
fetch: options.fetch,
|
|
65
|
-
});
|
|
66
|
-
this.links = new API.Links(this);
|
|
67
|
-
this.qr = new API.Qr(this);
|
|
68
|
-
this.projects = new API.Projects(this);
|
|
69
|
-
this._options = options;
|
|
70
|
-
this.token = token;
|
|
71
|
-
this.projectSlug = projectSlug;
|
|
72
|
-
}
|
|
73
|
-
defaultQuery() {
|
|
74
|
-
return this._options.defaultQuery;
|
|
75
|
-
}
|
|
76
|
-
defaultHeaders(opts) {
|
|
77
|
-
return {
|
|
78
|
-
...super.defaultHeaders(opts),
|
|
79
|
-
...this._options.defaultHeaders,
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
authHeaders(opts) {
|
|
83
|
-
return { Authorization: `Bearer ${this.token}` };
|
|
84
|
-
}
|
|
85
|
-
stringifyQuery(query) {
|
|
86
|
-
return qs.stringify(query, { arrayFormat: 'comma' });
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
exports.Dub = Dub;
|
|
90
|
-
_a = Dub;
|
|
91
|
-
Dub.Dub = _a;
|
|
92
|
-
Dub.DubError = Errors.DubError;
|
|
93
|
-
Dub.APIError = Errors.APIError;
|
|
94
|
-
Dub.APIConnectionError = Errors.APIConnectionError;
|
|
95
|
-
Dub.APIConnectionTimeoutError = Errors.APIConnectionTimeoutError;
|
|
96
|
-
Dub.APIUserAbortError = Errors.APIUserAbortError;
|
|
97
|
-
Dub.NotFoundError = Errors.NotFoundError;
|
|
98
|
-
Dub.ConflictError = Errors.ConflictError;
|
|
99
|
-
Dub.RateLimitError = Errors.RateLimitError;
|
|
100
|
-
Dub.BadRequestError = Errors.BadRequestError;
|
|
101
|
-
Dub.AuthenticationError = Errors.AuthenticationError;
|
|
102
|
-
Dub.InternalServerError = Errors.InternalServerError;
|
|
103
|
-
Dub.PermissionDeniedError = Errors.PermissionDeniedError;
|
|
104
|
-
Dub.UnprocessableEntityError = Errors.UnprocessableEntityError;
|
|
105
|
-
exports.DubError = Errors.DubError, exports.APIError = Errors.APIError, exports.APIConnectionError = Errors.APIConnectionError, exports.APIConnectionTimeoutError = Errors.APIConnectionTimeoutError, exports.APIUserAbortError = Errors.APIUserAbortError, exports.NotFoundError = Errors.NotFoundError, exports.ConflictError = Errors.ConflictError, exports.RateLimitError = Errors.RateLimitError, exports.BadRequestError = Errors.BadRequestError, exports.AuthenticationError = Errors.AuthenticationError, exports.InternalServerError = Errors.InternalServerError, exports.PermissionDeniedError = Errors.PermissionDeniedError, exports.UnprocessableEntityError = Errors.UnprocessableEntityError;
|
|
106
|
-
exports.toFile = Uploads.toFile;
|
|
107
|
-
exports.fileFromPath = Uploads.fileFromPath;
|
|
108
|
-
(function (Dub) {
|
|
109
|
-
// Helper functions
|
|
110
|
-
Dub.toFile = Uploads.toFile;
|
|
111
|
-
Dub.fileFromPath = Uploads.fileFromPath;
|
|
112
|
-
Dub.Links = API.Links;
|
|
113
|
-
Dub.Qr = API.Qr;
|
|
114
|
-
Dub.Projects = API.Projects;
|
|
115
|
-
})(Dub = exports.Dub || (exports.Dub = {}));
|
|
116
|
-
exports = module.exports = Dub;
|
|
117
|
-
exports.default = Dub;
|
|
20
|
+
__exportStar(require("./sdk"), exports);
|
|
21
|
+
__exportStar(require("./lib/config"), exports);
|
|
22
|
+
const sdk_1 = require("./sdk");
|
|
23
|
+
/** @deprecated Use named export instead: `import { Dub } from "dub";` */
|
|
24
|
+
exports.default = sdk_1.Dub; // eslint-disable-line import/no-default-export
|
|
118
25
|
//# sourceMappingURL=index.js.map
|