@tailor-platform/function-types 0.3.0 → 0.5.0

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/package.json +1 -1
  2. package/tailor.d.ts +57 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tailor-platform/function-types",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "TypeScript types for Tailor Platform Function service",
5
5
  "repository": {
6
6
  "type": "git",
package/tailor.d.ts CHANGED
@@ -51,4 +51,60 @@ declare namespace tailor.secretmanager {
51
51
  vault: string,
52
52
  name: string
53
53
  ): Promise<string | undefined>;
54
- }
54
+ }
55
+
56
+ declare namespace tailor.authconnection {
57
+ /**
58
+ * getConnectionToken returns the access token for an auth connection
59
+ */
60
+ function getConnectionToken(connectionName: string): Promise<any>;
61
+ }
62
+
63
+ declare namespace tailor.iconv {
64
+ /**
65
+ * Convert string from one encoding to another
66
+ */
67
+ function convert<T extends string>(
68
+ str: string | Uint8Array | ArrayBuffer,
69
+ fromEncoding: string,
70
+ toEncoding: T
71
+ ): T extends 'UTF8' | 'UTF-8' ? string : Uint8Array;
72
+
73
+ /**
74
+ * Convert buffer from one encoding to another
75
+ */
76
+ function convertBuffer<T extends string>(
77
+ buffer: Uint8Array | ArrayBuffer,
78
+ fromEncoding: string,
79
+ toEncoding: T
80
+ ): T extends 'UTF8' | 'UTF-8' ? string : Uint8Array;
81
+
82
+ /**
83
+ * Decode buffer to string
84
+ */
85
+ function decode<T extends string>(
86
+ buffer: Uint8Array | ArrayBuffer,
87
+ encoding: T
88
+ ): T extends 'UTF8' | 'UTF-8' ? string : Uint8Array;
89
+
90
+ /**
91
+ * Encode string to buffer
92
+ */
93
+ function encode<T extends string>(
94
+ str: string,
95
+ encoding: T
96
+ ): T extends 'UTF8' | 'UTF-8' ? string : Uint8Array;
97
+
98
+ /**
99
+ * Get list of supported encodings
100
+ */
101
+ function encodings(): string[];
102
+
103
+ /**
104
+ * Iconv class for compatibility with node-iconv
105
+ */
106
+ class Iconv {
107
+ constructor(fromEncoding: string, toEncoding: string);
108
+ convert(input: string | Uint8Array | ArrayBuffer): string | Uint8Array;
109
+ }
110
+ }