@fonoster/common 0.9.50 → 0.9.51

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.
@@ -62,7 +62,7 @@ var EventsHookAllowedEvents;
62
62
  })(EventsHookAllowedEvents || (exports.EventsHookAllowedEvents = EventsHookAllowedEvents = {}));
63
63
  const eventsHookSchema = zod_1.z.object({
64
64
  url: zod_1.z.string().url({ message: Messages.VALID_URL }),
65
- headers: zod_1.z.record(zod_1.z.string()).optional(),
65
+ headers: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional(),
66
66
  events: zod_1.z
67
67
  .array(zod_1.z.nativeEnum(EventsHookAllowedEvents))
68
68
  .min(1)
@@ -73,7 +73,7 @@ const toolSchema = zod_1.z.object({
73
73
  .default(sendHttpRequest_1.AllowedHttpMethod.GET),
74
74
  url: zod_1.z.string().url({ message: Messages.VALID_URL }),
75
75
  waitForResponse: zod_1.z.boolean().default(true),
76
- headers: zod_1.z.record(zod_1.z.string()).optional()
76
+ headers: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional()
77
77
  })
78
78
  });
79
79
  exports.toolSchema = toolSchema;
@@ -20,6 +20,8 @@ syntax = "proto3";
20
20
 
21
21
  package fonoster.calls.v1beta2;
22
22
 
23
+ import "google/protobuf/struct.proto";
24
+
23
25
  // Calls service definition
24
26
  service Calls {
25
27
  // Call a number and returns the call status
@@ -91,6 +93,8 @@ message CreateCallRequest {
91
93
  string app_ref = 3;
92
94
  // Optional timeout in seconds
93
95
  int32 timeout = 4;
96
+ // Optional metadata to send to the application
97
+ google.protobuf.Struct metadata = 5;
94
98
  }
95
99
 
96
100
  // The response message for Calls.Call
@@ -22,17 +22,20 @@ declare const createCallRequestSchema: z.ZodObject<{
22
22
  from: z.ZodString;
23
23
  to: z.ZodString;
24
24
  appRef: z.ZodString;
25
- timeout: z.ZodOptional<z.ZodNumber>;
25
+ timeout: z.ZodDefault<z.ZodNumber>;
26
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
26
27
  }, "strip", z.ZodTypeAny, {
27
28
  timeout?: number;
28
29
  to?: string;
29
30
  from?: string;
30
31
  appRef?: string;
32
+ metadata?: Record<string, any>;
31
33
  }, {
32
34
  timeout?: number;
33
35
  to?: string;
34
36
  from?: string;
35
37
  appRef?: string;
38
+ metadata?: Record<string, any>;
36
39
  }>;
37
40
  declare const getCallRequestSchema: z.ZodObject<{
38
41
  ref: z.ZodString;
@@ -29,7 +29,8 @@ const createCallRequestSchema = zod_1.z.object({
29
29
  timeout: zod_1.z
30
30
  .number()
31
31
  .max(120, { message: "Timeout must be less than 120s" })
32
- .optional()
32
+ .default(30),
33
+ metadata: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional()
33
34
  });
34
35
  exports.createCallRequestSchema = createCallRequestSchema;
35
36
  const getCallRequestSchema = zod_1.z.object({
@@ -82,13 +82,13 @@ declare const createUserRequestSchema: z.ZodObject<{
82
82
  avatar: z.ZodOptional<z.ZodString>;
83
83
  }, "strip", z.ZodTypeAny, {
84
84
  name?: string;
85
- password?: string;
86
85
  email?: string;
86
+ password?: string;
87
87
  avatar?: string;
88
88
  }, {
89
89
  name?: string;
90
- password?: string;
91
90
  email?: string;
91
+ password?: string;
92
92
  avatar?: string;
93
93
  }>;
94
94
  declare const createUserWithOauth2CodeRequestSchema: z.ZodObject<{
@@ -121,14 +121,14 @@ declare const inviteUserToWorkspaceRequestSchema: z.ZodObject<{
121
121
  password: z.ZodUnion<[z.ZodString, z.ZodUndefined]>;
122
122
  }, "strip", z.ZodTypeAny, {
123
123
  name?: string;
124
+ email?: string;
124
125
  role?: Role.WORKSPACE_ADMIN | Role.WORKSPACE_MEMBER;
125
126
  password?: string;
126
- email?: string;
127
127
  }, {
128
128
  name?: string;
129
+ email?: string;
129
130
  role?: Role.WORKSPACE_ADMIN | Role.WORKSPACE_MEMBER;
130
131
  password?: string;
131
- email?: string;
132
132
  }>;
133
133
  declare const resendWorkspaceMembershipInvitationRequestSchema: z.ZodObject<{
134
134
  userRef: z.ZodString;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fonoster/common",
3
- "version": "0.9.50",
3
+ "version": "0.9.51",
4
4
  "description": "Common library for Fonoster projects",
5
5
  "author": "Pedro Sanders <psanders@fonoster.com>",
6
6
  "homepage": "https://github.com/fonoster/fonoster#readme",
@@ -18,7 +18,7 @@
18
18
  "clean": "rimraf ./dist node_modules tsconfig.tsbuildinfo"
19
19
  },
20
20
  "dependencies": {
21
- "@fonoster/logger": "^0.9.50",
21
+ "@fonoster/logger": "^0.9.51",
22
22
  "@grpc/grpc-js": "~1.10.6",
23
23
  "@grpc/proto-loader": "^0.7.12",
24
24
  "@influxdata/influxdb-client": "^1.35.0",
@@ -49,5 +49,5 @@
49
49
  "devDependencies": {
50
50
  "@types/nodemailer": "^6.4.14"
51
51
  },
52
- "gitHead": "8c88a1e1f0c849d428878253b94ea518c2c9b0f4"
52
+ "gitHead": "0de025bb29e91916c4530a00ed2ba0e40eed220f"
53
53
  }