@k-msg/template 0.27.2 → 0.29.0
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.js +23 -23
- package/dist/index.mjs +23 -23
- package/dist/toolkit/index.js +22 -22
- package/dist/toolkit/index.mjs +22 -22
- package/dist/types/template.types.d.ts +53 -53
- package/package.json +4 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
1
|
+
import { z } from "zod/mini";
|
|
2
2
|
export declare enum TemplateType {
|
|
3
3
|
ALIMTALK = "ALIMTALK",
|
|
4
4
|
SMS = "SMS",
|
|
@@ -64,84 +64,84 @@ export interface AlimTalkTemplate {
|
|
|
64
64
|
};
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
export declare const TemplateVariableSchema: z.
|
|
68
|
-
name: z.
|
|
69
|
-
type: z.
|
|
67
|
+
export declare const TemplateVariableSchema: z.ZodMiniObject<{
|
|
68
|
+
name: z.ZodMiniString<string>;
|
|
69
|
+
type: z.ZodMiniEnum<{
|
|
70
70
|
string: "string";
|
|
71
71
|
number: "number";
|
|
72
72
|
date: "date";
|
|
73
73
|
custom: "custom";
|
|
74
74
|
}>;
|
|
75
|
-
required: z.
|
|
76
|
-
maxLength: z.
|
|
77
|
-
format: z.
|
|
78
|
-
description: z.
|
|
79
|
-
example: z.
|
|
75
|
+
required: z.ZodMiniBoolean<boolean>;
|
|
76
|
+
maxLength: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
77
|
+
format: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
78
|
+
description: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
79
|
+
example: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
80
80
|
}, z.core.$strip>;
|
|
81
|
-
export declare const TemplateButtonSchema: z.
|
|
82
|
-
type: z.
|
|
81
|
+
export declare const TemplateButtonSchema: z.ZodMiniObject<{
|
|
82
|
+
type: z.ZodMiniEnum<{
|
|
83
83
|
WL: "WL";
|
|
84
84
|
AL: "AL";
|
|
85
85
|
DS: "DS";
|
|
86
86
|
BK: "BK";
|
|
87
87
|
MD: "MD";
|
|
88
88
|
}>;
|
|
89
|
-
name: z.
|
|
90
|
-
linkMobile: z.
|
|
91
|
-
linkPc: z.
|
|
92
|
-
linkIos: z.
|
|
93
|
-
linkAndroid: z.
|
|
94
|
-
schemeIos: z.
|
|
95
|
-
schemeAndroid: z.
|
|
89
|
+
name: z.ZodMiniString<string>;
|
|
90
|
+
linkMobile: z.ZodMiniOptional<z.ZodMiniURL>;
|
|
91
|
+
linkPc: z.ZodMiniOptional<z.ZodMiniURL>;
|
|
92
|
+
linkIos: z.ZodMiniOptional<z.ZodMiniURL>;
|
|
93
|
+
linkAndroid: z.ZodMiniOptional<z.ZodMiniURL>;
|
|
94
|
+
schemeIos: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
95
|
+
schemeAndroid: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
96
96
|
}, z.core.$strip>;
|
|
97
|
-
export declare const AlimTalkTemplateSchema: z.
|
|
98
|
-
id: z.
|
|
99
|
-
code: z.
|
|
100
|
-
name: z.
|
|
101
|
-
content: z.
|
|
102
|
-
variables: z.
|
|
103
|
-
name: z.
|
|
104
|
-
type: z.
|
|
97
|
+
export declare const AlimTalkTemplateSchema: z.ZodMiniObject<{
|
|
98
|
+
id: z.ZodMiniString<string>;
|
|
99
|
+
code: z.ZodMiniString<string>;
|
|
100
|
+
name: z.ZodMiniString<string>;
|
|
101
|
+
content: z.ZodMiniString<string>;
|
|
102
|
+
variables: z.ZodMiniArray<z.ZodMiniObject<{
|
|
103
|
+
name: z.ZodMiniString<string>;
|
|
104
|
+
type: z.ZodMiniEnum<{
|
|
105
105
|
string: "string";
|
|
106
106
|
number: "number";
|
|
107
107
|
date: "date";
|
|
108
108
|
custom: "custom";
|
|
109
109
|
}>;
|
|
110
|
-
required: z.
|
|
111
|
-
maxLength: z.
|
|
112
|
-
format: z.
|
|
113
|
-
description: z.
|
|
114
|
-
example: z.
|
|
110
|
+
required: z.ZodMiniBoolean<boolean>;
|
|
111
|
+
maxLength: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
112
|
+
format: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
113
|
+
description: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
114
|
+
example: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
115
115
|
}, z.core.$strip>>;
|
|
116
|
-
buttons: z.
|
|
117
|
-
type: z.
|
|
116
|
+
buttons: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
117
|
+
type: z.ZodMiniEnum<{
|
|
118
118
|
WL: "WL";
|
|
119
119
|
AL: "AL";
|
|
120
120
|
DS: "DS";
|
|
121
121
|
BK: "BK";
|
|
122
122
|
MD: "MD";
|
|
123
123
|
}>;
|
|
124
|
-
name: z.
|
|
125
|
-
linkMobile: z.
|
|
126
|
-
linkPc: z.
|
|
127
|
-
linkIos: z.
|
|
128
|
-
linkAndroid: z.
|
|
129
|
-
schemeIos: z.
|
|
130
|
-
schemeAndroid: z.
|
|
124
|
+
name: z.ZodMiniString<string>;
|
|
125
|
+
linkMobile: z.ZodMiniOptional<z.ZodMiniURL>;
|
|
126
|
+
linkPc: z.ZodMiniOptional<z.ZodMiniURL>;
|
|
127
|
+
linkIos: z.ZodMiniOptional<z.ZodMiniURL>;
|
|
128
|
+
linkAndroid: z.ZodMiniOptional<z.ZodMiniURL>;
|
|
129
|
+
schemeIos: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
130
|
+
schemeAndroid: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
131
131
|
}, z.core.$strip>>>;
|
|
132
|
-
category: z.
|
|
133
|
-
status: z.
|
|
134
|
-
provider: z.
|
|
135
|
-
metadata: z.
|
|
136
|
-
createdAt: z.
|
|
137
|
-
updatedAt: z.
|
|
138
|
-
approvedAt: z.
|
|
139
|
-
rejectedAt: z.
|
|
140
|
-
rejectionReason: z.
|
|
141
|
-
usage: z.
|
|
142
|
-
sent: z.
|
|
143
|
-
delivered: z.
|
|
144
|
-
failed: z.
|
|
132
|
+
category: z.ZodMiniEnum<typeof TemplateCategory>;
|
|
133
|
+
status: z.ZodMiniEnum<typeof TemplateStatus>;
|
|
134
|
+
provider: z.ZodMiniString<string>;
|
|
135
|
+
metadata: z.ZodMiniObject<{
|
|
136
|
+
createdAt: z.ZodMiniDate<Date>;
|
|
137
|
+
updatedAt: z.ZodMiniDate<Date>;
|
|
138
|
+
approvedAt: z.ZodMiniOptional<z.ZodMiniDate<Date>>;
|
|
139
|
+
rejectedAt: z.ZodMiniOptional<z.ZodMiniDate<Date>>;
|
|
140
|
+
rejectionReason: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
141
|
+
usage: z.ZodMiniObject<{
|
|
142
|
+
sent: z.ZodMiniNumber<number>;
|
|
143
|
+
delivered: z.ZodMiniNumber<number>;
|
|
144
|
+
failed: z.ZodMiniNumber<number>;
|
|
145
145
|
}, z.core.$strip>;
|
|
146
146
|
}, z.core.$strip>;
|
|
147
147
|
}, z.core.$strip>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@k-msg/template",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"packageManager": "bun@1.3.8",
|
|
5
5
|
"description": "AlimTalk template engine for parsing, building and managing templates",
|
|
6
6
|
"type": "module",
|
|
@@ -40,12 +40,14 @@
|
|
|
40
40
|
"build:types": "tsc",
|
|
41
41
|
"dev": "tsc --watch",
|
|
42
42
|
"test": "bun test",
|
|
43
|
+
"test:unit": "bun test --testPathPattern='.*\\.test\\.(ts|js)$' --testTimeout=5000",
|
|
44
|
+
"typecheck": "tsc --noEmit",
|
|
43
45
|
"clean": "rm -rf dist tsconfig.tsbuildinfo",
|
|
44
46
|
"pack": "bun pm pack",
|
|
45
47
|
"publish": "bun publish --access public"
|
|
46
48
|
},
|
|
47
49
|
"dependencies": {
|
|
48
|
-
"@k-msg/core": "0.
|
|
50
|
+
"@k-msg/core": "0.29.0",
|
|
49
51
|
"zod": "^4.0.14"
|
|
50
52
|
},
|
|
51
53
|
"devDependencies": {
|