feeef 0.12.0 → 0.12.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.
|
@@ -39,12 +39,13 @@ export interface OAuthAuthorizeUrlParams {
|
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
41
|
* Parameters for exchanging authorization code to access token.
|
|
42
|
+
* `clientSecret` is omitted for public PKCE clients (`token_endpoint_auth_method: none`).
|
|
42
43
|
*/
|
|
43
44
|
export interface OAuthExchangeCodeParams {
|
|
44
45
|
code: string;
|
|
45
46
|
redirectUri: string;
|
|
46
47
|
clientId: string;
|
|
47
|
-
clientSecret
|
|
48
|
+
clientSecret?: string;
|
|
48
49
|
codeVerifier?: string;
|
|
49
50
|
}
|
|
50
51
|
/**
|
|
@@ -64,6 +65,7 @@ export declare class OAuthRepository {
|
|
|
64
65
|
static buildAuthorizeUrl(params: OAuthAuthorizeUrlParams): string;
|
|
65
66
|
/**
|
|
66
67
|
* Exchanges an authorization code for an access token.
|
|
68
|
+
* Public clients omit `clientSecret` and must send `codeVerifier` (PKCE).
|
|
67
69
|
*/
|
|
68
70
|
exchangeAuthorizationCode(params: OAuthExchangeCodeParams): Promise<OAuthTokenResponse>;
|
|
69
71
|
/**
|
|
@@ -113,4 +113,29 @@ export declare class StoreRepository extends ModelRepository<StoreEntity, StoreC
|
|
|
113
113
|
* @returns A Promise that resolves to the payment result.
|
|
114
114
|
*/
|
|
115
115
|
payDue(storeId: string, amount: number): Promise<PayDueResult>;
|
|
116
|
+
/**
|
|
117
|
+
* Upserts a draft theme preview (does not change live `metadata.templateData`).
|
|
118
|
+
*/
|
|
119
|
+
putTemplatePreview(storeId: string, body: {
|
|
120
|
+
data: unknown;
|
|
121
|
+
schema?: unknown;
|
|
122
|
+
}): Promise<{
|
|
123
|
+
previewUrl: string;
|
|
124
|
+
previewToken: string;
|
|
125
|
+
expiresAt: string;
|
|
126
|
+
}>;
|
|
127
|
+
/**
|
|
128
|
+
* Clears the draft theme preview for a store.
|
|
129
|
+
*/
|
|
130
|
+
clearTemplatePreview(storeId: string): Promise<{
|
|
131
|
+
cleared: boolean;
|
|
132
|
+
}>;
|
|
133
|
+
/**
|
|
134
|
+
* Fetches draft TemplateData with a signed preview token (public, token-gated).
|
|
135
|
+
*/
|
|
136
|
+
getTemplatePreview(storeId: string, token: string): Promise<{
|
|
137
|
+
data: unknown;
|
|
138
|
+
schema?: unknown;
|
|
139
|
+
updatedAt?: string | null;
|
|
140
|
+
}>;
|
|
116
141
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "feeef",
|
|
3
3
|
"description": "feeef sdk for javascript",
|
|
4
|
-
"version": "0.12.
|
|
4
|
+
"version": "0.12.1",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"compile": "tsup-node && tsc --emitDeclarationOnly --declaration",
|
|
22
22
|
"build": "npm run compile",
|
|
23
23
|
"release": "npx release-it",
|
|
24
|
+
"publish:npm": "bash ./scripts/publish.sh",
|
|
24
25
|
"version": "npm run build",
|
|
25
26
|
"prepublishOnly": "npm run build",
|
|
26
27
|
"lint": "eslint . --ext=.ts",
|
|
@@ -96,6 +97,10 @@
|
|
|
96
97
|
"release": true,
|
|
97
98
|
"releaseName": "v${version}",
|
|
98
99
|
"web": true
|
|
100
|
+
},
|
|
101
|
+
"npm": {
|
|
102
|
+
"publish": true,
|
|
103
|
+
"skipChecks": false
|
|
99
104
|
}
|
|
100
105
|
},
|
|
101
106
|
"c8": {
|