@wenex/sdk 1.1.38 → 1.1.40

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.
@@ -11,5 +11,6 @@ export * from './repository.util';
11
11
  export * from './token.util';
12
12
  export * from './tools.util';
13
13
  export * from './transform.util';
14
+ export * from './unicode.util';
14
15
  export * from './validation.util';
15
16
  export * from './wrapper.util';
@@ -27,6 +27,7 @@ __exportStar(require("./repository.util"), exports);
27
27
  __exportStar(require("./token.util"), exports);
28
28
  __exportStar(require("./tools.util"), exports);
29
29
  __exportStar(require("./transform.util"), exports);
30
+ __exportStar(require("./unicode.util"), exports);
30
31
  __exportStar(require("./validation.util"), exports);
31
32
  __exportStar(require("./wrapper.util"), exports);
32
33
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/core/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,kDAAgC;AAChC,gDAA8B;AAC9B,iDAA+B;AAC/B,gDAA8B;AAC9B,8CAA4B;AAC5B,+CAA6B;AAC7B,6CAA2B;AAC3B,gDAA8B;AAC9B,oDAAkC;AAClC,+CAA6B;AAC7B,+CAA6B;AAC7B,mDAAiC;AACjC,oDAAkC;AAClC,iDAA+B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/core/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,kDAAgC;AAChC,gDAA8B;AAC9B,iDAA+B;AAC/B,gDAA8B;AAC9B,8CAA4B;AAC5B,+CAA6B;AAC7B,6CAA2B;AAC3B,gDAA8B;AAC9B,oDAAkC;AAClC,+CAA6B;AAC7B,+CAA6B;AAC7B,mDAAiC;AACjC,iDAA+B;AAC/B,oDAAkC;AAClC,iDAA+B"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const unicode_util_1 = require("./unicode.util");
4
+ describe('libs/common/src/core/utils/unicode.spec.ts', () => {
5
+ it('toUnicode', () => {
6
+ expect((0, unicode_util_1.toUnicode)('این یک متن نمونه برای تست است به همراه شماره ۱۲۳۴۵')).toBe('\\u0627\\u06cc\\u0646\\u0020\\u06cc\\u06a9\\u0020\\u0645\\u062a\\u0646\\u0020\\u0646\\u0645\\u0648\\u0646\\u0647\\u0020\\u0628\\u0631\\u0627\\u06cc\\u0020\\u062a\\u0633\\u062a\\u0020\\u0627\\u0633\\u062a\\u0020\\u0628\\u0647\\u0020\\u0647\\u0645\\u0631\\u0627\\u0647\\u0020\\u0634\\u0645\\u0627\\u0631\\u0647\\u0020\\u06f1\\u06f2\\u06f3\\u06f4\\u06f5');
7
+ expect((0, unicode_util_1.toUnicode)('Hello World!')).toBe('\\u0048\\u0065\\u006c\\u006c\\u006f\\u0020\\u0057\\u006f\\u0072\\u006c\\u0064\\u0021');
8
+ });
9
+ it('fromUnicode', () => {
10
+ expect((0, unicode_util_1.fromUnicode)('\\u0627\\u06cc\\u0646\\u0020\\u06cc\\u06a9\\u0020\\u0645\\u062a\\u0646\\u0020\\u0646\\u0645\\u0648\\u0646\\u0647\\u0020\\u0628\\u0631\\u0627\\u06cc\\u0020\\u062a\\u0633\\u062a\\u0020\\u0627\\u0633\\u062a\\u0020\\u0628\\u0647\\u0020\\u0647\\u0645\\u0631\\u0627\\u0647\\u0020\\u0634\\u0645\\u0627\\u0631\\u0647\\u0020\\u06f1\\u06f2\\u06f3\\u06f4\\u06f5')).toBe('این یک متن نمونه برای تست است به همراه شماره ۱۲۳۴۵');
11
+ expect((0, unicode_util_1.fromUnicode)('Hello World!')).toBe('Hello World!');
12
+ });
13
+ });
14
+ //# sourceMappingURL=unicode.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unicode.spec.js","sourceRoot":"","sources":["../../../src/common/core/utils/unicode.spec.ts"],"names":[],"mappings":";;AAAA,iDAAwD;AAExD,QAAQ,CAAC,4CAA4C,EAAE,GAAG,EAAE;IAC1D,EAAE,CAAC,WAAW,EAAE,GAAG,EAAE;QACnB,MAAM,CAAC,IAAA,wBAAS,EAAC,oDAAoD,CAAC,CAAC,CAAC,IAAI,CAC1E,gWAAgW,CACjW,CAAC;QACF,MAAM,CAAC,IAAA,wBAAS,EAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,sFAAsF,CAAC,CAAC;IACjI,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,aAAa,EAAE,GAAG,EAAE;QACrB,MAAM,CACJ,IAAA,0BAAW,EACT,gWAAgW,CACjW,CACF,CAAC,IAAI,CAAC,oDAAoD,CAAC,CAAC;QAC7D,MAAM,CAAC,IAAA,0BAAW,EAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAC3D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const toUnicode: (str: string) => string;
2
+ export declare const fromUnicode: (str: string) => string;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fromUnicode = exports.toUnicode = void 0;
4
+ const toUnicode = (str) => {
5
+ return str
6
+ .split('')
7
+ .map((char) => {
8
+ const code = char.charCodeAt(0);
9
+ return `\\u${code.toString(16).padStart(4, '0')}`;
10
+ })
11
+ .join('');
12
+ };
13
+ exports.toUnicode = toUnicode;
14
+ const fromUnicode = (str) => {
15
+ return str.replace(/\\u[\dA-Fa-f]{4}/g, (match) => {
16
+ const code = parseInt(match.slice(2), 16);
17
+ return String.fromCharCode(code);
18
+ });
19
+ };
20
+ exports.fromUnicode = fromUnicode;
21
+ //# sourceMappingURL=unicode.util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unicode.util.js","sourceRoot":"","sources":["../../../src/common/core/utils/unicode.util.ts"],"names":[],"mappings":";;;AAAO,MAAM,SAAS,GAAG,CAAC,GAAW,EAAU,EAAE;IAC/C,OAAO,GAAG;SACP,KAAK,CAAC,EAAE,CAAC;SACT,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACZ,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAChC,OAAO,MAAM,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;IACpD,CAAC,CAAC;SACD,IAAI,CAAC,EAAE,CAAC,CAAC;AACd,CAAC,CAAC;AARW,QAAA,SAAS,aAQpB;AAEK,MAAM,WAAW,GAAG,CAAC,GAAW,EAAU,EAAE;IACjD,OAAO,GAAG,CAAC,OAAO,CAAC,mBAAmB,EAAE,CAAC,KAAK,EAAE,EAAE;QAChD,MAAM,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAC1C,OAAO,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AALW,QAAA,WAAW,eAKtB"}
@@ -0,0 +1 @@
1
+ export * from './range.enum';
@@ -0,0 +1,18 @@
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("./range.enum"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/enums/career/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B"}
@@ -1,4 +1,4 @@
1
- export declare enum ServiceRange {
1
+ export declare enum LocationRange {
2
2
  CITY = "CITY",
3
3
  COUNTY = "COUNTY",
4
4
  DISTRICT = "DISTRICT",
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LocationRange = void 0;
4
+ var LocationRange;
5
+ (function (LocationRange) {
6
+ LocationRange["CITY"] = "CITY";
7
+ LocationRange["COUNTY"] = "COUNTY";
8
+ LocationRange["DISTRICT"] = "DISTRICT";
9
+ LocationRange["COUNTRY"] = "COUNTRY";
10
+ LocationRange["PROVINCE"] = "PROVINCE";
11
+ LocationRange["STATE"] = "STATE";
12
+ LocationRange["ROAD"] = "ROAD";
13
+ LocationRange["SUBURB"] = "SUBURB";
14
+ LocationRange["QUARTER"] = "QUARTER";
15
+ LocationRange["VILLAGE"] = "VILLAGE";
16
+ LocationRange["MUNICIPALITY"] = "MUNICIPALITY";
17
+ })(LocationRange || (exports.LocationRange = LocationRange = {}));
18
+ //# sourceMappingURL=range.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"range.enum.js","sourceRoot":"","sources":["../../../../src/common/enums/career/common/range.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,aAYX;AAZD,WAAY,aAAa;IACvB,8BAAa,CAAA;IACb,kCAAiB,CAAA;IACjB,sCAAqB,CAAA;IACrB,oCAAmB,CAAA;IACnB,sCAAqB,CAAA;IACrB,gCAAe,CAAA;IACf,8BAAa,CAAA;IACb,kCAAiB,CAAA;IACjB,oCAAmB,CAAA;IACnB,oCAAmB,CAAA;IACnB,8CAA6B,CAAA;AAC/B,CAAC,EAZW,aAAa,6BAAb,aAAa,QAYxB"}
@@ -1,3 +1,4 @@
1
+ export * from './common';
1
2
  export * from './branches';
2
3
  export * from './businesses';
3
4
  export * from './employees';
@@ -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
+ __exportStar(require("./common"), exports);
17
18
  __exportStar(require("./branches"), exports);
18
19
  __exportStar(require("./businesses"), exports);
19
20
  __exportStar(require("./employees"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/enums/career/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,+CAA6B;AAC7B,8CAA4B;AAC5B,6CAA2B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/enums/career/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,6CAA2B;AAC3B,+CAA6B;AAC7B,8CAA4B;AAC5B,6CAA2B"}
@@ -1,2 +1 @@
1
- export * from './range.enum';
2
1
  export * from './type.enum';
@@ -14,6 +14,5 @@ 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
- __exportStar(require("./range.enum"), exports);
18
17
  __exportStar(require("./type.enum"), exports);
19
18
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/enums/career/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,8CAA4B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/enums/career/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B"}
@@ -1,11 +1,12 @@
1
1
  import type { Document } from 'mongoose';
2
2
  import { State, Status } from '../../../core/enums';
3
3
  import { Core, Dto } from '../../../core/interfaces';
4
- import { EmployeeType } from '../../../enums/career';
4
+ import { EmployeeType, LocationRange } from '../../../enums/career';
5
5
  export interface Employee<Properties extends object = object> extends Core<Properties> {
6
- profile: string;
7
6
  type: EmployeeType;
7
+ range?: LocationRange;
8
8
  job_title: string;
9
+ profile?: string;
9
10
  branch?: string;
10
11
  manager?: string;
11
12
  business: string;
@@ -1,10 +1,10 @@
1
1
  import type { Document } from 'mongoose';
2
2
  import { State, Status } from '../../../core/enums';
3
3
  import { Core, Dto } from '../../../core/interfaces';
4
- import { ServiceRange, ServiceType } from '../../../enums/career';
4
+ import { LocationRange, ServiceType } from '../../../enums/career';
5
5
  export interface Service<Properties extends object = object> extends Core<Properties> {
6
6
  type: ServiceType;
7
- range?: ServiceRange;
7
+ range?: LocationRange;
8
8
  name: string;
9
9
  state: State;
10
10
  status: Status;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wenex/sdk",
3
- "version": "1.1.38",
3
+ "version": "1.1.40",
4
4
  "description": "Wenex SDK",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ServiceRange = void 0;
4
- var ServiceRange;
5
- (function (ServiceRange) {
6
- ServiceRange["CITY"] = "CITY";
7
- ServiceRange["COUNTY"] = "COUNTY";
8
- ServiceRange["DISTRICT"] = "DISTRICT";
9
- ServiceRange["COUNTRY"] = "COUNTRY";
10
- ServiceRange["PROVINCE"] = "PROVINCE";
11
- ServiceRange["STATE"] = "STATE";
12
- ServiceRange["ROAD"] = "ROAD";
13
- ServiceRange["SUBURB"] = "SUBURB";
14
- ServiceRange["QUARTER"] = "QUARTER";
15
- ServiceRange["VILLAGE"] = "VILLAGE";
16
- ServiceRange["MUNICIPALITY"] = "MUNICIPALITY";
17
- })(ServiceRange || (exports.ServiceRange = ServiceRange = {}));
18
- //# sourceMappingURL=range.enum.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"range.enum.js","sourceRoot":"","sources":["../../../../src/common/enums/career/services/range.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,YAYX;AAZD,WAAY,YAAY;IACtB,6BAAa,CAAA;IACb,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;IACrB,mCAAmB,CAAA;IACnB,qCAAqB,CAAA;IACrB,+BAAe,CAAA;IACf,6BAAa,CAAA;IACb,iCAAiB,CAAA;IACjB,mCAAmB,CAAA;IACnB,mCAAmB,CAAA;IACnB,6CAA6B,CAAA;AAC/B,CAAC,EAZW,YAAY,4BAAZ,YAAY,QAYvB"}