syllable-sdk 0.1.0-alpha.20 → 0.1.0-alpha.22

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 (51) hide show
  1. package/README.md +17 -15
  2. package/docs/sdks/custommessages/README.md +4 -4
  3. package/funcs/customMessagesCreate.d.ts +1 -1
  4. package/funcs/customMessagesCreate.js +1 -1
  5. package/funcs/customMessagesDelete.d.ts +1 -1
  6. package/funcs/customMessagesDelete.js +1 -1
  7. package/funcs/customMessagesGetById.d.ts +1 -1
  8. package/funcs/customMessagesGetById.js +1 -1
  9. package/funcs/customMessagesUpdate.d.ts +1 -1
  10. package/funcs/customMessagesUpdate.js +1 -1
  11. package/lib/config.d.ts +3 -3
  12. package/lib/config.js +3 -3
  13. package/models/components/custommessagecreaterequest.d.ts +6 -0
  14. package/models/components/custommessagecreaterequest.d.ts.map +1 -1
  15. package/models/components/custommessagecreaterequest.js +3 -0
  16. package/models/components/custommessagecreaterequest.js.map +1 -1
  17. package/models/components/custommessageresponse.d.ts +6 -0
  18. package/models/components/custommessageresponse.d.ts.map +1 -1
  19. package/models/components/custommessageresponse.js +3 -0
  20. package/models/components/custommessageresponse.js.map +1 -1
  21. package/models/components/custommessageupdaterequest.d.ts +6 -0
  22. package/models/components/custommessageupdaterequest.d.ts.map +1 -1
  23. package/models/components/custommessageupdaterequest.js +3 -0
  24. package/models/components/custommessageupdaterequest.js.map +1 -1
  25. package/models/components/daocustommessagerule.d.ts +63 -0
  26. package/models/components/daocustommessagerule.d.ts.map +1 -0
  27. package/models/components/daocustommessagerule.js +85 -0
  28. package/models/components/daocustommessagerule.js.map +1 -0
  29. package/models/components/dayofweek.d.ts +43 -0
  30. package/models/components/dayofweek.d.ts.map +1 -0
  31. package/models/components/dayofweek.js +56 -0
  32. package/models/components/dayofweek.js.map +1 -0
  33. package/models/components/index.d.ts +2 -0
  34. package/models/components/index.d.ts.map +1 -1
  35. package/models/components/index.js +2 -0
  36. package/models/components/index.js.map +1 -1
  37. package/package.json +1 -1
  38. package/sdk/custommessages.d.ts +4 -4
  39. package/sdk/custommessages.js +4 -4
  40. package/src/funcs/customMessagesCreate.ts +1 -1
  41. package/src/funcs/customMessagesDelete.ts +1 -1
  42. package/src/funcs/customMessagesGetById.ts +1 -1
  43. package/src/funcs/customMessagesUpdate.ts +1 -1
  44. package/src/lib/config.ts +3 -3
  45. package/src/models/components/custommessagecreaterequest.ts +13 -0
  46. package/src/models/components/custommessageresponse.ts +13 -0
  47. package/src/models/components/custommessageupdaterequest.ts +13 -0
  48. package/src/models/components/daocustommessagerule.ts +129 -0
  49. package/src/models/components/dayofweek.ts +36 -0
  50. package/src/models/components/index.ts +2 -0
  51. package/src/sdk/custommessages.ts +4 -4
package/README.md CHANGED
@@ -431,25 +431,15 @@ run();
431
431
  <!-- Start Error Handling [errors] -->
432
432
  ## Error Handling
433
433
 
434
- All SDK methods return a response object or throw an error. By default, an API error will throw a `errors.SDKError`.
435
-
436
- If a HTTP request fails, an operation my also throw an error from the `models/errors/httpclienterrors.ts` module:
437
-
438
- | HTTP Client Error | Description |
439
- | ---------------------------------------------------- | ---------------------------------------------------- |
440
- | RequestAbortedError | HTTP request was aborted by the client |
441
- | RequestTimeoutError | HTTP request timed out due to an AbortSignal signal |
442
- | ConnectionError | HTTP client was unable to make a request to a server |
443
- | InvalidRequestError | Any input used to create a request is invalid |
444
- | UnexpectedClientError | Unrecognised or unexpected error |
445
-
446
- In addition, when custom error responses are specified for an operation, the SDK may throw their associated Error type. You can refer to respective *Errors* tables in SDK docs for more details on possible error types for each operation. For example, the `list` method may throw the following errors:
434
+ Some methods specify known errors which can be thrown. All the known errors are enumerated in the `models/errors/errors.ts` module. The known errors for a method are documented under the *Errors* tables in SDK docs. For example, the `list` method may throw the following errors:
447
435
 
448
436
  | Error Type | Status Code | Content Type |
449
437
  | -------------------------- | ----------- | ---------------- |
450
438
  | errors.HTTPValidationError | 422 | application/json |
451
439
  | errors.SDKError | 4XX, 5XX | \*/\* |
452
440
 
441
+ If the method throws an error and it is not captured by the known errors, it will default to throwing a `SDKError`.
442
+
453
443
  ```typescript
454
444
  import { SyllableSDK } from "syllable-sdk";
455
445
  import {
@@ -470,8 +460,9 @@ async function run() {
470
460
  console.log(result);
471
461
  } catch (err) {
472
462
  switch (true) {
463
+ // The server response does not match the expected SDK schema
473
464
  case (err instanceof SDKValidationError): {
474
- // Validation errors can be pretty-printed
465
+ // Pretty-print will provide a human-readable multi-line error message
475
466
  console.error(err.pretty());
476
467
  // Raw value may also be inspected
477
468
  console.error(err.rawValue);
@@ -483,6 +474,7 @@ async function run() {
483
474
  return;
484
475
  }
485
476
  default: {
477
+ // Other errors such as network errors, see HTTPClientErrors for more details
486
478
  throw err;
487
479
  }
488
480
  }
@@ -493,7 +485,17 @@ run();
493
485
 
494
486
  ```
495
487
 
496
- Validation errors can also occur when either method arguments or data returned from the server do not match the expected format. The `SDKValidationError` that is thrown as a result will capture the raw value that failed validation in an attribute called `rawValue`. Additionally, a `pretty()` method is available on this error that can be used to log a nicely formatted string since validation errors can list many issues and the plain error string may be difficult read when debugging.
488
+ Validation errors can also occur when either method arguments or data returned from the server do not match the expected format. The `SDKValidationError` that is thrown as a result will capture the raw value that failed validation in an attribute called `rawValue`. Additionally, a `pretty()` method is available on this error that can be used to log a nicely formatted multi-line string since validation errors can list many issues and the plain error string may be difficult read when debugging.
489
+
490
+ In some rare cases, the SDK can fail to get a response from the server or even make the request due to unexpected circumstances such as network conditions. These types of errors are captured in the `models/errors/httpclienterrors.ts` module:
491
+
492
+ | HTTP Client Error | Description |
493
+ | ---------------------------------------------------- | ---------------------------------------------------- |
494
+ | RequestAbortedError | HTTP request was aborted by the client |
495
+ | RequestTimeoutError | HTTP request timed out due to an AbortSignal signal |
496
+ | ConnectionError | HTTP client was unable to make a request to a server |
497
+ | InvalidRequestError | Any input used to create a request is invalid |
498
+ | UnexpectedClientError | Unrecognised or unexpected error |
497
499
  <!-- End Error Handling [errors] -->
498
500
 
499
501
  <!-- Start Server Selection [server] -->
@@ -88,7 +88,7 @@ run();
88
88
 
89
89
  ## create
90
90
 
91
- Create a new greeting
91
+ Create a new custom message
92
92
 
93
93
  ### Example Usage
94
94
 
@@ -167,7 +167,7 @@ run();
167
167
 
168
168
  ## update
169
169
 
170
- Update a greeting
170
+ Update a custom message
171
171
 
172
172
  ### Example Usage
173
173
 
@@ -248,7 +248,7 @@ run();
248
248
 
249
249
  ## getById
250
250
 
251
- Get the greeting by its ID
251
+ Get the custom message by its ID
252
252
 
253
253
  ### Example Usage
254
254
 
@@ -325,7 +325,7 @@ run();
325
325
 
326
326
  ## delete
327
327
 
328
- Delete greeting by ID
328
+ Delete custom message by ID
329
329
 
330
330
  ### Example Usage
331
331
 
@@ -10,7 +10,7 @@ import { Result } from "../types/fp.js";
10
10
  * Create Custom Message
11
11
  *
12
12
  * @remarks
13
- * Create a new greeting
13
+ * Create a new custom message
14
14
  */
15
15
  export declare function customMessagesCreate(client: SyllableSDKCore, request: components.CustomMessageCreateRequest, options?: RequestOptions): Promise<Result<components.CustomMessageResponse, errors.HTTPValidationError | SDKError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
16
16
  //# sourceMappingURL=customMessagesCreate.d.ts.map
@@ -38,7 +38,7 @@ const errors = __importStar(require("../models/errors/index.js"));
38
38
  * Create Custom Message
39
39
  *
40
40
  * @remarks
41
- * Create a new greeting
41
+ * Create a new custom message
42
42
  */
43
43
  async function customMessagesCreate(client, request, options) {
44
44
  const parsed = (0, schemas_js_1.safeParse)(request, (value) => components.CustomMessageCreateRequest$outboundSchema.parse(value), "Input validation failed");
@@ -10,7 +10,7 @@ import { Result } from "../types/fp.js";
10
10
  * Delete Custom Message
11
11
  *
12
12
  * @remarks
13
- * Delete greeting by ID
13
+ * Delete custom message by ID
14
14
  */
15
15
  export declare function customMessagesDelete(client: SyllableSDKCore, request: operations.CustomMessagesDeleteRequest, options?: RequestOptions): Promise<Result<any, errors.HTTPValidationError | SDKError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
16
16
  //# sourceMappingURL=customMessagesDelete.d.ts.map
@@ -39,7 +39,7 @@ const operations = __importStar(require("../models/operations/index.js"));
39
39
  * Delete Custom Message
40
40
  *
41
41
  * @remarks
42
- * Delete greeting by ID
42
+ * Delete custom message by ID
43
43
  */
44
44
  async function customMessagesDelete(client, request, options) {
45
45
  const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.CustomMessagesDeleteRequest$outboundSchema.parse(value), "Input validation failed");
@@ -11,7 +11,7 @@ import { Result } from "../types/fp.js";
11
11
  * Get Custom Message By Id
12
12
  *
13
13
  * @remarks
14
- * Get the greeting by its ID
14
+ * Get the custom message by its ID
15
15
  */
16
16
  export declare function customMessagesGetById(client: SyllableSDKCore, request: operations.CustomMessageGetByIdRequest, options?: RequestOptions): Promise<Result<components.CustomMessageResponse, errors.HTTPValidationError | SDKError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
17
17
  //# sourceMappingURL=customMessagesGetById.d.ts.map
@@ -39,7 +39,7 @@ const operations = __importStar(require("../models/operations/index.js"));
39
39
  * Get Custom Message By Id
40
40
  *
41
41
  * @remarks
42
- * Get the greeting by its ID
42
+ * Get the custom message by its ID
43
43
  */
44
44
  async function customMessagesGetById(client, request, options) {
45
45
  const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.CustomMessageGetByIdRequest$outboundSchema.parse(value), "Input validation failed");
@@ -10,7 +10,7 @@ import { Result } from "../types/fp.js";
10
10
  * Update Custom Message
11
11
  *
12
12
  * @remarks
13
- * Update a greeting
13
+ * Update a custom message
14
14
  */
15
15
  export declare function customMessagesUpdate(client: SyllableSDKCore, request: components.CustomMessageUpdateRequest, options?: RequestOptions): Promise<Result<components.CustomMessageResponse, errors.HTTPValidationError | SDKError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
16
16
  //# sourceMappingURL=customMessagesUpdate.d.ts.map
@@ -38,7 +38,7 @@ const errors = __importStar(require("../models/errors/index.js"));
38
38
  * Update Custom Message
39
39
  *
40
40
  * @remarks
41
- * Update a greeting
41
+ * Update a custom message
42
42
  */
43
43
  async function customMessagesUpdate(client, request, options) {
44
44
  const parsed = (0, schemas_js_1.safeParse)(request, (value) => components.CustomMessageUpdateRequest$outboundSchema.parse(value), "Input validation failed");
package/lib/config.d.ts CHANGED
@@ -27,8 +27,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
27
27
  export declare const SDK_METADATA: {
28
28
  readonly language: "typescript";
29
29
  readonly openapiDocVersion: "0.0.2";
30
- readonly sdkVersion: "0.1.0-alpha.20";
31
- readonly genVersion: "2.477.0";
32
- readonly userAgent: "speakeasy-sdk/typescript 0.1.0-alpha.20 2.477.0 0.0.2 syllable-sdk";
30
+ readonly sdkVersion: "0.1.0-alpha.22";
31
+ readonly genVersion: "2.477.4";
32
+ readonly userAgent: "speakeasy-sdk/typescript 0.1.0-alpha.22 2.477.4 0.0.2 syllable-sdk";
33
33
  };
34
34
  //# sourceMappingURL=config.d.ts.map
package/lib/config.js CHANGED
@@ -36,8 +36,8 @@ function serverURLFromOptions(options) {
36
36
  exports.SDK_METADATA = {
37
37
  language: "typescript",
38
38
  openapiDocVersion: "0.0.2",
39
- sdkVersion: "0.1.0-alpha.20",
40
- genVersion: "2.477.0",
41
- userAgent: "speakeasy-sdk/typescript 0.1.0-alpha.20 2.477.0 0.0.2 syllable-sdk",
39
+ sdkVersion: "0.1.0-alpha.22",
40
+ genVersion: "2.477.4",
41
+ userAgent: "speakeasy-sdk/typescript 0.1.0-alpha.22 2.477.4 0.0.2 syllable-sdk",
42
42
  };
43
43
  //# sourceMappingURL=config.js.map
@@ -1,6 +1,7 @@
1
1
  import * as z from "zod";
2
2
  import { Result as SafeParseResult } from "../../types/fp.js";
3
3
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
4
+ import { DaoCustomMessageRule, DaoCustomMessageRule$Outbound } from "./daocustommessagerule.js";
4
5
  export type CustomMessageCreateRequest = {
5
6
  /**
6
7
  * The name of the custom message
@@ -14,6 +15,10 @@ export type CustomMessageCreateRequest = {
14
15
  * The label of the custom message
15
16
  */
16
17
  label?: string | null | undefined;
18
+ /**
19
+ * Rules for time-specific message variants
20
+ */
21
+ rules?: Array<DaoCustomMessageRule> | undefined;
17
22
  type?: string | undefined;
18
23
  };
19
24
  /** @internal */
@@ -23,6 +28,7 @@ export type CustomMessageCreateRequest$Outbound = {
23
28
  name: string;
24
29
  text: string;
25
30
  label?: string | null | undefined;
31
+ rules?: Array<DaoCustomMessageRule$Outbound> | undefined;
26
32
  type: string;
27
33
  };
28
34
  /** @internal */
@@ -1 +1 @@
1
- {"version":3,"file":"custommessagecreaterequest.d.ts","sourceRoot":"","sources":["../../src/models/components/custommessagecreaterequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,MAAM,0BAA0B,GAAG;IACvC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,wCAAwC,EAAE,CAAC,CAAC,OAAO,CAC9D,0BAA0B,EAC1B,CAAC,CAAC,UAAU,EACZ,OAAO,CAMP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,mCAAmC,GAAG;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,yCAAyC,EAAE,CAAC,CAAC,OAAO,CAC/D,mCAAmC,EACnC,CAAC,CAAC,UAAU,EACZ,0BAA0B,CAM1B,CAAC;AAEH;;;GAGG;AACH,yBAAiB,2BAA2B,CAAC;IAC3C,0EAA0E;IACnE,MAAM,aAAa,8DAA2C,CAAC;IACtE,2EAA2E;IACpE,MAAM,cAAc,0FAA4C,CAAC;IACxE,qEAAqE;IACrE,KAAY,QAAQ,GAAG,mCAAmC,CAAC;CAC5D;AAED,wBAAgB,gCAAgC,CAC9C,0BAA0B,EAAE,0BAA0B,GACrD,MAAM,CAIR;AAED,wBAAgB,kCAAkC,CAChD,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,0BAA0B,EAAE,kBAAkB,CAAC,CAMjE"}
1
+ {"version":3,"file":"custommessagecreaterequest.d.ts","sourceRoot":"","sources":["../../src/models/components/custommessagecreaterequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,oBAAoB,EAEpB,6BAA6B,EAE9B,MAAM,2BAA2B,CAAC;AAEnC,MAAM,MAAM,0BAA0B,GAAG;IACvC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,GAAG,SAAS,CAAC;IAChD,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,wCAAwC,EAAE,CAAC,CAAC,OAAO,CAC9D,0BAA0B,EAC1B,CAAC,CAAC,UAAU,EACZ,OAAO,CAOP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,mCAAmC,GAAG;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC,KAAK,CAAC,EAAE,KAAK,CAAC,6BAA6B,CAAC,GAAG,SAAS,CAAC;IACzD,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,yCAAyC,EAAE,CAAC,CAAC,OAAO,CAC/D,mCAAmC,EACnC,CAAC,CAAC,UAAU,EACZ,0BAA0B,CAO1B,CAAC;AAEH;;;GAGG;AACH,yBAAiB,2BAA2B,CAAC;IAC3C,0EAA0E;IACnE,MAAM,aAAa,8DAA2C,CAAC;IACtE,2EAA2E;IACpE,MAAM,cAAc,0FAA4C,CAAC;IACxE,qEAAqE;IACrE,KAAY,QAAQ,GAAG,mCAAmC,CAAC;CAC5D;AAED,wBAAgB,gCAAgC,CAC9C,0BAA0B,EAAE,0BAA0B,GACrD,MAAM,CAIR;AAED,wBAAgB,kCAAkC,CAChD,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,0BAA0B,EAAE,kBAAkB,CAAC,CAMjE"}
@@ -31,11 +31,13 @@ exports.customMessageCreateRequestToJSON = customMessageCreateRequestToJSON;
31
31
  exports.customMessageCreateRequestFromJSON = customMessageCreateRequestFromJSON;
32
32
  const z = __importStar(require("zod"));
33
33
  const schemas_js_1 = require("../../lib/schemas.js");
34
+ const daocustommessagerule_js_1 = require("./daocustommessagerule.js");
34
35
  /** @internal */
35
36
  exports.CustomMessageCreateRequest$inboundSchema = z.object({
36
37
  name: z.string(),
37
38
  text: z.string(),
38
39
  label: z.nullable(z.string()).optional(),
40
+ rules: z.array(daocustommessagerule_js_1.DaoCustomMessageRule$inboundSchema).optional(),
39
41
  type: z.string().default("greeting"),
40
42
  });
41
43
  /** @internal */
@@ -43,6 +45,7 @@ exports.CustomMessageCreateRequest$outboundSchema = z.object({
43
45
  name: z.string(),
44
46
  text: z.string(),
45
47
  label: z.nullable(z.string()).optional(),
48
+ rules: z.array(daocustommessagerule_js_1.DaoCustomMessageRule$outboundSchema).optional(),
46
49
  type: z.string().default("greeting"),
47
50
  });
48
51
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"custommessagecreaterequest.js","sourceRoot":"","sources":["../../src/models/components/custommessagecreaterequest.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAoEH,4EAMC;AAED,gFAQC;AAlFD,uCAAyB;AACzB,qDAAiD;AAoBjD,gBAAgB;AACH,QAAA,wCAAwC,GAIjD,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACxC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC;CACrC,CAAC,CAAC;AAUH,gBAAgB;AACH,QAAA,yCAAyC,GAIlD,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACxC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC;CACrC,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,2BAA2B,CAO3C;AAPD,WAAiB,2BAA2B;IAC1C,0EAA0E;IAC7D,yCAAa,GAAG,gDAAwC,CAAC;IACtE,2EAA2E;IAC9D,0CAAc,GAAG,iDAAyC,CAAC;AAG1E,CAAC,EAPgB,2BAA2B,2CAA3B,2BAA2B,QAO3C;AAED,SAAgB,gCAAgC,CAC9C,0BAAsD;IAEtD,OAAO,IAAI,CAAC,SAAS,CACnB,iDAAyC,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAC5E,CAAC;AACJ,CAAC;AAED,SAAgB,kCAAkC,CAChD,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,gDAAwC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACpE,wDAAwD,CACzD,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"custommessagecreaterequest.js","sourceRoot":"","sources":["../../src/models/components/custommessagecreaterequest.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAiFH,4EAMC;AAED,gFAQC;AA/FD,uCAAyB;AACzB,qDAAiD;AAGjD,uEAKmC;AAsBnC,gBAAgB;AACH,QAAA,wCAAwC,GAIjD,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACxC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,4DAAkC,CAAC,CAAC,QAAQ,EAAE;IAC7D,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC;CACrC,CAAC,CAAC;AAWH,gBAAgB;AACH,QAAA,yCAAyC,GAIlD,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACxC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,6DAAmC,CAAC,CAAC,QAAQ,EAAE;IAC9D,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC;CACrC,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,2BAA2B,CAO3C;AAPD,WAAiB,2BAA2B;IAC1C,0EAA0E;IAC7D,yCAAa,GAAG,gDAAwC,CAAC;IACtE,2EAA2E;IAC9D,0CAAc,GAAG,iDAAyC,CAAC;AAG1E,CAAC,EAPgB,2BAA2B,2CAA3B,2BAA2B,QAO3C;AAED,SAAgB,gCAAgC,CAC9C,0BAAsD;IAEtD,OAAO,IAAI,CAAC,SAAS,CACnB,iDAAyC,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAC5E,CAAC;AACJ,CAAC;AAED,SAAgB,kCAAkC,CAChD,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,gDAAwC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACpE,wDAAwD,CACzD,CAAC;AACJ,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import * as z from "zod";
2
2
  import { Result as SafeParseResult } from "../../types/fp.js";
3
3
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
4
+ import { DaoCustomMessageRule, DaoCustomMessageRule$Outbound } from "./daocustommessagerule.js";
4
5
  export type CustomMessageResponse = {
5
6
  /**
6
7
  * The name of the custom message
@@ -14,6 +15,10 @@ export type CustomMessageResponse = {
14
15
  * The label of the custom message
15
16
  */
16
17
  label?: string | null | undefined;
18
+ /**
19
+ * Rules for time-specific message variants
20
+ */
21
+ rules?: Array<DaoCustomMessageRule> | undefined;
17
22
  /**
18
23
  * The ID of the custom message
19
24
  */
@@ -39,6 +44,7 @@ export type CustomMessageResponse$Outbound = {
39
44
  name: string;
40
45
  text: string;
41
46
  label?: string | null | undefined;
47
+ rules?: Array<DaoCustomMessageRule$Outbound> | undefined;
42
48
  id: number;
43
49
  updated_at: string;
44
50
  agent_count?: number | null | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"custommessageresponse.d.ts","sourceRoot":"","sources":["../../src/models/components/custommessageresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,SAAS,EAAE,IAAI,CAAC;IAChB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACvC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,mCAAmC,EAAE,CAAC,CAAC,OAAO,CACzD,qBAAqB,EACrB,CAAC,CAAC,UAAU,EACZ,OAAO,CAgBP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,8BAA8B,GAAG;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACxC,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,oCAAoC,EAAE,CAAC,CAAC,OAAO,CAC1D,8BAA8B,EAC9B,CAAC,CAAC,UAAU,EACZ,qBAAqB,CAgBrB,CAAC;AAEH;;;GAGG;AACH,yBAAiB,sBAAsB,CAAC;IACtC,qEAAqE;IAC9D,MAAM,aAAa,yDAAsC,CAAC;IACjE,sEAAsE;IAC/D,MAAM,cAAc,gFAAuC,CAAC;IACnE,gEAAgE;IAChE,KAAY,QAAQ,GAAG,8BAA8B,CAAC;CACvD;AAED,wBAAgB,2BAA2B,CACzC,qBAAqB,EAAE,qBAAqB,GAC3C,MAAM,CAIR;AAED,wBAAgB,6BAA6B,CAC3C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,qBAAqB,EAAE,kBAAkB,CAAC,CAM5D"}
1
+ {"version":3,"file":"custommessageresponse.d.ts","sourceRoot":"","sources":["../../src/models/components/custommessageresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,oBAAoB,EAEpB,6BAA6B,EAE9B,MAAM,2BAA2B,CAAC;AAEnC,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,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CACvD;AAED,wBAAgB,2BAA2B,CACzC,qBAAqB,EAAE,qBAAqB,GAC3C,MAAM,CAIR;AAED,wBAAgB,6BAA6B,CAC3C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,qBAAqB,EAAE,kBAAkB,CAAC,CAM5D"}
@@ -32,11 +32,13 @@ exports.customMessageResponseFromJSON = customMessageResponseFromJSON;
32
32
  const z = __importStar(require("zod"));
33
33
  const primitives_js_1 = require("../../lib/primitives.js");
34
34
  const schemas_js_1 = require("../../lib/schemas.js");
35
+ const daocustommessagerule_js_1 = require("./daocustommessagerule.js");
35
36
  /** @internal */
36
37
  exports.CustomMessageResponse$inboundSchema = z.object({
37
38
  name: z.string(),
38
39
  text: z.string(),
39
40
  label: z.nullable(z.string()).optional(),
41
+ rules: z.array(daocustommessagerule_js_1.DaoCustomMessageRule$inboundSchema).optional(),
40
42
  id: z.number().int(),
41
43
  updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
42
44
  agent_count: z.nullable(z.number().int()).optional(),
@@ -54,6 +56,7 @@ exports.CustomMessageResponse$outboundSchema = z.object({
54
56
  name: z.string(),
55
57
  text: z.string(),
56
58
  label: z.nullable(z.string()).optional(),
59
+ rules: z.array(daocustommessagerule_js_1.DaoCustomMessageRule$outboundSchema).optional(),
57
60
  id: z.number().int(),
58
61
  updatedAt: z.date().transform(v => v.toISOString()),
59
62
  agentCount: z.nullable(z.number().int()).optional(),
@@ -1 +1 @@
1
- {"version":3,"file":"custommessageresponse.js","sourceRoot":"","sources":["../../src/models/components/custommessageresponse.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AA6GH,kEAMC;AAED,sEAQC;AA3HD,uCAAyB;AACzB,2DAA0D;AAC1D,qDAAiD;AAoCjD,gBAAgB;AACH,QAAA,mCAAmC,GAI5C,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,CAAC,CA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AQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE;IACnD,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC;CACrC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,SAAS,EAAE,YAAY;QACvB,UAAU,EAAE,aAAa;QACzB,aAAa,EAAE,iBAAiB;KACjC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,sBAAsB,CAOtC;AAPD,WAAiB,sBAAsB;IACrC,qEAAqE;IACxD,oCAAa,GAAG,2CAAmC,CAAC;IACjE,sEAAsE;IACzD,qCAAc,GAAG,4CAAoC,CAAC;AAGrE,CAAC,EAPgB,sBAAsB,sCAAtB,sBAAsB,QAOtC;AAED,SAAgB,2BAA2B,CACzC,qBAA4C;IAE5C,OAAO,IAAI,CAAC,SAAS,CACnB,4CAAoC,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAClE,CAAC;AACJ,CAAC;AAED,SAAgB,6BAA6B,CAC3C,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,2CAAmC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC/D,mDAAmD,CACpD,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"custommessageresponse.js","sourceRoot":"","sources":["../../src/models/components/custommessageresponse.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AA0HH,kEAMC;AAED,sEAQC;AAxID,uCAAyB;AACzB,2DAA0D;AAC1D,qDAAiD;AAGjD,uEAKmC;AAsCnC,gBAAgB;AACH,QAAA,mCAAmC,GAI5C,CAAC,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1
  import * as z from "zod";
2
2
  import { Result as SafeParseResult } from "../../types/fp.js";
3
3
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
4
+ import { DaoCustomMessageRule, DaoCustomMessageRule$Outbound } from "./daocustommessagerule.js";
4
5
  export type CustomMessageUpdateRequest = {
5
6
  /**
6
7
  * The name of the custom message
@@ -14,6 +15,10 @@ export type CustomMessageUpdateRequest = {
14
15
  * The label of the custom message
15
16
  */
16
17
  label?: string | null | undefined;
18
+ /**
19
+ * Rules for time-specific message variants
20
+ */
21
+ rules?: Array<DaoCustomMessageRule> | undefined;
17
22
  /**
18
23
  * The ID of the custom message
19
24
  */
@@ -27,6 +32,7 @@ export type CustomMessageUpdateRequest$Outbound = {
27
32
  name: string;
28
33
  text: string;
29
34
  label?: string | null | undefined;
35
+ rules?: Array<DaoCustomMessageRule$Outbound> | undefined;
30
36
  id: number;
31
37
  type: string;
32
38
  };
@@ -1 +1 @@
1
- {"version":3,"file":"custommessageupdaterequest.d.ts","sourceRoot":"","sources":["../../src/models/components/custommessageupdaterequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,MAAM,0BAA0B,GAAG;IACvC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,wCAAwC,EAAE,CAAC,CAAC,OAAO,CAC9D,0BAA0B,EAC1B,CAAC,CAAC,UAAU,EACZ,OAAO,CAOP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,mCAAmC,GAAG;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,yCAAyC,EAAE,CAAC,CAAC,OAAO,CAC/D,mCAAmC,EACnC,CAAC,CAAC,UAAU,EACZ,0BAA0B,CAO1B,CAAC;AAEH;;;GAGG;AACH,yBAAiB,2BAA2B,CAAC;IAC3C,0EAA0E;IACnE,MAAM,aAAa,8DAA2C,CAAC;IACtE,2EAA2E;IACpE,MAAM,cAAc,0FAA4C,CAAC;IACxE,qEAAqE;IACrE,KAAY,QAAQ,GAAG,mCAAmC,CAAC;CAC5D;AAED,wBAAgB,gCAAgC,CAC9C,0BAA0B,EAAE,0BAA0B,GACrD,MAAM,CAIR;AAED,wBAAgB,kCAAkC,CAChD,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,0BAA0B,EAAE,kBAAkB,CAAC,CAMjE"}
1
+ {"version":3,"file":"custommessageupdaterequest.d.ts","sourceRoot":"","sources":["../../src/models/components/custommessageupdaterequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,oBAAoB,EAEpB,6BAA6B,EAE9B,MAAM,2BAA2B,CAAC;AAEnC,MAAM,MAAM,0BAA0B,GAAG;IACvC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,CAAC,EAAE,MAA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dateRequestFromJSON = customMessageUpdateRequestFromJSON;
32
32
  const z = __importStar(require("zod"));
33
33
  const schemas_js_1 = require("../../lib/schemas.js");
34
+ const daocustommessagerule_js_1 = require("./daocustommessagerule.js");
34
35
  /** @internal */
35
36
  exports.CustomMessageUpdateRequest$inboundSchema = z.object({
36
37
  name: z.string(),
37
38
  text: z.string(),
38
39
  label: z.nullable(z.string()).optional(),
40
+ rules: z.array(daocustommessagerule_js_1.DaoCustomMessageRule$inboundSchema).optional(),
39
41
  id: z.number().int(),
40
42
  type: z.string().default("greeting"),
41
43
  });
@@ -44,6 +46,7 @@ exports.CustomMessageUpdateRequest$outboundSchema = z.object({
44
46
  name: z.string(),
45
47
  text: z.string(),
46
48
  label: z.nullable(z.string()).optional(),
49
+ rules: z.array(daocustommessagerule_js_1.DaoCustomMessageRule$outboundSchema).optional(),
47
50
  id: z.number().int(),
48
51
  type: z.string().default("greeting"),
49
52
  });
@@ -1 +1 @@
1
- {"version":3,"file":"custommessageupdaterequest.js","sourceRoot":"","sources":["../../src/models/components/custommessageupdaterequest.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AA2EH,4EAMC;AAED,gFAQC;AAzFD,uCAAyB;AACzB,qDAAiD;AAwBjD,gBAAgB;AACH,QAAA,wCAAwC,GAIjD,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACxC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IACpB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC;CACrC,CAAC,CAAC;AAWH,gBAAgB;AACH,QAAA,yCAAyC,GAIlD,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACxC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IACpB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC;CACrC,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,2BAA2B,CAO3C;AAPD,WAAiB,2BAA2B;IAC1C,0EAA0E;IAC7D,yCAAa,GAAG,gDAAwC,CAAC;IACtE,2EAA2E;IAC9D,0CAAc,GAAG,iDAAyC,CAAC;AAG1E,CAAC,EAPgB,2BAA2B,2CAA3B,2BAA2B,QAO3C;AAED,SAAgB,gCAAgC,CAC9C,0BAAsD;IAEtD,OAAO,IAAI,CAAC,SAAS,CACnB,iDAAyC,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAC5E,CAAC;AACJ,CAAC;AAED,SAAgB,kCAAkC,CAChD,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,gDAAwC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACpE,wDAAwD,CACzD,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"custommessageupdaterequest.js","sourceRoot":"","sources":["../../src/models/components/custommessageupdaterequest.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAwFH,4EAMC;AAED,gFAQC;AAtGD,uCAAyB;AACzB,qDAAiD;AAGjD,uEAKmC;AA0BnC,gBAAgB;AACH,QAAA,wCAAwC,GAIjD,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,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UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,gDAAwC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACpE,wDAAwD,CACzD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,63 @@
1
+ import * as z from "zod";
2
+ import { Result as SafeParseResult } from "../../types/fp.js";
3
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
4
+ import { DayOfWeek } from "./dayofweek.js";
5
+ export type DaoCustomMessageRule = {
6
+ /**
7
+ * The description of the rule
8
+ */
9
+ description: string;
10
+ /**
11
+ * The start of the time range for the rule in 24-hour format hh:mm (should be null for "all day" cases)
12
+ */
13
+ timeRangeStart?: string | null | undefined;
14
+ /**
15
+ * The end of the time range for the rule in 24-hour format hh:mm (should be null for "all day" cases)
16
+ */
17
+ timeRangeEnd?: string | null | undefined;
18
+ /**
19
+ * The date for the rule in YYYY-MM-DD format
20
+ */
21
+ date?: string | null | undefined;
22
+ /**
23
+ * The days of the week for the rule
24
+ */
25
+ daysOfWeek?: Array<DayOfWeek> | null | undefined;
26
+ /**
27
+ * Whether the rule logic should be inverted (i.e. "not")
28
+ */
29
+ invert: boolean;
30
+ /**
31
+ * Message text associated with the rule
32
+ */
33
+ text: string;
34
+ };
35
+ /** @internal */
36
+ export declare const DaoCustomMessageRule$inboundSchema: z.ZodType<DaoCustomMessageRule, z.ZodTypeDef, unknown>;
37
+ /** @internal */
38
+ export type DaoCustomMessageRule$Outbound = {
39
+ description: string;
40
+ time_range_start?: string | null | undefined;
41
+ time_range_end?: string | null | undefined;
42
+ date?: string | null | undefined;
43
+ days_of_week?: Array<string> | null | undefined;
44
+ invert: boolean;
45
+ text: string;
46
+ };
47
+ /** @internal */
48
+ export declare const DaoCustomMessageRule$outboundSchema: z.ZodType<DaoCustomMessageRule$Outbound, z.ZodTypeDef, DaoCustomMessageRule>;
49
+ /**
50
+ * @internal
51
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
52
+ */
53
+ export declare namespace DaoCustomMessageRule$ {
54
+ /** @deprecated use `DaoCustomMessageRule$inboundSchema` instead. */
55
+ const inboundSchema: z.ZodType<DaoCustomMessageRule, z.ZodTypeDef, unknown>;
56
+ /** @deprecated use `DaoCustomMessageRule$outboundSchema` instead. */
57
+ const outboundSchema: z.ZodType<DaoCustomMessageRule$Outbound, z.ZodTypeDef, DaoCustomMessageRule>;
58
+ /** @deprecated use `DaoCustomMessageRule$Outbound` instead. */
59
+ type Outbound = DaoCustomMessageRule$Outbound;
60
+ }
61
+ export declare function daoCustomMessageRuleToJSON(daoCustomMessageRule: DaoCustomMessageRule): string;
62
+ export declare function daoCustomMessageRuleFromJSON(jsonString: string): SafeParseResult<DaoCustomMessageRule, SDKValidationError>;
63
+ //# sourceMappingURL=daocustommessagerule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"daocustommessagerule.d.ts","sourceRoot":"","sources":["../../src/models/components/daocustommessagerule.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,SAAS,EAGV,MAAM,gBAAgB,CAAC;AAExB,MAAM,MAAM,oBAAoB,GAAG;IACjC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3C;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACzC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACjC;;OAEG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;IACjD;;OAEG;IACH,MA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Binding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.DaoCustomMessageRule$ = exports.DaoCustomMessageRule$outboundSchema = exports.DaoCustomMessageRule$inboundSchema = void 0;
30
+ exports.daoCustomMessageRuleToJSON = daoCustomMessageRuleToJSON;
31
+ exports.daoCustomMessageRuleFromJSON = daoCustomMessageRuleFromJSON;
32
+ const z = __importStar(require("zod"));
33
+ const primitives_js_1 = require("../../lib/primitives.js");
34
+ const schemas_js_1 = require("../../lib/schemas.js");
35
+ const dayofweek_js_1 = require("./dayofweek.js");
36
+ /** @internal */
37
+ exports.DaoCustomMessageRule$inboundSchema = z.object({
38
+ description: z.string(),
39
+ time_range_start: z.nullable(z.string()).optional(),
40
+ time_range_end: z.nullable(z.string()).optional(),
41
+ date: z.nullable(z.string()).optional(),
42
+ days_of_week: z.nullable(z.array(dayofweek_js_1.DayOfWeek$inboundSchema)).optional(),
43
+ invert: z.boolean(),
44
+ text: z.string(),
45
+ }).transform((v) => {
46
+ return (0, primitives_js_1.remap)(v, {
47
+ "time_range_start": "timeRangeStart",
48
+ "time_range_end": "timeRangeEnd",
49
+ "days_of_week": "daysOfWeek",
50
+ });
51
+ });
52
+ /** @internal */
53
+ exports.DaoCustomMessageRule$outboundSchema = z.object({
54
+ description: z.string(),
55
+ timeRangeStart: z.nullable(z.string()).optional(),
56
+ timeRangeEnd: z.nullable(z.string()).optional(),
57
+ date: z.nullable(z.string()).optional(),
58
+ daysOfWeek: z.nullable(z.array(dayofweek_js_1.DayOfWeek$outboundSchema)).optional(),
59
+ invert: z.boolean(),
60
+ text: z.string(),
61
+ }).transform((v) => {
62
+ return (0, primitives_js_1.remap)(v, {
63
+ timeRangeStart: "time_range_start",
64
+ timeRangeEnd: "time_range_end",
65
+ daysOfWeek: "days_of_week",
66
+ });
67
+ });
68
+ /**
69
+ * @internal
70
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
71
+ */
72
+ var DaoCustomMessageRule$;
73
+ (function (DaoCustomMessageRule$) {
74
+ /** @deprecated use `DaoCustomMessageRule$inboundSchema` instead. */
75
+ DaoCustomMessageRule$.inboundSchema = exports.DaoCustomMessageRule$inboundSchema;
76
+ /** @deprecated use `DaoCustomMessageRule$outboundSchema` instead. */
77
+ DaoCustomMessageRule$.outboundSchema = exports.DaoCustomMessageRule$outboundSchema;
78
+ })(DaoCustomMessageRule$ || (exports.DaoCustomMessageRule$ = DaoCustomMessageRule$ = {}));
79
+ function daoCustomMessageRuleToJSON(daoCustomMessageRule) {
80
+ return JSON.stringify(exports.DaoCustomMessageRule$outboundSchema.parse(daoCustomMessageRule));
81
+ }
82
+ function daoCustomMessageRuleFromJSON(jsonString) {
83
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.DaoCustomMessageRule$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DaoCustomMessageRule' from JSON`);
84
+ }
85
+ //# sourceMappingURL=daocustommessagerule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"daocustommessagerule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u: "tu";
6
+ readonly We: "we";
7
+ readonly Th: "th";
8
+ readonly Fr: "fr";
9
+ readonly Sa: "sa";
10
+ readonly Su: "su";
11
+ };
12
+ export type DayOfWeek = ClosedEnum<typeof DayOfWeek>;
13
+ /** @internal */
14
+ export declare const DayOfWeek$inboundSchema: z.ZodNativeEnum<typeof DayOfWeek>;
15
+ /** @internal */
16
+ export declare const DayOfWeek$outboundSchema: z.ZodNativeEnum<typeof DayOfWeek>;
17
+ /**
18
+ * @internal
19
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
20
+ */
21
+ export declare namespace DayOfWeek$ {
22
+ /** @deprecated use `DayOfWeek$inboundSchema` instead. */
23
+ const inboundSchema: z.ZodNativeEnum<{
24
+ readonly Mo: "mo";
25
+ readonly Tu: "tu";
26
+ readonly We: "we";
27
+ readonly Th: "th";
28
+ readonly Fr: "fr";
29
+ readonly Sa: "sa";
30
+ readonly Su: "su";
31
+ }>;
32
+ /** @deprecated use `DayOfWeek$outboundSchema` instead. */
33
+ const outboundSchema: z.ZodNativeEnum<{
34
+ readonly Mo: "mo";
35
+ readonly Tu: "tu";
36
+ readonly We: "we";
37
+ readonly Th: "th";
38
+ readonly Fr: "fr";
39
+ readonly Sa: "sa";
40
+ readonly Su: "su";
41
+ }>;
42
+ }
43
+ //# sourceMappingURL=dayofweek.d.ts.map