@floristcloud/api-lib 1.2.0 → 1.2.3
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/build/commands/index.js
CHANGED
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.ValidateWsTicketS2SContractQuery = exports.CreateWsTicketContractCommand = exports.ValidateSessionS2SContractQuery = exports.GetActiveSessionsContractQuery = exports.SessionRevokeAllContractCommand = exports.SessionLogoutContractCommand = void 0;
|
|
17
18
|
__exportStar(require("./auth"), exports);
|
|
18
19
|
__exportStar(require("./branch"), exports);
|
|
19
20
|
__exportStar(require("./category"), exports);
|
|
@@ -62,4 +63,16 @@ __exportStar(require("./product-configuration/delete-product-configuration.comma
|
|
|
62
63
|
__exportStar(require("./product-configuration/find-product-configuration-by-attributes.query"), exports);
|
|
63
64
|
__exportStar(require("./bank-payment"), exports);
|
|
64
65
|
__exportStar(require("./integration"), exports);
|
|
65
|
-
|
|
66
|
+
// Session contracts exported individually to avoid webpack TDZ issues with Next.js SSG
|
|
67
|
+
var session_logout_command_1 = require("./session/session-logout.command");
|
|
68
|
+
Object.defineProperty(exports, "SessionLogoutContractCommand", { enumerable: true, get: function () { return session_logout_command_1.SessionLogoutContractCommand; } });
|
|
69
|
+
var session_revoke_all_command_1 = require("./session/session-revoke-all.command");
|
|
70
|
+
Object.defineProperty(exports, "SessionRevokeAllContractCommand", { enumerable: true, get: function () { return session_revoke_all_command_1.SessionRevokeAllContractCommand; } });
|
|
71
|
+
var get_active_sessions_query_1 = require("./session/get-active-sessions.query");
|
|
72
|
+
Object.defineProperty(exports, "GetActiveSessionsContractQuery", { enumerable: true, get: function () { return get_active_sessions_query_1.GetActiveSessionsContractQuery; } });
|
|
73
|
+
var validate_session_s2s_query_1 = require("./session/validate-session-s2s.query");
|
|
74
|
+
Object.defineProperty(exports, "ValidateSessionS2SContractQuery", { enumerable: true, get: function () { return validate_session_s2s_query_1.ValidateSessionS2SContractQuery; } });
|
|
75
|
+
var create_ws_ticket_command_1 = require("./session/create-ws-ticket.command");
|
|
76
|
+
Object.defineProperty(exports, "CreateWsTicketContractCommand", { enumerable: true, get: function () { return create_ws_ticket_command_1.CreateWsTicketContractCommand; } });
|
|
77
|
+
var validate_ws_ticket_s2s_query_1 = require("./session/validate-ws-ticket-s2s.query");
|
|
78
|
+
Object.defineProperty(exports, "ValidateWsTicketS2SContractQuery", { enumerable: true, get: function () { return validate_ws_ticket_s2s_query_1.ValidateWsTicketS2SContractQuery; } });
|
|
@@ -2,9 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetActiveSessionsContractQuery = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const
|
|
5
|
+
const enum_1 = require("../../enum");
|
|
6
|
+
const ActiveSessionItemSchema = zod_1.z.object({
|
|
7
|
+
id: zod_1.z.string(),
|
|
8
|
+
platform: zod_1.z.nativeEnum(enum_1.SessionPlatformEnum),
|
|
9
|
+
userAgent: zod_1.z.string().nullable(),
|
|
10
|
+
ipAddress: zod_1.z.string().nullable(),
|
|
11
|
+
lastActiveAt: zod_1.z.coerce.date(),
|
|
12
|
+
createdAt: zod_1.z.coerce.date(),
|
|
13
|
+
});
|
|
6
14
|
const GetActiveSessionsResponseSchema = zod_1.z.object({
|
|
7
|
-
data: zod_1.z.array(
|
|
15
|
+
data: zod_1.z.array(ActiveSessionItemSchema),
|
|
8
16
|
});
|
|
9
17
|
var GetActiveSessionsContractQuery;
|
|
10
18
|
(function (GetActiveSessionsContractQuery) {
|
package/build/schemas/index.js
CHANGED
|
@@ -74,4 +74,3 @@ __exportStar(require("./client-payment-identifier/client-payment-identifier.sche
|
|
|
74
74
|
__exportStar(require("./bank-payment/get-bank-payment-match-suggestions.schema"), exports);
|
|
75
75
|
__exportStar(require("./messenger-profile"), exports);
|
|
76
76
|
__exportStar(require("./error-message.schema"), exports);
|
|
77
|
-
__exportStar(require("./session/session.schema"), exports);
|
package/commands/index.ts
CHANGED
|
@@ -46,4 +46,10 @@ export * from './product-configuration/delete-product-configuration.command';
|
|
|
46
46
|
export * from './product-configuration/find-product-configuration-by-attributes.query';
|
|
47
47
|
export * from './bank-payment';
|
|
48
48
|
export * from './integration';
|
|
49
|
-
|
|
49
|
+
// Session contracts exported individually to avoid webpack TDZ issues with Next.js SSG
|
|
50
|
+
export { SessionLogoutContractCommand } from './session/session-logout.command';
|
|
51
|
+
export { SessionRevokeAllContractCommand } from './session/session-revoke-all.command';
|
|
52
|
+
export { GetActiveSessionsContractQuery } from './session/get-active-sessions.query';
|
|
53
|
+
export { ValidateSessionS2SContractQuery } from './session/validate-session-s2s.query';
|
|
54
|
+
export { CreateWsTicketContractCommand } from './session/create-ws-ticket.command';
|
|
55
|
+
export { ValidateWsTicketS2SContractQuery } from './session/validate-ws-ticket-s2s.query';
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { SessionPlatformEnum } from '../../enum';
|
|
3
|
+
|
|
4
|
+
const ActiveSessionItemSchema = z.object({
|
|
5
|
+
id: z.string(),
|
|
6
|
+
platform: z.nativeEnum(SessionPlatformEnum),
|
|
7
|
+
userAgent: z.string().nullable(),
|
|
8
|
+
ipAddress: z.string().nullable(),
|
|
9
|
+
lastActiveAt: z.coerce.date(),
|
|
10
|
+
createdAt: z.coerce.date(),
|
|
11
|
+
});
|
|
3
12
|
|
|
4
13
|
const GetActiveSessionsResponseSchema = z.object({
|
|
5
|
-
data: z.array(
|
|
14
|
+
data: z.array(ActiveSessionItemSchema),
|
|
6
15
|
});
|
|
7
16
|
|
|
8
17
|
export namespace GetActiveSessionsContractQuery {
|
package/package.json
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@floristcloud/api-lib",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"description": "",
|
|
5
|
-
"
|
|
6
|
-
"main": "./build/index.js"
|
|
7
|
-
},
|
|
5
|
+
"main": "./build/index.js",
|
|
8
6
|
"scripts": {
|
|
9
7
|
"prepublish": "rm -rf build && tsc",
|
|
10
|
-
"build": "
|
|
8
|
+
"build": "tsc",
|
|
11
9
|
"clean": "rm -rf build node_modules"
|
|
12
10
|
},
|
|
13
11
|
"keywords": [],
|
package/schemas/index.ts
CHANGED
|
@@ -58,4 +58,3 @@ export * from './client-payment-identifier/client-payment-identifier.schema';
|
|
|
58
58
|
export * from './bank-payment/get-bank-payment-match-suggestions.schema';
|
|
59
59
|
export * from './messenger-profile';
|
|
60
60
|
export * from './error-message.schema';
|
|
61
|
-
export * from './session/session.schema';
|