@oaknational/oak-curriculum-schema 2.1.1 → 2.1.2-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/types.d.ts +125 -125
  2. package/package.json +1 -1
package/dist/types.d.ts CHANGED
@@ -5884,35 +5884,6 @@ declare const questionSchema: z.ZodObject<{
5884
5884
  }, z.core.$strip>;
5885
5885
  type Question = z.infer<typeof questionSchema>;
5886
5886
  declare const questionNewSchema: z.ZodObject<{
5887
- question_id: z.ZodNumber;
5888
- question_uid: z.ZodString;
5889
- question_type: z.ZodString;
5890
- question_stem: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
5891
- text: z.ZodString;
5892
- type: z.ZodLiteral<"text">;
5893
- }, z.core.$strip>, z.ZodObject<{
5894
- image_object: z.ZodObject<{
5895
- format: z.ZodOptional<z.ZodEnum<{
5896
- png: "png";
5897
- jpg: "jpg";
5898
- jpeg: "jpeg";
5899
- webp: "webp";
5900
- gif: "gif";
5901
- svg: "svg";
5902
- }>>;
5903
- secure_url: z.ZodOptional<z.ZodURL>;
5904
- url: z.ZodOptional<z.ZodURL>;
5905
- height: z.ZodOptional<z.ZodNumber>;
5906
- width: z.ZodOptional<z.ZodNumber>;
5907
- metadata: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
5908
- attribution: z.ZodOptional<z.ZodString>;
5909
- usageRestriction: z.ZodOptional<z.ZodString>;
5910
- }, z.core.$strip>, z.ZodArray<z.ZodNever>]>>;
5911
- public_id: z.ZodOptional<z.ZodString>;
5912
- version: z.ZodOptional<z.ZodNumber>;
5913
- }, z.core.$strip>;
5914
- type: z.ZodLiteral<"image">;
5915
- }, z.core.$strip>]>>>>;
5916
5887
  order: z.ZodNumber;
5917
5888
  answers: z.ZodNullable<z.ZodOptional<z.ZodObject<{
5918
5889
  "multiple-choice": z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -5973,6 +5944,35 @@ declare const questionNewSchema: z.ZodObject<{
5973
5944
  }, z.core.$strip>>>;
5974
5945
  }, z.core.$strip>>>;
5975
5946
  }, z.core.$strip>>>;
5947
+ question_id: z.ZodNumber;
5948
+ question_uid: z.ZodString;
5949
+ question_type: z.ZodString;
5950
+ question_stem: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
5951
+ text: z.ZodString;
5952
+ type: z.ZodLiteral<"text">;
5953
+ }, z.core.$strip>, z.ZodObject<{
5954
+ image_object: z.ZodObject<{
5955
+ format: z.ZodOptional<z.ZodEnum<{
5956
+ png: "png";
5957
+ jpg: "jpg";
5958
+ jpeg: "jpeg";
5959
+ webp: "webp";
5960
+ gif: "gif";
5961
+ svg: "svg";
5962
+ }>>;
5963
+ secure_url: z.ZodOptional<z.ZodURL>;
5964
+ url: z.ZodOptional<z.ZodURL>;
5965
+ height: z.ZodOptional<z.ZodNumber>;
5966
+ width: z.ZodOptional<z.ZodNumber>;
5967
+ metadata: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
5968
+ attribution: z.ZodOptional<z.ZodString>;
5969
+ usageRestriction: z.ZodOptional<z.ZodString>;
5970
+ }, z.core.$strip>, z.ZodArray<z.ZodNever>]>>;
5971
+ public_id: z.ZodOptional<z.ZodString>;
5972
+ version: z.ZodOptional<z.ZodNumber>;
5973
+ }, z.core.$strip>;
5974
+ type: z.ZodLiteral<"image">;
5975
+ }, z.core.$strip>]>>>>;
5976
5976
  feedback: z.ZodNullable<z.ZodOptional<z.ZodString>>;
5977
5977
  hint: z.ZodNullable<z.ZodOptional<z.ZodString>>;
5978
5978
  active: z.ZodOptional<z.ZodBoolean>;
@@ -6943,30 +6943,11 @@ declare const questionSchemaCamel: Omit<z.ZodType<{
6943
6943
  };
6944
6944
  type QuestionCamel = z.infer<typeof questionSchemaCamel>;
6945
6945
  declare const questionNewSchemaCamel: Omit<z.ZodType<{
6946
+ order: number;
6946
6947
  questionId: number;
6947
6948
  questionUid: string;
6948
6949
  questionType: string;
6949
- order: number;
6950
6950
  state: "new";
6951
- questionStem?: ({
6952
- text: string;
6953
- type: "text";
6954
- } | {
6955
- imageObject: {
6956
- format?: "png" | "jpg" | "jpeg" | "webp" | "gif" | "svg" | undefined;
6957
- secureUrl?: string | undefined;
6958
- url?: string | undefined;
6959
- height?: number | undefined;
6960
- width?: number | undefined;
6961
- metadata?: never[] | {
6962
- attribution?: string | undefined;
6963
- usageRestriction?: string | undefined;
6964
- } | undefined;
6965
- publicId?: string | undefined;
6966
- version?: number | undefined;
6967
- };
6968
- type: "image";
6969
- })[] | null | undefined;
6970
6951
  answers?: {
6971
6952
  "multiple-choice"?: {
6972
6953
  answer: ({
@@ -7019,15 +7000,6 @@ declare const questionNewSchemaCamel: Omit<z.ZodType<{
7019
7000
  }[] | undefined;
7020
7001
  }[] | undefined;
7021
7002
  } | null | undefined;
7022
- feedback?: string | null | undefined;
7023
- hint?: string | null | undefined;
7024
- active?: boolean | undefined;
7025
- }, unknown, z.core.$ZodTypeInternals<{
7026
- questionId: number;
7027
- questionUid: string;
7028
- questionType: string;
7029
- order: number;
7030
- state: "new";
7031
7003
  questionStem?: ({
7032
7004
  text: string;
7033
7005
  type: "text";
@@ -7047,6 +7019,15 @@ declare const questionNewSchemaCamel: Omit<z.ZodType<{
7047
7019
  };
7048
7020
  type: "image";
7049
7021
  })[] | null | undefined;
7022
+ feedback?: string | null | undefined;
7023
+ hint?: string | null | undefined;
7024
+ active?: boolean | undefined;
7025
+ }, unknown, z.core.$ZodTypeInternals<{
7026
+ order: number;
7027
+ questionId: number;
7028
+ questionUid: string;
7029
+ questionType: string;
7030
+ state: "new";
7050
7031
  answers?: {
7051
7032
  "multiple-choice"?: {
7052
7033
  answer: ({
@@ -7099,35 +7080,35 @@ declare const questionNewSchemaCamel: Omit<z.ZodType<{
7099
7080
  }[] | undefined;
7100
7081
  }[] | undefined;
7101
7082
  } | null | undefined;
7083
+ questionStem?: ({
7084
+ text: string;
7085
+ type: "text";
7086
+ } | {
7087
+ imageObject: {
7088
+ format?: "png" | "jpg" | "jpeg" | "webp" | "gif" | "svg" | undefined;
7089
+ secureUrl?: string | undefined;
7090
+ url?: string | undefined;
7091
+ height?: number | undefined;
7092
+ width?: number | undefined;
7093
+ metadata?: never[] | {
7094
+ attribution?: string | undefined;
7095
+ usageRestriction?: string | undefined;
7096
+ } | undefined;
7097
+ publicId?: string | undefined;
7098
+ version?: number | undefined;
7099
+ };
7100
+ type: "image";
7101
+ })[] | null | undefined;
7102
7102
  feedback?: string | null | undefined;
7103
7103
  hint?: string | null | undefined;
7104
7104
  active?: boolean | undefined;
7105
7105
  }, unknown>>, "parse" | "safeParse"> & {
7106
7106
  parse: (input: {
7107
+ order: number;
7107
7108
  question_id: number;
7108
7109
  question_uid: string;
7109
7110
  question_type: string;
7110
- order: number;
7111
7111
  _state: "new";
7112
- question_stem?: ({
7113
- text: string;
7114
- type: "text";
7115
- } | {
7116
- image_object: {
7117
- format?: "png" | "jpg" | "jpeg" | "webp" | "gif" | "svg" | undefined;
7118
- secure_url?: string | undefined;
7119
- url?: string | undefined;
7120
- height?: number | undefined;
7121
- width?: number | undefined;
7122
- metadata?: never[] | {
7123
- attribution?: string | undefined;
7124
- usageRestriction?: string | undefined;
7125
- } | undefined;
7126
- public_id?: string | undefined;
7127
- version?: number | undefined;
7128
- };
7129
- type: "image";
7130
- })[] | null | undefined;
7131
7112
  answers?: {
7132
7113
  "multiple-choice"?: {
7133
7114
  answer: ({
@@ -7180,22 +7161,13 @@ declare const questionNewSchemaCamel: Omit<z.ZodType<{
7180
7161
  }[] | undefined;
7181
7162
  }[] | undefined;
7182
7163
  } | null | undefined;
7183
- feedback?: string | null | undefined;
7184
- hint?: string | null | undefined;
7185
- active?: boolean | undefined;
7186
- }) => {
7187
- questionId: number;
7188
- questionUid: string;
7189
- questionType: string;
7190
- order: number;
7191
- state: "new";
7192
- questionStem?: ({
7164
+ question_stem?: ({
7193
7165
  text: string;
7194
7166
  type: "text";
7195
7167
  } | {
7196
- imageObject: {
7168
+ image_object: {
7197
7169
  format?: "png" | "jpg" | "jpeg" | "webp" | "gif" | "svg" | undefined;
7198
- secureUrl?: string | undefined;
7170
+ secure_url?: string | undefined;
7199
7171
  url?: string | undefined;
7200
7172
  height?: number | undefined;
7201
7173
  width?: number | undefined;
@@ -7203,11 +7175,20 @@ declare const questionNewSchemaCamel: Omit<z.ZodType<{
7203
7175
  attribution?: string | undefined;
7204
7176
  usageRestriction?: string | undefined;
7205
7177
  } | undefined;
7206
- publicId?: string | undefined;
7178
+ public_id?: string | undefined;
7207
7179
  version?: number | undefined;
7208
7180
  };
7209
7181
  type: "image";
7210
7182
  })[] | null | undefined;
7183
+ feedback?: string | null | undefined;
7184
+ hint?: string | null | undefined;
7185
+ active?: boolean | undefined;
7186
+ }) => {
7187
+ order: number;
7188
+ questionId: number;
7189
+ questionUid: string;
7190
+ questionType: string;
7191
+ state: "new";
7211
7192
  answers?: {
7212
7193
  "multiple-choice"?: {
7213
7194
  answer: ({
@@ -7260,23 +7241,13 @@ declare const questionNewSchemaCamel: Omit<z.ZodType<{
7260
7241
  }[] | undefined;
7261
7242
  }[] | undefined;
7262
7243
  } | null | undefined;
7263
- feedback?: string | null | undefined;
7264
- hint?: string | null | undefined;
7265
- active?: boolean | undefined;
7266
- };
7267
- safeParse: (input: {
7268
- question_id: number;
7269
- question_uid: string;
7270
- question_type: string;
7271
- order: number;
7272
- _state: "new";
7273
- question_stem?: ({
7244
+ questionStem?: ({
7274
7245
  text: string;
7275
7246
  type: "text";
7276
7247
  } | {
7277
- image_object: {
7248
+ imageObject: {
7278
7249
  format?: "png" | "jpg" | "jpeg" | "webp" | "gif" | "svg" | undefined;
7279
- secure_url?: string | undefined;
7250
+ secureUrl?: string | undefined;
7280
7251
  url?: string | undefined;
7281
7252
  height?: number | undefined;
7282
7253
  width?: number | undefined;
@@ -7284,11 +7255,21 @@ declare const questionNewSchemaCamel: Omit<z.ZodType<{
7284
7255
  attribution?: string | undefined;
7285
7256
  usageRestriction?: string | undefined;
7286
7257
  } | undefined;
7287
- public_id?: string | undefined;
7258
+ publicId?: string | undefined;
7288
7259
  version?: number | undefined;
7289
7260
  };
7290
7261
  type: "image";
7291
7262
  })[] | null | undefined;
7263
+ feedback?: string | null | undefined;
7264
+ hint?: string | null | undefined;
7265
+ active?: boolean | undefined;
7266
+ };
7267
+ safeParse: (input: {
7268
+ order: number;
7269
+ question_id: number;
7270
+ question_uid: string;
7271
+ question_type: string;
7272
+ _state: "new";
7292
7273
  answers?: {
7293
7274
  "multiple-choice"?: {
7294
7275
  answer: ({
@@ -7341,36 +7322,36 @@ declare const questionNewSchemaCamel: Omit<z.ZodType<{
7341
7322
  }[] | undefined;
7342
7323
  }[] | undefined;
7343
7324
  } | null | undefined;
7325
+ question_stem?: ({
7326
+ text: string;
7327
+ type: "text";
7328
+ } | {
7329
+ image_object: {
7330
+ format?: "png" | "jpg" | "jpeg" | "webp" | "gif" | "svg" | undefined;
7331
+ secure_url?: string | undefined;
7332
+ url?: string | undefined;
7333
+ height?: number | undefined;
7334
+ width?: number | undefined;
7335
+ metadata?: never[] | {
7336
+ attribution?: string | undefined;
7337
+ usageRestriction?: string | undefined;
7338
+ } | undefined;
7339
+ public_id?: string | undefined;
7340
+ version?: number | undefined;
7341
+ };
7342
+ type: "image";
7343
+ })[] | null | undefined;
7344
7344
  feedback?: string | null | undefined;
7345
7345
  hint?: string | null | undefined;
7346
7346
  active?: boolean | undefined;
7347
7347
  }) => {
7348
7348
  success: boolean;
7349
7349
  data?: {
7350
+ order: number;
7350
7351
  questionId: number;
7351
7352
  questionUid: string;
7352
7353
  questionType: string;
7353
- order: number;
7354
7354
  state: "new";
7355
- questionStem?: ({
7356
- text: string;
7357
- type: "text";
7358
- } | {
7359
- imageObject: {
7360
- format?: "png" | "jpg" | "jpeg" | "webp" | "gif" | "svg" | undefined;
7361
- secureUrl?: string | undefined;
7362
- url?: string | undefined;
7363
- height?: number | undefined;
7364
- width?: number | undefined;
7365
- metadata?: never[] | {
7366
- attribution?: string | undefined;
7367
- usageRestriction?: string | undefined;
7368
- } | undefined;
7369
- publicId?: string | undefined;
7370
- version?: number | undefined;
7371
- };
7372
- type: "image";
7373
- })[] | null | undefined;
7374
7355
  answers?: {
7375
7356
  "multiple-choice"?: {
7376
7357
  answer: ({
@@ -7423,6 +7404,25 @@ declare const questionNewSchemaCamel: Omit<z.ZodType<{
7423
7404
  }[] | undefined;
7424
7405
  }[] | undefined;
7425
7406
  } | null | undefined;
7407
+ questionStem?: ({
7408
+ text: string;
7409
+ type: "text";
7410
+ } | {
7411
+ imageObject: {
7412
+ format?: "png" | "jpg" | "jpeg" | "webp" | "gif" | "svg" | undefined;
7413
+ secureUrl?: string | undefined;
7414
+ url?: string | undefined;
7415
+ height?: number | undefined;
7416
+ width?: number | undefined;
7417
+ metadata?: never[] | {
7418
+ attribution?: string | undefined;
7419
+ usageRestriction?: string | undefined;
7420
+ } | undefined;
7421
+ publicId?: string | undefined;
7422
+ version?: number | undefined;
7423
+ };
7424
+ type: "image";
7425
+ })[] | null | undefined;
7426
7426
  feedback?: string | null | undefined;
7427
7427
  hint?: string | null | undefined;
7428
7428
  active?: boolean | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oaknational/oak-curriculum-schema",
3
- "version": "2.1.1",
3
+ "version": "2.1.2-beta.1",
4
4
  "description": "Contract tests to ensure data integrity between Oak apps and their data",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",