m2m-components 3.3.0 → 3.3.1-alpha-aef9a40.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.
Files changed (306) hide show
  1. package/MenuBaseElement.d.mts +24 -0
  2. package/MenuBaseElement.d.ts +12 -8
  3. package/MenuBaseElement.js +177 -102
  4. package/MenuBaseElement.js.map +1 -1
  5. package/MenuBaseElement.mjs +9 -0
  6. package/MenuBaseElement.mjs.map +1 -0
  7. package/{cjs/storage/lib/hub.js → chunk-2X6HV5XJ.mjs} +21 -40
  8. package/chunk-2X6HV5XJ.mjs.map +1 -0
  9. package/chunk-3YQYBFME.mjs +102 -0
  10. package/chunk-3YQYBFME.mjs.map +1 -0
  11. package/chunk-5FHEMJGG.mjs +97 -0
  12. package/chunk-5FHEMJGG.mjs.map +1 -0
  13. package/{cjs/domains.js → chunk-B7STDXYN.mjs} +8 -8
  14. package/chunk-B7STDXYN.mjs.map +1 -0
  15. package/chunk-BFPL6AIR.mjs +74 -0
  16. package/chunk-BFPL6AIR.mjs.map +1 -0
  17. package/chunk-CB56CZRA.mjs +8491 -0
  18. package/chunk-CB56CZRA.mjs.map +1 -0
  19. package/chunk-CEBJL6ZD.mjs +22 -0
  20. package/chunk-CEBJL6ZD.mjs.map +1 -0
  21. package/{cjs/endpoints/matsuri-forms.v1.js → chunk-DYNNGZMQ.mjs} +94 -185
  22. package/chunk-DYNNGZMQ.mjs.map +1 -0
  23. package/chunk-FDRD4YS4.mjs +34 -0
  24. package/chunk-FDRD4YS4.mjs.map +1 -0
  25. package/{cjs/endpoints/m2m-users.v1.js → chunk-GMPQV5TL.mjs} +136 -267
  26. package/chunk-GMPQV5TL.mjs.map +1 -0
  27. package/chunk-H66U7VZB.mjs +9 -0
  28. package/chunk-H66U7VZB.mjs.map +1 -0
  29. package/chunk-IH72EYIB.mjs +9 -0
  30. package/chunk-IH72EYIB.mjs.map +1 -0
  31. package/chunk-IOZIVEOV.mjs +2 -0
  32. package/chunk-IOZIVEOV.mjs.map +1 -0
  33. package/{cjs/endpoints/m2m-notifications.v1.js → chunk-ISOF65DB.mjs} +42 -63
  34. package/chunk-ISOF65DB.mjs.map +1 -0
  35. package/chunk-JUBOAWNR.mjs +61 -0
  36. package/chunk-JUBOAWNR.mjs.map +1 -0
  37. package/chunk-LDSJ6KYP.mjs +28 -0
  38. package/chunk-LDSJ6KYP.mjs.map +1 -0
  39. package/chunk-LYVJL4T5.mjs +78 -0
  40. package/chunk-LYVJL4T5.mjs.map +1 -0
  41. package/chunk-M4ZBTA6A.mjs +19 -0
  42. package/chunk-M4ZBTA6A.mjs.map +1 -0
  43. package/chunk-NO6ZGO5P.mjs +17 -0
  44. package/chunk-NO6ZGO5P.mjs.map +1 -0
  45. package/chunk-UCJSCAN5.mjs +45 -0
  46. package/chunk-UCJSCAN5.mjs.map +1 -0
  47. package/chunk-UM6FAKR4.mjs +152 -0
  48. package/chunk-UM6FAKR4.mjs.map +1 -0
  49. package/{cjs/storage/lib/client.js → chunk-UOPEIK22.mjs} +45 -50
  50. package/chunk-UOPEIK22.mjs.map +1 -0
  51. package/chunk-V4ROE7DI.mjs +54 -0
  52. package/chunk-V4ROE7DI.mjs.map +1 -0
  53. package/chunk-VNCVFELM.mjs +83 -0
  54. package/chunk-VNCVFELM.mjs.map +1 -0
  55. package/chunk-YUHXVW6K.mjs +2 -0
  56. package/chunk-YUHXVW6K.mjs.map +1 -0
  57. package/domains.d.mts +11 -0
  58. package/domains.d.ts +3 -2
  59. package/domains.js +31 -1
  60. package/domains.js.map +1 -1
  61. package/domains.mjs +9 -0
  62. package/domains.mjs.map +1 -0
  63. package/endpoints/m2m-notifications.d.mts +7 -0
  64. package/endpoints/m2m-notifications.d.ts +5 -3
  65. package/endpoints/m2m-notifications.js +129 -4
  66. package/endpoints/m2m-notifications.js.map +1 -1
  67. package/endpoints/m2m-notifications.mjs +12 -0
  68. package/endpoints/m2m-notifications.mjs.map +1 -0
  69. package/endpoints/m2m-notifications.v1.d.mts +1 -0
  70. package/endpoints/m2m-notifications.v1.d.ts +1 -51
  71. package/endpoints/m2m-notifications.v1.js +95 -102
  72. package/endpoints/m2m-notifications.v1.js.map +1 -1
  73. package/endpoints/m2m-notifications.v1.mjs +23 -0
  74. package/endpoints/m2m-notifications.v1.mjs.map +1 -0
  75. package/endpoints/m2m-users.d.mts +7 -0
  76. package/endpoints/m2m-users.d.ts +5 -3
  77. package/endpoints/m2m-users.js +407 -4
  78. package/endpoints/m2m-users.js.map +1 -1
  79. package/endpoints/m2m-users.mjs +12 -0
  80. package/endpoints/m2m-users.mjs.map +1 -0
  81. package/endpoints/m2m-users.v1.d.mts +1 -0
  82. package/endpoints/m2m-users.v1.d.ts +1 -221
  83. package/endpoints/m2m-users.v1.js +327 -475
  84. package/endpoints/m2m-users.v1.js.map +1 -1
  85. package/endpoints/m2m-users.v1.mjs +69 -0
  86. package/endpoints/m2m-users.v1.mjs.map +1 -0
  87. package/endpoints/matsuri-forms.d.mts +7 -0
  88. package/endpoints/matsuri-forms.d.ts +5 -3
  89. package/endpoints/matsuri-forms.js +291 -4
  90. package/endpoints/matsuri-forms.js.map +1 -1
  91. package/endpoints/matsuri-forms.mjs +12 -0
  92. package/endpoints/matsuri-forms.mjs.map +1 -0
  93. package/endpoints/matsuri-forms.v1.d.mts +1 -0
  94. package/endpoints/matsuri-forms.v1.d.ts +1 -177
  95. package/endpoints/matsuri-forms.v1.js +231 -332
  96. package/endpoints/matsuri-forms.v1.js.map +1 -1
  97. package/endpoints/matsuri-forms.v1.mjs +49 -0
  98. package/endpoints/matsuri-forms.v1.mjs.map +1 -0
  99. package/feedback/MultipleTextQuestion.d.mts +6 -0
  100. package/feedback/MultipleTextQuestion.d.ts +6 -3
  101. package/feedback/MultipleTextQuestion.js +43 -10
  102. package/feedback/MultipleTextQuestion.js.map +1 -1
  103. package/feedback/MultipleTextQuestion.mjs +9 -0
  104. package/feedback/MultipleTextQuestion.mjs.map +1 -0
  105. package/feedback/SelectQuestion.d.mts +6 -0
  106. package/feedback/SelectQuestion.d.ts +6 -3
  107. package/feedback/SelectQuestion.js +55 -18
  108. package/feedback/SelectQuestion.js.map +1 -1
  109. package/feedback/SelectQuestion.mjs +9 -0
  110. package/feedback/SelectQuestion.mjs.map +1 -0
  111. package/feedback/getRandomId.d.mts +6 -0
  112. package/feedback/getRandomId.d.ts +3 -2
  113. package/feedback/getRandomId.js +31 -4
  114. package/feedback/getRandomId.js.map +1 -1
  115. package/feedback/getRandomId.mjs +9 -0
  116. package/feedback/getRandomId.mjs.map +1 -0
  117. package/feedback/index.d.mts +15 -0
  118. package/feedback/index.d.ts +7 -5
  119. package/feedback/index.js +8558 -166
  120. package/feedback/index.js.map +1 -1
  121. package/feedback/index.mjs +13 -0
  122. package/feedback/index.mjs.map +1 -0
  123. package/global.d.d.mts +4 -0
  124. package/global.d.d.ts +4 -0
  125. package/global.d.js +20 -0
  126. package/global.d.js.map +1 -0
  127. package/global.d.mjs +2 -0
  128. package/global.d.mjs.map +1 -0
  129. package/index.d.mts +6 -0
  130. package/index.d.ts +6 -9
  131. package/index.js +421 -8
  132. package/index.js.map +1 -1
  133. package/index.mjs +23 -0
  134. package/index.mjs.map +1 -0
  135. package/initM2mComponents.d.mts +7 -0
  136. package/initM2mComponents.d.ts +3 -6
  137. package/initM2mComponents.js +242 -3
  138. package/initM2mComponents.js.map +1 -1
  139. package/initM2mComponents.mjs +11 -0
  140. package/initM2mComponents.mjs.map +1 -0
  141. package/m2m-apps-menu.d.mts +16 -0
  142. package/m2m-apps-menu.d.ts +10 -5
  143. package/m2m-apps-menu.js +265 -43
  144. package/m2m-apps-menu.js.map +1 -1
  145. package/m2m-apps-menu.mjs +11 -0
  146. package/m2m-apps-menu.mjs.map +1 -0
  147. package/m2m-notifications.v1-0186835d.d.ts +73 -0
  148. package/m2m-user-menu.d.mts +17 -0
  149. package/m2m-user-menu.d.ts +10 -5
  150. package/m2m-user-menu.js +327 -53
  151. package/m2m-user-menu.js.map +1 -1
  152. package/m2m-user-menu.mjs +13 -0
  153. package/m2m-user-menu.mjs.map +1 -0
  154. package/m2m-users.v1-c78c72cf.d.ts +289 -0
  155. package/matsuri-forms.v1-0ffee104.d.ts +225 -0
  156. package/notification/NotificationProvider.d.mts +18 -0
  157. package/notification/NotificationProvider.d.ts +10 -7
  158. package/notification/NotificationProvider.js +185 -51
  159. package/notification/NotificationProvider.js.map +1 -1
  160. package/notification/NotificationProvider.mjs +15 -0
  161. package/notification/NotificationProvider.mjs.map +1 -0
  162. package/notification/ServiceIdProvider.d.mts +10 -0
  163. package/notification/ServiceIdProvider.d.ts +8 -5
  164. package/notification/ServiceIdProvider.js +56 -18
  165. package/notification/ServiceIdProvider.js.map +1 -1
  166. package/notification/ServiceIdProvider.mjs +11 -0
  167. package/notification/ServiceIdProvider.mjs.map +1 -0
  168. package/notification/api.d.mts +7 -0
  169. package/notification/api.d.ts +7 -5
  170. package/notification/api.js +157 -59
  171. package/notification/api.js.map +1 -1
  172. package/notification/api.mjs +14 -0
  173. package/notification/api.mjs.map +1 -0
  174. package/notification/domain.d.mts +24 -0
  175. package/notification/domain.d.ts +6 -5
  176. package/notification/domain.js +19 -1
  177. package/notification/domain.js.map +1 -1
  178. package/notification/domain.mjs +3 -0
  179. package/notification/domain.mjs.map +1 -0
  180. package/notification/index.d.mts +6 -0
  181. package/notification/index.d.ts +6 -5
  182. package/notification/index.js +271 -4
  183. package/notification/index.js.map +1 -1
  184. package/notification/index.mjs +30 -0
  185. package/notification/index.mjs.map +1 -0
  186. package/package.json +43 -103
  187. package/releases/m2m-releases-link.d.mts +11 -0
  188. package/releases/m2m-releases-link.d.ts +9 -5
  189. package/releases/m2m-releases-link.js +97 -54
  190. package/releases/m2m-releases-link.js.map +1 -1
  191. package/releases/m2m-releases-link.mjs +69 -0
  192. package/releases/m2m-releases-link.mjs.map +1 -0
  193. package/releases/t.d.mts +3 -0
  194. package/releases/t.d.ts +3 -2
  195. package/releases/t.js +31 -1
  196. package/releases/t.js.map +1 -1
  197. package/releases/t.mjs +9 -0
  198. package/releases/t.mjs.map +1 -0
  199. package/storage/client.d.mts +20 -0
  200. package/storage/client.d.ts +8 -6
  201. package/storage/client.js +260 -85
  202. package/storage/client.js.map +1 -1
  203. package/storage/client.mjs +14 -0
  204. package/storage/client.mjs.map +1 -0
  205. package/storage/hub.d.mts +9 -0
  206. package/storage/hub.d.ts +6 -4
  207. package/storage/hub.js +120 -7
  208. package/storage/hub.js.map +1 -1
  209. package/storage/hub.mjs +10 -0
  210. package/storage/hub.mjs.map +1 -0
  211. package/storage/lib/client.d.mts +27 -0
  212. package/storage/lib/client.d.ts +4 -5
  213. package/storage/lib/client.js +76 -57
  214. package/storage/lib/client.js.map +1 -1
  215. package/storage/lib/client.mjs +9 -0
  216. package/storage/lib/client.mjs.map +1 -0
  217. package/storage/lib/hub.d.mts +15 -0
  218. package/storage/lib/hub.d.ts +4 -4
  219. package/storage/lib/hub.js +57 -46
  220. package/storage/lib/hub.js.map +1 -1
  221. package/storage/lib/hub.mjs +9 -0
  222. package/storage/lib/hub.mjs.map +1 -0
  223. package/storage/useM2mAuth.d.mts +25 -0
  224. package/storage/useM2mAuth.d.ts +10 -8
  225. package/storage/useM2mAuth.js +184 -74
  226. package/storage/useM2mAuth.js.map +1 -1
  227. package/storage/useM2mAuth.mjs +14 -0
  228. package/storage/useM2mAuth.mjs.map +1 -0
  229. package/storage/useM2mAuth.test.d.mts +2 -0
  230. package/storage/useM2mAuth.test.d.ts +2 -0
  231. package/storage/useM2mAuth.test.js +60906 -0
  232. package/storage/useM2mAuth.test.js.map +1 -0
  233. package/storage/useM2mAuth.test.mjs +60682 -0
  234. package/storage/useM2mAuth.test.mjs.map +1 -0
  235. package/cjs/MenuBaseElement.js +0 -207
  236. package/cjs/MenuBaseElement.js.map +0 -1
  237. package/cjs/domains.js.map +0 -1
  238. package/cjs/endpoints/m2m-notifications.js +0 -15
  239. package/cjs/endpoints/m2m-notifications.js.map +0 -1
  240. package/cjs/endpoints/m2m-notifications.v1.js.map +0 -1
  241. package/cjs/endpoints/m2m-users.js +0 -15
  242. package/cjs/endpoints/m2m-users.js.map +0 -1
  243. package/cjs/endpoints/m2m-users.v1.js.map +0 -1
  244. package/cjs/endpoints/matsuri-forms.js +0 -15
  245. package/cjs/endpoints/matsuri-forms.js.map +0 -1
  246. package/cjs/endpoints/matsuri-forms.v1.js.map +0 -1
  247. package/cjs/feedback/MultipleTextQuestion.js +0 -19
  248. package/cjs/feedback/MultipleTextQuestion.js.map +0 -1
  249. package/cjs/feedback/SelectQuestion.js +0 -27
  250. package/cjs/feedback/SelectQuestion.js.map +0 -1
  251. package/cjs/feedback/getRandomId.js +0 -12
  252. package/cjs/feedback/getRandomId.js.map +0 -1
  253. package/cjs/feedback/index.js +0 -185
  254. package/cjs/feedback/index.js.map +0 -1
  255. package/cjs/index.js +0 -11
  256. package/cjs/index.js.map +0 -1
  257. package/cjs/initM2mComponents.js +0 -17
  258. package/cjs/initM2mComponents.js.map +0 -1
  259. package/cjs/m2m-apps-menu.js +0 -95
  260. package/cjs/m2m-apps-menu.js.map +0 -1
  261. package/cjs/m2m-user-menu.js +0 -91
  262. package/cjs/m2m-user-menu.js.map +0 -1
  263. package/cjs/notification/NotificationProvider.js +0 -84
  264. package/cjs/notification/NotificationProvider.js.map +0 -1
  265. package/cjs/notification/ServiceIdProvider.js +0 -33
  266. package/cjs/notification/ServiceIdProvider.js.map +0 -1
  267. package/cjs/notification/api.js +0 -55
  268. package/cjs/notification/api.js.map +0 -1
  269. package/cjs/notification/domain.js +0 -6
  270. package/cjs/notification/domain.js.map +0 -1
  271. package/cjs/notification/index.js +0 -50
  272. package/cjs/notification/index.js.map +0 -1
  273. package/cjs/releases/m2m-releases-link.js +0 -99
  274. package/cjs/releases/m2m-releases-link.js.map +0 -1
  275. package/cjs/releases/t.js +0 -8
  276. package/cjs/releases/t.js.map +0 -1
  277. package/cjs/storage/client.js +0 -89
  278. package/cjs/storage/client.js.map +0 -1
  279. package/cjs/storage/hub.js +0 -19
  280. package/cjs/storage/hub.js.map +0 -1
  281. package/cjs/storage/lib/client.js.map +0 -1
  282. package/cjs/storage/lib/hub.js.map +0 -1
  283. package/cjs/storage/useM2mAuth.js +0 -97
  284. package/cjs/storage/useM2mAuth.js.map +0 -1
  285. package/endpoints/m2m-notifications.d.ts.map +0 -1
  286. package/endpoints/m2m-notifications.v1.d.ts.map +0 -1
  287. package/endpoints/m2m-users.d.ts.map +0 -1
  288. package/endpoints/m2m-users.v1.d.ts.map +0 -1
  289. package/endpoints/matsuri-forms.d.ts.map +0 -1
  290. package/endpoints/matsuri-forms.v1.d.ts.map +0 -1
  291. package/feedback/MultipleTextQuestion.d.ts.map +0 -1
  292. package/feedback/SelectQuestion.d.ts.map +0 -1
  293. package/feedback/getRandomId.d.ts.map +0 -1
  294. package/feedback/index.d.ts.map +0 -1
  295. package/notification/NotificationProvider.d.ts.map +0 -1
  296. package/notification/ServiceIdProvider.d.ts.map +0 -1
  297. package/notification/api.d.ts.map +0 -1
  298. package/notification/domain.d.ts.map +0 -1
  299. package/notification/index.d.ts.map +0 -1
  300. package/releases/m2m-releases-link.d.ts.map +0 -1
  301. package/releases/t.d.ts.map +0 -1
  302. package/storage/client.d.ts.map +0 -1
  303. package/storage/hub.d.ts.map +0 -1
  304. package/storage/lib/client.d.ts.map +0 -1
  305. package/storage/lib/hub.d.ts.map +0 -1
  306. package/storage/useM2mAuth.d.ts.map +0 -1
@@ -1,66 +1,164 @@
1
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
5
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
6
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
7
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
8
- import { fetcher } from "matsuri-hooks";
9
- import { m2mNotifications_v1 } from "../endpoints/m2m-notifications.v1";
10
- export var requestUpdateNotificationStatusToRead = /*#__PURE__*/function () {
11
- var _ref = _asyncToGenerator(function* (token, id) {
12
- yield fetcher(m2mNotifications_v1.updateNotificationStatus({
1
+ 'use client'
2
+ "use strict";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/notification/api.ts
22
+ var api_exports = {};
23
+ __export(api_exports, {
24
+ requestSubscribe: () => requestSubscribe,
25
+ requestUnSubscribe: () => requestUnSubscribe,
26
+ requestUpdateNotificationStatusToRead: () => requestUpdateNotificationStatusToRead
27
+ });
28
+ module.exports = __toCommonJS(api_exports);
29
+ var import_matsuri_hooks = require("matsuri-hooks");
30
+
31
+ // src/endpoints/m2m-notifications.v1.ts
32
+ var root = () => {
33
+ let __root = "";
34
+ if (globalThis.M2M_COMPONENTS_ENV === "local") {
35
+ __root = "";
36
+ }
37
+ if (globalThis.M2M_COMPONENTS_ENV === "localDev") {
38
+ __root = "";
39
+ }
40
+ if (globalThis.M2M_COMPONENTS_ENV === "development") {
41
+ __root = "https://api-notifications.dev.m2msystems.cloud";
42
+ }
43
+ if (globalThis.M2M_COMPONENTS_ENV === "production") {
44
+ __root = "https://api-notifications.m2msystems.cloud";
45
+ }
46
+ return __root;
47
+ };
48
+ var healthCheck = () => {
49
+ const __root = root();
50
+ const __queries = Object.entries({}).filter(([_, value]) => {
51
+ return value !== void 0;
52
+ }).map(([key, value]) => {
53
+ return `${key}=${value}`;
54
+ }).join("&");
55
+ const __path = `${__root}/${`health_check`}`;
56
+ return __queries ? `${__path}?${__queries}` : __path;
57
+ };
58
+ var registerNotification = () => {
59
+ const __root = root();
60
+ const __queries = Object.entries({}).filter(([_, value]) => {
61
+ return value !== void 0;
62
+ }).map(([key, value]) => {
63
+ return `${key}=${value}`;
64
+ }).join("&");
65
+ const __path = `${__root}/${`notifications`}`;
66
+ return __queries ? `${__path}?${__queries}` : __path;
67
+ };
68
+ var findNotificationsByServiceId = ({ id }) => {
69
+ const __root = root();
70
+ const __queries = Object.entries({}).filter(([_, value]) => {
71
+ return value !== void 0;
72
+ }).map(([key, value]) => {
73
+ return `${key}=${value}`;
74
+ }).join("&");
75
+ const __path = `${__root}/${`notifications/by_service_id/${id}`}`;
76
+ return __queries ? `${__path}?${__queries}` : __path;
77
+ };
78
+ var updateNotificationStatus = ({ id }) => {
79
+ const __root = root();
80
+ const __queries = Object.entries({}).filter(([_, value]) => {
81
+ return value !== void 0;
82
+ }).map(([key, value]) => {
83
+ return `${key}=${value}`;
84
+ }).join("&");
85
+ const __path = `${__root}/${`notifications/${id}`}`;
86
+ return __queries ? `${__path}?${__queries}` : __path;
87
+ };
88
+ var saveSubscription = () => {
89
+ const __root = root();
90
+ const __queries = Object.entries({}).filter(([_, value]) => {
91
+ return value !== void 0;
92
+ }).map(([key, value]) => {
93
+ return `${key}=${value}`;
94
+ }).join("&");
95
+ const __path = `${__root}/${`subscriptions`}`;
96
+ return __queries ? `${__path}?${__queries}` : __path;
97
+ };
98
+ var findMySubscriptions = () => {
99
+ const __root = root();
100
+ const __queries = Object.entries({}).filter(([_, value]) => {
101
+ return value !== void 0;
102
+ }).map(([key, value]) => {
103
+ return `${key}=${value}`;
104
+ }).join("&");
105
+ const __path = `${__root}/${`subscriptions`}`;
106
+ return __queries ? `${__path}?${__queries}` : __path;
107
+ };
108
+ var m2mNotifications_v1 = {
109
+ healthCheck,
110
+ registerNotification,
111
+ findNotificationsByServiceId,
112
+ updateNotificationStatus,
113
+ saveSubscription,
114
+ findMySubscriptions
115
+ };
116
+
117
+ // src/notification/api.ts
118
+ var requestUpdateNotificationStatusToRead = async (token, id) => {
119
+ await (0, import_matsuri_hooks.fetcher)(
120
+ m2mNotifications_v1.updateNotificationStatus({
13
121
  id
14
- }), {
122
+ }),
123
+ {
15
124
  method: "PUT",
16
125
  token,
17
- body: JSON.stringify({
18
- status: "read"
19
- })
20
- });
21
- });
22
- return function requestUpdateNotificationStatusToRead(_x, _x2) {
23
- return _ref.apply(this, arguments);
24
- };
25
- }();
26
- export var requestSubscribe = /*#__PURE__*/function () {
27
- var _ref2 = _asyncToGenerator(function* (token, serviceId, input) {
28
- var {
29
- error
30
- } = yield fetcher(m2mNotifications_v1.saveSubscription(), {
31
- method: "POST",
32
- token,
33
- body: JSON.stringify(_objectSpread(_objectSpread({}, input), {}, {
34
- serviceId,
35
- status: "subscribed"
36
- }))
37
- });
38
- if (error) {
39
- console.error(error);
126
+ body: JSON.stringify({ status: "read" })
40
127
  }
128
+ );
129
+ };
130
+ var requestSubscribe = async (token, serviceId, input) => {
131
+ const { error } = await (0, import_matsuri_hooks.fetcher)(m2mNotifications_v1.saveSubscription(), {
132
+ method: "POST",
133
+ token,
134
+ body: JSON.stringify({
135
+ ...input,
136
+ serviceId,
137
+ status: "subscribed"
138
+ })
41
139
  });
42
- return function requestSubscribe(_x3, _x4, _x5) {
43
- return _ref2.apply(this, arguments);
44
- };
45
- }();
46
- export var requestUnSubscribe = /*#__PURE__*/function () {
47
- var _ref3 = _asyncToGenerator(function* (token, serviceId, input) {
48
- var {
49
- error
50
- } = yield fetcher(m2mNotifications_v1.saveSubscription(), {
51
- method: "POST",
52
- token,
53
- body: JSON.stringify(_objectSpread(_objectSpread({}, input), {}, {
54
- serviceId,
55
- status: "denied"
56
- }))
57
- });
58
- if (error) {
59
- console.error(error);
60
- }
140
+ if (error) {
141
+ console.error(error);
142
+ }
143
+ };
144
+ var requestUnSubscribe = async (token, serviceId, input) => {
145
+ const { error } = await (0, import_matsuri_hooks.fetcher)(m2mNotifications_v1.saveSubscription(), {
146
+ method: "POST",
147
+ token,
148
+ body: JSON.stringify({
149
+ ...input,
150
+ serviceId,
151
+ status: "denied"
152
+ })
61
153
  });
62
- return function requestUnSubscribe(_x6, _x7, _x8) {
63
- return _ref3.apply(this, arguments);
64
- };
65
- }();
154
+ if (error) {
155
+ console.error(error);
156
+ }
157
+ };
158
+ // Annotate the CommonJS export names for ESM import in node:
159
+ 0 && (module.exports = {
160
+ requestSubscribe,
161
+ requestUnSubscribe,
162
+ requestUpdateNotificationStatusToRead
163
+ });
66
164
  //# sourceMappingURL=api.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"api.js","names":["fetcher","m2mNotifications_v1","requestUpdateNotificationStatusToRead","_ref","_asyncToGenerator","token","id","updateNotificationStatus","method","body","JSON","stringify","status","_x","_x2","apply","arguments","requestSubscribe","_ref2","serviceId","input","error","saveSubscription","_objectSpread","console","_x3","_x4","_x5","requestUnSubscribe","_ref3","_x6","_x7","_x8"],"sources":["../src/notification/api.ts"],"sourcesContent":["import { fetcher } from \"matsuri-hooks\";\nimport { m2mNotifications_v1 } from \"../endpoints/m2m-notifications.v1\";\nimport { Subscription } from \"./domain\";\n\nexport const requestUpdateNotificationStatusToRead = async (\n token: string,\n id: string\n) => {\n await fetcher(\n m2mNotifications_v1.updateNotificationStatus({\n id,\n }),\n {\n method: \"PUT\",\n token,\n body: JSON.stringify({ status: \"read\" }),\n }\n );\n};\n\nexport const requestSubscribe = async (\n token: string,\n serviceId: string,\n input: Pick<Subscription, \"notificationType\" | \"resourceSubscription\">\n) => {\n const { error } = await fetcher(m2mNotifications_v1.saveSubscription(), {\n method: \"POST\",\n token,\n body: JSON.stringify({\n ...input,\n serviceId,\n status: \"subscribed\",\n }),\n });\n if (error) {\n console.error(error);\n }\n};\n\nexport const requestUnSubscribe = async (\n token: string,\n serviceId: string,\n input: Pick<Subscription, \"notificationType\" | \"resourceSubscription\">\n) => {\n const { error } = await fetcher(m2mNotifications_v1.saveSubscription(), {\n method: \"POST\",\n token,\n body: JSON.stringify({\n ...input,\n serviceId,\n status: \"denied\",\n }),\n });\n if (error) {\n console.error(error);\n }\n};\n"],"mappings":";;;;;;;AAAA,SAASA,OAAO,QAAQ,eAAe;AACvC,SAASC,mBAAmB,QAAQ,mCAAmC;AAGvE,OAAO,IAAMC,qCAAqC;EAAA,IAAAC,IAAA,GAAAC,iBAAA,CAAG,WAC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,SAAS,CAAAY,aAAA,CAAAA,aAAA,KACfH,KAAK;QACRD,SAAS;QACTP,MAAM,EAAE;MAAQ,EACjB;IACH,CAAC,CAAC;IACF,IAAIS,KAAK,EAAE;MACTG,OAAO,CAACH,KAAK,CAACA,KAAK,CAAC;IACtB;EACF,CAAC;EAAA,gBAjBYO,kBAAkBA,CAAAE,GAAA,EAAAC,GAAA,EAAAC,GAAA;IAAA,OAAAH,KAAA,CAAAd,KAAA,OAAAC,SAAA;EAAA;AAAA,GAiB9B"}
1
+ {"version":3,"sources":["../../src/notification/api.ts","../../src/endpoints/m2m-notifications.v1.ts"],"sourcesContent":["import { Subscription } from \"./domain\";\nimport { fetcher } from \"matsuri-hooks\";\nimport { m2mNotifications_v1 } from \"../endpoints/m2m-notifications.v1\";\n\nexport const requestUpdateNotificationStatusToRead = async (\n token: string,\n id: string\n) => {\n await fetcher(\n m2mNotifications_v1.updateNotificationStatus({\n id,\n }),\n {\n method: \"PUT\",\n token,\n body: JSON.stringify({ status: \"read\" }),\n }\n );\n};\n\nexport const requestSubscribe = async (\n token: string,\n serviceId: string,\n input: Pick<Subscription, \"notificationType\" | \"resourceSubscription\">\n) => {\n const { error } = await fetcher(m2mNotifications_v1.saveSubscription(), {\n method: \"POST\",\n token,\n body: JSON.stringify({\n ...input,\n serviceId,\n status: \"subscribed\",\n }),\n });\n if (error) {\n console.error(error);\n }\n};\n\nexport const requestUnSubscribe = async (\n token: string,\n serviceId: string,\n input: Pick<Subscription, \"notificationType\" | \"resourceSubscription\">\n) => {\n const { error } = await fetcher(m2mNotifications_v1.saveSubscription(), {\n method: \"POST\",\n token,\n body: JSON.stringify({\n ...input,\n serviceId,\n status: \"denied\",\n }),\n });\n if (error) {\n console.error(error);\n }\n};\n","/* eslint-disable */\n/**\n * A function that returns the URL part common to the endpoints.\n */\nexport const root = () => {\n let __root = \"\";\n\n if (globalThis.M2M_COMPONENTS_ENV === \"local\") {\n __root = \"\";\n }\n\n if (globalThis.M2M_COMPONENTS_ENV === \"localDev\") {\n __root = \"\";\n }\n\n if (globalThis.M2M_COMPONENTS_ENV === \"development\") {\n __root = \"https://api-notifications.dev.m2msystems.cloud\";\n }\n\n if (globalThis.M2M_COMPONENTS_ENV === \"production\") {\n __root = \"https://api-notifications.m2msystems.cloud\";\n }\n\n return __root;\n};\n/**\n * health check\n *\n */\nexport const healthCheck = () => {\n const __root = root();\n const __queries = Object.entries({})\n .filter(([_, value]) => {\n return value !== undefined;\n })\n .map(([key, value]) => {\n return `${key}=${value}`;\n })\n .join(\"&\");\n const __path = `${__root}/${`health_check`}`;\n return __queries ? `${__path}?${__queries}` : __path;\n};\n\n/**\n * 通知を登録する\n *\n */\nexport const registerNotification = () => {\n const __root = root();\n const __queries = Object.entries({})\n .filter(([_, value]) => {\n return value !== undefined;\n })\n .map(([key, value]) => {\n return `${key}=${value}`;\n })\n .join(\"&\");\n const __path = `${__root}/${`notifications`}`;\n return __queries ? `${__path}?${__queries}` : __path;\n};\n\n/**\n * 自分宛の通知をserviceIdを使って取得する\n *\n */\nexport const findNotificationsByServiceId = ({ id }: { id: string }) => {\n const __root = root();\n const __queries = Object.entries({})\n .filter(([_, value]) => {\n return value !== undefined;\n })\n .map(([key, value]) => {\n return `${key}=${value}`;\n })\n .join(\"&\");\n const __path = `${__root}/${`notifications/by_service_id/${id}`}`;\n return __queries ? `${__path}?${__queries}` : __path;\n};\n\n/**\n * 通知のステータスを更新する\n *\n */\nexport const updateNotificationStatus = ({ id }: { id: string }) => {\n const __root = root();\n const __queries = Object.entries({})\n .filter(([_, value]) => {\n return value !== undefined;\n })\n .map(([key, value]) => {\n return `${key}=${value}`;\n })\n .join(\"&\");\n const __path = `${__root}/${`notifications/${id}`}`;\n return __queries ? `${__path}?${__queries}` : __path;\n};\n\n/**\n * 通知の購読を更新する\n *\n */\nexport const saveSubscription = () => {\n const __root = root();\n const __queries = Object.entries({})\n .filter(([_, value]) => {\n return value !== undefined;\n })\n .map(([key, value]) => {\n return `${key}=${value}`;\n })\n .join(\"&\");\n const __path = `${__root}/${`subscriptions`}`;\n return __queries ? `${__path}?${__queries}` : __path;\n};\n\n/**\n * 自分の購読している通知を取得する\n *\n */\nexport const findMySubscriptions = () => {\n const __root = root();\n const __queries = Object.entries({})\n .filter(([_, value]) => {\n return value !== undefined;\n })\n .map(([key, value]) => {\n return `${key}=${value}`;\n })\n .join(\"&\");\n const __path = `${__root}/${`subscriptions`}`;\n return __queries ? `${__path}?${__queries}` : __path;\n};\nexport const m2mNotifications_v1 = {\n healthCheck,\n registerNotification,\n findNotificationsByServiceId,\n updateNotificationStatus,\n saveSubscription,\n findMySubscriptions,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,2BAAwB;;;ACGjB,IAAM,OAAO,MAAM;AACxB,MAAI,SAAS;AAEb,MAAI,WAAW,uBAAuB,SAAS;AAC7C,aAAS;AAAA,EACX;AAEA,MAAI,WAAW,uBAAuB,YAAY;AAChD,aAAS;AAAA,EACX;AAEA,MAAI,WAAW,uBAAuB,eAAe;AACnD,aAAS;AAAA,EACX;AAEA,MAAI,WAAW,uBAAuB,cAAc;AAClD,aAAS;AAAA,EACX;AAEA,SAAO;AACT;AAKO,IAAM,cAAc,MAAM;AAC/B,QAAM,SAAS,KAAK;AACpB,QAAM,YAAY,OAAO,QAAQ,CAAC,CAAC,EAChC,OAAO,CAAC,CAAC,GAAG,KAAK,MAAM;AACtB,WAAO,UAAU;AAAA,EACnB,CAAC,EACA,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM;AACrB,WAAO,GAAG,GAAG,IAAI,KAAK;AAAA,EACxB,CAAC,EACA,KAAK,GAAG;AACX,QAAM,SAAS,GAAG,MAAM,IAAI,cAAc;AAC1C,SAAO,YAAY,GAAG,MAAM,IAAI,SAAS,KAAK;AAChD;AAMO,IAAM,uBAAuB,MAAM;AACxC,QAAM,SAAS,KAAK;AACpB,QAAM,YAAY,OAAO,QAAQ,C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OAAO;AACT,YAAQ,MAAM,KAAK;AAAA,EACrB;AACF;AAEO,IAAM,qBAAqB,OAChC,OACA,WACA,UACG;AACH,QAAM,EAAE,MAAM,IAAI,UAAM,8BAAQ,oBAAoB,iBAAiB,GAAG;AAAA,IACtE,QAAQ;AAAA,IACR;AAAA,IACA,MAAM,KAAK,UAAU;AAAA,MACnB,GAAG;AAAA,MACH;AAAA,MACA,QAAQ;AAAA,IACV,CAAC;AAAA,EACH,CAAC;AACD,MAAI,OAAO;AACT,YAAQ,MAAM,KAAK;AAAA,EACrB;AACF;","names":[]}
@@ -0,0 +1,14 @@
1
+ 'use client'
2
+ import {
3
+ requestSubscribe,
4
+ requestUnSubscribe,
5
+ requestUpdateNotificationStatusToRead
6
+ } from "../chunk-V4ROE7DI.mjs";
7
+ import "../chunk-ISOF65DB.mjs";
8
+ import "../chunk-JUBOAWNR.mjs";
9
+ export {
10
+ requestSubscribe,
11
+ requestUnSubscribe,
12
+ requestUpdateNotificationStatusToRead
13
+ };
14
+ //# sourceMappingURL=api.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,24 @@
1
+ interface Notification {
2
+ createdAt: number;
3
+ id: string;
4
+ message: string;
5
+ notificationType: string;
6
+ resourceId: string;
7
+ serviceId: string;
8
+ status: "unread" | "read";
9
+ userId: string;
10
+ }
11
+ interface ResourceSubscription {
12
+ resourceSelectType: "specific" | "any";
13
+ resourceId: string;
14
+ }
15
+ type SubscriptionStatus = "default" | "subscribed" | "denied";
16
+ interface Subscription {
17
+ userId: string;
18
+ serviceId: string;
19
+ notificationType: string;
20
+ resourceSubscription: ResourceSubscription;
21
+ status: SubscriptionStatus;
22
+ }
23
+
24
+ export { Notification, ResourceSubscription, Subscription, SubscriptionStatus };
@@ -1,4 +1,4 @@
1
- export interface Notification {
1
+ interface Notification {
2
2
  createdAt: number;
3
3
  id: string;
4
4
  message: string;
@@ -8,16 +8,17 @@ export interface Notification {
8
8
  status: "unread" | "read";
9
9
  userId: string;
10
10
  }
11
- export interface ResourceSubscription {
11
+ interface ResourceSubscription {
12
12
  resourceSelectType: "specific" | "any";
13
13
  resourceId: string;
14
14
  }
15
- export type SubscriptionStatus = "default" | "subscribed" | "denied";
16
- export interface Subscription {
15
+ type SubscriptionStatus = "default" | "subscribed" | "denied";
16
+ interface Subscription {
17
17
  userId: string;
18
18
  serviceId: string;
19
19
  notificationType: string;
20
20
  resourceSubscription: ResourceSubscription;
21
21
  status: SubscriptionStatus;
22
22
  }
23
- //# sourceMappingURL=domain.d.ts.map
23
+
24
+ export { Notification, ResourceSubscription, Subscription, SubscriptionStatus };
@@ -1,2 +1,20 @@
1
- export {};
1
+ 'use client'
2
+ "use strict";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __copyProps = (to, from, except, desc) => {
8
+ if (from && typeof from === "object" || typeof from === "function") {
9
+ for (let key of __getOwnPropNames(from))
10
+ if (!__hasOwnProp.call(to, key) && key !== except)
11
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
+ }
13
+ return to;
14
+ };
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+
17
+ // src/notification/domain.ts
18
+ var domain_exports = {};
19
+ module.exports = __toCommonJS(domain_exports);
2
20
  //# sourceMappingURL=domain.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"domain.js","names":[],"sources":["../src/notification/domain.ts"],"sourcesContent":["export interface Notification {\n createdAt: number;\n id: string;\n message: string;\n notificationType: string;\n resourceId: string;\n serviceId: string;\n status: \"unread\" | \"read\";\n userId: string;\n}\n\nexport interface ResourceSubscription {\n resourceSelectType: \"specific\" | \"any\";\n resourceId: string;\n}\n\nexport type SubscriptionStatus = \"default\" | \"subscribed\" | \"denied\";\n\nexport interface Subscription {\n userId: string;\n serviceId: string;\n notificationType: string;\n resourceSubscription: ResourceSubscription;\n status: SubscriptionStatus;\n}\n"],"mappings":""}
1
+ {"version":3,"sources":["../../src/notification/domain.ts"],"sourcesContent":["export interface Notification {\n createdAt: number;\n id: string;\n message: string;\n notificationType: string;\n resourceId: string;\n serviceId: string;\n status: \"unread\" | \"read\";\n userId: string;\n}\n\nexport interface ResourceSubscription {\n resourceSelectType: \"specific\" | \"any\";\n resourceId: string;\n}\n\nexport type SubscriptionStatus = \"default\" | \"subscribed\" | \"denied\";\n\nexport interface Subscription {\n userId: string;\n serviceId: string;\n notificationType: string;\n resourceSubscription: ResourceSubscription;\n status: SubscriptionStatus;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,3 @@
1
+ 'use client'
2
+ import "../chunk-YUHXVW6K.mjs";
3
+ //# sourceMappingURL=domain.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,6 @@
1
+ export { Notification, ResourceSubscription, Subscription, SubscriptionStatus } from './domain.mjs';
2
+ export { requestSubscribe, requestUnSubscribe, requestUpdateNotificationStatusToRead } from './api.mjs';
3
+ export { ServiceIdProvider, useServiceId } from './ServiceIdProvider.mjs';
4
+ export { NotificationsProvider, useNotificationPermission, useNotifications } from './NotificationProvider.mjs';
5
+ import 'react/jsx-runtime';
6
+ import 'react';
@@ -1,5 +1,6 @@
1
- export * from "./domain";
2
- export * from "./api";
3
- export * from "./ServiceIdProvider";
4
- export * from "./NotificationProvider";
5
- //# sourceMappingURL=index.d.ts.map
1
+ export { Notification, ResourceSubscription, Subscription, SubscriptionStatus } from './domain.js';
2
+ export { requestSubscribe, requestUnSubscribe, requestUpdateNotificationStatusToRead } from './api.js';
3
+ export { ServiceIdProvider, useServiceId } from './ServiceIdProvider.js';
4
+ export { NotificationsProvider, useNotificationPermission, useNotifications } from './NotificationProvider.js';
5
+ import 'react/jsx-runtime';
6
+ import 'react';