@rivascva/dt-idl 1.1.150 → 1.1.152
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.d.ts +37 -0
- package/go/utils/context.go +7 -0
- package/package.json +1 -1
- package/services/dt-user-service.yaml +31 -0
- package/ts/services/dt-user-service.ts +37 -0
package/dist/index.d.ts
CHANGED
|
@@ -1327,6 +1327,23 @@ interface paths$1 {
|
|
|
1327
1327
|
patch?: never;
|
|
1328
1328
|
trace?: never;
|
|
1329
1329
|
};
|
|
1330
|
+
"/users/{userId}/device/fcm-token/{fcmToken}": {
|
|
1331
|
+
parameters: {
|
|
1332
|
+
query?: never;
|
|
1333
|
+
header?: never;
|
|
1334
|
+
path?: never;
|
|
1335
|
+
cookie?: never;
|
|
1336
|
+
};
|
|
1337
|
+
get?: never;
|
|
1338
|
+
put?: never;
|
|
1339
|
+
post?: never;
|
|
1340
|
+
/** @description Delete the user device FCM token */
|
|
1341
|
+
delete: operations$1["deleteUserDeviceFCMToken"];
|
|
1342
|
+
options?: never;
|
|
1343
|
+
head?: never;
|
|
1344
|
+
patch?: never;
|
|
1345
|
+
trace?: never;
|
|
1346
|
+
};
|
|
1330
1347
|
"/notifications/push/send": {
|
|
1331
1348
|
parameters: {
|
|
1332
1349
|
query?: never;
|
|
@@ -1744,6 +1761,26 @@ interface operations$1 {
|
|
|
1744
1761
|
500: components$1["responses"]["InternalServerError"];
|
|
1745
1762
|
};
|
|
1746
1763
|
};
|
|
1764
|
+
deleteUserDeviceFCMToken: {
|
|
1765
|
+
parameters: {
|
|
1766
|
+
query?: never;
|
|
1767
|
+
header?: never;
|
|
1768
|
+
path: {
|
|
1769
|
+
/** @description The user id */
|
|
1770
|
+
userId: string;
|
|
1771
|
+
/** @description The FCM token */
|
|
1772
|
+
fcmToken: string;
|
|
1773
|
+
};
|
|
1774
|
+
cookie?: never;
|
|
1775
|
+
};
|
|
1776
|
+
requestBody?: never;
|
|
1777
|
+
responses: {
|
|
1778
|
+
204: components$1["responses"]["NoContent"];
|
|
1779
|
+
400: components$1["responses"]["BadRequest"];
|
|
1780
|
+
404: components$1["responses"]["NotFound"];
|
|
1781
|
+
500: components$1["responses"]["InternalServerError"];
|
|
1782
|
+
};
|
|
1783
|
+
};
|
|
1747
1784
|
sendPushNotification: {
|
|
1748
1785
|
parameters: {
|
|
1749
1786
|
query?: never;
|
package/go/utils/context.go
CHANGED
|
@@ -4,6 +4,7 @@ import (
|
|
|
4
4
|
"context"
|
|
5
5
|
"errors"
|
|
6
6
|
"fmt"
|
|
7
|
+
"time"
|
|
7
8
|
|
|
8
9
|
"github.com/RivasCVA/dt-idl/go/models"
|
|
9
10
|
"github.com/golang-jwt/jwt/v5"
|
|
@@ -83,3 +84,9 @@ func GetRequestIdFromContext(ctx context.Context) (string, error) {
|
|
|
83
84
|
}
|
|
84
85
|
return requestId, nil
|
|
85
86
|
}
|
|
87
|
+
|
|
88
|
+
// DetachContext returns a new context that ignores the parent context Done channel but still allows access to the parent context values.
|
|
89
|
+
// The new context will be canceled after the given timeout or when the context cancel function is called.
|
|
90
|
+
func DetachContext(ctx context.Context, timeout time.Duration) (context.Context, context.CancelFunc) {
|
|
91
|
+
return context.WithTimeout(context.WithoutCancel(ctx), timeout)
|
|
92
|
+
}
|
package/package.json
CHANGED
|
@@ -234,6 +234,37 @@ paths:
|
|
|
234
234
|
500:
|
|
235
235
|
$ref: '#/components/responses/InternalServerError'
|
|
236
236
|
|
|
237
|
+
/users/{userId}/device/fcm-token/{fcmToken}:
|
|
238
|
+
delete:
|
|
239
|
+
description: Delete the user device FCM token
|
|
240
|
+
operationId: deleteUserDeviceFCMToken
|
|
241
|
+
tags:
|
|
242
|
+
- Users
|
|
243
|
+
parameters:
|
|
244
|
+
- in: path
|
|
245
|
+
name: userId
|
|
246
|
+
description: The user id
|
|
247
|
+
required: true
|
|
248
|
+
schema:
|
|
249
|
+
type: string
|
|
250
|
+
example: 123456
|
|
251
|
+
- in: path
|
|
252
|
+
name: fcmToken
|
|
253
|
+
description: The FCM token
|
|
254
|
+
required: true
|
|
255
|
+
schema:
|
|
256
|
+
type: string
|
|
257
|
+
example: 123abc
|
|
258
|
+
responses:
|
|
259
|
+
204:
|
|
260
|
+
$ref: '#/components/responses/NoContent'
|
|
261
|
+
400:
|
|
262
|
+
$ref: '#/components/responses/BadRequest'
|
|
263
|
+
404:
|
|
264
|
+
$ref: '#/components/responses/NotFound'
|
|
265
|
+
500:
|
|
266
|
+
$ref: '#/components/responses/InternalServerError'
|
|
267
|
+
|
|
237
268
|
/notifications/push/send:
|
|
238
269
|
post:
|
|
239
270
|
description: Send a push notification
|
|
@@ -125,6 +125,23 @@ export interface paths {
|
|
|
125
125
|
patch?: never;
|
|
126
126
|
trace?: never;
|
|
127
127
|
};
|
|
128
|
+
"/users/{userId}/device/fcm-token/{fcmToken}": {
|
|
129
|
+
parameters: {
|
|
130
|
+
query?: never;
|
|
131
|
+
header?: never;
|
|
132
|
+
path?: never;
|
|
133
|
+
cookie?: never;
|
|
134
|
+
};
|
|
135
|
+
get?: never;
|
|
136
|
+
put?: never;
|
|
137
|
+
post?: never;
|
|
138
|
+
/** @description Delete the user device FCM token */
|
|
139
|
+
delete: operations["deleteUserDeviceFCMToken"];
|
|
140
|
+
options?: never;
|
|
141
|
+
head?: never;
|
|
142
|
+
patch?: never;
|
|
143
|
+
trace?: never;
|
|
144
|
+
};
|
|
128
145
|
"/notifications/push/send": {
|
|
129
146
|
parameters: {
|
|
130
147
|
query?: never;
|
|
@@ -544,6 +561,26 @@ export interface operations {
|
|
|
544
561
|
500: components["responses"]["InternalServerError"];
|
|
545
562
|
};
|
|
546
563
|
};
|
|
564
|
+
deleteUserDeviceFCMToken: {
|
|
565
|
+
parameters: {
|
|
566
|
+
query?: never;
|
|
567
|
+
header?: never;
|
|
568
|
+
path: {
|
|
569
|
+
/** @description The user id */
|
|
570
|
+
userId: string;
|
|
571
|
+
/** @description The FCM token */
|
|
572
|
+
fcmToken: string;
|
|
573
|
+
};
|
|
574
|
+
cookie?: never;
|
|
575
|
+
};
|
|
576
|
+
requestBody?: never;
|
|
577
|
+
responses: {
|
|
578
|
+
204: components["responses"]["NoContent"];
|
|
579
|
+
400: components["responses"]["BadRequest"];
|
|
580
|
+
404: components["responses"]["NotFound"];
|
|
581
|
+
500: components["responses"]["InternalServerError"];
|
|
582
|
+
};
|
|
583
|
+
};
|
|
547
584
|
sendPushNotification: {
|
|
548
585
|
parameters: {
|
|
549
586
|
query?: never;
|