@@ -19,12 +19,14 @@ export class Sms {
19
19
headers : {
20
20
'X-SIM-KEY' : this . key ,
21
21
'X-SIM-PASSWORD' : this . password ,
22
+ 'X-SIM-VERSION' : '2.2.2' ,
23
+ 'X-SIM-PLATFORM' : 'TYPESCRIPT' ,
22
24
}
23
25
} ) ;
24
26
}
25
27
26
28
/*
27
- https://docs.simpay.pl/typescript/?typescript#sms-pobieranie-listy-uslug
29
+ https://docs.simpay.pl/pl/ typescript/?typescript#sms-pobieranie-listy-uslug
28
30
*/
29
31
async getServices ( ) : Promise < SmsService [ ] > {
30
32
const result = [ ] ;
@@ -66,7 +68,7 @@ export class Sms {
66
68
}
67
69
68
70
/*
69
- https://docs.simpay.pl/typescript/?typescript#sms-pobieranie-informacji-o-usludze
71
+ https://docs.simpay.pl/pl/ typescript/?typescript#sms-pobieranie-informacji-o-usludze
70
72
*/
71
73
async getService ( id : number ) : Promise < SmsService | undefined > {
72
74
const service = ( await this . client . get ( `/${ id } ` ) ) . data . data ;
@@ -77,7 +79,7 @@ export class Sms {
77
79
}
78
80
79
81
/*
80
- https://docs.simpay.pl/typescript/?typescript#sms-pobieranie-listy-transakcji
82
+ https://docs.simpay.pl/pl/ typescript/?typescript#sms-pobieranie-listy-transakcji
81
83
*/
82
84
async getTransactions ( serviceId : number ) : Promise < SmsTransaction [ ] > {
83
85
const result = [ ] ;
@@ -119,7 +121,7 @@ export class Sms {
119
121
}
120
122
121
123
/*
122
- https://docs.simpay.pl/typescript/?typescript#sms-pobieranie-informacji-o-transakcji
124
+ https://docs.simpay.pl/pl/ typescript/?typescript#sms-pobieranie-informacji-o-transakcji
123
125
*/
124
126
async getTransaction ( serviceId : number , transactionId : number ) : Promise < SmsTransaction | undefined > {
125
127
const transaction = ( await this . client . get ( `/${ serviceId } /transactions/${ transactionId } ` ) ) . data . data ;
@@ -130,7 +132,7 @@ export class Sms {
130
132
}
131
133
132
134
/*
133
- https://docs.simpay.pl/typescript/?typescript#sms-pobieranie-dostepnych-numerow-dla-uslugi
135
+ https://docs.simpay.pl/pl/ typescript/?typescript#sms-pobieranie-dostepnych-numerow-dla-uslugi
134
136
*/
135
137
async getServiceNumbers ( serviceId : number ) : Promise < SmsNumber [ ] > {
136
138
const result = [ ] ;
@@ -160,14 +162,14 @@ export class Sms {
160
162
}
161
163
162
164
/*
163
- https://docs.simpay.pl/typescript/?typescript#sms-informacji-o-pojedynczym-numerze-uslugi
165
+ https://docs.simpay.pl/pl/ typescript/?typescript#sms-informacji-o-pojedynczym-numerze-uslugi
164
166
*/
165
167
async getServiceNumber ( serviceId : number , number : number ) : Promise < SmsNumber > {
166
168
return ( await this . client . get ( `/${ serviceId } /numbers/${ number } ` ) ) . data . data ;
167
169
}
168
170
169
171
/*
170
- https://docs.simpay.pl/typescript/?typescript#sms-pobieranie-wszystkich-dostepnych-numerow
172
+ https://docs.simpay.pl/pl/ typescript/?typescript#sms-pobieranie-wszystkich-dostepnych-numerow
171
173
*/
172
174
async getNumbers ( ) : Promise < SmsNumber [ ] > {
173
175
const result = [ ] ;
@@ -197,14 +199,14 @@ export class Sms {
197
199
}
198
200
199
201
/*
200
- https://docs.simpay.pl/typescript/?typescript#sms-pobieranie-pojedynczego-numeru-sms
202
+ https://docs.simpay.pl/pl/ typescript/?typescript#sms-pobieranie-pojedynczego-numeru-sms
201
203
*/
202
204
async getNumber ( number : number ) : Promise < SmsNumber | undefined > {
203
205
return ( await this . client . get ( `/numbers/${ number } ` ) ) . data . data ;
204
206
}
205
207
206
208
/*
207
- https://docs.simpay.pl/typescript/?typescript#sms-weryfikacja-poprawnosci-kodu
209
+ https://docs.simpay.pl/pl/ typescript/?typescript#sms-weryfikacja-poprawnosci-kodu
208
210
*/
209
211
async verifySmsCode ( serviceId : number , code : string , number ?: number ) : Promise < VerificationResponse | undefined > {
210
212
const response = ( await this . client . post ( `/${ serviceId } ` , { code, number } ) ) . data . data ;
0 commit comments