File tree Expand file tree Collapse file tree 18 files changed +42
-26
lines changed
Expand file tree Collapse file tree 18 files changed +42
-26
lines changed Original file line number Diff line number Diff line change 11import { ApplicationLanguage } from "@squarecloud/api-types/v2" ;
22import * as z from "zod" ;
3+
34import { handleAPIObjectAssertion } from "./common" ;
45
56const applicationSchema = z
Original file line number Diff line number Diff line change 1+ import type * as z from "zod" ;
2+
13import type {
24 APIObjectAssertionProps ,
35 LiteralAssertionProps ,
46} from "@/types/assertions" ;
5- import type * as z from "zod" ;
67import { SquareCloudAPIError } from "../structures" ;
78
89export function handleLiteralAssertion ( {
Original file line number Diff line number Diff line change 11import * as z from "zod" ;
2+
23import { handleLiteralAssertion } from "./common" ;
34
45const stringSchema = z . coerce . string ( ) ;
Original file line number Diff line number Diff line change 11import { ApplicationStatus } from "@squarecloud/api-types/v2" ;
22import * as z from "zod" ;
3+
34import { handleAPIObjectAssertion } from "./common" ;
45
56const simpleStatusSchema = z
Original file line number Diff line number Diff line change 11import { ApplicationLanguage , UserPlanName } from "@squarecloud/api-types/v2" ;
22import * as z from "zod" ;
3+
34import { handleAPIObjectAssertion } from "./common" ;
45
56const userSchema = z
Original file line number Diff line number Diff line change 1+ import type { RESTPostAPIApplicationUploadResult } from "@squarecloud/api-types/v2" ;
2+ import FormData from "form-data" ;
3+ import { readFile } from "fs/promises" ;
4+
15import { assertPathLike , assertString } from "@/assertions/literal" ;
26import { Routes } from "@/lib/routes" ;
37import {
@@ -8,12 +12,9 @@ import {
812 SquareCloudAPIError ,
913 User ,
1014} from "@/structures" ;
11- import type { RESTPostAPIApplicationUploadResult } from "@squarecloud/api-types/v2" ;
12- import FormData from "form-data" ;
13- import { readFile } from "fs/promises" ;
1415import type { SquareCloudAPI } from ".." ;
1516
16- export class ApplicationModule {
17+ export class ApplicationsModule {
1718 constructor ( public readonly client : SquareCloudAPI ) { }
1819
1920 /**
Original file line number Diff line number Diff line change 1- import { Routes } from "@/lib/routes" ;
2- import { type BaseApplication , SquareCloudAPIError } from "@/structures" ;
31import type {
42 APIApplicationBackup ,
53 RESTPostAPIApplicationBackupResult ,
64} from "@squarecloud/api-types/v2" ;
75
6+ import { Routes } from "@/lib/routes" ;
7+ import { type BaseApplication , SquareCloudAPIError } from "@/structures" ;
8+
89export class BackupsModule {
910 constructor ( public readonly application : BaseApplication ) { }
1011
Original file line number Diff line number Diff line change 11import { join } from "path" ;
2+ import { readFile } from "fs/promises" ;
3+
24import { assertPathLike , assertString } from "@/assertions/literal" ;
35import { Routes } from "@/lib/routes" ;
46import type { BaseApplication } from "@/structures" ;
5- import { readFile } from "fs/promises" ;
67
78export class FilesModule {
89 constructor ( public readonly application : BaseApplication ) { }
Original file line number Diff line number Diff line change 1- export * from "./application " ;
1+ export * from "./applications " ;
22export * from "./backups" ;
33export * from "./deploys" ;
44export * from "./files" ;
Original file line number Diff line number Diff line change 1+ import type { APIVersion } from "@squarecloud/api-types/v2" ;
2+
13import { SquareCloudAPIError } from "@/structures" ;
24import type {
35 APIEndpoint ,
46 APIRequestArgs ,
57 APIRequestOptions ,
68 APIResponse ,
79} from "@/types" ;
8- import type { APIVersion } from "@squarecloud/api-types/v2" ;
910
1011export class APIService {
1112 public readonly baseUrl = "https://api.squarecloud.app" ;
You can’t perform that action at this time.
0 commit comments