powersync 0.1.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/README.md +339 -0
- package/bin/dev.cmd +3 -0
- package/bin/dev.js +9 -0
- package/bin/run.cmd +3 -0
- package/bin/run.js +8 -0
- package/dist/commands/init.d.ts +7 -0
- package/dist/commands/init.js +49 -0
- package/dist/commands/instance/config.d.ts +6 -0
- package/dist/commands/instance/config.js +23 -0
- package/dist/commands/instance/create.d.ts +16 -0
- package/dist/commands/instance/create.js +163 -0
- package/dist/commands/instance/deploy.d.ts +15 -0
- package/dist/commands/instance/deploy.js +142 -0
- package/dist/commands/instance/destroy.d.ts +9 -0
- package/dist/commands/instance/destroy.js +42 -0
- package/dist/commands/instance/schema.d.ts +6 -0
- package/dist/commands/instance/schema.js +20 -0
- package/dist/commands/instance/set.d.ts +9 -0
- package/dist/commands/instance/set.js +31 -0
- package/dist/commands/instance/status.d.ts +6 -0
- package/dist/commands/instance/status.js +21 -0
- package/dist/commands/instance/stop.d.ts +9 -0
- package/dist/commands/instance/stop.js +42 -0
- package/dist/commands/instance/sync-rules/deploy.d.ts +10 -0
- package/dist/commands/instance/sync-rules/deploy.js +49 -0
- package/dist/commands/instance/sync-rules/generate-schema.d.ts +10 -0
- package/dist/commands/instance/sync-rules/generate-schema.js +55 -0
- package/dist/commands/instance/sync-rules/validate.d.ts +9 -0
- package/dist/commands/instance/sync-rules/validate.js +29 -0
- package/dist/commands/instances.d.ts +6 -0
- package/dist/commands/instances.js +20 -0
- package/dist/constants.d.ts +11 -0
- package/dist/constants.js +8 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/powersync-sdk/accounts/api.d.ts +717 -0
- package/dist/powersync-sdk/accounts/api.js +182 -0
- package/dist/powersync-sdk/accounts/client.d.ts +1096 -0
- package/dist/powersync-sdk/accounts/client.js +124 -0
- package/dist/powersync-sdk/accounts/codecs.d.ts +32 -0
- package/dist/powersync-sdk/accounts/codecs.js +93 -0
- package/dist/powersync-sdk/accounts/index.d.ts +4 -0
- package/dist/powersync-sdk/accounts/index.js +4 -0
- package/dist/powersync-sdk/accounts/models.d.ts +260 -0
- package/dist/powersync-sdk/accounts/models.js +96 -0
- package/dist/powersync-sdk/accounts/routes.d.ts +44 -0
- package/dist/powersync-sdk/accounts/routes.js +45 -0
- package/dist/powersync-sdk/accounts/source.d.ts +76 -0
- package/dist/powersync-sdk/accounts/source.js +32 -0
- package/dist/powersync-sdk/errors/errors.d.ts +62 -0
- package/dist/powersync-sdk/errors/errors.js +115 -0
- package/dist/powersync-sdk/errors/index.d.ts +2 -0
- package/dist/powersync-sdk/errors/index.js +2 -0
- package/dist/powersync-sdk/errors/utils.d.ts +4 -0
- package/dist/powersync-sdk/errors/utils.js +18 -0
- package/dist/powersync-sdk/fetch-clients/codecs.d.ts +4 -0
- package/dist/powersync-sdk/fetch-clients/codecs.js +34 -0
- package/dist/powersync-sdk/fetch-clients/decoders.d.ts +3 -0
- package/dist/powersync-sdk/fetch-clients/decoders.js +35 -0
- package/dist/powersync-sdk/fetch-clients/definitions.d.ts +97 -0
- package/dist/powersync-sdk/fetch-clients/definitions.js +22 -0
- package/dist/powersync-sdk/fetch-clients/errors.d.ts +7 -0
- package/dist/powersync-sdk/fetch-clients/errors.js +19 -0
- package/dist/powersync-sdk/fetch-clients/index.d.ts +5 -0
- package/dist/powersync-sdk/fetch-clients/index.js +5 -0
- package/dist/powersync-sdk/fetch-clients/node-client.d.ts +9 -0
- package/dist/powersync-sdk/fetch-clients/node-client.js +107 -0
- package/dist/powersync-sdk/fetch-clients/request.d.ts +11 -0
- package/dist/powersync-sdk/fetch-clients/request.js +138 -0
- package/dist/powersync-sdk/fetch-clients/streaming.d.ts +65 -0
- package/dist/powersync-sdk/fetch-clients/streaming.js +99 -0
- package/dist/powersync-sdk/fetch-clients/utils.d.ts +13 -0
- package/dist/powersync-sdk/fetch-clients/utils.js +43 -0
- package/dist/powersync-sdk/fetch-clients/web-client.d.ts +14 -0
- package/dist/powersync-sdk/fetch-clients/web-client.js +56 -0
- package/dist/powersync-sdk/json/index.d.ts +4 -0
- package/dist/powersync-sdk/json/index.js +3 -0
- package/dist/powersync-sdk/json/json.d.ts +5 -0
- package/dist/powersync-sdk/json/json.js +35 -0
- package/dist/powersync-sdk/json/json_container.d.ts +18 -0
- package/dist/powersync-sdk/json/json_container.js +28 -0
- package/dist/powersync-sdk/json/json_stringify.d.ts +36 -0
- package/dist/powersync-sdk/json/json_stringify.js +162 -0
- package/dist/powersync-sdk/powersync/client.d.ts +449 -0
- package/dist/powersync-sdk/powersync/client.js +53 -0
- package/dist/powersync-sdk/powersync/config/HostedConfig.d.ts +327 -0
- package/dist/powersync-sdk/powersync/config/HostedConfig.js +92 -0
- package/dist/powersync-sdk/powersync/config/PowerSyncConfig.d.ts +211 -0
- package/dist/powersync-sdk/powersync/config/PowerSyncConfig.js +97 -0
- package/dist/powersync-sdk/powersync/config/normalize.d.ts +32 -0
- package/dist/powersync-sdk/powersync/config/normalize.js +85 -0
- package/dist/powersync-sdk/powersync/definitions.d.ts +149 -0
- package/dist/powersync-sdk/powersync/definitions.js +97 -0
- package/dist/powersync-sdk/powersync/index.d.ts +8 -0
- package/dist/powersync-sdk/powersync/index.js +8 -0
- package/dist/powersync-sdk/powersync/internal_routes.d.ts +247 -0
- package/dist/powersync-sdk/powersync/internal_routes.js +69 -0
- package/dist/powersync-sdk/powersync/routes.d.ts +779 -0
- package/dist/powersync-sdk/powersync/routes.js +191 -0
- package/dist/powersync-sdk/sdk-clients/endpoints.d.ts +31 -0
- package/dist/powersync-sdk/sdk-clients/endpoints.js +48 -0
- package/dist/powersync-sdk/sdk-clients/index.d.ts +3 -0
- package/dist/powersync-sdk/sdk-clients/index.js +3 -0
- package/dist/powersync-sdk/sdk-clients/pagination.d.ts +14 -0
- package/dist/powersync-sdk/sdk-clients/pagination.js +21 -0
- package/dist/powersync-sdk/sdk-clients/sdk-client.d.ts +17 -0
- package/dist/powersync-sdk/sdk-clients/sdk-client.js +30 -0
- package/dist/powersync-sdk/streaming/bson/buffer-array.d.ts +31 -0
- package/dist/powersync-sdk/streaming/bson/buffer-array.js +79 -0
- package/dist/powersync-sdk/streaming/bson/constants.d.ts +2 -0
- package/dist/powersync-sdk/streaming/bson/constants.js +1 -0
- package/dist/powersync-sdk/streaming/bson/decoder.d.ts +10 -0
- package/dist/powersync-sdk/streaming/bson/decoder.js +62 -0
- package/dist/powersync-sdk/streaming/bson/encoder.d.ts +10 -0
- package/dist/powersync-sdk/streaming/bson/encoder.js +23 -0
- package/dist/powersync-sdk/streaming/bson/header.d.ts +11 -0
- package/dist/powersync-sdk/streaming/bson/header.js +52 -0
- package/dist/powersync-sdk/streaming/bson/index.d.ts +5 -0
- package/dist/powersync-sdk/streaming/bson/index.js +5 -0
- package/dist/powersync-sdk/streaming/core/backpressure.d.ts +15 -0
- package/dist/powersync-sdk/streaming/core/backpressure.js +34 -0
- package/dist/powersync-sdk/streaming/core/cross-stream.d.ts +6 -0
- package/dist/powersync-sdk/streaming/core/cross-stream.js +17 -0
- package/dist/powersync-sdk/streaming/core/index.d.ts +4 -0
- package/dist/powersync-sdk/streaming/core/index.js +4 -0
- package/dist/powersync-sdk/streaming/core/node-utils.d.ts +7 -0
- package/dist/powersync-sdk/streaming/core/node-utils.js +11 -0
- package/dist/powersync-sdk/streaming/core/transformers.d.ts +41 -0
- package/dist/powersync-sdk/streaming/core/transformers.js +70 -0
- package/dist/powersync-sdk/streaming/core/utils.d.ts +36 -0
- package/dist/powersync-sdk/streaming/core/utils.js +66 -0
- package/dist/powersync-sdk/streaming/index.d.ts +3 -0
- package/dist/powersync-sdk/streaming/index.js +3 -0
- package/dist/powersync-sdk/streaming/web.d.ts +4 -0
- package/dist/powersync-sdk/streaming/web.js +4 -0
- package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/binaryreader.d.ts +2 -0
- package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/binaryreader.js +36 -0
- package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/binarywriter.d.ts +2 -0
- package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/binarywriter.js +58 -0
- package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/geometry.d.ts +18 -0
- package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/geometry.js +348 -0
- package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/geometrycollection.d.ts +11 -0
- package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/geometrycollection.js +118 -0
- package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/linestring.d.ts +11 -0
- package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/linestring.js +131 -0
- package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/multilinestring.d.ts +11 -0
- package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/multilinestring.js +134 -0
- package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/multipoint.d.ts +11 -0
- package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/multipoint.js +122 -0
- package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/multipolygon.d.ts +11 -0
- package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/multipolygon.js +158 -0
- package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/point.d.ts +14 -0
- package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/point.js +165 -0
- package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/polygon.d.ts +11 -0
- package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/polygon.js +207 -0
- package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/types.d.ts +30 -0
- package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/types.js +29 -0
- package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/wktparser.d.ts +2 -0
- package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/wktparser.js +111 -0
- package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/wkx.d.ts +9 -0
- package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/wkx.js +9 -0
- package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/zigzag.d.ts +5 -0
- package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/zigzag.js +9 -0
- package/dist/powersync-sdk/sync-rules/DartSchemaGenerator.d.ts +12 -0
- package/dist/powersync-sdk/sync-rules/DartSchemaGenerator.js +35 -0
- package/dist/powersync-sdk/sync-rules/ExpressionType.d.ts +33 -0
- package/dist/powersync-sdk/sync-rules/ExpressionType.js +62 -0
- package/dist/powersync-sdk/sync-rules/IdSequence.d.ts +4 -0
- package/dist/powersync-sdk/sync-rules/IdSequence.js +7 -0
- package/dist/powersync-sdk/sync-rules/JsSchemaGenerator.d.ts +12 -0
- package/dist/powersync-sdk/sync-rules/JsSchemaGenerator.js +38 -0
- package/dist/powersync-sdk/sync-rules/SchemaGenerator.d.ts +14 -0
- package/dist/powersync-sdk/sync-rules/SchemaGenerator.js +24 -0
- package/dist/powersync-sdk/sync-rules/SourceTableInterface.d.ts +5 -0
- package/dist/powersync-sdk/sync-rules/SourceTableInterface.js +1 -0
- package/dist/powersync-sdk/sync-rules/SqlBucketDescriptor.d.ts +37 -0
- package/dist/powersync-sdk/sync-rules/SqlBucketDescriptor.js +116 -0
- package/dist/powersync-sdk/sync-rules/SqlDataQuery.d.ts +39 -0
- package/dist/powersync-sdk/sync-rules/SqlDataQuery.js +245 -0
- package/dist/powersync-sdk/sync-rules/SqlParameterQuery.d.ts +43 -0
- package/dist/powersync-sdk/sync-rules/SqlParameterQuery.js +254 -0
- package/dist/powersync-sdk/sync-rules/SqlSyncRules.d.ts +52 -0
- package/dist/powersync-sdk/sync-rules/SqlSyncRules.js +252 -0
- package/dist/powersync-sdk/sync-rules/StaticSchema.d.ts +26 -0
- package/dist/powersync-sdk/sync-rules/StaticSchema.js +71 -0
- package/dist/powersync-sdk/sync-rules/StaticSqlParameterQuery.d.ts +24 -0
- package/dist/powersync-sdk/sync-rules/StaticSqlParameterQuery.js +71 -0
- package/dist/powersync-sdk/sync-rules/TablePattern.d.ts +17 -0
- package/dist/powersync-sdk/sync-rules/TablePattern.js +56 -0
- package/dist/powersync-sdk/sync-rules/TableQuerySchema.d.ts +9 -0
- package/dist/powersync-sdk/sync-rules/TableQuerySchema.js +41 -0
- package/dist/powersync-sdk/sync-rules/errors.d.ts +22 -0
- package/dist/powersync-sdk/sync-rules/errors.js +60 -0
- package/dist/powersync-sdk/sync-rules/generators.d.ts +6 -0
- package/dist/powersync-sdk/sync-rules/generators.js +6 -0
- package/dist/powersync-sdk/sync-rules/index.d.ts +17 -0
- package/dist/powersync-sdk/sync-rules/index.js +17 -0
- package/dist/powersync-sdk/sync-rules/json_schema.d.ts +3 -0
- package/dist/powersync-sdk/sync-rules/json_schema.js +50 -0
- package/dist/powersync-sdk/sync-rules/sql_filters.d.ts +91 -0
- package/dist/powersync-sdk/sync-rules/sql_filters.js +491 -0
- package/dist/powersync-sdk/sync-rules/sql_functions.d.ts +53 -0
- package/dist/powersync-sdk/sync-rules/sql_functions.js +755 -0
- package/dist/powersync-sdk/sync-rules/sql_support.d.ts +22 -0
- package/dist/powersync-sdk/sync-rules/sql_support.js +208 -0
- package/dist/powersync-sdk/sync-rules/types.d.ts +174 -0
- package/dist/powersync-sdk/sync-rules/types.js +9 -0
- package/dist/powersync-sdk/sync-rules/utils.d.ts +45 -0
- package/dist/powersync-sdk/sync-rules/utils.js +163 -0
- package/dist/service/accounts.client.d.ts +26 -0
- package/dist/service/accounts.client.js +26 -0
- package/dist/service/powersync.client.d.ts +269 -0
- package/dist/service/powersync.client.js +135 -0
- package/dist/service/types.d.ts +69 -0
- package/dist/service/types.js +1 -0
- package/dist/service/utils.d.ts +5 -0
- package/dist/service/utils.js +7 -0
- package/dist/utils.d.ts +6 -0
- package/dist/utils.js +52 -0
- package/oclif.manifest.json +514 -0
- package/package.json +81 -0
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/* eslint-disable new-cap */
|
|
2
|
+
/* eslint-disable camelcase */
|
|
3
|
+
import * as t from 'ts-codec';
|
|
4
|
+
import * as codecs from './codecs.js';
|
|
5
|
+
import * as models from './models.js';
|
|
6
|
+
import * as source from './source.js';
|
|
7
|
+
export const IDParam = t.object({
|
|
8
|
+
id: t.string
|
|
9
|
+
});
|
|
10
|
+
export const OperationResponse = t.object({
|
|
11
|
+
success: t.boolean
|
|
12
|
+
});
|
|
13
|
+
export const PaginationParams = t.object({
|
|
14
|
+
cursor: t.string.optional(),
|
|
15
|
+
limit: t.number.optional()
|
|
16
|
+
});
|
|
17
|
+
export const SearchParams = PaginationParams.and(t.object({
|
|
18
|
+
search: t.string
|
|
19
|
+
}));
|
|
20
|
+
export const ListResponseMetaData = t.object({
|
|
21
|
+
count: t.number,
|
|
22
|
+
cursor: t.string,
|
|
23
|
+
more: t.boolean,
|
|
24
|
+
total: t.number
|
|
25
|
+
});
|
|
26
|
+
export const DowngradeOrgParams = t.object({
|
|
27
|
+
org_id: t.string,
|
|
28
|
+
trial_duration: t.number
|
|
29
|
+
});
|
|
30
|
+
export const UpgradeOrgParams = t.object({
|
|
31
|
+
org_id: t.string
|
|
32
|
+
});
|
|
33
|
+
export const CreateOrgParams = t.object({
|
|
34
|
+
name: t.string
|
|
35
|
+
});
|
|
36
|
+
export const UpdateOrgParams = t.object({
|
|
37
|
+
id: t.string,
|
|
38
|
+
label: t.string.optional(),
|
|
39
|
+
locked: t.boolean.optional()
|
|
40
|
+
});
|
|
41
|
+
export const UpdateOrgBilling = t.object({
|
|
42
|
+
business_customer_code: t.string.optional(),
|
|
43
|
+
business_customer_region: t.Enum(models.BUSINESS_REGION).optional(),
|
|
44
|
+
id: t.string
|
|
45
|
+
});
|
|
46
|
+
export const ListOrgParams = PaginationParams.and(codecs.FilterProperties(models.OrganizationResource));
|
|
47
|
+
export const ListOrgResponse = ListResponseMetaData.and(t.object({
|
|
48
|
+
objects: t.array(models.OrganizationResource)
|
|
49
|
+
}));
|
|
50
|
+
export const CreateAppParams = t.object({
|
|
51
|
+
auth_scope_id: t.string.optional(),
|
|
52
|
+
default_region: t.string,
|
|
53
|
+
features: t.array(t.Enum(models.ProjectFeatureFlags)).optional(),
|
|
54
|
+
name: t.string,
|
|
55
|
+
org_id: t.string,
|
|
56
|
+
source: source.SourceMetadata,
|
|
57
|
+
vcs_mode: t.string
|
|
58
|
+
});
|
|
59
|
+
export const UpdateAppParams = t.object({
|
|
60
|
+
auth_scope_id: t.string.optional(),
|
|
61
|
+
id: t.string,
|
|
62
|
+
name: t.string.optional(),
|
|
63
|
+
source: source.SourceMetadata.optional(),
|
|
64
|
+
vcs_mode: t.Enum(models.VCS_MODE).optional()
|
|
65
|
+
});
|
|
66
|
+
export const ListAppParams = PaginationParams.and(codecs.FilterProperties(codecs.ResourceId.and(t.object({
|
|
67
|
+
name: t.string,
|
|
68
|
+
org_id: t.string
|
|
69
|
+
}))));
|
|
70
|
+
export const ListAppsResponse = ListResponseMetaData.and(t.object({
|
|
71
|
+
objects: t.array(models.AppResource)
|
|
72
|
+
}));
|
|
73
|
+
export const GetUserInvitesParams = PaginationParams.and(codecs.FilterProperties(models.DeveloperInviteResource));
|
|
74
|
+
export const ListUserInvitesResponse = ListResponseMetaData.and(t.object({
|
|
75
|
+
objects: t.array(models.DeveloperInviteResource)
|
|
76
|
+
}));
|
|
77
|
+
export const ListUserParams = PaginationParams.and(codecs.FilterProperties(models.UserResource));
|
|
78
|
+
export const ListUserResponse = ListResponseMetaData.and(t.object({
|
|
79
|
+
objects: t.array(models.UserResource)
|
|
80
|
+
}));
|
|
81
|
+
export const StartTrialParams = t.object({
|
|
82
|
+
email: t.string,
|
|
83
|
+
features: t.array(t.Enum(models.ProjectFeatureFlags)).optional(),
|
|
84
|
+
trial_duration: t.number.optional(),
|
|
85
|
+
user_id: t.string.optional()
|
|
86
|
+
});
|
|
87
|
+
export const CreateDeveloperInviteParams = t.object({
|
|
88
|
+
email: t.string,
|
|
89
|
+
metadata: t
|
|
90
|
+
.object({
|
|
91
|
+
role_names: t.array(t.string)
|
|
92
|
+
})
|
|
93
|
+
.optional(),
|
|
94
|
+
org_id: t.string,
|
|
95
|
+
requested_role_ids: t.array(t.string)
|
|
96
|
+
});
|
|
97
|
+
export const GetTrialUserResponse = models.UserResource.and(t.object({
|
|
98
|
+
onboarding_token: t.string.optional()
|
|
99
|
+
}));
|
|
100
|
+
export const UpdateInviteParams = t.object({
|
|
101
|
+
id: t.string,
|
|
102
|
+
requested_role_ids: t.array(t.string)
|
|
103
|
+
});
|
|
104
|
+
export const CompleteSignupParams = t.object({
|
|
105
|
+
id: t.string,
|
|
106
|
+
name: t.string,
|
|
107
|
+
password: t.string,
|
|
108
|
+
phone_number: t.string.optional()
|
|
109
|
+
});
|
|
110
|
+
export const TokenResponse = t.object({
|
|
111
|
+
token: t.string
|
|
112
|
+
});
|
|
113
|
+
export const GiveUserAccessParams = t.object({
|
|
114
|
+
org_id: t.string,
|
|
115
|
+
type: t.Enum(models.UserOrgAccess),
|
|
116
|
+
user_id: t.string
|
|
117
|
+
});
|
|
118
|
+
/**
|
|
119
|
+
* Password is required if no MFA is active.
|
|
120
|
+
* Factor ID and OTP is required if MFA is enabled for the user.
|
|
121
|
+
*/
|
|
122
|
+
export const GetSensitiveAccessTokenParams = t.object({
|
|
123
|
+
factor_id: t.string.optional(),
|
|
124
|
+
otp_attempt: t.string.optional(),
|
|
125
|
+
password: t.string.optional()
|
|
126
|
+
});
|
|
127
|
+
export const GetSensitiveAccessTokenResponse = t.object({
|
|
128
|
+
token: t.string
|
|
129
|
+
});
|
|
130
|
+
export const GetPreferredMFAFactorResponse = t.object({
|
|
131
|
+
factor: models.UserMFAFactorResource.optional()
|
|
132
|
+
});
|
|
133
|
+
export const CreateUserParams = t.omit(models.User, ['signup_complete']);
|
|
134
|
+
export const ListUserMFAFactorsResponse = t.object({
|
|
135
|
+
backup_codes_viewed: t.boolean,
|
|
136
|
+
factors: t.array(models.UserMFAFactorResource),
|
|
137
|
+
preferred_factor_id: t.string.optional()
|
|
138
|
+
});
|
|
139
|
+
export const UpdateUserParams = t.object({
|
|
140
|
+
id: t.string,
|
|
141
|
+
name: t.string.optional()
|
|
142
|
+
});
|
|
143
|
+
export const RegisterTOTPMFAFactorResponse = t.object({
|
|
144
|
+
factor: models.UserMFAFactorResource,
|
|
145
|
+
factor_uri: t.string
|
|
146
|
+
});
|
|
147
|
+
export const RegisterSMSMFAFactorParams = t.object({
|
|
148
|
+
consented_at: codecs.date,
|
|
149
|
+
mobile_number: t.string
|
|
150
|
+
});
|
|
151
|
+
export const RegisterSMSMFAFactorResponse = t.object({
|
|
152
|
+
factor: models.UserMFAFactorResource,
|
|
153
|
+
factor_uri: t.string
|
|
154
|
+
});
|
|
155
|
+
export const VerifyMFAFactorParams = t.object({
|
|
156
|
+
code: t.string,
|
|
157
|
+
factor_id: t.string
|
|
158
|
+
});
|
|
159
|
+
export const VerifyMFAFactorResponse = t.object({
|
|
160
|
+
success: t.boolean
|
|
161
|
+
});
|
|
162
|
+
export const DeleteMFAFactorParams = t.object({
|
|
163
|
+
factor_id: t.string
|
|
164
|
+
});
|
|
165
|
+
export const DeleteMFAFactorResponse = t.object({
|
|
166
|
+
success: t.boolean
|
|
167
|
+
});
|
|
168
|
+
export const GetMFABackupCodesResponse = t.object({
|
|
169
|
+
backup_codes: t.array(t.string)
|
|
170
|
+
});
|
|
171
|
+
export const SetUserMFAPreferenceParams = t.object({
|
|
172
|
+
factor_id: t.string
|
|
173
|
+
});
|
|
174
|
+
export const SetUserMFAPreferenceResponse = t.object({
|
|
175
|
+
factor: t.Enum(models.MFAFactor).optional()
|
|
176
|
+
});
|
|
177
|
+
export const SendMFASMSParams = t.object({
|
|
178
|
+
factor_id: t.string
|
|
179
|
+
});
|
|
180
|
+
export const SendMFASMSResponse = t.object({
|
|
181
|
+
sent: t.boolean
|
|
182
|
+
});
|