@spoketech/hub-client 0.1.24 → 0.1.25
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 +58 -0
- package/dist/index.d.ts +1262 -143
- package/dist/index.js +131 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2793,7 +2793,21 @@ var OrganizationMemberSourceWebhookUpsertResponseSchema = Schema2.Struct({
|
|
|
2793
2793
|
Schema2.Null
|
|
2794
2794
|
])
|
|
2795
2795
|
});
|
|
2796
|
+
var SyncProgressCount = Schema2.Int.check(Schema2.isGreaterThanOrEqualTo(0));
|
|
2797
|
+
var OnsiteAgentRunProgressSchema = Schema2.Struct({
|
|
2798
|
+
stage: Schema2.Literals(["members", "contact_preferences", "uploading", "queued_for_import"]),
|
|
2799
|
+
processingStage: Schema2.optional(
|
|
2800
|
+
Schema2.Literals(["indexing_preferences", "normalizing_members", "serializing"])
|
|
2801
|
+
),
|
|
2802
|
+
recordsProcessed: Schema2.optional(SyncProgressCount),
|
|
2803
|
+
pagesFetched: SyncProgressCount,
|
|
2804
|
+
recordsFetched: SyncProgressCount,
|
|
2805
|
+
totalPages: Schema2.Union([SyncProgressCount, Schema2.Null]),
|
|
2806
|
+
totalRecords: Schema2.Union([SyncProgressCount, Schema2.Null]),
|
|
2807
|
+
pageSize: Schema2.Union([SyncProgressCount, Schema2.Null])
|
|
2808
|
+
});
|
|
2796
2809
|
var OrganizationMemberSyncRunSummarySchema = Schema2.Struct({
|
|
2810
|
+
sourceProgress: Schema2.optional(OnsiteAgentRunProgressSchema),
|
|
2797
2811
|
totalRecords: Schema2.Number,
|
|
2798
2812
|
inserted: Schema2.Number,
|
|
2799
2813
|
updated: Schema2.Number,
|
|
@@ -3672,6 +3686,39 @@ var PresignedPostSchema = Schema2.Struct({
|
|
|
3672
3686
|
url: Schema2.String,
|
|
3673
3687
|
fields: Schema2.Record(Schema2.String, Schema2.String)
|
|
3674
3688
|
});
|
|
3689
|
+
var CreateOrganizationInitialMembershipUploadSchema = Schema2.Struct({
|
|
3690
|
+
fileName: Schema2.String.pipe(
|
|
3691
|
+
Schema2.check(Schema2.isMaxLength(255)),
|
|
3692
|
+
Schema2.check(Schema2.isPattern(/^[^/\\\p{Cc}]+\.(csv|xlsx|xls)$/iu))
|
|
3693
|
+
)
|
|
3694
|
+
});
|
|
3695
|
+
var OrganizationInitialMembershipUploadsSchema = Schema2.Struct({
|
|
3696
|
+
hasUpload: Schema2.Boolean,
|
|
3697
|
+
uploads: Schema2.Array(Schema2.Struct({
|
|
3698
|
+
uploadId: Schema2.String,
|
|
3699
|
+
fileName: Schema2.String,
|
|
3700
|
+
objectKey: Schema2.String,
|
|
3701
|
+
sizeBytes: Schema2.Number,
|
|
3702
|
+
uploadedAt: Schema2.NullOr(Schema2.String)
|
|
3703
|
+
}))
|
|
3704
|
+
});
|
|
3705
|
+
var OrganizationInitialMembershipUploadDownloadSchema = Schema2.Struct({
|
|
3706
|
+
url: Schema2.String,
|
|
3707
|
+
expiresIn: Schema2.Number
|
|
3708
|
+
});
|
|
3709
|
+
var DeleteOrganizationInitialMembershipUploadResponseSchema = Schema2.Struct({
|
|
3710
|
+
uploadId: Schema2.String,
|
|
3711
|
+
deleted: Schema2.Boolean
|
|
3712
|
+
});
|
|
3713
|
+
var CreateOrganizationInitialMembershipUploadResponseSchema = Schema2.Struct({
|
|
3714
|
+
uploadId: Schema2.String,
|
|
3715
|
+
bucketName: Schema2.String,
|
|
3716
|
+
objectKey: Schema2.String,
|
|
3717
|
+
fileName: Schema2.String,
|
|
3718
|
+
contentType: Schema2.String,
|
|
3719
|
+
expiresIn: Schema2.Number,
|
|
3720
|
+
presignedPost: PresignedPostSchema
|
|
3721
|
+
});
|
|
3675
3722
|
var CreateOrganizationMemberSourceCsvUploadResponseSchema = Schema2.Struct({
|
|
3676
3723
|
importSession: OrganizationMemberSourceCsvImportSchema,
|
|
3677
3724
|
mapping: OrganizationMemberSourceCsvMappingSchema,
|
|
@@ -5148,6 +5195,60 @@ var memberSourcesGroup = HttpApiGroup.make("memberSources").add(
|
|
|
5148
5195
|
summary: "Create or update the CSV mapping for an organization member source"
|
|
5149
5196
|
})
|
|
5150
5197
|
)
|
|
5198
|
+
).add(
|
|
5199
|
+
HttpApiEndpoint.get(
|
|
5200
|
+
"getOrganizationInitialMembershipUploads",
|
|
5201
|
+
"/organizations/:organizationId/initial-membership-uploads",
|
|
5202
|
+
{
|
|
5203
|
+
params: OrganizationIdParams,
|
|
5204
|
+
success: OrganizationInitialMembershipUploadsSchema,
|
|
5205
|
+
error: CommonErrorSchemas
|
|
5206
|
+
}
|
|
5207
|
+
).annotateMerge(OpenApi.annotations({ summary: "Check for stored initial membership exports" }))
|
|
5208
|
+
).add(
|
|
5209
|
+
HttpApiEndpoint.get(
|
|
5210
|
+
"getOrganizationInitialMembershipUploadDownload",
|
|
5211
|
+
"/organizations/:organizationId/initial-membership-uploads/:uploadId/download",
|
|
5212
|
+
{
|
|
5213
|
+
params: Schema2.Struct({
|
|
5214
|
+
organizationId: Schema2.String,
|
|
5215
|
+
uploadId: Schema2.String.pipe(Schema2.check(Schema2.isPattern(/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i)))
|
|
5216
|
+
}),
|
|
5217
|
+
success: OrganizationInitialMembershipUploadDownloadSchema,
|
|
5218
|
+
error: CommonErrorSchemas
|
|
5219
|
+
}
|
|
5220
|
+
).annotateMerge(OpenApi.annotations({ summary: "Get a five-minute download link for an initial membership export" }))
|
|
5221
|
+
).add(
|
|
5222
|
+
HttpApiEndpoint.delete(
|
|
5223
|
+
"deleteOrganizationInitialMembershipUpload",
|
|
5224
|
+
"/organizations/:organizationId/initial-membership-uploads/:uploadId",
|
|
5225
|
+
{
|
|
5226
|
+
params: Schema2.Struct({
|
|
5227
|
+
organizationId: Schema2.String,
|
|
5228
|
+
uploadId: Schema2.String.pipe(Schema2.check(Schema2.isPattern(/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i)))
|
|
5229
|
+
}),
|
|
5230
|
+
success: DeleteOrganizationInitialMembershipUploadResponseSchema,
|
|
5231
|
+
error: CommonErrorSchemas
|
|
5232
|
+
}
|
|
5233
|
+
).annotateMerge(OpenApi.annotations({ summary: "Delete a stored initial membership export" }))
|
|
5234
|
+
).add(
|
|
5235
|
+
HttpApiEndpoint.post(
|
|
5236
|
+
"createOrganizationInitialMembershipUpload",
|
|
5237
|
+
"/organizations/:organizationId/initial-membership-uploads",
|
|
5238
|
+
{
|
|
5239
|
+
params: OrganizationIdParams,
|
|
5240
|
+
payload: CreateOrganizationInitialMembershipUploadSchema,
|
|
5241
|
+
success: CreateOrganizationInitialMembershipUploadResponseSchema.pipe(
|
|
5242
|
+
HttpApiSchema2.status(201)
|
|
5243
|
+
),
|
|
5244
|
+
error: CommonErrorSchemas
|
|
5245
|
+
}
|
|
5246
|
+
).annotateMerge(
|
|
5247
|
+
OpenApi.annotations({
|
|
5248
|
+
summary: "Stage an initial CSV or Excel membership export for later mapping and review",
|
|
5249
|
+
description: "Returns a presigned S3 POST valid for two hours, limited to 100 MiB. No member source or mapping is required. Uploading does not import members."
|
|
5250
|
+
})
|
|
5251
|
+
)
|
|
5151
5252
|
).add(
|
|
5152
5253
|
HttpApiEndpoint.post(
|
|
5153
5254
|
"createOrganizationMemberSourceCsvUpload",
|
|
@@ -5454,6 +5555,13 @@ var onsiteAgentsGroup = HttpApiGroup.make("onsiteAgents").add(
|
|
|
5454
5555
|
summary: "Issue a fresh presigned CSV upload target for a claimed onsite sync run"
|
|
5455
5556
|
})
|
|
5456
5557
|
)
|
|
5558
|
+
).add(
|
|
5559
|
+
HttpApiEndpoint.post("reportOnsiteAgentRunProgress", "/onsite-agent/runs/:runId/progress", {
|
|
5560
|
+
params: OrganizationMemberSyncRunParams,
|
|
5561
|
+
payload: OnsiteAgentRunProgressSchema,
|
|
5562
|
+
success: Schema2.Struct({ accepted: Schema2.Boolean }),
|
|
5563
|
+
error: CommonErrorSchemas
|
|
5564
|
+
})
|
|
5457
5565
|
).add(
|
|
5458
5566
|
HttpApiEndpoint.post(
|
|
5459
5567
|
"completeOnsiteAgentRun",
|
|
@@ -6580,6 +6688,23 @@ function makeSpokeClient(hubClient) {
|
|
|
6580
6688
|
})
|
|
6581
6689
|
)
|
|
6582
6690
|
},
|
|
6691
|
+
initialMembershipUploads: {
|
|
6692
|
+
download: (input) => unwrap(
|
|
6693
|
+
hubClient.memberSources.getOrganizationInitialMembershipUploadDownload({ params: input })
|
|
6694
|
+
),
|
|
6695
|
+
get: (input) => unwrap(
|
|
6696
|
+
hubClient.memberSources.getOrganizationInitialMembershipUploads({ params: input })
|
|
6697
|
+
),
|
|
6698
|
+
delete: (input) => unwrap(
|
|
6699
|
+
hubClient.memberSources.deleteOrganizationInitialMembershipUpload({ params: input })
|
|
6700
|
+
),
|
|
6701
|
+
create: (input) => unwrap(
|
|
6702
|
+
hubClient.memberSources.createOrganizationInitialMembershipUpload({
|
|
6703
|
+
params: { organizationId: input.organizationId },
|
|
6704
|
+
payload: input.payload
|
|
6705
|
+
})
|
|
6706
|
+
)
|
|
6707
|
+
},
|
|
6583
6708
|
csvUploads: {
|
|
6584
6709
|
create: (input) => unwrap(
|
|
6585
6710
|
hubClient.memberSources.createOrganizationMemberSourceCsvUpload({
|
|
@@ -6790,6 +6915,8 @@ export {
|
|
|
6790
6915
|
ConvertOrganizationToDemoSchema,
|
|
6791
6916
|
CreateGuestSchema,
|
|
6792
6917
|
CreateMemberSchema,
|
|
6918
|
+
CreateOrganizationInitialMembershipUploadResponseSchema,
|
|
6919
|
+
CreateOrganizationInitialMembershipUploadSchema,
|
|
6793
6920
|
CreateOrganizationMemberSourceCsvUploadResponseSchema,
|
|
6794
6921
|
CreateOrganizationMemberSourceCsvUploadSchema,
|
|
6795
6922
|
CreateOrganizationPointTypeSchema,
|
|
@@ -6799,6 +6926,7 @@ export {
|
|
|
6799
6926
|
CreateServiceClientSchema,
|
|
6800
6927
|
CsvUploadReadinessSchema,
|
|
6801
6928
|
DateOnlySchema,
|
|
6929
|
+
DeleteOrganizationInitialMembershipUploadResponseSchema,
|
|
6802
6930
|
DeletePayloadSchema,
|
|
6803
6931
|
DeleteServiceClientSchema,
|
|
6804
6932
|
EnsureActiveMembershipCommandPayloadSchema,
|
|
@@ -6863,6 +6991,7 @@ export {
|
|
|
6863
6991
|
OnsiteAgentMemberPreferenceUpdateCommandSchema,
|
|
6864
6992
|
OnsiteAgentMemberRenewalCommandSchema,
|
|
6865
6993
|
OnsiteAgentMemberUpdateCommandSchema,
|
|
6994
|
+
OnsiteAgentRunProgressSchema,
|
|
6866
6995
|
OnsitePointCommandSchema,
|
|
6867
6996
|
OnsiteResourceCallRequestSchema,
|
|
6868
6997
|
OnsiteResourceCallResponseSchema,
|
|
@@ -6873,6 +7002,8 @@ export {
|
|
|
6873
7002
|
OnsiteVoucherCommandSchema,
|
|
6874
7003
|
OrganizationCapabilitiesSchema,
|
|
6875
7004
|
OrganizationCapabilitySchema,
|
|
7005
|
+
OrganizationInitialMembershipUploadDownloadSchema,
|
|
7006
|
+
OrganizationInitialMembershipUploadsSchema,
|
|
6876
7007
|
OrganizationMemberGenderSchema,
|
|
6877
7008
|
OrganizationMemberMembershipTypeSchema,
|
|
6878
7009
|
OrganizationMemberRatingGradeSchema,
|