@channel.io/app-sdk-core 0.6.8 → 0.6.10

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.
@@ -9,9 +9,9 @@ import type { Context } from "../../types/context.js";
9
9
  * ```typescript
10
10
  * @Extension({ name: "oauth", systemVersion: "v1" })
11
11
  * export class MyOAuthExtension implements OAuthExtensionInterface {
12
- * @Func("oauth.getConfig")
12
+ * @Func("metadata.getAuthConfig")
13
13
  * @OutputSchema(OAuthConfigSchema)
14
- * async getConfig(ctx: Context): Promise<OAuthConfig> {
14
+ * async getAuthConfig(ctx: Context): Promise<OAuthConfig> {
15
15
  * return {
16
16
  * authorizationUrl: "https://example.com/oauth/authorize",
17
17
  * tokenUrl: "https://example.com/oauth/token",
@@ -20,14 +20,12 @@ import type { Context } from "../../types/context.js";
20
20
  * };
21
21
  * }
22
22
  *
23
- * @Func("oauth.validateCredential")
24
- * @InputSchema(ValidateCredentialInputSchema)
23
+ * @Func("validation.validateCredentials")
25
24
  * @OutputSchema(CredentialValidationResultSchema)
26
- * async validateCredential(
25
+ * async validateCredentials(
27
26
  * ctx: Context,
28
27
  * params: { accessToken: string }
29
28
  * ): Promise<CredentialValidationResult> {
30
- * // Validate the access token
31
29
  * return { valid: true };
32
30
  * }
33
31
  * }
@@ -37,21 +35,21 @@ export interface OAuthExtensionInterface {
37
35
  /**
38
36
  * Get OAuth configuration for authorization flow
39
37
  *
40
- * Function name: "oauth.getConfig"
38
+ * Function name: "metadata.getAuthConfig"
41
39
  *
42
40
  * @returns OAuth configuration including authorization URL, token URL, and scopes
43
41
  */
44
- getConfig(ctx: Context): Promise<OAuthConfig>;
42
+ getAuthConfig(ctx: Context): Promise<OAuthConfig>;
45
43
  /**
46
44
  * Validate an OAuth credential (access token)
47
45
  *
48
- * Function name: "oauth.validateCredential"
46
+ * Function name: "validation.validateCredentials"
49
47
  *
50
48
  * @param ctx - Extension context
51
49
  * @param params - Contains the access token to validate
52
50
  * @returns Validation result with expiration info
53
51
  */
54
- validateCredential(ctx: Context, params: {
52
+ validateCredentials(ctx: Context, params: {
55
53
  accessToken: string;
56
54
  }): Promise<CredentialValidationResult>;
57
55
  }
@@ -59,7 +57,7 @@ export interface OAuthExtensionInterface {
59
57
  * OAuth Extension Function Names
60
58
  */
61
59
  export declare const OAuthFunctionNames: {
62
- readonly getConfig: "oauth.getConfig";
63
- readonly validateCredential: "oauth.validateCredential";
60
+ readonly getAuthConfig: "metadata.getAuthConfig";
61
+ readonly validateCredentials: "validation.validateCredentials";
64
62
  };
65
63
  //# sourceMappingURL=oauth.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../../src/extensions/interfaces/oauth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAC3E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;;;;OAMG;IACH,SAAS,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAE9C;;;;;;;;OAQG;IACH,kBAAkB,CAChB,GAAG,EAAE,OAAO,EACZ,MAAM,EAAE;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,GAC9B,OAAO,CAAC,0BAA0B,CAAC,CAAC;CACxC;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;CAGrB,CAAC"}
1
+ {"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../../src/extensions/interfaces/oauth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAC3E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;;;;OAMG;IACH,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAElD;;;;;;;;OAQG;IACH,mBAAmB,CACjB,GAAG,EAAE,OAAO,EACZ,MAAM,EAAE;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,GAC9B,OAAO,CAAC,0BAA0B,CAAC,CAAC;CACxC;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;CAGrB,CAAC"}
@@ -2,7 +2,7 @@
2
2
  * OAuth Extension Function Names
3
3
  */
4
4
  export const OAuthFunctionNames = {
5
- getConfig: "oauth.getConfig",
6
- validateCredential: "oauth.validateCredential",
5
+ getAuthConfig: "metadata.getAuthConfig",
6
+ validateCredentials: "validation.validateCredentials",
7
7
  };
8
8
  //# sourceMappingURL=oauth.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"oauth.js","sourceRoot":"","sources":["../../../src/extensions/interfaces/oauth.ts"],"names":[],"mappings":"AA6DA;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,SAAS,EAAE,iBAAiB;IAC5B,kBAAkB,EAAE,0BAA0B;CACtC,CAAC"}
1
+ {"version":3,"file":"oauth.js","sourceRoot":"","sources":["../../../src/extensions/interfaces/oauth.ts"],"names":[],"mappings":"AA2DA;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,aAAa,EAAE,wBAAwB;IACvC,mBAAmB,EAAE,gCAAgC;CAC7C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@channel.io/app-sdk-core",
3
- "version": "0.6.8",
3
+ "version": "0.6.10",
4
4
  "description": "Core types and utilities for Channel.io App SDK",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",