@pelican.ts/sdk 0.5.2-next.2 → 0.5.2-next.4

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.
@@ -1249,11 +1249,11 @@ declare const CreateSchema: z.ZodObject<{
1249
1249
  }>;
1250
1250
  }, z.core.$strip>;
1251
1251
  declare const UpdateSchema: z.ZodObject<{
1252
- email: z.ZodOptional<z.ZodEmail>;
1253
- external_id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1254
- is_managed_externally: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
1255
- username: z.ZodOptional<z.ZodString>;
1256
- password: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1252
+ email: z.ZodEmail;
1253
+ external_id: z.ZodOptional<z.ZodString>;
1254
+ is_managed_externally: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1255
+ username: z.ZodString;
1256
+ password: z.ZodOptional<z.ZodString>;
1257
1257
  language: z.ZodOptional<z.ZodEnum<{
1258
1258
  af: "af";
1259
1259
  ak: "ak";
@@ -1249,11 +1249,11 @@ declare const CreateSchema: z.ZodObject<{
1249
1249
  }>;
1250
1250
  }, z.core.$strip>;
1251
1251
  declare const UpdateSchema: z.ZodObject<{
1252
- email: z.ZodOptional<z.ZodEmail>;
1253
- external_id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1254
- is_managed_externally: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
1255
- username: z.ZodOptional<z.ZodString>;
1256
- password: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1252
+ email: z.ZodEmail;
1253
+ external_id: z.ZodOptional<z.ZodString>;
1254
+ is_managed_externally: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1255
+ username: z.ZodString;
1256
+ password: z.ZodOptional<z.ZodString>;
1257
1257
  language: z.ZodOptional<z.ZodEnum<{
1258
1258
  af: "af";
1259
1259
  ak: "ak";
package/dist/api/index.js CHANGED
@@ -1147,7 +1147,10 @@ var CreateSchema = import_zod8.default.object({
1147
1147
  language: languagesSchema,
1148
1148
  timezone: timezonesSchema
1149
1149
  });
1150
- var UpdateSchema = CreateSchema.partial();
1150
+ var UpdateSchema = CreateSchema.extend({
1151
+ language: languagesSchema.optional(),
1152
+ timezone: timezonesSchema.optional()
1153
+ });
1151
1154
 
1152
1155
  // src/api/application/client.ts
1153
1156
  var Client = class {
@@ -1652,7 +1655,7 @@ var ServerUsers = class {
1652
1655
  return data.attributes;
1653
1656
  };
1654
1657
  update = async (user_uuid, permissions) => {
1655
- const { data } = await this.r.put(
1658
+ const { data } = await this.r.post(
1656
1659
  `/servers/${this.id}/users/${user_uuid}`,
1657
1660
  { permissions }
1658
1661
  );
@@ -1110,7 +1110,10 @@ var CreateSchema = z8.object({
1110
1110
  language: languagesSchema,
1111
1111
  timezone: timezonesSchema
1112
1112
  });
1113
- var UpdateSchema = CreateSchema.partial();
1113
+ var UpdateSchema = CreateSchema.extend({
1114
+ language: languagesSchema.optional(),
1115
+ timezone: timezonesSchema.optional()
1116
+ });
1114
1117
 
1115
1118
  // src/api/application/client.ts
1116
1119
  var Client = class {
@@ -1615,7 +1618,7 @@ var ServerUsers = class {
1615
1618
  return data.attributes;
1616
1619
  };
1617
1620
  update = async (user_uuid, permissions) => {
1618
- const { data } = await this.r.put(
1621
+ const { data } = await this.r.post(
1619
1622
  `/servers/${this.id}/users/${user_uuid}`,
1620
1623
  { permissions }
1621
1624
  );
package/dist/index.js CHANGED
@@ -733,7 +733,10 @@ var CreateSchema = import_zod8.default.object({
733
733
  language: languagesSchema,
734
734
  timezone: timezonesSchema
735
735
  });
736
- var UpdateSchema = CreateSchema.partial();
736
+ var UpdateSchema = CreateSchema.extend({
737
+ language: languagesSchema.optional(),
738
+ timezone: timezonesSchema.optional()
739
+ });
737
740
 
738
741
  // src/api/base/request.ts
739
742
  var import_axios = __toESM(require("axios"));
@@ -1199,7 +1202,7 @@ var ServerUsers = class {
1199
1202
  return data.attributes;
1200
1203
  };
1201
1204
  update = async (user_uuid, permissions) => {
1202
- const { data } = await this.r.put(
1205
+ const { data } = await this.r.post(
1203
1206
  `/servers/${this.id}/users/${user_uuid}`,
1204
1207
  { permissions }
1205
1208
  );
@@ -2224,10 +2227,10 @@ var Server = class {
2224
2227
  this.isSuspended = server.is_suspended;
2225
2228
  this.isInstalling = server.is_installing;
2226
2229
  this.isTransferring = server.is_transferring;
2227
- this.allocations = server.relationships.allocations.data.map(
2230
+ this.allocations = server.relationships.allocations?.data.map(
2228
2231
  (d) => new ServerAllocation(this.client, d.attributes)
2229
2232
  );
2230
- this.variables = server.relationships.variables.data.map(
2233
+ this.variables = server.relationships.variables?.data.map(
2231
2234
  (d) => d.attributes
2232
2235
  );
2233
2236
  this.egg = server.relationships.egg?.attributes;
package/dist/index.mjs CHANGED
@@ -688,7 +688,10 @@ var CreateSchema = z8.object({
688
688
  language: languagesSchema,
689
689
  timezone: timezonesSchema
690
690
  });
691
- var UpdateSchema = CreateSchema.partial();
691
+ var UpdateSchema = CreateSchema.extend({
692
+ language: languagesSchema.optional(),
693
+ timezone: timezonesSchema.optional()
694
+ });
692
695
 
693
696
  // src/api/base/request.ts
694
697
  import axios from "axios";
@@ -1154,7 +1157,7 @@ var ServerUsers = class {
1154
1157
  return data.attributes;
1155
1158
  };
1156
1159
  update = async (user_uuid, permissions) => {
1157
- const { data } = await this.r.put(
1160
+ const { data } = await this.r.post(
1158
1161
  `/servers/${this.id}/users/${user_uuid}`,
1159
1162
  { permissions }
1160
1163
  );
@@ -2179,10 +2182,10 @@ var Server = class {
2179
2182
  this.isSuspended = server.is_suspended;
2180
2183
  this.isInstalling = server.is_installing;
2181
2184
  this.isTransferring = server.is_transferring;
2182
- this.allocations = server.relationships.allocations.data.map(
2185
+ this.allocations = server.relationships.allocations?.data.map(
2183
2186
  (d) => new ServerAllocation(this.client, d.attributes)
2184
2187
  );
2185
- this.variables = server.relationships.variables.data.map(
2188
+ this.variables = server.relationships.variables?.data.map(
2186
2189
  (d) => d.attributes
2187
2190
  );
2188
2191
  this.egg = server.relationships.egg?.attributes;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pelican.ts/sdk",
3
- "version": "0.5.2-next.2",
3
+ "version": "0.5.2-next.4",
4
4
  "description": "Pelican panel SDK for TypeScript",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",