quidproquo-core 0.0.248 → 0.0.249
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/lib/commonjs/actions/index.d.ts +1 -0
- package/lib/commonjs/actions/index.js +1 -0
- package/lib/commonjs/actions/state/StateActionType.d.ts +3 -0
- package/lib/commonjs/actions/state/StateActionType.js +7 -0
- package/lib/commonjs/actions/state/StateDispatchActionRequester.d.ts +2 -0
- package/lib/commonjs/actions/state/StateDispatchActionRequester.js +8 -0
- package/lib/commonjs/actions/state/StateDispatchActionTypes.d.ts +11 -0
- package/lib/commonjs/actions/state/StateDispatchActionTypes.js +2 -0
- package/lib/commonjs/actions/state/index.d.ts +3 -0
- package/lib/commonjs/actions/state/index.js +19 -0
- package/lib/commonjs/actions/userDirectory/UserDirectoryChangePasswordActionRequester.d.ts +1 -1
- package/lib/commonjs/actions/userDirectory/UserDirectoryChangePasswordActionRequester.js +2 -1
- package/lib/commonjs/actions/userDirectory/UserDirectoryChangePasswordActionTypes.d.ts +1 -0
- package/lib/commonjs/types/StorySession.d.ts +2 -1
- package/lib/commonjs/types/StorySession.js +1 -0
- package/lib/esm/actions/index.d.ts +1 -0
- package/lib/esm/actions/index.js +1 -0
- package/lib/esm/actions/state/StateActionType.d.ts +3 -0
- package/lib/esm/actions/state/StateActionType.js +4 -0
- package/lib/esm/actions/state/StateDispatchActionRequester.d.ts +2 -0
- package/lib/esm/actions/state/StateDispatchActionRequester.js +4 -0
- package/lib/esm/actions/state/StateDispatchActionTypes.d.ts +11 -0
- package/lib/esm/actions/state/StateDispatchActionTypes.js +1 -0
- package/lib/esm/actions/state/index.d.ts +3 -0
- package/lib/esm/actions/state/index.js +3 -0
- package/lib/esm/actions/userDirectory/UserDirectoryChangePasswordActionRequester.d.ts +1 -1
- package/lib/esm/actions/userDirectory/UserDirectoryChangePasswordActionRequester.js +2 -1
- package/lib/esm/actions/userDirectory/UserDirectoryChangePasswordActionTypes.d.ts +1 -0
- package/lib/esm/types/StorySession.d.ts +2 -1
- package/lib/esm/types/StorySession.js +1 -0
- package/package.json +2 -2
|
@@ -30,5 +30,6 @@ __exportStar(require("./math"), exports);
|
|
|
30
30
|
__exportStar(require("./network"), exports);
|
|
31
31
|
__exportStar(require("./platform"), exports);
|
|
32
32
|
__exportStar(require("./queue"), exports);
|
|
33
|
+
__exportStar(require("./state"), exports);
|
|
33
34
|
__exportStar(require("./system"), exports);
|
|
34
35
|
__exportStar(require("./userDirectory"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StateActionType = void 0;
|
|
4
|
+
var StateActionType;
|
|
5
|
+
(function (StateActionType) {
|
|
6
|
+
StateActionType["Dispatch"] = "@quidproquo-core/State/Dispatch";
|
|
7
|
+
})(StateActionType = exports.StateActionType || (exports.StateActionType = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.askStateDispatch = void 0;
|
|
4
|
+
const StateActionType_1 = require("./StateActionType");
|
|
5
|
+
function* askStateDispatch(action) {
|
|
6
|
+
return yield { type: StateActionType_1.StateActionType.Dispatch, payload: { action } };
|
|
7
|
+
}
|
|
8
|
+
exports.askStateDispatch = askStateDispatch;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
|
|
2
|
+
import { StateActionType } from './StateActionType';
|
|
3
|
+
export type StateDispatchActionPayload<T> = {
|
|
4
|
+
action: T;
|
|
5
|
+
};
|
|
6
|
+
export interface StateDispatchAction<T> extends Action<StateDispatchActionPayload<T>> {
|
|
7
|
+
type: StateActionType.Dispatch;
|
|
8
|
+
payload: StateDispatchActionPayload<T>;
|
|
9
|
+
}
|
|
10
|
+
export type StateDispatchActionProcessor<T> = ActionProcessor<StateDispatchAction<T>, void>;
|
|
11
|
+
export type StateDispatchActionRequester<T> = ActionRequester<StateDispatchAction<T>, void>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./StateActionType"), exports);
|
|
18
|
+
__exportStar(require("./StateDispatchActionRequester"), exports);
|
|
19
|
+
__exportStar(require("./StateDispatchActionTypes"), exports);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { UserDirectoryChangePasswordActionRequester } from './UserDirectoryChangePasswordActionTypes';
|
|
2
|
-
export declare function askUserDirectoryChangePassword(oldPassword: string, newPassword: string): UserDirectoryChangePasswordActionRequester;
|
|
2
|
+
export declare function askUserDirectoryChangePassword(oldPassword: string, newPassword: string, accessToken: string): UserDirectoryChangePasswordActionRequester;
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.askUserDirectoryChangePassword = void 0;
|
|
4
4
|
const UserDirectoryActionType_1 = require("./UserDirectoryActionType");
|
|
5
|
-
function* askUserDirectoryChangePassword(oldPassword, newPassword) {
|
|
5
|
+
function* askUserDirectoryChangePassword(oldPassword, newPassword, accessToken) {
|
|
6
6
|
return yield {
|
|
7
7
|
type: UserDirectoryActionType_1.UserDirectoryActionType.ChangePassword,
|
|
8
8
|
payload: {
|
|
9
9
|
oldPassword,
|
|
10
10
|
newPassword,
|
|
11
|
+
accessToken,
|
|
11
12
|
},
|
|
12
13
|
};
|
|
13
14
|
}
|
|
@@ -3,6 +3,7 @@ import { UserDirectoryActionType } from './UserDirectoryActionType';
|
|
|
3
3
|
export interface UserDirectoryChangePasswordActionPayload {
|
|
4
4
|
oldPassword: string;
|
|
5
5
|
newPassword: string;
|
|
6
|
+
accessToken: string;
|
|
6
7
|
}
|
|
7
8
|
export interface UserDirectoryChangePasswordAction extends Action<UserDirectoryChangePasswordActionPayload> {
|
|
8
9
|
type: UserDirectoryActionType.ChangePassword;
|
|
@@ -19,7 +19,7 @@ export interface StorySession {
|
|
|
19
19
|
export type StorySessionUpdater = (newSession: Partial<StorySession>) => void;
|
|
20
20
|
export type AskResponse<T> = Generator<Action<any>, T, any>;
|
|
21
21
|
export type Story<TArgs extends any[], R> = (...args: TArgs) => AskResponse<R>;
|
|
22
|
-
export type StoryResolver<S extends Story<any, any>>
|
|
22
|
+
export type StoryResolver = <S extends Story<any, any>>(story: S) => (...args: Parameters<S>) => Promise<AskResponseReturnType<ReturnType<S>>>;
|
|
23
23
|
/**
|
|
24
24
|
* Utility Type: ExtractGeneratorReturnType
|
|
25
25
|
*
|
|
@@ -71,6 +71,7 @@ export declare enum QpqRuntimeType {
|
|
|
71
71
|
STORAGEDRIVE_EVENT = "STORAGEDRIVE_EVENT",
|
|
72
72
|
CLOUD_FLARE_DEPLOY = "CLOUD_FLARE_DEPLOY",
|
|
73
73
|
UNIT_TEST = "UNIT_TEST",
|
|
74
|
+
UI = "UI",
|
|
74
75
|
SEND_EMAIL_EVENT = "SEND_EMAIL_EVENT",
|
|
75
76
|
AUTH_DEFINE_AUTH_CHALLENGE = "AUTH_DEFINE_AUTH_CHALLENGE",
|
|
76
77
|
AUTH_CREATE_AUTH_CHALLENGE = "AUTH_CREATE_AUTH_CHALLENGE",
|
|
@@ -15,6 +15,7 @@ var QpqRuntimeType;
|
|
|
15
15
|
QpqRuntimeType["STORAGEDRIVE_EVENT"] = "STORAGEDRIVE_EVENT";
|
|
16
16
|
QpqRuntimeType["CLOUD_FLARE_DEPLOY"] = "CLOUD_FLARE_DEPLOY";
|
|
17
17
|
QpqRuntimeType["UNIT_TEST"] = "UNIT_TEST";
|
|
18
|
+
QpqRuntimeType["UI"] = "UI";
|
|
18
19
|
QpqRuntimeType["SEND_EMAIL_EVENT"] = "SEND_EMAIL_EVENT";
|
|
19
20
|
QpqRuntimeType["AUTH_DEFINE_AUTH_CHALLENGE"] = "AUTH_DEFINE_AUTH_CHALLENGE";
|
|
20
21
|
QpqRuntimeType["AUTH_CREATE_AUTH_CHALLENGE"] = "AUTH_CREATE_AUTH_CHALLENGE";
|
package/lib/esm/actions/index.js
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
|
|
2
|
+
import { StateActionType } from './StateActionType';
|
|
3
|
+
export type StateDispatchActionPayload<T> = {
|
|
4
|
+
action: T;
|
|
5
|
+
};
|
|
6
|
+
export interface StateDispatchAction<T> extends Action<StateDispatchActionPayload<T>> {
|
|
7
|
+
type: StateActionType.Dispatch;
|
|
8
|
+
payload: StateDispatchActionPayload<T>;
|
|
9
|
+
}
|
|
10
|
+
export type StateDispatchActionProcessor<T> = ActionProcessor<StateDispatchAction<T>, void>;
|
|
11
|
+
export type StateDispatchActionRequester<T> = ActionRequester<StateDispatchAction<T>, void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { UserDirectoryChangePasswordActionRequester } from './UserDirectoryChangePasswordActionTypes';
|
|
2
|
-
export declare function askUserDirectoryChangePassword(oldPassword: string, newPassword: string): UserDirectoryChangePasswordActionRequester;
|
|
2
|
+
export declare function askUserDirectoryChangePassword(oldPassword: string, newPassword: string, accessToken: string): UserDirectoryChangePasswordActionRequester;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { UserDirectoryActionType } from './UserDirectoryActionType';
|
|
2
|
-
export function* askUserDirectoryChangePassword(oldPassword, newPassword) {
|
|
2
|
+
export function* askUserDirectoryChangePassword(oldPassword, newPassword, accessToken) {
|
|
3
3
|
return yield {
|
|
4
4
|
type: UserDirectoryActionType.ChangePassword,
|
|
5
5
|
payload: {
|
|
6
6
|
oldPassword,
|
|
7
7
|
newPassword,
|
|
8
|
+
accessToken,
|
|
8
9
|
},
|
|
9
10
|
};
|
|
10
11
|
}
|
|
@@ -3,6 +3,7 @@ import { UserDirectoryActionType } from './UserDirectoryActionType';
|
|
|
3
3
|
export interface UserDirectoryChangePasswordActionPayload {
|
|
4
4
|
oldPassword: string;
|
|
5
5
|
newPassword: string;
|
|
6
|
+
accessToken: string;
|
|
6
7
|
}
|
|
7
8
|
export interface UserDirectoryChangePasswordAction extends Action<UserDirectoryChangePasswordActionPayload> {
|
|
8
9
|
type: UserDirectoryActionType.ChangePassword;
|
|
@@ -19,7 +19,7 @@ export interface StorySession {
|
|
|
19
19
|
export type StorySessionUpdater = (newSession: Partial<StorySession>) => void;
|
|
20
20
|
export type AskResponse<T> = Generator<Action<any>, T, any>;
|
|
21
21
|
export type Story<TArgs extends any[], R> = (...args: TArgs) => AskResponse<R>;
|
|
22
|
-
export type StoryResolver<S extends Story<any, any>>
|
|
22
|
+
export type StoryResolver = <S extends Story<any, any>>(story: S) => (...args: Parameters<S>) => Promise<AskResponseReturnType<ReturnType<S>>>;
|
|
23
23
|
/**
|
|
24
24
|
* Utility Type: ExtractGeneratorReturnType
|
|
25
25
|
*
|
|
@@ -71,6 +71,7 @@ export declare enum QpqRuntimeType {
|
|
|
71
71
|
STORAGEDRIVE_EVENT = "STORAGEDRIVE_EVENT",
|
|
72
72
|
CLOUD_FLARE_DEPLOY = "CLOUD_FLARE_DEPLOY",
|
|
73
73
|
UNIT_TEST = "UNIT_TEST",
|
|
74
|
+
UI = "UI",
|
|
74
75
|
SEND_EMAIL_EVENT = "SEND_EMAIL_EVENT",
|
|
75
76
|
AUTH_DEFINE_AUTH_CHALLENGE = "AUTH_DEFINE_AUTH_CHALLENGE",
|
|
76
77
|
AUTH_CREATE_AUTH_CHALLENGE = "AUTH_CREATE_AUTH_CHALLENGE",
|
|
@@ -12,6 +12,7 @@ export var QpqRuntimeType;
|
|
|
12
12
|
QpqRuntimeType["STORAGEDRIVE_EVENT"] = "STORAGEDRIVE_EVENT";
|
|
13
13
|
QpqRuntimeType["CLOUD_FLARE_DEPLOY"] = "CLOUD_FLARE_DEPLOY";
|
|
14
14
|
QpqRuntimeType["UNIT_TEST"] = "UNIT_TEST";
|
|
15
|
+
QpqRuntimeType["UI"] = "UI";
|
|
15
16
|
QpqRuntimeType["SEND_EMAIL_EVENT"] = "SEND_EMAIL_EVENT";
|
|
16
17
|
QpqRuntimeType["AUTH_DEFINE_AUTH_CHALLENGE"] = "AUTH_DEFINE_AUTH_CHALLENGE";
|
|
17
18
|
QpqRuntimeType["AUTH_CREATE_AUTH_CHALLENGE"] = "AUTH_CREATE_AUTH_CHALLENGE";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quidproquo-core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.249",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./lib/commonjs/index.js",
|
|
6
6
|
"module": "./lib/esm/index.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"homepage": "https://github.com/joe-coady/quidproquo#readme",
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"quidproquo-tsconfig": "0.0.
|
|
35
|
+
"quidproquo-tsconfig": "0.0.249",
|
|
36
36
|
"typescript": "^4.9.3"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|