@proof-holdings/sdk 1.1.0 → 1.2.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.
- package/CHANGELOG.md +29 -0
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/resources/profiles.d.ts +24 -4
- package/dist/cjs/resources/profiles.d.ts.map +1 -1
- package/dist/cjs/resources/profiles.js +24 -4
- package/dist/cjs/resources/profiles.js.map +1 -1
- package/dist/cjs/resources/templates.d.ts +17 -13
- package/dist/cjs/resources/templates.d.ts.map +1 -1
- package/dist/cjs/resources/templates.js +26 -18
- package/dist/cjs/resources/templates.js.map +1 -1
- package/dist/cjs/types.d.ts +65 -0
- package/dist/cjs/types.d.ts.map +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/resources/profiles.d.ts +24 -4
- package/dist/esm/resources/profiles.d.ts.map +1 -1
- package/dist/esm/resources/profiles.js +24 -4
- package/dist/esm/resources/profiles.js.map +1 -1
- package/dist/esm/resources/templates.d.ts +17 -13
- package/dist/esm/resources/templates.d.ts.map +1 -1
- package/dist/esm/resources/templates.js +26 -18
- package/dist/esm/resources/templates.js.map +1 -1
- package/dist/esm/types.d.ts +65 -0
- package/dist/esm/types.d.ts.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,35 @@
|
|
|
3
3
|
Notable changes to [`@proof-holdings/sdk`](https://www.npmjs.com/package/@proof-holdings/sdk).
|
|
4
4
|
Source: [ProofHoldings/sdk-js](https://github.com/ProofHoldings/sdk-js).
|
|
5
5
|
|
|
6
|
+
## 1.2.0 — 2026-10-26
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
|
|
10
|
+
- SMS sessions: `sessions.create({ channel: 'sms' })` now works, the same way as SMS sign-in. The
|
|
11
|
+
person texts a short code to one of our numbers; the session carries `sms_code`, `sms_message`
|
|
12
|
+
and `sms_dids` (`SessionSmsNumber` per region, each with its own QR), and `deep_link` is an `sms:`
|
|
13
|
+
link with the message pre-filled. An SMS proof carries `confidence: "standard"`.
|
|
14
|
+
- `CreateSessionParams.profile_id` names the sub-account a session is for; `Session.qr_text`.
|
|
15
|
+
|
|
16
|
+
- Message templates belong to a project (sub-account). Every `templates` method except `getDefaults`
|
|
17
|
+
takes an optional last argument `{ profileId }` (`TemplateProjectOptions`), sent as the `profile_id`
|
|
18
|
+
query parameter. Omitted, a project-bound API key uses its own project and any other key the
|
|
19
|
+
primary project; a project-bound key naming another project is refused with 403 `profile_mismatch`.
|
|
20
|
+
- `email_theme` and `support_email` on `Profile`, `CreateProfileParams` and `UpdateProfileParams`:
|
|
21
|
+
email branding is set per project.
|
|
22
|
+
- `TemplateGetResponse` carries `scope` (`project` or `default`) and `profile_id`;
|
|
23
|
+
`TemplateListResponse` and custom templates carry `profile_id`.
|
|
24
|
+
|
|
25
|
+
### Deprecated
|
|
26
|
+
|
|
27
|
+
- `CreateAuthorizationParams.business_name` and `CreateSessionParams.context` are marked
|
|
28
|
+
`@deprecated`. The server ignores both: messages name the sub-account (for a consent request, the
|
|
29
|
+
approval setup's).
|
|
30
|
+
|
|
31
|
+
- `profiles.listTemplates`, `updateTemplate`, `deleteTemplate` and `previewTemplate`. The server
|
|
32
|
+
retired `/api/v1/me/profiles/{id}/templates` (410 `endpoint_retired`); use the `templates` methods
|
|
33
|
+
with `{ profileId }`.
|
|
34
|
+
|
|
6
35
|
## 1.1.0 — 2026-10-14
|
|
7
36
|
|
|
8
37
|
The first release on npm.
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export type { ProofMeChannel, CreateIdentityChallengeParams, IdentityChallenge,
|
|
|
19
19
|
export { Circles } from './resources/circles.js';
|
|
20
20
|
export { Delegations } from './resources/delegations.js';
|
|
21
21
|
export { ProofError, ValidationError, AuthenticationError, ForbiddenError, NotFoundError, ConflictError, RateLimitError, ServerError, NetworkError, TimeoutError, PollingTimeoutError, ConfirmationDeniedError, } from './errors.js';
|
|
22
|
-
export type { VerificationType, VerificationChannel, VerificationStatus, SessionChannel, VerificationRequestStatus, ActionType, ApiError, Pagination, PaginatedList, ChallengeInstructions, ProofToken, Verification, CreateVerificationParams, ListVerificationsParams, ResendResponse, TestVerifyResponse, StartDomainVerificationParams, DomainVerification, DomainCheckResponse, VerifiedUserVerification, VerifiedUser, ListVerifiedUsersParams, MultiChannelPhoneChannel, CreateMultiChannelVerificationParams, MultiChannelChannelBlock, MultiChannelVerificationResponse, MultiChannelGroupStatusResponse, RequestedAsset, VerificationRequestAsset, VerificationRequest, VerificationRequestListItem, CancelVerificationRequestResponse, CreateVerificationRequestParams, ListVerificationRequestsParams, ProofStatus, ProofValidation, RevokedProof, RevocationList, RevokeResponse, OfflineVerificationResult, OfflineVerificationOptions, OfflineFailureReason, OfflinePullHint, Session, CreateSessionParams, WebhookDelivery, WebhookRetryResponse, WebhookDeliveryList, WebhookDeliveryStats, WebhookPagination, ListWebhookDeliveriesParams, HitlStatus, HitlChannel, HitlConfig, CreateHitlParams, UpdateHitlParams, HitlListParams, HitlListResponse, HitlAuthorizationResult, HitlAuthorizationResponse, HitlFinalizeResponse, ChatIdDiscoveryCreateResponse, ApprovalLinkResponse, VerificationRequestProof, VerificationRequestProofsResponse, CircleStatus, CircleMemberStatus, CircleMemberChannelType, CircleMemberChannelStatus, CircleMember, Circle, CircleListResponse, CircleMemberInput, CreateCircleParams, UpdateCircleParams, CircleListParams, CircleMemberListResponse, CreateCircleMemberParams, CircleMemberInviteResponse, CircleMemberDrillResponse, AddCircleMemberChannelParams, CircleMemberChannel, CircleMemberChannelListResponse, DelegateIdentifierType, DelegationStatus, DelegationEffectiveStatus, RevokeDelegationReason, DelegateIdentifier, Delegation, DelegationWithToken, DelegationDetail, CreateDelegationParams, DelegationListParams, DelegationListResponse, RevokeDelegationParams, HitlKeysResponse, HitlKeysPutParams, HitlKeysPutResponse, HitlKeysDeleteResponse, HitlApproverKey, HitlApproverKeysResponse, Authorization, UpdateAuthorizationBody, CreateAuthorizationParams, AuthorizationListParams, AuthorizationListResponse, CreateAuthorizationResponse, AuthorizationExportParams, AuthorizationExportResponse, TemplateChannel, TemplateMessageType, TemplateContent, Template, TemplateVariable, TemplateListResponse, TemplateDefaultsResponse, TemplateGetResponse, TemplateUpsertResponse, TemplateDeleteResponse, RenderedTemplate, TemplatePreviewParams, TemplatePreviewResponse, TemplateRenderParams, TemplateRenderResponse, ProfileTheme, CustomLink, Profile, CreateProfileParams, UpdateProfileParams, ProfileListResponse, ProfileDeleteResponse, ProfileTemplate, ProfileTemplateListResponse, ProfileTemplateUpdateParams, ProfileTemplatePreviewParams, ProfileTemplatePreviewResponse, PublicProfileProof, PublicProfileLink, PublicProfileView, PublicProfileDelegation, UsernameAvailabilityResponse, BinaryResponse, AvatarResponse, ComputedState, MeEnvironmentParams, MeSearchBucket, MeSearchParams, MeSearchResults, PlatformSummary, ApiKeyMetadata, ApiKeyUsage, WebhookEventType, ProofOptions, WaitOptions, ConfirmAndWaitOptions, } from './types.js';
|
|
22
|
+
export type { VerificationType, VerificationChannel, VerificationStatus, SessionChannel, SessionSmsNumber, VerificationRequestStatus, ActionType, ApiError, Pagination, PaginatedList, ChallengeInstructions, ProofToken, Verification, CreateVerificationParams, ListVerificationsParams, ResendResponse, TestVerifyResponse, StartDomainVerificationParams, DomainVerification, DomainCheckResponse, VerifiedUserVerification, VerifiedUser, ListVerifiedUsersParams, MultiChannelPhoneChannel, CreateMultiChannelVerificationParams, MultiChannelChannelBlock, MultiChannelVerificationResponse, MultiChannelGroupStatusResponse, RequestedAsset, VerificationRequestAsset, VerificationRequest, VerificationRequestListItem, CancelVerificationRequestResponse, CreateVerificationRequestParams, ListVerificationRequestsParams, ProofStatus, ProofValidation, RevokedProof, RevocationList, RevokeResponse, OfflineVerificationResult, OfflineVerificationOptions, OfflineFailureReason, OfflinePullHint, Session, CreateSessionParams, WebhookDelivery, WebhookRetryResponse, WebhookDeliveryList, WebhookDeliveryStats, WebhookPagination, ListWebhookDeliveriesParams, HitlStatus, HitlChannel, HitlConfig, CreateHitlParams, UpdateHitlParams, HitlListParams, HitlListResponse, HitlAuthorizationResult, HitlAuthorizationResponse, HitlFinalizeResponse, ChatIdDiscoveryCreateResponse, ApprovalLinkResponse, VerificationRequestProof, VerificationRequestProofsResponse, CircleStatus, CircleMemberStatus, CircleMemberChannelType, CircleMemberChannelStatus, CircleMember, Circle, CircleListResponse, CircleMemberInput, CreateCircleParams, UpdateCircleParams, CircleListParams, CircleMemberListResponse, CreateCircleMemberParams, CircleMemberInviteResponse, CircleMemberDrillResponse, AddCircleMemberChannelParams, CircleMemberChannel, CircleMemberChannelListResponse, DelegateIdentifierType, DelegationStatus, DelegationEffectiveStatus, RevokeDelegationReason, DelegateIdentifier, Delegation, DelegationWithToken, DelegationDetail, CreateDelegationParams, DelegationListParams, DelegationListResponse, RevokeDelegationParams, HitlKeysResponse, HitlKeysPutParams, HitlKeysPutResponse, HitlKeysDeleteResponse, HitlApproverKey, HitlApproverKeysResponse, Authorization, UpdateAuthorizationBody, CreateAuthorizationParams, AuthorizationListParams, AuthorizationListResponse, CreateAuthorizationResponse, AuthorizationExportParams, AuthorizationExportResponse, TemplateChannel, TemplateMessageType, TemplateContent, TemplateProjectOptions, Template, TemplateVariable, TemplateListResponse, TemplateDefaultsResponse, TemplateGetResponse, TemplateUpsertResponse, TemplateDeleteResponse, RenderedTemplate, TemplatePreviewParams, TemplatePreviewResponse, TemplateRenderParams, TemplateRenderResponse, ProfileTheme, CustomLink, Profile, CreateProfileParams, UpdateProfileParams, ProfileListResponse, ProfileDeleteResponse, ProfileTemplate, ProfileTemplateListResponse, ProfileTemplateUpdateParams, ProfileTemplatePreviewParams, ProfileTemplatePreviewResponse, PublicProfileProof, PublicProfileLink, PublicProfileView, PublicProfileDelegation, UsernameAvailabilityResponse, BinaryResponse, AvatarResponse, ComputedState, MeEnvironmentParams, MeSearchBucket, MeSearchParams, MeSearchResults, PlatformSummary, ApiKeyMetadata, ApiKeyUsage, WebhookEventType, ProofOptions, WaitOptions, ConfirmAndWaitOptions, } from './types.js';
|
|
23
23
|
export { computeKid, generateKeyPair, generateEncryptionKeyPair, deriveKey, encryptMessage, encryptMessageV2, decryptMessage, encryptPrivateKey, decryptPrivateKey, validateMessageEnvelope, validatePrivateKeyEnvelope, } from './crypto/hitl-crypto.js';
|
|
24
24
|
export type { CiphertextEnvelope, CiphertextEnvelopeV1, CiphertextEnvelopeV2, EncryptedPrivateKey, HitlKeyPair, } from './crypto/hitl-crypto.js';
|
|
25
25
|
export { Proof as default } from './client.js';
|
package/dist/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAGvC,OAAO,EACL,aAAa,EACb,cAAc,EACd,aAAa,EACb,sBAAsB,EACtB,aAAa,GACd,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAG/D,OAAO,EACL,cAAc,EACd,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,YAAY,GAClB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,YAAY,EACZ,KAAK,WAAW,EAChB,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,GAC5B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,EAAE,EACF,KAAK,eAAe,EACpB,KAA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,EAChB,oBAAoB,EACpB,wBAAwB,EACxB,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,EACtB,gBAAgB,EAChB,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,EACpB,sBAAsB,EAGtB,YAAY,EACZ,UAAU,EACV,OAAO,EACP,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,eAAe,EACf,2BAA2B,EAC3B,2BAA2B,EAC3B,4BAA4B,EAC5B,8BAA8B,EAG9B,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,uBAAuB,EACvB,4BAA4B,EAC5B,cAAc,EACd,cAAc,EAGd,aAAa,EACb,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,cAAc,EACd,WAAW,EAGX,gBAAgB,EAGhB,YAAY,EACZ,WAAW,EACX,qBAAqB,GACtB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,UAAU,EACV,eAAe,EACf,yBAAyB,EACzB,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACV,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,WAAW,GACZ,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AAA3B,kGAAA,KAAK,OAAA;AACd,2CAAuC;AAA9B,qGAAA,OAAO,OAAA;AAEhB,oEAAoE;AACpE,mDAM0B;AALxB,+GAAA,aAAa,OAAA;AACb,gHAAA,cAAc,OAAA;AACd,+GAAA,aAAa,OAAA;A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AAA,cAAc,OAAA;AACd,kHAAA,gBAAgB,OAAA;AAChB,gHAAA,cAAc,OAAA;AACd,mHAAA,iBAAiB,OAAA;AACjB,mHAAA,iBAAiB,OAAA;AACjB,yHAAA,uBAAuB,OAAA;AACvB,4HAAA,0BAA0B,OAAA;AAU5B,0EAA0E;AAC1E,yCAA+C;AAAtC,oGAAA,KAAK,OAAW"}
|
|
@@ -15,13 +15,33 @@ export declare class Profiles {
|
|
|
15
15
|
delete(profileId: string): Promise<ProfileDeleteResponse>;
|
|
16
16
|
/** Set a profile as the primary profile */
|
|
17
17
|
setPrimary(profileId: string): Promise<Profile>;
|
|
18
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* List a profile's message templates (custom and default)
|
|
20
|
+
*
|
|
21
|
+
* @deprecated The server retired this route (410 `endpoint_retired`). Use
|
|
22
|
+
* `templates.list({ profileId })`.
|
|
23
|
+
*/
|
|
19
24
|
listTemplates(profileId: string): Promise<ProfileTemplateListResponse>;
|
|
20
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Create or update a profile template for a channel/message type
|
|
27
|
+
*
|
|
28
|
+
* @deprecated The server retired this route (410 `endpoint_retired`). Use
|
|
29
|
+
* `templates.upsert(channel, messageType, content, { profileId })`.
|
|
30
|
+
*/
|
|
21
31
|
updateTemplate(profileId: string, channel: TemplateChannel, type: TemplateMessageType, params: ProfileTemplateUpdateParams): Promise<ProfileTemplate>;
|
|
22
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* Delete a profile template (resets to default)
|
|
34
|
+
*
|
|
35
|
+
* @deprecated The server retired this route (410 `endpoint_retired`). Use
|
|
36
|
+
* `templates.delete(channel, messageType, { profileId })`.
|
|
37
|
+
*/
|
|
23
38
|
deleteTemplate(profileId: string, channel: TemplateChannel, type: TemplateMessageType): Promise<ProfileTemplate>;
|
|
24
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* Preview a profile template with the profile's branding
|
|
41
|
+
*
|
|
42
|
+
* @deprecated The server retired this route (410 `endpoint_retired`). Use
|
|
43
|
+
* `templates.preview(params, { profileId })`.
|
|
44
|
+
*/
|
|
25
45
|
previewTemplate(profileId: string, params: ProfileTemplatePreviewParams): Promise<ProfileTemplatePreviewResponse>;
|
|
26
46
|
}
|
|
27
47
|
//# sourceMappingURL=profiles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profiles.d.ts","sourceRoot":"","sources":["../../../src/resources/profiles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EACV,OAAO,EACP,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,eAAe,EACf,2BAA2B,EAC3B,2BAA2B,EAC3B,4BAA4B,EAC5B,8BAA8B,EAC9B,eAAe,EACf,mBAAmB,EACpB,MAAM,aAAa,CAAC;AAErB,qBAAa,QAAQ;IACP,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE7C,mDAAmD;IACnD,IAAI,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAIpC,2BAA2B;IAC3B,MAAM,CAAC,MAAM,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC;IAItD,0BAA0B;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAI7C,uBAAuB;IACvB,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC;IAQxE,uBAAuB;IACvB,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAIzD,2CAA2C;IAC3C,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAI/C
|
|
1
|
+
{"version":3,"file":"profiles.d.ts","sourceRoot":"","sources":["../../../src/resources/profi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OAAO,CAAC,eAAe,CAAC;IAM3B;;;;;OAKG;IACH,eAAe,CACb,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,4BAA4B,GACnC,OAAO,CAAC,8BAA8B,CAAC;CAM3C"}
|
|
@@ -29,19 +29,39 @@ class Profiles {
|
|
|
29
29
|
setPrimary(profileId) {
|
|
30
30
|
return this.http.post(`/api/v1/me/profiles/${encodeURIComponent(profileId)}/primary`);
|
|
31
31
|
}
|
|
32
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* List a profile's message templates (custom and default)
|
|
34
|
+
*
|
|
35
|
+
* @deprecated The server retired this route (410 `endpoint_retired`). Use
|
|
36
|
+
* `templates.list({ profileId })`.
|
|
37
|
+
*/
|
|
33
38
|
listTemplates(profileId) {
|
|
34
39
|
return this.http.get(`/api/v1/me/profiles/${encodeURIComponent(profileId)}/templates`);
|
|
35
40
|
}
|
|
36
|
-
/**
|
|
41
|
+
/**
|
|
42
|
+
* Create or update a profile template for a channel/message type
|
|
43
|
+
*
|
|
44
|
+
* @deprecated The server retired this route (410 `endpoint_retired`). Use
|
|
45
|
+
* `templates.upsert(channel, messageType, content, { profileId })`.
|
|
46
|
+
*/
|
|
37
47
|
updateTemplate(profileId, channel, type, params) {
|
|
38
48
|
return this.http.put(`/api/v1/me/profiles/${encodeURIComponent(profileId)}/templates/${encodeURIComponent(channel)}/${encodeURIComponent(type)}`, params);
|
|
39
49
|
}
|
|
40
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* Delete a profile template (resets to default)
|
|
52
|
+
*
|
|
53
|
+
* @deprecated The server retired this route (410 `endpoint_retired`). Use
|
|
54
|
+
* `templates.delete(channel, messageType, { profileId })`.
|
|
55
|
+
*/
|
|
41
56
|
deleteTemplate(profileId, channel, type) {
|
|
42
57
|
return this.http.del(`/api/v1/me/profiles/${encodeURIComponent(profileId)}/templates/${encodeURIComponent(channel)}/${encodeURIComponent(type)}`);
|
|
43
58
|
}
|
|
44
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* Preview a profile template with the profile's branding
|
|
61
|
+
*
|
|
62
|
+
* @deprecated The server retired this route (410 `endpoint_retired`). Use
|
|
63
|
+
* `templates.preview(params, { profileId })`.
|
|
64
|
+
*/
|
|
45
65
|
previewTemplate(profileId, params) {
|
|
46
66
|
return this.http.post(`/api/v1/me/profiles/${encodeURIComponent(profileId)}/templates/preview`, params);
|
|
47
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profiles.js","sourceRoot":"","sources":["../../../src/resources/profiles.ts"],"names":[],"mappings":";;;AAgBA,MAAa,QAAQ;IACnB,YAA6B,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAEjD,mDAAmD;IACnD,IAAI;QACF,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAsB,qBAAqB,CAAC,CAAC;IACnE,CAAC;IAED,2BAA2B;IAC3B,MAAM,CAAC,MAA4B;QACjC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAU,qBAAqB,EAAE,MAAM,CAAC,CAAC;IAChE,CAAC;IAED,0BAA0B;IAC1B,QAAQ,CAAC,SAAiB;QACxB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAU,uBAAuB,kBAAkB,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IACxF,CAAC;IAED,uBAAuB;IACvB,MAAM,CAAC,SAAiB,EAAE,MAA2B;QACnD,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CACtB,OAAO,EACP,uBAAuB,kBAAkB,CAAC,SAAS,CAAC,EAAE,EACtD,EAAE,IAAI,EAAE,MAAM,EAAE,CACjB,CAAC;IACJ,CAAC;IAED,uBAAuB;IACvB,MAAM,CAAC,SAAiB;QACtB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAwB,uBAAuB,kBAAkB,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IACtG,CAAC;IAED,2CAA2C;IAC3C,UAAU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H,aAAa,CAAC,SAAiB;QAC7B,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAClB,uBAAuB,kBAAkB,CAAC,SAAS,CAAC,YAAY,CACjE,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,cAAc,CACZ,SAAiB,EACjB,OAAwB,EACxB,IAAyB,EACzB,MAAmC;QAEnC,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAClB,uBAAuB,kBAAkB,CAAC,SAAS,CAAC,cAAc,kBAAkB,CAAC,OAAO,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,EAAE,EAC3H,MAAM,CACP,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,cAAc,CACZ,SAAiB,EACjB,OAAwB,EACxB,IAAyB;QAEzB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAClB,uBAAuB,kBAAkB,CAAC,SAAS,CAAC,cAAc,kBAAkB,CAAC,OAAO,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAC5H,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,eAAe,CACb,SAAiB,EACjB,MAAoC;QAEpC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CACnB,uBAAuB,kBAAkB,CAAC,SAAS,CAAC,oBAAoB,EACxE,MAAM,CACP,CAAC;IACJ,CAAC;CACF;AAlGD,4BAkGC"}
|
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
import type { HttpClient } from '../http.js';
|
|
2
|
-
import type { TemplateChannel, TemplateMessageType, TemplateContent, TemplateListResponse, TemplateDefaultsResponse, TemplateGetResponse, TemplateUpsertResponse, TemplateDeleteResponse, TemplatePreviewParams, TemplatePreviewResponse, TemplateRenderParams, TemplateRenderResponse } from '../types.js';
|
|
2
|
+
import type { TemplateChannel, TemplateMessageType, TemplateContent, TemplateProjectOptions, TemplateListResponse, TemplateDefaultsResponse, TemplateGetResponse, TemplateUpsertResponse, TemplateDeleteResponse, TemplatePreviewParams, TemplatePreviewResponse, TemplateRenderParams, TemplateRenderResponse } from '../types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Message templates. Templates exist per project (sub-account) only: every method but
|
|
5
|
+
* `getDefaults` takes an optional `{ profileId }` naming the project, sent as `profile_id`.
|
|
6
|
+
*/
|
|
3
7
|
export declare class Templates {
|
|
4
8
|
private readonly http;
|
|
5
9
|
constructor(http: HttpClient);
|
|
6
|
-
/** List custom templates plus available channels, message types, and variables */
|
|
7
|
-
list(): Promise<TemplateListResponse>;
|
|
10
|
+
/** List the project's custom templates plus available channels, message types, and variables */
|
|
11
|
+
list(options?: TemplateProjectOptions): Promise<TemplateListResponse>;
|
|
8
12
|
/** Get all default templates (for reference) */
|
|
9
13
|
getDefaults(): Promise<TemplateDefaultsResponse>;
|
|
10
|
-
/** Get a specific template (
|
|
11
|
-
retrieve(channel: TemplateChannel, messageType: TemplateMessageType): Promise<TemplateGetResponse>;
|
|
12
|
-
/** Create or update
|
|
13
|
-
upsert(channel: TemplateChannel, messageType: TemplateMessageType, content: TemplateContent): Promise<TemplateUpsertResponse>;
|
|
14
|
-
/** Delete
|
|
15
|
-
delete(channel: TemplateChannel, messageType: TemplateMessageType): Promise<TemplateDeleteResponse>;
|
|
16
|
-
/** Preview a template with sample data */
|
|
17
|
-
preview(params: TemplatePreviewParams): Promise<TemplatePreviewResponse>;
|
|
18
|
-
/** Render
|
|
19
|
-
render(params: TemplateRenderParams): Promise<TemplateRenderResponse>;
|
|
14
|
+
/** Get a specific template (the project's own if set, default otherwise) */
|
|
15
|
+
retrieve(channel: TemplateChannel, messageType: TemplateMessageType, options?: TemplateProjectOptions): Promise<TemplateGetResponse>;
|
|
16
|
+
/** Create or update the project's custom template */
|
|
17
|
+
upsert(channel: TemplateChannel, messageType: TemplateMessageType, content: TemplateContent, options?: TemplateProjectOptions): Promise<TemplateUpsertResponse>;
|
|
18
|
+
/** Delete the project's custom template (resets to default; 404 if no custom template exists) */
|
|
19
|
+
delete(channel: TemplateChannel, messageType: TemplateMessageType, options?: TemplateProjectOptions): Promise<TemplateDeleteResponse>;
|
|
20
|
+
/** Preview a template with sample data and the project's branding */
|
|
21
|
+
preview(params: TemplatePreviewParams, options?: TemplateProjectOptions): Promise<TemplatePreviewResponse>;
|
|
22
|
+
/** Render the project's template with provided variables (for testing) */
|
|
23
|
+
render(params: TemplateRenderParams, options?: TemplateProjectOptions): Promise<TemplateRenderResponse>;
|
|
20
24
|
}
|
|
21
25
|
//# sourceMappingURL=templates.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../src/resources/templates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EACV,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,oBAAoB,EACpB,wBAAwB,EACxB,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../src/resources/templates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EACV,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,sBAAsB,EACtB,oBAAoB,EACpB,wBAAwB,EACxB,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,aAAa,CAAC;AAOrB;;;GAGG;AACH,qBAAa,SAAS;IACR,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE7C,gGAAgG;IAChG,IAAI,CAAC,OAAO,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAIrE,gDAAgD;IAChD,WAAW,IAAI,OAAO,CAAC,wBAAwB,CAAC;IAIhD,4EAA4E;IAC5E,QAAQ,CAAC,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAOpI,qDAAqD;IACrD,MAAM,CACJ,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,mBAAmB,EAChC,OAAO,EAAE,eAAe,EACxB,OAAO,CAAC,EAAE,sBAAsB,GAC/B,OAAO,CAAC,sBAAsB,CAAC;IAQlC,iGAAiG;IACjG,MAAM,CAAC,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAQrI,qEAAqE;IACrE,OAAO,CAAC,MAAM,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAQ1G,0EAA0E;IAC1E,MAAM,CAAC,MAAM,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,sBAAsB,CAAC;CAOxG"}
|
|
@@ -1,37 +1,45 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Templates = void 0;
|
|
4
|
+
/** The `profile_id` query naming the project, or nothing when the caller named none. */
|
|
5
|
+
function projectQuery(options) {
|
|
6
|
+
return options?.profileId === undefined ? undefined : { profile_id: options.profileId };
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Message templates. Templates exist per project (sub-account) only: every method but
|
|
10
|
+
* `getDefaults` takes an optional `{ profileId }` naming the project, sent as `profile_id`.
|
|
11
|
+
*/
|
|
4
12
|
class Templates {
|
|
5
13
|
constructor(http) {
|
|
6
14
|
this.http = http;
|
|
7
15
|
}
|
|
8
|
-
/** List custom templates plus available channels, message types, and variables */
|
|
9
|
-
list() {
|
|
10
|
-
return this.http.get('/api/v1/templates');
|
|
16
|
+
/** List the project's custom templates plus available channels, message types, and variables */
|
|
17
|
+
list(options) {
|
|
18
|
+
return this.http.get('/api/v1/templates', projectQuery(options));
|
|
11
19
|
}
|
|
12
20
|
/** Get all default templates (for reference) */
|
|
13
21
|
getDefaults() {
|
|
14
22
|
return this.http.get('/api/v1/templates/defaults');
|
|
15
23
|
}
|
|
16
|
-
/** Get a specific template (
|
|
17
|
-
retrieve(channel, messageType) {
|
|
18
|
-
return this.http.get(`/api/v1/templates/${encodeURIComponent(channel)}/${encodeURIComponent(messageType)}
|
|
24
|
+
/** Get a specific template (the project's own if set, default otherwise) */
|
|
25
|
+
retrieve(channel, messageType, options) {
|
|
26
|
+
return this.http.get(`/api/v1/templates/${encodeURIComponent(channel)}/${encodeURIComponent(messageType)}`, projectQuery(options));
|
|
19
27
|
}
|
|
20
|
-
/** Create or update
|
|
21
|
-
upsert(channel, messageType, content) {
|
|
22
|
-
return this.http.
|
|
28
|
+
/** Create or update the project's custom template */
|
|
29
|
+
upsert(channel, messageType, content, options) {
|
|
30
|
+
return this.http.request('PUT', `/api/v1/templates/${encodeURIComponent(channel)}/${encodeURIComponent(messageType)}`, { body: content, query: projectQuery(options) });
|
|
23
31
|
}
|
|
24
|
-
/** Delete
|
|
25
|
-
delete(channel, messageType) {
|
|
26
|
-
return this.http.
|
|
32
|
+
/** Delete the project's custom template (resets to default; 404 if no custom template exists) */
|
|
33
|
+
delete(channel, messageType, options) {
|
|
34
|
+
return this.http.request('DELETE', `/api/v1/templates/${encodeURIComponent(channel)}/${encodeURIComponent(messageType)}`, { query: projectQuery(options) });
|
|
27
35
|
}
|
|
28
|
-
/** Preview a template with sample data */
|
|
29
|
-
preview(params) {
|
|
30
|
-
return this.http.
|
|
36
|
+
/** Preview a template with sample data and the project's branding */
|
|
37
|
+
preview(params, options) {
|
|
38
|
+
return this.http.request('POST', '/api/v1/templates/preview', { body: params, query: projectQuery(options) });
|
|
31
39
|
}
|
|
32
|
-
/** Render
|
|
33
|
-
render(params) {
|
|
34
|
-
return this.http.
|
|
40
|
+
/** Render the project's template with provided variables (for testing) */
|
|
41
|
+
render(params, options) {
|
|
42
|
+
return this.http.request('POST', '/api/v1/templates/render', { body: params, query: projectQuery(options) });
|
|
35
43
|
}
|
|
36
44
|
}
|
|
37
45
|
exports.Templates = Templates;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../../src/resources/templates.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../../src/resources/templates.ts"],"names":[],"mappings":";;;AAiBA,wFAAwF;AACxF,SAAS,YAAY,CAAC,OAAgC;IACpD,OAAO,OAAO,EAAE,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,OAAO,CAAC,SAAS,EAAE,CAAC;AAC1F,CAAC;AAED;;;GAGG;AACH,MAAa,SAAS;IACpB,YAA6B,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAEjD,gGAAgG;IAChG,IAAI,CAAC,OAAgC;QACnC,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAuB,mBAAmB,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC;IACzF,CAAC;IAED,gDAAgD;IAChD,WAAW;QACT,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAA2B,4BAA4B,CAAC,CAAC;IAC/E,CAAC;IAED,4EAA4E;IAC5E,QAAQ,CAAC,OAAwB,EAAE,WAAgC,EAAE,OAAgC;QACnG,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAClB,qBAAqB,kBAAkB,CAAC,OAAO,CAAC,IAAI,kBAAkB,CAAC,WAAW,CAAC,EAAE,EACrF,YAAY,CAAC,OAAO,CAAC,CACtB,CAAC;IACJ,CAAC;IAED,qDAAqD;IACrD,MAAM,CACJ,OAAwB,EACxB,WAAgC,EAChC,OAAwB,EACxB,OAAgC;QAEhC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CACtB,KAAK,EACL,qBAAqB,kBAAkB,CAAC,OAAO,CAAC,IAAI,kBAAkB,CAAC,WAAW,CAAC,EAAE,EACrF,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,CAAC,OAAO,CAAC,EAAE,CAChD,CAAC;IACJ,CAAC;IAED,iGAAiG;IACjG,MAAM,CAAC,OAAwB,EAAE,WAAgC,EAAE,OAAgC;QACjG,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CACtB,QAAQ,EACR,qBAAqB,kBAAkB,CAAC,OAAO,CAAC,IAAI,kBAAkB,CAAC,WAAW,CAAC,EAAE,EACrF,EAAE,KAAK,EAAE,YAAY,CAAC,OAAO,CAAC,EAAE,CACjC,CAAC;IACJ,CAAC;IAED,qEAAqE;IACrE,OAAO,CAAC,MAA6B,EAAE,OAAgC;QACrE,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CACtB,MAAM,EACN,2BAA2B,EAC3B,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,CAAC,OAAO,CAAC,EAAE,CAC/C,CAAC;IACJ,CAAC;IAED,0EAA0E;IAC1E,MAAM,CAAC,MAA4B,EAAE,OAAgC;QACnE,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CACtB,MAAM,EACN,0BAA0B,EAC1B,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,CAAC,OAAO,CAAC,EAAE,CAC/C,CAAC;IACJ,CAAC;CACF;AA7DD,8BA6DC"}
|
package/dist/cjs/types.d.ts
CHANGED
|
@@ -54,6 +54,8 @@ export interface ChallengeInstructions {
|
|
|
54
54
|
export interface ProofToken {
|
|
55
55
|
token: string;
|
|
56
56
|
expires_at: string;
|
|
57
|
+
/** Present for SMS proofs: `standard`, or `degraded` once a later spoof check finds risk. */
|
|
58
|
+
confidence?: 'high' | 'standard' | 'degraded';
|
|
57
59
|
}
|
|
58
60
|
export interface Verification {
|
|
59
61
|
id: string;
|
|
@@ -376,13 +378,33 @@ export interface RevokeResponse {
|
|
|
376
378
|
revoked_at: string;
|
|
377
379
|
reason: string;
|
|
378
380
|
}
|
|
381
|
+
/** One of our SMS numbers, for one region: an `sms` session's code is texted to it. */
|
|
382
|
+
export interface SessionSmsNumber {
|
|
383
|
+
did: string;
|
|
384
|
+
label: string;
|
|
385
|
+
flag: string;
|
|
386
|
+
/** Opens the messaging app on this number with the message pre-filled. */
|
|
387
|
+
qr_code?: string;
|
|
388
|
+
qr_text?: string;
|
|
389
|
+
}
|
|
379
390
|
export interface Session {
|
|
380
391
|
id: string;
|
|
381
392
|
channel: SessionChannel;
|
|
382
393
|
status: VerificationStatus;
|
|
383
394
|
deep_link?: string;
|
|
384
395
|
qr_code?: string;
|
|
396
|
+
qr_text?: string;
|
|
385
397
|
instructions?: string;
|
|
398
|
+
/** `sms` only: the short code the person texts. */
|
|
399
|
+
sms_code?: string;
|
|
400
|
+
/** `sms` only: the message to send, as pre-filled in the links. */
|
|
401
|
+
sms_message?: string;
|
|
402
|
+
/** `sms` only: every number the code can be texted to, one per configured region. */
|
|
403
|
+
sms_dids?: {
|
|
404
|
+
americas: SessionSmsNumber;
|
|
405
|
+
europe?: SessionSmsNumber;
|
|
406
|
+
israel?: SessionSmsNumber;
|
|
407
|
+
};
|
|
386
408
|
phone_number?: string;
|
|
387
409
|
verified_at?: string;
|
|
388
410
|
verification_id?: string;
|
|
@@ -392,9 +414,19 @@ export interface Session {
|
|
|
392
414
|
}
|
|
393
415
|
export interface CreateSessionParams {
|
|
394
416
|
channel: SessionChannel;
|
|
417
|
+
/**
|
|
418
|
+
* The sub-account (project) this session is for: its branding and templates are used. Omitted:
|
|
419
|
+
* the API key's sub-account, else your primary.
|
|
420
|
+
*/
|
|
421
|
+
profile_id?: string;
|
|
395
422
|
client_metadata?: Record<string, unknown>;
|
|
396
423
|
context?: {
|
|
424
|
+
/**
|
|
425
|
+
* @deprecated Ignored by the server: the bot copy names the session's sub-account
|
|
426
|
+
* (`profile_id`, else the API key's, else the primary).
|
|
427
|
+
*/
|
|
397
428
|
business_name?: string;
|
|
429
|
+
/** Picks the bot's wording: log in, 2FA, account recovery, or plain verification (the default). */
|
|
398
430
|
action?: 'login' | '2fa' | 'verification' | 'recovery';
|
|
399
431
|
};
|
|
400
432
|
}
|
|
@@ -1076,6 +1108,9 @@ export interface CreateAuthorizationParams {
|
|
|
1076
1108
|
phone?: string;
|
|
1077
1109
|
channel?: AuthorizationChannel;
|
|
1078
1110
|
scope?: AuthorizationScope;
|
|
1111
|
+
/**
|
|
1112
|
+
* @deprecated Ignored by the server: the consent message names the approval setup's sub-account.
|
|
1113
|
+
*/
|
|
1079
1114
|
business_name?: string;
|
|
1080
1115
|
business_profile_id?: string;
|
|
1081
1116
|
/** Seconds from now until the authorization expires. */
|
|
@@ -1139,10 +1174,22 @@ export interface TemplateContent {
|
|
|
1139
1174
|
button_text?: string;
|
|
1140
1175
|
button_url_template?: string;
|
|
1141
1176
|
}
|
|
1177
|
+
/**
|
|
1178
|
+
* Which project (sub-account) a templates call acts on. Templates exist per project only.
|
|
1179
|
+
*
|
|
1180
|
+
* Omitted: a project-bound API key uses its own project, any other caller the primary project. A
|
|
1181
|
+
* project-bound key naming a different project is refused (403 `profile_mismatch`).
|
|
1182
|
+
*/
|
|
1183
|
+
export interface TemplateProjectOptions {
|
|
1184
|
+
/** The project's id, sent as the `profile_id` query parameter. */
|
|
1185
|
+
profileId?: string;
|
|
1186
|
+
}
|
|
1142
1187
|
/** A message template (custom or default). */
|
|
1143
1188
|
export interface Template extends TemplateContent {
|
|
1144
1189
|
/** Present on custom templates only */
|
|
1145
1190
|
id?: string;
|
|
1191
|
+
/** The project the custom template belongs to. Present on custom templates only */
|
|
1192
|
+
profile_id?: string | null;
|
|
1146
1193
|
channel: TemplateChannel;
|
|
1147
1194
|
message_type: TemplateMessageType;
|
|
1148
1195
|
is_active?: boolean;
|
|
@@ -1156,6 +1203,8 @@ export interface TemplateVariable {
|
|
|
1156
1203
|
}
|
|
1157
1204
|
/** Response from `GET /api/v1/templates`. */
|
|
1158
1205
|
export interface TemplateListResponse {
|
|
1206
|
+
/** The project whose templates are listed */
|
|
1207
|
+
profile_id: string | null;
|
|
1159
1208
|
custom_templates: Template[];
|
|
1160
1209
|
available_channels: TemplateChannel[];
|
|
1161
1210
|
available_message_types: TemplateMessageType[];
|
|
@@ -1168,6 +1217,10 @@ export interface TemplateDefaultsResponse {
|
|
|
1168
1217
|
/** Response from `GET /api/v1/templates/:channel/:messageType`. */
|
|
1169
1218
|
export interface TemplateGetResponse {
|
|
1170
1219
|
is_custom: boolean;
|
|
1220
|
+
/** `project`: the project's own template; `default`: the platform default it falls back to */
|
|
1221
|
+
scope: 'project' | 'default';
|
|
1222
|
+
/** The project the template was resolved for */
|
|
1223
|
+
profile_id: string | null;
|
|
1171
1224
|
template: Template;
|
|
1172
1225
|
}
|
|
1173
1226
|
/** Response from `PUT /api/v1/templates/:channel/:messageType`. */
|
|
@@ -1248,6 +1301,10 @@ export interface Profile {
|
|
|
1248
1301
|
show_proof_channels?: boolean;
|
|
1249
1302
|
/** The owner's switch for the public Delegations section (default true). */
|
|
1250
1303
|
show_delegations?: boolean;
|
|
1304
|
+
/** Theme of this project's emails; null when unset (read as `dark`). Returned to the owner. */
|
|
1305
|
+
email_theme?: 'dark' | 'light' | null;
|
|
1306
|
+
/** Support address shown in this project's messages as `{{support_email}}`. Returned to the owner. */
|
|
1307
|
+
support_email?: string | null;
|
|
1251
1308
|
view_count?: number;
|
|
1252
1309
|
created_at: string;
|
|
1253
1310
|
updated_at: string;
|
|
@@ -1262,6 +1319,10 @@ export interface CreateProfileParams {
|
|
|
1262
1319
|
is_public?: boolean;
|
|
1263
1320
|
is_primary?: boolean;
|
|
1264
1321
|
theme?: ProfileTheme;
|
|
1322
|
+
/** Theme of the HTML emails sent for this project. Unset reads as `dark`. */
|
|
1323
|
+
email_theme?: 'dark' | 'light';
|
|
1324
|
+
/** Support address shown in this project's messages as `{{support_email}}`. */
|
|
1325
|
+
support_email?: string;
|
|
1265
1326
|
}
|
|
1266
1327
|
/** Body accepted by `PATCH /api/v1/me/profiles/:profileId`. */
|
|
1267
1328
|
export interface UpdateProfileParams {
|
|
@@ -1278,6 +1339,10 @@ export interface UpdateProfileParams {
|
|
|
1278
1339
|
show_delegations?: boolean;
|
|
1279
1340
|
theme?: ProfileTheme;
|
|
1280
1341
|
custom_links?: CustomLink[];
|
|
1342
|
+
/** Theme of the HTML emails sent for this project. Unset reads as `dark`. */
|
|
1343
|
+
email_theme?: 'dark' | 'light';
|
|
1344
|
+
/** Support address shown in this project's messages as `{{support_email}}`; `null` clears it. */
|
|
1345
|
+
support_email?: string | null;
|
|
1281
1346
|
}
|
|
1282
1347
|
/** Response from `GET /api/v1/me/profiles`. */
|
|
1283
1348
|
export interface ProfileListResponse {
|