@bwi-mentorspaces/application-utils-npm 0.0.138 → 0.0.139

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 (46) hide show
  1. package/package.json +3 -1
  2. package/program-engagement/index.d.ts +3 -0
  3. package/program-engagement/index.js +16 -0
  4. package/program-engagement/index.js.map +1 -0
  5. package/program-engagement/model.d.ts +93 -0
  6. package/program-engagement/model.js +6 -0
  7. package/program-engagement/model.js.map +1 -0
  8. package/program-engagement/period.d.ts +50 -0
  9. package/program-engagement/period.js +193 -0
  10. package/program-engagement/period.js.map +1 -0
  11. package/program-engagement/query.d.ts +11 -0
  12. package/program-engagement/query.js +129 -0
  13. package/program-engagement/query.js.map +1 -0
  14. package/meet/index.d.ts +0 -36
  15. package/meet/index.js +0 -74
  16. package/meet/index.js.map +0 -1
  17. package/meet/tests/unit/twilio/twilio.room.test.d.ts +0 -1
  18. package/meet/tests/unit/twilio/twilio.room.test.js +0 -33
  19. package/meet/tests/unit/twilio/twilio.room.test.js.map +0 -1
  20. package/meet/twilio/enum/index.d.ts +0 -6
  21. package/meet/twilio/enum/index.js +0 -11
  22. package/meet/twilio/enum/index.js.map +0 -1
  23. package/meet/twilio/index.d.ts +0 -5
  24. package/meet/twilio/index.js +0 -32
  25. package/meet/twilio/index.js.map +0 -1
  26. package/meet/twilio/models/_/room.data.d.ts +0 -6
  27. package/meet/twilio/models/_/room.data.js +0 -3
  28. package/meet/twilio/models/_/room.data.js.map +0 -1
  29. package/meet/twilio/models/_/twilio.config.d.ts +0 -29
  30. package/meet/twilio/models/_/twilio.config.js +0 -3
  31. package/meet/twilio/models/_/twilio.config.js.map +0 -1
  32. package/meet/twilio/models/index.d.ts +0 -3
  33. package/meet/twilio/models/index.js +0 -3
  34. package/meet/twilio/models/index.js.map +0 -1
  35. package/meet/twilio/twilio.api.d.ts +0 -28
  36. package/meet/twilio/twilio.api.js +0 -46
  37. package/meet/twilio/twilio.api.js.map +0 -1
  38. package/meet/twilio/twilio.auth.d.ts +0 -55
  39. package/meet/twilio/twilio.auth.js +0 -116
  40. package/meet/twilio/twilio.auth.js.map +0 -1
  41. package/meet/twilio/twilio.base.d.ts +0 -41
  42. package/meet/twilio/twilio.base.js +0 -54
  43. package/meet/twilio/twilio.base.js.map +0 -1
  44. package/meet/twilio/twilio.room.d.ts +0 -58
  45. package/meet/twilio/twilio.room.js +0 -173
  46. package/meet/twilio/twilio.room.js.map +0 -1
@@ -1,58 +0,0 @@
1
- import { TwilioAuth } from "./twilio.auth";
2
- import { Twilio } from "twilio";
3
- import { TwilioBase } from "./twilio.base";
4
- import { IRoomData } from "./models";
5
- /**
6
- * Twilio Room API declarations
7
- */
8
- interface ITwilioRoom {
9
- /**
10
- * Create a new room in Twilio
11
- */
12
- findOrCreateRoom(roomName: string, roomType: string): Promise<IRoomData>;
13
- /**
14
- * Determines whether or not a room type is one we support.
15
- */
16
- validateRoomType(roomType: string): Promise<boolean>;
17
- /**
18
- * Find an existing room un Twilio
19
- */
20
- findRoom(roomName: string): Promise<IRoomData>;
21
- }
22
- /**
23
- * Twilio Room API implementation
24
- */
25
- export declare class TwilioRoom extends TwilioBase implements ITwilioRoom {
26
- private _expMinutes;
27
- /**
28
- * Twilio room constructor
29
- *
30
- * @param {TwilioAuth} auth Twilio auth
31
- * @param {Twilio} server Twilio API Server
32
- * @param {number} expMins expiration time for the timeout room, in minutes.
33
- */
34
- constructor(auth: TwilioAuth, server: Twilio, expMins: number);
35
- /**
36
- * This will find or Create a new room in Twilio
37
- *
38
- * @param {string} roomName room name
39
- * @param {string} roomTypeStr room type to create in Twilio ("group" | "peer-to-peer" | "go")
40
- * @returns {Promise<IRoomData>} promise of the result to create or get a room
41
- */
42
- findOrCreateRoom(roomName: string, roomTypeStr?: string): Promise<IRoomData>;
43
- /**
44
- * Convenience method to determine if a roomType is valid
45
- *
46
- * @param {string} roomType The room type to validate.
47
- * @returns {Promise<boolean>} true if a valid roomType, false otherwise
48
- */
49
- validateRoomType(roomType: string): Promise<boolean>;
50
- /**
51
- * Find an existing room un Twilio
52
- *
53
- * @param {string} roomName room name
54
- * @returns {Promise<IRoomData>} promise of the result to get a room
55
- */
56
- findRoom(roomName: string): Promise<IRoomData>;
57
- }
58
- export {};
@@ -1,173 +0,0 @@
1
- "use strict";
2
- var __decorate =
3
- (this && this.__decorate) ||
4
- function (decorators, target, key, desc) {
5
- var c = arguments.length,
6
- r = c < 3 ? target : desc === null ? (desc = Object.getOwnPropertyDescriptor(target, key)) : desc,
7
- d;
8
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
9
- r = Reflect.decorate(decorators, target, key, desc);
10
- else
11
- for (var i = decorators.length - 1; i >= 0; i--)
12
- if ((d = decorators[i])) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
13
- return c > 3 && r && Object.defineProperty(target, key, r), r;
14
- };
15
- var __metadata =
16
- (this && this.__metadata) ||
17
- function (k, v) {
18
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
19
- };
20
- var __awaiter =
21
- (this && this.__awaiter) ||
22
- function (thisArg, _arguments, P, generator) {
23
- function adopt(value) {
24
- return value instanceof P
25
- ? value
26
- : new P(function (resolve) {
27
- resolve(value);
28
- });
29
- }
30
- return new (P || (P = Promise))(function (resolve, reject) {
31
- function fulfilled(value) {
32
- try {
33
- step(generator.next(value));
34
- } catch (e) {
35
- reject(e);
36
- }
37
- }
38
- function rejected(value) {
39
- try {
40
- step(generator["throw"](value));
41
- } catch (e) {
42
- reject(e);
43
- }
44
- }
45
- function step(result) {
46
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
47
- }
48
- step((generator = generator.apply(thisArg, _arguments || [])).next());
49
- });
50
- };
51
- Object.defineProperty(exports, "__esModule", { value: true });
52
- exports.TwilioRoom = void 0;
53
- const twilio_auth_1 = require("./twilio.auth");
54
- const tsyringe_1 = require("tsyringe");
55
- const twilio_1 = require("twilio");
56
- const twilio_base_1 = require("./twilio.base");
57
- /**
58
- * Twilio Room API implementation
59
- */
60
- let TwilioRoom =
61
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
62
- class TwilioRoom extends twilio_base_1.TwilioBase {
63
- /**
64
- * Twilio room constructor
65
- *
66
- * @param {TwilioAuth} auth Twilio auth
67
- * @param {Twilio} server Twilio API Server
68
- * @param {number} expMins expiration time for the timeout room, in minutes.
69
- */
70
- constructor(auth, server, expMins) {
71
- super();
72
- super.auth = auth;
73
- super.server = server;
74
- this._expMinutes = expMins;
75
- }
76
- /**
77
- * This will find or Create a new room in Twilio
78
- *
79
- * @param {string} roomName room name
80
- * @param {string} roomTypeStr room type to create in Twilio ("group" | "peer-to-peer" | "go")
81
- * @returns {Promise<IRoomData>} promise of the result to create or get a room
82
- */
83
- findOrCreateRoom(roomName, roomTypeStr = "group") {
84
- const _super = Object.create(null, {
85
- server: { get: () => super.server }
86
- });
87
- return __awaiter(this, void 0, void 0, function* () {
88
- try {
89
- // see if the room exists already. If it doesn't, this will throw
90
- // error 20404.
91
- const r = yield _super.server.video.rooms(roomName).fetch();
92
- return {
93
- sid: r.sid,
94
- exist: true,
95
- status: r.status
96
- };
97
- } catch (error) {
98
- // the room was not found, so create it
99
- if (error.code == 20404) {
100
- //Create the room in Twilio
101
- const roomType = roomTypeStr;
102
- const r = yield _super.server.video.rooms.create({
103
- uniqueName: roomName,
104
- unusedRoomTimeout: this._expMinutes,
105
- type: roomType
106
- });
107
- //Check the result of the request
108
- if (r) {
109
- //Return the sid for the new room
110
- return { sid: r.sid, exist: false };
111
- } else {
112
- //Return null
113
- return null;
114
- }
115
- } else {
116
- // let other errors bubble up
117
- throw error;
118
- }
119
- }
120
- });
121
- }
122
- /**
123
- * Convenience method to determine if a roomType is valid
124
- *
125
- * @param {string} roomType The room type to validate.
126
- * @returns {Promise<boolean>} true if a valid roomType, false otherwise
127
- */
128
- validateRoomType(roomType) {
129
- return __awaiter(this, void 0, void 0, function* () {
130
- if (roomType === "peer-to-peer" || roomType === "go" || roomType === "group") {
131
- return true;
132
- }
133
- return false;
134
- });
135
- }
136
- /**
137
- * Find an existing room un Twilio
138
- *
139
- * @param {string} roomName room name
140
- * @returns {Promise<IRoomData>} promise of the result to get a room
141
- */
142
- findRoom(roomName) {
143
- const _super = Object.create(null, {
144
- server: { get: () => super.server }
145
- });
146
- return __awaiter(this, void 0, void 0, function* () {
147
- // see if the room exists already. If it doesn't, this will return undefined
148
- try {
149
- const r = yield _super.server.video.rooms(roomName).fetch();
150
- return {
151
- sid: r.sid,
152
- exist: true,
153
- status: r.status
154
- };
155
- } catch (error) {
156
- // the room was not found, so create it
157
- if (error.code == 20404) return undefined;
158
- // let other errors bubble up
159
- else throw error;
160
- }
161
- });
162
- }
163
- };
164
- TwilioRoom = __decorate(
165
- [
166
- (0, tsyringe_1.injectable)(),
167
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
168
- __metadata("design:paramtypes", [twilio_auth_1.TwilioAuth, twilio_1.Twilio, Number])
169
- ],
170
- TwilioRoom
171
- );
172
- exports.TwilioRoom = TwilioRoom;
173
- //# sourceMappingURL=twilio.room.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"twilio.room.js","sourceRoot":"","sources":["../../../meet/twilio/twilio.room.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,+CAA2C;AAC3C,uCAAsC;AACtC,mCAAgC;AAChC,+CAA2C;AAwB3C;;GAEG;AAGH,IAAa,UAAU;AADvB,6DAA6D;AAC7D,MAAa,UAAW,SAAQ,wBAAU;IAGtC;;;;;;OAMG;IACH,YAAY,IAAgB,EAAE,MAAc,EAAE,OAAe;QACzD,KAAK,EAAE,CAAC;QACR,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;QAClB,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC;IAC/B,CAAC;IAED;;;;;;OAMG;IACG,gBAAgB,CAAC,QAAg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