ftdsy-attr 2.1.20 → 2.1.21

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.
Files changed (81) hide show
  1. package/dist/api/tb/index.d.ts +3 -0
  2. package/dist/category/bags/bags_leather.d.ts +16 -0
  3. package/dist/category/bags/bags_motion.d.ts +16 -0
  4. package/dist/category/clothing/clothing_accessory.d.ts +16 -0
  5. package/dist/category/clothing/clothing_children.d.ts +16 -0
  6. package/dist/category/clothing/clothing_jewelry.d.ts +16 -0
  7. package/dist/category/clothing/clothing_men.d.ts +16 -0
  8. package/dist/category/clothing/clothing_motion.d.ts +16 -0
  9. package/dist/category/clothing/clothing_underwear.d.ts +16 -0
  10. package/dist/category/clothing/clothing_women.d.ts +16 -0
  11. package/dist/category/departmentStore/departmentStore_bedding.d.ts +16 -0
  12. package/dist/category/departmentStore/departmentStore_commodity.d.ts +17 -0
  13. package/dist/category/departmentStore/departmentStore_flower.d.ts +16 -0
  14. package/dist/category/departmentStore/departmentStore_holidaysupplies.d.ts +17 -0
  15. package/dist/category/departmentStore/departmentStore_homefabric.d.ts +16 -0
  16. package/dist/category/departmentStore/departmentStore_petanimal.d.ts +16 -0
  17. package/dist/category/departmentStore/departmentStore_storage.d.ts +16 -0
  18. package/dist/category/departmentStore/departmentStore_tableware.d.ts +17 -0
  19. package/dist/category/index.d.ts +7 -0
  20. package/dist/category/motherBaby/motherBaby_bady.d.ts +16 -0
  21. package/dist/category/motherBaby/motherBaby_gravida.d.ts +16 -0
  22. package/dist/category/numeral/numeral_accessory.d.ts +16 -0
  23. package/dist/category/numeral/numeral_camera.d.ts +16 -0
  24. package/dist/category/numeral/numeral_computer.d.ts +16 -0
  25. package/dist/category/numeral/numeral_game.d.ts +17 -0
  26. package/dist/category/numeral/numeral_smart.d.ts +17 -0
  27. package/dist/category/shoes/shoes_children.d.ts +16 -0
  28. package/dist/category/shoes/shoes_men.d.ts +16 -0
  29. package/dist/category/shoes/shoes_motion.d.ts +16 -0
  30. package/dist/category/shoes/shoes_women.d.ts +16 -0
  31. package/dist/category/sportsOutdoor/sportsOutdoor_outdoors.d.ts +16 -0
  32. package/dist/category/sportsOutdoor/sportsOutdoor_sports.d.ts +16 -0
  33. package/dist/category/type.d.ts +18 -0
  34. package/dist/category/vehicle/vehicle_cycling.d.ts +16 -0
  35. package/dist/category/vehicle/vehicle_electricvehicle.d.ts +16 -0
  36. package/dist/category/vehicle/vehicle_motorcycle.d.ts +16 -0
  37. package/dist/env.d.ts +3 -0
  38. package/dist/ftdsy-attr.cjs.js +1 -1
  39. package/dist/ftdsy-attr.cjs.js.map +1 -1
  40. package/dist/ftdsy-attr.esm.js +1 -1
  41. package/dist/ftdsy-attr.esm.js.map +1 -1
  42. package/dist/global-utils.d.ts +1 -0
  43. package/dist/main.d.ts +53 -0
  44. package/dist/models/defaultModel.d.ts +16 -0
  45. package/dist/models/index.d.ts +4 -0
  46. package/dist/models/modal.d.ts +11 -0
  47. package/dist/platform/albb.d.ts +6 -0
  48. package/dist/platform/albb.type.d.ts +27 -0
  49. package/dist/platform/dsy.d.ts +7 -0
  50. package/dist/platform/dsy.type.d.ts +12 -0
  51. package/dist/platform/dy.d.ts +3 -0
  52. package/dist/platform/dy.type.d.ts +48 -0
  53. package/dist/platform/jd.d.ts +3 -0
  54. package/dist/platform/jd.type.d.ts +30 -0
  55. package/dist/platform/ks.d.ts +3 -0
  56. package/dist/platform/ks.type.d.ts +41 -0
  57. package/dist/platform/pdd.d.ts +6 -0
  58. package/dist/platform/pdd.type.d.ts +28 -0
  59. package/dist/platform/shopee.d.ts +6 -0
  60. package/dist/platform/shopee.type.d.ts +28 -0
  61. package/dist/platform/tb.d.ts +7 -0
  62. package/dist/platform/tb.type.d.ts +63 -0
  63. package/dist/platform/tiktok.d.ts +6 -0
  64. package/dist/platform/tiktok.type.d.ts +1 -0
  65. package/dist/platform/tm.d.ts +5 -0
  66. package/dist/platform/tm.type.d.ts +1 -0
  67. package/dist/platform/wxsph.d.ts +6 -0
  68. package/dist/platform/wxsph.type.d.ts +9 -0
  69. package/dist/platform/xhs.d.ts +6 -0
  70. package/dist/platform/xhs.type.d.ts +16 -0
  71. package/dist/property/index.d.ts +10 -0
  72. package/dist/property/matchProperty.d.ts +6 -0
  73. package/dist/property/perpareProperty.d.ts +9 -0
  74. package/dist/property/predictionProperty.d.ts +8 -0
  75. package/dist/property/type.d.ts +69 -0
  76. package/dist/type.d.ts +67 -0
  77. package/dist/utils/axios.d.ts +15 -0
  78. package/dist/utils/error.d.ts +12 -0
  79. package/dist/utils/is/index.d.ts +23 -0
  80. package/dist/utils/utils.d.ts +34 -0
  81. package/package.json +1 -1
@@ -0,0 +1,15 @@
1
+ import { type AxiosRequestConfig } from 'axios';
2
+ type Config = {
3
+ maxRetries?: number;
4
+ retryDelay?: number;
5
+ };
6
+ export type Response<T> = {
7
+ code: number;
8
+ status: number;
9
+ msg?: string;
10
+ data: T;
11
+ };
12
+ export declare const fetchWithRetry: <T>(opt: AxiosRequestConfig, config?: Config) => Promise<T | undefined>;
13
+ export type UrlType = 'base' | 'tbApi' | 'dySupplier' | 'image';
14
+ export declare const fullUrl: (url: string, type?: UrlType) => string;
15
+ export {};
@@ -0,0 +1,12 @@
1
+ declare const _default: {
2
+ getError(message: string): {
3
+ msg: string;
4
+ code: number;
5
+ type: string;
6
+ } | {
7
+ msg: string;
8
+ code: string;
9
+ type: string;
10
+ };
11
+ };
12
+ export default _default;
@@ -0,0 +1,23 @@
1
+ export declare function is(val: unknown, type: string): boolean;
2
+ export declare function isDef<T = unknown>(val?: T): val is T;
3
+ export declare function isUnDef<T = unknown>(val?: T): val is T;
4
+ export declare function isObject(val: any): val is Record<any, any>;
5
+ export declare function isEmpty<T = unknown>(val: T): val is T;
6
+ export declare function isDate(val: unknown): val is Date;
7
+ export declare function isNull(val: unknown): val is null;
8
+ export declare function isNullAndUnDef(val: unknown): val is null | undefined;
9
+ export declare function isNullOrUnDef(val: unknown): val is null | undefined;
10
+ export declare function isNumber(val: unknown): val is number;
11
+ export declare function isPromise<T = any>(val: unknown): val is Promise<T>;
12
+ export declare function isString(val: unknown): val is string;
13
+ export declare function isFunction(val: unknown): val is Function;
14
+ export declare function isAsyncFunction(val: unknown): val is Function;
15
+ export declare function isBoolean(val: unknown): val is boolean;
16
+ export declare function isRegExp(val: unknown): val is RegExp;
17
+ export declare function isArray(val: any): val is Array<any>;
18
+ export declare function isWindow(val: any): val is Window;
19
+ export declare function isElement(val: unknown): val is Element;
20
+ export declare function isMap(val: unknown): val is Map<any, any>;
21
+ export declare const isServer: boolean;
22
+ export declare const isClient: boolean;
23
+ export declare function isUrl(path: string): boolean;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * 检测值是否为空值,true: 已选,false: 未选
3
+ * */
4
+ export declare function checkValue(value: unknown): boolean;
5
+ /**
6
+ * 获取2个字符串的相似度
7
+ * @param {string} str1 字符串1
8
+ * @param {string} str2 字符串2
9
+ * @returns {number} 相似度
10
+ */
11
+ export declare function getStringSimilarity(str1: string, str2: string): number;
12
+ /**
13
+ * 判断字符串中是否包含某些字符
14
+ *
15
+ * @param {String} text 检测字符串
16
+ * @param {Array} arr 检测内容字符串数组
17
+ * @param {string} type 检测方式,includeOne:包含一个,includeAll:包含全部,默认为 includeOne
18
+ * */
19
+ export declare function isTextInclude(text: string, arr: string[], type?: string): boolean;
20
+ /**
21
+ * 获取文本长度
22
+ *
23
+ * @param {String} text 待检查的字符串
24
+ * @param {Number} max 当text不是字符时返回的数字
25
+ * */
26
+ export declare function getTextLength(text: string, max?: number): number;
27
+ export declare function getCurrentTime(cate_path?: string): {
28
+ year: number;
29
+ month: number;
30
+ day: number;
31
+ season: string;
32
+ lastSeason: string;
33
+ };
34
+ export declare function mathRandomNumber(num: number): number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ftdsy-attr",
3
- "version": "2.1.20",
3
+ "version": "2.1.21",
4
4
  "main": "dist/ftdsy-attr.cjs.js",
5
5
  "module": "dist/ftdsy-attr.esm.js",
6
6
  "types": "dist/ftdsy-attr.d.ts",