@k-msg/template 0.29.7 → 0.29.8

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.
@@ -22,55 +22,13 @@ export declare enum TemplateStatus {
22
22
  REJECTED = "REJECTED",// 반려됨
23
23
  DISABLED = "DISABLED"
24
24
  }
25
- export interface TemplateVariable {
26
- name: string;
27
- type: "string" | "number" | "date" | "custom";
28
- required: boolean;
29
- maxLength?: number;
30
- format?: string;
31
- description?: string;
32
- example?: string;
33
- }
34
- export interface TemplateButton {
35
- type: "WL" | "AL" | "DS" | "BK" | "MD";
36
- name: string;
37
- linkMobile?: string;
38
- linkPc?: string;
39
- linkIos?: string;
40
- linkAndroid?: string;
41
- schemeIos?: string;
42
- schemeAndroid?: string;
43
- }
44
- export interface AlimTalkTemplate {
45
- id: string;
46
- code: string;
47
- name: string;
48
- content: string;
49
- variables?: TemplateVariable[];
50
- buttons?: TemplateButton[];
51
- category: TemplateCategory;
52
- status: TemplateStatus;
53
- provider: string;
54
- metadata: {
55
- createdAt: Date;
56
- updatedAt: Date;
57
- approvedAt?: Date;
58
- rejectedAt?: Date;
59
- rejectionReason?: string;
60
- usage: {
61
- sent: number;
62
- delivered: number;
63
- failed: number;
64
- };
65
- };
66
- }
67
25
  export declare const TemplateVariableSchema: z.ZodMiniObject<{
68
26
  name: z.ZodMiniString<string>;
69
27
  type: z.ZodMiniEnum<{
70
- string: "string";
71
- number: "number";
72
- date: "date";
73
28
  custom: "custom";
29
+ date: "date";
30
+ number: "number";
31
+ string: "string";
74
32
  }>;
75
33
  required: z.ZodMiniBoolean<boolean>;
76
34
  maxLength: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
@@ -80,11 +38,11 @@ export declare const TemplateVariableSchema: z.ZodMiniObject<{
80
38
  }, z.core.$strip>;
81
39
  export declare const TemplateButtonSchema: z.ZodMiniObject<{
82
40
  type: z.ZodMiniEnum<{
83
- WL: "WL";
84
41
  AL: "AL";
85
- DS: "DS";
86
42
  BK: "BK";
43
+ DS: "DS";
87
44
  MD: "MD";
45
+ WL: "WL";
88
46
  }>;
89
47
  name: z.ZodMiniString<string>;
90
48
  linkMobile: z.ZodMiniOptional<z.ZodMiniURL>;
@@ -99,27 +57,27 @@ export declare const AlimTalkTemplateSchema: z.ZodMiniObject<{
99
57
  code: z.ZodMiniString<string>;
100
58
  name: z.ZodMiniString<string>;
101
59
  content: z.ZodMiniString<string>;
102
- variables: z.ZodMiniArray<z.ZodMiniObject<{
60
+ variables: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
103
61
  name: z.ZodMiniString<string>;
104
62
  type: z.ZodMiniEnum<{
105
- string: "string";
106
- number: "number";
107
- date: "date";
108
63
  custom: "custom";
64
+ date: "date";
65
+ number: "number";
66
+ string: "string";
109
67
  }>;
110
68
  required: z.ZodMiniBoolean<boolean>;
111
69
  maxLength: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
112
70
  format: z.ZodMiniOptional<z.ZodMiniString<string>>;
113
71
  description: z.ZodMiniOptional<z.ZodMiniString<string>>;
114
72
  example: z.ZodMiniOptional<z.ZodMiniString<string>>;
115
- }, z.core.$strip>>;
73
+ }, z.core.$strip>>>;
116
74
  buttons: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
117
75
  type: z.ZodMiniEnum<{
118
- WL: "WL";
119
76
  AL: "AL";
120
- DS: "DS";
121
77
  BK: "BK";
78
+ DS: "DS";
122
79
  MD: "MD";
80
+ WL: "WL";
123
81
  }>;
124
82
  name: z.ZodMiniString<string>;
125
83
  linkMobile: z.ZodMiniOptional<z.ZodMiniURL>;
@@ -145,6 +103,9 @@ export declare const AlimTalkTemplateSchema: z.ZodMiniObject<{
145
103
  }, z.core.$strip>;
146
104
  }, z.core.$strip>;
147
105
  }, z.core.$strip>;
148
- export type AlimTalkTemplateType = z.infer<typeof AlimTalkTemplateSchema>;
149
- export type TemplateVariableType = z.infer<typeof TemplateVariableSchema>;
150
- export type TemplateButtonType = z.infer<typeof TemplateButtonSchema>;
106
+ export type TemplateVariable = z.infer<typeof TemplateVariableSchema>;
107
+ export type TemplateButton = z.infer<typeof TemplateButtonSchema>;
108
+ export type AlimTalkTemplate = z.infer<typeof AlimTalkTemplateSchema>;
109
+ export type AlimTalkTemplateType = AlimTalkTemplate;
110
+ export type TemplateVariableType = TemplateVariable;
111
+ export type TemplateButtonType = TemplateButton;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@k-msg/template",
3
- "version": "0.29.7",
4
- "packageManager": "bun@1.3.11",
3
+ "version": "0.29.8",
4
+ "packageManager": "bun@1.3.13",
5
5
  "description": "AlimTalk template engine for parsing, building and managing templates",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
@@ -41,17 +41,18 @@
41
41
  "dev": "tsc --watch",
42
42
  "test": "bun test",
43
43
  "test:unit": "bun test --testPathPattern='.*\\.test\\.(ts|js)$' --testTimeout=5000",
44
- "typecheck": "tsc --noEmit",
44
+ "typecheck": "ttsc --noEmit",
45
45
  "clean": "rm -rf dist tsconfig.tsbuildinfo",
46
46
  "pack": "bun pm pack",
47
47
  "publish": "bun publish --access public"
48
48
  },
49
49
  "dependencies": {
50
- "@k-msg/core": "0.29.7",
51
- "zod": "^4.0.14"
50
+ "@k-msg/core": "0.29.8",
51
+ "zod": "^4.4.3"
52
52
  },
53
53
  "devDependencies": {
54
- "typescript": "^6.0.3",
54
+ "ttsc": "^0.18.1",
55
+ "typescript": "^7.0.2",
55
56
  "@types/bun": "^1.3.14"
56
57
  },
57
58
  "keywords": [