@opens/gateways 1.16.8 → 1.16.10

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.
@@ -1,160 +0,0 @@
1
- /** Notification type metadata nested in a system notification. */
2
- interface SystemNotificationType {
3
- id: string;
4
- slug: string;
5
- alias: string;
6
- }
7
- /** A system notification catalog entry. */
8
- interface SystemNotification {
9
- id: string;
10
- notificationTypeId: string;
11
- slug: string;
12
- alias: string;
13
- description: string;
14
- type: SystemNotificationType;
15
- }
16
- /** Query parameters for listing system notifications. */
17
- interface GetSystemNotificationsParams {
18
- /** Filters notifications by type slug (e.g. `chat`). */
19
- typeSlug?: string;
20
- /** Filters notifications by type UUID. */
21
- notificationTypeId?: string;
22
- }
23
- /** Response returned when listing system notifications. */
24
- interface GetSystemNotificationsResponse {
25
- items: SystemNotification[];
26
- total: number;
27
- }
28
-
29
- /** Device type metadata nested in a user device. */
30
- interface DeviceType {
31
- id: string;
32
- slug: string;
33
- alias: string;
34
- description?: string;
35
- }
36
- /** A registered user device with its push notification token. */
37
- interface UserDevice {
38
- id: string;
39
- userId: string;
40
- companyId: string;
41
- deviceId: string;
42
- deviceToken: string;
43
- device: DeviceType;
44
- }
45
- /** Query parameters for listing user devices. */
46
- interface GetUserDevicesParams {
47
- /** Filters by device type slug (e.g. `mobile`, `web`). */
48
- deviceSlug?: string;
49
- /** Filters by device type UUID from the catalog. */
50
- deviceId?: string;
51
- /** Filters by a specific device token. */
52
- deviceToken?: string;
53
- /** Maximum number of records returned (1 to 100). Defaults to 50. */
54
- limit?: number;
55
- /** Offset for pagination. Defaults to 0. */
56
- offset?: number;
57
- /** Company ID (used with Service Token). */
58
- companyId?: string;
59
- /** User ID (used with Service Token). */
60
- userId?: string;
61
- }
62
- /** Response returned when listing user devices. */
63
- interface GetUserDevicesResponse {
64
- items: UserDevice[];
65
- total: number;
66
- }
67
- /**
68
- * Request payload for registering a user device.
69
- * Either `deviceSlug` or `deviceId` must be provided.
70
- */
71
- interface RegisterUserDeviceRequest {
72
- /** FCM, APNs or Web Push token of the device. */
73
- deviceToken: string;
74
- /** Device slug (e.g. `mobile`, `web`). Required if `deviceId` is not sent. */
75
- deviceSlug?: string;
76
- /** Device type UUID from the catalog. Required if `deviceSlug` is not sent. */
77
- deviceId?: string;
78
- /** Company ID (used with Service Token). */
79
- companyId?: string;
80
- /** User ID (used with Service Token). */
81
- userId?: string;
82
- }
83
- /** Response returned when registering a user device. */
84
- interface RegisterUserDeviceResponse {
85
- id: string;
86
- deviceSlug: string;
87
- deviceToken: string;
88
- }
89
- /** Response returned when deleting a user device. */
90
- interface DeleteUserDeviceResponse {
91
- isDeleted: boolean;
92
- id: string;
93
- }
94
-
95
- /** Nested user device summary inside a preference. */
96
- interface UserPreferenceDevice {
97
- id: string;
98
- deviceId: string;
99
- deviceToken: string;
100
- device: Pick<DeviceType, 'id' | 'slug' | 'alias'>;
101
- }
102
- /** Nested system notification summary inside a preference. */
103
- interface UserPreferenceSystemNotification {
104
- id: string;
105
- slug: string;
106
- alias: string;
107
- }
108
- /** A user notification preference linked to a physical device. */
109
- interface UserPreference {
110
- id: string;
111
- companyId: string;
112
- userId: string;
113
- userDeviceId: string;
114
- systemNotificationId: string;
115
- userDevice: UserPreferenceDevice;
116
- systemNotification: UserPreferenceSystemNotification;
117
- }
118
- /** Query parameters for listing user preferences. */
119
- interface GetUserPreferencesParams {
120
- /** Company ID (used with Service Token). */
121
- companyId?: string;
122
- /** User ID (used with Service Token). */
123
- userId?: string;
124
- /** Filter by physical device ID (`user_devices.id`). */
125
- userDeviceId?: string;
126
- /** Filter by system notification slug. */
127
- systemNotificationSlug?: string;
128
- /** Filter by system notification UUID. */
129
- systemNotificationId?: string;
130
- }
131
- /**
132
- * Request payload for creating a user preference.
133
- * Either `systemNotificationSlug` or `systemNotificationId` must be provided.
134
- */
135
- interface CreateUserPreferenceRequest {
136
- /** UUID of the physical device registered in `user_devices`. */
137
- userDeviceId: string;
138
- /** System notification slug (e.g. `chat_invitation`). */
139
- systemNotificationSlug?: string;
140
- /** System notification UUID. */
141
- systemNotificationId?: string;
142
- /** Company ID (used with Service Token). */
143
- companyId?: string;
144
- /** User ID (used with Service Token). */
145
- userId?: string;
146
- }
147
- /** Query parameters for deleting a user preference (Service Token context). */
148
- interface DeleteUserPreferenceParams {
149
- /** Company ID (used with Service Token). */
150
- companyId?: string;
151
- /** User ID (used with Service Token). */
152
- userId?: string;
153
- }
154
- /** Response returned when deleting a user preference. */
155
- interface DeleteUserPreferenceResponse {
156
- isDeleted: boolean;
157
- id: string;
158
- }
159
-
160
- export type { CreateUserPreferenceRequest, DeleteUserDeviceResponse, DeleteUserPreferenceParams, DeleteUserPreferenceResponse, DeviceType, GetSystemNotificationsParams, GetSystemNotificationsResponse, GetUserDevicesParams, GetUserDevicesResponse, GetUserPreferencesParams, RegisterUserDeviceRequest, RegisterUserDeviceResponse, SystemNotification, SystemNotificationType, UserDevice, UserPreference, UserPreferenceDevice, UserPreferenceSystemNotification };
@@ -1,160 +0,0 @@
1
- /** Notification type metadata nested in a system notification. */
2
- interface SystemNotificationType {
3
- id: string;
4
- slug: string;
5
- alias: string;
6
- }
7
- /** A system notification catalog entry. */
8
- interface SystemNotification {
9
- id: string;
10
- notificationTypeId: string;
11
- slug: string;
12
- alias: string;
13
- description: string;
14
- type: SystemNotificationType;
15
- }
16
- /** Query parameters for listing system notifications. */
17
- interface GetSystemNotificationsParams {
18
- /** Filters notifications by type slug (e.g. `chat`). */
19
- typeSlug?: string;
20
- /** Filters notifications by type UUID. */
21
- notificationTypeId?: string;
22
- }
23
- /** Response returned when listing system notifications. */
24
- interface GetSystemNotificationsResponse {
25
- items: SystemNotification[];
26
- total: number;
27
- }
28
-
29
- /** Device type metadata nested in a user device. */
30
- interface DeviceType {
31
- id: string;
32
- slug: string;
33
- alias: string;
34
- description?: string;
35
- }
36
- /** A registered user device with its push notification token. */
37
- interface UserDevice {
38
- id: string;
39
- userId: string;
40
- companyId: string;
41
- deviceId: string;
42
- deviceToken: string;
43
- device: DeviceType;
44
- }
45
- /** Query parameters for listing user devices. */
46
- interface GetUserDevicesParams {
47
- /** Filters by device type slug (e.g. `mobile`, `web`). */
48
- deviceSlug?: string;
49
- /** Filters by device type UUID from the catalog. */
50
- deviceId?: string;
51
- /** Filters by a specific device token. */
52
- deviceToken?: string;
53
- /** Maximum number of records returned (1 to 100). Defaults to 50. */
54
- limit?: number;
55
- /** Offset for pagination. Defaults to 0. */
56
- offset?: number;
57
- /** Company ID (used with Service Token). */
58
- companyId?: string;
59
- /** User ID (used with Service Token). */
60
- userId?: string;
61
- }
62
- /** Response returned when listing user devices. */
63
- interface GetUserDevicesResponse {
64
- items: UserDevice[];
65
- total: number;
66
- }
67
- /**
68
- * Request payload for registering a user device.
69
- * Either `deviceSlug` or `deviceId` must be provided.
70
- */
71
- interface RegisterUserDeviceRequest {
72
- /** FCM, APNs or Web Push token of the device. */
73
- deviceToken: string;
74
- /** Device slug (e.g. `mobile`, `web`). Required if `deviceId` is not sent. */
75
- deviceSlug?: string;
76
- /** Device type UUID from the catalog. Required if `deviceSlug` is not sent. */
77
- deviceId?: string;
78
- /** Company ID (used with Service Token). */
79
- companyId?: string;
80
- /** User ID (used with Service Token). */
81
- userId?: string;
82
- }
83
- /** Response returned when registering a user device. */
84
- interface RegisterUserDeviceResponse {
85
- id: string;
86
- deviceSlug: string;
87
- deviceToken: string;
88
- }
89
- /** Response returned when deleting a user device. */
90
- interface DeleteUserDeviceResponse {
91
- isDeleted: boolean;
92
- id: string;
93
- }
94
-
95
- /** Nested user device summary inside a preference. */
96
- interface UserPreferenceDevice {
97
- id: string;
98
- deviceId: string;
99
- deviceToken: string;
100
- device: Pick<DeviceType, 'id' | 'slug' | 'alias'>;
101
- }
102
- /** Nested system notification summary inside a preference. */
103
- interface UserPreferenceSystemNotification {
104
- id: string;
105
- slug: string;
106
- alias: string;
107
- }
108
- /** A user notification preference linked to a physical device. */
109
- interface UserPreference {
110
- id: string;
111
- companyId: string;
112
- userId: string;
113
- userDeviceId: string;
114
- systemNotificationId: string;
115
- userDevice: UserPreferenceDevice;
116
- systemNotification: UserPreferenceSystemNotification;
117
- }
118
- /** Query parameters for listing user preferences. */
119
- interface GetUserPreferencesParams {
120
- /** Company ID (used with Service Token). */
121
- companyId?: string;
122
- /** User ID (used with Service Token). */
123
- userId?: string;
124
- /** Filter by physical device ID (`user_devices.id`). */
125
- userDeviceId?: string;
126
- /** Filter by system notification slug. */
127
- systemNotificationSlug?: string;
128
- /** Filter by system notification UUID. */
129
- systemNotificationId?: string;
130
- }
131
- /**
132
- * Request payload for creating a user preference.
133
- * Either `systemNotificationSlug` or `systemNotificationId` must be provided.
134
- */
135
- interface CreateUserPreferenceRequest {
136
- /** UUID of the physical device registered in `user_devices`. */
137
- userDeviceId: string;
138
- /** System notification slug (e.g. `chat_invitation`). */
139
- systemNotificationSlug?: string;
140
- /** System notification UUID. */
141
- systemNotificationId?: string;
142
- /** Company ID (used with Service Token). */
143
- companyId?: string;
144
- /** User ID (used with Service Token). */
145
- userId?: string;
146
- }
147
- /** Query parameters for deleting a user preference (Service Token context). */
148
- interface DeleteUserPreferenceParams {
149
- /** Company ID (used with Service Token). */
150
- companyId?: string;
151
- /** User ID (used with Service Token). */
152
- userId?: string;
153
- }
154
- /** Response returned when deleting a user preference. */
155
- interface DeleteUserPreferenceResponse {
156
- isDeleted: boolean;
157
- id: string;
158
- }
159
-
160
- export type { CreateUserPreferenceRequest, DeleteUserDeviceResponse, DeleteUserPreferenceParams, DeleteUserPreferenceResponse, DeviceType, GetSystemNotificationsParams, GetSystemNotificationsResponse, GetUserDevicesParams, GetUserDevicesResponse, GetUserPreferencesParams, RegisterUserDeviceRequest, RegisterUserDeviceResponse, SystemNotification, SystemNotificationType, UserDevice, UserPreference, UserPreferenceDevice, UserPreferenceSystemNotification };
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
-
16
- // src/notifications/contracts/index.ts
17
- var contracts_exports = {};
18
- module.exports = __toCommonJS(contracts_exports);
19
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/notifications/contracts/index.ts"],"sourcesContent":["export type {\n SystemNotificationType,\n SystemNotification,\n GetSystemNotificationsParams,\n GetSystemNotificationsResponse,\n} from './system-notification';\n\nexport type {\n DeviceType,\n UserDevice,\n GetUserDevicesParams,\n GetUserDevicesResponse,\n RegisterUserDeviceRequest,\n RegisterUserDeviceResponse,\n DeleteUserDeviceResponse,\n} from './user-device';\n\nexport type {\n UserPreferenceDevice,\n UserPreferenceSystemNotification,\n UserPreference,\n GetUserPreferencesParams,\n CreateUserPreferenceRequest,\n DeleteUserPreferenceParams,\n DeleteUserPreferenceResponse,\n} from './user-preference';\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -1 +0,0 @@
1
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}