needle-cloud 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,6 @@
1
+ export namespace AuthScopes {
2
+ const Basic: UserScope[];
3
+ const Payment: string[];
4
+ const All: string[];
5
+ }
6
+ import { UserScope } from "@logto/browser";
@@ -1,5 +1,6 @@
1
1
  export namespace Auth {
2
- const debug: boolean;
2
+ /** @param {boolean} _debug */
3
+ function setDebug(_debug: boolean): void;
3
4
  const baseUrl: string;
4
5
  const redirectUri: string;
5
6
  const postSignOutRedirectUri: string;
@@ -69,11 +70,10 @@ export namespace Auth {
69
70
  export type UserInfoResponse = import("@logto/browser").UserInfoResponse;
70
71
  export type ResourceUrl = "https://cloud.needle.tools/api" | ({} & string);
71
72
  export type AuthInitOpts = {
72
- api_endpoint?: string;
73
73
  appId?: string;
74
+ /**
75
+ * User scopes. If an empty array is passed
76
+ */
77
+ scopes?: string[] | "payment" | "all";
74
78
  debug?: boolean;
75
79
  };
76
- import { api_endpoint } from "../constants.js";
77
- /** @type {string | undefined} */
78
- declare let appId: string | undefined;
79
- export {};
@@ -1,3 +1,4 @@
1
1
  export * from "./auth.js";
2
2
  export * from "./web-components/index.js";
3
3
  export * from "./functions/index.js";
4
+ export { AuthScopes } from "./auth.config.js";
@@ -0,0 +1,6 @@
1
+ export namespace AuthScopes {
2
+ const Basic: UserScope[];
3
+ const Payment: string[];
4
+ const All: string[];
5
+ }
6
+ import { UserScope } from "@logto/browser";
@@ -1,5 +1,6 @@
1
1
  export namespace Auth {
2
- const debug: boolean;
2
+ /** @param {boolean} _debug */
3
+ function setDebug(_debug: boolean): void;
3
4
  const baseUrl: string;
4
5
  const redirectUri: string;
5
6
  const postSignOutRedirectUri: string;
@@ -69,11 +70,10 @@ export namespace Auth {
69
70
  export type UserInfoResponse = import("@logto/browser").UserInfoResponse;
70
71
  export type ResourceUrl = "https://cloud.needle.tools/api" | ({} & string);
71
72
  export type AuthInitOpts = {
72
- api_endpoint?: string;
73
73
  appId?: string;
74
+ /**
75
+ * User scopes. If an empty array is passed
76
+ */
77
+ scopes?: string[] | "payment" | "all";
74
78
  debug?: boolean;
75
79
  };
76
- import { api_endpoint } from "../constants.js";
77
- /** @type {string | undefined} */
78
- declare let appId: string | undefined;
79
- export {};
@@ -1,3 +1,4 @@
1
1
  export * from "./auth.js";
2
2
  export * from "./web-components/index.js";
3
3
  export * from "./functions/index.js";
4
+ export { AuthScopes } from "./auth.config.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "needle-cloud",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "needle-cloud": "./bin/cli.js"