@campnetwork/origin 1.0.0-alpha.13 → 1.0.0-alpha.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +1073 -1139
- package/dist/core.cjs +70 -70
- package/dist/core.d.ts +8 -5
- package/dist/core.esm.d.ts +8 -5
- package/dist/core.esm.js +73 -73
- package/dist/react/index.esm.d.ts +8 -7
- package/dist/react/index.esm.js +192 -136
- package/package.json +74 -73
package/dist/core.d.ts
CHANGED
|
@@ -497,16 +497,12 @@ declare class Auth {
|
|
|
497
497
|
* @param {object} options The options object.
|
|
498
498
|
* @param {string} options.clientId The client ID.
|
|
499
499
|
* @param {string|object} options.redirectUri The redirect URI used for oauth. Leave empty if you want to use the current URL. If you want different redirect URIs for different socials, pass an object with the socials as keys and the redirect URIs as values.
|
|
500
|
-
* @param {boolean} [options.allowAnalytics=true] Whether to allow analytics to be sent.
|
|
501
|
-
* @param {object} [options.ackeeInstance] The Ackee instance.
|
|
502
500
|
* @param {("DEVELOPMENT"|"PRODUCTION")} [options.environment="DEVELOPMENT"] The environment to use.
|
|
503
501
|
* @throws {APIError} - Throws an error if the clientId is not provided.
|
|
504
502
|
*/
|
|
505
|
-
constructor({ clientId, redirectUri,
|
|
503
|
+
constructor({ clientId, redirectUri, environment, }: {
|
|
506
504
|
clientId: string;
|
|
507
505
|
redirectUri: string | Record<string, string>;
|
|
508
|
-
allowAnalytics?: boolean;
|
|
509
|
-
ackeeInstance?: any;
|
|
510
506
|
environment?: "DEVELOPMENT" | "PRODUCTION";
|
|
511
507
|
});
|
|
512
508
|
/**
|
|
@@ -520,6 +516,13 @@ declare class Auth {
|
|
|
520
516
|
* });
|
|
521
517
|
*/
|
|
522
518
|
on(event: "state" | "provider" | "providers" | "viem", callback: Function): void;
|
|
519
|
+
/**
|
|
520
|
+
* Unsubscribe from an event. Possible events are "state", "provider", "providers", and "viem".
|
|
521
|
+
* @param {("state"|"provider"|"providers"|"viem")} event The event.
|
|
522
|
+
* @param {function} callback The callback function.
|
|
523
|
+
* @returns {void}
|
|
524
|
+
*/
|
|
525
|
+
off(event: "state" | "provider" | "providers" | "viem", callback: Function): void;
|
|
523
526
|
/**
|
|
524
527
|
* Set the loading state.
|
|
525
528
|
* @param {boolean} loading The loading state.
|
package/dist/core.esm.d.ts
CHANGED
|
@@ -497,16 +497,12 @@ declare class Auth {
|
|
|
497
497
|
* @param {object} options The options object.
|
|
498
498
|
* @param {string} options.clientId The client ID.
|
|
499
499
|
* @param {string|object} options.redirectUri The redirect URI used for oauth. Leave empty if you want to use the current URL. If you want different redirect URIs for different socials, pass an object with the socials as keys and the redirect URIs as values.
|
|
500
|
-
* @param {boolean} [options.allowAnalytics=true] Whether to allow analytics to be sent.
|
|
501
|
-
* @param {object} [options.ackeeInstance] The Ackee instance.
|
|
502
500
|
* @param {("DEVELOPMENT"|"PRODUCTION")} [options.environment="DEVELOPMENT"] The environment to use.
|
|
503
501
|
* @throws {APIError} - Throws an error if the clientId is not provided.
|
|
504
502
|
*/
|
|
505
|
-
constructor({ clientId, redirectUri,
|
|
503
|
+
constructor({ clientId, redirectUri, environment, }: {
|
|
506
504
|
clientId: string;
|
|
507
505
|
redirectUri: string | Record<string, string>;
|
|
508
|
-
allowAnalytics?: boolean;
|
|
509
|
-
ackeeInstance?: any;
|
|
510
506
|
environment?: "DEVELOPMENT" | "PRODUCTION";
|
|
511
507
|
});
|
|
512
508
|
/**
|
|
@@ -520,6 +516,13 @@ declare class Auth {
|
|
|
520
516
|
* });
|
|
521
517
|
*/
|
|
522
518
|
on(event: "state" | "provider" | "providers" | "viem", callback: Function): void;
|
|
519
|
+
/**
|
|
520
|
+
* Unsubscribe from an event. Possible events are "state", "provider", "providers", and "viem".
|
|
521
|
+
* @param {("state"|"provider"|"providers"|"viem")} event The event.
|
|
522
|
+
* @param {function} callback The callback function.
|
|
523
|
+
* @returns {void}
|
|
524
|
+
*/
|
|
525
|
+
off(event: "state" | "provider" | "providers" | "viem", callback: Function): void;
|
|
523
526
|
/**
|
|
524
527
|
* Set the loading state.
|
|
525
528
|
* @param {boolean} loading The loading state.
|