glitch-javascript-sdk 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -10,6 +10,34 @@ var require$$1$1 = require('util');
10
10
  var require$$1$2 = require('path');
11
11
  var require$$6 = require('fs');
12
12
 
13
+ var LabelManager = /** @class */ (function () {
14
+ function LabelManager() {
15
+ }
16
+ LabelManager.initialize = function (community) {
17
+ LabelManager.community = community;
18
+ };
19
+ LabelManager.getLabel = function (labelName, plural, capitalize) {
20
+ var label = LabelManager.community[labelName + (plural ? "_plural" : "_singular")];
21
+ if (capitalize) {
22
+ label = label.charAt(0).toUpperCase() + label.slice(1);
23
+ }
24
+ return label;
25
+ };
26
+ LabelManager.getUserLabel = function (plural, capitalize) {
27
+ return LabelManager.getLabel("label_users", plural, capitalize);
28
+ };
29
+ LabelManager.getCompetitionLabel = function (plural, capitalize) {
30
+ return LabelManager.getLabel("label_competitions", plural, capitalize);
31
+ };
32
+ LabelManager.getStreamLabel = function (plural, capitalize) {
33
+ return LabelManager.getLabel("label_streams", plural, capitalize);
34
+ };
35
+ LabelManager.getPostLabel = function (plural, capitalize) {
36
+ return LabelManager.getLabel("label_posts", plural, capitalize);
37
+ };
38
+ return LabelManager;
39
+ }());
40
+
13
41
  /******************************************************************************
14
42
  Copyright (c) Microsoft Corporation.
15
43
 
@@ -15872,6 +15900,7 @@ var Config = /** @class */ (function () {
15872
15900
  Config.setCommunity = function (community) {
15873
15901
  Config._community = community;
15874
15902
  Requests.setCommunityID(community.id);
15903
+ LabelManager.initialize(community);
15875
15904
  };
15876
15905
  Object.defineProperty(Config, "baseUrl", {
15877
15906
  /**
@@ -18143,6 +18172,16 @@ var AddressLocationType = Object.freeze({
18143
18172
  HYBRID: 3,
18144
18173
  });
18145
18174
 
18175
+ var ContentStatus = Object.freeze({
18176
+ UNAPPROVED: 0,
18177
+ APPROVED: 1,
18178
+ IN_REVIEW: 2,
18179
+ PENDING: 3,
18180
+ FLAGGED: 4,
18181
+ REMOVED: 5,
18182
+ DELETED: 6,
18183
+ });
18184
+
18146
18185
  var CompetitionTypes = Object.freeze({
18147
18186
  SINGLE_ELIMINATION: 1,
18148
18187
  DOUBLE_ELIMINATION: 2,
@@ -18162,6 +18201,14 @@ var Modes;
18162
18201
  Modes[Modes["RTMP"] = 2] = "RTMP";
18163
18202
  })(Modes || (Modes = {}));
18164
18203
 
18204
+ var PostTypes = Object.freeze({
18205
+ TEXT: 'text',
18206
+ LINK: 'link',
18207
+ POLL: 'poll',
18208
+ IMAGE: 'image',
18209
+ VIDEO: 'video',
18210
+ });
18211
+
18165
18212
  var Roles;
18166
18213
  (function (Roles) {
18167
18214
  Roles[Roles["NONE"] = 0] = "NONE";
@@ -18248,12 +18295,15 @@ var Glitch = /** @class */ (function () {
18248
18295
  Session: Session,
18249
18296
  Storage: Storage,
18250
18297
  Data: Data,
18298
+ LabelManager: LabelManager,
18251
18299
  };
18252
18300
  Glitch.constants = {
18253
18301
  AcceptanceStatus: AcceptanceStatus,
18254
18302
  AddressLocationType: AddressLocationType,
18255
18303
  CompetitionTypes: CompetitionTypes,
18304
+ ContentStatus: ContentStatus,
18256
18305
  Modes: Modes,
18306
+ PostTypes: PostTypes,
18257
18307
  Roles: Roles,
18258
18308
  TeamJoinProcess: TeamJoinProcess,
18259
18309
  TicketTypes: TicketTypes$1,