Skip to content

Commit 3688d48

Browse files
Merge pull request #45 from Palbahngmiyine/impr/kakao-v2
Release SOLAPI Node.js SDK 5.1.1
2 parents a2b226b + f9ff113 commit 3688d48

16 files changed

Lines changed: 5027 additions & 2526 deletions

.gitignore

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,12 @@ package-lock.json
66
dist
77
.parcel-cache
88
yarn-error.log
9-
debug
9+
debug
10+
11+
.yarn/*
12+
!.yarn/patches
13+
!.yarn/releases
14+
!.yarn/plugins
15+
!.yarn/sdks
16+
!.yarn/versions
17+
.pnp.*

.yarn/releases/yarn-3.2.3.cjs

Lines changed: 783 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
nodeLinker: node-modules
2+
3+
yarnPath: .yarn/releases/yarn-3.2.3.cjs

package.json

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "solapi",
3-
"version": "5.1.1-beta.1",
3+
"version": "5.1.1",
44
"description": "SOLAPI SDK for Node.js(Server Side Only)",
55
"repository": {
66
"type": "git",
@@ -30,7 +30,7 @@
3030
"homepage": "https://solapi.github.io/solapi-nodejs",
3131
"scripts": {
3232
"clean": "rimraf dist",
33-
"compress": "yarn uglifyjs --v8 -- ./dist/index.js -o ./dist/index.js && yarn uglifyjs --v8 -- ./dist/module.js -o ./dist/module.js",
33+
"compress": "yarn uglifyjs -o ./dist/index.js ./dist/index.js && yarn uglifyjs -o ./dist/module.js ./dist/module.js",
3434
"build": "yarn clean && parcel build --no-source-maps && yarn compress",
3535
"watch": "parcel watch",
3636
"docs": "typedoc --entryPointStrategy expand ./src"
@@ -41,29 +41,31 @@
4141
"dependencies": {
4242
"cross-fetch": "^3.1.5",
4343
"crypto-js": "^4.1.1",
44-
"date-fns": "^2.28.0",
44+
"date-fns": "^2.29.3",
4545
"image-to-base64": "^2.2.0",
46-
"nanoid": "^3.3.4"
46+
"nanoid": "^3.3.4",
47+
"qs": "^6.11.0"
4748
},
4849
"devDependencies": {
49-
"@parcel/packager-ts": "^2.6.0",
50-
"@parcel/transformer-typescript-tsc": "^2.6.0",
51-
"@parcel/transformer-typescript-types": "^2.6.0",
50+
"@parcel/packager-ts": "2.7.0",
51+
"@parcel/transformer-typescript-types": "2.7.0",
5252
"@types/crypto-js": "^4.1.1",
5353
"@types/image-to-base64": "^2.1.0",
54-
"@types/node": "^17.0.42",
55-
"@typescript-eslint/eslint-plugin": "^5.27.1",
56-
"@typescript-eslint/parser": "^5.27.1",
57-
"eslint": "^8.17.0",
58-
"eslint-plugin-tsdoc": "^0.2.16",
59-
"parcel": "^2.6.0",
54+
"@types/node": "^18.7.18",
55+
"@types/qs": "^6.9.7",
56+
"@typescript-eslint/eslint-plugin": "^5.38.0",
57+
"@typescript-eslint/parser": "^5.38.0",
58+
"eslint": "^8.23.1",
59+
"eslint-plugin-tsdoc": "^0.2.17",
60+
"parcel": "^2.7.0",
6061
"querystring-es3": "^0.2.1",
6162
"rimraf": "^3.0.2",
62-
"typedoc": "^0.22.17",
63-
"typescript": "^4.7.3",
64-
"uglify-js": "^3.16.0"
63+
"typedoc": "^0.23.15",
64+
"typescript": "^4.7.4",
65+
"uglify-js": "^3.17.2"
6566
},
6667
"files": [
6768
"/dist"
68-
]
69-
}
69+
],
70+
"packageManager": "yarn@3.2.3"
71+
}

src/lib/authenticator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {customAlphabet} from 'nanoid';
22
import {formatISO} from 'date-fns';
33
import {HmacSHA256} from 'crypto-js';
4-
import {ApiKeyError} from '../errors/DefaultError';
4+
import {ApiKeyError} from '../errors/defaultError';
55

66
enum AuthenticateType {
77
API_KEY

src/lib/defaultFetcher.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import getAuthInfo, {AuthenticationParameter} from './authenticator';
22
import fetch from 'cross-fetch';
3-
import {DefaultError, ErrorResponse} from '../errors/DefaultError';
3+
import {DefaultError, ErrorResponse} from '../errors/defaultError';
44

55
type DefaultRequest = {
66
url: string,

src/lib/queryParameterGenerator.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
import {URL, URLSearchParams} from 'url';
22

3+
/**
4+
* @deprecated
5+
* @param url API URl
6+
* @param data object data
7+
*/
38
export default function queryParameterGenerator<T extends object>(url: string, data?: T): string {
49
const apiUrl = new URL(url);
510
if (data) {

src/lib/stringDateTrasnfer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {parseISO} from 'date-fns';
2-
import {InvalidDateError} from '../errors/DefaultError';
2+
import {InvalidDateError} from '../errors/defaultError';
33

44
/**
55
* 일반 문자열 날짜가 있을 경우 Date 타입으로 변환해주는 함수

src/models/kakao/kakaoAlimtalkTemplate.ts

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,17 @@ export class KakaoAlimtalkTemplate {
3838
/**
3939
* 카카오 비즈니스 채널 ID
4040
*/
41-
pfId: string;
41+
channelId: string | null;
4242

4343
/**
4444
* 카카오 비즈니스 채널 그룹 ID
4545
*/
46-
pfGroupId?: string | null;
46+
channelGroupId: string | null;
47+
48+
/**
49+
* 알림톡 템플릿 내용
50+
*/
51+
content: string;
4752

4853
/**
4954
* 알림톡 템플릿 숨김 여부
@@ -64,25 +69,25 @@ export class KakaoAlimtalkTemplate {
6469
* 부가정보
6570
* 메시지 유형이 "부가정보형"또는 "복합형"일 경우 필수
6671
*/
67-
extra?: string | null;
72+
extra: string | null;
6873

6974
/**
7075
* 간단 광고 문구
7176
* 메시지 유형이 "광고추가형"또는 "복합형"일 경우 필수
7277
*/
73-
ad?: string | null;
78+
ad: string | null;
7479

7580
/**
7681
* 강조표기 핵심문구 (변수사용가능, emphasizeType이 TEXT일 경우 필수 값)
7782
* 템플릿 내용에 강조표기할 핵심문구가 동일하게 포함되어 있어야합니다.
7883
*/
79-
emphasizeTitle?: string | null;
84+
emphasizeTitle: string | null;
8085

8186
/**
8287
* 강조표기 보조문구(emphasizeType이 TEXT일 경우 필수 값)
8388
* 템플릿 내용에 강조표기할 보조문구가 동일하게 포함되어 있어야합니다.
8489
*/
85-
emphasizeSubtitle?: string | null;
90+
emphasizeSubtitle: string | null;
8691

8792
/**
8893
* PC 노출 여부
@@ -93,30 +98,30 @@ export class KakaoAlimtalkTemplate {
9398
/**
9499
* 템플릿에 사용되는 이미지 ID
95100
*/
96-
imageId?: string | null;
101+
imageId: string | null;
97102

98103
/**
99104
* 카카오 알림톡 템플릿 그룹 유형
100105
*/
101-
assignType?: KakaoAlimtalkTemplateAssignType = 'CHANNEL';
106+
assignType: KakaoAlimtalkTemplateAssignType = 'CHANNEL';
102107

103108
/**
104109
* 카카오 알림톡 템플릿 버튼 목록
105110
*/
106-
buttons?: Array<KakaoButton>;
111+
buttons: Array<KakaoButton>;
107112

108113
/**
109114
* 카카오 알림톡 템플릿 상태 현황목록
110115
*/
111-
codes?: Array<KakaoAlimtalkTemplateCodeType>;
116+
codes: Array<KakaoAlimtalkTemplateCodeType>;
112117

113118
/**
114119
* 알림톡 템플릿 생성일자
115120
*/
116-
dateCreated?: string;
121+
dateCreated: string;
117122

118123
/**
119124
* 알림톡 템플릿 수정일자
120125
*/
121-
dateUpdated?: string;
126+
dateUpdated: string;
122127
}

0 commit comments

Comments
 (0)