@amohamud23/notihub 1.1.7 → 1.1.9
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.cjs +20 -0
- package/dist/index.d.cts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +21 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1190,6 +1190,26 @@ var SubscriptionType = class _SubscriptionType {
|
|
|
1190
1190
|
throw new Error("Could not fetch subscription types by notifierId");
|
|
1191
1191
|
}
|
|
1192
1192
|
}
|
|
1193
|
+
/**
|
|
1194
|
+
* Creates a subscription type.
|
|
1195
|
+
* @param subscriptionType - The subscription type object to create.
|
|
1196
|
+
* @returns A promise that resolves to the created subscription type object.
|
|
1197
|
+
*/
|
|
1198
|
+
static async createSubscriptionType(subscriptionType) {
|
|
1199
|
+
const command = new import_lib_dynamodb10.PutCommand({
|
|
1200
|
+
TableName: _SubscriptionType.TABLE_NAME,
|
|
1201
|
+
Item: {
|
|
1202
|
+
subscriptionType
|
|
1203
|
+
}
|
|
1204
|
+
});
|
|
1205
|
+
try {
|
|
1206
|
+
await ddbDocClient.send(command);
|
|
1207
|
+
return subscriptionType;
|
|
1208
|
+
} catch (error) {
|
|
1209
|
+
console.error("Error creating subscription type:", error);
|
|
1210
|
+
throw new Error("Could not create subscription type");
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1193
1213
|
};
|
|
1194
1214
|
var SubscriptionType_default = SubscriptionType;
|
|
1195
1215
|
|
package/dist/index.d.cts
CHANGED
|
@@ -47,6 +47,7 @@ type INotiHubCustomerMinified = {
|
|
|
47
47
|
id: string;
|
|
48
48
|
name: string;
|
|
49
49
|
username: string;
|
|
50
|
+
customerId: string;
|
|
50
51
|
createdAt: string;
|
|
51
52
|
updatedAt: string;
|
|
52
53
|
};
|
|
@@ -543,6 +544,12 @@ declare class SubscriptionType {
|
|
|
543
544
|
* @returns A promise that resolves to an array of subscription type objects or null if not found.
|
|
544
545
|
*/
|
|
545
546
|
static getSubscriptionTypesByNotifierId(notiTypeId: string): Promise<IUserSubscribeNotifier[] | []>;
|
|
547
|
+
/**
|
|
548
|
+
* Creates a subscription type.
|
|
549
|
+
* @param subscriptionType - The subscription type object to create.
|
|
550
|
+
* @returns A promise that resolves to the created subscription type object.
|
|
551
|
+
*/
|
|
552
|
+
static createSubscriptionType(subscriptionType: IUserSubscribeNotifier): Promise<IUserSubscribeNotifier>;
|
|
546
553
|
}
|
|
547
554
|
|
|
548
555
|
declare class CustomerMetaData {
|
package/dist/index.d.ts
CHANGED
|
@@ -47,6 +47,7 @@ type INotiHubCustomerMinified = {
|
|
|
47
47
|
id: string;
|
|
48
48
|
name: string;
|
|
49
49
|
username: string;
|
|
50
|
+
customerId: string;
|
|
50
51
|
createdAt: string;
|
|
51
52
|
updatedAt: string;
|
|
52
53
|
};
|
|
@@ -543,6 +544,12 @@ declare class SubscriptionType {
|
|
|
543
544
|
* @returns A promise that resolves to an array of subscription type objects or null if not found.
|
|
544
545
|
*/
|
|
545
546
|
static getSubscriptionTypesByNotifierId(notiTypeId: string): Promise<IUserSubscribeNotifier[] | []>;
|
|
547
|
+
/**
|
|
548
|
+
* Creates a subscription type.
|
|
549
|
+
* @param subscriptionType - The subscription type object to create.
|
|
550
|
+
* @returns A promise that resolves to the created subscription type object.
|
|
551
|
+
*/
|
|
552
|
+
static createSubscriptionType(subscriptionType: IUserSubscribeNotifier): Promise<IUserSubscribeNotifier>;
|
|
546
553
|
}
|
|
547
554
|
|
|
548
555
|
declare class CustomerMetaData {
|
package/dist/index.js
CHANGED
|
@@ -1108,6 +1108,7 @@ var Views_default = Views;
|
|
|
1108
1108
|
import {
|
|
1109
1109
|
DeleteCommand as DeleteCommand9,
|
|
1110
1110
|
GetCommand as GetCommand9,
|
|
1111
|
+
PutCommand as PutCommand9,
|
|
1111
1112
|
QueryCommand as QueryCommand9
|
|
1112
1113
|
} from "@aws-sdk/lib-dynamodb";
|
|
1113
1114
|
var SubscriptionType = class _SubscriptionType {
|
|
@@ -1195,6 +1196,26 @@ var SubscriptionType = class _SubscriptionType {
|
|
|
1195
1196
|
throw new Error("Could not fetch subscription types by notifierId");
|
|
1196
1197
|
}
|
|
1197
1198
|
}
|
|
1199
|
+
/**
|
|
1200
|
+
* Creates a subscription type.
|
|
1201
|
+
* @param subscriptionType - The subscription type object to create.
|
|
1202
|
+
* @returns A promise that resolves to the created subscription type object.
|
|
1203
|
+
*/
|
|
1204
|
+
static async createSubscriptionType(subscriptionType) {
|
|
1205
|
+
const command = new PutCommand9({
|
|
1206
|
+
TableName: _SubscriptionType.TABLE_NAME,
|
|
1207
|
+
Item: {
|
|
1208
|
+
subscriptionType
|
|
1209
|
+
}
|
|
1210
|
+
});
|
|
1211
|
+
try {
|
|
1212
|
+
await ddbDocClient.send(command);
|
|
1213
|
+
return subscriptionType;
|
|
1214
|
+
} catch (error) {
|
|
1215
|
+
console.error("Error creating subscription type:", error);
|
|
1216
|
+
throw new Error("Could not create subscription type");
|
|
1217
|
+
}
|
|
1218
|
+
}
|
|
1198
1219
|
};
|
|
1199
1220
|
var SubscriptionType_default = SubscriptionType;
|
|
1200
1221
|
|