@opexa/portal-sdk 0.24.0 → 0.25.0
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 +32 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +32 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1769,6 +1769,11 @@ var MARK_ALL_MESSAGE_AS_READ_MUTATION = gql`
|
|
|
1769
1769
|
markAllMessageAsRead
|
|
1770
1770
|
}
|
|
1771
1771
|
`;
|
|
1772
|
+
var MARK_ALL_MESSAGES_AS_READ_MUTATION = gql`
|
|
1773
|
+
mutation MarkAllMessagesAsRead {
|
|
1774
|
+
markAllMessagesAsRead
|
|
1775
|
+
}
|
|
1776
|
+
`;
|
|
1772
1777
|
var CLAIM_REWARD_MUTATION = gql`
|
|
1773
1778
|
mutation ClaimReward($id: ObjectId!) {
|
|
1774
1779
|
claimReward(id: $id) {
|
|
@@ -3166,6 +3171,9 @@ var TriggerService = class {
|
|
|
3166
3171
|
ok: true
|
|
3167
3172
|
};
|
|
3168
3173
|
}
|
|
3174
|
+
/**
|
|
3175
|
+
* @deprecated
|
|
3176
|
+
*/
|
|
3169
3177
|
async markAllMessageAsRead() {
|
|
3170
3178
|
const res = await this.client.request(
|
|
3171
3179
|
MARK_ALL_MESSAGE_AS_READ_MUTATION
|
|
@@ -3184,6 +3192,24 @@ var TriggerService = class {
|
|
|
3184
3192
|
ok: true
|
|
3185
3193
|
};
|
|
3186
3194
|
}
|
|
3195
|
+
async markAllMessagesAsRead() {
|
|
3196
|
+
const res = await this.client.request(
|
|
3197
|
+
MARK_ALL_MESSAGES_AS_READ_MUTATION
|
|
3198
|
+
);
|
|
3199
|
+
if (!res.ok) return res;
|
|
3200
|
+
if (!res.data.markAllMessagesAsRead) {
|
|
3201
|
+
return {
|
|
3202
|
+
ok: false,
|
|
3203
|
+
error: {
|
|
3204
|
+
name: "UnknownError",
|
|
3205
|
+
message: "Something went wrong."
|
|
3206
|
+
}
|
|
3207
|
+
};
|
|
3208
|
+
}
|
|
3209
|
+
return {
|
|
3210
|
+
ok: true
|
|
3211
|
+
};
|
|
3212
|
+
}
|
|
3187
3213
|
async claimReward(variables) {
|
|
3188
3214
|
const res = await this.client.request(
|
|
3189
3215
|
CLAIM_REWARD_MUTATION,
|
|
@@ -6823,9 +6849,15 @@ var Sdk = class {
|
|
|
6823
6849
|
async markMessageAsRead(id) {
|
|
6824
6850
|
return await this.triggerService.markMessageAsRead({ id });
|
|
6825
6851
|
}
|
|
6852
|
+
/**
|
|
6853
|
+
* @deprecated
|
|
6854
|
+
*/
|
|
6826
6855
|
async markAllMessageAsRead() {
|
|
6827
6856
|
return await this.triggerService.markAllMessageAsRead();
|
|
6828
6857
|
}
|
|
6858
|
+
async markAllMessagesAsRead() {
|
|
6859
|
+
return await this.triggerService.markAllMessagesAsRead();
|
|
6860
|
+
}
|
|
6829
6861
|
async claimReward(id) {
|
|
6830
6862
|
return await this.triggerService.claimReward({ id });
|
|
6831
6863
|
}
|