cv-contracts 0.0.13 → 0.0.15

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 (61) hide show
  1. package/dist/index.d.ts +1 -0
  2. package/dist/index.js +1 -0
  3. package/dist/index.js.map +1 -1
  4. package/dist/schemas/AsyncMeetingStatsSchema.d.ts +65 -0
  5. package/dist/schemas/AsyncMeetingStatsSchema.js +84 -0
  6. package/dist/schemas/AsyncMeetingStatsSchema.js.map +1 -0
  7. package/dist/schemas/BasicUserSchema.d.ts +22 -0
  8. package/dist/schemas/BasicUserSchema.js +27 -0
  9. package/dist/schemas/BasicUserSchema.js.map +1 -0
  10. package/dist/schemas/ChannelSchema.d.ts +164 -0
  11. package/dist/schemas/ChannelSchema.js +207 -0
  12. package/dist/schemas/ChannelSchema.js.map +1 -0
  13. package/dist/schemas/ChannelUserJoinedSchema.d.ts +175 -0
  14. package/dist/schemas/ChannelUserJoinedSchema.js +218 -0
  15. package/dist/schemas/ChannelUserJoinedSchema.js.map +1 -0
  16. package/dist/schemas/ChannelUserLeftSchema.d.ts +175 -0
  17. package/dist/schemas/ChannelUserLeftSchema.js +218 -0
  18. package/dist/schemas/ChannelUserLeftSchema.js.map +1 -0
  19. package/dist/schemas/ChannelUserRemovedSchema.d.ts +179 -0
  20. package/dist/schemas/ChannelUserRemovedSchema.js +222 -0
  21. package/dist/schemas/ChannelUserRemovedSchema.js.map +1 -0
  22. package/dist/schemas/ChannelUsersAddedSchema.d.ts +182 -0
  23. package/dist/schemas/ChannelUsersAddedSchema.js +225 -0
  24. package/dist/schemas/ChannelUsersAddedSchema.js.map +1 -0
  25. package/dist/schemas/LabelSchema.d.ts +56 -0
  26. package/dist/schemas/LabelSchema.js +61 -0
  27. package/dist/schemas/LabelSchema.js.map +1 -0
  28. package/dist/schemas/MessageSchema.d.ts +96 -0
  29. package/dist/schemas/MessageSchema.js +121 -0
  30. package/dist/schemas/MessageSchema.js.map +1 -0
  31. package/dist/schemas/SubscribedUserSettingsSchema.d.ts +22 -0
  32. package/dist/schemas/SubscribedUserSettingsSchema.js +27 -0
  33. package/dist/schemas/SubscribedUserSettingsSchema.js.map +1 -0
  34. package/dist/schemas/SubscriptionFilterSchema.d.ts +21 -0
  35. package/dist/schemas/SubscriptionFilterSchema.js +26 -0
  36. package/dist/schemas/SubscriptionFilterSchema.js.map +1 -0
  37. package/dist/schemas/WebhookPayloadSchema.d.ts +85 -0
  38. package/dist/schemas/WebhookPayloadSchema.js +132 -0
  39. package/dist/schemas/WebhookPayloadSchema.js.map +1 -0
  40. package/dist/schemas/WorkspaceFindableChannelCreatedSchema.d.ts +196 -0
  41. package/dist/schemas/WorkspaceFindableChannelCreatedSchema.js +247 -0
  42. package/dist/schemas/WorkspaceFindableChannelCreatedSchema.js.map +1 -0
  43. package/dist/schemas/WorkspaceSchema.d.ts +50 -0
  44. package/dist/schemas/WorkspaceSchema.js +63 -0
  45. package/dist/schemas/WorkspaceSchema.js.map +1 -0
  46. package/dist/schemas/WorkspaceUserAddedSchema.d.ts +73 -0
  47. package/dist/schemas/WorkspaceUserAddedSchema.js +86 -0
  48. package/dist/schemas/WorkspaceUserAddedSchema.js.map +1 -0
  49. package/dist/schemas/WorkspaceUserJoinedSchema.d.ts +73 -0
  50. package/dist/schemas/WorkspaceUserJoinedSchema.js +86 -0
  51. package/dist/schemas/WorkspaceUserJoinedSchema.js.map +1 -0
  52. package/dist/schemas/WorkspaceUserLeftSchema.d.ts +73 -0
  53. package/dist/schemas/WorkspaceUserLeftSchema.js +86 -0
  54. package/dist/schemas/WorkspaceUserLeftSchema.js.map +1 -0
  55. package/dist/schemas/WorkspaceUserRemovedSchema.d.ts +77 -0
  56. package/dist/schemas/WorkspaceUserRemovedSchema.js +90 -0
  57. package/dist/schemas/WorkspaceUserRemovedSchema.js.map +1 -0
  58. package/dist/schemas/index.d.ts +18 -0
  59. package/dist/schemas/index.js +35 -0
  60. package/dist/schemas/index.js.map +1 -0
  61. package/package.json +5 -3
@@ -0,0 +1,121 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MessageKeys = exports.MessageSchema = void 0;
4
+ exports.MessageSchema = {
5
+ type: 'object',
6
+ properties: {
7
+ message_guid: {
8
+ type: 'string',
9
+ },
10
+ creator_guid: {
11
+ type: 'string',
12
+ },
13
+ channel_guid: {
14
+ type: ['null', 'string'],
15
+ },
16
+ workspace_guid: {
17
+ type: ['null', 'string'],
18
+ },
19
+ created_at: {
20
+ type: 'number',
21
+ },
22
+ last_updated_at: {
23
+ type: 'number',
24
+ },
25
+ deleted_at: {
26
+ type: ['null', 'number'],
27
+ },
28
+ duration_ms: {
29
+ type: 'number',
30
+ },
31
+ message_url: {
32
+ type: ['null', 'string'],
33
+ },
34
+ audio_stream_url: {
35
+ type: ['null', 'string'],
36
+ },
37
+ transcript_txt: {
38
+ type: ['null', 'string'],
39
+ },
40
+ ai_summary_txt: {
41
+ type: ['null', 'string'],
42
+ },
43
+ has_ai_summary: {
44
+ type: 'boolean',
45
+ },
46
+ waveform_url: {
47
+ type: ['null', 'string'],
48
+ },
49
+ reply_count: {
50
+ type: 'number',
51
+ },
52
+ parent_message_guid: {
53
+ type: ['null', 'string'],
54
+ },
55
+ language: {
56
+ type: ['null', 'string'],
57
+ },
58
+ status: {
59
+ $ref: '#/definitions/MessageStatus',
60
+ },
61
+ type: {
62
+ $ref: '#/definitions/MessageType',
63
+ },
64
+ },
65
+ additionalProperties: false,
66
+ required: [
67
+ 'created_at',
68
+ 'creator_guid',
69
+ 'duration_ms',
70
+ 'last_updated_at',
71
+ 'message_guid',
72
+ 'reply_count',
73
+ 'status',
74
+ 'type',
75
+ ],
76
+ definitions: {
77
+ MessageStatus: {
78
+ type: 'string',
79
+ enum: [
80
+ 'offline',
81
+ 'paused',
82
+ 'processing',
83
+ 'scheduled',
84
+ 'active',
85
+ 'deleted',
86
+ 'account-deleted',
87
+ 'initializing',
88
+ 'inprogress',
89
+ 'canceled',
90
+ ],
91
+ },
92
+ MessageType: {
93
+ type: 'string',
94
+ enum: ['channel', 'prerecorded', 'voicememo', 'stored', 'welcome'],
95
+ },
96
+ },
97
+ $schema: 'http://json-schema.org/draft-07/schema#',
98
+ };
99
+ var MessageKeys;
100
+ (function (MessageKeys) {
101
+ MessageKeys["message_guid"] = "message_guid";
102
+ MessageKeys["creator_guid"] = "creator_guid";
103
+ MessageKeys["channel_guid"] = "channel_guid";
104
+ MessageKeys["workspace_guid"] = "workspace_guid";
105
+ MessageKeys["created_at"] = "created_at";
106
+ MessageKeys["last_updated_at"] = "last_updated_at";
107
+ MessageKeys["deleted_at"] = "deleted_at";
108
+ MessageKeys["duration_ms"] = "duration_ms";
109
+ MessageKeys["message_url"] = "message_url";
110
+ MessageKeys["audio_stream_url"] = "audio_stream_url";
111
+ MessageKeys["transcript_txt"] = "transcript_txt";
112
+ MessageKeys["ai_summary_txt"] = "ai_summary_txt";
113
+ MessageKeys["has_ai_summary"] = "has_ai_summary";
114
+ MessageKeys["waveform_url"] = "waveform_url";
115
+ MessageKeys["reply_count"] = "reply_count";
116
+ MessageKeys["parent_message_guid"] = "parent_message_guid";
117
+ MessageKeys["language"] = "language";
118
+ MessageKeys["status"] = "status";
119
+ MessageKeys["type"] = "type";
120
+ })(MessageKeys = exports.MessageKeys || (exports.MessageKeys = {}));
121
+ //# sourceMappingURL=MessageSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessageSchema.js","sourceRoot":"","sources":["../../src/schemas/MessageSchema.ts"],"names":[],"mappings":";;;AAAa,QAAA,aAAa,GAAG;IAC3B,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,YAAY,EAAE;YACZ,IAAI,EAAE,QAAQ;SACf;QACD,YAAY,EAAE;YACZ,IAAI,EAAE,QAAQ;SACf;QACD,YAAY,EAAE;YACZ,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;SACzB;QACD,cAAc,EAAE;YACd,IAAI,EAAE,CAAC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AS;gBACT,iBAAiB;gBACjB,cAAc;gBACd,YAAY;gBACZ,UAAU;aACX;SACF;QACD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,SAAS,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,CAAC;SACnE;KACF;IACD,OAAO,EAAE,yCAAyC;CAC1C,CAAC;AAEX,IAAY,WAoBX;AApBD,WAAY,WAAW;IACrB,4CAA6B,CAAA;IAC7B,4CAA6B,CAAA;IAC7B,4CAA6B,CAAA;IAC7B,gDAAiC,CAAA;IACjC,wCAAyB,CAAA;IACzB,kDAAmC,CAAA;IACnC,wCAAyB,CAAA;IACzB,0CAA2B,CAAA;IAC3B,0CAA2B,CAAA;IAC3B,oDAAqC,CAAA;IACrC,gDAAiC,CAAA;IACjC,gDAAiC,CAAA;IACjC,gDAAiC,CAAA;IACjC,4CAA6B,CAAA;IAC7B,0CAA2B,CAAA;IAC3B,0DAA2C,CAAA;IAC3C,oCAAqB,CAAA;IACrB,gCAAiB,CAAA;IACjB,4BAAa,CAAA;AACf,CAAC,EApBW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAoBtB"}
@@ -0,0 +1,22 @@
1
+ export declare const SubscribedUserSettingsSchema: {
2
+ readonly type: "object";
3
+ readonly properties: {
4
+ readonly userId: {
5
+ readonly type: "string";
6
+ };
7
+ readonly defaultLanguage: {
8
+ readonly type: "string";
9
+ };
10
+ readonly timezone: {
11
+ readonly type: "number";
12
+ };
13
+ };
14
+ readonly additionalProperties: false;
15
+ readonly required: readonly ["userId"];
16
+ readonly $schema: "http://json-schema.org/draft-07/schema#";
17
+ };
18
+ export declare enum SubscribedUserSettingsKeys {
19
+ userId = "userId",
20
+ defaultLanguage = "defaultLanguage",
21
+ timezone = "timezone"
22
+ }
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubscribedUserSettingsKeys = exports.SubscribedUserSettingsSchema = void 0;
4
+ exports.SubscribedUserSettingsSchema = {
5
+ type: 'object',
6
+ properties: {
7
+ userId: {
8
+ type: 'string',
9
+ },
10
+ defaultLanguage: {
11
+ type: 'string',
12
+ },
13
+ timezone: {
14
+ type: 'number',
15
+ },
16
+ },
17
+ additionalProperties: false,
18
+ required: ['userId'],
19
+ $schema: 'http://json-schema.org/draft-07/schema#',
20
+ };
21
+ var SubscribedUserSettingsKeys;
22
+ (function (SubscribedUserSettingsKeys) {
23
+ SubscribedUserSettingsKeys["userId"] = "userId";
24
+ SubscribedUserSettingsKeys["defaultLanguage"] = "defaultLanguage";
25
+ SubscribedUserSettingsKeys["timezone"] = "timezone";
26
+ })(SubscribedUserSettingsKeys = exports.SubscribedUserSettingsKeys || (exports.SubscribedUserSettingsKeys = {}));
27
+ //# sourceMappingURL=SubscribedUserSettingsSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SubscribedUserSettingsSchema.js","sourceRoot":"","sources":["../../src/schemas/SubscribedUserSettingsSchema.ts"],"names":[],"mappings":";;;AAAa,QAAA,4BAA4B,GAAG;IAC1C,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;SACf;QACD,eAAe,EAAE;YACf,IAAI,EAAE,QAAQ;SACf;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,QAAQ;SACf;KACF;IACD,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC,QAAQ,CAAC;IACpB,OAAO,EAAE,yCAAyC;CAC1C,CAAC;AAEX,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IACpC,+CAAiB,CAAA;IACjB,iEAAmC,CAAA;IACnC,mDAAqB,CAAA;AACvB,CAAC,EAJW,0BAA0B,GAA1B,kCAA0B,KAA1B,kCAA0B,QAIrC"}
@@ -0,0 +1,21 @@
1
+ export declare const SubscriptionFilterSchema: {
2
+ readonly type: "object";
3
+ readonly properties: {
4
+ readonly key: {
5
+ readonly type: "string";
6
+ };
7
+ readonly value: {};
8
+ readonly operator: {
9
+ readonly type: "string";
10
+ readonly const: "eq";
11
+ };
12
+ };
13
+ readonly additionalProperties: false;
14
+ readonly required: readonly ["key", "operator", "value"];
15
+ readonly $schema: "http://json-schema.org/draft-07/schema#";
16
+ };
17
+ export declare enum SubscriptionFilterKeys {
18
+ key = "key",
19
+ value = "value",
20
+ operator = "operator"
21
+ }
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubscriptionFilterKeys = exports.SubscriptionFilterSchema = void 0;
4
+ exports.SubscriptionFilterSchema = {
5
+ type: 'object',
6
+ properties: {
7
+ key: {
8
+ type: 'string',
9
+ },
10
+ value: {},
11
+ operator: {
12
+ type: 'string',
13
+ const: 'eq',
14
+ },
15
+ },
16
+ additionalProperties: false,
17
+ required: ['key', 'operator', 'value'],
18
+ $schema: 'http://json-schema.org/draft-07/schema#',
19
+ };
20
+ var SubscriptionFilterKeys;
21
+ (function (SubscriptionFilterKeys) {
22
+ SubscriptionFilterKeys["key"] = "key";
23
+ SubscriptionFilterKeys["value"] = "value";
24
+ SubscriptionFilterKeys["operator"] = "operator";
25
+ })(SubscriptionFilterKeys = exports.SubscriptionFilterKeys || (exports.SubscriptionFilterKeys = {}));
26
+ //# sourceMappingURL=SubscriptionFilterSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SubscriptionFilterSchema.js","sourceRoot":"","sources":["../../src/schemas/SubscriptionFilterSchema.ts"],"names":[],"mappings":";;;AAAa,QAAA,wBAAwB,GAAG;IACtC,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,GAAG,EAAE;YACH,IAAI,EAAE,QAAQ;SACf;QACD,KAAK,EAAE,EAAE;QACT,QAAQ,EAAE;YACR,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,IAAI;SACZ;KACF;IACD,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,CAAC;IACtC,OAAO,EAAE,yCAAyC;CAC1C,CAAC;AAEX,IAAY,sBAIX;AAJD,WAAY,sBAAsB;IAChC,qCAAW,CAAA;IACX,yCAAe,CAAA;IACf,+CAAqB,CAAA;AACvB,CAAC,EAJW,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAIjC"}
@@ -0,0 +1,85 @@
1
+ export declare const WebhookPayloadSchema: {
2
+ readonly type: "object";
3
+ readonly properties: {
4
+ readonly eventName: {
5
+ readonly $ref: "#/definitions/SubscriptionEvents";
6
+ readonly description: "The event name that happened";
7
+ };
8
+ readonly subscribedUserIds: {
9
+ readonly description: "List of userIds that are subscribed to the event";
10
+ readonly type: "array";
11
+ readonly items: {
12
+ readonly type: "string";
13
+ };
14
+ };
15
+ readonly subscribedUserSettings: {
16
+ readonly description: "List of subscribed users settings";
17
+ readonly type: "array";
18
+ readonly items: {
19
+ readonly $ref: "#/definitions/SubscribedUserSettings";
20
+ };
21
+ };
22
+ readonly data: {
23
+ readonly type: "object";
24
+ readonly properties: {
25
+ readonly eventName: {
26
+ readonly $ref: "#/definitions/SubscriptionEvents";
27
+ readonly description: "The event name that happened";
28
+ };
29
+ readonly resourceId: {
30
+ readonly description: "The resource id e.g: MessageId, ChannelId, WorkspaceId";
31
+ readonly type: "string";
32
+ };
33
+ readonly resourceType: {
34
+ readonly $ref: "#/definitions/ResourceType";
35
+ readonly description: "The type of the resource";
36
+ };
37
+ readonly resource: {
38
+ readonly $ref: "#/definitions/Resource";
39
+ readonly description: "The resource data, varies by event";
40
+ };
41
+ };
42
+ readonly additionalProperties: false;
43
+ readonly required: readonly ["eventName", "resource", "resourceId", "resourceType"];
44
+ };
45
+ };
46
+ readonly additionalProperties: false;
47
+ readonly required: readonly ["data", "eventName", "subscribedUserIds"];
48
+ readonly definitions: {
49
+ readonly SubscriptionEvents: {
50
+ readonly type: "string";
51
+ readonly enum: readonly ["message.initializing", "message.started", "message.paused", "message.resumed", "message.offline", "message.processing", "message.finished", "message.deleted", "message.discussion-notes.added", "message.label.added", "channel.created", "channel.deleted", "channel.user.joined", "channel.users.added", "channel.user.left", "channel.user.removed", "channel.async-check.mid", "channel.async-check.ending", "channel.async.ended", "channel.async.extended", "channel.async.shortened", "channel.ai-summary.generated", "workspace.user.joined", "workspace.user.added", "workspace.user.left", "workspace.user.removed", "workspace.findable-channel.created", "access_token.expired", "refresh_token.expired"];
52
+ };
53
+ readonly SubscribedUserSettings: {
54
+ readonly type: "object";
55
+ readonly properties: {
56
+ readonly userId: {
57
+ readonly type: "string";
58
+ };
59
+ readonly defaultLanguage: {
60
+ readonly type: "string";
61
+ };
62
+ readonly timezone: {
63
+ readonly type: "number";
64
+ };
65
+ };
66
+ readonly additionalProperties: false;
67
+ readonly required: readonly ["userId"];
68
+ };
69
+ readonly ResourceType: {
70
+ readonly type: "string";
71
+ readonly enum: readonly ["Message", "Channel", "ChannelUsersAdded", "ChannelUserJoined", "ChannelUserRemoved", "ChannelUserLeft", "Workspace", "WorkspaceUserJoined", "WorkspaceUserRemoved", "WorkspaceUserLeft", "WorkspaceFindableChannelCreated"];
72
+ };
73
+ readonly Resource: {
74
+ readonly type: "object";
75
+ readonly additionalProperties: false;
76
+ };
77
+ };
78
+ readonly $schema: "http://json-schema.org/draft-07/schema#";
79
+ };
80
+ export declare enum WebhookPayloadKeys {
81
+ eventName = "eventName",
82
+ subscribedUserIds = "subscribedUserIds",
83
+ subscribedUserSettings = "subscribedUserSettings",
84
+ data = "data"
85
+ }
@@ -0,0 +1,132 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WebhookPayloadKeys = exports.WebhookPayloadSchema = void 0;
4
+ exports.WebhookPayloadSchema = {
5
+ type: 'object',
6
+ properties: {
7
+ eventName: {
8
+ $ref: '#/definitions/SubscriptionEvents',
9
+ description: 'The event name that happened',
10
+ },
11
+ subscribedUserIds: {
12
+ description: 'List of userIds that are subscribed to the event',
13
+ type: 'array',
14
+ items: {
15
+ type: 'string',
16
+ },
17
+ },
18
+ subscribedUserSettings: {
19
+ description: 'List of subscribed users settings',
20
+ type: 'array',
21
+ items: {
22
+ $ref: '#/definitions/SubscribedUserSettings',
23
+ },
24
+ },
25
+ data: {
26
+ type: 'object',
27
+ properties: {
28
+ eventName: {
29
+ $ref: '#/definitions/SubscriptionEvents',
30
+ description: 'The event name that happened',
31
+ },
32
+ resourceId: {
33
+ description: 'The resource id e.g: MessageId, ChannelId, WorkspaceId',
34
+ type: 'string',
35
+ },
36
+ resourceType: {
37
+ $ref: '#/definitions/ResourceType',
38
+ description: 'The type of the resource',
39
+ },
40
+ resource: {
41
+ $ref: '#/definitions/Resource',
42
+ description: 'The resource data, varies by event',
43
+ },
44
+ },
45
+ additionalProperties: false,
46
+ required: ['eventName', 'resource', 'resourceId', 'resourceType'],
47
+ },
48
+ },
49
+ additionalProperties: false,
50
+ required: ['data', 'eventName', 'subscribedUserIds'],
51
+ definitions: {
52
+ SubscriptionEvents: {
53
+ type: 'string',
54
+ enum: [
55
+ 'message.initializing',
56
+ 'message.started',
57
+ 'message.paused',
58
+ 'message.resumed',
59
+ 'message.offline',
60
+ 'message.processing',
61
+ 'message.finished',
62
+ 'message.deleted',
63
+ 'message.discussion-notes.added',
64
+ 'message.label.added',
65
+ 'channel.created',
66
+ 'channel.deleted',
67
+ 'channel.user.joined',
68
+ 'channel.users.added',
69
+ 'channel.user.left',
70
+ 'channel.user.removed',
71
+ 'channel.async-check.mid',
72
+ 'channel.async-check.ending',
73
+ 'channel.async.ended',
74
+ 'channel.async.extended',
75
+ 'channel.async.shortened',
76
+ 'channel.ai-summary.generated',
77
+ 'workspace.user.joined',
78
+ 'workspace.user.added',
79
+ 'workspace.user.left',
80
+ 'workspace.user.removed',
81
+ 'workspace.findable-channel.created',
82
+ 'access_token.expired',
83
+ 'refresh_token.expired',
84
+ ],
85
+ },
86
+ SubscribedUserSettings: {
87
+ type: 'object',
88
+ properties: {
89
+ userId: {
90
+ type: 'string',
91
+ },
92
+ defaultLanguage: {
93
+ type: 'string',
94
+ },
95
+ timezone: {
96
+ type: 'number',
97
+ },
98
+ },
99
+ additionalProperties: false,
100
+ required: ['userId'],
101
+ },
102
+ ResourceType: {
103
+ type: 'string',
104
+ enum: [
105
+ 'Message',
106
+ 'Channel',
107
+ 'ChannelUsersAdded',
108
+ 'ChannelUserJoined',
109
+ 'ChannelUserRemoved',
110
+ 'ChannelUserLeft',
111
+ 'Workspace',
112
+ 'WorkspaceUserJoined',
113
+ 'WorkspaceUserRemoved',
114
+ 'WorkspaceUserLeft',
115
+ 'WorkspaceFindableChannelCreated',
116
+ ],
117
+ },
118
+ Resource: {
119
+ type: 'object',
120
+ additionalProperties: false,
121
+ },
122
+ },
123
+ $schema: 'http://json-schema.org/draft-07/schema#',
124
+ };
125
+ var WebhookPayloadKeys;
126
+ (function (WebhookPayloadKeys) {
127
+ WebhookPayloadKeys["eventName"] = "eventName";
128
+ WebhookPayloadKeys["subscribedUserIds"] = "subscribedUserIds";
129
+ WebhookPayloadKeys["subscribedUserSettings"] = "subscribedUserSettings";
130
+ WebhookPayloadKeys["data"] = "data";
131
+ })(WebhookPayloadKeys = exports.WebhookPayloadKeys || (exports.WebhookPayloadKeys = {}));
132
+ //# sourceMappingURL=WebhookPayloadSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WebhookPayloadSchema.js","sourceRoot":"","sources":["../../src/schemas/WebhookPayloadSchema.ts"],"names":[],"mappings":";;;AAAa,QAAA,oBAAoB,GAAG;IAClC,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,SAAS,EAAE;YACT,IAAI,EAAE,kCAAkC;YACxC,WAAW,EAAE,8BAA8B;SAC5C;QACD,iBAAiB,EAAE;YACjB,WAAW,EAAE,mDAAmD;YAChE,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;aACf;SACF;QACD,sBAAsB,EAAE;YACtB,WAAW,E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AsB,EAAE;YACtB,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;iBACf;gBACD,eAAe,EAAE;oBACf,IAAI,EAAE,QAAQ;iBACf;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,oBAAoB,EAAE,KAAK;YAC3B,QAAQ,EAAE,CAAC,QAAQ,CAAC;SACrB;QACD,YAAY,EAAE;YACZ,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE;gBACJ,SAAS;gBACT,SAAS;gBACT,mBAAmB;gBACnB,mBAAmB;gBACnB,oBAAoB;gBACpB,iBAAiB;gBACjB,WAAW;gBACX,qBAAqB;gBACrB,sBAAsB;gBACtB,mBAAmB;gBACnB,iCAAiC;aAClC;SACF;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,QAAQ;YACd,oBAAoB,EAAE,KAAK;SAC5B;KACF;IACD,OAAO,EAAE,yCAAyC;CAC1C,CAAC;AAEX,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC5B,6CAAuB,CAAA;IACvB,6DAAuC,CAAA;IACvC,uEAAiD,CAAA;IACjD,mCAAa,CAAA;AACf,CAAC,EALW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAK7B"}
@@ -0,0 +1,196 @@
1
+ export declare const WorkspaceFindableChannelCreatedSchema: {
2
+ readonly type: "object";
3
+ readonly properties: {
4
+ readonly channel: {
5
+ readonly $ref: "#/definitions/Channel";
6
+ };
7
+ readonly workspace: {
8
+ readonly $ref: "#/definitions/Workspace";
9
+ };
10
+ };
11
+ readonly additionalProperties: false;
12
+ readonly required: readonly ["channel", "workspace"];
13
+ readonly definitions: {
14
+ readonly Channel: {
15
+ readonly type: "object";
16
+ readonly properties: {
17
+ readonly channel_guid: {
18
+ readonly type: "string";
19
+ };
20
+ readonly channel_name: {
21
+ readonly type: "string";
22
+ };
23
+ readonly channel_description: {
24
+ readonly type: readonly ["null", "string"];
25
+ };
26
+ readonly workspace_guid: {
27
+ readonly type: "string";
28
+ };
29
+ readonly workspace_name: {
30
+ readonly type: "string";
31
+ };
32
+ readonly workspace_image_url: {
33
+ readonly type: readonly ["null", "string"];
34
+ };
35
+ readonly owner_guid: {
36
+ readonly type: "string";
37
+ };
38
+ readonly owner_first_name: {
39
+ readonly type: "string";
40
+ };
41
+ readonly owner_last_name: {
42
+ readonly type: "string";
43
+ };
44
+ readonly type: {
45
+ readonly $ref: "#/definitions/ChannelType";
46
+ };
47
+ readonly visibility: {
48
+ readonly $ref: "#/definitions/ChannelVisibility";
49
+ };
50
+ readonly total_messages: {
51
+ readonly type: "number";
52
+ };
53
+ readonly total_duration_ms: {
54
+ readonly type: "number";
55
+ };
56
+ readonly image_url: {
57
+ readonly type: readonly ["null", "string"];
58
+ };
59
+ readonly is_private: {
60
+ readonly type: "boolean";
61
+ };
62
+ readonly is_async: {
63
+ readonly type: "boolean";
64
+ };
65
+ readonly async_stats: {
66
+ readonly anyOf: readonly [{
67
+ readonly $ref: "#/definitions/AsyncMeetingStats";
68
+ }, {
69
+ readonly type: "null";
70
+ }];
71
+ };
72
+ readonly created_at: {
73
+ readonly type: "number";
74
+ };
75
+ readonly last_updated_at: {
76
+ readonly type: "number";
77
+ };
78
+ readonly deleted_at: {
79
+ readonly type: readonly ["null", "number"];
80
+ };
81
+ };
82
+ readonly additionalProperties: false;
83
+ readonly required: readonly ["channel_guid", "channel_name", "created_at", "is_async", "is_private", "last_updated_at", "owner_first_name", "owner_guid", "owner_last_name", "total_duration_ms", "total_messages", "type", "visibility", "workspace_guid", "workspace_name"];
84
+ };
85
+ readonly ChannelType: {
86
+ readonly type: "string";
87
+ readonly enum: readonly ["directMessage", "customerConversation", "namedConversation", "asyncMeeting"];
88
+ };
89
+ readonly ChannelVisibility: {
90
+ readonly type: "string";
91
+ readonly enum: readonly ["private", "workspace", "public"];
92
+ };
93
+ readonly AsyncMeetingStats: {
94
+ readonly type: "object";
95
+ readonly properties: {
96
+ readonly channel_stats: {
97
+ readonly type: "object";
98
+ readonly properties: {
99
+ readonly total_duration_milliseconds: {
100
+ readonly type: "number";
101
+ };
102
+ readonly total_heard_milliseconds: {
103
+ readonly type: "number";
104
+ };
105
+ readonly total_engaged_percentage: {
106
+ readonly type: "number";
107
+ };
108
+ readonly total_messages_posted: {
109
+ readonly type: "number";
110
+ };
111
+ readonly total_users: {
112
+ readonly type: "number";
113
+ };
114
+ };
115
+ readonly additionalProperties: false;
116
+ readonly required: readonly ["total_duration_milliseconds", "total_engaged_percentage", "total_heard_milliseconds", "total_messages_posted", "total_users"];
117
+ };
118
+ readonly user_stats: {
119
+ readonly type: "array";
120
+ readonly items: {
121
+ readonly type: "object";
122
+ readonly properties: {
123
+ readonly user_id: {
124
+ readonly type: "string";
125
+ };
126
+ readonly total_messages_posted: {
127
+ readonly type: "number";
128
+ };
129
+ readonly total_sent_milliseconds: {
130
+ readonly type: "number";
131
+ };
132
+ readonly total_heard_milliseconds: {
133
+ readonly type: "number";
134
+ };
135
+ readonly total_engaged_percentage: {
136
+ readonly type: "number";
137
+ };
138
+ readonly total_heard_messages: {
139
+ readonly type: "number";
140
+ };
141
+ readonly total_unheard_messages: {
142
+ readonly type: "number";
143
+ };
144
+ };
145
+ readonly additionalProperties: false;
146
+ readonly required: readonly ["total_engaged_percentage", "total_heard_messages", "total_heard_milliseconds", "total_messages_posted", "total_sent_milliseconds", "total_unheard_messages", "user_id"];
147
+ };
148
+ };
149
+ };
150
+ readonly additionalProperties: false;
151
+ readonly required: readonly ["channel_stats", "user_stats"];
152
+ };
153
+ readonly Workspace: {
154
+ readonly type: "object";
155
+ readonly properties: {
156
+ readonly workspace_guid: {
157
+ readonly type: "string";
158
+ };
159
+ readonly workspace_name: {
160
+ readonly type: "string";
161
+ };
162
+ readonly workspace_description: {
163
+ readonly type: readonly ["null", "string"];
164
+ };
165
+ readonly image_url: {
166
+ readonly type: readonly ["null", "string"];
167
+ };
168
+ readonly owner_guid: {
169
+ readonly type: "string";
170
+ };
171
+ readonly owner_first_name: {
172
+ readonly type: "string";
173
+ };
174
+ readonly owner_last_name: {
175
+ readonly type: "string";
176
+ };
177
+ readonly created_at: {
178
+ readonly type: "number";
179
+ };
180
+ readonly last_updated_at: {
181
+ readonly type: "number";
182
+ };
183
+ readonly deleted_at: {
184
+ readonly type: readonly ["null", "number"];
185
+ };
186
+ };
187
+ readonly additionalProperties: false;
188
+ readonly required: readonly ["created_at", "last_updated_at", "owner_first_name", "owner_guid", "owner_last_name", "workspace_guid", "workspace_name"];
189
+ };
190
+ };
191
+ readonly $schema: "http://json-schema.org/draft-07/schema#";
192
+ };
193
+ export declare enum WorkspaceFindableChannelCreatedKeys {
194
+ channel = "channel",
195
+ workspace = "workspace"
196
+ }