Skip to content

Commit 020d92c

Browse files
authored
Merge branch 'main' into dependabot/npm_and_yarn/sindresorhus/tsconfig-9.0.0
2 parents 0ca9310 + be589d9 commit 020d92c

2 files changed

Lines changed: 117 additions & 52 deletions

File tree

‎package.json‎

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,34 @@
33
"version": "0.0.4",
44
"description": "Client for the httpSMS API",
55
"license": "MIT",
6-
"funding": "https://github.com/sponsors/NdoleStudio",
76
"repository": "https://github.com/NdoleStudio/httpsms-node",
8-
"author": {
9-
"name": "Arnold Ewin Acho",
10-
"email": "arnold@ndolestudio.com",
11-
"url": "https://acho.arnold.cm"
12-
},
7+
"funding": "https://github.com/sponsors/NdoleStudio",
8+
"author": "Arnold Ewin Acho <arnold@ndolestudio.com> (https://acho.arnold.cm)",
139
"type": "module",
1410
"exports": {
1511
"types": "./dist/index.d.ts",
1612
"default": "./dist/index.js"
1713
},
1814
"types": "./dist/index.d.ts",
15+
"sideEffects": false,
1916
"engines": {
2017
"node": ">=22"
2118
},
2219
"scripts": {
23-
"test": "xo --env=node && npm run build && mocha -r ts-node/register 'tests/**/*.js'",
20+
"test": "xo --env=node && npm run build && mocha -r ts-node/register \"tests/**/*.js\"",
2421
"build": "del-cli dist && tsc",
2522
"prepack": "npm run build"
2623
},
2724
"files": [
2825
"dist"
2926
],
3027
"keywords": [
31-
"httpsms"
28+
"sms"
3229
],
30+
"dependencies": {
31+
"@types/node": "^26.0.1",
32+
"axios": "^1.6.5"
33+
},
3334
"devDependencies": {
3435
"@sindresorhus/tsconfig": "^9.0.0",
3536
"@types/chai": "^5.0.0",
@@ -42,10 +43,6 @@
4243
"tsd": "^0.33.0",
4344
"xo": "^5.0.1"
4445
},
45-
"dependencies": {
46-
"@types/node": "^26.0.1",
47-
"axios": "^1.6.5"
48-
},
4946
"prettier": {
5047
"trailingComma": "all",
5148
"tabWidth": 4,
@@ -54,15 +51,23 @@
5451
"arrowParens": "avoid",
5552
"singleQuote": true
5653
},
57-
"xo": {
58-
"rules": {
59-
"n/file-extension-in-import": 0,
60-
"jsdoc/require-asterisk-prefix": 0,
61-
"unicorn/prefer-uint8array-base64": 0,
62-
"@typescript-eslint/no-unsafe-return": 0,
63-
"@typescript-eslint/no-unsafe-call": 0,
64-
"@typescript-eslint/no-unsafe-member-access": 0,
65-
"@typescript-eslint/no-unsafe-assignment": 0
54+
"xo": [
55+
{
56+
"rules": {
57+
"n/file-extension-in-import": 0,
58+
"jsdoc/require-asterisk-prefix": 0,
59+
"unicorn/prefer-uint8array-base64": 0,
60+
"@typescript-eslint/no-unsafe-return": 0,
61+
"@typescript-eslint/no-unsafe-call": 0,
62+
"@typescript-eslint/no-unsafe-member-access": 0,
63+
"@typescript-eslint/no-unsafe-assignment": 0
64+
}
65+
},
66+
{
67+
"files": ["package.json"],
68+
"rules": {
69+
"package-json/prefer-exports": 0
70+
}
6671
}
67-
}
72+
]
6873
}

‎src/models.ts‎

Lines changed: 90 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
export type MessageSendRequest = {
2-
/** @example "This is a sample text message" */
2+
/**
3+
@example "This is a sample text message"
4+
*/
35
content: string;
4-
/** @example "+18005550199" */
6+
/**
7+
@example "+18005550199"
8+
*/
59
from: string;
6-
/** @example "+18005550100" */
10+
/**
11+
@example "+18005550100"
12+
*/
713
to: string;
814
/**
915
* The request_id field is an optional parameter used to track a request from the client's perspective
@@ -25,9 +31,13 @@ export type MessageSendRequest = {
2531

2632
export type MessageResponse = {
2733
data: Message;
28-
/** @example "message added to queue" */
34+
/**
35+
@example "message added to queue"
36+
*/
2937
message: string;
30-
/** @example "success" */
38+
/**
39+
@example "success"
40+
*/
3141
status: string;
3242
};
3343

@@ -37,52 +47,94 @@ export enum Sim {
3747
}
3848

3949
export type Message = {
40-
/** @example false */
50+
/**
51+
@example false
52+
*/
4153
can_be_polled: boolean;
42-
/** @example "+18005550100" */
54+
/**
55+
@example "+18005550100"
56+
*/
4357
contact: string;
44-
/** @example "This is a sample text message" */
58+
/**
59+
@example "This is a sample text message"
60+
*/
4561
content: string;
46-
/** @example false */
62+
/**
63+
@example false
64+
*/
4765
encrypted: boolean;
48-
/** @example "2022-06-05T14:26:02.302718+03:00" */
66+
/**
67+
@example "2022-06-05T14:26:02.302718+03:00"
68+
*/
4969
created_at: string;
50-
/** @example "2022-06-05T14:26:09.527976+03:00" */
70+
/**
71+
@example "2022-06-05T14:26:09.527976+03:00"
72+
*/
5173
delivered_at: string;
52-
/** @example "2022-06-05T14:26:09.527976+03:00" */
74+
/**
75+
@example "2022-06-05T14:26:09.527976+03:00"
76+
*/
5377
expired_at: string;
54-
/** @example "2022-06-05T14:26:09.527976+03:00" */
78+
/**
79+
@example "2022-06-05T14:26:09.527976+03:00"
80+
*/
5581
failed_at: string;
56-
/** @example "UNKNOWN" */
82+
/**
83+
@example "UNKNOWN"
84+
*/
5785
failure_reason: string;
58-
/** @example "32343a19-da5e-4b1b-a767-3298a73703cb" */
86+
/**
87+
@example "32343a19-da5e-4b1b-a767-3298a73703cb"
88+
*/
5989
id: string;
60-
/** @example "2022-06-05T14:26:09.527976+03:00" */
90+
/**
91+
@example "2022-06-05T14:26:09.527976+03:00"
92+
*/
6193
last_attempted_at: string;
62-
/** @example 1 */
94+
/**
95+
@example 1
96+
*/
6397
max_send_attempts: number;
64-
/** @example "2022-06-05T14:26:09.527976+03:00" */
98+
/**
99+
@example "2022-06-05T14:26:09.527976+03:00"
100+
*/
65101
order_timestamp: string;
66-
/** @example "+18005550199" */
102+
/**
103+
@example "+18005550199"
104+
*/
67105
owner: string;
68-
/** @example "2022-06-05T14:26:09.527976+03:00" */
106+
/**
107+
@example "2022-06-05T14:26:09.527976+03:00"
108+
*/
69109
received_at: string;
70-
/** @example "153554b5-ae44-44a0-8f4f-7bbac5657ad4" */
110+
/**
111+
@example "153554b5-ae44-44a0-8f4f-7bbac5657ad4"
112+
*/
71113
request_id: string;
72-
/** @example "2022-06-05T14:26:01.520828+03:00" */
114+
/**
115+
@example "2022-06-05T14:26:01.520828+03:00"
116+
*/
73117
request_received_at: string;
74-
/** @example "2022-06-05T14:26:09.527976+03:00" */
118+
/**
119+
@example "2022-06-05T14:26:09.527976+03:00"
120+
*/
75121
scheduled_at: string;
76-
/** @example "2022-06-05T14:26:09.527976+03:00" */
122+
/**
123+
@example "2022-06-05T14:26:09.527976+03:00"
124+
*/
77125
scheduled_send_time: string;
78-
/** @example 0 */
126+
/**
127+
@example 0
128+
*/
79129
send_attempt_count: number;
80130
/**
81131
* SendDuration is the number of nanoseconds from when the request was received until when the mobile phone send the message
82132
* @example 133414
83133
*/
84134
send_time: number;
85-
/** @example "2022-06-05T14:26:09.527976+03:00" */
135+
/**
136+
@example "2022-06-05T14:26:09.527976+03:00"
137+
*/
86138
sent_at: string;
87139
/**
88140
* SIM is the SIM card to use to send the message
@@ -92,12 +144,20 @@ export type Message = {
92144
* @example "DEFAULT"
93145
*/
94146
sim: Sim;
95-
/** @example "pending" */
147+
/**
148+
@example "pending"
149+
*/
96150
status: string;
97-
/** @example "mobile-terminated" */
151+
/**
152+
@example "mobile-terminated"
153+
*/
98154
type: string;
99-
/** @example "2022-06-05T14:26:10.303278+03:00" */
155+
/**
156+
@example "2022-06-05T14:26:10.303278+03:00"
157+
*/
100158
updated_at: string;
101-
/** @example "WB7DRDWrJZRGbYrv2CKGkqbzvqdC" */
159+
/**
160+
@example "WB7DRDWrJZRGbYrv2CKGkqbzvqdC"
161+
*/
102162
user_id: string;
103163
};

0 commit comments

Comments
 (0)