mirror of
https://github.com/spacebarchat/server.git
synced 2026-04-26 19:35:20 +00:00
add store/sku/entitlement schemas/enums
This commit is contained in:
Binary file not shown.
@@ -410,6 +410,10 @@
|
||||
{
|
||||
"value": "UserResponse",
|
||||
"reason": "Schema with only uppercase properties"
|
||||
},
|
||||
{
|
||||
"value": "SKUSchema",
|
||||
"reason": "Self-reference only schema"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { EntitlementSpecialSourceType, EntitlementType, QuestClaimRewardRequestSchema, QuestClaimRewardResponseSchema } from "@spacebar/schemas/quests";
|
||||
import { emitEvent } from "@spacebar/util";
|
||||
import { emitEvent, EntitlementGiftCodeFlags } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
@@ -74,7 +74,7 @@ router.post(
|
||||
type: EntitlementType.QUEST_REWARD,
|
||||
tenant_metadata: {},
|
||||
source_type: EntitlementSpecialSourceType.QUEST_REWARD,
|
||||
gift_code_flags: 0, // PAYMENT_SOURCE_REQUIRED, todo: make a bitfield enum
|
||||
gift_code_flags: EntitlementGiftCodeFlags.FLAGS.PAYMENT_SOURCE_REQUIRED,
|
||||
promotion_id: null,
|
||||
},
|
||||
],
|
||||
|
||||
@@ -331,6 +331,7 @@ router.get(
|
||||
}),
|
||||
async (req: Request, res: Response) => {
|
||||
// TODO: implement
|
||||
console.debug("GET /quests/@me/claimed is incomplete");
|
||||
res.json({
|
||||
quests: [],
|
||||
} as ClaimedQuestsResponseSchema);
|
||||
|
||||
@@ -56,7 +56,17 @@ router.get(
|
||||
});
|
||||
}
|
||||
|
||||
res.json({} as QuestPlacementResponseSchema);
|
||||
// TODO: implement
|
||||
console.debug(`GET /quests/decision?placement=${placement}&client_heartbeat_session_id=${client_heartbeat_session_id} is incomplete`);
|
||||
res.json({
|
||||
request_id: "unique-request-id-1234",
|
||||
quest: null,
|
||||
ad_identifiers: null,
|
||||
ad_context: null,
|
||||
response_ttl_seconds: 300,
|
||||
metadata_raw: "",
|
||||
metadata_sealed: "",
|
||||
} as QuestPlacementResponseSchema);
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2023 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export enum EntitlementFulfillmentStatus {
|
||||
UNKNOWN = 0,
|
||||
FULFILLMENT_NOT_NEEDED,
|
||||
FULFILLMENT_NEEDED,
|
||||
FULFILLED,
|
||||
FULFILLMENT_FAILED,
|
||||
UNFULFILLMENT_NEEDED,
|
||||
UNFULFILLED,
|
||||
UNFULFILLMENT_FAILED,
|
||||
UNFULFILLMENT_NEEDED_MANUAL,
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2023 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export enum EntitlementGiftStyle {
|
||||
SNOWGLOBE = 1,
|
||||
BOX,
|
||||
CUP,
|
||||
STANDARD_BOX,
|
||||
CAKE,
|
||||
CHEST,
|
||||
COFFEE,
|
||||
SEASONAL_STANDARD_BOX,
|
||||
SEASONAL_CAKE,
|
||||
SEASONAL_CHEST,
|
||||
SEASONAL_COFFEE,
|
||||
NITROWEEN_STANDARD,
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2023 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { QuestRewardCodeSchema, QuestRewardType } from "../../quests";
|
||||
|
||||
export interface EntitlementQuestRewardMetadataSchema {
|
||||
tag: QuestRewardType;
|
||||
reward_code?: QuestRewardCodeSchema;
|
||||
}
|
||||
+10
-6
@@ -17,7 +17,11 @@
|
||||
*/
|
||||
|
||||
import { User } from "@spacebar/util";
|
||||
import { SKUSchema } from "../store";
|
||||
import { EntitlementFulfillmentStatus } from "./EntitlementFulfillmentStatus";
|
||||
import { EntitlementGiftStyle } from "./EntitlementGiftStyle";
|
||||
import { EntitlementSpecialSourceType } from "./EntitlementSpecialSourceType";
|
||||
import { EntitlementTenantMetadataSchema } from "./EntitlementTenantMetadataSchema";
|
||||
import { EntitlementType } from "./EntitlementType";
|
||||
|
||||
export interface EntitlementSchema {
|
||||
@@ -36,14 +40,14 @@ export interface EntitlementSchema {
|
||||
ends_at: string | null;
|
||||
promotion_id: string | null;
|
||||
subscription_id?: string;
|
||||
gift_code_flags: number;
|
||||
gift_code_flags: bigint; // EntitlementGiftCodeFlags;
|
||||
gift_code_batch_id?: string;
|
||||
gifter_user_id?: string;
|
||||
gift_style?: number;
|
||||
fulfillment_status?: number;
|
||||
gift_style?: EntitlementGiftStyle;
|
||||
fulfillment_status?: EntitlementFulfillmentStatus;
|
||||
fulfilled_at?: string;
|
||||
source_type?: EntitlementSpecialSourceType;
|
||||
tenant_metadata?: Record<string, unknown>;
|
||||
sku?: unknown;
|
||||
subscription_plan?: Partial<unknown>;
|
||||
tenant_metadata?: Record<string, EntitlementTenantMetadataSchema>;
|
||||
sku?: SKUSchema;
|
||||
subscription_plan?: Partial<unknown>; // TODO: https://docs.discord.food/resources/store#subscription-plan-object
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2023 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { EntitlementQuestRewardMetadataSchema } from "./EntitlementQuestRewardMetadataSchema";
|
||||
|
||||
export interface EntitlementTenantMetadataSchema {
|
||||
quest_rewards: EntitlementQuestRewardMetadataSchema;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2025 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
export * from "./EntitlementFulfillmentStatus";
|
||||
export * from "./EntitlementGiftStyle";
|
||||
export * from "./EntitlementQuestRewardMetadataSchema";
|
||||
export * from "./EntitlementSchema";
|
||||
export * from "./EntitlementSpecialSourceType";
|
||||
export * from "./EntitlementTenantMetadataSchema";
|
||||
export * from "./EntitlementType";
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2025 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export interface GuildPremiumFeatures {
|
||||
/**
|
||||
* Enabled powerup-specific guild features
|
||||
*/
|
||||
features: string[];
|
||||
/**
|
||||
* The number of additional emoji slots available to the guild
|
||||
*/
|
||||
additional_emoji_slots: number;
|
||||
/**
|
||||
* The number of additional sticker slots available to the guild
|
||||
*/
|
||||
additional_sticker_slots: number;
|
||||
/**
|
||||
* The number of additional soundboard slots available to the guild
|
||||
*/
|
||||
additional_sound_slots: number;
|
||||
}
|
||||
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
export * from "./AuditLog";
|
||||
export * from "./Automod";
|
||||
export * from "./GuildPremiumFeaturesSchema";
|
||||
export * from "./GuildProfileResponse";
|
||||
export * from "./GuildSchema";
|
||||
export * from "./Role";
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
export * from "./bots";
|
||||
export * from "./channels";
|
||||
export * from "./developers";
|
||||
export * from "./entitlements";
|
||||
export * from "./guilds";
|
||||
export * from "./messages";
|
||||
export * from "./users";
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2025 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export enum GuildPowerupCategoryType {
|
||||
/**
|
||||
* Guild premium tier
|
||||
*
|
||||
* Value: level
|
||||
*/
|
||||
level,
|
||||
/**
|
||||
* Additional guild perk
|
||||
*
|
||||
* Value: perk
|
||||
*/
|
||||
perk,
|
||||
/**
|
||||
* Game server attached to the guild
|
||||
*
|
||||
* Value: game_server
|
||||
*/
|
||||
game_server,
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2025 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export enum SKUAccessType {
|
||||
/**
|
||||
* SKU is fully accessible
|
||||
*
|
||||
* Value: 1
|
||||
* Name: FULL
|
||||
*/
|
||||
FULL = 1,
|
||||
/**
|
||||
* SKU is in early access
|
||||
*
|
||||
* Value: 2
|
||||
* Name: EARLY_ACCESS
|
||||
*/
|
||||
EARLY_ACCESS = 2,
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2025 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { SKUESRBContentDescriptor } from "./SKUESRBContentDescriptor";
|
||||
import { SKUPEGIContentDescriptor } from "./SKUPEGIContentDescriptor";
|
||||
|
||||
export type SKUContentDescriptor = SKUESRBContentDescriptor | SKUPEGIContentDescriptor;
|
||||
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2025 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { SKUESRBContentRating } from "./SKUESRBContentRating";
|
||||
import { SKUPEGIContentRating } from "./SKUPEGIContentRating";
|
||||
|
||||
export type SKUContentRating = SKUESRBContentRating | SKUPEGIContentRating;
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2025 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export enum SKUContentRatingAgency {
|
||||
/**
|
||||
* Entertainment Software Rating Board
|
||||
*
|
||||
* Value: 1
|
||||
* Name: ESRB
|
||||
* Content Rating: ESRB Content Rating
|
||||
* Content Descriptor: ESRB Content Descriptor
|
||||
*/
|
||||
ESRB = 1,
|
||||
/**
|
||||
* Pan European Game Information
|
||||
*
|
||||
* Value: 2
|
||||
* Name: PEGI
|
||||
* Content Rating: PEGI Content Rating
|
||||
* Content Descriptor: PEGI Content Descriptor
|
||||
*/
|
||||
PEGI = 2,
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2025 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { SKUContentDescriptor } from "./SKUContentDescriptor";
|
||||
import { SKUContentRating } from "./SKUContentRating";
|
||||
|
||||
export interface SKUContentRatingSchema {
|
||||
/**
|
||||
* The content rating
|
||||
*/
|
||||
rating: SKUContentRating;
|
||||
/**
|
||||
* The content descriptors
|
||||
*/
|
||||
descriptors: SKUContentDescriptor[];
|
||||
}
|
||||
@@ -0,0 +1,321 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2025 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export enum SKUESRBContentDescriptor {
|
||||
/**
|
||||
* References to alcohol
|
||||
*
|
||||
* Value: 1
|
||||
* Name: ALCOHOL_REFERENCE
|
||||
*/
|
||||
ALCOHOL_REFERENCE = 1,
|
||||
/**
|
||||
* Animated blood
|
||||
*
|
||||
* Value: 2
|
||||
* Name: ANIMATED_BLOOD
|
||||
*/
|
||||
ANIMATED_BLOOD = 2,
|
||||
/**
|
||||
* Blood
|
||||
*
|
||||
* Value: 3
|
||||
* Name: BLOOD
|
||||
*/
|
||||
BLOOD = 3,
|
||||
/**
|
||||
* Blood and gore
|
||||
*
|
||||
* Value: 4
|
||||
* Name: BLOOD_AND_GORE
|
||||
*/
|
||||
BLOOD_AND_GORE = 4,
|
||||
/**
|
||||
* Cartoon violence
|
||||
*
|
||||
* Value: 5
|
||||
* Name: CARTOON_VIOLENCE
|
||||
*/
|
||||
CARTOON_VIOLENCE = 5,
|
||||
/**
|
||||
* Comic mischief
|
||||
*
|
||||
* Value: 6
|
||||
* Name: COMIC_MISCHIEF
|
||||
*/
|
||||
COMIC_MISCHIEF = 6,
|
||||
/**
|
||||
* Crude humor
|
||||
*
|
||||
* Value: 7
|
||||
* Name: CRUDE_HUMOR
|
||||
*/
|
||||
CRUDE_HUMOR = 7,
|
||||
/**
|
||||
* References to drugs
|
||||
*
|
||||
* Value: 8
|
||||
* Name: DRUG_REFERENCE
|
||||
*/
|
||||
DRUG_REFERENCE = 8,
|
||||
/**
|
||||
* Fantasy violence
|
||||
*
|
||||
* Value: 9
|
||||
* Name: FANTASY_VIOLENCE
|
||||
*/
|
||||
FANTASY_VIOLENCE = 9,
|
||||
/**
|
||||
* Intense violence
|
||||
*
|
||||
* Value: 10
|
||||
* Name: INTENSE_VIOLENCE
|
||||
*/
|
||||
INTENSE_VIOLENCE = 10,
|
||||
/**
|
||||
* Use of strong language
|
||||
*
|
||||
* Value: 11
|
||||
* Name: LANGUAGE
|
||||
*/
|
||||
LANGUAGE = 11,
|
||||
/**
|
||||
* Lyrics
|
||||
*
|
||||
* Value: 12
|
||||
* Name: LYRICS
|
||||
*/
|
||||
LYRICS = 12,
|
||||
/**
|
||||
* Mature humor
|
||||
*
|
||||
* Value: 13
|
||||
* Name: MATURE_HUMOR
|
||||
*/
|
||||
MATURE_HUMOR = 13,
|
||||
/**
|
||||
* Nudity
|
||||
*
|
||||
* Value: 14
|
||||
* Name: NUDITY
|
||||
*/
|
||||
NUDITY = 14,
|
||||
/**
|
||||
* Partial nudity
|
||||
*
|
||||
* Value: 15
|
||||
* Name: PARTIAL_NUDITY
|
||||
*/
|
||||
PARTIAL_NUDITY = 15,
|
||||
/**
|
||||
* Real gambling
|
||||
*
|
||||
* Value: 16
|
||||
* Name: REAL_GAMBLING
|
||||
*/
|
||||
REAL_GAMBLING = 16,
|
||||
/**
|
||||
* Sexual content
|
||||
*
|
||||
* Value: 17
|
||||
* Name: SEXUAL_CONTENT
|
||||
*/
|
||||
SEXUAL_CONTENT = 17,
|
||||
/**
|
||||
* Sexual themes
|
||||
*
|
||||
* Value: 18
|
||||
* Name: SEXUAL_THEMES
|
||||
*/
|
||||
SEXUAL_THEMES = 18,
|
||||
/**
|
||||
* Sexual violence
|
||||
*
|
||||
* Value: 19
|
||||
* Name: SEXUAL_VIOLENCE
|
||||
*/
|
||||
SEXUAL_VIOLENCE = 19,
|
||||
/**
|
||||
* Simulated gambling
|
||||
*
|
||||
* Value: 20
|
||||
* Name: SIMULATED_GAMBLING
|
||||
*/
|
||||
SIMULATED_GAMBLING = 20,
|
||||
/**
|
||||
* Strong language
|
||||
*
|
||||
* Value: 21
|
||||
* Name: STRONG_LANGUAGE
|
||||
*/
|
||||
STRONG_LANGUAGE = 21,
|
||||
/**
|
||||
* Strong lyrics
|
||||
*
|
||||
* Value: 22
|
||||
* Name: STRONG_LYRICS
|
||||
*/
|
||||
STRONG_LYRICS = 22,
|
||||
/**
|
||||
* Strong sexual content
|
||||
*
|
||||
* Value: 23
|
||||
* Name: STRONG_SEXUAL_CONTENT
|
||||
*/
|
||||
STRONG_SEXUAL_CONTENT = 23,
|
||||
/**
|
||||
* Suggestive themes
|
||||
*
|
||||
* Value: 24
|
||||
* Name: SUGGESTIVE_THEMES
|
||||
*/
|
||||
SUGGESTIVE_THEMES = 24,
|
||||
/**
|
||||
* References to tobacco
|
||||
*
|
||||
* Value: 25
|
||||
* Name: TOBACCO_REFERENCE
|
||||
*/
|
||||
TOBACCO_REFERENCE = 25,
|
||||
/**
|
||||
* Use of alcohol
|
||||
*
|
||||
* Value: 26
|
||||
* Name: USE_OF_ALCOHOL
|
||||
*/
|
||||
USE_OF_ALCOHOL = 26,
|
||||
/**
|
||||
* Use of drugs
|
||||
*
|
||||
* Value: 27
|
||||
* Name: USE_OF_DRUGS
|
||||
*/
|
||||
USE_OF_DRUGS = 27,
|
||||
/**
|
||||
* Use of tobacco
|
||||
*
|
||||
* Value: 28
|
||||
* Name: USE_OF_TOBACCO
|
||||
*/
|
||||
USE_OF_TOBACCO = 28,
|
||||
/**
|
||||
* Violence
|
||||
*
|
||||
* Value: 29
|
||||
* Name: VIOLENCE
|
||||
*/
|
||||
VIOLENCE = 29,
|
||||
/**
|
||||
* Violent references
|
||||
*
|
||||
* Value: 30
|
||||
* Name: VIOLENT_REFERENCES
|
||||
*/
|
||||
VIOLENT_REFERENCES = 30,
|
||||
/**
|
||||
* In-game purchases
|
||||
*
|
||||
* Value: 31
|
||||
* Name: IN_GAME_PURCHASES
|
||||
*/
|
||||
IN_GAME_PURCHASES = 31,
|
||||
/**
|
||||
* User interaction
|
||||
*
|
||||
* Value: 32
|
||||
* Name: USERS_INTERACT
|
||||
*/
|
||||
USERS_INTERACT = 32,
|
||||
/**
|
||||
* Location sharing
|
||||
*
|
||||
* Value: 33
|
||||
* Name: SHARES_LOCATION
|
||||
*/
|
||||
SHARES_LOCATION = 33,
|
||||
/**
|
||||
* Unrestricted internet access
|
||||
*
|
||||
* Value: 34
|
||||
* Name: UNRESTRICTED_INTERNET
|
||||
*/
|
||||
UNRESTRICTED_INTERNET = 34,
|
||||
/**
|
||||
* Mild blood
|
||||
*
|
||||
* Value: 35
|
||||
* Name: MILD_BLOOD
|
||||
*/
|
||||
MILD_BLOOD = 35,
|
||||
/**
|
||||
* Mild cartoon violence
|
||||
*
|
||||
* Value: 36
|
||||
* Name: MILD_CARTOON_VIOLENCE
|
||||
*/
|
||||
MILD_CARTOON_VIOLENCE = 36,
|
||||
/**
|
||||
* Mild fantasy violence
|
||||
*
|
||||
* Value: 37
|
||||
* Name: MILD_FANTASY_VIOLENCE
|
||||
*/
|
||||
MILD_FANTASY_VIOLENCE = 37,
|
||||
/**
|
||||
* Mild language
|
||||
*
|
||||
* Value: 38
|
||||
* Name: MILD_LANGUAGE
|
||||
*/
|
||||
MILD_LANGUAGE = 38,
|
||||
/**
|
||||
* Mild lyrics
|
||||
*
|
||||
* Value: 39
|
||||
* Name: MILD_LYRICS
|
||||
*/
|
||||
MILD_LYRICS = 39,
|
||||
/**
|
||||
* Mild sexual themes
|
||||
*
|
||||
* Value: 40
|
||||
* Name: MILD_SEXUAL_THEMES
|
||||
*/
|
||||
MILD_SEXUAL_THEMES = 40,
|
||||
/**
|
||||
* Mild suggestive themes
|
||||
*
|
||||
* Value: 41
|
||||
* Name: MILD_SUGGESTIVE_THEMES
|
||||
*/
|
||||
MILD_SUGGESTIVE_THEMES = 41,
|
||||
/**
|
||||
* Mild violence
|
||||
*
|
||||
* Value: 42
|
||||
* Name: MILD_VIOLENCE
|
||||
*/
|
||||
MILD_VIOLENCE = 42,
|
||||
/**
|
||||
* Animated violence
|
||||
*
|
||||
* Value: 43
|
||||
* Name: ANIMATED_VIOLENCE
|
||||
*/
|
||||
ANIMATED_VIOLENCE = 43,
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2025 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export enum SKUESRBContentRating {
|
||||
/**
|
||||
* Suitable for all ages
|
||||
*
|
||||
* Value: 1
|
||||
* Name: EVERYONE
|
||||
*/
|
||||
EVERYONE = 1,
|
||||
/**
|
||||
* Suitable for ages 10 and up
|
||||
*
|
||||
* Value: 2
|
||||
* Name: EVERYONE_TEN_PLUS
|
||||
*/
|
||||
EVERYONE_TEN_PLUS = 2,
|
||||
/**
|
||||
* Suitable for ages 13 and up
|
||||
*
|
||||
* Value: 3
|
||||
* Name: TEEN
|
||||
*/
|
||||
TEEN = 3,
|
||||
/**
|
||||
* Suitable for ages 17 and up
|
||||
*
|
||||
* Value: 4
|
||||
* Name: MATURE
|
||||
*/
|
||||
MATURE = 4,
|
||||
/**
|
||||
* Suitable for ages 18 and up
|
||||
*
|
||||
* Value: 5
|
||||
* Name: ADULTS_ONLY
|
||||
*/
|
||||
ADULTS_ONLY = 5,
|
||||
/**
|
||||
* Rating is pending
|
||||
*
|
||||
* Value: 6
|
||||
* Name: RATING_PENDING
|
||||
*/
|
||||
RATING_PENDING = 6,
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2025 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { SKUExternalSKUStrategyType } from "./SKUExternalSKUStrategyType";
|
||||
|
||||
export interface SKUExternalSKUStrategySchema {
|
||||
/**
|
||||
* The type of external SKU strategy
|
||||
*/
|
||||
type: SKUExternalSKUStrategyType;
|
||||
/**
|
||||
* Additional metadata for the external SKU strategy
|
||||
*/
|
||||
metadata?: Record<string, string>;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2025 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export enum SKUExternalSKUStrategyType {
|
||||
/**
|
||||
* Regular pricing
|
||||
*
|
||||
* Value: 1
|
||||
* Name: CONSTANT
|
||||
*/
|
||||
CONSTANT = 1,
|
||||
/**
|
||||
* Apple sticker pack pricing
|
||||
*
|
||||
* Value: 2
|
||||
* Name: APPLE_STICKER
|
||||
*/
|
||||
APPLE_STICKER = 2,
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2025 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export enum SKUFeature {
|
||||
/**
|
||||
* Single player game
|
||||
*
|
||||
* Value: 1
|
||||
* Name: SINGLE_PLAYER
|
||||
*/
|
||||
SINGLE_PLAYER = 1,
|
||||
/**
|
||||
* Online multiplayer game
|
||||
*
|
||||
* Value: 2
|
||||
* Name: ONLINE_MULTIPLAYER
|
||||
*/
|
||||
ONLINE_MULTIPLAYER = 2,
|
||||
/**
|
||||
* Local multiplayer game
|
||||
*
|
||||
* Value: 3
|
||||
* Name: LOCAL_MULTIPLAYER
|
||||
*/
|
||||
LOCAL_MULTIPLAYER = 3,
|
||||
/**
|
||||
* Player versus player game
|
||||
*
|
||||
* Value: 4
|
||||
* Name: PVP
|
||||
*/
|
||||
PVP = 4,
|
||||
/**
|
||||
* Local cooperative multiplayer
|
||||
*
|
||||
* Value: 5
|
||||
* Name: LOCAL_COOP
|
||||
*/
|
||||
LOCAL_COOP = 5,
|
||||
/**
|
||||
* Cross-platform play supported
|
||||
*
|
||||
* Value: 6
|
||||
* Name: CROSS_PLATFORM
|
||||
*/
|
||||
CROSS_PLATFORM = 6,
|
||||
/**
|
||||
* Rich presence integration
|
||||
*
|
||||
* Value: 7
|
||||
* Name: RICH_PRESENCE
|
||||
*/
|
||||
RICH_PRESENCE = 7,
|
||||
/**
|
||||
* Discord game invites supported
|
||||
*
|
||||
* Value: 8
|
||||
* Name: DISCORD_GAME_INVITES
|
||||
*/
|
||||
DISCORD_GAME_INVITES = 8,
|
||||
/**
|
||||
* Spectator mode supported
|
||||
*
|
||||
* Value: 9
|
||||
* Name: SPECTATOR_MODE
|
||||
*/
|
||||
SPECTATOR_MODE = 9,
|
||||
/**
|
||||
* Controller support
|
||||
*
|
||||
* Value: 10
|
||||
* Name: CONTROLLER_SUPPORT
|
||||
*/
|
||||
CONTROLLER_SUPPORT = 10,
|
||||
/**
|
||||
* Cloud saves supported
|
||||
*
|
||||
* Value: 11
|
||||
* Name: CLOUD_SAVES
|
||||
*/
|
||||
CLOUD_SAVES = 11,
|
||||
/**
|
||||
* Online cooperative multiplayer
|
||||
*
|
||||
* Value: 12
|
||||
* Name: ONLINE_COOP
|
||||
*/
|
||||
ONLINE_COOP = 12,
|
||||
/**
|
||||
* Secure networking supported
|
||||
*
|
||||
* Value: 13
|
||||
* Name: SECURE_NETWORKING
|
||||
*/
|
||||
SECURE_NETWORKING = 13,
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2025 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { GuildPremiumFeatures } from "../guilds";
|
||||
import { GuildPowerupCategoryType } from "./GuildPowerupCatagoryType";
|
||||
import { SKUGameServerPowerupProvider } from "./SKUGameServerPowerupProvider";
|
||||
|
||||
export interface SKUGameServerPowerupMetadataSchema {
|
||||
/**
|
||||
* The number of boosts the powerup costs
|
||||
*/
|
||||
boost_price: number;
|
||||
/**
|
||||
* The maximum number of entitlements a guild can have for the powerup
|
||||
*/
|
||||
purchase_limit: number;
|
||||
/**
|
||||
* The features granted by the powerup
|
||||
*/
|
||||
guild_features: GuildPremiumFeatures;
|
||||
/**
|
||||
* The type of guild powerup
|
||||
*/
|
||||
category_type: GuildPowerupCategoryType;
|
||||
/**
|
||||
* The available providers
|
||||
*/
|
||||
available_providers: SKUGameServerPowerupProvider[];
|
||||
/**
|
||||
* The amount of RAM in megabytes that the game server provides
|
||||
*/
|
||||
memory: number;
|
||||
/**
|
||||
* The amount of CPU cores that the game server provides
|
||||
*/
|
||||
cpu: number;
|
||||
/**
|
||||
* The amount of storage in gigabytes that the game server provides
|
||||
*/
|
||||
storage: number;
|
||||
/**
|
||||
* Maximum amount of players that can connect to the game server
|
||||
*/
|
||||
max_slots: number;
|
||||
/**
|
||||
* Human-readable amount of RAM that the game server provides
|
||||
*/
|
||||
memory_string: string;
|
||||
/**
|
||||
* Human-readable maximum amount of players that can connect to the game server
|
||||
*/
|
||||
player_string: string;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2025 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export enum SKUGameServerPowerupProvider {
|
||||
SHOCKBYTE = "shockbyte",
|
||||
}
|
||||
@@ -0,0 +1,503 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2025 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export enum SKUGenre {
|
||||
/**
|
||||
* Action
|
||||
*
|
||||
* Value: 1
|
||||
* Name: ACTION
|
||||
*/
|
||||
ACTION = 1,
|
||||
/**
|
||||
* Action RPG
|
||||
*
|
||||
* Value: 2
|
||||
* Name: ACTION_RPG
|
||||
*/
|
||||
ACTION_RPG = 2,
|
||||
/**
|
||||
* Brawler
|
||||
*
|
||||
* Value: 3
|
||||
* Name: BRAWLER
|
||||
*/
|
||||
BRAWLER = 3,
|
||||
/**
|
||||
* Hack and Slash
|
||||
*
|
||||
* Value: 4
|
||||
* Name: HACK_AND_SLASH
|
||||
*/
|
||||
HACK_AND_SLASH = 4,
|
||||
/**
|
||||
* Platformer
|
||||
*
|
||||
* Value: 5
|
||||
* Name: PLATFORMER
|
||||
*/
|
||||
PLATFORMER = 5,
|
||||
/**
|
||||
* Stealth
|
||||
*
|
||||
* Value: 6
|
||||
* Name: STEALTH
|
||||
*/
|
||||
STEALTH = 6,
|
||||
/**
|
||||
* Survival
|
||||
*
|
||||
* Value: 7
|
||||
* Name: SURVIVAL
|
||||
*/
|
||||
SURVIVAL = 7,
|
||||
/**
|
||||
* Adventure
|
||||
*
|
||||
* Value: 8
|
||||
* Name: ADVENTURE
|
||||
*/
|
||||
ADVENTURE = 8,
|
||||
/**
|
||||
* Action Adventure
|
||||
*
|
||||
* Value: 9
|
||||
* Name: ACTION_ADVENTURE
|
||||
*/
|
||||
ACTION_ADVENTURE = 9,
|
||||
/**
|
||||
* Metroidvania
|
||||
*
|
||||
* Value: 10
|
||||
* Name: METROIDVANIA
|
||||
*/
|
||||
METROIDVANIA = 10,
|
||||
/**
|
||||
* Open World
|
||||
*
|
||||
* Value: 11
|
||||
* Name: OPEN_WORLD
|
||||
*/
|
||||
OPEN_WORLD = 11,
|
||||
/**
|
||||
* Psychological Horror
|
||||
*
|
||||
* Value: 12
|
||||
* Name: PSYCHOLOGICAL_HORROR
|
||||
*/
|
||||
PSYCHOLOGICAL_HORROR = 12,
|
||||
/**
|
||||
* Sandbox
|
||||
*
|
||||
* Value: 13
|
||||
* Name: SANDBOX
|
||||
*/
|
||||
SANDBOX = 13,
|
||||
/**
|
||||
* Survival Horror
|
||||
*
|
||||
* Value: 14
|
||||
* Name: SURVIVAL_HORROR
|
||||
*/
|
||||
SURVIVAL_HORROR = 14,
|
||||
/**
|
||||
* Visual Novel
|
||||
*
|
||||
* Value: 15
|
||||
* Name: VISUAL_NOVEL
|
||||
*/
|
||||
VISUAL_NOVEL = 15,
|
||||
/**
|
||||
* Driving / Racing
|
||||
*
|
||||
* Value: 16
|
||||
* Name: DRIVING_RACING
|
||||
*/
|
||||
DRIVING_RACING = 16,
|
||||
/**
|
||||
* Vehicular Combat
|
||||
*
|
||||
* Value: 17
|
||||
* Name: VEHICULAR_COMBAT
|
||||
*/
|
||||
VEHICULAR_COMBAT = 17,
|
||||
/**
|
||||
* Massively Multiplayer
|
||||
*
|
||||
* Value: 18
|
||||
* Name: MASSIVELY_MULTIPLAYER
|
||||
*/
|
||||
MASSIVELY_MULTIPLAYER = 18,
|
||||
/**
|
||||
* MMORPG
|
||||
*
|
||||
* Value: 19
|
||||
* Name: MMORPG
|
||||
*/
|
||||
MMORPG = 19,
|
||||
/**
|
||||
* Role-Playing
|
||||
*
|
||||
* Value: 20
|
||||
* Name: ROLE_PLAYING
|
||||
*/
|
||||
ROLE_PLAYING = 20,
|
||||
/**
|
||||
* Dungeon Crawler
|
||||
*
|
||||
* Value: 21
|
||||
* Name: DUNGEON_CRAWLER
|
||||
*/
|
||||
DUNGEON_CRAWLER = 21,
|
||||
/**
|
||||
* Roguelike
|
||||
*
|
||||
* Value: 22
|
||||
* Name: ROGUELIKE
|
||||
*/
|
||||
ROGUELIKE = 22,
|
||||
/**
|
||||
* Shooter
|
||||
*
|
||||
* Value: 23
|
||||
* Name: SHOOTER
|
||||
*/
|
||||
SHOOTER = 23,
|
||||
/**
|
||||
* Light Gun
|
||||
*
|
||||
* Value: 24
|
||||
* Name: LIGHT_GUN
|
||||
*/
|
||||
LIGHT_GUN = 24,
|
||||
/**
|
||||
* Shoot 'Em Up
|
||||
*
|
||||
* Value: 25
|
||||
* Name: SHOOT_EM_UP
|
||||
*/
|
||||
SHOOT_EM_UP = 25,
|
||||
/**
|
||||
* First-Person Shooter
|
||||
*
|
||||
* Value: 26
|
||||
* Name: FPS
|
||||
*/
|
||||
FPS = 26,
|
||||
/**
|
||||
* Dual-Joystick Shooter
|
||||
*
|
||||
* Value: 27
|
||||
* Name: DUAL_JOYSTICK_SHOOTER
|
||||
*/
|
||||
DUAL_JOYSTICK_SHOOTER = 27,
|
||||
/**
|
||||
* Simulation
|
||||
*
|
||||
* Value: 28
|
||||
* Name: SIMULATION
|
||||
*/
|
||||
SIMULATION = 28,
|
||||
/**
|
||||
* Flight Simulator
|
||||
*
|
||||
* Value: 29
|
||||
* Name: FLIGHT_SIMULATOR
|
||||
*/
|
||||
FLIGHT_SIMULATOR = 29,
|
||||
/**
|
||||
* Train Simulator
|
||||
*
|
||||
* Value: 30
|
||||
* Name: TRAIN_SIMULATOR
|
||||
*/
|
||||
TRAIN_SIMULATOR = 30,
|
||||
/**
|
||||
* Life Simulator
|
||||
*
|
||||
* Value: 31
|
||||
* Name: LIFE_SIMULATOR
|
||||
*/
|
||||
LIFE_SIMULATOR = 31,
|
||||
/**
|
||||
* Fishing
|
||||
*
|
||||
* Value: 32
|
||||
* Name: FISHING
|
||||
*/
|
||||
FISHING = 32,
|
||||
/**
|
||||
* Sports
|
||||
*
|
||||
* Value: 33
|
||||
* Name: SPORTS
|
||||
*/
|
||||
SPORTS = 33,
|
||||
/**
|
||||
* Baseball
|
||||
*
|
||||
* Value: 34
|
||||
* Name: BASEBALL
|
||||
*/
|
||||
BASEBALL = 34,
|
||||
/**
|
||||
* Basketball
|
||||
*
|
||||
* Value: 35
|
||||
* Name: BASKETBALL
|
||||
*/
|
||||
BASKETBALL = 35,
|
||||
/**
|
||||
* Billiards
|
||||
*
|
||||
* Value: 36
|
||||
* Name: BILLIARDS
|
||||
*/
|
||||
BILLIARDS = 36,
|
||||
/**
|
||||
* Bowling
|
||||
*
|
||||
* Value: 37
|
||||
* Name: BOWLING
|
||||
*/
|
||||
BOWLING = 37,
|
||||
/**
|
||||
* Boxing
|
||||
*
|
||||
* Value: 38
|
||||
* Name: BOXING
|
||||
*/
|
||||
BOXING = 38,
|
||||
/**
|
||||
* Football
|
||||
*
|
||||
* Value: 39
|
||||
* Name: FOOTBALL
|
||||
*/
|
||||
FOOTBALL = 39,
|
||||
/**
|
||||
* Golf
|
||||
*
|
||||
* Value: 40
|
||||
* Name: GOLF
|
||||
*/
|
||||
GOLF = 40,
|
||||
/**
|
||||
* Hockey
|
||||
*
|
||||
* Value: 41
|
||||
* Name: HOCKEY
|
||||
*/
|
||||
HOCKEY = 41,
|
||||
/**
|
||||
* Skateboarding / Skating
|
||||
*
|
||||
* Value: 42
|
||||
* Name: SKATEBOARDING_SKATING
|
||||
*/
|
||||
SKATEBOARDING_SKATING = 42,
|
||||
/**
|
||||
* Snowboarding / Skiing
|
||||
*
|
||||
* Value: 43
|
||||
* Name: SNOWBOARDING_SKIING
|
||||
*/
|
||||
SNOWBOARDING_SKIING = 43,
|
||||
/**
|
||||
* Soccer
|
||||
*
|
||||
* Value: 44
|
||||
* Name: SOCCER
|
||||
*/
|
||||
SOCCER = 44,
|
||||
/**
|
||||
* Track & Field
|
||||
*
|
||||
* Value: 45
|
||||
* Name: TRACK_FIELD
|
||||
*/
|
||||
TRACK_FIELD = 45,
|
||||
/**
|
||||
* Surfing / Wakeboarding
|
||||
*
|
||||
* Value: 46
|
||||
* Name: SURFING_WAKEBOARDING
|
||||
*/
|
||||
SURFING_WAKEBOARDING = 46,
|
||||
/**
|
||||
* Wrestling
|
||||
*
|
||||
* Value: 47
|
||||
* Name: WRESTLING
|
||||
*/
|
||||
WRESTLING = 47,
|
||||
/**
|
||||
* Strategy
|
||||
*
|
||||
* Value: 48
|
||||
* Name: STRATEGY
|
||||
*/
|
||||
STRATEGY = 48,
|
||||
/**
|
||||
* 4X (explore, expand, exploit, exterminate)
|
||||
*
|
||||
* Value: 49
|
||||
* Name: FOUR_X
|
||||
*/
|
||||
FOUR_X = 49,
|
||||
/**
|
||||
* Artillery
|
||||
*
|
||||
* Value: 50
|
||||
* Name: ARTILLERY
|
||||
*/
|
||||
ARTILLERY = 50,
|
||||
/**
|
||||
* Real-Time Strategy
|
||||
*
|
||||
* Value: 51
|
||||
* Name: RTS
|
||||
*/
|
||||
RTS = 51,
|
||||
/**
|
||||
* Tower Defense
|
||||
*
|
||||
* Value: 52
|
||||
* Name: TOWER_DEFENSE
|
||||
*/
|
||||
TOWER_DEFENSE = 52,
|
||||
/**
|
||||
* Turn-Based Strategy
|
||||
*
|
||||
* Value: 53
|
||||
* Name: TURN_BASED_STRATEGY
|
||||
*/
|
||||
TURN_BASED_STRATEGY = 53,
|
||||
/**
|
||||
* Wargame
|
||||
*
|
||||
* Value: 54
|
||||
* Name: WARGAME
|
||||
*/
|
||||
WARGAME = 54,
|
||||
/**
|
||||
* Multiplayer Online Battle Arena
|
||||
*
|
||||
* Value: 55
|
||||
* Name: MOBA
|
||||
*/
|
||||
MOBA = 55,
|
||||
/**
|
||||
* Fighting
|
||||
*
|
||||
* Value: 56
|
||||
* Name: FIGHTING
|
||||
*/
|
||||
FIGHTING = 56,
|
||||
/**
|
||||
* Puzzle
|
||||
*
|
||||
* Value: 57
|
||||
* Name: PUZZLE
|
||||
*/
|
||||
PUZZLE = 57,
|
||||
/**
|
||||
* Card Game
|
||||
*
|
||||
* Value: 58
|
||||
* Name: CARD_GAME
|
||||
*/
|
||||
CARD_GAME = 58,
|
||||
/**
|
||||
* Education
|
||||
*
|
||||
* Value: 59
|
||||
* Name: EDUCATION
|
||||
*/
|
||||
EDUCATION = 59,
|
||||
/**
|
||||
* Fitness
|
||||
*
|
||||
* Value: 60
|
||||
* Name: FITNESS
|
||||
*/
|
||||
FITNESS = 60,
|
||||
/**
|
||||
* Gambling
|
||||
*
|
||||
* Value: 61
|
||||
* Name: GAMBLING
|
||||
*/
|
||||
GAMBLING = 61,
|
||||
/**
|
||||
* Music / Rhythm
|
||||
*
|
||||
* Value: 62
|
||||
* Name: MUSIC_RHYTHM
|
||||
*/
|
||||
MUSIC_RHYTHM = 62,
|
||||
/**
|
||||
* Party / Mini Game
|
||||
*
|
||||
* Value: 63
|
||||
* Name: PARTY_MINI_GAME
|
||||
*/
|
||||
PARTY_MINI_GAME = 63,
|
||||
/**
|
||||
* Pinball
|
||||
*
|
||||
* Value: 64
|
||||
* Name: PINBALL
|
||||
*/
|
||||
PINBALL = 64,
|
||||
/**
|
||||
* Trivia / Board Game
|
||||
*
|
||||
* Value: 65
|
||||
* Name: TRIVIA_BOARD_GAME
|
||||
*/
|
||||
TRIVIA_BOARD_GAME = 65,
|
||||
/**
|
||||
* Tactical
|
||||
*
|
||||
* Value: 66
|
||||
* Name: TACTICAL
|
||||
*/
|
||||
TACTICAL = 66,
|
||||
/**
|
||||
* Indie
|
||||
*
|
||||
* Value: 67
|
||||
* Name: INDIE
|
||||
*/
|
||||
INDIE = 67,
|
||||
/**
|
||||
* Arcade
|
||||
*
|
||||
* Value: 68
|
||||
* Name: ARCADE
|
||||
*/
|
||||
ARCADE = 68,
|
||||
/**
|
||||
* Point-and-Click
|
||||
*
|
||||
* Value: 69
|
||||
* Name: POINT_AND_CLICK
|
||||
*/
|
||||
POINT_AND_CLICK = 69,
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2025 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { SKUGameServerPowerupMetadataSchema } from "./SKUGameServerPowerupMetadataSchema";
|
||||
import { SKUGuildPowerupMetadataSchema } from "./SKUGuildPowerupMetadataSchema";
|
||||
|
||||
export interface SKUGuildMonetizationMetadataSchema {
|
||||
/**
|
||||
* Guild powerup metadata
|
||||
*/
|
||||
powerup?: SKUGuildPowerupMetadataSchema;
|
||||
/**
|
||||
* Game server powerup metadata
|
||||
*/
|
||||
game_server?: SKUGameServerPowerupMetadataSchema;
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2025 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { GuildPremiumFeatures } from "@spacebar/schemas";
|
||||
import { GuildPowerupCategoryType } from "./GuildPowerupCatagoryType";
|
||||
|
||||
export interface SKUGuildPowerupMetadataSchema {
|
||||
/**
|
||||
* The number of boosts the powerup costs
|
||||
*/
|
||||
boost_price: number;
|
||||
/**
|
||||
* The maximum number of entitlements a guild can have for the powerup
|
||||
*/
|
||||
purchase_limit: number;
|
||||
/**
|
||||
* The features granted by the powerup
|
||||
*/
|
||||
guild_features: GuildPremiumFeatures;
|
||||
/**
|
||||
* The type of guild powerup
|
||||
*/
|
||||
category_type: GuildPowerupCategoryType;
|
||||
/**
|
||||
* URL of the static banner image for the powerup
|
||||
*/
|
||||
static_image_url: string;
|
||||
/**
|
||||
* URL of the animated banner image for the powerup
|
||||
*/
|
||||
animated_image_url: string;
|
||||
/**
|
||||
* When the powerup will be removed from the store
|
||||
*/
|
||||
store_removal_date?: string | null;
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2025 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export enum SKUOperatingSystem {
|
||||
/**
|
||||
* Windows OS
|
||||
*
|
||||
* Value: 1
|
||||
* Name: WINDOWS
|
||||
*/
|
||||
WINDOWS = 1,
|
||||
/**
|
||||
* macOS
|
||||
*
|
||||
* Value: 2
|
||||
* Name: MACOS
|
||||
*/
|
||||
MACOS = 2,
|
||||
/**
|
||||
* Linux
|
||||
*
|
||||
* Value: 3
|
||||
* Name: LINUX
|
||||
*/
|
||||
LINUX = 3,
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2025 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export enum SKUPEGIContentDescriptor {
|
||||
/**
|
||||
* Depictions of violence
|
||||
*
|
||||
* Value: 1
|
||||
* Name: VIOLENCE
|
||||
*/
|
||||
VIOLENCE = 1,
|
||||
/**
|
||||
* Use of bad language
|
||||
*
|
||||
* Value: 2
|
||||
* Name: BAD_LANGUAGE
|
||||
*/
|
||||
BAD_LANGUAGE = 2,
|
||||
/**
|
||||
* Scenes that may frighten
|
||||
*
|
||||
* Value: 3
|
||||
* Name: FEAR
|
||||
*/
|
||||
FEAR = 3,
|
||||
/**
|
||||
* Depictions of gambling
|
||||
*
|
||||
* Value: 4
|
||||
* Name: GAMBLING
|
||||
*/
|
||||
GAMBLING = 4,
|
||||
/**
|
||||
* Depictions of sexual content
|
||||
*
|
||||
* Value: 5
|
||||
* Name: SEX
|
||||
*/
|
||||
SEX = 5,
|
||||
/**
|
||||
* Depictions of drugs
|
||||
*
|
||||
* Value: 6
|
||||
* Name: DRUGS
|
||||
*/
|
||||
DRUGS = 6,
|
||||
/**
|
||||
* Depictions of discrimination
|
||||
*
|
||||
* Value: 7
|
||||
* Name: DISCRIMINATION
|
||||
*/
|
||||
DISCRIMINATION = 7,
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2025 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export enum SKUPEGIContentRating {
|
||||
/**
|
||||
* Suitable for all ages
|
||||
*
|
||||
* Value: 1
|
||||
* Name: THREE
|
||||
*/
|
||||
THREE = 1,
|
||||
/**
|
||||
* Suitable for ages 7 and up
|
||||
*
|
||||
* Value: 2
|
||||
* Name: SEVEN
|
||||
*/
|
||||
SEVEN = 2,
|
||||
/**
|
||||
* Suitable for ages 12 and up
|
||||
*
|
||||
* Value: 3
|
||||
* Name: TWELVE
|
||||
*/
|
||||
TWELVE = 3,
|
||||
/**
|
||||
* Suitable for ages 16 and up
|
||||
*
|
||||
* Value: 4
|
||||
* Name: SIXTEEN
|
||||
*/
|
||||
SIXTEEN = 4,
|
||||
/**
|
||||
* Suitable for ages 18 and up
|
||||
*
|
||||
* Value: 5
|
||||
* Name: EIGHTEEN
|
||||
*/
|
||||
EIGHTEEN = 5,
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2025 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export interface SKUPremiumPriceSchema {
|
||||
/**
|
||||
* The price amount in the smallest currency unit
|
||||
*/
|
||||
amount: number;
|
||||
/**
|
||||
* The percentage discount for premium users
|
||||
*/
|
||||
percentage: number;
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2025 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { SKUPremiumPriceSchema } from "./SKUPremiumPriceSchema";
|
||||
|
||||
export interface SKUPriceSchema {
|
||||
/**
|
||||
* The lower-cased ISO 4217 currency code
|
||||
*/
|
||||
currency: string;
|
||||
/**
|
||||
* The exponent to convert the amount to the displayed currency unit
|
||||
*/
|
||||
currency_exponent: number;
|
||||
/**
|
||||
* The price amount in the smallest currency unit
|
||||
*/
|
||||
amount: number;
|
||||
/**
|
||||
* The sale price amount in the smallest currency unit
|
||||
*/
|
||||
sale_amount?: number;
|
||||
/**
|
||||
* The percentage discount of the sale price
|
||||
*/
|
||||
sale_percentage?: number;
|
||||
/**
|
||||
* The price for premium users per premium type
|
||||
*/
|
||||
premium?: Record<number, SKUPremiumPriceSchema>;
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2025 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export enum SKUProductLine {
|
||||
/**
|
||||
* Premium (Nitro) subscription
|
||||
*
|
||||
* Value: 1
|
||||
* Name: PREMIUM
|
||||
*/
|
||||
PREMIUM = 1,
|
||||
/**
|
||||
* Premium guild (boosting) subscription
|
||||
*
|
||||
* Value: 2
|
||||
* Name: PREMIUM_GUILD
|
||||
*/
|
||||
PREMIUM_GUILD = 2,
|
||||
/**
|
||||
* Embedded activity in-app purchase
|
||||
*
|
||||
* Value: 3
|
||||
* Name: ACTIVITY_IAP
|
||||
*/
|
||||
ACTIVITY_IAP = 3,
|
||||
/**
|
||||
* Guild role subscription or ticketed event
|
||||
*
|
||||
* Value: 4
|
||||
* Name: GUILD_ROLE
|
||||
*/
|
||||
GUILD_ROLE = 4,
|
||||
/**
|
||||
* Guild product
|
||||
*
|
||||
* Value: 5
|
||||
* Name: GUILD_PRODUCT
|
||||
*/
|
||||
GUILD_PRODUCT = 5,
|
||||
/**
|
||||
* Application item
|
||||
*
|
||||
* Value: 6
|
||||
* Name: APPLICATION
|
||||
*/
|
||||
APPLICATION = 6,
|
||||
/**
|
||||
* Discord collectible
|
||||
*
|
||||
* Value: 7
|
||||
* Name: COLLECTIBLES
|
||||
*/
|
||||
COLLECTIBLES = 7,
|
||||
/**
|
||||
* In-game quest reward
|
||||
*
|
||||
* Value: 9
|
||||
* Name: QUEST_IN_GAME_REWARD
|
||||
*/
|
||||
QUEST_IN_GAME_REWARD = 9,
|
||||
/**
|
||||
* Quest reward code
|
||||
*
|
||||
* Value: 10
|
||||
* Name: QUEST_REWARD_CODE
|
||||
*/
|
||||
QUEST_REWARD_CODE = 10,
|
||||
/**
|
||||
* Fractional premium subscription
|
||||
*
|
||||
* Value: 11
|
||||
* Name: FRACTIONAL_PREMIUM
|
||||
*/
|
||||
FRACTIONAL_PREMIUM = 11,
|
||||
/**
|
||||
* Virtual currency
|
||||
*
|
||||
* Value: 12
|
||||
* Name: VIRTUAL_CURRENCY
|
||||
*/
|
||||
VIRTUAL_CURRENCY = 12,
|
||||
/**
|
||||
* Guild powerup
|
||||
*
|
||||
* Value: 13
|
||||
* Name: GUILD_POWERUP
|
||||
*/
|
||||
GUILD_POWERUP = 13,
|
||||
/**
|
||||
* Social SDK game item
|
||||
*
|
||||
* Value: 14
|
||||
* Name: SOCIAL_LAYER_GAME_ITEM
|
||||
*/
|
||||
SOCIAL_LAYER_GAME_ITEM = 14,
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2025 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { BillingPaymentGateway, LocalizedStringSchema } from "@spacebar/schemas";
|
||||
import { Application } from "@spacebar/util";
|
||||
import { SKUAccessType } from "./SKUAccessType";
|
||||
import { SKUContentRatingAgency } from "./SKUContentRatingAgency";
|
||||
import { SKUContentRatingSchema } from "./SKUContentRatingSchema";
|
||||
import { SKUExternalSKUStrategySchema } from "./SKUExternalSKUStrategySchema";
|
||||
import { SKUFeature } from "./SKUFeature";
|
||||
import { SKUGenre } from "./SKUGenre";
|
||||
import { SKUGuildPowerupMetadataSchema } from "./SKUGuildPowerupMetadataSchema";
|
||||
import { SKUOperatingSystem } from "./SKUOperatingSystem";
|
||||
import { SKUPriceSchema } from "./SKUPriceSchema";
|
||||
import { SKUProductLine } from "./SKUProductLine";
|
||||
import { SKUSystemRequirementsSchema } from "./SKUSystemRequirementsSchema";
|
||||
import { SKUTenantMetadataSchema } from "./SKUTenantMetadataSchema";
|
||||
import { SKUType } from "./SKUType";
|
||||
|
||||
export interface SKUSchema {
|
||||
id: string;
|
||||
type: SKUType;
|
||||
application_id: string;
|
||||
application?: Partial<Application>;
|
||||
product_line: SKUProductLine | null;
|
||||
product_id?: string;
|
||||
flags: bigint; // SKUFlags
|
||||
name: LocalizedStringSchema;
|
||||
summary?: LocalizedStringSchema;
|
||||
description?: LocalizedStringSchema;
|
||||
legal_notice?: LocalizedStringSchema;
|
||||
slug: string;
|
||||
thumbnail_asset_id?: string;
|
||||
dependent_sku_id?: string | null;
|
||||
bundled_skus?: SKUSchema[];
|
||||
bundled_sku_ids?: string[];
|
||||
access_type: SKUAccessType;
|
||||
manifest_labels?: string[] | null;
|
||||
features: SKUFeature[];
|
||||
locales?: string[];
|
||||
genres?: SKUGenre[];
|
||||
available_regions?: string[];
|
||||
content_rating?: SKUContentRatingSchema;
|
||||
content_rating_agency?: SKUContentRatingAgency;
|
||||
content_ratings?: Record<SKUContentRatingAgency, SKUContentRatingSchema>;
|
||||
system_requirements?: Record<SKUOperatingSystem, SKUSystemRequirementsSchema>;
|
||||
price?: SKUPriceSchema | Record<string, unknown>; // discord.food says map[string, integer] but i dont think thats true, its probably SKUPriceSchema
|
||||
sale_price_tier?: number;
|
||||
sale_price?: Record<string, unknown>; // same here, discord.food says map[string, integer] which i dont believe
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
release_date?: string;
|
||||
preorder_approximate_release_date?: string;
|
||||
preorder_released_at?: string;
|
||||
external_purchase_url?: string;
|
||||
external_sku_strategies?: Record<BillingPaymentGateway, SKUExternalSKUStrategySchema>;
|
||||
eligible_payment_gateways?: BillingPaymentGateway[];
|
||||
premium: boolean;
|
||||
show_age_gate: boolean;
|
||||
restricted?: boolean;
|
||||
exclusive?: boolean;
|
||||
deleted?: boolean;
|
||||
tenant_metadata?: SKUTenantMetadataSchema;
|
||||
powerup_metadata?: SKUGuildPowerupMetadataSchema;
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2025 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { LocalizedStringSchema } from "../../uncategorised";
|
||||
|
||||
export interface SKUSystemRequirementSchema {
|
||||
/**
|
||||
* The amount of RAM in megabytes
|
||||
*/
|
||||
ram?: number;
|
||||
/**
|
||||
* The amount of disk space in megabytes
|
||||
*/
|
||||
disk?: number;
|
||||
/**
|
||||
* The required operating system version
|
||||
*/
|
||||
operating_system_version?: LocalizedStringSchema;
|
||||
/**
|
||||
* The required CPU
|
||||
*/
|
||||
cpu?: LocalizedStringSchema;
|
||||
/**
|
||||
* The required GPU
|
||||
*/
|
||||
gpu?: LocalizedStringSchema;
|
||||
/**
|
||||
* The required sound card
|
||||
*/
|
||||
sound_card?: LocalizedStringSchema;
|
||||
/**
|
||||
* The required DirectX version
|
||||
*/
|
||||
directx?: LocalizedStringSchema;
|
||||
/**
|
||||
* The required network connectivity status
|
||||
*/
|
||||
network?: LocalizedStringSchema;
|
||||
/**
|
||||
* Additional notes
|
||||
*/
|
||||
notes?: LocalizedStringSchema;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2025 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { SKUSystemRequirementSchema } from "./SKUSystemRequirementSchema";
|
||||
|
||||
export interface SKUSystemRequirementsSchema {
|
||||
/**
|
||||
* The minimum system requirements
|
||||
*/
|
||||
minimum?: SKUSystemRequirementSchema;
|
||||
/**
|
||||
* The recommended system requirements
|
||||
*/
|
||||
recommended?: SKUSystemRequirementSchema;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2025 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { SKUGuildMonetizationMetadataSchema } from "./SKUGuildMonetizationMetadataSchema";
|
||||
import { SocialLayerMetadataSchema } from "./SocialLayerMetadataSchema";
|
||||
|
||||
export interface SKUTenantMetadataSchema {
|
||||
/**
|
||||
* Guild monetization data
|
||||
*/
|
||||
guild_monetization?: SKUGuildMonetizationMetadataSchema;
|
||||
/**
|
||||
* Social layer game item data
|
||||
*/
|
||||
social_layer?: SocialLayerMetadataSchema;
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2025 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export enum SKUType {
|
||||
/**
|
||||
* Primary durable item
|
||||
*
|
||||
* Value: 1
|
||||
* Name: DURABLE_PRIMARY
|
||||
*/
|
||||
DURABLE_PRIMARY = 1,
|
||||
/**
|
||||
* Durable item
|
||||
*
|
||||
* Value: 2
|
||||
* Name: DURABLE
|
||||
*/
|
||||
DURABLE = 2,
|
||||
/**
|
||||
* Consumable item
|
||||
*
|
||||
* Value: 3
|
||||
* Name: CONSUMABLE
|
||||
*/
|
||||
CONSUMABLE = 3,
|
||||
/**
|
||||
* Bundle of items
|
||||
*
|
||||
* Value: 4
|
||||
* Name: BUNDLE
|
||||
*/
|
||||
BUNDLE = 4,
|
||||
/**
|
||||
* Subscription item
|
||||
*
|
||||
* Value: 5
|
||||
* Name: SUBSCRIPTION
|
||||
*/
|
||||
SUBSCRIPTION = 5,
|
||||
/**
|
||||
* Group of subscription items
|
||||
*
|
||||
* Value: 6
|
||||
* Name: SUBSCRIPTION_GROUP
|
||||
*/
|
||||
SUBSCRIPTION_GROUP = 6,
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2025 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { StoreCarouselItemSchema } from "./StoreCarouselItemSchema";
|
||||
|
||||
export interface SocialLayerMetadataSchema {
|
||||
/**
|
||||
* The carousel items for the listing
|
||||
*/
|
||||
carousel_items: StoreCarouselItemSchema[];
|
||||
/**
|
||||
* The label for the listing
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* When the listing expires
|
||||
*/
|
||||
expires_at: string | null;
|
||||
/**
|
||||
* The store asset ID for the card image
|
||||
*/
|
||||
card_image_asset_id?: string;
|
||||
/**
|
||||
* The store asset ID for the card background image
|
||||
*/
|
||||
card_background_image_asset_id?: string;
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2025 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export interface StoreCarouselItemSchema {
|
||||
/**
|
||||
* The YouTube video ID for the item
|
||||
*/
|
||||
youtube_video_id?: string;
|
||||
/**
|
||||
* The store asset ID for the item
|
||||
*/
|
||||
asset_id?: string;
|
||||
/**
|
||||
* The store asset ID for the thumbnail
|
||||
*/
|
||||
thumbnail_asset_id?: string;
|
||||
/**
|
||||
* The store asset ID for the background
|
||||
*/
|
||||
background_asset_id?: string;
|
||||
/**
|
||||
* The label for the item
|
||||
*/
|
||||
label?: string;
|
||||
/**
|
||||
* The store asset ID for the label icon
|
||||
*/
|
||||
label_icon_asset_id?: string;
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2025 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export * from "./GuildPowerupCatagoryType";
|
||||
export * from "./SKUAccessType";
|
||||
export * from "./SKUContentDescriptor";
|
||||
export * from "./SKUContentRating";
|
||||
export * from "./SKUContentRatingAgency";
|
||||
export * from "./SKUContentRatingSchema";
|
||||
export * from "./SKUESRBContentDescriptor";
|
||||
export * from "./SKUESRBContentRating";
|
||||
export * from "./SKUExternalSKUStrategySchema";
|
||||
export * from "./SKUExternalSKUStrategyType";
|
||||
export * from "./SKUFeature";
|
||||
export * from "./SKUGameServerPowerupMetadataSchema";
|
||||
export * from "./SKUGameServerPowerupProvider";
|
||||
export * from "./SKUGenre";
|
||||
export * from "./SKUGuildMonetizationMetadataSchema";
|
||||
export * from "./SKUOperatingSystem";
|
||||
export * from "./SKUPEGIContentDescriptor";
|
||||
export * from "./SKUPEGIContentRating";
|
||||
export * from "./SKUPremiumPriceSchema";
|
||||
export * from "./SKUPriceSchema";
|
||||
export * from "./SKUProductLine";
|
||||
export * from "./SKUSchema";
|
||||
export * from "./SKUSystemRequirementSchema";
|
||||
export * from "./SKUSystemRequirementsSchema";
|
||||
export * from "./SKUTenantMetadataSchema";
|
||||
export * from "./SKUType";
|
||||
export * from "./SocialLayerMetadataSchema";
|
||||
export * from "./StoreCarouselItemSchema";
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2023 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export enum BillingPaymentGateway {
|
||||
STRIPE = 1,
|
||||
BRAINTREE,
|
||||
APPLE,
|
||||
GOOGLE,
|
||||
ADYEN,
|
||||
APPLE_PARTNER,
|
||||
VIRTUAL_CURRENCY = 8,
|
||||
APPLE_ADVANCED_COMMERCE,
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2023 Spacebar and Spacebar Contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export interface LocalizedStringSchema {
|
||||
default: string;
|
||||
localizations?: Record<string, string>;
|
||||
}
|
||||
@@ -15,6 +15,7 @@
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export * from "./AckBulkSchema";
|
||||
export * from "./ActivitySchema";
|
||||
export * from "./ApplicationAuthorizeSchema";
|
||||
@@ -23,6 +24,7 @@ export * from "./BackupCodesChallengeSchema";
|
||||
export * from "./BanCreateSchema";
|
||||
export * from "./BanModeratorSchema";
|
||||
export * from "./BanRegistrySchema";
|
||||
export * from "./BillingPaymentGateway";
|
||||
export * from "./BotModifySchema";
|
||||
export * from "./BulkBanSchema";
|
||||
export * from "./BulkDeleteSchema";
|
||||
@@ -38,9 +40,6 @@ export * from "./EmailDomainLookupSchema";
|
||||
export * from "./EmailDomainLookupVerifyCodeSchema";
|
||||
export * from "./EmojiCreateSchema";
|
||||
export * from "./EmojiModifySchema";
|
||||
export * from "./EntitlementSchema";
|
||||
export * from "./EntitlementSpecialSourceType";
|
||||
export * from "./EntitlementType";
|
||||
export * from "./ForgotPasswordSchema";
|
||||
export * from "./GreetRequestSchema";
|
||||
export * from "./GuildCreateSchema";
|
||||
@@ -50,6 +49,7 @@ export * from "./GuildUpdateSchema";
|
||||
export * from "./GuildUpdateWelcomeScreenSchema";
|
||||
export * from "./HubWaitlistSignupSchema";
|
||||
export * from "./InviteCreateSchema";
|
||||
export * from "./LocalizedStringSchema";
|
||||
export * from "./LoginResponse";
|
||||
export * from "./LoginSchema";
|
||||
export * from "./MemberChangeProfileSchema";
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
import { BitField } from "./BitField";
|
||||
|
||||
export class EntitlementGiftCodeFlags extends BitField {
|
||||
static FLAGS = {
|
||||
PAYMENT_SOURCE_REQUIRED: BigInt(1) << BigInt(0),
|
||||
EXISTING_SUBSCRIPTION_DISALLOWED: BigInt(1) << BigInt(1),
|
||||
NOT_SELF_REDEEMABLE: BigInt(1) << BigInt(2),
|
||||
PROMOTION: BigInt(1) << BigInt(3),
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
import { BitField } from "./BitField";
|
||||
|
||||
export class SKUFlags extends BitField {
|
||||
static FLAGS = {
|
||||
PREMIUM_PURCHASE: BigInt(1) << BigInt(0),
|
||||
HAS_FREE_PREMIUM_CONTENT: BigInt(1) << BigInt(1),
|
||||
AVAILABLE: BigInt(1) << BigInt(2),
|
||||
PREMIUM_AND_DISTRIBUTION: BigInt(1) << BigInt(3),
|
||||
STICKER: BigInt(1) << BigInt(4),
|
||||
GUILD_ROLE: BigInt(1) << BigInt(5),
|
||||
AVAILABLE_FOR_SUBSCRIPTION_GIFTING: BigInt(1) << BigInt(6),
|
||||
APPLICATION_GUILD_SUBSCRIPTION: BigInt(1) << BigInt(7),
|
||||
APPLICATION_USER_SUBSCRIPTION: BigInt(1) << BigInt(8),
|
||||
CREATOR_MONETIZATION: BigInt(1) << BigInt(9),
|
||||
GUILD_PRODUCT: BigInt(1) << BigInt(10),
|
||||
AVAILABLE_FOR_APPLICATION_GIFTING: BigInt(1) << BigInt(11),
|
||||
};
|
||||
}
|
||||
@@ -54,3 +54,5 @@ export * from "../../schemas/HelperTypes";
|
||||
export * from "./extensions";
|
||||
export * from "./Random";
|
||||
export * from "./Url";
|
||||
export * from "./SKUFlags";
|
||||
export * from "./EntitlementGiftCodeFlags";
|
||||
Reference in New Issue
Block a user