needle-cloud 1.2.0 → 1.2.1-experimental.66024ab
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/dist/cli.esm.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/needle-share-cli/src/web/auth.d.ts +14 -6
- package/dist/needle-share-cli/src/web/functions/checkout.d.ts +10 -0
- package/dist/needle-share-cli/src/web/functions/get.d.ts +8 -0
- package/dist/needle-share-cli/src/web/functions/index.d.ts +1 -0
- package/dist/needle-share-cli/src/web/index.d.ts +1 -0
- package/dist/needle-share-cli/src/web/web-components/LoginButton.d.ts +9 -0
- package/dist/needle-share-cli/src/web/web-components/index.d.ts +1 -0
- package/dist/web/auth.d.ts +14 -6
- package/dist/web/functions/checkout.d.ts +10 -0
- package/dist/web/functions/get.d.ts +8 -0
- package/dist/web/functions/index.d.ts +1 -0
- package/dist/web/index.d.ts +1 -0
- package/dist/web/web-components/LoginButton.d.ts +9 -0
- package/dist/web/web-components/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -3,6 +3,12 @@ export namespace Auth {
|
|
|
3
3
|
const baseUrl: string;
|
|
4
4
|
const redirectUri: string;
|
|
5
5
|
const postSignOutRedirectUri: string;
|
|
6
|
+
/**
|
|
7
|
+
* Register a callback to be called when the authentication state changes
|
|
8
|
+
* @param {Function} callback - The callback to register
|
|
9
|
+
* @returns {Function} - A function to unregister the callback
|
|
10
|
+
*/
|
|
11
|
+
function onChanged(callback: Function): Function;
|
|
6
12
|
/**
|
|
7
13
|
* Returns a promise that resolves when Auth is initialized
|
|
8
14
|
* @returns {Promise<boolean>}
|
|
@@ -11,10 +17,10 @@ export namespace Auth {
|
|
|
11
17
|
/**
|
|
12
18
|
* Initialize the Auth system
|
|
13
19
|
* @internal
|
|
14
|
-
* @param {
|
|
20
|
+
* @param {AuthInitOpts} [opts] - Initialization options
|
|
15
21
|
* @returns {Promise<boolean>}
|
|
16
22
|
*/
|
|
17
|
-
function init(opts?:
|
|
23
|
+
function init(opts?: AuthInitOpts): Promise<boolean>;
|
|
18
24
|
/**
|
|
19
25
|
* Check if the user is currently authenticated
|
|
20
26
|
* @returns {boolean}
|
|
@@ -61,11 +67,13 @@ export namespace Auth {
|
|
|
61
67
|
function signOut(): Promise<void>;
|
|
62
68
|
}
|
|
63
69
|
export type UserInfoResponse = import("@logto/browser").UserInfoResponse;
|
|
64
|
-
export type ResourceUrl = "https://cloud.needle.tools/api";
|
|
65
|
-
export type
|
|
66
|
-
|
|
70
|
+
export type ResourceUrl = "https://cloud.needle.tools/api" | ({} & string);
|
|
71
|
+
export type AuthInitOpts = {
|
|
72
|
+
api_endpoint?: string;
|
|
67
73
|
appId?: string;
|
|
68
74
|
debug?: boolean;
|
|
69
75
|
};
|
|
70
|
-
declare let
|
|
76
|
+
declare let api_endpoint: string;
|
|
77
|
+
/** @type {string | undefined} */
|
|
78
|
+
declare let appId: string | undefined;
|
|
71
79
|
export {};
|
|
@@ -27,6 +27,14 @@ export function getDeployments(opts: {
|
|
|
27
27
|
offset?: number;
|
|
28
28
|
limit?: number;
|
|
29
29
|
}): Promise<Array<Deployment>>;
|
|
30
|
+
/**
|
|
31
|
+
* Get licenses for a specific user. A product type is required
|
|
32
|
+
* @param {{product:string | string[]}} opts
|
|
33
|
+
* @returns {Promise<null | import("../../../../needle-share/types/stripe.js").License[]>}
|
|
34
|
+
*/
|
|
35
|
+
export function getUserLicenses(opts: {
|
|
36
|
+
product: string | string[];
|
|
37
|
+
}): Promise<null | import("../../../../needle-share/types/stripe.js").License[]>;
|
|
30
38
|
/**
|
|
31
39
|
* Unfortunately this doesnt get properly bundles in the final output so we have to write the types below directly
|
|
32
40
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NeedleLoginButton } from "./LoginButton.js";
|
package/dist/web/auth.d.ts
CHANGED
|
@@ -3,6 +3,12 @@ export namespace Auth {
|
|
|
3
3
|
const baseUrl: string;
|
|
4
4
|
const redirectUri: string;
|
|
5
5
|
const postSignOutRedirectUri: string;
|
|
6
|
+
/**
|
|
7
|
+
* Register a callback to be called when the authentication state changes
|
|
8
|
+
* @param {Function} callback - The callback to register
|
|
9
|
+
* @returns {Function} - A function to unregister the callback
|
|
10
|
+
*/
|
|
11
|
+
function onChanged(callback: Function): Function;
|
|
6
12
|
/**
|
|
7
13
|
* Returns a promise that resolves when Auth is initialized
|
|
8
14
|
* @returns {Promise<boolean>}
|
|
@@ -11,10 +17,10 @@ export namespace Auth {
|
|
|
11
17
|
/**
|
|
12
18
|
* Initialize the Auth system
|
|
13
19
|
* @internal
|
|
14
|
-
* @param {
|
|
20
|
+
* @param {AuthInitOpts} [opts] - Initialization options
|
|
15
21
|
* @returns {Promise<boolean>}
|
|
16
22
|
*/
|
|
17
|
-
function init(opts?:
|
|
23
|
+
function init(opts?: AuthInitOpts): Promise<boolean>;
|
|
18
24
|
/**
|
|
19
25
|
* Check if the user is currently authenticated
|
|
20
26
|
* @returns {boolean}
|
|
@@ -61,11 +67,13 @@ export namespace Auth {
|
|
|
61
67
|
function signOut(): Promise<void>;
|
|
62
68
|
}
|
|
63
69
|
export type UserInfoResponse = import("@logto/browser").UserInfoResponse;
|
|
64
|
-
export type ResourceUrl = "https://cloud.needle.tools/api";
|
|
65
|
-
export type
|
|
66
|
-
|
|
70
|
+
export type ResourceUrl = "https://cloud.needle.tools/api" | ({} & string);
|
|
71
|
+
export type AuthInitOpts = {
|
|
72
|
+
api_endpoint?: string;
|
|
67
73
|
appId?: string;
|
|
68
74
|
debug?: boolean;
|
|
69
75
|
};
|
|
70
|
-
declare let
|
|
76
|
+
declare let api_endpoint: string;
|
|
77
|
+
/** @type {string | undefined} */
|
|
78
|
+
declare let appId: string | undefined;
|
|
71
79
|
export {};
|
|
@@ -27,6 +27,14 @@ export function getDeployments(opts: {
|
|
|
27
27
|
offset?: number;
|
|
28
28
|
limit?: number;
|
|
29
29
|
}): Promise<Array<Deployment>>;
|
|
30
|
+
/**
|
|
31
|
+
* Get licenses for a specific user. A product type is required
|
|
32
|
+
* @param {{product:string | string[]}} opts
|
|
33
|
+
* @returns {Promise<null | import("../../../../needle-share/types/stripe.js").License[]>}
|
|
34
|
+
*/
|
|
35
|
+
export function getUserLicenses(opts: {
|
|
36
|
+
product: string | string[];
|
|
37
|
+
}): Promise<null | import("../../../../needle-share/types/stripe.js").License[]>;
|
|
30
38
|
/**
|
|
31
39
|
* Unfortunately this doesnt get properly bundles in the final output so we have to write the types below directly
|
|
32
40
|
*/
|
package/dist/web/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NeedleLoginButton } from "./LoginButton.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "needle-cloud",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1-experimental.66024ab",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"needle-cloud": "./bin/cli.js"
|
|
@@ -59,4 +59,4 @@
|
|
|
59
59
|
"access": "public",
|
|
60
60
|
"registry": "https://registry.npmjs.org/"
|
|
61
61
|
}
|
|
62
|
-
}
|
|
62
|
+
}
|