auth-mn 0.1.1 → 0.1.2

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/index.d.ts CHANGED
@@ -56,6 +56,49 @@ declare const _default: {
56
56
  message: string;
57
57
  }>;
58
58
  };
59
+ socket: {
60
+ ShowToast: (body: {
61
+ user_id: number;
62
+ type: "info" | "warning";
63
+ text: string;
64
+ }) => Promise<{
65
+ success: boolean;
66
+ data: null;
67
+ message: string;
68
+ }>;
69
+ ShowStatus: (body: {
70
+ user_id: number;
71
+ id: string;
72
+ type?: "Loading" | "Success" | "Failure";
73
+ title?: string;
74
+ amount?: number | string;
75
+ desc?: string;
76
+ footer?: {
77
+ text: string;
78
+ buttons: {
79
+ text: string;
80
+ fun: "href" | "close" | "exit";
81
+ href?: string | null;
82
+ }[];
83
+ };
84
+ show?: boolean;
85
+ expired_date?: Date;
86
+ start_date?: Date;
87
+ }) => Promise<{
88
+ success: boolean;
89
+ data: null;
90
+ message: string;
91
+ }>;
92
+ ShowOrderStatus: (body: {
93
+ user_id: number;
94
+ order_id: string;
95
+ }) => Promise<{
96
+ success: boolean;
97
+ data: null;
98
+ message: string;
99
+ }>;
100
+ };
59
101
  };
60
102
  export default _default;
61
103
  export { default as notification } from "./notification";
104
+ export { default as socket } from "./socket";
package/dist/index.js CHANGED
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.notification = exports.setLogger = exports.setHost = exports.config = exports.ObjectId = exports.jsonToQueryString = void 0;
3
+ exports.socket = exports.notification = exports.setLogger = exports.setHost = exports.config = exports.ObjectId = exports.jsonToQueryString = void 0;
4
4
  const auth_1 = require("./auth");
5
5
  const notification_1 = require("./notification");
6
+ const socket_1 = require("./socket");
6
7
  const jsonToQueryString = (params) => {
7
8
  const query = Object.entries(params)
8
9
  .map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`)
@@ -50,6 +51,9 @@ exports.default = {
50
51
  auth: auth_1.default,
51
52
  ObjectId: exports.ObjectId,
52
53
  notification: notification_1.default,
54
+ socket: socket_1.default,
53
55
  };
54
56
  var notification_2 = require("./notification");
55
57
  Object.defineProperty(exports, "notification", { enumerable: true, get: function () { return notification_2.default; } });
58
+ var socket_2 = require("./socket");
59
+ Object.defineProperty(exports, "socket", { enumerable: true, get: function () { return socket_2.default; } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auth-mn",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Auth.mn API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",