@activepieces/piece-sessions-us 0.1.4 → 0.1.6

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 (56) hide show
  1. package/package.json +7 -23
  2. package/src/index.js +13 -87
  3. package/README.md +0 -7
  4. package/src/index.d.ts +0 -2
  5. package/src/index.js.map +0 -1
  6. package/src/lib/actions/create-event.d.ts +0 -6
  7. package/src/lib/actions/create-event.js +0 -72
  8. package/src/lib/actions/create-event.js.map +0 -1
  9. package/src/lib/actions/create-session.d.ts +0 -6
  10. package/src/lib/actions/create-session.js +0 -75
  11. package/src/lib/actions/create-session.js.map +0 -1
  12. package/src/lib/actions/publish-event.d.ts +0 -3
  13. package/src/lib/actions/publish-event.js +0 -53
  14. package/src/lib/actions/publish-event.js.map +0 -1
  15. package/src/lib/common/index.d.ts +0 -49
  16. package/src/lib/common/index.js +0 -152
  17. package/src/lib/common/index.js.map +0 -1
  18. package/src/lib/triggers/booking-created.d.ts +0 -9
  19. package/src/lib/triggers/booking-created.js +0 -57
  20. package/src/lib/triggers/booking-created.js.map +0 -1
  21. package/src/lib/triggers/booking-ended.d.ts +0 -9
  22. package/src/lib/triggers/booking-ended.js +0 -57
  23. package/src/lib/triggers/booking-ended.js.map +0 -1
  24. package/src/lib/triggers/booking-started.d.ts +0 -9
  25. package/src/lib/triggers/booking-started.js +0 -57
  26. package/src/lib/triggers/booking-started.js.map +0 -1
  27. package/src/lib/triggers/event-created.d.ts +0 -9
  28. package/src/lib/triggers/event-created.js +0 -43
  29. package/src/lib/triggers/event-created.js.map +0 -1
  30. package/src/lib/triggers/event-ended.d.ts +0 -9
  31. package/src/lib/triggers/event-ended.js +0 -43
  32. package/src/lib/triggers/event-ended.js.map +0 -1
  33. package/src/lib/triggers/event-new-registration.d.ts +0 -9
  34. package/src/lib/triggers/event-new-registration.js +0 -31
  35. package/src/lib/triggers/event-new-registration.js.map +0 -1
  36. package/src/lib/triggers/event-published.d.ts +0 -9
  37. package/src/lib/triggers/event-published.js +0 -43
  38. package/src/lib/triggers/event-published.js.map +0 -1
  39. package/src/lib/triggers/event-started.d.ts +0 -9
  40. package/src/lib/triggers/event-started.js +0 -43
  41. package/src/lib/triggers/event-started.js.map +0 -1
  42. package/src/lib/triggers/session-created.d.ts +0 -9
  43. package/src/lib/triggers/session-created.js +0 -40
  44. package/src/lib/triggers/session-created.js.map +0 -1
  45. package/src/lib/triggers/session-ended.d.ts +0 -9
  46. package/src/lib/triggers/session-ended.js +0 -40
  47. package/src/lib/triggers/session-ended.js.map +0 -1
  48. package/src/lib/triggers/session-started.d.ts +0 -9
  49. package/src/lib/triggers/session-started.js +0 -40
  50. package/src/lib/triggers/session-started.js.map +0 -1
  51. package/src/lib/triggers/takeaway-ready.d.ts +0 -9
  52. package/src/lib/triggers/takeaway-ready.js +0 -36
  53. package/src/lib/triggers/takeaway-ready.js.map +0 -1
  54. package/src/lib/triggers/transcript-ready.d.ts +0 -9
  55. package/src/lib/triggers/transcript-ready.js +0 -30
  56. package/src/lib/triggers/transcript-ready.js.map +0 -1
@@ -1,75 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createSession = void 0;
4
- const tslib_1 = require("tslib");
5
- const common_1 = require("../common");
6
- const __1 = require("../..");
7
- const pieces_common_1 = require("@activepieces/pieces-common");
8
- const pieces_framework_1 = require("@activepieces/pieces-framework");
9
- exports.createSession = (0, pieces_framework_1.createAction)({
10
- auth: __1.sessionAuth,
11
- name: 'create_session',
12
- displayName: 'Create Session',
13
- description: 'Quickly create a session.',
14
- props: {
15
- name: pieces_framework_1.Property.ShortText({
16
- displayName: 'Session Name',
17
- description: 'The name of the session',
18
- required: true,
19
- }),
20
- startAt: pieces_framework_1.Property.DateTime({
21
- displayName: 'Starts At',
22
- description: 'Select a date and time',
23
- required: true,
24
- defaultValue: new Date().toISOString(),
25
- }),
26
- plannedEnd: pieces_framework_1.Property.DateTime({
27
- displayName: 'Ends At',
28
- description: 'Select a date and time',
29
- required: true,
30
- defaultValue: new Date().toISOString(),
31
- }),
32
- timezone: pieces_framework_1.Property.Dropdown({
33
- auth: __1.sessionAuth,
34
- displayName: 'Timezone',
35
- description: 'The timezone which the session will take place.',
36
- required: true,
37
- refreshers: [],
38
- options: () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
39
- const timezones = yield (0, common_1.getTimezones)();
40
- return {
41
- options: timezones.map((timezone) => {
42
- return {
43
- label: timezone,
44
- value: timezone,
45
- };
46
- }),
47
- };
48
- }),
49
- }),
50
- },
51
- run(_a) {
52
- return tslib_1.__awaiter(this, arguments, void 0, function* ({ propsValue, auth }) {
53
- const request = {
54
- method: pieces_common_1.HttpMethod.POST,
55
- url: `${common_1.baseUrl}/sessions`,
56
- headers: {
57
- 'x-api-key': auth.secret_text,
58
- },
59
- body: {
60
- name: propsValue['name'],
61
- startAt: propsValue['startAt'],
62
- plannedEnd: propsValue['plannedEnd'],
63
- timeZone: propsValue['timezone'],
64
- },
65
- };
66
- const response = yield pieces_common_1.httpClient.sendRequest(request);
67
- return {
68
- id: response.body['id'],
69
- name: response.body['name'],
70
- link: response.body['sessionLink'],
71
- };
72
- });
73
- },
74
- });
75
- //# sourceMappingURL=create-session.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-session.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/sessions-us/src/lib/actions/create-session.ts"],"names":[],"mappings":";;;;AAAA,sCAAkD;AAClD,6BAAoC;AACpC,+DAIqC;AACrC,qEAAwE;AAE3D,QAAA,aAAa,GAAG,IAAA,+BAAY,EAAC;IACxC,IAAI,EAAE,eAAW;IACjB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EAAE,2BAA2B;IACxC,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,yBAAyB;YACtC,QAAQ,EAAE,I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AC;oBACpC,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC;iBACjC;aACF,CAAC;YAEF,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;YACvD,OAAO;gBACL,EAAE,EAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;gBACvB,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;gBAC3B,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC;aACnC,CAAC;QACJ,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,3 +0,0 @@
1
- export declare const publishEvent: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
- event: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
3
- }>;
@@ -1,53 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.publishEvent = void 0;
4
- const tslib_1 = require("tslib");
5
- const common_1 = require("../common");
6
- const __1 = require("../..");
7
- const pieces_common_1 = require("@activepieces/pieces-common");
8
- const pieces_framework_1 = require("@activepieces/pieces-framework");
9
- exports.publishEvent = (0, pieces_framework_1.createAction)({
10
- auth: __1.sessionAuth,
11
- name: 'publish_event',
12
- displayName: 'Publish Event',
13
- description: 'Quickly publish an event.',
14
- props: {
15
- event: pieces_framework_1.Property.Dropdown({
16
- auth: __1.sessionAuth,
17
- displayName: 'Event',
18
- description: 'The event you want to publish.',
19
- required: true,
20
- refreshers: [],
21
- options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
22
- if (!auth) {
23
- return {
24
- disabled: true,
25
- options: [],
26
- };
27
- }
28
- const events = yield (0, common_1.getEvents)(auth.secret_text);
29
- return {
30
- options: events.map((event) => {
31
- return {
32
- label: event.session.name,
33
- value: event.id,
34
- };
35
- }),
36
- };
37
- }),
38
- }),
39
- },
40
- run(_a) {
41
- return tslib_1.__awaiter(this, arguments, void 0, function* ({ propsValue, auth }) {
42
- const response = yield pieces_common_1.httpClient.sendRequest({
43
- method: pieces_common_1.HttpMethod.POST,
44
- url: `${common_1.baseUrl}/events/${propsValue.event}/publish`,
45
- headers: {
46
- 'x-api-key': auth.secret_text,
47
- },
48
- });
49
- return response.body;
50
- });
51
- },
52
- });
53
- //# sourceMappingURL=publish-event.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"publish-event.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/sessions-us/src/lib/actions/publish-event.ts"],"names":[],"mappings":";;;;AAAA,sCAA+C;AAC/C,6BAAoC;AACpC,+DAAqE;AACrE,qEAAwE;AAE3D,QAAA,YAAY,GAAG,IAAA,+BAAY,EAAC;IACvC,IAAI,EAAE,eAAW;IACjB,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,2BAA2B;IACxC,KAAK,EAAE;QACL,KAAK,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACvB,IAAI,EAAE,eAAW;YACjB,WAAW,EAAE,OAAO;YACpB,WAAW,EAAE,gCAAgC;YAC7C,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE,EAAE;YACd,OAAO,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;gBACtB,IAAI,CAAC,IAAI,EAAE,CAAC;oBACV,OAAO;wBACL,QAAQ,EAAE,IAAI;wBACd,OAAO,EAAE,EAAE;qBACZ,CAAC;gBACJ,CAAC;gBAED,MAAM,MAAM,GAAG,MAAM,IAAA,kBAAS,EAAC,IAAI,CAAC,WAAW,CAAC,CAAC;gBACjD,OAAO;oBACL,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;wBAC5B,OAAO;4BACL,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI;4BACzB,KAAK,EAAE,KAAK,CAAC,EAAE;yBAChB,CAAC;oBACJ,CAAC,CAAC;iBACH,CAAC;YACJ,CAAC,CAAA;SACF,CAAC;KACH;IAEK,GAAG;qEAAC,EAAE,UAAU,EAAE,IAAI,EAAE;YAC5B,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,GAAG,gBAAO,WAAW,UAAU,CAAC,KAAK,UAAU;gBACpD,OAAO,EAAE;oBACP,WAAW,EAAE,IAAI,CAAC,WAAW;iBAC9B;aACF,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,49 +0,0 @@
1
- import { TriggerStrategy } from '@activepieces/pieces-framework';
2
- export declare const baseUrl = "https://api.app.sessions.us/api";
3
- export declare const properties: {
4
- permission: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
5
- };
6
- export declare function getTimezones(): Promise<string[]>;
7
- export declare function getEvents(auth: string): Promise<{
8
- id: string;
9
- session: {
10
- name: string;
11
- };
12
- }[]>;
13
- export declare function slugify(string: string): string;
14
- export declare function createWebhook(trigger: SessionsUsWebhookTrigger, auth: string, webhookUrl: string, permission: string): Promise<{
15
- id: string;
16
- }>;
17
- export declare function deleteWebhook(webhookId: string, auth: string): Promise<any>;
18
- export declare enum SessionsUsWebhookTrigger {
19
- SESSION_CREATED = "SESSION_CREATED",
20
- SESSION_STARTED = "SESSION_STARTED",
21
- SESSION_ENDED = "SESSION_ENDED",
22
- BOOKING_CREATED = "BOOKING_CREATED",
23
- BOOKING_STARTED = "BOOKING_STARTED",
24
- BOOKING_ENDED = "BOOKING_ENDED",
25
- EVENT_CREATED = "EVENT_CREATED",
26
- EVENT_STARTED = "EVENT_STARTED",
27
- EVENT_ENDED = "EVENT_ENDED",
28
- EVENT_PUBLISHED = "EVENT_PUBLISHED",
29
- EVENT_NEW_REGISTRATION = "EVENT_NEW_REGISTRATION",
30
- TRANSCRIPT_READY = "TRANSCRIPT_READY",
31
- TAKEAWAY_READY = "TAKEAWAY_READY"
32
- }
33
- export declare function createSessionsUsWebhookTrigger(data: CreateWebhookTriggerDto): import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
34
- permission: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
35
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
36
- permission: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
37
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
38
- permission: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
39
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
40
- permission: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
41
- }>;
42
- export interface CreateWebhookTriggerDto {
43
- name: string;
44
- displayName: string;
45
- description: string;
46
- sampleData?: unknown;
47
- trigger: SessionsUsWebhookTrigger;
48
- storeKey: string;
49
- }
@@ -1,152 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SessionsUsWebhookTrigger = exports.properties = exports.baseUrl = void 0;
4
- exports.getTimezones = getTimezones;
5
- exports.getEvents = getEvents;
6
- exports.slugify = slugify;
7
- exports.createWebhook = createWebhook;
8
- exports.deleteWebhook = deleteWebhook;
9
- exports.createSessionsUsWebhookTrigger = createSessionsUsWebhookTrigger;
10
- const tslib_1 = require("tslib");
11
- const pieces_common_1 = require("@activepieces/pieces-common");
12
- const pieces_framework_1 = require("@activepieces/pieces-framework");
13
- const __1 = require("../..");
14
- exports.baseUrl = 'https://api.app.sessions.us/api';
15
- exports.properties = {
16
- permission: pieces_framework_1.Property.StaticDropdown({
17
- displayName: 'Permission',
18
- description: 'Personal applies for the user only, organization applies to every event that is made by a user of the organization.',
19
- required: true,
20
- defaultValue: 'personal',
21
- options: {
22
- options: [
23
- {
24
- label: 'Personal',
25
- value: 'personal',
26
- },
27
- {
28
- label: 'Organization',
29
- value: 'organization',
30
- },
31
- ],
32
- },
33
- }),
34
- };
35
- function getTimezones() {
36
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
37
- const timezones = yield pieces_common_1.httpClient.sendRequest({
38
- url: 'http://worldtimeapi.org/api/timezone',
39
- method: pieces_common_1.HttpMethod.GET,
40
- });
41
- return timezones.body;
42
- });
43
- }
44
- function getEvents(auth) {
45
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
46
- const response = yield pieces_common_1.httpClient.sendRequest({
47
- method: pieces_common_1.HttpMethod.GET,
48
- url: `${exports.baseUrl}/events`,
49
- headers: {
50
- 'x-api-key': auth,
51
- },
52
- });
53
- return response.body;
54
- });
55
- }
56
- function slugify(string) {
57
- // Remove leading and trailing whitespaces
58
- const trimmedStr = string.trim();
59
- // Replace spaces with dashes, remove special characters, and convert to lowercase
60
- const slug = trimmedStr
61
- .toLowerCase()
62
- .replace(/[^\w\s-]/g, '') // Remove non-word characters (alphanumeric, underscores, and dashes)
63
- .replace(/\s+/g, '-') // Replace spaces with dashes
64
- .replace(/-+/g, '-'); // Replace consecutive dashes with a single dash
65
- return slug;
66
- }
67
- function createWebhook(trigger, auth, webhookUrl, permission) {
68
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
69
- const response = yield pieces_common_1.httpClient.sendRequest({
70
- url: `${exports.baseUrl}/webhooks`,
71
- method: pieces_common_1.HttpMethod.POST,
72
- headers: {
73
- 'x-api-key': auth,
74
- },
75
- body: {
76
- url: webhookUrl,
77
- trigger: trigger,
78
- permission: permission,
79
- // If the API key used to create this webhook is deleted, deletes the webhook
80
- linkPublicKey: true,
81
- // This needs to be ACTIVE_PIECES as set up by the Sessions.us team, makes the webhook not editable from the frontend
82
- integration: 'ACTIVE_PIECES',
83
- },
84
- });
85
- return response.body;
86
- });
87
- }
88
- function deleteWebhook(webhookId, auth) {
89
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
90
- const response = yield pieces_common_1.httpClient.sendRequest({
91
- url: `${exports.baseUrl}/webhooks/${webhookId}`,
92
- method: pieces_common_1.HttpMethod.DELETE,
93
- headers: {
94
- 'x-api-key': auth,
95
- },
96
- });
97
- return response.body;
98
- });
99
- }
100
- var SessionsUsWebhookTrigger;
101
- (function (SessionsUsWebhookTrigger) {
102
- SessionsUsWebhookTrigger["SESSION_CREATED"] = "SESSION_CREATED";
103
- SessionsUsWebhookTrigger["SESSION_STARTED"] = "SESSION_STARTED";
104
- SessionsUsWebhookTrigger["SESSION_ENDED"] = "SESSION_ENDED";
105
- SessionsUsWebhookTrigger["BOOKING_CREATED"] = "BOOKING_CREATED";
106
- SessionsUsWebhookTrigger["BOOKING_STARTED"] = "BOOKING_STARTED";
107
- SessionsUsWebhookTrigger["BOOKING_ENDED"] = "BOOKING_ENDED";
108
- SessionsUsWebhookTrigger["EVENT_CREATED"] = "EVENT_CREATED";
109
- SessionsUsWebhookTrigger["EVENT_STARTED"] = "EVENT_STARTED";
110
- SessionsUsWebhookTrigger["EVENT_ENDED"] = "EVENT_ENDED";
111
- SessionsUsWebhookTrigger["EVENT_PUBLISHED"] = "EVENT_PUBLISHED";
112
- SessionsUsWebhookTrigger["EVENT_NEW_REGISTRATION"] = "EVENT_NEW_REGISTRATION";
113
- SessionsUsWebhookTrigger["TRANSCRIPT_READY"] = "TRANSCRIPT_READY";
114
- SessionsUsWebhookTrigger["TAKEAWAY_READY"] = "TAKEAWAY_READY";
115
- })(SessionsUsWebhookTrigger || (exports.SessionsUsWebhookTrigger = SessionsUsWebhookTrigger = {}));
116
- function createSessionsUsWebhookTrigger(data) {
117
- var _a;
118
- return (0, pieces_framework_1.createTrigger)({
119
- auth: __1.sessionAuth,
120
- name: data.name,
121
- displayName: data.displayName,
122
- description: data.description,
123
- type: pieces_framework_1.TriggerStrategy.WEBHOOK,
124
- sampleData: (_a = data.sampleData) !== null && _a !== void 0 ? _a : {},
125
- props: {
126
- permission: exports.properties.permission,
127
- },
128
- onEnable(_a) {
129
- return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, store, webhookUrl, propsValue }) {
130
- const webhookId = yield createWebhook(data.trigger, auth.secret_text, webhookUrl, propsValue.permission);
131
- yield store.put(data.storeKey, {
132
- webhookId: webhookId.id,
133
- });
134
- });
135
- },
136
- onDisable(_a) {
137
- return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, store }) {
138
- const webhookId = yield store.get(data.storeKey);
139
- if (webhookId) {
140
- yield deleteWebhook(webhookId.webhookId, auth.secret_text);
141
- }
142
- });
143
- },
144
- run(_a) {
145
- return tslib_1.__awaiter(this, arguments, void 0, function* ({ payload }) {
146
- const body = payload.body;
147
- return [body.data];
148
- });
149
- },
150
- });
151
- }
152
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/sessions-us/src/lib/common/index.ts"],"names":[],"mappings":";;;AAiCA,oCAOC;AAED,8BAcC;AAED,0BAYC;AAED,sCAwBC;AAED,sCAUC;AAkBD,wEAsCC;;AApKD,+DAAqE;AACrE,qEAKwC;AACxC,6BAAoC;AAEvB,QAAA,OAAO,GAAG,iCAAiC,CAAC;AAE5C,QAAA,UAAU,GAAG;IACxB,UAAU,EAAE,2BAAQ,CAAC,cAAc,CAAC;QAClC,WAAW,EAAE,YAAY;QACzB,WAAW,EACT,qHAAqH;QACvH,QAAQ,EAAE,IAAI;QACd,YAAY,EAAE,UAAU;QACxB,OAAO,EAAE;YACP,OAAO,EAAE;gBACP;oBACE,KAAK,EAAE,UAAU;oBACjB,KAAK,EAAE,UAAU;iBAClB;gBACD;oBACE,KAAK,EAAE,cAAc;oBACrB,KAAK,EAAE,cAAc;iBACtB;aACF;SACF;KACF,CAAC;CACH,C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,EAAE,UAAU,EAAE;gBACpD,MAAM,SAAS,GAAG,MAAM,aAAa,CACnC,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,WAAW,EAChB,UAAU,EACV,UAAU,CAAC,UAAU,CACtB,CAAC;gBAEF,MAAM,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE;oBAC7B,SAAS,EAAE,SAAS,CAAC,EAAE;iBACxB,CAAC,CAAC;YACL,CAAC;SAAA;QACK,SAAS;yEAAC,EAAE,IAAI,EAAE,KAAK,EAAE;gBAC7B,MAAM,SAAS,GAEJ,MAAM,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBAC1C,IAAI,SAAS,EAAE,CAAC;oBACd,MAAM,aAAa,CAAC,SAAS,CAAC,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;gBAC7D,CAAC;YACH,CAAC;SAAA;QACK,GAAG;yEAAC,EAAE,OAAO,EAAE;gBACnB,MAAM,IAAI,GAAG,OAAO,CAAC,IAA0C,CAAC;gBAChE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACrB,CAAC;SAAA;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -1,9 +0,0 @@
1
- export declare const bookingCreated: import("dist/packages/pieces/community/framework/src").ITrigger<import("dist/packages/shared/src").TriggerStrategy.WEBHOOK, import("dist/packages/pieces/community/framework/src").SecretTextProperty<true>, {
2
- permission: import("dist/packages/pieces/community/framework/src").StaticDropdownProperty<string, true>;
3
- }> | import("dist/packages/pieces/community/framework/src").ITrigger<import("dist/packages/shared/src").TriggerStrategy.POLLING, import("dist/packages/pieces/community/framework/src").SecretTextProperty<true>, {
4
- permission: import("dist/packages/pieces/community/framework/src").StaticDropdownProperty<string, true>;
5
- }> | import("dist/packages/pieces/community/framework/src").ITrigger<import("dist/packages/shared/src").TriggerStrategy.MANUAL, import("dist/packages/pieces/community/framework/src").SecretTextProperty<true>, {
6
- permission: import("dist/packages/pieces/community/framework/src").StaticDropdownProperty<string, true>;
7
- }> | import("dist/packages/pieces/community/framework/src").ITrigger<import("dist/packages/shared/src").TriggerStrategy.APP_WEBHOOK, import("dist/packages/pieces/community/framework/src").SecretTextProperty<true>, {
8
- permission: import("dist/packages/pieces/community/framework/src").StaticDropdownProperty<string, true>;
9
- }>;
@@ -1,57 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.bookingCreated = void 0;
4
- const common_1 = require("../common");
5
- exports.bookingCreated = (0, common_1.createSessionsUsWebhookTrigger)({
6
- name: 'booking_created',
7
- displayName: 'Booking Created',
8
- description: 'Triggered when a new booking is created.',
9
- trigger: common_1.SessionsUsWebhookTrigger.BOOKING_CREATED,
10
- storeKey: 'sessions_booking_created_trigger',
11
- sampleData: {
12
- session: {
13
- id: '2f8547a5-5c36-49ea-bc21-c61e337d89a3',
14
- name: 'Talk with Active Pieces',
15
- description: '',
16
- quickSession: false,
17
- room: null,
18
- createdAt: '2023-11-30T10:21:41.372Z',
19
- startAt: '2023-11-30T10:30:00.000Z',
20
- actualStart: '2023-11-30T10:34:37.799Z',
21
- endedAt: null,
22
- booking: {
23
- id: '3df6dbdb-9a6c-41e6-89b2-d7a38233163e',
24
- name: 'Talk with Active Pieces',
25
- participantName: 'Active Pieces',
26
- participantEmail: 'example@gmail.com',
27
- guests: [],
28
- },
29
- event: null,
30
- participants: [
31
- {
32
- id: '2021014e-5e28-498f-9fe3-3428ce40c9c4',
33
- isOwner: false,
34
- guest: {
35
- id: '529e6bc0-af38-4365-a0b2-5530d8207ecb',
36
- email: 'example@gmail.com',
37
- lastName: null,
38
- firstName: 'Active Pieces',
39
- },
40
- user: null,
41
- },
42
- {
43
- id: '529b967f-de3d-4dec-a865-35637c294f9c',
44
- isOwner: true,
45
- guest: null,
46
- user: {
47
- id: '9090bd7c-0cf9-4716-837e-43f3821a65c4',
48
- email: 'email@example.com',
49
- lastName: 'Pieces',
50
- firstName: 'Active',
51
- },
52
- },
53
- ],
54
- },
55
- },
56
- });
57
- //# sourceMappingURL=booking-created.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"booking-created.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/sessions-us/src/lib/triggers/booking-created.ts"],"names":[],"mappings":";;;AAAA,sCAGmB;AAEN,QAAA,cAAc,GAAG,IAAA,uCAA8B,EAAC;IAC3D,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,0CAA0C;IACvD,OAAO,EAAE,iCAAwB,CAAC,eAAe;IACjD,QAAQ,EAAE,kCAAkC;IAC5C,UAAU,EAAE;QACV,OAAO,EAAE;YACP,EAAE,EAAE,sCAAsC;YAC1C,IAAI,EAAE,yBAAyB;YAC/B,WAAW,EAAE,EAAE;YACf,YAAY,EAAE,KAAK;YACnB,IAAI,EAAE,IAAI;YACV,SAAS,EAAE,0BAA0B;YACrC,OAAO,EAAE,0BAA0B;YACnC,WAAW,EAAE,0BAA0B;YACvC,OAAO,EAAE,IAAI;YACb,OAAO,EAAE;gBACP,EAAE,EAAE,sCAAsC;gBAC1C,IAAI,EAAE,yBAAyB;gBAC/B,eAAe,EAAE,eAAe;gBAChC,gBAAgB,EAAE,mBAAmB;gBACrC,MAAM,EAAE,EAAE;aACX;YACD,KAAK,EAAE,IAAI;YACX,YAAY,EAAE;gBACZ;oBACE,EAAE,EAAE,sCAAsC;oBAC1C,OAAO,EAAE,KAAK;oBACd,KAAK,EAAE;wBACL,EAAE,EAAE,sCAAsC;wBAC1C,KAAK,EAAE,mBAAmB;wBAC1B,QAAQ,EAAE,IAAI;wBACd,SAAS,EAAE,eAAe;qBAC3B;oBACD,IAAI,EAAE,IAAI;iBACX;gBACD;oBACE,EAAE,EAAE,sCAAsC;oBAC1C,OAAO,EAAE,IAAI;oBACb,KAAK,EAAE,IAAI;oBACX,IAAI,EAAE;wBACJ,EAAE,EAAE,sCAAsC;wBAC1C,KAAK,EAAE,mBAAmB;wBAC1B,QAAQ,EAAE,QAAQ;wBAClB,SAAS,EAAE,QAAQ;qBACpB;iBACF;aACF;SACF;KACF;CACF,CAAC,CAAC"}
@@ -1,9 +0,0 @@
1
- export declare const bookingEnded: import("dist/packages/pieces/community/framework/src").ITrigger<import("dist/packages/shared/src").TriggerStrategy.WEBHOOK, import("dist/packages/pieces/community/framework/src").SecretTextProperty<true>, {
2
- permission: import("dist/packages/pieces/community/framework/src").StaticDropdownProperty<string, true>;
3
- }> | import("dist/packages/pieces/community/framework/src").ITrigger<import("dist/packages/shared/src").TriggerStrategy.POLLING, import("dist/packages/pieces/community/framework/src").SecretTextProperty<true>, {
4
- permission: import("dist/packages/pieces/community/framework/src").StaticDropdownProperty<string, true>;
5
- }> | import("dist/packages/pieces/community/framework/src").ITrigger<import("dist/packages/shared/src").TriggerStrategy.MANUAL, import("dist/packages/pieces/community/framework/src").SecretTextProperty<true>, {
6
- permission: import("dist/packages/pieces/community/framework/src").StaticDropdownProperty<string, true>;
7
- }> | import("dist/packages/pieces/community/framework/src").ITrigger<import("dist/packages/shared/src").TriggerStrategy.APP_WEBHOOK, import("dist/packages/pieces/community/framework/src").SecretTextProperty<true>, {
8
- permission: import("dist/packages/pieces/community/framework/src").StaticDropdownProperty<string, true>;
9
- }>;
@@ -1,57 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.bookingEnded = void 0;
4
- const common_1 = require("../common");
5
- exports.bookingEnded = (0, common_1.createSessionsUsWebhookTrigger)({
6
- name: 'booking_ended',
7
- displayName: 'Booking Ended',
8
- description: 'Triggered when a booking ends.',
9
- trigger: common_1.SessionsUsWebhookTrigger.BOOKING_ENDED,
10
- storeKey: 'sessions_booking_ended_trigger',
11
- sampleData: {
12
- session: {
13
- id: '2f8547a5-5c36-49ea-bc21-c61e337d89a3',
14
- name: 'Talk with Active Pieces',
15
- description: '',
16
- quickSession: false,
17
- room: null,
18
- createdAt: '2023-11-30T10:21:41.372Z',
19
- startAt: '2023-11-30T10:30:00.000Z',
20
- actualStart: '2023-11-30T10:34:37.799Z',
21
- endedAt: null,
22
- booking: {
23
- id: '3df6dbdb-9a6c-41e6-89b2-d7a38233163e',
24
- name: 'Talk with Active Pieces',
25
- participantName: 'Active Pieces',
26
- participantEmail: 'example@gmail.com',
27
- guests: [],
28
- },
29
- event: null,
30
- participants: [
31
- {
32
- id: '2021014e-5e28-498f-9fe3-3428ce40c9c4',
33
- isOwner: false,
34
- guest: {
35
- id: '529e6bc0-af38-4365-a0b2-5530d8207ecb',
36
- email: 'example@gmail.com',
37
- lastName: null,
38
- firstName: 'Active Pieces',
39
- },
40
- user: null,
41
- },
42
- {
43
- id: '529b967f-de3d-4dec-a865-35637c294f9c',
44
- isOwner: true,
45
- guest: null,
46
- user: {
47
- id: '9090bd7c-0cf9-4716-837e-43f3821a65c4',
48
- email: 'email@example.com',
49
- lastName: 'Pieces',
50
- firstName: 'Active',
51
- },
52
- },
53
- ],
54
- },
55
- },
56
- });
57
- //# sourceMappingURL=booking-ended.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"booking-ended.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/sessions-us/src/lib/triggers/booking-ended.ts"],"names":[],"mappings":";;;AAAA,sCAGmB;AAEN,QAAA,YAAY,GAAG,IAAA,uCAA8B,EAAC;IACzD,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,gCAAgC;IAC7C,OAAO,EAAE,iCAAwB,CAAC,aAAa;IAC/C,QAAQ,EAAE,gCAAgC;IAC1C,UAAU,EAAE;QACV,OAAO,EAAE;YACP,EAAE,EAAE,sCAAsC;YAC1C,IAAI,EAAE,yBAAyB;YAC/B,WAAW,EAAE,EAAE;YACf,YAAY,EAAE,KAAK;YACnB,IAAI,EAAE,IAAI;YACV,SAAS,EAAE,0BAA0B;YACrC,OAAO,EAAE,0BAA0B;YACnC,WAAW,EAAE,0BAA0B;YACvC,OAAO,EAAE,IAAI;YACb,OAAO,EAAE;gBACP,EAAE,EAAE,sCAAsC;gBAC1C,IAAI,EAAE,yBAAyB;gBAC/B,eAAe,EAAE,eAAe;gBAChC,gBAAgB,EAAE,mBAAmB;gBACrC,MAAM,EAAE,EAAE;aACX;YACD,KAAK,EAAE,IAAI;YACX,YAAY,EAAE;gBACZ;oBACE,EAAE,EAAE,sCAAsC;oBAC1C,OAAO,EAAE,KAAK;oBACd,KAAK,EAAE;wBACL,EAAE,EAAE,sCAAsC;wBAC1C,KAAK,EAAE,mBAAmB;wBAC1B,QAAQ,EAAE,IAAI;wBACd,SAAS,EAAE,eAAe;qBAC3B;oBACD,IAAI,EAAE,IAAI;iBACX;gBACD;oBACE,EAAE,EAAE,sCAAsC;oBAC1C,OAAO,EAAE,IAAI;oBACb,KAAK,EAAE,IAAI;oBACX,IAAI,EAAE;wBACJ,EAAE,EAAE,sCAAsC;wBAC1C,KAAK,EAAE,mBAAmB;wBAC1B,QAAQ,EAAE,QAAQ;wBAClB,SAAS,EAAE,QAAQ;qBACpB;iBACF;aACF;SACF;KACF;CACF,CAAC,CAAC"}
@@ -1,9 +0,0 @@
1
- export declare const bookingStarted: import("dist/packages/pieces/community/framework/src").ITrigger<import("dist/packages/shared/src").TriggerStrategy.WEBHOOK, import("dist/packages/pieces/community/framework/src").SecretTextProperty<true>, {
2
- permission: import("dist/packages/pieces/community/framework/src").StaticDropdownProperty<string, true>;
3
- }> | import("dist/packages/pieces/community/framework/src").ITrigger<import("dist/packages/shared/src").TriggerStrategy.POLLING, import("dist/packages/pieces/community/framework/src").SecretTextProperty<true>, {
4
- permission: import("dist/packages/pieces/community/framework/src").StaticDropdownProperty<string, true>;
5
- }> | import("dist/packages/pieces/community/framework/src").ITrigger<import("dist/packages/shared/src").TriggerStrategy.MANUAL, import("dist/packages/pieces/community/framework/src").SecretTextProperty<true>, {
6
- permission: import("dist/packages/pieces/community/framework/src").StaticDropdownProperty<string, true>;
7
- }> | import("dist/packages/pieces/community/framework/src").ITrigger<import("dist/packages/shared/src").TriggerStrategy.APP_WEBHOOK, import("dist/packages/pieces/community/framework/src").SecretTextProperty<true>, {
8
- permission: import("dist/packages/pieces/community/framework/src").StaticDropdownProperty<string, true>;
9
- }>;
@@ -1,57 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.bookingStarted = void 0;
4
- const common_1 = require("../common");
5
- exports.bookingStarted = (0, common_1.createSessionsUsWebhookTrigger)({
6
- name: 'booking_started',
7
- displayName: 'Booking Started',
8
- description: 'Triggered when a booking starts.',
9
- trigger: common_1.SessionsUsWebhookTrigger.BOOKING_STARTED,
10
- storeKey: 'sessions_booking_started_trigger',
11
- sampleData: {
12
- session: {
13
- id: '2f8547a5-5c36-49ea-bc21-c61e337d89a3',
14
- name: 'Talk with Active Pieces',
15
- description: '',
16
- quickSession: false,
17
- room: null,
18
- createdAt: '2023-11-30T10:21:41.372Z',
19
- startAt: '2023-11-30T10:30:00.000Z',
20
- actualStart: '2023-11-30T10:34:37.799Z',
21
- endedAt: null,
22
- booking: {
23
- id: '3df6dbdb-9a6c-41e6-89b2-d7a38233163e',
24
- name: 'Talk with Active Pieces',
25
- participantName: 'Active Pieces',
26
- participantEmail: 'example@gmail.com',
27
- guests: [],
28
- },
29
- event: null,
30
- participants: [
31
- {
32
- id: '2021014e-5e28-498f-9fe3-3428ce40c9c4',
33
- isOwner: false,
34
- guest: {
35
- id: '529e6bc0-af38-4365-a0b2-5530d8207ecb',
36
- email: 'example@gmail.com',
37
- lastName: null,
38
- firstName: 'Active Pieces',
39
- },
40
- user: null,
41
- },
42
- {
43
- id: '529b967f-de3d-4dec-a865-35637c294f9c',
44
- isOwner: true,
45
- guest: null,
46
- user: {
47
- id: '9090bd7c-0cf9-4716-837e-43f3821a65c4',
48
- email: 'email@example.com',
49
- lastName: 'Pieces',
50
- firstName: 'Active',
51
- },
52
- },
53
- ],
54
- },
55
- },
56
- });
57
- //# sourceMappingURL=booking-started.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"booking-started.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/sessions-us/src/lib/triggers/booking-started.ts"],"names":[],"mappings":";;;AAAA,sCAGmB;AAEN,QAAA,cAAc,GAAG,IAAA,uCAA8B,EAAC;IAC3D,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,kCAAkC;IAC/C,OAAO,EAAE,iCAAwB,CAAC,eAAe;IACjD,QAAQ,EAAE,kCAAkC;IAC5C,UAAU,EAAE;QACV,OAAO,EAAE;YACP,EAAE,EAAE,sCAAsC;YAC1C,IAAI,EAAE,yBAAyB;YAC/B,WAAW,EAAE,EAAE;YACf,YAAY,EAAE,KAAK;YACnB,IAAI,EAAE,IAAI;YACV,SAAS,EAAE,0BAA0B;YACrC,OAAO,EAAE,0BAA0B;YACnC,WAAW,EAAE,0BAA0B;YACvC,OAAO,EAAE,IAAI;YACb,OAAO,EAAE;gBACP,EAAE,EAAE,sCAAsC;gBAC1C,IAAI,EAAE,yBAAyB;gBAC/B,eAAe,EAAE,eAAe;gBAChC,gBAAgB,EAAE,mBAAmB;gBACrC,MAAM,EAAE,EAAE;aACX;YACD,KAAK,EAAE,IAAI;YACX,YAAY,EAAE;gBACZ;oBACE,EAAE,EAAE,sCAAsC;oBAC1C,OAAO,EAAE,KAAK;oBACd,KAAK,EAAE;wBACL,EAAE,EAAE,sCAAsC;wBAC1C,KAAK,EAAE,mBAAmB;wBAC1B,QAAQ,EAAE,IAAI;wBACd,SAAS,EAAE,eAAe;qBAC3B;oBACD,IAAI,EAAE,IAAI;iBACX;gBACD;oBACE,EAAE,EAAE,sCAAsC;oBAC1C,OAAO,EAAE,IAAI;oBACb,KAAK,EAAE,IAAI;oBACX,IAAI,EAAE;wBACJ,EAAE,EAAE,sCAAsC;wBAC1C,KAAK,EAAE,mBAAmB;wBAC1B,QAAQ,EAAE,QAAQ;wBAClB,SAAS,EAAE,QAAQ;qBACpB;iBACF;aACF;SACF;KACF;CACF,CAAC,CAAC"}
@@ -1,9 +0,0 @@
1
- export declare const eventCreated: import("dist/packages/pieces/community/framework/src").ITrigger<import("dist/packages/shared/src").TriggerStrategy.WEBHOOK, import("dist/packages/pieces/community/framework/src").SecretTextProperty<true>, {
2
- permission: import("dist/packages/pieces/community/framework/src").StaticDropdownProperty<string, true>;
3
- }> | import("dist/packages/pieces/community/framework/src").ITrigger<import("dist/packages/shared/src").TriggerStrategy.POLLING, import("dist/packages/pieces/community/framework/src").SecretTextProperty<true>, {
4
- permission: import("dist/packages/pieces/community/framework/src").StaticDropdownProperty<string, true>;
5
- }> | import("dist/packages/pieces/community/framework/src").ITrigger<import("dist/packages/shared/src").TriggerStrategy.MANUAL, import("dist/packages/pieces/community/framework/src").SecretTextProperty<true>, {
6
- permission: import("dist/packages/pieces/community/framework/src").StaticDropdownProperty<string, true>;
7
- }> | import("dist/packages/pieces/community/framework/src").ITrigger<import("dist/packages/shared/src").TriggerStrategy.APP_WEBHOOK, import("dist/packages/pieces/community/framework/src").SecretTextProperty<true>, {
8
- permission: import("dist/packages/pieces/community/framework/src").StaticDropdownProperty<string, true>;
9
- }>;
@@ -1,43 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.eventCreated = void 0;
4
- const common_1 = require("../common");
5
- exports.eventCreated = (0, common_1.createSessionsUsWebhookTrigger)({
6
- name: 'event_created',
7
- displayName: 'Event Created',
8
- description: 'Triggered when a new event is created.',
9
- trigger: common_1.SessionsUsWebhookTrigger.EVENT_CREATED,
10
- storeKey: 'sessions_event_created_trigger',
11
- sampleData: {
12
- session: {
13
- id: '8208f783-fba9-4045-ae6e-dea64f5ab7ea',
14
- name: 'My Best Event',
15
- description: null,
16
- quickSession: false,
17
- room: null,
18
- createdAt: '2023-11-30T10:46:13.675Z',
19
- startAt: '2023-11-30T11:00:00.000Z',
20
- actualStart: null,
21
- endedAt: null,
22
- booking: null,
23
- event: {
24
- id: '52259a5f-f706-41d9-8b58-1b8796bd0ffc',
25
- slug: 'f34bd8a5-a7d9-47f2-aee9-031d10a76b75-83897/my-best-event',
26
- },
27
- participants: [
28
- {
29
- id: 'd98f984f-982b-4a17-8a3d-093a4a774b49',
30
- isOwner: true,
31
- guest: null,
32
- user: {
33
- id: '9090bd7c-0cf9-4716-837e-43f3821a65c4',
34
- email: 'email@example.com',
35
- lastName: 'Pieces',
36
- firstName: 'Active',
37
- },
38
- },
39
- ],
40
- },
41
- },
42
- });
43
- //# sourceMappingURL=event-created.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"event-created.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/sessions-us/src/lib/triggers/event-created.ts"],"names":[],"mappings":";;;AAAA,sCAGmB;AAEN,QAAA,YAAY,GAAG,IAAA,uCAA8B,EAAC;IACzD,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,wCAAwC;IACrD,OAAO,EAAE,iCAAwB,CAAC,aAAa;IAC/C,QAAQ,EAAE,gCAAgC;IAC1C,UAAU,EAAE;QACV,OAAO,EAAE;YACP,EAAE,EAAE,sCAAsC;YAC1C,IAAI,EAAE,eAAe;YACrB,WAAW,EAAE,IAAI;YACjB,YAAY,EAAE,KAAK;YACnB,IAAI,EAAE,IAAI;YACV,SAAS,EAAE,0BAA0B;YACrC,OAAO,EAAE,0BAA0B;YACnC,WAAW,EAAE,IAAI;YACjB,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,IAAI;YACb,KAAK,EAAE;gBACL,EAAE,EAAE,sCAAsC;gBAC1C,IAAI,EAAE,0DAA0D;aACjE;YACD,YAAY,EAAE;gBACZ;oBACE,EAAE,EAAE,sCAAsC;oBAC1C,OAAO,EAAE,IAAI;oBACb,KAAK,EAAE,IAAI;oBACX,IAAI,EAAE;wBACJ,EAAE,EAAE,sCAAsC;wBAC1C,KAAK,EAAE,mBAAmB;wBAC1B,QAAQ,EAAE,QAAQ;wBAClB,SAAS,EAAE,QAAQ;qBACpB;iBACF;aACF;SACF;KACF;CACF,CAAC,CAAC"}